Mercurial > hg > svgui
diff view/PaneStack.h @ 1447:8afea53332f3 single-point
Add option to make pane sizes auto-resize-only (i.e. remove user control via a splitter); also place alignment views above panes instead of below, meaning the extra bit of space that we currently have for the pane without one at least goes to the primary pane
author | Chris Cannam |
---|---|
date | Tue, 30 Apr 2019 15:53:21 +0100 |
parents | 7527701c8076 |
children | 69b7fdd6394f |
line wrap: on
line diff
--- a/view/PaneStack.h Tue Apr 30 14:02:32 2019 +0100 +++ b/view/PaneStack.h Tue Apr 30 15:53:21 2019 +0100 @@ -25,6 +25,7 @@ class QWidget; class QLabel; class QStackedWidget; +class QVBoxLayout; class QSplitter; class QGridLayout; class QPushButton; @@ -41,10 +42,10 @@ Q_OBJECT public: - PaneStack(QWidget *parent, ViewManager *viewManager); + PaneStack(QWidget *parent, + ViewManager *viewManager); Pane *addPane(bool suppressPropertyBox = false); // I own the returned value - Pane *insertPane(int index, bool suppressPropertyBox = false); // I own the returned value void deletePane(Pane *pane); // Deletes the pane, but _not_ its layers int getPaneCount() const; // Returns only count of visible panes @@ -70,6 +71,14 @@ LayoutStyle getLayoutStyle() const { return m_layoutStyle; } void setLayoutStyle(LayoutStyle style); + enum ResizeMode { + UserResizeable = 0, + AutoResizeOnly = 1 + }; + + ResizeMode getResizeMode() const { return m_resizeMode; } + void setResizeMode(ResizeMode); + void setPropertyStackMinWidth(int mw); void setShowPaneAccessories(bool show); // current indicator, close button @@ -132,7 +141,10 @@ bool m_showAccessories; bool m_showAlignmentViews; - QSplitter *m_splitter; + QSplitter *m_splitter; // constitutes the stack in UserResizeable mode + QWidget *m_autoResizeStack; // constitutes the stack in AutoResizeOnly mode + QVBoxLayout *m_autoResizeLayout; + QStackedWidget *m_propertyStackStack; ViewManager *m_viewManager; // I don't own this @@ -145,6 +157,7 @@ void relinkAlignmentViews(); LayoutStyle m_layoutStyle; + ResizeMode m_resizeMode; }; #endif