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>
This commit is contained in:
Tomaz Canabrava 2013-05-20 16:43:33 -03:00
parent 15bb4fccbb
commit c7a5d0490f
8 changed files with 249 additions and 89 deletions

View file

@ -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()