comparison widgets/PaneStack.h @ 108:4772fc75ac7c

* Some work on switching property box layout between one-box-per-pane and one-box-overall layouts. Not enabled in GUI yet.
author Chris Cannam
date Mon, 26 Jun 2006 16:08:57 +0000
parents 803830f186ef
children
comparison
equal deleted inserted replaced
107:bf196d6e8998 108:4772fc75ac7c
15 */ 15 */
16 16
17 #ifndef _PANESTACK_H_ 17 #ifndef _PANESTACK_H_
18 #define _PANESTACK_H_ 18 #define _PANESTACK_H_
19 19
20 #include <QSplitter> 20 #include <QFrame>
21 21
22 class QWidget; 22 class QWidget;
23 class QLabel; 23 class QLabel;
24 class QStackedWidget;
25 class QSplitter;
26 class QHBoxLayout;
24 class View; 27 class View;
25 class Pane; 28 class Pane;
26 class Layer; 29 class Layer;
27 class ViewManager; 30 class ViewManager;
28 class PropertyContainer; 31 class PropertyContainer;
29 class PropertyStack; 32 class PropertyStack;
30 33
31 class PaneStack : public QSplitter 34 class PaneStack : public QFrame
32 { 35 {
33 Q_OBJECT 36 Q_OBJECT
34 37
35 public: 38 public:
36 PaneStack(QWidget *parent, ViewManager *viewManager); 39 PaneStack(QWidget *parent, ViewManager *viewManager);
49 52
50 void setCurrentPane(Pane *pane); 53 void setCurrentPane(Pane *pane);
51 void setCurrentLayer(Pane *pane, Layer *layer); 54 void setCurrentLayer(Pane *pane, Layer *layer);
52 Pane *getCurrentPane(); 55 Pane *getCurrentPane();
53 56
57 enum LayoutStyle {
58 SinglePropertyStackLayout = 1,
59 PropertyStackPerPaneLayout = 2
60 };
61
62 LayoutStyle getLayoutStyle() const { return m_layoutStyle; }
63 void setLayoutStyle(LayoutStyle style);
64
54 signals: 65 signals:
55 void currentPaneChanged(Pane *pane); 66 void currentPaneChanged(Pane *pane);
56 void currentLayerChanged(Pane *pane, Layer *layer); 67 void currentLayerChanged(Pane *pane, Layer *layer);
57 void rightButtonMenuRequested(Pane *pane, QPoint position); 68 void rightButtonMenuRequested(Pane *pane, QPoint position);
58 69
66 protected: 77 protected:
67 Pane *m_currentPane; 78 Pane *m_currentPane;
68 79
69 struct PaneRec 80 struct PaneRec
70 { 81 {
71 Pane *pane; 82 Pane *pane;
72 QWidget *propertyStack; 83 QWidget *propertyStack;
73 QLabel *currentIndicator; 84 QLabel *currentIndicator;
85 QFrame *frame;
86 QHBoxLayout *layout;
74 }; 87 };
75 88
76 std::vector<PaneRec> m_panes; 89 std::vector<PaneRec> m_panes;
77 std::vector<PaneRec> m_hiddenPanes; 90 std::vector<PaneRec> m_hiddenPanes;
78 91
92 QSplitter *m_splitter;
93 QStackedWidget *m_propertyStackStack;
94
79 ViewManager *m_viewManager; // I don't own this 95 ViewManager *m_viewManager; // I don't own this
80 void sizePropertyStacks(); 96 void sizePropertyStacks();
97
98 LayoutStyle m_layoutStyle;
81 }; 99 };
82 100
83 #endif 101 #endif
84 102