Mercurial > hg > svcore
diff data/model/ModelDataTableModel.h @ 416:a00902d5f0ab
* basics of data editing in data table view
author | Chris Cannam |
---|---|
date | Mon, 09 Jun 2008 16:01:50 +0000 |
parents | 0b274e1aaf10 |
children | 64e7bbb255d3 |
line wrap: on
line diff
--- a/data/model/ModelDataTableModel.h Mon Jun 09 16:01:22 2008 +0000 +++ b/data/model/ModelDataTableModel.h Mon Jun 09 16:01:50 2008 +0000 @@ -20,6 +20,8 @@ #include "Model.h" +class Command; + class ModelDataTableModel : public QAbstractItemModel { Q_OBJECT @@ -45,8 +47,14 @@ int rowCount(const QModelIndex &parent = QModelIndex()) const; int columnCount(const QModelIndex &parent = QModelIndex()) const; + QModelIndex getModelIndexForFrame(size_t frame) const; + static bool canHandleModelType(Model *); +signals: + void frameSelected(size_t); + void executeCommand(Command *); + protected slots: void modelChanged(); void modelChanged(size_t, size_t); @@ -61,7 +69,10 @@ void rebuildRowVector(); template <typename PointType> void rebuildRowVectorSparse(); - template <typename PointType> QVariant dataSparse(int row, int col) const; + template <typename PointType> QVariant dataSparse(int row, int col, + bool withUnit) const; + template <typename PointType> bool setDataSparse(int row, int col, + QVariant value); }; #endif