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
1c255f25
Commit
1c255f25
authored
8 months ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
SpanProperty w/o 'init' fct
parent
b5dafb2c
No related branches found
No related tags found
1 merge request
!2637
rename form-related classes; simplify span property construction
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
GUI/Model/Descriptor/SpanProperty.cpp
+6
-11
6 additions, 11 deletions
GUI/Model/Descriptor/SpanProperty.cpp
GUI/Model/Descriptor/SpanProperty.h
+4
-6
4 additions, 6 deletions
GUI/Model/Descriptor/SpanProperty.h
GUI/Model/Detector/DetectorItem.cpp
+6
-11
6 additions, 11 deletions
GUI/Model/Detector/DetectorItem.cpp
with
16 additions
and
28 deletions
GUI/Model/Descriptor/SpanProperty.cpp
+
6
−
11
View file @
1c255f25
...
...
@@ -28,18 +28,13 @@ const QString ExpandGroupbox("ExpandGroupbox"); // from AxisProperty pre v22
}
// namespace Tag
}
// namespace
SpanProperty
::
SpanProperty
()
=
default
;
void
SpanProperty
::
initWidth
(
const
QString
&
label
,
const
QString
&
tooltip
,
double
value
,
const
RealLimits
&
limits
,
uint
decimals
)
{
m_width
.
init
(
label
,
tooltip
,
value
,
decimals
,
limits
,
"width"
);
}
void
SpanProperty
::
initCenter
(
const
QString
&
label
,
const
QString
&
tooltip
,
double
value
,
const
RealLimits
&
limits
,
uint
decimals
)
SpanProperty
::
SpanProperty
(
const
QString
&
width_label
,
const
QString
&
width_tooltip
,
double
width_value
,
const
RealLimits
&
width_limits
,
const
QString
&
center_label
,
const
QString
&
center_tooltip
,
double
center_value
,
const
RealLimits
&
center_limits
)
{
m_center
.
init
(
label
,
tooltip
,
value
,
decimals
,
limits
,
"center"
);
m_width
.
init
(
width_label
,
width_tooltip
,
width_value
,
3
,
width_limits
,
"width"
);
m_center
.
init
(
center_label
,
center_tooltip
,
center_value
,
3
,
center_limits
,
"center"
);
}
void
SpanProperty
::
writeTo
(
QXmlStreamWriter
*
w
)
const
...
...
This diff is collapsed.
Click to expand it.
GUI/Model/Descriptor/SpanProperty.h
+
4
−
6
View file @
1c255f25
...
...
@@ -27,7 +27,10 @@
class
SpanProperty
{
public:
SpanProperty
();
SpanProperty
(
const
QString
&
width_label
,
const
QString
&
width_tooltip
,
double
width_value
,
const
RealLimits
&
width_limits
,
const
QString
&
center_label
,
const
QString
&
center_tooltip
,
double
center_value
,
const
RealLimits
&
center_limits
);
DoubleProperty
&
width
()
{
return
m_width
;
}
const
DoubleProperty
&
width
()
const
{
return
m_width
;
}
...
...
@@ -37,11 +40,6 @@ public:
const
DoubleProperty
&
center
()
const
{
return
m_center
;
}
void
setCenter
(
double
v
)
{
m_center
.
setValue
(
v
);
}
void
initWidth
(
const
QString
&
label
,
const
QString
&
tooltip
,
double
value
,
const
RealLimits
&
limits
,
uint
decimals
=
3
);
void
initCenter
(
const
QString
&
label
,
const
QString
&
tooltip
,
double
value
,
const
RealLimits
&
limits
,
uint
decimals
=
3
);
uint
nbins
()
const
{
return
m_nbins
;
}
void
setNbins
(
uint
v
)
{
m_nbins
=
v
;
}
...
...
This diff is collapsed.
Click to expand it.
GUI/Model/Detector/DetectorItem.cpp
+
6
−
11
View file @
1c255f25
...
...
@@ -38,19 +38,14 @@ const QString ProjectionContainer("ProjectionContainer");
DetectorItem
::
DetectorItem
()
:
m_masks
(
std
::
make_unique
<
MasksSet
>
())
:
m_phi_axis
(
"Span (deg)"
,
"Full width in phi direction"
,
4.0
,
RealLimits
::
limited
(
0
,
180
),
"Center (deg)"
,
"Angle phi of detector center"
,
0.
,
RealLimits
::
limited
(
-
90
,
90
))
,
m_alpha_axis
(
"Span (deg)"
,
"Full width in alpha direction"
,
4.0
,
RealLimits
::
limited
(
0
,
180
),
"Center (deg)"
,
"Angle alpha of detector center"
,
0.
,
RealLimits
::
limited
(
-
90
,
90
))
,
m_masks
(
std
::
make_unique
<
MasksSet
>
())
,
m_prjns
(
std
::
make_unique
<
MasksSet
>
())
{
m_phi_axis
.
initWidth
(
"Span (deg)"
,
"Full width in phi direction"
,
4.0
,
RealLimits
::
limited
(
0
,
180
));
m_phi_axis
.
initCenter
(
"Center (deg)"
,
"Angle phi of detector center"
,
0.
,
RealLimits
::
limited
(
-
90
,
90
));
m_alpha_axis
.
initWidth
(
"Span (deg)"
,
"Full width in alpha direction"
,
4.0
,
RealLimits
::
limited
(
0
,
180
));
m_alpha_axis
.
initCenter
(
"Center (deg)"
,
"Angle alpha of detector center"
,
0.
,
RealLimits
::
limited
(
-
90
,
90
));
m_resolution_function
.
initWithArgs
(
"Resolution function"
,
"Detector resolution function"
,
ResolutionFunctionItemCatalog
::
Type
::
None
);
}
...
...
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