svgui
1.9
|
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ 00002 00003 /* 00004 Sonic Visualiser 00005 An audio file viewer and annotation editor. 00006 Centre for Digital Music, Queen Mary, University of London. 00007 This file copyright 2006 Chris Cannam. 00008 00009 This program is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU General Public License as 00011 published by the Free Software Foundation; either version 2 of the 00012 License, or (at your option) any later version. See the file 00013 COPYING included with this distribution for more information. 00014 */ 00015 00016 #ifndef _PROPERTY_BOX_H_ 00017 #define _PROPERTY_BOX_H_ 00018 00019 #include "base/PropertyContainer.h" 00020 00021 #include <QFrame> 00022 #include <map> 00023 00024 class QLayout; 00025 class QWidget; 00026 class QGridLayout; 00027 class QVBoxLayout; 00028 class QLabel; 00029 class LEDButton; 00030 00031 class PropertyBox : public QFrame 00032 { 00033 Q_OBJECT 00034 00035 public: 00036 PropertyBox(PropertyContainer *); 00037 ~PropertyBox(); 00038 00039 PropertyContainer *getContainer() { return m_container; } 00040 00041 signals: 00042 void changePlayGainDial(int); 00043 void changePlayPanDial(int); 00044 void showLayer(bool); 00045 void contextHelpChanged(const QString &); 00046 00047 public slots: 00048 void propertyContainerPropertyChanged(PropertyContainer *); 00049 void propertyContainerPropertyRangeChanged(PropertyContainer *); 00050 void playClipChanged(QString); 00051 void layerVisibilityChanged(bool); 00052 00053 protected slots: 00054 void propertyControllerChanged(int); 00055 void propertyControllerChanged(bool); 00056 00057 void playAudibleChanged(bool); 00058 void playAudibleButtonChanged(bool); 00059 void playGainChanged(float); 00060 void playGainDialChanged(int); 00061 void playPanChanged(float); 00062 void playPanDialChanged(int); 00063 00064 void populateViewPlayFrame(); 00065 00066 void unitDatabaseChanged(); 00067 void colourDatabaseChanged(); 00068 00069 void editPlayParameters(); 00070 00071 void mouseEnteredWidget(); 00072 void mouseLeftWidget(); 00073 00074 protected: 00075 void updatePropertyEditor(PropertyContainer::PropertyName, 00076 bool rangeChanged = false); 00077 void updateContextHelp(QObject *o); 00078 void addNewColour(); 00079 00080 QLabel *m_nameWidget; 00081 QWidget *m_mainWidget; 00082 QGridLayout *m_layout; 00083 PropertyContainer *m_container; 00084 QFrame *m_viewPlayFrame; 00085 QVBoxLayout *m_mainBox; 00086 LEDButton *m_showButton; 00087 LEDButton *m_playButton; 00088 std::map<QString, QGridLayout *> m_groupLayouts; 00089 std::map<QString, QWidget *> m_propertyControllers; 00090 }; 00091 00092 #endif