Chris@0
|
1
|
Chris@0
|
2 /* -*- c-basic-offset: 4 -*- vi:set ts=8 sts=4 sw=4: */
|
Chris@0
|
3
|
Chris@0
|
4 /*
|
Chris@0
|
5 A waveform viewer and audio annotation editor.
|
Chris@5
|
6 Chris Cannam, Queen Mary University of London, 2005-2006
|
Chris@0
|
7
|
Chris@0
|
8 This is experimental software. Not for distribution.
|
Chris@0
|
9 */
|
Chris@0
|
10
|
Chris@0
|
11 #ifndef _PANESTACK_H_
|
Chris@0
|
12 #define _PANESTACK_H_
|
Chris@0
|
13
|
Chris@0
|
14 #include <QSplitter>
|
Chris@0
|
15
|
Chris@0
|
16 class QWidget;
|
Chris@0
|
17 class QLabel;
|
Chris@52
|
18 class View;
|
Chris@0
|
19 class Pane;
|
Chris@17
|
20 class Layer;
|
Chris@0
|
21 class ViewManager;
|
Chris@0
|
22 class PropertyContainer;
|
Chris@0
|
23 class PropertyStack;
|
Chris@0
|
24
|
Chris@0
|
25 class PaneStack : public QSplitter
|
Chris@0
|
26 {
|
Chris@0
|
27 Q_OBJECT
|
Chris@0
|
28
|
Chris@0
|
29 public:
|
Chris@0
|
30 PaneStack(QWidget *parent, ViewManager *viewManager);
|
Chris@0
|
31
|
Chris@0
|
32 Pane *addPane(bool suppressPropertyBox = false); // I own the returned value
|
Chris@52
|
33 void deletePane(Pane *pane); // Deletes the pane, but _not_ its layers
|
Chris@0
|
34
|
Chris@52
|
35 int getPaneCount() const; // Returns only count of visible panes
|
Chris@52
|
36 Pane *getPane(int n); // Of visible panes; I own the returned value
|
Chris@52
|
37
|
Chris@52
|
38 void hidePane(Pane *pane); // Also removes pane from getPane/getPaneCount
|
Chris@52
|
39 void showPane(Pane *pane); // Returns pane to getPane/getPaneCount
|
Chris@52
|
40
|
Chris@52
|
41 int getHiddenPaneCount() const;
|
Chris@52
|
42 Pane *getHiddenPane(int n); // I own the returned value
|
Chris@43
|
43
|
Chris@0
|
44 void setCurrentPane(Pane *pane);
|
Chris@19
|
45 void setCurrentLayer(Pane *pane, Layer *layer);
|
Chris@0
|
46 Pane *getCurrentPane();
|
Chris@0
|
47
|
Chris@0
|
48 signals:
|
Chris@0
|
49 void currentPaneChanged(Pane *pane);
|
Chris@17
|
50 void currentLayerChanged(Pane *pane, Layer *layer);
|
Chris@0
|
51
|
Chris@0
|
52 public slots:
|
Chris@0
|
53 void propertyContainerAdded(PropertyContainer *);
|
Chris@0
|
54 void propertyContainerRemoved(PropertyContainer *);
|
Chris@52
|
55 void propertyContainerSelected(View *client, PropertyContainer *);
|
Chris@0
|
56 void paneInteractedWith();
|
Chris@0
|
57
|
Chris@0
|
58 protected:
|
Chris@0
|
59 Pane *m_currentPane;
|
Chris@52
|
60
|
Chris@52
|
61 struct PaneRec
|
Chris@52
|
62 {
|
Chris@52
|
63 Pane *pane;
|
Chris@52
|
64 QWidget *propertyStack;
|
Chris@52
|
65 QLabel *currentIndicator;
|
Chris@52
|
66 };
|
Chris@52
|
67
|
Chris@52
|
68 std::vector<PaneRec> m_panes;
|
Chris@52
|
69 std::vector<PaneRec> m_hiddenPanes;
|
Chris@52
|
70
|
Chris@0
|
71 ViewManager *m_viewManager; // I don't own this
|
Chris@0
|
72 void sizePropertyStacks();
|
Chris@0
|
73 };
|
Chris@0
|
74
|
Chris@0
|
75 #endif
|
Chris@0
|
76
|