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
8875ddb7
Commit
8875ddb7
authored
8 months ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
rm 2 more uses of initWithInitializer
parent
b62e8e5b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2686
rm fct PolyItem::initWithInitializer and member PolyItem::m_initializer
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
GUI/Model/Beam/BeamAngleItems.cpp
+1
-10
1 addition, 10 deletions
GUI/Model/Beam/BeamAngleItems.cpp
GUI/Model/Beam/BeamAngleItems.h
+0
-4
0 additions, 4 deletions
GUI/Model/Beam/BeamAngleItems.h
GUI/Model/Beam/GrazingScanItem.cpp
+1
-10
1 addition, 10 deletions
GUI/Model/Beam/GrazingScanItem.cpp
with
2 additions
and
24 deletions
GUI/Model/Beam/BeamAngleItems.cpp
+
1
−
10
View file @
8875ddb7
...
@@ -41,8 +41,7 @@ double BeamAzimuthalAngleItem::scaleFactor() const
...
@@ -41,8 +41,7 @@ double BeamAzimuthalAngleItem::scaleFactor() const
BeamInclinationAngleItem
::
BeamInclinationAngleItem
()
BeamInclinationAngleItem
::
BeamInclinationAngleItem
()
{
{
m_distribution
.
initWithInitializer
(
"Distribution"
,
""
,
DistributionCatalog
::
types
(),
m_distribution
.
simpleInit
(
"Distribution"
,
""
,
DistributionCatalog
::
Type
::
None
);
initDistribution
);
}
}
void
BeamInclinationAngleItem
::
readFrom
(
QXmlStreamReader
*
r
)
void
BeamInclinationAngleItem
::
readFrom
(
QXmlStreamReader
*
r
)
...
@@ -59,11 +58,3 @@ double BeamInclinationAngleItem::scaleFactor() const
...
@@ -59,11 +58,3 @@ double BeamInclinationAngleItem::scaleFactor() const
{
{
return
Units
::
deg
;
return
Units
::
deg
;
}
}
void
BeamInclinationAngleItem
::
initDistribution
(
DistributionItem
*
new_distribution
,
const
DistributionItem
*
old_distribution
)
{
ASSERT
(
new_distribution
);
new_distribution
->
center
().
setDVal
(
old_distribution
?
old_distribution
->
center
().
dVal
()
:
0.2
);
new_distribution
->
center
().
setDecimals
(
3
);
}
This diff is collapsed.
Click to expand it.
GUI/Model/Beam/BeamAngleItems.h
+
0
−
4
View file @
8875ddb7
...
@@ -35,10 +35,6 @@ public:
...
@@ -35,10 +35,6 @@ public:
double
inclinationAngle
()
const
;
double
inclinationAngle
()
const
;
double
scaleFactor
()
const
override
;
double
scaleFactor
()
const
override
;
private:
static
void
initDistribution
(
DistributionItem
*
newDistribution
,
const
DistributionItem
*
currentDistribution
);
};
};
#endif // BORNAGAIN_GUI_MODEL_BEAM_BEAMANGLEITEMS_H
#endif // BORNAGAIN_GUI_MODEL_BEAM_BEAMANGLEITEMS_H
This diff is collapsed.
Click to expand it.
GUI/Model/Beam/GrazingScanItem.cpp
+
1
−
10
View file @
8875ddb7
...
@@ -44,14 +44,6 @@ void setAxisPresentationDefaults(BasicAxisItem* axisItem)
...
@@ -44,14 +44,6 @@ void setAxisPresentationDefaults(BasicAxisItem* axisItem)
axisItem
->
resize
(
500
);
axisItem
->
resize
(
500
);
}
}
void
initDistribution
(
DistributionItem
*
new_distribution
,
const
DistributionItem
*
old_distribution
)
{
ASSERT
(
new_distribution
);
new_distribution
->
center
().
setDVal
(
old_distribution
?
old_distribution
->
center
().
dVal
()
:
0.
);
new_distribution
->
center
().
setDecimals
(
4
);
new_distribution
->
center
().
setLimits
(
RealLimits
::
positive
());
};
}
// namespace
}
// namespace
...
@@ -59,8 +51,7 @@ GrazingScanItem::GrazingScanItem()
...
@@ -59,8 +51,7 @@ GrazingScanItem::GrazingScanItem()
:
BeamDistributionItem
()
:
BeamDistributionItem
()
,
m_current_axis_is_uniform_axis
(
true
)
,
m_current_axis_is_uniform_axis
(
true
)
{
{
m_distribution
.
initWithInitializer
(
"Distribution"
,
""
,
DistributionCatalog
::
types
(),
m_distribution
.
simpleInit
(
"Distribution"
,
""
,
DistributionCatalog
::
Type
::
None
);
initDistribution
);
m_uniform_alpha_axis
=
std
::
make_unique
<
BasicAxisItem
>
();
m_uniform_alpha_axis
=
std
::
make_unique
<
BasicAxisItem
>
();
setAxisPresentationDefaults
(
m_uniform_alpha_axis
.
get
());
setAxisPresentationDefaults
(
m_uniform_alpha_axis
.
get
());
...
...
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