summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/divepixmapitem.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-07-10 21:15:20 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-10 19:59:54 -0700
commitb9d04c0cf49fba0906b2f431bf5d17763a24eb8a (patch)
tree15575f805c4df60039dc781a08ac485f14f1f1da /qt-ui/profile/divepixmapitem.cpp
parenta00d8101c559ab5f436be4824d6024a091d00ab9 (diff)
downloadsubsurface-b9d04c0cf49fba0906b2f431bf5d17763a24eb8a.tar.gz
Show/Hide pictures working.
This code hoocks the pictures with the preferences change. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/divepixmapitem.cpp')
-rw-r--r--qt-ui/profile/divepixmapitem.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/qt-ui/profile/divepixmapitem.cpp b/qt-ui/profile/divepixmapitem.cpp
index d2f3a692a..dd002e5f1 100644
--- a/qt-ui/profile/divepixmapitem.cpp
+++ b/qt-ui/profile/divepixmapitem.cpp
@@ -1,6 +1,7 @@
#include "divepixmapitem.h"
#include "animationfunctions.h"
#include <divepicturewidget.h>
+#include <preferences.h>
#include <QPen>
#include <QBrush>
@@ -22,6 +23,13 @@ DivePictureItem::DivePictureItem(int row, QObject *parent): DivePixmapItem(paren
#endif
rowOnModel = row;
setScale(0.2);
+ connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
+ setVisible(prefs.show_pictures_in_profile);
+}
+
+void DivePictureItem::settingsChanged()
+{
+ setVisible(prefs.show_pictures_in_profile);
}
void DivePictureItem::setPixmap(const QPixmap &pix)