Chris@0: Chris@0: /* -*- c-basic-offset: 4 -*- vi:set ts=8 sts=4 sw=4: */ Chris@0: Chris@0: /* Chris@0: A waveform viewer and audio annotation editor. Chris@5: Chris Cannam, Queen Mary University of London, 2005-2006 Chris@0: Chris@0: This is experimental software. Not for distribution. Chris@0: */ Chris@0: Chris@0: #ifndef _PANESTACK_H_ Chris@0: #define _PANESTACK_H_ Chris@0: Chris@0: #include Chris@0: Chris@0: class QWidget; Chris@0: class QLabel; Chris@52: class View; Chris@0: class Pane; Chris@17: class Layer; Chris@0: class ViewManager; Chris@0: class PropertyContainer; Chris@0: class PropertyStack; Chris@0: Chris@0: class PaneStack : public QSplitter Chris@0: { Chris@0: Q_OBJECT Chris@0: Chris@0: public: Chris@0: PaneStack(QWidget *parent, ViewManager *viewManager); Chris@0: Chris@0: Pane *addPane(bool suppressPropertyBox = false); // I own the returned value Chris@52: void deletePane(Pane *pane); // Deletes the pane, but _not_ its layers Chris@0: Chris@52: int getPaneCount() const; // Returns only count of visible panes Chris@52: Pane *getPane(int n); // Of visible panes; I own the returned value Chris@52: Chris@52: void hidePane(Pane *pane); // Also removes pane from getPane/getPaneCount Chris@52: void showPane(Pane *pane); // Returns pane to getPane/getPaneCount Chris@52: Chris@52: int getHiddenPaneCount() const; Chris@52: Pane *getHiddenPane(int n); // I own the returned value Chris@43: Chris@0: void setCurrentPane(Pane *pane); Chris@19: void setCurrentLayer(Pane *pane, Layer *layer); Chris@0: Pane *getCurrentPane(); Chris@0: Chris@0: signals: Chris@0: void currentPaneChanged(Pane *pane); Chris@17: void currentLayerChanged(Pane *pane, Layer *layer); Chris@0: Chris@0: public slots: Chris@0: void propertyContainerAdded(PropertyContainer *); Chris@0: void propertyContainerRemoved(PropertyContainer *); Chris@52: void propertyContainerSelected(View *client, PropertyContainer *); Chris@0: void paneInteractedWith(); Chris@0: Chris@0: protected: Chris@0: Pane *m_currentPane; Chris@52: Chris@52: struct PaneRec Chris@52: { Chris@52: Pane *pane; Chris@52: QWidget *propertyStack; Chris@52: QLabel *currentIndicator; Chris@52: }; Chris@52: Chris@52: std::vector m_panes; Chris@52: std::vector m_hiddenPanes; Chris@52: Chris@0: ViewManager *m_viewManager; // I don't own this Chris@0: void sizePropertyStacks(); Chris@0: }; Chris@0: Chris@0: #endif Chris@0: