summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-05-17 21:58:49 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-05-17 21:58:49 -0300
commit86021b24d98c385b10ccc2fefab5cf22f3a03b54 (patch)
tree39a603640b2882cec9040c59f1a51bfe8e88bae6 /qt-ui/mainwindow.cpp
parent56dbb7c2ff697a393f5051e2b5363bd4c0f2bb6e (diff)
downloadsubsurface-86021b24d98c385b10ccc2fefab5cf22f3a03b54.tar.gz
Borrowed the KMessageWidget code to better show passive information.
Borrowed the code from KMessageWidget from Aurelian Gateau, Kdelibs, to better show passive information and notifications. instead of a popup blowing in the user's face, a nice, animated and well designed widget will gracefully fade-in, show the notes, and fade out when not needed anymore. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index c5a4e5ce3..e5cf5ed37 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -32,16 +32,18 @@ MainWindow::MainWindow() : ui(new Ui::MainWindow())
readSettings();
setWindowIcon(QIcon(":subsurface-icon"));
connect(ui->ListWidget, SIGNAL(currentDiveChanged(int)), this, SLOT(current_dive_changed(int)));
+ ui->globeMessage->hide();
+ ui->globe->setMessageWidget(ui->globeMessage);
ui->ProfileWidget->setFocusProxy(ui->ListWidget);
ui->ListWidget->reload();
ui->ListWidget->setFocus();
- ui->widget->reload();
+ ui->globe->reload();
}
void MainWindow::current_dive_changed(int divenr)
{
select_dive(divenr);
- ui->widget->centerOn(get_dive(selected_dive));
+ ui->globe->centerOn(get_dive(selected_dive));
redrawProfile();
ui->InfoWidget->updateDiveInfo(divenr);
}
@@ -79,7 +81,7 @@ void MainWindow::on_actionOpen_triggered()
process_dives(FALSE, FALSE);
ui->InfoWidget->reload();
- ui->widget->reload();
+ ui->globe->reload();
ui->ListWidget->reload();
ui->ListWidget->setFocus();
}