mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Dive site rewrite: better member name
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9d51326e48
commit
73eceacaed
3 changed files with 11 additions and 8 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue