diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-08-30 07:14:30 -0300 |
---|---|---|
committer | Tomaz Canabrava <tcanabrava@kde.org> | 2013-08-30 07:14:30 -0300 |
commit | 69903903d213e45fe16f3b5a6acb52278eee9291 (patch) | |
tree | d6d67ff1771196962bc5e47da076ea0fd31654ca /qt-ui/diveplanner.h | |
parent | 6c56f0795923453f2502637d6f7ddda59190bc2d (diff) | |
download | subsurface-69903903d213e45fe16f3b5a6acb52278eee9291.tar.gz |
Started the work of Editable Model for the Planner
This commit is the start of the Editable Model work
for the planner, it creates a new delegate and shares
the code for the model that creates the gas types, so
we only need to change in one place to add new gases.
The table is already edition-enabled, but the outcome
is still undone, next commit - put all together.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/diveplanner.h')
-rw-r--r-- | qt-ui/diveplanner.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h index 719aca853..afa9c0fca 100644 --- a/qt-ui/diveplanner.h +++ b/qt-ui/diveplanner.h @@ -17,6 +17,9 @@ class QListView; class QStringListModel; class QModelIndex; +// Return a Model containing the air types. +QStringListModel *airTypes(); + class DivePlannerPointsModel : public QAbstractTableModel{ Q_OBJECT public: @@ -26,6 +29,8 @@ public: virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const; virtual int rowCount(const QModelIndex& parent = QModelIndex()) const; virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + virtual bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); + virtual Qt::ItemFlags flags(const QModelIndex& index) const; /** * @return the row number. |