From 3c3f91dcb2964180f5ced838a06db35021dde0f1 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Tue, 18 Apr 2017 17:32:10 +0200 Subject: Move model code to models This makes it easery to use it on Qml. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- desktop-widgets/downloadfromdivecomputer.h | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'desktop-widgets/downloadfromdivecomputer.h') diff --git a/desktop-widgets/downloadfromdivecomputer.h b/desktop-widgets/downloadfromdivecomputer.h index 419e96453..b1967766a 100644 --- a/desktop-widgets/downloadfromdivecomputer.h +++ b/desktop-widgets/downloadfromdivecomputer.h @@ -17,6 +17,7 @@ #endif class QStringListModel; +class DiveImportedModel; class DownloadThread : public QThread { Q_OBJECT @@ -30,31 +31,6 @@ private: device_data_t *data; }; -class DiveImportedModel : public QAbstractTableModel -{ - Q_OBJECT -public: - DiveImportedModel(QObject *o); - int columnCount(const QModelIndex& index = QModelIndex()) const; - int rowCount(const QModelIndex& index = QModelIndex()) const; - QVariant data(const QModelIndex& index, int role) const; - QVariant headerData(int section, Qt::Orientation orientation, int role) const; - void setImportedDivesIndexes(int first, int last); - Qt::ItemFlags flags(const QModelIndex &index) const; - void clearTable(); - -public -slots: - void changeSelected(QModelIndex clickedIndex); - void selectAll(); - void selectNone(); - -private: - int firstIndex; - int lastIndex; - bool *checkStates; -}; - class DownloadFromDCWidget : public QDialog { Q_OBJECT public: -- cgit v1.2.3-70-g09d2