HTML: Remember General Export Settings.

Set Default values and remember user selected general HTML export
settings.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Gehad elrobey 2014-08-10 07:10:19 +03:00 committed by Dirk Hohndel
parent a16c2db78d
commit 10e70336c6
2 changed files with 18 additions and 0 deletions

View file

@ -45,6 +45,15 @@ DiveLogExportDialog::DiveLogExportDialog(QWidget *parent) : QDialog(parent),
if (settings.contains("themeSelection")) { if (settings.contains("themeSelection")) {
ui->themeSelection->setCurrentIndex(settings.value("themeSelection").toInt()); ui->themeSelection->setCurrentIndex(settings.value("themeSelection").toInt());
} }
if (settings.contains("subsurfaceNumbers")) {
ui->exportSubsurfaceNumber->setChecked(settings.value("subsurfaceNumbers").toBool());
}
if (settings.contains("yearlyStatistics")) {
ui->exportStatistics->setChecked(settings.value("yearlyStatistics").toBool());
}
if (settings.contains("listOnly")) {
ui->exportListOnly->setChecked(settings.value("listOnly").toBool());
}
settings.endGroup(); settings.endGroup();
} }
@ -122,6 +131,9 @@ void DiveLogExportDialog::exportHTMLsettings(const QString &filename)
settings.setValue("fontSelection", ui->fontSelection->currentIndex()); settings.setValue("fontSelection", ui->fontSelection->currentIndex());
settings.setValue("fontSizeSelection", ui->fontSizeSelection->currentIndex()); settings.setValue("fontSizeSelection", ui->fontSizeSelection->currentIndex());
settings.setValue("themeSelection", ui->themeSelection->currentIndex()); settings.setValue("themeSelection", ui->themeSelection->currentIndex());
settings.setValue("subsurfaceNumbers", ui->exportSubsurfaceNumber->isChecked());
settings.setValue("yearlyStatistics", ui->exportStatistics->isChecked());
settings.setValue("listOnly", ui->exportListOnly->isChecked());
settings.endGroup(); settings.endGroup();
QString fontSize = ui->fontSizeSelection->currentText(); QString fontSize = ui->fontSizeSelection->currentText();

View file

@ -194,6 +194,9 @@
<property name="text"> <property name="text">
<string>Subsurface numbers</string> <string>Subsurface numbers</string>
</property> </property>
<property name="checked">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
@ -220,6 +223,9 @@
<property name="text"> <property name="text">
<string>Export Yearly Statistics</string> <string>Export Yearly Statistics</string>
</property> </property>
<property name="checked">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">