summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 3c550439b..286aba43e 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -28,6 +28,7 @@
#include "models.h"
#include "downloadfromdivecomputer.h"
#include "preferences.h"
+#include "subsurfacewebservices.h"
static MainWindow* instance = 0;
@@ -42,11 +43,11 @@ MainWindow::MainWindow() : ui(new Ui::MainWindow()), helpView(0)
setWindowIcon(QIcon(":subsurface-icon"));
connect(ui->ListWidget, SIGNAL(currentDiveChanged(int)), this, SLOT(current_dive_changed(int)));
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(readSettings()));
- connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(refreshDisplay()));
+ connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), ui->ListWidget, SLOT(update()));
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), ui->ProfileWidget, SLOT(refresh()));
ui->mainErrorMessage->hide();
ui->ProfileWidget->setFocusProxy(ui->ListWidget);
- ui->ListWidget->reload();
+ ui->ListWidget->reload(DiveTripModel::TREE);
initialUiSetup();
readSettings();
ui->ListWidget->reloadHeaderActions();
@@ -60,7 +61,7 @@ void MainWindow::refreshDisplay()
{
if (selected_dive == -1)
current_dive_changed(dive_table.nr - 1);
- ui->ListWidget->reload();
+ ui->ListWidget->reload(DiveTripModel::CURRENT, false);
}
void MainWindow::current_dive_changed(int divenr)
@@ -106,7 +107,7 @@ void MainWindow::on_actionOpen_triggered()
ui->InfoWidget->reload();
ui->globe->reload();
- ui->ListWidget->reload();
+ ui->ListWidget->reload(DiveTripModel::TREE);
ui->ListWidget->setFocus();
}
@@ -139,7 +140,7 @@ void MainWindow::on_actionClose_triggered()
ui->InfoWidget->clearEquipment();
ui->InfoWidget->updateDiveInfo(-1);
ui->ProfileWidget->clear();
- ui->ListWidget->reload();
+ ui->ListWidget->reload(DiveTripModel::TREE);
ui->globe->reload();
clear_events();
@@ -181,7 +182,8 @@ void MainWindow::on_actionDownloadDC_triggered()
void MainWindow::on_actionDownloadWeb_triggered()
{
- qDebug("actionDownloadWeb");}
+ SubsurfaceWebServices::instance()->runDialog();
+}
void MainWindow::on_actionEditDeviceNames_triggered()
{