summaryrefslogtreecommitdiffstats
path: root/qt-ui/models.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-06 11:24:38 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-07 13:00:58 -0800
commit45251ec7248a0300506af043b0a5c448051b2072 (patch)
tree5ade6357ec26c2412788844d48db76e9fdd3dcd7 /qt-ui/models.h
parent4ccddf95d7660b9c2c91da1d72f08bd45988c83e (diff)
downloadsubsurface-45251ec7248a0300506af043b0a5c448051b2072.tar.gz
Show extra data in separate tab on MainTab
This way any extra data probided by the dive computer is visible to the user (without other processing). This data cannot be edited by the user as it reflects the information given by the dive computer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.h')
-rw-r--r--qt-ui/models.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/qt-ui/models.h b/qt-ui/models.h
index a78c20be0..8750492a1 100644
--- a/qt-ui/models.h
+++ b/qt-ui/models.h
@@ -165,6 +165,24 @@ private:
int rows;
};
+/* extra data model for additional dive computer data */
+class ExtraDataModel : public CleanerTableModel {
+ Q_OBJECT
+public:
+ enum Column {
+ KEY,
+ VALUE
+ };
+ explicit ExtraDataModel(QObject *parent = 0);
+ /*reimp*/ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+ /*reimp*/ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+
+ void clear();
+ void updateDive();
+private:
+ int rows;
+};
+
/*! An AbstractItemModel for recording dive trip information such as a list of dives.
*
*/