Chris@58
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
Chris@0
|
2
|
Chris@0
|
3 /*
|
Chris@59
|
4 Sonic Visualiser
|
Chris@59
|
5 An audio file viewer and annotation editor.
|
Chris@59
|
6 Centre for Digital Music, Queen Mary, University of London.
|
Chris@59
|
7 This file copyright 2006 Chris Cannam.
|
Chris@0
|
8
|
Chris@59
|
9 This program is free software; you can redistribute it and/or
|
Chris@59
|
10 modify it under the terms of the GNU General Public License as
|
Chris@59
|
11 published by the Free Software Foundation; either version 2 of the
|
Chris@59
|
12 License, or (at your option) any later version. See the file
|
Chris@59
|
13 COPYING included with this distribution for more information.
|
Chris@0
|
14 */
|
Chris@0
|
15
|
Chris@1407
|
16 #ifndef SV_PROPERTY_STACK_H
|
Chris@1407
|
17 #define SV_PROPERTY_STACK_H
|
Chris@0
|
18
|
Chris@0
|
19 #include <QFrame>
|
Chris@0
|
20 #include <QTabWidget>
|
Chris@0
|
21 #include <vector>
|
Chris@0
|
22
|
Chris@0
|
23 class Layer;
|
Chris@0
|
24 class View;
|
Chris@0
|
25 class PropertyBox;
|
Chris@0
|
26 class PropertyContainer;
|
Chris@0
|
27
|
Chris@0
|
28 class PropertyStack : public QTabWidget
|
Chris@0
|
29 {
|
Chris@0
|
30 Q_OBJECT
|
Chris@0
|
31
|
Chris@0
|
32 public:
|
Chris@0
|
33 PropertyStack(QWidget *parent, View *client);
|
Chris@728
|
34 virtual ~PropertyStack();
|
Chris@0
|
35
|
Chris@52
|
36 View *getClient() { return m_client; }
|
Chris@0
|
37 bool containsContainer(PropertyContainer *container) const;
|
Chris@19
|
38 int getContainerIndex(PropertyContainer *container) const;
|
Chris@0
|
39
|
Chris@0
|
40 signals:
|
Chris@190
|
41 void viewSelected(View *client);
|
Chris@52
|
42 void propertyContainerSelected(View *client, PropertyContainer *container);
|
Chris@1582
|
43 void propertyContainerContextMenuRequested(View *client,
|
Chris@1582
|
44 PropertyContainer *container,
|
Chris@1582
|
45 QPoint pos);
|
Chris@189
|
46 void contextHelpChanged(const QString &);
|
Chris@0
|
47
|
Chris@0
|
48 public slots:
|
Chris@0
|
49 void propertyContainerAdded(PropertyContainer *);
|
Chris@0
|
50 void propertyContainerRemoved(PropertyContainer *);
|
Chris@0
|
51 void propertyContainerPropertyChanged(PropertyContainer *);
|
Chris@197
|
52 void propertyContainerPropertyRangeChanged(PropertyContainer *);
|
Chris@0
|
53 void propertyContainerNameChanged(PropertyContainer *);
|
Chris@0
|
54
|
Chris@47
|
55 void showLayer(bool);
|
Chris@47
|
56
|
Chris@190
|
57 void mouseEnteredTabBar();
|
Chris@190
|
58 void mouseLeftTabBar();
|
Chris@190
|
59 void activeTabClicked();
|
Chris@1582
|
60 void tabBarContextMenuRequested(const QPoint &);
|
Chris@190
|
61
|
Chris@0
|
62 protected slots:
|
Chris@0
|
63 void selectedContainerChanged(int);
|
Chris@0
|
64
|
Chris@0
|
65 protected:
|
Chris@0
|
66 View *m_client;
|
Chris@0
|
67 std::vector<PropertyBox *> m_boxes;
|
Chris@0
|
68
|
Chris@0
|
69 void repopulate();
|
Chris@0
|
70 void updateValues(PropertyContainer *);
|
Chris@0
|
71 };
|
Chris@0
|
72
|
Chris@0
|
73 #endif
|