comparison widgets/PaneStack.h @ 52:f2fe98a7c57e

* Use commands for add/delete pane in main window * Add compound command collection to command history (for add pane, import file etc) * Add hide/show pane and hidden pane list to PaneStack * Various other fixes
author Chris Cannam
date Mon, 13 Mar 2006 17:55:19 +0000
parents 78515b1e29eb
children 01ab51f72e84
comparison
equal deleted inserted replaced
51:d2eac322d71b 52:f2fe98a7c57e
13 13
14 #include <QSplitter> 14 #include <QSplitter>
15 15
16 class QWidget; 16 class QWidget;
17 class QLabel; 17 class QLabel;
18 class View;
18 class Pane; 19 class Pane;
19 class Layer; 20 class Layer;
20 class ViewManager; 21 class ViewManager;
21 class PropertyContainer; 22 class PropertyContainer;
22 class PropertyStack; 23 class PropertyStack;
27 28
28 public: 29 public:
29 PaneStack(QWidget *parent, ViewManager *viewManager); 30 PaneStack(QWidget *parent, ViewManager *viewManager);
30 31
31 Pane *addPane(bool suppressPropertyBox = false); // I own the returned value 32 Pane *addPane(bool suppressPropertyBox = false); // I own the returned value
32 Pane *getPane(int n); // I own the returned value 33 void deletePane(Pane *pane); // Deletes the pane, but _not_ its layers
33 void deletePane(Pane *pane); // Deletes the pane and all its layers
34 int getPaneCount() const;
35 34
36 //!!! void hidePane(Pane *pane); 35 int getPaneCount() const; // Returns only count of visible panes
37 // void showPane(Pane *pane); 36 Pane *getPane(int n); // Of visible panes; I own the returned value
37
38 void hidePane(Pane *pane); // Also removes pane from getPane/getPaneCount
39 void showPane(Pane *pane); // Returns pane to getPane/getPaneCount
40
41 int getHiddenPaneCount() const;
42 Pane *getHiddenPane(int n); // I own the returned value
38 43
39 void setCurrentPane(Pane *pane); 44 void setCurrentPane(Pane *pane);
40 void setCurrentLayer(Pane *pane, Layer *layer); 45 void setCurrentLayer(Pane *pane, Layer *layer);
41 Pane *getCurrentPane(); 46 Pane *getCurrentPane();
42 47
45 void currentLayerChanged(Pane *pane, Layer *layer); 50 void currentLayerChanged(Pane *pane, Layer *layer);
46 51
47 public slots: 52 public slots:
48 void propertyContainerAdded(PropertyContainer *); 53 void propertyContainerAdded(PropertyContainer *);
49 void propertyContainerRemoved(PropertyContainer *); 54 void propertyContainerRemoved(PropertyContainer *);
50 void propertyContainerSelected(PropertyContainer *); 55 void propertyContainerSelected(View *client, PropertyContainer *);
51 void paneInteractedWith(); 56 void paneInteractedWith();
52 57
53 protected: 58 protected:
54 Pane *m_currentPane; 59 Pane *m_currentPane;
55 //!!! should be a single vector of structs 60
56 std::vector<Pane *> m_panes; // I own these 61 struct PaneRec
57 std::vector<QWidget *> m_propertyStacks; // I own these 62 {
58 std::vector<QLabel *> m_currentIndicators; // I own these 63 Pane *pane;
64 QWidget *propertyStack;
65 QLabel *currentIndicator;
66 };
67
68 std::vector<PaneRec> m_panes;
69 std::vector<PaneRec> m_hiddenPanes;
70
59 ViewManager *m_viewManager; // I don't own this 71 ViewManager *m_viewManager; // I don't own this
60
61 void sizePropertyStacks(); 72 void sizePropertyStacks();
62 }; 73 };
63 74
64 #endif 75 #endif
65 76