mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
7be962bfc2
Having subsurface-core as a directory name really messes with autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an autocomplete conflict and also was inconsistent with the desktop-widget name for the directory containing the "other" UI. And while cleaning up the resulting change in the path name for include files, I decided to clean up those even more to make them consistent overall. This could have been handled in more commits, but since this requires a make clean before the build, it seemed more sensible to do it all in one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
45 lines
1.6 KiB
C++
45 lines
1.6 KiB
C++
#include "preferences_georeference.h"
|
|
#include "ui_prefs_georeference.h"
|
|
#include "core/prefs-macros.h"
|
|
#include "core/qthelper.h"
|
|
#include "qt-models/divelocationmodel.h"
|
|
|
|
#include <ctime>
|
|
#include <QSettings>
|
|
|
|
PreferencesGeoreference::PreferencesGeoreference() : AbstractPreferencesWidget(tr("Georeference"), QIcon(":/georeference"), 9)
|
|
{
|
|
ui = new Ui::PreferencesGeoreference();
|
|
ui->setupUi(this);
|
|
ui->first_item->setModel(GeoReferencingOptionsModel::instance());
|
|
ui->second_item->setModel(GeoReferencingOptionsModel::instance());
|
|
ui->third_item->setModel(GeoReferencingOptionsModel::instance());
|
|
}
|
|
|
|
PreferencesGeoreference::~PreferencesGeoreference()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
void PreferencesGeoreference::refreshSettings()
|
|
{
|
|
ui->enable_geocoding->setChecked(prefs.geocoding.enable_geocoding);
|
|
ui->parse_without_gps->setChecked(prefs.geocoding.parse_dive_without_gps);
|
|
ui->tag_existing_dives->setChecked(prefs.geocoding.tag_existing_dives);
|
|
ui->first_item->setCurrentIndex(prefs.geocoding.category[0]);
|
|
ui->second_item->setCurrentIndex(prefs.geocoding.category[1]);
|
|
ui->third_item->setCurrentIndex(prefs.geocoding.category[2]);
|
|
}
|
|
|
|
void PreferencesGeoreference::syncSettings()
|
|
{
|
|
QSettings s;
|
|
s.beginGroup("geocoding");
|
|
s.setValue("enable_geocoding", ui->enable_geocoding->isChecked());
|
|
s.setValue("parse_dives_without_gps", ui->parse_without_gps->isChecked());
|
|
s.setValue("tag_existing_dives", ui->tag_existing_dives->isChecked());
|
|
s.setValue("cat0", ui->first_item->currentIndex());
|
|
s.setValue("cat1", ui->second_item->currentIndex());
|
|
s.setValue("cat2", ui->third_item->currentIndex());
|
|
s.endGroup();
|
|
}
|