diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-06-03 19:09:12 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-03 16:41:51 -0700 |
commit | ebe799e0a02723a6499e60da66e62ea18aceb52b (patch) | |
tree | 3f0faecaf45f4d54119a126490e2f7d8f1b1b270 /qt-ui/profile/profilewidget2.cpp | |
parent | eb24d90c8e0aae60c0f0af4a9c7894007be47269 (diff) | |
download | subsurface-ebe799e0a02723a6499e60da66e62ea18aceb52b.tar.gz |
Connect & disconnect the PictureModel on the profile
Ignore the warnings for now, this patch connects and disconnects the (not
done yet) plotPictures() method.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/profilewidget2.cpp')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 54af27ba3..a63c83d68 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -701,6 +701,11 @@ void ProfileWidget2::setProfileState() return; disconnectTemporaryConnections(); + connect(DivePictureModel::instance(), SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(plotPictures())); + connect(DivePictureModel::instance(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),this, SLOT(plotPictureS())); + connect(DivePictureModel::instance(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),this, SLOT(plotPictures())); + /* show the same stuff that the profile shows. */ + //TODO: Move the DC handling to another method. MainWindow::instance()->enableDcShortcuts(); @@ -1044,6 +1049,10 @@ void ProfileWidget2::disconnectTemporaryConnections() disconnect(plannerModel, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), this, SLOT(pointsRemoved(const QModelIndex &, int, int))); + disconnect(DivePictureModel::instance(), SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(plotPictures())); + disconnect(DivePictureModel::instance(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),this, SLOT(plotPictureS())); + disconnect(DivePictureModel::instance(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),this, SLOT(plotPictures())); + Q_FOREACH (QAction *action, actionsForKeys.values()) { action->setShortcut(QKeySequence()); action->setShortcutContext(Qt::WidgetShortcut); |