forked from qt-creator/qt-creator
FancyMainWindow: Use auto-hiding dock title bars
Instead of the manual hard-to-discover "Locked" action Change-Id: I08e3b65d3e620adfa1439a8de6e028ecfbdec16d Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -40,7 +40,7 @@ QT_END_NAMESPACE
|
||||
|
||||
namespace Utils {
|
||||
|
||||
struct FancyMainWindowPrivate;
|
||||
class FancyMainWindowPrivate;
|
||||
|
||||
class QTCREATOR_UTILS_EXPORT FancyMainWindow : public QMainWindow
|
||||
{
|
||||
@@ -56,7 +56,6 @@ public:
|
||||
QList<QDockWidget *> dockWidgets() const;
|
||||
|
||||
void setTrackingEnabled(bool enabled);
|
||||
bool isLocked() const;
|
||||
|
||||
void saveSettings(QSettings *settings) const;
|
||||
void restoreSettings(const QSettings *settings);
|
||||
@@ -64,15 +63,12 @@ public:
|
||||
void restoreSettings(const QHash<QString, QVariant> &settings);
|
||||
|
||||
// Additional context menu actions
|
||||
QAction *menuSeparator1() const;
|
||||
QAction *toggleLockedAction() const;
|
||||
QAction *menuSeparator2() const;
|
||||
QAction *menuSeparator() const;
|
||||
QAction *resetLayoutAction() const;
|
||||
|
||||
// Overwritten to add locked/reset.
|
||||
virtual QMenu *createPopupMenu();
|
||||
|
||||
|
||||
QDockWidget *toolBarDockWidget() const;
|
||||
void setToolBarDockWidget(QDockWidget *dock);
|
||||
|
||||
@@ -82,20 +78,18 @@ signals:
|
||||
void resetLayout();
|
||||
|
||||
public slots:
|
||||
void setLocked(bool locked);
|
||||
void setDockActionsVisible(bool v);
|
||||
|
||||
protected:
|
||||
void hideEvent(QHideEvent *event);
|
||||
void showEvent(QShowEvent *event);
|
||||
void contextMenuEvent(QContextMenuEvent *event);
|
||||
|
||||
private slots:
|
||||
void onDockActionTriggered();
|
||||
void onDockVisibilityChange(bool);
|
||||
void onTopLevelChanged();
|
||||
|
||||
private:
|
||||
void updateDockWidget(QDockWidget *dockWidget);
|
||||
void handleVisibilityChanged(bool visible);
|
||||
|
||||
FancyMainWindowPrivate *d;
|
||||
|
||||
Reference in New Issue
Block a user