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() {
|
void MainWindow::enableDiveSiteEdit() {
|
||||||
|
locationInformationWidget()->setLocationName(current_dive->location);
|
||||||
|
locationInformationWidget()->setLocationCoords(printGPSCoords(current_dive->latitude.udeg, current_dive->longitude.udeg));
|
||||||
setApplicationState("EditDiveSite");
|
setApplicationState("EditDiveSite");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -665,6 +665,16 @@ LocationInformationWidget::LocationInformationWidget(QWidget *parent) : QGroupBo
|
||||||
ui.diveSiteMessage->addAction(action);
|
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()
|
void LocationInformationWidget::acceptChanges()
|
||||||
{
|
{
|
||||||
emit informationManagementEnded();
|
emit informationManagementEnded();
|
||||||
|
|
|
@ -227,6 +227,11 @@ public slots:
|
||||||
void rejectChanges();
|
void rejectChanges();
|
||||||
|
|
||||||
void showEvent(QShowEvent *);
|
void showEvent(QShowEvent *);
|
||||||
|
|
||||||
|
/* change that to setLocationSite(QUuid diveSiteUid or something later */
|
||||||
|
void setLocationName(const QString& name);
|
||||||
|
void setLocationCoords(const QString& coords);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void informationManagementEnded();
|
void informationManagementEnded();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue