Chris@58: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
Chris@0: 
Chris@0: /*
Chris@59:     Sonic Visualiser
Chris@59:     An audio file viewer and annotation editor.
Chris@59:     Centre for Digital Music, Queen Mary, University of London.
Chris@59:     This file copyright 2006 Chris Cannam.
Chris@0:     
Chris@59:     This program is free software; you can redistribute it and/or
Chris@59:     modify it under the terms of the GNU General Public License as
Chris@59:     published by the Free Software Foundation; either version 2 of the
Chris@59:     License, or (at your option) any later version.  See the file
Chris@59:     COPYING included with this distribution for more information.
Chris@0: */
Chris@0: 
Chris@0: #ifndef _PROPERTY_STACK_H_
Chris@0: #define _PROPERTY_STACK_H_
Chris@0: 
Chris@0: #include <QFrame>
Chris@0: #include <QTabWidget>
Chris@0: #include <vector>
Chris@0: 
Chris@0: class Layer;
Chris@0: class View;
Chris@0: class PropertyBox;
Chris@0: class PropertyContainer;
Chris@0: 
Chris@0: class PropertyStack : public QTabWidget
Chris@0: {
Chris@0:     Q_OBJECT
Chris@0: 
Chris@0: public:
Chris@0:     PropertyStack(QWidget *parent, View *client);
Chris@728:     virtual ~PropertyStack();
Chris@0: 
Chris@52:     View *getClient() { return m_client; }
Chris@0:     bool containsContainer(PropertyContainer *container) const;
Chris@19:     int getContainerIndex(PropertyContainer *container) const;
Chris@0: 
Chris@0: signals:
Chris@190:     void viewSelected(View *client);
Chris@52:     void propertyContainerSelected(View *client, PropertyContainer *container);
Chris@189:     void contextHelpChanged(const QString &);
Chris@0: 
Chris@0: public slots:
Chris@0:     void propertyContainerAdded(PropertyContainer *);
Chris@0:     void propertyContainerRemoved(PropertyContainer *);
Chris@0:     void propertyContainerPropertyChanged(PropertyContainer *);
Chris@197:     void propertyContainerPropertyRangeChanged(PropertyContainer *);
Chris@0:     void propertyContainerNameChanged(PropertyContainer *);
Chris@0: 
Chris@47:     void showLayer(bool);
Chris@47: 
Chris@190:     void mouseEnteredTabBar();
Chris@190:     void mouseLeftTabBar();
Chris@190:     void activeTabClicked();
Chris@190: 
Chris@0: protected slots:
Chris@0:     void selectedContainerChanged(int);
Chris@0: 
Chris@0: protected:
Chris@0:     View *m_client;
Chris@0:     std::vector<PropertyBox *> m_boxes;
Chris@0: 
Chris@0:     void repopulate();
Chris@0:     void updateValues(PropertyContainer *);
Chris@0: };
Chris@0: 
Chris@0: #endif