aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-05-20 16:43:33 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-05-20 16:43:33 -0300
commitc7a5d0490fa5f4e8579e6a8e0fbdc7baf7c34145 (patch)
tree615ec1dbf0887d0e1ffeecf4ed7b1600ca0c0d6a /qt-ui/mainwindow.cpp
parent15bb4fccbb14c0e69637ca5920a1e68071700b8e (diff)
downloadsubsurface-c7a5d0490fa5f4e8579e6a8e0fbdc7baf7c34145.tar.gz
Skeleton code for a non-blocking UI thread for downloading dives from the DC
This is the skeleton code for a non-blocking ui-thread It already creates the first-thread ( 'do not block the ui' ) and the second thread ('download from the dive computer') We can in the future merge both in the same place - I didn't want to do that now because the download function is written in the libdivecomputer.c code, and I cant just transform that to a QThread and use signals, so I used two threads for that. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index d7320ceeb..30629ce95 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -25,6 +25,7 @@
#include "../pref.h"
#include "modeldelegates.h"
#include "models.h"
+#include "downloadfromdivecomputer.h"
static MainWindow* instance = 0;
@@ -160,7 +161,8 @@ void MainWindow::on_actionQuit_triggered()
void MainWindow::on_actionDownloadDC_triggered()
{
- qDebug("actionDownloadDC");
+ DownloadFromDCWidget* downloadWidget = new DownloadFromDCWidget();
+ downloadWidget->show();
}
void MainWindow::on_actionDownloadWeb_triggered()