comparison widgets/PropertyBox.h @ 0:fc9323a41f5a

start base : Sonic Visualiser sv1-1.0rc1
author lbajardsilogic
date Fri, 11 May 2007 09:08:14 +0000
parents
children 4f3e6a09239a
comparison
equal deleted inserted replaced
-1:000000000000 0:fc9323a41f5a
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3 /*
4 Sonic Visualiser
5 An audio file viewer and annotation editor.
6 Centre for Digital Music, Queen Mary, University of London.
7 This file copyright 2006 Chris Cannam.
8
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License as
11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version. See the file
13 COPYING included with this distribution for more information.
14 */
15
16 #ifndef _PROPERTY_BOX_H_
17 #define _PROPERTY_BOX_H_
18
19 #include "base/PropertyContainer.h"
20
21 #include <QFrame>
22 #include <map>
23
24 class QLayout;
25 class QWidget;
26 class QGridLayout;
27 class QVBoxLayout;
28 class QLabel;
29 class LEDButton;
30
31 class PropertyBox : public QFrame
32 {
33 Q_OBJECT
34
35 public:
36 PropertyBox(PropertyContainer *);
37 ~PropertyBox();
38
39 PropertyContainer *getContainer() { return m_container; }
40
41 signals:
42 void changePlayGain(float);
43 void changePlayGainDial(int);
44 void changePlayPan(float);
45 void changePlayPanDial(int);
46 void showLayer(bool);
47 void contextHelpChanged(const QString &);
48
49 public slots:
50 void propertyContainerPropertyChanged(PropertyContainer *);
51 void propertyContainerPropertyRangeChanged(PropertyContainer *);
52 void pluginConfigurationChanged(QString);
53 void layerVisibilityChanged(bool);
54
55 protected slots:
56 void propertyControllerChanged(int);
57
58 void playGainChanged(float);
59 void playGainDialChanged(int);
60 void playPanChanged(float);
61 void playPanDialChanged(int);
62
63 void populateViewPlayFrame();
64
65 void unitDatabaseChanged();
66
67 void editPlugin();
68
69 void mouseEnteredWidget();
70 void mouseLeftWidget();
71
72 protected:
73 void updatePropertyEditor(PropertyContainer::PropertyName,
74 bool rangeChanged = false);
75 void updateContextHelp(QObject *o);
76
77 QLabel *m_nameWidget;
78 QWidget *m_mainWidget;
79 QGridLayout *m_layout;
80 PropertyContainer *m_container;
81 QFrame *m_viewPlayFrame;
82 QVBoxLayout *m_mainBox;
83 LEDButton *m_showButton;
84 LEDButton *m_playButton;
85 std::map<QString, QLayout *> m_groupLayouts;
86 std::map<QString, QWidget *> m_propertyControllers;
87 };
88
89 #endif