diff options
Diffstat (limited to 'qt-models/diveimportedmodel.h')
-rw-r--r-- | qt-models/diveimportedmodel.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/qt-models/diveimportedmodel.h b/qt-models/diveimportedmodel.h index 532f5b899..49cbdf10c 100644 --- a/qt-models/diveimportedmodel.h +++ b/qt-models/diveimportedmodel.h @@ -4,6 +4,7 @@ #include <QAbstractTableModel> #include <vector> #include "core/divesite.h" +#include "core/downloadfromdcthread.h" class DiveImportedModel : public QAbstractTableModel { @@ -20,8 +21,10 @@ public: Qt::ItemFlags flags(const QModelIndex &index) const; Q_INVOKABLE void clearTable(); QHash<int, QByteArray> roleNames() const; - Q_INVOKABLE void repopulate(dive_table_t *table, dive_site_table_t *sites); Q_INVOKABLE void recordDives(); + Q_INVOKABLE void startDownload(); + + DownloadThread thread; public slots: void changeSelected(QModelIndex clickedIndex); @@ -29,7 +32,15 @@ slots: void selectAll(); void selectNone(); +private +slots: + void downloadThreadFinished(); + +signals: + void downloadFinished(); + private: + void repopulate(dive_table_t *table, dive_site_table_t *sites); int firstIndex; int lastIndex; std::vector<char> checkStates; // char instead of bool to avoid silly pessimization of std::vector. |