aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/downloadfromdivecomputer.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-05-20 17:58:06 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-05-20 17:58:06 -0300
commitf4acbb02e489672b6ee56e5bcf37b651039abb77 (patch)
treeb8787e8e3e13fd0a72d9390fca2717fa055062a8 /qt-ui/downloadfromdivecomputer.h
parenta542b25bde597b7bfe189f14a6868f711f879516 (diff)
downloadsubsurface-f4acbb02e489672b6ee56e5bcf37b651039abb77.tar.gz
Populate the Vendor && Dive computer information.
This uses the QStringListModel to populate the items of the QComboBoxes. I used a QHash to hold every Computer of a particular Vendor. so, products[vendor] gives me the full list of products from each vendor. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/downloadfromdivecomputer.h')
-rw-r--r--qt-ui/downloadfromdivecomputer.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/qt-ui/downloadfromdivecomputer.h b/qt-ui/downloadfromdivecomputer.h
index ef17df8d4..eefcc4d29 100644
--- a/qt-ui/downloadfromdivecomputer.h
+++ b/qt-ui/downloadfromdivecomputer.h
@@ -1,7 +1,9 @@
#ifndef DOWNLOADFROMDIVECOMPUTER_H
#define DOWNLOADFROMDIVECOMPUTER_H
+
#include <QDialog>
#include <QThread>
+#include <QHash>
namespace Ui{
class DownloadFromDiveComputer;
@@ -29,6 +31,7 @@ private:
device_data_t *data;
};
+class QStringListModel;
class DownloadFromDCWidget : public QDialog{
Q_OBJECT
public:
@@ -37,10 +40,19 @@ public:
public slots:
void on_ok_clicked();
void on_cancel_clicked();
+
+ void on_vendor_currentIndexChanged(const QString& vendor);
private:
Ui::DownloadFromDiveComputer *ui;
InterfaceThread *thread;
bool downloading;
+
+ QStringList vendorList;
+ QHash<QString, QStringList> productList;
+
+ QStringListModel *vendorModel;
+ QStringListModel *productModel;
+ void fill_computer_list();
};
#endif \ No newline at end of file