comparison widgets/LayerTree.h @ 298:226cb289bdf4

* Layer tree view updating when visibility / audibility changed (and layers updating when they are changed in view) -- still some problems when a model is loaded while the tree is visible * FFTW_MEASURE throughout -- it does turn out to make an appreciable difference sometimes
author Chris Cannam
date Thu, 16 Aug 2007 16:47:07 +0000
parents 705f05ab42e3
children 4a542ba875c2
comparison
equal deleted inserted replaced
297:860f9ada4327 298:226cb289bdf4
20 #include <QAbstractItemModel> 20 #include <QAbstractItemModel>
21 21
22 class PaneStack; 22 class PaneStack;
23 class View; 23 class View;
24 class Layer; 24 class Layer;
25 class PropertyContainer;
25 26
26 class LayerTreeModel : public QAbstractItemModel 27 class LayerTreeModel : public QAbstractItemModel
27 { 28 {
28 Q_OBJECT 29 Q_OBJECT
29 30
30 public: 31 public:
31 LayerTreeModel(PaneStack *stack, QObject *parent = 0); 32 LayerTreeModel(PaneStack *stack, QObject *parent = 0);
32 virtual ~LayerTreeModel(); 33 virtual ~LayerTreeModel();
33 34
34 QVariant data(const QModelIndex &index, int role) const; 35 QVariant data(const QModelIndex &index, int role) const;
36
37 bool setData(const QModelIndex &index, const QVariant &value, int role);
35 38
36 Qt::ItemFlags flags(const QModelIndex &index) const; 39 Qt::ItemFlags flags(const QModelIndex &index) const;
37 40
38 QVariant headerData(int section, Qt::Orientation orientation, 41 QVariant headerData(int section, Qt::Orientation orientation,
39 int role = Qt::DisplayRole) const; 42 int role = Qt::DisplayRole) const;
46 int rowCount(const QModelIndex &parent = QModelIndex()) const; 49 int rowCount(const QModelIndex &parent = QModelIndex()) const;
47 int columnCount(const QModelIndex &parent = QModelIndex()) const; 50 int columnCount(const QModelIndex &parent = QModelIndex()) const;
48 51
49 protected: 52 protected:
50 PaneStack *m_stack; 53 PaneStack *m_stack;
54
55 protected slots:
56 void propertyContainerAdded(PropertyContainer *);
57 void propertyContainerRemoved(PropertyContainer *);
58 void propertyContainerSelected(PropertyContainer *);
59 void propertyContainerPropertyChanged(PropertyContainer *);
60 void playParametersAudibilityChanged(bool);
51 }; 61 };
52 62
53 #endif 63 #endif