mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Finish the cleanup of mainwindow.ui
This is the last patch in the series of clearing up the mainwindo.ui. Now to bugfixing. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4867ee8ad8
commit
194dd8bd97
8 changed files with 16 additions and 18 deletions
|
@ -24,6 +24,7 @@
|
|||
#include "profile/profilewidget2.h"
|
||||
#include "globe.h"
|
||||
#include "maintab.h"
|
||||
#include "diveplanner.h"
|
||||
#ifndef NO_PRINTING
|
||||
#include <QPrintDialog>
|
||||
#include "printdialog.h"
|
||||
|
@ -92,7 +93,7 @@ MainWindow::MainWindow() : QMainWindow(),
|
|||
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), diveListView, SLOT(reloadHeaderActions()));
|
||||
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), information(), SLOT(updateDiveInfo()));
|
||||
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), divePlannerWidget(), SLOT(settingsChanged()));
|
||||
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), ui.plannerSettingsWidget, SLOT(settingsChanged()));
|
||||
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), divePlannerSettingsWidget(), SLOT(settingsChanged()));
|
||||
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), TankInfoModel::instance(), SLOT(update()));
|
||||
connect(ui.actionRecent1, SIGNAL(triggered(bool)), this, SLOT(recentFileTriggered(bool)));
|
||||
connect(ui.actionRecent2, SIGNAL(triggered(bool)), this, SLOT(recentFileTriggered(bool)));
|
||||
|
@ -119,7 +120,7 @@ MainWindow::MainWindow() : QMainWindow(),
|
|||
diveListView->expand(dive_list()->model()->index(0, 0));
|
||||
diveListView->scrollTo(dive_list()->model()->index(0, 0), QAbstractItemView::PositionAtCenter);
|
||||
divePlannerWidget()->settingsChanged();
|
||||
ui.plannerSettingsWidget->settingsChanged();
|
||||
divePlannerSettingsWidget()->settingsChanged();
|
||||
#ifdef NO_MARBLE
|
||||
ui.globePane->hide();
|
||||
ui.menuView->removeAction(ui.actionViewGlobe);
|
||||
|
@ -188,6 +189,10 @@ PlannerDetails *MainWindow::plannerDetails() const {
|
|||
return qobject_cast<PlannerDetails*>(applicationState["PlanDive"].bottomRight);
|
||||
}
|
||||
|
||||
PlannerSettingsWidget *MainWindow::divePlannerSettingsWidget() {
|
||||
return qobject_cast<PlannerSettingsWidget*>(applicationState["PlanDive"].bottomLeft);
|
||||
}
|
||||
|
||||
void MainWindow::setLoadedWithFiles(bool f)
|
||||
{
|
||||
filesAsArguments = f;
|
||||
|
@ -212,7 +217,6 @@ void MainWindow::refreshDisplay(bool doRecreateDiveList)
|
|||
globe()->reload();
|
||||
if (doRecreateDiveList)
|
||||
recreateDiveList();
|
||||
ui.diveListPane->setCurrentIndex(0); // switch to the dive list
|
||||
#ifdef NO_MARBLE
|
||||
ui.globePane->hide();
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue