summaryrefslogtreecommitdiffstats
path: root/qt-ui/locationinformation.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-09-23 14:46:29 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-23 14:15:23 -0700
commite4c0ee32cdcd8487dd88e40fef3ba5de6fa92704 (patch)
tree5c7e917ad6218ee09de154526eb69948c3b01f70 /qt-ui/locationinformation.cpp
parent7d863b5c280c12d657fa46f909965071d5649ac5 (diff)
downloadsubsurface-e4c0ee32cdcd8487dd88e40fef3ba5de6fa92704.tar.gz
Handle palette change for dive site selection
If you select a dive site with a different uuid than your current dive.dive_site_uuid, you should get a different pallete to state clearly that something changed. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/locationinformation.cpp')
-rw-r--r--qt-ui/locationinformation.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp
index 2f4b8afda..77adc819b 100644
--- a/qt-ui/locationinformation.cpp
+++ b/qt-ui/locationinformation.cpp
@@ -488,6 +488,7 @@ void DiveLocationLineEdit::itemActivated(const QModelIndex& index)
qDebug() << "Setting a Existing dive site";
if(view->isVisible())
view->hide();
+ emit diveSiteSelected(currUuid);
}
void DiveLocationLineEdit::refreshDiveSiteCache()
@@ -580,11 +581,21 @@ void DiveLocationLineEdit::showPopup()
if (!view->isVisible()) {
setTemporaryDiveSiteName(text());
proxy->invalidate();
- view->setCurrentIndex( view->model()->index(0,1));
+ view->setCurrentIndex(view->model()->index(0,1));
view->show();
}
}
+DiveLocationLineEdit::DiveSiteType DiveLocationLineEdit::currDiveSiteType() const
+{
+ return currType;
+}
+
+uint32_t DiveLocationLineEdit::currDiveSiteUuid() const
+{
+ return currUuid;
+}
+
DiveLocationListView::DiveLocationListView(QWidget *parent)
{