diff view/PaneStack.h @ 1459:42c87368287c

Merge from branch single-point
author Chris Cannam
date Fri, 17 May 2019 10:02:52 +0100
parents 8afea53332f3
children 69b7fdd6394f
line wrap: on
line diff
--- a/view/PaneStack.h	Wed Apr 24 11:29:53 2019 +0100
+++ b/view/PaneStack.h	Fri May 17 10:02:52 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