comparison widgets/LayerTree.h @ 0:fc9323a41f5a

start base : Sonic Visualiser sv1-1.0rc1
author lbajardsilogic
date Fri, 11 May 2007 09:08:14 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:fc9323a41f5a
1
2 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
3
4 /*
5 Sonic Visualiser
6 An audio file viewer and annotation editor.
7 Centre for Digital Music, Queen Mary, University of London.
8 This file copyright 2006 Chris Cannam.
9
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License as
12 published by the Free Software Foundation; either version 2 of the
13 License, or (at your option) any later version. See the file
14 COPYING included with this distribution for more information.
15 */
16
17 #ifndef _LAYER_TREE_H_
18 #define _LAYER_TREE_H_
19
20 #include <QAbstractItemModel>
21
22 class PaneStack;
23 class View;
24 class Layer;
25
26 class LayerTreeModel : public QAbstractItemModel
27 {
28 Q_OBJECT
29
30 public:
31 LayerTreeModel(PaneStack *stack, QObject *parent = 0);
32 virtual ~LayerTreeModel();
33
34 QVariant data(const QModelIndex &index, int role) const;
35
36 Qt::ItemFlags flags(const QModelIndex &index) const;
37
38 QVariant headerData(int section, Qt::Orientation orientation,
39 int role = Qt::DisplayRole) const;
40
41 QModelIndex index(int row, int column,
42 const QModelIndex &parent = QModelIndex()) const;
43
44 QModelIndex parent(const QModelIndex &index) const;
45
46 int rowCount(const QModelIndex &parent = QModelIndex()) const;
47 int columnCount(const QModelIndex &parent = QModelIndex()) const;
48
49 protected:
50 PaneStack *m_stack;
51 };
52
53 #endif