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
799f5e35
Commit
799f5e35
authored
3 years ago
by
t.knopff
Browse files
Options
Downloads
Patches
Plain Diff
Make JobItem::T_DATAVIEW private
parent
a4319e0b
No related branches found
No related tags found
1 merge request
!99
Refactor model: JobItem
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
GUI/Models/JobItem.cpp
+10
-0
10 additions, 0 deletions
GUI/Models/JobItem.cpp
GUI/Models/JobItem.h
+3
-1
3 additions, 1 deletion
GUI/Models/JobItem.h
GUI/Models/JobModelFunctions.cpp
+2
-2
2 additions, 2 deletions
GUI/Models/JobModelFunctions.cpp
GUI/Views/TestView.cpp
+1
-1
1 addition, 1 deletion
GUI/Views/TestView.cpp
with
16 additions
and
4 deletions
GUI/Models/JobItem.cpp
+
10
−
0
View file @
799f5e35
...
...
@@ -315,6 +315,16 @@ Data1DViewItem* JobItem::dataItemView()
return
dynamic_cast
<
Data1DViewItem
*>
(
getItem
(
JobItem
::
T_DATAVIEW
));
}
void
JobItem
::
addDataViewItem
(
Data1DViewItem
*
data_view
)
{
insertItem
(
-
1
,
data_view
,
T_DATAVIEW
);
}
Data1DViewItem
*
JobItem
::
createDataViewItem
()
{
return
model
()
->
insertItem
<
Data1DViewItem
>
(
this
,
-
1
,
T_DATAVIEW
);
}
void
JobItem
::
setSampleName
(
const
QString
&
name
)
{
getItem
(
P_SAMPLE_NAME
)
->
setValue
(
name
);
...
...
This diff is collapsed.
Click to expand it.
GUI/Models/JobItem.h
+
3
−
1
View file @
799f5e35
...
...
@@ -50,9 +50,9 @@ private:
static
const
QString
T_INSTRUMENT
;
static
const
QString
T_OUTPUT
;
static
const
QString
T_REALDATA
;
static
const
QString
T_DATAVIEW
;
public:
static
const
QString
T_DATAVIEW
;
static
const
QString
T_PARAMETER_TREE
;
static
const
QString
T_SIMULATION_OPTIONS
;
static
const
QString
T_FIT_SUITE
;
...
...
@@ -118,6 +118,8 @@ public:
MaterialItemContainer
*
createMaterialContainer
();
Data1DViewItem
*
dataItemView
();
void
addDataViewItem
(
Data1DViewItem
*
data_view
);
Data1DViewItem
*
createDataViewItem
();
void
setSampleName
(
const
QString
&
name
);
...
...
This diff is collapsed.
Click to expand it.
GUI/Models/JobModelFunctions.cpp
+
2
−
2
View file @
799f5e35
...
...
@@ -65,10 +65,10 @@ void JobModelFunctions::initDataView(JobItem* job_item)
{
ASSERT
(
job_item
&&
job_item
->
isValidForFitting
());
ASSERT
(
job_item
->
instrumentItem
()
&&
job_item
->
instrumentItem
()
->
is
<
SpecularInstrumentItem
>
());
ASSERT
(
!
job_item
->
getItem
(
JobItem
::
T_DATAVIEW
));
ASSERT
(
!
job_item
->
dataItemView
(
));
SessionModel
*
model
=
job_item
->
model
();
auto
view_item
=
model
->
insertItem
<
Data
1D
ViewItem
>
(
job_item
,
-
1
,
JobItem
::
T_DATAVIEW
);
auto
view_item
=
job_item
->
create
DataViewItem
(
);
auto
property_container
=
model
->
insertItem
<
DataPropertyContainer
>
(
view_item
,
-
1
,
Data1DViewItem
::
T_DATA_PROPERTIES
);
...
...
This diff is collapsed.
Click to expand it.
GUI/Views/TestView.cpp
+
1
−
1
View file @
799f5e35
...
...
@@ -196,7 +196,7 @@ void TestView::test_specular_data_widget()
// creating data view
auto
data_view
=
new
Data1DViewItem
();
job_item
->
insert
Item
(
-
1
,
data_view
,
JobItem
::
T_DATAVIEW
);
job_item
->
addDataView
Item
(
data_view
);
data_view
->
insertItem
(
-
1
,
new
DataPropertyContainer
,
Data1DViewItem
::
T_DATA_PROPERTIES
);
auto
container
=
data_view
->
item
<
DataPropertyContainer
>
(
Data1DViewItem
::
T_DATA_PROPERTIES
);
container
->
addItem
(
job_item
->
realDataItem
()
->
dataItem
());
...
...
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