Chris@43: 
Chris@58: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
Chris@43: 
Chris@43: /*
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@43:     
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@43: */
Chris@43: 
Chris@43: #ifndef _LAYER_TREE_H_
Chris@43: #define _LAYER_TREE_H_
Chris@43: 
Chris@43: #include <QAbstractItemModel>
Chris@43: 
Chris@43: class PaneStack;
Chris@56: class View;
Chris@56: class Layer;
Chris@298: class PropertyContainer;
Chris@43: 
Chris@43: class LayerTreeModel : public QAbstractItemModel
Chris@43: {
Chris@43:     Q_OBJECT
Chris@43: 
Chris@43: public:
Chris@43:     LayerTreeModel(PaneStack *stack, QObject *parent = 0);
Chris@43:     virtual ~LayerTreeModel();
Chris@43: 
Chris@43:     QVariant data(const QModelIndex &index, int role) const;
Chris@43: 
Chris@298:     bool setData(const QModelIndex &index, const QVariant &value, int role);
Chris@298: 
Chris@56:     Qt::ItemFlags flags(const QModelIndex &index) const;
Chris@43: 
Chris@56:     QVariant headerData(int section, Qt::Orientation orientation,
Chris@56:                         int role = Qt::DisplayRole) const;
Chris@43: 
Chris@43:     QModelIndex index(int row, int column,
Chris@43:                       const QModelIndex &parent = QModelIndex()) const;
Chris@43: 
Chris@43:     QModelIndex parent(const QModelIndex &index) const;
Chris@43: 
Chris@43:     int rowCount(const QModelIndex &parent = QModelIndex()) const;
Chris@43:     int columnCount(const QModelIndex &parent = QModelIndex()) const;
Chris@43: 
Chris@43: protected:
Chris@43:     PaneStack *m_stack;
Chris@298: 
Chris@298: protected slots:
Chris@298:     void propertyContainerAdded(PropertyContainer *);
Chris@298:     void propertyContainerRemoved(PropertyContainer *);
Chris@298:     void propertyContainerSelected(PropertyContainer *);
Chris@298:     void propertyContainerPropertyChanged(PropertyContainer *);
Chris@298:     void playParametersAudibilityChanged(bool);
Chris@43: };
Chris@43: 
Chris@43: #endif