diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/maintab.cpp | 1 | ||||
-rw-r--r-- | qt-ui/mainwindow.cpp | 10 | ||||
-rw-r--r-- | qt-ui/mainwindow.h | 4 | ||||
-rw-r--r-- | qt-ui/mainwindow.ui | 15 | ||||
-rw-r--r-- | qt-ui/modeldelegates.cpp | 1 | ||||
-rw-r--r-- | qt-ui/printlayout.cpp | 1 | ||||
-rw-r--r-- | qt-ui/profile/diveprofileitem.cpp | 1 | ||||
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 1 |
8 files changed, 16 insertions, 18 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 3463ec796..e0da97a2d 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -14,6 +14,7 @@ #include "divelistview.h" #include "display.h" #include "profile/profilewidget2.h" +#include "diveplanner.h" #if defined(FBSUPPORT) #include "socialnetworks.h" diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index a6a8cdeca..076b982bf 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -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 diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h index 2af7f9c9b..40c1ad1aa 100644 --- a/qt-ui/mainwindow.h +++ b/qt-ui/mainwindow.h @@ -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); diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui index b4be5b7d9..ac0e92d94 100644 --- a/qt-ui/mainwindow.ui +++ b/qt-ui/mainwindow.ui @@ -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> @@ -706,12 +697,6 @@ <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> <header>simplewidgets.h</header> diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp index d8776d06d..c6c46aa46 100644 --- a/qt-ui/modeldelegates.cpp +++ b/qt-ui/modeldelegates.cpp @@ -8,6 +8,7 @@ #include <QCompleter> #include <QKeyEvent> +#include <QTextDocument> QSize DiveListDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const { diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp index aa3ef95bc..d9752d235 100644 --- a/qt-ui/printlayout.cpp +++ b/qt-ui/printlayout.cpp @@ -3,6 +3,7 @@ #include <QPicture> #include <QMessageBox> #include <QPointer> +#include <QTableView> #include "mainwindow.h" #include "printdialog.h" diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp index 2878049e5..cc0d27df0 100644 --- a/qt-ui/profile/diveprofileitem.cpp +++ b/qt-ui/profile/diveprofileitem.cpp @@ -11,6 +11,7 @@ #include "mainwindow.h" #include "maintab.h" #include "profile/profilewidget2.h" +#include "diveplanner.h" #include <QSettings> diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 792ec104a..1de45ff9f 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -13,6 +13,7 @@ #include "divepicturewidget.h" #include "models.h" #include "maintab.h" +#include "diveplanner.h" #include <libdivecomputer/parser.h> #include <QScrollBar> |