summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-05 15:20:05 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-05 15:20:05 -0800
commit332e484d6816f13e99e9cd862446caf5d7b1c38c (patch)
treee5fd06a8896a052bf8f1e2de6ccb5320e861ae09
parent06e65e4c02dc6e043944293be4c91f11e272d945 (diff)
downloadsubsurface-332e484d6816f13e99e9cd862446caf5d7b1c38c.tar.gz
Untangle Profile from MainTab
This one was easy. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--profile-widget/profilewidget2.cpp3
-rw-r--r--subsurface-desktop-main.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index 275ae6cde..028562f79 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -14,8 +14,8 @@
#include "diveplannermodel.h"
#include "models.h"
#include "divepicturemodel.h"
-#include "maintab.h"
#include "diveplanner.h"
+#include "simplewidgets.h"
#include <libdivecomputer/parser.h>
#include <QScrollBar>
@@ -125,7 +125,6 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : QGraphicsView(parent),
setupItemOnScene();
addItemsToScene();
scene()->installEventFilter(this);
- connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
QAction *action = NULL;
#define ADD_ACTION(SHORTCUT, Slot) \
action = new QAction(this); \
diff --git a/subsurface-desktop-main.cpp b/subsurface-desktop-main.cpp
index 5e07a25e5..0a578892b 100644
--- a/subsurface-desktop-main.cpp
+++ b/subsurface-desktop-main.cpp
@@ -11,6 +11,7 @@
#include "desktop-widgets/mainwindow.h"
#include "desktop-widgets/maintab.h"
#include "profile-widget/profilewidget2.h"
+#include "preferences/preferencesdialog.h"
#include "desktop-widgets/diveplanner.h"
#include "subsurface-core/color.h"
#include "qthelper.h"
@@ -94,6 +95,7 @@ int main(int argc, char **argv)
QObject::connect(m->graphics(), &ProfileWidget2::refreshDisplay, m, &MainWindow::refreshDisplay, Qt::AutoConnection);
QObject::connect(m->graphics(), &ProfileWidget2::updateDiveInfo, m->information(), &MainTab::updateDiveInfo, Qt::AutoConnection);
QObject::connect(m->graphics(), &ProfileWidget2::editCurrentDive, m, &MainWindow::editCurrentDive, Qt::AutoConnection);
+ QObject::connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), m->graphics(), SLOT(settingsChanged()));
if (verbose > 0)
print_files();
if (!quit)