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
f1a8a45a
Commit
f1a8a45a
authored
1 year ago
by
Mikhail Svechnikov
Browse files
Options
Downloads
Patches
Plain Diff
suppress warning
parent
7d0d03c3
No related branches found
No related tags found
1 merge request
!2040
Suppress Qt warning when changing detector alignment (#714)
Pipeline
#115405
passed
1 year ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
GUI/View/Device/DetectorAlignmentForm.cpp
+19
-18
19 additions, 18 deletions
GUI/View/Device/DetectorAlignmentForm.cpp
with
19 additions
and
18 deletions
GUI/View/Device/DetectorAlignmentForm.cpp
+
19
−
18
View file @
f1a8a45a
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
#include
"GUI/View/Device/DetectorAlignmentForm.h"
#include
"GUI/View/Device/DetectorAlignmentForm.h"
#include
"GUI/Model/Detector/DetectorItem.h"
#include
"GUI/Model/Detector/DetectorItem.h"
#include
"GUI/Support/Tool/LayoutUtil.h"
#include
"GUI/View/Numeric/ComboUtil.h"
#include
"GUI/View/Numeric/ComboUtil.h"
#include
"GUI/View/Numeric/DoubleSpinBox.h"
#include
"GUI/View/Numeric/DoubleSpinBox.h"
#include
"GUI/View/Numeric/NumWidgetUtil.h"
#include
"GUI/View/Numeric/NumWidgetUtil.h"
...
@@ -41,17 +42,22 @@ DetectorAlignmentForm::DetectorAlignmentForm(QWidget* parent, DetectorItem* item
...
@@ -41,17 +42,22 @@ DetectorAlignmentForm::DetectorAlignmentForm(QWidget* parent, DetectorItem* item
,
m_item
(
item
)
,
m_item
(
item
)
{
{
ASSERT
(
m_item
);
ASSERT
(
m_item
);
m_formLayout
=
new
QFormLayout
(
this
);
QFormLayout
*
mainLayout
=
new
QFormLayout
(
this
);
m_formLayout
->
setContentsMargins
(
0
,
15
,
0
,
0
);
mainLayout
->
setContentsMargins
(
0
,
15
,
0
,
0
);
m_formLayout
->
setSpacing
(
8
);
mainLayout
->
setSpacing
(
8
);
m_formLayout
->
addRow
(
"Alignment:"
,
GUI
::
Util
::
createSafeComboBox
(
mainLayout
->
addRow
(
"Alignment:"
,
GUI
::
Util
::
createSafeComboBox
(
[
item
]
{
return
item
->
detectorAlignmentCombo
();
},
[
item
]
{
return
item
->
detectorAlignmentCombo
();
},
[
this
,
item
](
const
QString
&
t
)
{
[
this
,
item
](
const
QString
&
t
)
{
item
->
setDetectorAlignment
(
t
);
item
->
setDetectorAlignment
(
t
);
createAligmentWidgets
();
createAligmentWidgets
();
emit
dataChanged
();
emit
dataChanged
();
}));
}));
m_formLayout
=
new
QFormLayout
;
m_formLayout
->
setFieldGrowthPolicy
(
QFormLayout
::
FieldsStayAtSizeHint
);
m_formLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
mainLayout
->
addRow
(
m_formLayout
);
createAligmentWidgets
();
createAligmentWidgets
();
}
}
...
@@ -101,18 +107,13 @@ void DetectorAlignmentForm::addVector(QFormLayout* parentLayout, VectorProperty&
...
@@ -101,18 +107,13 @@ void DetectorAlignmentForm::addVector(QFormLayout* parentLayout, VectorProperty&
void
DetectorAlignmentForm
::
createAligmentWidgets
()
void
DetectorAlignmentForm
::
createAligmentWidgets
()
{
{
while
(
m_formLayout
->
rowCount
()
>
1
)
GUI
::
Util
::
Layout
::
clearLayout
(
m_formLayout
);
m_formLayout
->
removeRow
(
1
);
const
QString
descr
=
alignmentDescription
(
m_item
->
detectorAlignment
());
const
QString
descr
=
alignmentDescription
(
m_item
->
detectorAlignment
());
auto
*
layout
=
new
QFormLayout
;
layout
->
setFieldGrowthPolicy
(
QFormLayout
::
FieldsStayAtSizeHint
);
layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
m_formLayout
->
addRow
(
""
,
layout
);
auto
*
layoutUVD
=
new
QFormLayout
;
auto
*
layoutUVD
=
new
QFormLayout
;
createSpinBox
(
layoutUVD
,
m_item
->
u0
());
createSpinBox
(
layoutUVD
,
m_item
->
u0
());
createSpinBox
(
layoutUVD
,
m_item
->
v0
());
createSpinBox
(
layoutUVD
,
m_item
->
v0
());
createSpinBox
(
layoutUVD
,
m_item
->
distance
());
createSpinBox
(
layoutUVD
,
m_item
->
distance
());
l
ayout
->
addRow
(
descr
+
":"
,
layoutUVD
);
m_formL
ayout
->
addRow
(
descr
+
":"
,
layoutUVD
);
}
}
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