svgui  1.9
PropertyBox.h
Go to the documentation of this file.
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 changePlayGainDial(int);
43  void changePlayPanDial(int);
44  void showLayer(bool);
45  void contextHelpChanged(const QString &);
46 
47 public slots:
48  void propertyContainerPropertyChanged(PropertyContainer *);
49  void propertyContainerPropertyRangeChanged(PropertyContainer *);
50  void playClipChanged(QString);
51  void layerVisibilityChanged(bool);
52 
53 protected slots:
54  void propertyControllerChanged(int);
55  void propertyControllerChanged(bool);
56 
57  void playAudibleChanged(bool);
58  void playAudibleButtonChanged(bool);
59  void playGainChanged(float);
60  void playGainDialChanged(int);
61  void playPanChanged(float);
62  void playPanDialChanged(int);
63 
64  void populateViewPlayFrame();
65 
66  void unitDatabaseChanged();
67  void colourDatabaseChanged();
68 
69  void editPlayParameters();
70 
71  void mouseEnteredWidget();
72  void mouseLeftWidget();
73 
74 protected:
75  void updatePropertyEditor(PropertyContainer::PropertyName,
76  bool rangeChanged = false);
77  void updateContextHelp(QObject *o);
78  void addNewColour();
79 
80  QLabel *m_nameWidget;
81  QWidget *m_mainWidget;
82  QGridLayout *m_layout;
83  PropertyContainer *m_container;
84  QFrame *m_viewPlayFrame;
85  QVBoxLayout *m_mainBox;
88  std::map<QString, QGridLayout *> m_groupLayouts;
89  std::map<QString, QWidget *> m_propertyControllers;
90 };
91 
92 #endif
QGridLayout * m_layout
Definition: PropertyBox.h:82
void propertyContainerPropertyChanged(PropertyContainer *)
QFrame * m_viewPlayFrame
Definition: PropertyBox.h:84
void playGainDialChanged(int)
void mouseEnteredWidget()
void playPanDialChanged(int)
std::map< QString, QWidget * > m_propertyControllers
Definition: PropertyBox.h:89
void updateContextHelp(QObject *o)
void colourDatabaseChanged()
void propertyControllerChanged(int)
QVBoxLayout * m_mainBox
Definition: PropertyBox.h:85
void updatePropertyEditor(PropertyContainer::PropertyName, bool rangeChanged=false)
LEDButton * m_showButton
Definition: PropertyBox.h:86
QWidget * m_mainWidget
Definition: PropertyBox.h:81
void contextHelpChanged(const QString &)
void playAudibleChanged(bool)
QLabel * m_nameWidget
Definition: PropertyBox.h:80
void layerVisibilityChanged(bool)
void showLayer(bool)
PropertyContainer * getContainer()
Definition: PropertyBox.h:39
void playPanChanged(float)
void propertyContainerPropertyRangeChanged(PropertyContainer *)
void changePlayPanDial(int)
std::map< QString, QGridLayout * > m_groupLayouts
Definition: PropertyBox.h:88
void addNewColour()
PropertyContainer * m_container
Definition: PropertyBox.h:83
void editPlayParameters()
void playGainChanged(float)
void mouseLeftWidget()
PropertyBox(PropertyContainer *)
Definition: PropertyBox.cpp:53
void populateViewPlayFrame()
LEDButton * m_playButton
Definition: PropertyBox.h:87
void playAudibleButtonChanged(bool)
void playClipChanged(QString)
void changePlayGainDial(int)
void unitDatabaseChanged()