summaryrefslogtreecommitdiffstats
path: root/qt-ui/models.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-06-07 11:43:45 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-06-07 11:43:45 -0300
commitebed836ee5d10659ae3d830704508f9c575181d3 (patch)
tree00efafb0433e7dc6e6f9a2c99be3b12b06a69e06 /qt-ui/models.h
parent3677f4e5ead410d4023668420ca4f062c4223888 (diff)
downloadsubsurface-ebed836ee5d10659ae3d830704508f9c575181d3.tar.gz
Created a new dialog - Edit DiveComputer
Created a new dialog, Edit Divecomputer, it will currently only lists the divecomputers that are used on the xml file. I used the same method that the gtk version used, but only 2 divecomputers got visualized in the dirk dive data. I'll assume that it's correct and will fix it in the next couple of commits. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/models.h')
-rw-r--r--qt-ui/models.h16
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