Preferences UI: final cleanup

This commit does some final cleaning up to the code, mostly deleting
white space and comments.

Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
willemferguson 2019-12-12 10:28:04 +02:00 committed by Dirk Hohndel
parent 42a85dfa7e
commit 6212bb6721
18 changed files with 40 additions and 37 deletions

View file

@ -30,7 +30,6 @@ void PreferencesDc::on_resetRememberedDCs_clicked()
qPrefDiveComputer::set_vendor4(QString());
}
void PreferencesDc::refreshSettings()
{
}

View file

@ -22,12 +22,6 @@ PreferencesDefaults::~PreferencesDefaults()
delete ui;
}
/*void PreferencesDefaults::on_resetSettings_clicked()
{
auto dialog = PreferencesDialog::instance();
dialog->defaultsRequested();
} */
void PreferencesDefaults::refreshSettings()
{
ui->font->setCurrentFont(qPrefDisplay::divelist_font());

View file

@ -9,8 +9,6 @@
#include <QMessageBox>
#include <QSortFilterProxyModel>
#include "qt-models/models.h"
PreferencesEquipment::PreferencesEquipment() : AbstractPreferencesWidget(tr("Equipment"), QIcon(":preferences-equipment-icon"), 5)
{
ui = new Ui::PreferencesEquipment();

View file

@ -14,11 +14,34 @@
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label_georef1">
<property name="toolTip">
<string extracomment="Help info 1"/>
</property>
<property name="text">
<string>Reverse dive site lookup format</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_georef2">
<property name="toolTip">
<string extracomment="Help info 1"/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="text">
<string>Selecting the blue globe icon to the right of Location in the Notes tab opens the Edit Dive Site panel. There, an icon to the right of the dive site coordinates allows reverse lookup of the dive site. This finds the country and closest town to the divesite and adds them as dive site tags above the dive site name in the Notes tab. The combo boxes below allow one to select the order in which these tags are shown in the Notes tab. This requires an Internet connection.</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_12">
<property name="title">
<string>Dive site layout</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QComboBox" name="first_item">

View file

@ -3,6 +3,7 @@
#include "ui_preferences_media.h"
#include "core/settings/qPrefMedia.h"
#include "core/qthelper.h"
#include "qt-models/models.h"
#include <QApplication>
#include <QMessageBox>
@ -10,13 +11,10 @@
#include <QFileDialog>
#include <QProcess>
#include "qt-models/models.h"
PreferencesMedia::PreferencesMedia() : AbstractPreferencesWidget(tr("Media"), QIcon(":preferences-media-icon"), 6)
{
ui = new Ui::PreferencesMedia();
ui->setupUi(this);
}
PreferencesMedia::~PreferencesMedia()
@ -75,7 +73,6 @@ void PreferencesMedia::refreshSettings()
ui->ffmpegExecutable->setText(qPrefMedia::ffmpeg_executable());
ui->auto_recalculate_thumbnails->setChecked(prefs.auto_recalculate_thumbnails);
}
void PreferencesMedia::syncSettings()
@ -85,5 +82,4 @@ void PreferencesMedia::syncSettings()
media->set_extract_video_thumbnails_position(ui->videoThumbnailPosition->value());
media->set_ffmpeg_executable(ui->ffmpegExecutable->text());
qPrefMedia::set_auto_recalculate_thumbnails(ui->auto_recalculate_thumbnails->isChecked());
}

View file

@ -35,7 +35,7 @@
<bool>true</bool>
</property>
<property name="text">
<string>Photographs or videos are sometimes edited. If a photo is more recent than its thumbnail, checking the checkbox below will allow creating a new thumbnail after the media has been edited.</string>
<string>Photographs or videos are sometimes edited after being uploaded and linked to Subsurface. If a photo is therefore more recent than its original thumbnail, checking the checkbox below will allow creating a new thumbnail after the media has been edited.</string>
</property>
</widget>
</item>

View file

@ -1,7 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include "preferences_reset.h"
#include "ui_preferences_reset.h"
#include "core/dive.h"
#include "preferencesdialog.h"
PreferencesReset::PreferencesReset(): AbstractPreferencesWidget(tr("Reset"), QIcon(":preferences-reset-icon"), 11 ), ui(new Ui::PreferencesReset())

View file

@ -22,8 +22,8 @@ public slots:
private:
Ui::PreferencesReset *ui;
};
};
#endif

View file

@ -15,9 +15,6 @@
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
@ -39,7 +36,7 @@
<bool>true</bool>
</property>
<property name="text">
<string>Selecting this button will reset all settings to their default values</string>
<string>Selecting this button will reset all preferences to their default values</string>
</property>
</widget>
</item>
@ -50,7 +47,7 @@
<item row="1" column="0">
<widget class="QPushButton" name="resetSettings">
<property name="text">
<string>Reset all settings</string>
<string>Reset all preferences</string>
</property>
</widget>
</item>