summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/divelogexportdialog.cpp20
-rw-r--r--qt-ui/divelogexportdialog.ui12
2 files changed, 24 insertions, 8 deletions
diff --git a/qt-ui/divelogexportdialog.cpp b/qt-ui/divelogexportdialog.cpp
index e8dabc131..938a19d85 100644
--- a/qt-ui/divelogexportdialog.cpp
+++ b/qt-ui/divelogexportdialog.cpp
@@ -31,6 +31,19 @@ DiveLogExportDialog::DiveLogExportDialog(QWidget *parent) : QDialog(parent),
ui->fontSelection->addItem("Georgia", "Georgia, serif");
ui->fontSelection->addItem("Courier", "Courier, monospace");
ui->fontSelection->addItem("Verdana", "Verdana, Geneva, sans-serif");
+
+ QSettings settings;
+ settings.beginGroup("HTML");
+ if (settings.contains("fontSelection")) {
+ ui->fontSelection->setCurrentIndex(settings.value("fontSelection").toInt());
+ }
+ if (settings.contains("fontSizeSelection")) {
+ ui->fontSizeSelection->setCurrentIndex(settings.value("fontSizeSelection").toInt());
+ }
+ if (settings.contains("themeSelection")) {
+ ui->themeSelection->setCurrentIndex(settings.value("themeSelection").toInt());
+ }
+ settings.endGroup();
}
DiveLogExportDialog::~DiveLogExportDialog()
@@ -102,6 +115,13 @@ void DiveLogExportDialog::exportHtmlInit(QString filename)
void DiveLogExportDialog::exportHTMLsettings(QString filename)
{
+ QSettings settings;
+ settings.beginGroup("HTML");
+ settings.setValue("fontSelection", ui->fontSelection->currentIndex());
+ settings.setValue("fontSizeSelection", ui->fontSizeSelection->currentIndex());
+ settings.setValue("themeSelection", ui->themeSelection->currentIndex());
+ settings.endGroup();
+
QString fontSize = ui->fontSizeSelection->currentText();
QString fontFamily = ui->fontSelection->itemData(ui->fontSelection->currentIndex()).toString();
QFile file(filename);
diff --git a/qt-ui/divelogexportdialog.ui b/qt-ui/divelogexportdialog.ui
index 53be92cf0..5506d7a03 100644
--- a/qt-ui/divelogexportdialog.ui
+++ b/qt-ui/divelogexportdialog.ui
@@ -243,13 +243,6 @@
<enum>Qt::Vertical</enum>
</property>
</widget>
- <zorder>exportSelection</zorder>
- <zorder>exportFormat</zorder>
- <zorder>description</zorder>
- <zorder>line</zorder>
- <zorder>line_3</zorder>
- <zorder>exportAll</zorder>
- <zorder>exportSelected</zorder>
</widget>
<widget class="QWidget" name="HTML_tab">
<attribute name="title">
@@ -378,6 +371,9 @@
</item>
<item>
<widget class="QComboBox" name="themeSelection">
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
<item>
<property name="text">
<string>Light</string>
@@ -451,7 +447,7 @@
</item>
</layout>
</widget>
- <widget class="QWidget" name="">
+ <widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>250</x>