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
b8c74447
Commit
b8c74447
authored
3 years ago
by
t.knopff
Browse files
Options
Downloads
Patches
Plain Diff
Make FullSpheroidItem::P_* private
parent
c8d20be8
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
+10
-0
10 additions, 0 deletions
GUI/Models/FormFactorItems.cpp
GUI/Models/FormFactorItems.h
+5
-1
5 additions, 1 deletion
GUI/Models/FormFactorItems.h
GUI/Models/GUIDomainSampleVisitor.cpp
+3
-3
3 additions, 3 deletions
GUI/Models/GUIDomainSampleVisitor.cpp
with
18 additions
and
4 deletions
GUI/Models/FormFactorItems.cpp
+
10
−
0
View file @
b8c74447
...
...
@@ -454,6 +454,16 @@ std::unique_ptr<IFormFactor> FullSpheroidItem::createFormFactor() const
getItemValue
(
P_HEIGHT
).
toDouble
());
}
void
FullSpheroidItem
::
setRadius
(
const
double
radius
)
{
setItemValue
(
P_RADIUS
,
radius
);
}
void
FullSpheroidItem
::
setHeight
(
const
double
height
)
{
setItemValue
(
P_HEIGHT
,
height
);
}
/* ------------------------------------------------ */
const
QString
HemiEllipsoidItem
::
P_RADIUS_X
(
"RadiusX"
);
...
...
This diff is collapsed.
Click to expand it.
GUI/Models/FormFactorItems.h
+
5
−
1
View file @
b8c74447
...
...
@@ -213,14 +213,18 @@ public:
};
class
BA_CORE_API_
FullSpheroidItem
:
public
FormFactorItem
{
p
ublic
:
p
rivate
:
static
const
QString
P_RADIUS
;
static
const
QString
P_HEIGHT
;
public:
static
const
QString
M_TYPE
;
FullSpheroidItem
();
std
::
unique_ptr
<
IFormFactor
>
createFormFactor
()
const
override
;
void
setRadius
(
double
radius
);
void
setHeight
(
double
height
);
};
class
BA_CORE_API_
HemiEllipsoidItem
:
public
FormFactorItem
{
...
...
This diff is collapsed.
Click to expand it.
GUI/Models/GUIDomainSampleVisitor.cpp
+
3
−
3
View file @
b8c74447
...
...
@@ -283,9 +283,9 @@ void GUIDomainSampleVisitor::visit(const FormFactorFullSphere* sample)
void
GUIDomainSampleVisitor
::
visit
(
const
FormFactorFullSpheroid
*
sample
)
{
SessionItem
*
particle_item
=
m_levelToParentItem
[
depth
()
-
1
];
Session
Item
*
ff_item
=
AddFormFactorItem
<
FullSpheroidItem
>
(
particle_item
);
ff_item
->
set
ItemValue
(
FullSpheroidItem
::
P_RADIUS
,
sample
->
getRadius
());
ff_item
->
set
ItemValue
(
FullSpheroidItem
::
P_HEIGHT
,
sample
->
getHeight
());
FullSpheroid
Item
*
ff_item
=
AddFormFactorItem
<
FullSpheroidItem
>
(
particle_item
);
ff_item
->
set
Radius
(
sample
->
getRadius
());
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