mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Copy the name and the coords when entering the EditDiveSite state
Name and coords of the current dive are copied to the edit dive site screen. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
68691c9d6d
commit
d769c6016f
3 changed files with 17 additions and 0 deletions
|
@ -215,6 +215,8 @@ LocationInformationWidget *MainWindow::locationInformationWidget() {
|
|||
}
|
||||
|
||||
void MainWindow::enableDiveSiteEdit() {
|
||||
locationInformationWidget()->setLocationName(current_dive->location);
|
||||
locationInformationWidget()->setLocationCoords(printGPSCoords(current_dive->latitude.udeg, current_dive->longitude.udeg));
|
||||
setApplicationState("EditDiveSite");
|
||||
}
|
||||
|
||||
|
|
|
@ -665,6 +665,16 @@ LocationInformationWidget::LocationInformationWidget(QWidget *parent) : QGroupBo
|
|||
ui.diveSiteMessage->addAction(action);
|
||||
}
|
||||
|
||||
void LocationInformationWidget::setLocationName(const QString& name)
|
||||
{
|
||||
ui.diveSiteName->setText(name);
|
||||
}
|
||||
|
||||
void LocationInformationWidget::setLocationCoords(const QString& coords)
|
||||
{
|
||||
ui.diveSiteCoordinates->setText(coords);
|
||||
}
|
||||
|
||||
void LocationInformationWidget::acceptChanges()
|
||||
{
|
||||
emit informationManagementEnded();
|
||||
|
|
|
@ -227,6 +227,11 @@ public slots:
|
|||
void rejectChanges();
|
||||
|
||||
void showEvent(QShowEvent *);
|
||||
|
||||
/* change that to setLocationSite(QUuid diveSiteUid or something later */
|
||||
void setLocationName(const QString& name);
|
||||
void setLocationCoords(const QString& coords);
|
||||
|
||||
signals:
|
||||
void informationManagementEnded();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue