Gui: [skip ci] added thumbnail size to UI

Added a spinbox for the thumbnail-size to the document preference.
This commit is contained in:
M G Berberich
2020-03-19 22:18:40 +01:00
committed by wmayer
parent 0e8c23257b
commit 7e9c20c949
2 changed files with 75 additions and 20 deletions

View File

@@ -356,7 +356,79 @@ automatically run a file recovery when it is started.</string>
</property>
</widget>
</item>
<item row="6" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>Size of thumbnail</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Maximum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>91</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="Gui::PrefSpinBox" name="prefThumbnailSize">
<property name="toolTip">
<string>Sets the size of the thumbnail that is stored in the document.
Common sizes are 128, 256 and 512</string>
</property>
<property name="minimum">
<number>64</number>
</property>
<property name="maximum">
<number>512</number>
</property>
<property name="prefEntry" stdset="0">
<cstring>ThumbnailSize</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Document</cstring>
</property>
</widget>
</item>
</layout>
</item>
<item row="7" column="0">
<widget class="Gui::PrefCheckBox" name="prefAddLogo">
<property name="toolTip">
<string>The program logo will be added to the thumbnail</string>
</property>
<property name="text">
<string>Add the program logo to the generated thumbnail</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="prefEntry" stdset="0">
<cstring>AddThumbnailLogo</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Document</cstring>
</property>
</widget>
</item>
<item row="8" column="0">
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
@@ -423,7 +495,7 @@ automatically run a file recovery when it is started.</string>
</item>
</layout>
</item>
<item row="8" column="0">
<item row="9" column="0">
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
@@ -479,25 +551,6 @@ get date suffix according to the specified format</string>
</item>
</layout>
</item>
<item row="6" column="0">
<widget class="Gui::PrefCheckBox" name="prefAddLogo">
<property name="toolTip">
<string>The program logo will be added to the thumbnail</string>
</property>
<property name="text">
<string>Add the program logo to the generated thumbnail</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="prefEntry" stdset="0">
<cstring>AddThumbnailLogo</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Document</cstring>
</property>
</widget>
</item>
</layout>
</widget>
</item>

View File

@@ -77,6 +77,7 @@ void DlgSettingsDocumentImp::saveSettings()
ui->prefSaveTransaction->onSave();
ui->prefDiscardTransaction->onSave();
ui->prefSaveThumbnail->onSave();
ui->prefThumbnailSize->onSave();
ui->prefAddLogo->onSave();
ui->prefSaveBackupFiles->onSave();
ui->prefCountBackupFiles->onSave();
@@ -110,6 +111,7 @@ void DlgSettingsDocumentImp::loadSettings()
ui->prefSaveTransaction->onRestore();
ui->prefDiscardTransaction->onRestore();
ui->prefSaveThumbnail->onRestore();
ui->prefThumbnailSize->onRestore();
ui->prefAddLogo->onRestore();
ui->prefSaveBackupFiles->onRestore();
ui->prefCountBackupFiles->onRestore();