diff options
-rw-r--r-- | pref.h | 1 | ||||
-rw-r--r-- | qt-ui/mainwindow.cpp | 7 | ||||
-rw-r--r-- | qt-ui/mainwindow.h | 2 | ||||
-rw-r--r-- | qt-ui/mainwindow.ui | 31 | ||||
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 1 | ||||
-rw-r--r-- | subsurfacestartup.c | 3 |
6 files changed, 38 insertions, 7 deletions
@@ -63,6 +63,7 @@ struct preferences { char *proxy_pass; bool doo2breaks; bool drop_stone_mode; + bool show_pictures_in_profile; }; enum unit_system_values { METRIC, diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index c5c0d20b9..bb5e2a458 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -93,6 +93,7 @@ MainWindow::MainWindow() : QMainWindow(), #endif ui.mainErrorMessage->hide(); + ui.newProfile->setEmptyState(); initialUiSetup(); readSettings(); ui.ListWidget->reload(DiveTripModel::TREE); @@ -1334,6 +1335,12 @@ void MainWindow::on_profScaled_clicked(bool triggered) TOOLBOX_PREF_PROFILE(zoomed_plot); } +void MainWindow::on_profTogglePicture_clicked(bool triggered) +{ + prefs.show_pictures_in_profile = triggered; + TOOLBOX_PREF_PROFILE(show_pictures_in_planner); +} + #undef TOOLBOX_PREF_PROFILE void MainWindow::on_actionExport_triggered() diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h index 014fbb488..3e7cad667 100644 --- a/qt-ui/mainwindow.h +++ b/qt-ui/mainwindow.h @@ -142,7 +142,7 @@ slots: void on_profRuler_clicked(bool triggered); void on_profSAC_clicked(bool triggered); void on_profScaled_clicked(bool triggered); - + void on_profTogglePicture_clicked(bool triggered); void on_actionExport_triggered(); protected: diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui index cdabc8ea6..ff687ac42 100644 --- a/qt-ui/mainwindow.ui +++ b/qt-ui/mainwindow.ui @@ -109,7 +109,7 @@ <property name="spacing"> <number>0</number> </property> - <item row="14" column="0"> + <item row="15" column="0"> <spacer name="verticalSpacer"> <property name="orientation"> <enum>Qt::Vertical</enum> @@ -466,6 +466,9 @@ </property> </widget> </item> + <item row="0" column="1" rowspan="16"> + <widget class="ProfileWidget2" name="newProfile"/> + </item> <item row="1" column="0"> <widget class="QToolButton" name="profPn2"> <property name="toolTip"> @@ -492,8 +495,28 @@ </property> </widget> </item> - <item row="0" column="1" rowspan="15"> - <widget class="ProfileWidget2" name="newProfile"/> + <item row="14" column="0"> + <widget class="QToolButton" name="profTogglePicture"> + <property name="text"> + <string>...</string> + </property> + <property name="icon"> + <iconset resource="../subsurface.qrc"> + <normaloff>:/pictures</normaloff>:/pictures</iconset> + </property> + <property name="iconSize"> + <size> + <width>24</width> + <height>24</height> + </size> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoRaise"> + <bool>true</bool> + </property> + </widget> </item> </layout> </widget> @@ -638,7 +661,7 @@ p, li { white-space: pre-wrap; } <x>0</x> <y>0</y> <width>1682</width> - <height>19</height> + <height>27</height> </rect> </property> <widget class="QMenu" name="menuFile"> diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index ee80d59bd..fe19c7b21 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -100,7 +100,6 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : QGraphicsView(parent), setupItemOnScene(); addItemsToScene(); scene()->installEventFilter(this); - setEmptyState(); connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged())); QAction *action = NULL; diff --git a/subsurfacestartup.c b/subsurfacestartup.c index 58291d272..1af68510e 100644 --- a/subsurfacestartup.c +++ b/subsurfacestartup.c @@ -41,7 +41,8 @@ struct preferences default_prefs = { .bottompo2 = 1400, .decopo2 = 1600, .doo2breaks = false, - .drop_stone_mode = false + .drop_stone_mode = false, + .show_pictures_in_profile = true }; int run_survey; |