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
98cfe9db
Commit
98cfe9db
authored
3 years ago
by
t.knopff
Browse files
Options
Downloads
Patches
Plain Diff
Make ParameterItem::P_BACKUP private
parent
fecffe89
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!139
Refactor model: parameter items
Pipeline
#40155
passed
3 years ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
GUI/Models/ParameterTreeItems.cpp
+5
-0
5 additions, 0 deletions
GUI/Models/ParameterTreeItems.cpp
GUI/Models/ParameterTreeItems.h
+2
-2
2 additions, 2 deletions
GUI/Models/ParameterTreeItems.h
GUI/Models/ParameterTreeUtils.cpp
+1
-1
1 addition, 1 deletion
GUI/Models/ParameterTreeUtils.cpp
with
8 additions
and
3 deletions
GUI/Models/ParameterTreeItems.cpp
+
5
−
0
View file @
98cfe9db
...
@@ -77,6 +77,11 @@ void ParameterItem::restoreFromBackup()
...
@@ -77,6 +77,11 @@ void ParameterItem::restoreFromBackup()
propagateValueToLink
(
newValue
);
propagateValueToLink
(
newValue
);
}
}
void
ParameterItem
::
setBackup
(
double
value
)
{
setItemValue
(
P_BACKUP
,
value
);
}
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
const
QString
ParameterContainerItem
::
M_TYPE
=
"Parameter Container"
;
const
QString
ParameterContainerItem
::
M_TYPE
=
"Parameter Container"
;
...
...
This diff is collapsed.
Click to expand it.
GUI/Models/ParameterTreeItems.h
+
2
−
2
View file @
98cfe9db
...
@@ -35,10 +35,9 @@ public:
...
@@ -35,10 +35,9 @@ public:
class
BA_CORE_API_
ParameterItem
:
public
SessionItem
{
class
BA_CORE_API_
ParameterItem
:
public
SessionItem
{
private:
private:
static
const
QString
P_LINK
;
static
const
QString
P_LINK
;
public:
static
const
QString
P_BACKUP
;
static
const
QString
P_BACKUP
;
public:
static
const
QString
M_TYPE
;
static
const
QString
M_TYPE
;
ParameterItem
();
ParameterItem
();
...
@@ -48,6 +47,7 @@ public:
...
@@ -48,6 +47,7 @@ public:
void
setLink
(
const
QString
&
link
);
void
setLink
(
const
QString
&
link
);
void
restoreFromBackup
();
void
restoreFromBackup
();
void
setBackup
(
double
value
);
};
};
//! The ParameterContainerItem is a top item to hold all ParameterItem, represents an entry
//! The ParameterContainerItem is a top item to hold all ParameterItem, represents an entry
...
...
This diff is collapsed.
Click to expand it.
GUI/Models/ParameterTreeUtils.cpp
+
1
−
1
View file @
98cfe9db
...
@@ -46,7 +46,7 @@ void handleItem(SessionItem* tree, const SessionItem* source)
...
@@ -46,7 +46,7 @@ void handleItem(SessionItem* tree, const SessionItem* source)
path
=
path
.
mid
(
firstSlash
+
1
);
path
=
path
.
mid
(
firstSlash
+
1
);
ParameterItem
*
parItem
=
polymorphic_downcast
<
ParameterItem
*>
(
tree
);
ParameterItem
*
parItem
=
polymorphic_downcast
<
ParameterItem
*>
(
tree
);
parItem
->
setLink
(
path
);
parItem
->
setLink
(
path
);
parItem
->
set
ItemValue
(
ParameterItem
::
P_BACKUP
,
sourceValue
);
parItem
->
set
Backup
(
sourceValue
);
return
;
return
;
}
}
...
...
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