From 5eb2cc4594ab2181ccc3b09a2540af3fb615468e Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 24 Oct 2013 22:30:21 -0200 Subject: Created a 'WebService' dialog that will handle download and upload. Created a WebService dialog that will handle download and upload from all child based webservices. Also, ported the currently - only - one webservice to use the new dialog. Signed-off-by: Tomaz Canabrava --- qt-ui/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui/mainwindow.cpp') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 69cf363c3..bb21e6625 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -252,7 +252,7 @@ void MainWindow::on_actionDownloadDC_triggered() void MainWindow::on_actionDownloadWeb_triggered() { - SubsurfaceWebServices::instance()->runDialog(); + SubsurfaceWebServices::instance()->exec(); } void MainWindow::on_actionEditDeviceNames_triggered() -- cgit v1.2.3-70-g09d2 From 7bea2e1be062cd6ac4aa79f62bcd5cd42aa44d4a Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 24 Oct 2013 23:02:59 -0200 Subject: Minimum hooking-up done, divelogs.de shows on menu-activation. This patch does the hooking up to show the dialog of the divelogs.de window when the user selects it on the menu.: Signed-off-by: Tomaz Canabrava --- qt-ui/mainwindow.cpp | 5 +++++ qt-ui/mainwindow.h | 1 + qt-ui/subsurfacewebservices.cpp | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) (limited to 'qt-ui/mainwindow.cpp') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index bb21e6625..5a2f872b4 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -255,6 +255,11 @@ void MainWindow::on_actionDownloadWeb_triggered() SubsurfaceWebServices::instance()->exec(); } +void MainWindow::on_actionDivelogs_de_triggered() +{ + DivelogsDeWebServices::instance()->exec(); +} + void MainWindow::on_actionEditDeviceNames_triggered() { DiveComputerManagementDialog::instance()->init(); diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h index 5dfae3e98..45f9fd37a 100644 --- a/qt-ui/mainwindow.h +++ b/qt-ui/mainwindow.h @@ -69,6 +69,7 @@ private slots: /* log menu actions */ void on_actionDownloadDC_triggered(); void on_actionDownloadWeb_triggered(); + void on_actionDivelogs_de_triggered(); void on_actionEditDeviceNames_triggered(); void on_actionAddDive_triggered(); void on_actionRenumber_triggered(); diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp index edca1ee74..7ece0a640 100644 --- a/qt-ui/subsurfacewebservices.cpp +++ b/qt-ui/subsurfacewebservices.cpp @@ -269,7 +269,9 @@ static bool merge_locations_into_dives(void) DivelogsDeWebServices* DivelogsDeWebServices::instance() { - + static DivelogsDeWebServices *self = new DivelogsDeWebServices(); + self->setAttribute(Qt::WA_QuitOnClose, false); + return self; } DivelogsDeWebServices::DivelogsDeWebServices(QWidget* parent, Qt::WindowFlags f): WebServices(parent, f) -- cgit v1.2.3-70-g09d2