summaryrefslogtreecommitdiffstats
path: root/qt-ui/simplewidgets.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-12 02:04:20 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-12 11:19:27 -0800
commit0e6345f65b041b5005c75b83792ca98d8ef4f766 (patch)
treeb0ec0df52a744e579be05442cab5da61d2329774 /qt-ui/simplewidgets.cpp
parent5c4d2660604af8925b757025571a8dcc36da1cdc (diff)
downloadsubsurface-0e6345f65b041b5005c75b83792ca98d8ef4f766.tar.gz
Correctly connect the maintab to dive site management
We now have a working uuid - use it. And populate the fields accordingly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/simplewidgets.cpp')
-rw-r--r--qt-ui/simplewidgets.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp
index c7dd47c6d..756251b51 100644
--- a/qt-ui/simplewidgets.cpp
+++ b/qt-ui/simplewidgets.cpp
@@ -665,14 +665,13 @@ LocationInformationWidget::LocationInformationWidget(QWidget *parent) : QGroupBo
ui.diveSiteMessage->addAction(action);
}
-void LocationInformationWidget::setLocationName(const QString& name)
+void LocationInformationWidget::setLocationId(uint32_t uuid)
{
- ui.diveSiteName->setText(name);
-}
-
-void LocationInformationWidget::setLocationCoords(const QString& coords)
-{
- ui.diveSiteCoordinates->setText(coords);
+ currentDs = get_dive_site_by_uuid(uuid);
+ ui.diveSiteName->setText(currentDs->name);
+ ui.diveSiteDescription->setText(currentDs->description);
+ ui.diveSiteNotes->setPlainText(currentDs->notes);
+ ui.diveSiteCoordinates->setText(printGPSCoords(currentDs->latitude.udeg, currentDs->longitude.udeg));
}
void LocationInformationWidget::acceptChanges()