diff options
author | Michael D Scull <ext-michael.scull@nokia.com> | 2010-05-27 13:12:58 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-07-07 15:07:53 (GMT) |
commit | f574700f920ae5d5bda25ba217d6face9f3d3902 (patch) | |
tree | a4db1390147f7b6041ca763be6715078b1ddd9ab /examples/tutorials/modelview/3_changingmodel/mymodel.h | |
parent | 4df3fb13821e13ecf581d87f2d224b2f1b964609 (diff) | |
download | Qt-f574700f920ae5d5bda25ba217d6face9f3d3902.zip Qt-f574700f920ae5d5bda25ba217d6face9f3d3902.tar.gz Qt-f574700f920ae5d5bda25ba217d6face9f3d3902.tar.bz2 |
Rolands ModelView Source
Diffstat (limited to 'examples/tutorials/modelview/3_changingmodel/mymodel.h')
-rwxr-xr-x | examples/tutorials/modelview/3_changingmodel/mymodel.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/tutorials/modelview/3_changingmodel/mymodel.h b/examples/tutorials/modelview/3_changingmodel/mymodel.h new file mode 100755 index 0000000..9cc023b --- /dev/null +++ b/examples/tutorials/modelview/3_changingmodel/mymodel.h @@ -0,0 +1,23 @@ +#ifndef MYMODEL_H +#define MYMODEL_H + +#include <QAbstractTableModel> + +class QTimer; // forward declaration + +class MyModel : public QAbstractTableModel +{ + Q_OBJECT +public: + MyModel(QObject *parent); + int rowCount(const QModelIndex &parent = QModelIndex()) const ; + int columnCount(const QModelIndex &parent = QModelIndex()) const; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + QTimer *timer; +private: + int selectedCell; +private slots: + void timerHit(); +}; + +#endif // MYMODEL_H |