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_STACK_H_ 00017 #define _PROPERTY_STACK_H_ 00018 00019 #include <QFrame> 00020 #include <QTabWidget> 00021 #include <vector> 00022 00023 class Layer; 00024 class View; 00025 class PropertyBox; 00026 class PropertyContainer; 00027 00028 class PropertyStack : public QTabWidget 00029 { 00030 Q_OBJECT 00031 00032 public: 00033 PropertyStack(QWidget *parent, View *client); 00034 00035 View *getClient() { return m_client; } 00036 bool containsContainer(PropertyContainer *container) const; 00037 int getContainerIndex(PropertyContainer *container) const; 00038 00039 signals: 00040 void viewSelected(View *client); 00041 void propertyContainerSelected(View *client, PropertyContainer *container); 00042 void contextHelpChanged(const QString &); 00043 00044 public slots: 00045 void propertyContainerAdded(PropertyContainer *); 00046 void propertyContainerRemoved(PropertyContainer *); 00047 void propertyContainerPropertyChanged(PropertyContainer *); 00048 void propertyContainerPropertyRangeChanged(PropertyContainer *); 00049 void propertyContainerNameChanged(PropertyContainer *); 00050 00051 void showLayer(bool); 00052 00053 void mouseEnteredTabBar(); 00054 void mouseLeftTabBar(); 00055 void activeTabClicked(); 00056 00057 protected slots: 00058 void selectedContainerChanged(int); 00059 00060 protected: 00061 View *m_client; 00062 std::vector<PropertyBox *> m_boxes; 00063 00064 void repopulate(); 00065 void updateValues(PropertyContainer *); 00066 }; 00067 00068 #endif
1.5.1