Start: add option to show only FCStd files to the preferences dialog

This commit is contained in:
Furgo
2025-03-02 07:39:55 +01:00
parent 779e1efa55
commit cf2e0e06b9
2 changed files with 41 additions and 13 deletions

View File

@@ -20,6 +20,20 @@
<string>Contents</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="2" column="0">
<widget class="QLabel" name="labelShowOnlyFCStd">
<property name="text">
<string>Show only FreeCAD files in additional folder</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Show examples folder contents</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelCustomFolder">
<property name="text">
@@ -27,6 +41,22 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="Gui::PrefFileChooser" name="fileChooserCustomFolder" native="true">
<property name="toolTip">
<string>An optional custom folder to be displayed on the Start page.</string>
</property>
<property name="mode">
<enum>Gui::FileChooser::Directory</enum>
</property>
<property name="prefEntry" stdset="0">
<cstring>CustomFolder</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Start</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="Gui::PrefCheckBox" name="checkBoxShowExamples">
<property name="toolTip">
@@ -49,29 +79,25 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="Gui::PrefFileChooser" name="fileChooserCustomFolder" native="true">
<item row="2" column="1">
<widget class="Gui::PrefCheckBox" name="checkBoxShowOnlyFCStd">
<property name="toolTip">
<string>An optional custom folder to be displayed on the Start page.</string>
<string>If the additional folder contents should include only .FCStd files</string>
</property>
<property name="mode">
<enum>Gui::FileChooser::Directory</enum>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string/>
</property>
<property name="prefEntry" stdset="0">
<cstring>CustomFolder</cstring>
<cstring>ShowOnlyFCStd</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Start</cstring>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Show examples folder contents</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>

View File

@@ -53,6 +53,7 @@ void DlgStartPreferencesImp::saveSettings()
ui->fileChooserCustomFolder->onSave();
ui->checkBoxShowExamples->onSave();
ui->checkBoxCloseAfterLoading->onSave();
ui->checkBoxShowOnlyFCStd->onSave();
}
void DlgStartPreferencesImp::loadSettings()
@@ -60,6 +61,7 @@ void DlgStartPreferencesImp::loadSettings()
ui->fileChooserCustomFolder->onRestore();
ui->checkBoxShowExamples->onRestore();
ui->checkBoxCloseAfterLoading->onRestore();
ui->checkBoxShowOnlyFCStd->onRestore();
}
/**