summaryrefslogtreecommitdiffstats
path: root/qt-ui/downloadfromdivecomputer.h
diff options
context:
space:
mode:
authorGravatar Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>2013-08-25 10:01:59 -0300
committerGravatar Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>2013-08-29 19:20:34 -0300
commitab649e21ba07c9f572d61350b9217609f44f7f04 (patch)
tree5df89b10cd925e9e6023dfc8cbea363fabdeb3be /qt-ui/downloadfromdivecomputer.h
parentdb44045cfea21510415ef53b27895cc0770312a7 (diff)
downloadsubsurface-ab649e21ba07c9f572d61350b9217609f44f7f04.tar.gz
fix DownloadDialog behavior
The DownloadDialog behavior was broken in a way it allows the user to make changes on the dialog while the download is happening. Also, clicking on "Cancel" breaks/hangs the UI sometimes, as libdivingcomputer doesn't always cancels the download right away. That's a bug that still needs to be fixed. Signed-off-by: Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>
Diffstat (limited to 'qt-ui/downloadfromdivecomputer.h')
-rw-r--r--qt-ui/downloadfromdivecomputer.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/qt-ui/downloadfromdivecomputer.h b/qt-ui/downloadfromdivecomputer.h
index 444c03e81..26216c1e0 100644
--- a/qt-ui/downloadfromdivecomputer.h
+++ b/qt-ui/downloadfromdivecomputer.h
@@ -24,7 +24,7 @@ private:
class InterfaceThread : public QThread{
Q_OBJECT
public:
- InterfaceThread(QObject *parent, device_data_t *data) ;
+ InterfaceThread(QObject *parent, device_data_t *data);
virtual void run();
signals:
@@ -39,13 +39,19 @@ class DownloadFromDCWidget : public QDialog{
public:
explicit DownloadFromDCWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
static DownloadFromDCWidget *instance();
+ void reject();
+
public slots:
void on_ok_clicked();
void on_cancel_clicked();
void runDialog();
void stoppedDownloading();
void on_vendor_currentIndexChanged(const QString& vendor);
+
private:
+ void markChildrenAsDisabled();
+ void markChildrenAsEnabled();
+
Ui::DownloadFromDiveComputer *ui;
InterfaceThread *thread;
bool downloading;
@@ -58,6 +64,7 @@ private:
QStringListModel *vendorModel;
QStringListModel *productModel;
void fill_computer_list();
+
public:
bool preferDownloaded();
};