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
0336f761
Commit
0336f761
authored
3 years ago
by
t.knopff
Browse files
Options
Downloads
Patches
Plain Diff
Make CosineRippleGaussItem::P_* private
parent
1bbffd47
No related branches found
No related tags found
1 merge request
!159
Refactor model: formfactor items
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
GUI/Models/FormFactorItems.cpp
+15
-0
15 additions, 0 deletions
GUI/Models/FormFactorItems.cpp
GUI/Models/FormFactorItems.h
+6
-1
6 additions, 1 deletion
GUI/Models/FormFactorItems.h
GUI/Models/GUIDomainSampleVisitor.cpp
+4
-4
4 additions, 4 deletions
GUI/Models/GUIDomainSampleVisitor.cpp
with
25 additions
and
5 deletions
GUI/Models/FormFactorItems.cpp
+
15
−
0
View file @
0336f761
...
...
@@ -686,6 +686,21 @@ std::unique_ptr<IFormFactor> CosineRippleGaussItem::createFormFactor() const
getItemValue
(
P_HEIGHT
).
toDouble
());
}
void
CosineRippleGaussItem
::
setLength
(
const
double
length
)
{
setItemValue
(
P_LENGTH
,
length
);
}
void
CosineRippleGaussItem
::
setWidth
(
const
double
width
)
{
setItemValue
(
P_WIDTH
,
width
);
}
void
CosineRippleGaussItem
::
setHeight
(
const
double
height
)
{
setItemValue
(
P_HEIGHT
,
height
);
}
/* ------------------------------------------------ */
const
QString
CosineRippleLorentzItem
::
P_LENGTH
(
"Length"
);
...
...
This diff is collapsed.
Click to expand it.
GUI/Models/FormFactorItems.h
+
6
−
1
View file @
0336f761
...
...
@@ -322,15 +322,20 @@ public:
};
class
BA_CORE_API_
CosineRippleGaussItem
:
public
FormFactorItem
{
p
ublic
:
p
rivate
:
static
const
QString
P_LENGTH
;
static
const
QString
P_WIDTH
;
static
const
QString
P_HEIGHT
;
public:
static
const
QString
M_TYPE
;
CosineRippleGaussItem
();
std
::
unique_ptr
<
IFormFactor
>
createFormFactor
()
const
override
;
void
setLength
(
double
length
);
void
setWidth
(
double
width
);
void
setHeight
(
double
height
);
};
class
BA_CORE_API_
CosineRippleLorentzItem
:
public
FormFactorItem
{
...
...
This diff is collapsed.
Click to expand it.
GUI/Models/GUIDomainSampleVisitor.cpp
+
4
−
4
View file @
0336f761
...
...
@@ -348,10 +348,10 @@ void GUIDomainSampleVisitor::visit(const FormFactorCosineRippleBox* sample)
void
GUIDomainSampleVisitor
::
visit
(
const
FormFactorCosineRippleGauss
*
sample
)
{
SessionItem
*
particle_item
=
m_levelToParentItem
[
depth
()
-
1
];
Session
Item
*
ff_item
=
AddFormFactorItem
<
CosineRippleGaussItem
>
(
particle_item
);
ff_item
->
set
ItemValue
(
CosineRippleGaussItem
::
P_LENGTH
,
sample
->
getLength
());
ff_item
->
set
ItemValue
(
CosineRippleGaussItem
::
P_WIDTH
,
sample
->
getWidth
());
ff_item
->
set
ItemValue
(
CosineRippleGaussItem
::
P_HEIGHT
,
sample
->
getHeight
());
CosineRippleGauss
Item
*
ff_item
=
AddFormFactorItem
<
CosineRippleGaussItem
>
(
particle_item
);
ff_item
->
set
Length
(
sample
->
getLength
());
ff_item
->
set
Width
(
sample
->
getWidth
());
ff_item
->
set
Height
(
sample
->
getHeight
());
m_levelToParentItem
[
depth
()]
=
particle_item
;
}
...
...
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