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
c31cadca
Commit
c31cadca
authored
1 year ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
new... actions made local
parent
625c5815
No related branches found
No related tags found
1 merge request
!2387
unify code for list views
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
GUI/View/Setup/FrameActions.cpp
+0
-16
0 additions, 16 deletions
GUI/View/Setup/FrameActions.cpp
GUI/View/Setup/FrameActions.h
+0
-4
0 additions, 4 deletions
GUI/View/Setup/FrameActions.h
GUI/View/Views/InstrumentView.cpp
+20
-16
20 additions, 16 deletions
GUI/View/Views/InstrumentView.cpp
with
20 additions
and
36 deletions
GUI/View/Setup/FrameActions.cpp
+
0
−
16
View file @
c31cadca
...
...
@@ -76,22 +76,6 @@ FrameActions::FrameActions()
cycle_data2d_edit_mode
->
setIcon
(
QIcon
(
":/images/sprocket3.svg"
));
cycle_data2d_edit_mode
->
setToolTip
(
"Cycle data 2d edit mode: Data, Mask, Projection"
);
new_gisas_instrument
=
new
QAction
(
"New GISAS"
);
new_gisas_instrument
->
setIcon
(
QIcon
(
":/images/shape-square-plus.svg"
));
new_gisas_instrument
->
setToolTip
(
"Add new GISAS instrument with default settings"
);
new_offspec_instrument
=
new
QAction
(
"New off-specular"
);
new_offspec_instrument
->
setIcon
(
QIcon
(
":/images/shape-square-plus.svg"
));
new_offspec_instrument
->
setToolTip
(
"Add new off-specular instrument with default settings"
);
new_specular_instrument
=
new
QAction
(
"New specular"
);
new_specular_instrument
->
setIcon
(
QIcon
(
":/images/shape-square-plus.svg"
));
new_specular_instrument
->
setToolTip
(
"Add new specular instrument with default settings"
);
new_depthprobe_instrument
=
new
QAction
(
"New depth probe"
);
new_depthprobe_instrument
->
setIcon
(
QIcon
(
":/images/shape-square-plus.svg"
));
new_depthprobe_instrument
->
setToolTip
(
"Add new depth probe instrument with default settings"
);
remove_instrument
=
ActionFactory
::
createRemoveAction
(
"instrument"
);
copy_instrument
=
ActionFactory
::
createCopyAction
(
"instrument"
);
...
...
This diff is collapsed.
Click to expand it.
GUI/View/Setup/FrameActions.h
+
0
−
4
View file @
c31cadca
...
...
@@ -46,10 +46,6 @@ public:
QAction
*
cycle_data2d_edit_mode
;
QAction
*
new_gisas_instrument
;
QAction
*
new_offspec_instrument
;
QAction
*
new_specular_instrument
;
QAction
*
new_depthprobe_instrument
;
QAction
*
remove_instrument
;
QAction
*
copy_instrument
;
QAction
*
store_in_library_instrument
;
...
...
This diff is collapsed.
Click to expand it.
GUI/View/Views/InstrumentView.cpp
+
20
−
16
View file @
c31cadca
...
...
@@ -45,10 +45,26 @@ InstrumentView::InstrumentView()
layout
->
addWidget
(
toolbar
);
toolbar
->
setToolButtonStyle
(
Qt
::
ToolButtonTextBesideIcon
);
toolbar
->
addAction
(
gActions
->
new_gisas_instrument
);
toolbar
->
addAction
(
gActions
->
new_offspec_instrument
);
toolbar
->
addAction
(
gActions
->
new_specular_instrument
);
toolbar
->
addAction
(
gActions
->
new_depthprobe_instrument
);
auto
new_action
=
[
toolbar
](
const
QString
&
name
,
const
QString
&
description
)
{
QAction
*
a
=
new
QAction
(
"New "
+
name
);
a
->
setIcon
(
QIcon
(
":/images/shape-square-plus.svg"
));
a
->
setToolTip
(
"Add new "
+
description
+
" instrument with default settings"
);
toolbar
->
addAction
(
a
);
return
a
;
};
connect
(
new_action
(
"GISAS"
,
"2D scattering"
),
&
QAction
::
triggered
,
[
this
]
{
m_qlistmodel
->
pushInstrument
(
new
Scatter2DInstrumentItem
);
});
connect
(
new_action
(
"offspec"
,
"off-specular"
),
&
QAction
::
triggered
,
[
this
]
{
m_qlistmodel
->
pushInstrument
(
new
OffspecInstrumentItem
);
});
connect
(
new_action
(
"specular"
,
"specular reflectivity"
),
&
QAction
::
triggered
,
[
this
]
{
m_qlistmodel
->
pushInstrument
(
new
SpecularInstrumentItem
);
});
connect
(
new_action
(
"depthprobe"
,
"depth intensity profile"
),
&
QAction
::
triggered
,
[
this
]
{
m_qlistmodel
->
pushInstrument
(
new
DepthprobeInstrumentItem
);
});
toolbar
->
addAction
(
gActions
->
remove_instrument
);
toolbar
->
addAction
(
gActions
->
copy_instrument
);
toolbar
->
addAction
(
gActions
->
store_in_library_instrument
);
...
...
@@ -74,18 +90,6 @@ InstrumentView::InstrumentView()
//... Finalize
connect
(
gActions
->
new_gisas_instrument
,
&
QAction
::
triggered
,
[
this
]
{
m_qlistmodel
->
pushInstrument
(
new
Scatter2DInstrumentItem
);
});
connect
(
gActions
->
new_offspec_instrument
,
&
QAction
::
triggered
,
[
this
]
{
m_qlistmodel
->
pushInstrument
(
new
OffspecInstrumentItem
);
});
connect
(
gActions
->
new_specular_instrument
,
&
QAction
::
triggered
,
[
this
]
{
m_qlistmodel
->
pushInstrument
(
new
SpecularInstrumentItem
);
});
connect
(
gActions
->
new_depthprobe_instrument
,
&
QAction
::
triggered
,
[
this
]
{
m_qlistmodel
->
pushInstrument
(
new
DepthprobeInstrumentItem
);
});
connect
(
gActions
->
remove_instrument
,
&
QAction
::
triggered
,
m_qlistmodel
,
&
InstrumentsQModel
::
removeInstrument
);
...
...
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