Skip to content
Snippets Groups Projects
Commit 09c2e344 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

GroupBoxCollapser::installIntoGroupBox2 used for bg form

parent 94c74e71
No related branches found
No related tags found
1 merge request!2062simplify code for collapsible groupboxes; make instrument view more compact
...@@ -104,9 +104,6 @@ public: ...@@ -104,9 +104,6 @@ public:
bool isExpandPolarizerAlanyzer() const { return expandPolarizerAlanyzer; } bool isExpandPolarizerAlanyzer() const { return expandPolarizerAlanyzer; }
void setExpandPolarizerAlanyzer(bool b) { expandPolarizerAlanyzer = b; } void setExpandPolarizerAlanyzer(bool b) { expandPolarizerAlanyzer = b; }
bool isExpandEnvironment() const { return expandEnvironment; }
void setExpandEnvironment(bool b) { expandEnvironment = b; }
protected: protected:
explicit InstrumentItem(const QString& modelType); explicit InstrumentItem(const QString& modelType);
......
...@@ -37,10 +37,7 @@ BackgroundForm::BackgroundForm(QWidget* parent, InstrumentItem* instrument) ...@@ -37,10 +37,7 @@ BackgroundForm::BackgroundForm(QWidget* parent, InstrumentItem* instrument)
m_formLayout->addRow("Background type:", backgroundTypeCombo); m_formLayout->addRow("Background type:", backgroundTypeCombo);
createBackgroundWidgets(); createBackgroundWidgets();
auto* collapser = GroupBoxCollapser::installIntoGroupBox(this); GroupBoxCollapser::installIntoGroupBox2(this, instrument->expandEnvironment);
collapser->setExpanded(instrument->isExpandEnvironment());
connect(collapser, &GroupBoxCollapser::toggled, this,
[instrument](bool b) { instrument->setExpandEnvironment(b); });
} }
void BackgroundForm::createBackgroundWidgets() void BackgroundForm::createBackgroundWidgets()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment