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
d5d4dea8
Commit
d5d4dea8
authored
3 years ago
by
t.knopff
Browse files
Options
Downloads
Patches
Plain Diff
Move some functions of JobItem to a better place
parent
37210b83
No related branches found
No related tags found
1 merge request
!99
Refactor model: JobItem
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/Models/JobItem.cpp
+10
-10
10 additions, 10 deletions
GUI/Models/JobItem.cpp
GUI/Models/JobItem.h
+2
-4
2 additions, 4 deletions
GUI/Models/JobItem.h
with
12 additions
and
14 deletions
GUI/Models/JobItem.cpp
+
10
−
10
View file @
d5d4dea8
...
@@ -135,6 +135,11 @@ void JobItem::setStatus(const QString& status)
...
@@ -135,6 +135,11 @@ void JobItem::setStatus(const QString& status)
}
}
}
}
bool
JobItem
::
isStatusPropertyName
(
const
QString
&
name
)
{
return
name
==
P_STATUS
;
}
bool
JobItem
::
isIdle
()
const
bool
JobItem
::
isIdle
()
const
{
{
return
getStatus
()
==
"Idle"
;
return
getStatus
()
==
"Idle"
;
...
@@ -194,6 +199,11 @@ void JobItem::setComments(const QString& comments)
...
@@ -194,6 +199,11 @@ void JobItem::setComments(const QString& comments)
setItemValue
(
P_COMMENTS
,
comments
);
setItemValue
(
P_COMMENTS
,
comments
);
}
}
bool
JobItem
::
isCommentsPropertyName
(
const
QString
&
name
)
{
return
name
==
P_COMMENTS
;
}
int
JobItem
::
getProgress
()
const
int
JobItem
::
getProgress
()
const
{
{
return
getItemValue
(
P_PROGRESS
).
toInt
();
return
getItemValue
(
P_PROGRESS
).
toInt
();
...
@@ -284,16 +294,6 @@ void JobItem::setInstrumentName(const QString& name)
...
@@ -284,16 +294,6 @@ void JobItem::setInstrumentName(const QString& name)
getItem
(
P_INSTRUMENT_NAME
)
->
setValue
(
name
);
getItem
(
P_INSTRUMENT_NAME
)
->
setValue
(
name
);
}
}
bool
JobItem
::
isStatusPropertyName
(
const
QString
&
name
)
{
return
name
==
P_STATUS
;
}
bool
JobItem
::
isCommentsPropertyName
(
const
QString
&
name
)
{
return
name
==
P_COMMENTS
;
}
const
QString
JobItem
::
presentationType
()
const
const
QString
JobItem
::
presentationType
()
const
{
{
return
getItemValue
(
P_PRESENTATION_TYPE
).
toString
();
return
getItemValue
(
P_PRESENTATION_TYPE
).
toString
();
...
...
This diff is collapsed.
Click to expand it.
GUI/Models/JobItem.h
+
2
−
4
View file @
d5d4dea8
...
@@ -66,6 +66,7 @@ public:
...
@@ -66,6 +66,7 @@ public:
QString
getStatus
()
const
;
QString
getStatus
()
const
;
void
setStatus
(
const
QString
&
status
);
void
setStatus
(
const
QString
&
status
);
static
bool
isStatusPropertyName
(
const
QString
&
name
);
bool
isIdle
()
const
;
bool
isIdle
()
const
;
bool
isRunning
()
const
;
bool
isRunning
()
const
;
...
@@ -82,6 +83,7 @@ public:
...
@@ -82,6 +83,7 @@ public:
QString
getComments
()
const
;
QString
getComments
()
const
;
void
setComments
(
const
QString
&
comments
);
void
setComments
(
const
QString
&
comments
);
static
bool
isCommentsPropertyName
(
const
QString
&
name
);
int
getProgress
()
const
;
int
getProgress
()
const
;
void
setProgress
(
int
progress
);
void
setProgress
(
int
progress
);
...
@@ -113,10 +115,6 @@ public:
...
@@ -113,10 +115,6 @@ public:
void
setInstrumentName
(
const
QString
&
name
);
void
setInstrumentName
(
const
QString
&
name
);
static
bool
isStatusPropertyName
(
const
QString
&
name
);
static
bool
isCommentsPropertyName
(
const
QString
&
name
);
const
QString
presentationType
()
const
;
const
QString
presentationType
()
const
;
void
setPresentationType
(
const
QString
&
type
);
void
setPresentationType
(
const
QString
&
type
);
...
...
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