Mercurial > hg > svgui
diff 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 |
line wrap: on
line diff
--- a/widgets/PaneStack.h Fri Mar 10 17:37:45 2006 +0000 +++ b/widgets/PaneStack.h Mon Mar 13 17:55:19 2006 +0000 @@ -15,6 +15,7 @@ class QWidget; class QLabel; +class View; class Pane; class Layer; class ViewManager; @@ -29,12 +30,16 @@ PaneStack(QWidget *parent, ViewManager *viewManager); Pane *addPane(bool suppressPropertyBox = false); // I own the returned value - Pane *getPane(int n); // I own the returned value - void deletePane(Pane *pane); // Deletes the pane and all its layers - int getPaneCount() const; + void deletePane(Pane *pane); // Deletes the pane, but _not_ its layers -//!!! void hidePane(Pane *pane); -// void showPane(Pane *pane); + int getPaneCount() const; // Returns only count of visible panes + Pane *getPane(int n); // Of visible panes; I own the returned value + + void hidePane(Pane *pane); // Also removes pane from getPane/getPaneCount + void showPane(Pane *pane); // Returns pane to getPane/getPaneCount + + int getHiddenPaneCount() const; + Pane *getHiddenPane(int n); // I own the returned value void setCurrentPane(Pane *pane); void setCurrentLayer(Pane *pane, Layer *layer); @@ -47,17 +52,23 @@ public slots: void propertyContainerAdded(PropertyContainer *); void propertyContainerRemoved(PropertyContainer *); - void propertyContainerSelected(PropertyContainer *); + void propertyContainerSelected(View *client, PropertyContainer *); void paneInteractedWith(); protected: Pane *m_currentPane; - //!!! should be a single vector of structs - std::vector<Pane *> m_panes; // I own these - std::vector<QWidget *> m_propertyStacks; // I own these - std::vector<QLabel *> m_currentIndicators; // I own these + + struct PaneRec + { + Pane *pane; + QWidget *propertyStack; + QLabel *currentIndicator; + }; + + std::vector<PaneRec> m_panes; + std::vector<PaneRec> m_hiddenPanes; + ViewManager *m_viewManager; // I don't own this - void sizePropertyStacks(); };