Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
1873bca4
Commit
1873bca4
authored
1 year ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
connect collapser in GroupBoxCollapser::installIntoGroupBox2
parent
5f9d546f
No related branches found
No related tags found
1 merge request
!2059
Move code in GUI/View; expose "expand" bit w/o getter and setter; let GroupBoxCollapser take care of boilerplate set and connect statements
Pipeline
#117493
failed
1 year ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
GUI/View/Instrument/DetectorEditor.cpp
+1
-4
1 addition, 4 deletions
GUI/View/Instrument/DetectorEditor.cpp
GUI/View/Widget/GroupBoxes.cpp
+8
-0
8 additions, 0 deletions
GUI/View/Widget/GroupBoxes.cpp
GUI/View/Widget/GroupBoxes.h
+1
-0
1 addition, 0 deletions
GUI/View/Widget/GroupBoxes.h
with
10 additions
and
4 deletions
GUI/View/Instrument/DetectorEditor.cpp
+
1
−
4
View file @
1873bca4
...
@@ -54,10 +54,7 @@ DetectorEditor::DetectorEditor(QWidget* parent, GISASInstrumentItem* instrItem)
...
@@ -54,10 +54,7 @@ DetectorEditor::DetectorEditor(QWidget* parent, GISASInstrumentItem* instrItem)
auto
*
formLayout
=
new
QFormLayout
(
this
);
auto
*
formLayout
=
new
QFormLayout
(
this
);
auto
*
collapser
=
GroupBoxCollapser
::
installIntoGroupBox
(
this
);
GroupBoxCollapser
::
installIntoGroupBox2
(
this
,
instrItem
->
expandDetector
);
collapser
->
setExpanded
(
instrItem
->
expandDetector
);
connect
(
collapser
,
&
GroupBoxCollapser
::
toggled
,
this
,
[
instrItem
](
bool
b
)
{
instrItem
->
expandDetector
=
b
;
});
DetectorItem
*
detectorItem
=
instrItem
->
detectorItem
();
DetectorItem
*
detectorItem
=
instrItem
->
detectorItem
();
ASSERT
(
detectorItem
);
ASSERT
(
detectorItem
);
...
...
This diff is collapsed.
Click to expand it.
GUI/View/Widget/GroupBoxes.cpp
+
8
−
0
View file @
1873bca4
...
@@ -64,6 +64,14 @@ GroupBoxCollapser* GroupBoxCollapser::installIntoGroupBox(QGroupBox* groupBox, b
...
@@ -64,6 +64,14 @@ GroupBoxCollapser* GroupBoxCollapser::installIntoGroupBox(QGroupBox* groupBox, b
return
p
;
return
p
;
}
}
GroupBoxCollapser
*
GroupBoxCollapser
::
installIntoGroupBox2
(
QGroupBox
*
groupBox
,
bool
&
expanded
)
{
auto
*
result
=
new
GroupBoxCollapser
(
groupBox
);
result
->
setExpanded
(
expanded
);
connect
(
result
,
&
GroupBoxCollapser
::
toggled
,
[
&
expanded
](
bool
b
)
{
expanded
=
b
;
});
return
result
;
}
GroupBoxCollapser
*
GroupBoxCollapser
::
findInstalledCollapser
(
QGroupBox
*
groupBox
)
GroupBoxCollapser
*
GroupBoxCollapser
::
findInstalledCollapser
(
QGroupBox
*
groupBox
)
{
{
if
(
groupBox
==
nullptr
)
if
(
groupBox
==
nullptr
)
...
...
This diff is collapsed.
Click to expand it.
GUI/View/Widget/GroupBoxes.h
+
1
−
0
View file @
1873bca4
...
@@ -43,6 +43,7 @@ class GroupBoxCollapser : public QObject {
...
@@ -43,6 +43,7 @@ class GroupBoxCollapser : public QObject {
Q_OBJECT
Q_OBJECT
public:
public:
static
GroupBoxCollapser
*
installIntoGroupBox
(
QGroupBox
*
groupBox
,
bool
expanded
=
true
);
static
GroupBoxCollapser
*
installIntoGroupBox
(
QGroupBox
*
groupBox
,
bool
expanded
=
true
);
static
GroupBoxCollapser
*
installIntoGroupBox2
(
QGroupBox
*
groupBox
,
bool
&
expanded
);
static
GroupBoxCollapser
*
findInstalledCollapser
(
QGroupBox
*
groupBox
);
static
GroupBoxCollapser
*
findInstalledCollapser
(
QGroupBox
*
groupBox
);
//! Set the title of the group box. Do not use the method groupBox->setTitle() any more once the
//! Set the title of the group box. Do not use the method groupBox->setTitle() any more once the
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment