PropertyStack.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 SV_PROPERTY_STACK_H
17 #define SV_PROPERTY_STACK_H
18 
19 #include <QFrame>
20 #include <QTabWidget>
21 #include <vector>
22 
23 class Layer;
24 class View;
25 class PropertyBox;
26 class PropertyContainer;
27 
28 class PropertyStack : public QTabWidget
29 {
30  Q_OBJECT
31 
32 public:
33  PropertyStack(QWidget *parent, View *client);
34  virtual ~PropertyStack();
35 
36  View *getClient() { return m_client; }
37  bool containsContainer(PropertyContainer *container) const;
38  int getContainerIndex(PropertyContainer *container) const;
39 
40 signals:
41  void viewSelected(View *client);
42  void propertyContainerSelected(View *client, PropertyContainer *container);
44  PropertyContainer *container,
45  QPoint pos);
46  void contextHelpChanged(const QString &);
47 
48 public slots:
49  void propertyContainerAdded(PropertyContainer *);
50  void propertyContainerRemoved(PropertyContainer *);
51  void propertyContainerPropertyChanged(PropertyContainer *);
52  void propertyContainerPropertyRangeChanged(PropertyContainer *);
53  void propertyContainerNameChanged(PropertyContainer *);
54 
55  void showLayer(bool);
56 
57  void mouseEnteredTabBar();
58  void mouseLeftTabBar();
59  void activeTabClicked();
60  void tabBarContextMenuRequested(const QPoint &);
61 
62 protected slots:
63  void selectedContainerChanged(int);
64 
65 protected:
67  std::vector<PropertyBox *> m_boxes;
68 
69  void repopulate();
70  void updateValues(PropertyContainer *);
71 };
72 
73 #endif
void tabBarContextMenuRequested(const QPoint &)
void propertyContainerPropertyChanged(PropertyContainer *)
The base class for visual representations of the data found in a Model.
Definition: Layer.h:54
void mouseLeftTabBar()
void propertyContainerAdded(PropertyContainer *)
void activeTabClicked()
std::vector< PropertyBox * > m_boxes
Definition: PropertyStack.h:67
int getContainerIndex(PropertyContainer *container) const
void viewSelected(View *client)
void showLayer(bool)
void selectedContainerChanged(int)
bool containsContainer(PropertyContainer *container) const
PropertyStack(QWidget *parent, View *client)
View * getClient()
Definition: PropertyStack.h:36
void updateValues(PropertyContainer *)
void contextHelpChanged(const QString &)
void propertyContainerRemoved(PropertyContainer *)
void propertyContainerPropertyRangeChanged(PropertyContainer *)
void propertyContainerNameChanged(PropertyContainer *)
View is the base class of widgets that display one or more overlaid views of data against a horizonta...
Definition: View.h:55
void propertyContainerContextMenuRequested(View *client, PropertyContainer *container, QPoint pos)
void mouseEnteredTabBar()
void propertyContainerSelected(View *client, PropertyContainer *container)
virtual ~PropertyStack()