comparison data/model/ModelDataTableModel.h @ 1057:5c5d4863b428 tonioni

Merge from cxx11 branch
author Chris Cannam
date Mon, 23 Mar 2015 11:26:28 +0000
parents 2f49be7d4264
children ec9e65fcf749
comparison
equal deleted inserted replaced
1056:c4898e57eea5 1057:5c5d4863b428
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;