summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-06-26 15:12:37 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-26 18:50:22 -0700
commit73eceacaed02632365aae4568c7708a57c8d29b0 (patch)
treee5abecb83bd09dc0637805c730f9c282ff758f88 /qt-ui
parent9d51326e48c87c27ee6c79e967ab398a7dd04408 (diff)
downloadsubsurface-73eceacaed02632365aae4568c7708a57c8d29b0.tar.gz
Dive site rewrite: better member name
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/locationinformation.cpp12
-rw-r--r--qt-ui/locationinformation.h2
-rw-r--r--qt-ui/maintab.cpp5
3 files changed, 11 insertions, 8 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp
index 9b4f48913..f50834660 100644
--- a/qt-ui/locationinformation.cpp
+++ b/qt-ui/locationinformation.cpp
@@ -229,7 +229,7 @@ void LocationInformationWidget::resetPallete()
SimpleDiveSiteEditDialog::SimpleDiveSiteEditDialog(QWidget *parent) :
QDialog(parent, Qt::FramelessWindowHint | Qt::WindowSystemMenuHint | Qt::Popup),
- ui(new Ui::SimpleDiveSiteEditDialog()), changed(false)
+ ui(new Ui::SimpleDiveSiteEditDialog()), changed_dive_site(false)
{
ui->setupUi(this);
}
@@ -263,7 +263,7 @@ void SimpleDiveSiteEditDialog::showEvent(QShowEvent *ev)
ui->diveSiteCoordinates->setText(QString(gps_text));
free( (void*) gps_text);
- changed = false;
+ changed_dive_site = false;
}
void SimpleDiveSiteEditDialog::on_diveSiteName_editingFinished()
@@ -272,7 +272,7 @@ void SimpleDiveSiteEditDialog::on_diveSiteName_editingFinished()
return;
free(displayed_dive_site.name);
displayed_dive_site.name = copy_string(qPrintable(ui->diveSiteName->text()));
- changed = true;
+ changed_dive_site = true;
}
void SimpleDiveSiteEditDialog::on_diveSiteCoordinates_editingFinished()
@@ -289,7 +289,7 @@ void SimpleDiveSiteEditDialog::on_diveSiteCoordinates_editingFinished()
displayed_dive_site.latitude.udeg = uLat;
displayed_dive_site.longitude.udeg = uLon;
- changed = true;
+ changed_dive_site = true;
}
void SimpleDiveSiteEditDialog::on_diveSiteDescription_editingFinished()
@@ -298,7 +298,7 @@ void SimpleDiveSiteEditDialog::on_diveSiteDescription_editingFinished()
return;
free(displayed_dive_site.description);
displayed_dive_site.description = copy_string(qPrintable(ui->diveSiteDescription->text()));
- changed = true;
+ changed_dive_site = true;
}
void SimpleDiveSiteEditDialog::on_diveSiteNotes_editingFinished()
@@ -307,5 +307,5 @@ void SimpleDiveSiteEditDialog::on_diveSiteNotes_editingFinished()
return;
free(displayed_dive_site.notes);
displayed_dive_site.notes = copy_string(qPrintable(ui->diveSiteNotes->text()));
- changed = true;
+ changed_dive_site = true;
}
diff --git a/qt-ui/locationinformation.h b/qt-ui/locationinformation.h
index 9a9f87b1e..d8b3c9d8a 100644
--- a/qt-ui/locationinformation.h
+++ b/qt-ui/locationinformation.h
@@ -51,7 +51,7 @@ Q_OBJECT
public:
SimpleDiveSiteEditDialog(QWidget *parent);
virtual ~SimpleDiveSiteEditDialog();
- bool changed;
+ bool changed_dive_site;
public slots:
void on_diveSiteName_editingFinished();
void on_diveSiteCoordinates_editingFinished();
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index c2eac0628..bf68601f1 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -241,7 +241,10 @@ void MainTab::setCurrentLocationIndex()
void MainTab::showDiveSiteSimpleEdit()
{
SimpleDiveSiteEditDialog dlg(this);
- int reason = dlg.exec();
+ dlg.exec();
+ if (dlg.changed_dive_site) {
+ qDebug() << "Changed the dive site, paint something yellow.";
+ }
}
void MainTab::enableGeoLookupEdition()