comparison data/model/ModelDataTableModel.h @ 1069:32ab6c48efaa

Merge from branch tonioni
author Chris Cannam
date Mon, 20 Apr 2015 09:11:34 +0100
parents 2f49be7d4264
children ec9e65fcf749
comparison
equal deleted inserted replaced
1036:682d64f05e72 1069:32ab6c48efaa
17 #define _MODEL_DATA_TABLE_MODEL_H_ 17 #define _MODEL_DATA_TABLE_MODEL_H_
18 18
19 #include <QAbstractItemModel> 19 #include <QAbstractItemModel>
20 20
21 #include <vector> 21 #include <vector>
22
23 #include "base/BaseTypes.h"
22 24
23 class TabularModel; 25 class TabularModel;
24 class Command; 26 class Command;
25 27
26 class ModelDataTableModel : public QAbstractItemModel 28 class ModelDataTableModel : public QAbstractItemModel
49 QModelIndex parent(const QModelIndex &index) const; 51 QModelIndex parent(const QModelIndex &index) const;
50 52
51 int rowCount(const QModelIndex &parent = QModelIndex()) const; 53 int rowCount(const QModelIndex &parent = QModelIndex()) const;
52 int columnCount(const QModelIndex &parent = QModelIndex()) const; 54 int columnCount(const QModelIndex &parent = QModelIndex()) const;
53 55
54 QModelIndex getModelIndexForFrame(int frame) const; 56 QModelIndex getModelIndexForFrame(sv_frame_t frame) const;
55 int getFrameForModelIndex(const QModelIndex &) const; 57 sv_frame_t getFrameForModelIndex(const QModelIndex &) const;
56 58
57 void sort(int column, Qt::SortOrder order = Qt::AscendingOrder); 59 void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
58 60
59 QModelIndex findText(QString text) const; 61 QModelIndex findText(QString text) const;
60 62
67 void currentChanged(const QModelIndex &); 69 void currentChanged(const QModelIndex &);
68 void modelRemoved(); 70 void modelRemoved();
69 71
70 protected slots: 72 protected slots:
71 void modelChanged(); 73 void modelChanged();
72 void modelChangedWithin(int, int); 74 void modelChangedWithin(sv_frame_t, sv_frame_t);
73 void modelAboutToBeDeleted(); 75 void modelAboutToBeDeleted();
74 76
75 protected: 77 protected:
76 TabularModel *m_model; 78 TabularModel *m_model;
77 int m_sortColumn; 79 int m_sortColumn;