diff options
Diffstat (limited to 'qt-ui/models.h')
-rw-r--r-- | qt-ui/models.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/qt-ui/models.h b/qt-ui/models.h index a012ec6bd..c0625325f 100644 --- a/qt-ui/models.h +++ b/qt-ui/models.h @@ -167,4 +167,20 @@ private: Layout currentLayout; }; +class DiveComputerModel : public QAbstractTableModel +{ + Q_OBJECT +public: + enum {REMOVE, MODEL, ID, NICKNAME, COLUMNS}; + explicit DiveComputerModel(QObject* parent = 0); + virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + virtual int columnCount(const QModelIndex& parent = QModelIndex()) const; + virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const; + virtual int rowCount(const QModelIndex& parent = QModelIndex()) const; + void update(); +private: + int numRows; + +}; + #endif |