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
983ce000
Commit
983ce000
authored
3 years ago
by
t.knopff
Browse files
Options
Downloads
Patches
Plain Diff
Make JobItem::P_PRESENTATION_TYPE private
parent
82422578
No related branches found
No related tags found
1 merge request
!99
Refactor model: JobItem
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
GUI/Models/JobItem.cpp
+10
-0
10 additions, 0 deletions
GUI/Models/JobItem.cpp
GUI/Models/JobItem.h
+4
-1
4 additions, 1 deletion
GUI/Models/JobItem.h
GUI/Views/JobWidgets/JobResultsPresenter.cpp
+3
-3
3 additions, 3 deletions
GUI/Views/JobWidgets/JobResultsPresenter.cpp
with
17 additions
and
4 deletions
GUI/Models/JobItem.cpp
+
10
−
0
View file @
983ce000
...
...
@@ -288,6 +288,16 @@ bool JobItem::isCommentsPropertyName(const QString& name)
return
name
==
P_COMMENTS
;
}
const
QString
JobItem
::
presentationType
()
const
{
return
getItemValue
(
P_PRESENTATION_TYPE
).
toString
();
}
void
JobItem
::
setPresentationType
(
const
QString
&
type
)
{
setItemValue
(
P_PRESENTATION_TYPE
,
type
);
}
//! Updates the name of file to store intensity data.
void
JobItem
::
updateIntensityDataFileName
()
...
...
This diff is collapsed.
Click to expand it.
GUI/Models/JobItem.h
+
4
−
1
View file @
983ce000
...
...
@@ -43,9 +43,9 @@ private:
static
const
QString
P_DURATION
;
static
const
QString
P_COMMENTS
;
static
const
QString
P_PROGRESS
;
static
const
QString
P_PRESENTATION_TYPE
;
public:
static
const
QString
P_PRESENTATION_TYPE
;
static
const
QString
T_SAMPLE
;
static
const
QString
T_MATERIAL_CONTAINER
;
static
const
QString
T_INSTRUMENT
;
...
...
@@ -116,6 +116,9 @@ public:
static
bool
isCommentsPropertyName
(
const
QString
&
name
);
const
QString
presentationType
()
const
;
void
setPresentationType
(
const
QString
&
type
);
private:
void
updateIntensityDataFileName
();
const
SimulationOptionsItem
*
simulationOptionsItem
()
const
;
...
...
This diff is collapsed.
Click to expand it.
GUI/Views/JobWidgets/JobResultsPresenter.cpp
+
3
−
3
View file @
983ce000
...
...
@@ -36,8 +36,8 @@ QString JobResultsPresenter::itemPresentation() const
if
(
!
currentItem
())
return
{};
const
auto
&
value
=
currentItem
()
->
getItemValue
(
JobItem
::
P_PRESENTATION_TYPE
);
return
value
.
is
Valid
()
?
value
.
toString
()
:
selectedPresentation
();
const
QString
value
=
dynamic_cast
<
const
JobItem
*>
(
currentItem
()
)
->
presentationType
(
);
return
value
.
is
Empty
()
?
selectedPresentation
()
:
value
;
}
void
JobResultsPresenter
::
setPresentation
(
const
QString
&
presentationType
)
...
...
@@ -46,7 +46,7 @@ void JobResultsPresenter::setPresentation(const QString& presentationType)
return
;
ItemComboWidget
::
setPresentation
(
presentationType
);
currentItem
()
->
set
ItemValue
(
JobItem
::
P_PRESENTATION_TYPE
,
presentationType
);
dynamic_cast
<
JobItem
*>
(
currentItem
()
)
->
set
PresentationType
(
presentationType
);
}
void
JobResultsPresenter
::
setPresentation
(
JobViewFlags
::
EActivities
activity
)
...
...
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