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
|
@ -14,6 +14,7 @@
|
|||
#include "divelistview.h"
|
||||
#include "display.h"
|
||||
#include "profile/profilewidget2.h"
|
||||
#include "diveplanner.h"
|
||||
|
||||
#if defined(FBSUPPORT)
|
||||
#include "socialnetworks.h"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -32,6 +32,8 @@ class UpdateManager;
|
|||
class UserManual;
|
||||
class DivePlannerWidget;
|
||||
class ProfileWidget2;
|
||||
class PlannerDetails;
|
||||
class PlannerSettingsWidget;
|
||||
class UndoBuffer;
|
||||
|
||||
enum MainWindowTitleFormat {
|
||||
|
@ -68,6 +70,8 @@ public:
|
|||
DiveListView *dive_list();
|
||||
GlobeGPS *globe();
|
||||
DivePlannerWidget *divePlannerWidget();
|
||||
PlannerSettingsWidget *divePlannerSettingsWidget();
|
||||
|
||||
void showError(QString message);
|
||||
void setTitle(enum MainWindowTitleFormat format);
|
||||
|
||||
|
|
|
@ -32,15 +32,6 @@
|
|||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<widget class="QStackedWidget" name="diveListPane">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_3">
|
||||
<layout class="QVBoxLayout" name="diveListLayout"/>
|
||||
</widget>
|
||||
<widget class="PlannerSettingsWidget" name="plannerSettingsWidget"/>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -705,12 +696,6 @@
|
|||
<header>kmessagewidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>PlannerSettingsWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>diveplanner.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>MultiFilter</class>
|
||||
<extends>QWidget</extends>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <QCompleter>
|
||||
#include <QKeyEvent>
|
||||
#include <QTextDocument>
|
||||
|
||||
QSize DiveListDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||
{
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include <QPicture>
|
||||
#include <QMessageBox>
|
||||
#include <QPointer>
|
||||
#include <QTableView>
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "printdialog.h"
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "mainwindow.h"
|
||||
#include "maintab.h"
|
||||
#include "profile/profilewidget2.h"
|
||||
#include "diveplanner.h"
|
||||
|
||||
#include <QSettings>
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "divepicturewidget.h"
|
||||
#include "models.h"
|
||||
#include "maintab.h"
|
||||
#include "diveplanner.h"
|
||||
|
||||
#include <libdivecomputer/parser.h>
|
||||
#include <QScrollBar>
|
||||
|
|
Loading…
Add table
Reference in a new issue