Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
1de8553b
Commit
1de8553b
authored
Aug 31, 2021
by
Kai Messerschmidt
Browse files
[ADD
parent
0ff7280f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
src/qtgui/WQtModuleConfig.cpp
src/qtgui/WQtModuleConfig.cpp
+9
-3
No files found.
src/qtgui/WQtModuleConfig.cpp
View file @
1de8553b
...
...
@@ -147,10 +147,10 @@ WQtModuleConfig::WQtModuleConfig( QWidget* parent, Qt::WindowFlags f ):
// combobox for black-list presets
m_selectPresetBlacklist
=
new
QComboBox
(
this
);
m_selectPresetBlacklist
->
setInsertPolicy
(
QComboBox
::
InsertAtBottom
);
m_selectPresetBlacklist
->
setToolTip
(
"Select a blacklist preset or create a new one."
);
m_selectPresetBlacklist
->
setFixedSize
(
120
,
26
);
m_selectPresetBlacklist
->
setEditable
(
false
);
m_selectPresetBlacklist
->
setEditable
(
true
);
m_selectPresetBlacklist
->
setInsertPolicy
(
QComboBox
::
InsertAtBottom
);
// read preset names from settings
QSettings
*
settings
=
&
WQtGui
::
getSettings
();
settings
->
beginGroup
(
"qtgui/modules/preset/"
);
...
...
@@ -173,7 +173,7 @@ WQtModuleConfig::WQtModuleConfig( QWidget* parent, Qt::WindowFlags f ):
{
m_selectPresetBlacklist
->
setDisabled
(
false
);
}
connect
(
m_selectPresetBlacklist
,
SIGNAL
(
curren
tTextChanged
(
QString
)
),
this
,
SLOT
(
comboboxItemChanged
(
QString
)
)
);
connect
(
m_selectPresetBlacklist
,
SIGNAL
(
edi
tTextChanged
(
QString
)
),
this
,
SLOT
(
comboboxItemChanged
(
QString
)
)
);
layoutAllowedModules
->
addWidget
(
m_selectPresetBlacklist
);
// create the module list
...
...
@@ -360,6 +360,12 @@ void WQtModuleConfig::saveListToSettings()
WQtGui
::
getSettings
().
setValue
(
"qtgui/modules/usePreset"
,
m_usePreset
->
checkState
()
);
WQtGui
::
getSettings
().
setValue
(
"qtgui/modules/selectedPreset"
,
m_selectPresetBlacklist
->
currentText
()
);
// -1 means, that the preset name is not in the list of presets
if
(
m_selectPresetBlacklist
->
findText
(
m_selectPresetBlacklist
->
currentText
()
)
==
-
1
)
{
WQtGui
::
getSettings
().
setValue
(
"qtgui/modules/preset/"
+
m_selectPresetBlacklist
->
currentText
(),
QString
::
fromStdString
(
allowedAsString
)
);
}
// also write the path list
QList
<
QVariant
>
paths
;
for
(
int
i
=
0
;
i
<
m_pathList
->
count
();
++
i
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment