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
c73d4ac1
Commit
c73d4ac1
authored
1 year ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
new class GroupBox
parent
e5480983
No related branches found
No related tags found
1 merge request
!2058
GUI instrument editor: detector section made more compact
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
GUI/View/Instrument/DetectorEditor.cpp
+17
-10
17 additions, 10 deletions
GUI/View/Instrument/DetectorEditor.cpp
with
17 additions
and
10 deletions
GUI/View/Instrument/DetectorEditor.cpp
+
17
−
10
View file @
c73d4ac1
...
...
@@ -26,16 +26,23 @@
#include
"GUI/Support/Style/ApplicationSettings.h"
#include
<QLabel>
void
installGroup
(
QGroupBox
*
g
roupBox
)
class
GroupBox
:
public
QG
roupBox
{
auto
*
label
=
new
QLabel
(
groupBox
);
public:
GroupBox
(
const
QString
&
title
,
QLayout
*
content_layout
,
QWidget
*
parent
);
};
GroupBox
::
GroupBox
(
const
QString
&
title
,
QLayout
*
content_layout
,
QWidget
*
parent
)
:
QGroupBox
(
parent
)
{
auto
*
label
=
new
QLabel
(
this
);
label
->
setObjectName
(
"GroupBoxToggler"
);
label
->
setText
(
groupBox
->
title
()
);
label
->
setText
(
title
);
label
->
setSizePolicy
(
QSizePolicy
::
Minimum
,
QSizePolicy
::
MinimumExpanding
);
auto
*
contentArea
=
new
QWidget
(
groupBox
);
auto
*
contentArea
=
new
QWidget
(
this
);
contentArea
->
setObjectName
(
"ContentArea"
);
contentArea
->
setLayout
(
groupBox
->
layout
()
);
contentArea
->
setLayout
(
content_
layout
);
auto
*
mainLayout
=
new
QVBoxLayout
;
mainLayout
->
setSpacing
(
0
);
...
...
@@ -43,10 +50,11 @@ void installGroup(QGroupBox* groupBox)
mainLayout
->
setMenuBar
(
label
);
mainLayout
->
addWidget
(
contentArea
);
groupBox
->
setTitle
(
""
);
// title has been read above
groupBox
->
setLayout
(
mainLayout
);
// overwrites layout that has been read above
setTitle
(
""
);
// title has been read above
setLayout
(
mainLayout
);
// overwrites layout that has been read above
}
DetectorEditor
::
DetectorEditor
(
QWidget
*
parent
,
GISASInstrumentItem
*
instrItem
)
:
QGroupBox
(
"Detector parameters"
,
parent
)
{
...
...
@@ -68,8 +76,8 @@ DetectorEditor::DetectorEditor(QWidget* parent, GISASInstrumentItem* instrItem)
grid
->
setColumnStretch
(
2
,
1
);
// -- x-axis controls
auto
*
xAxis
GroupBox
=
new
QGroupBox
(
"X axis"
,
this
)
;
auto
*
xAxis
FormLayout
=
new
QFormLayout
(
xAxisGroupBox
);
auto
*
xAxis
FormLayout
=
new
QFormLayout
;
auto
*
xAxis
GroupBox
=
new
GroupBox
(
"X axis"
,
xAxisFormLayout
,
this
);
auto
*
xAxisNbinsSpinBox
=
new
SafeSpinBox
;
xAxisNbinsSpinBox
->
setRange
(
1
,
65536
);
...
...
@@ -91,7 +99,6 @@ DetectorEditor::DetectorEditor(QWidget* parent, GISASInstrumentItem* instrItem)
emit
dataChanged
();
});
grid
->
addWidget
(
xAxisGroupBox
,
1
,
0
);
installGroup
(
xAxisGroupBox
);
// -- y-axis controls
...
...
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