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
eff1d4ac
Commit
eff1d4ac
authored
1 year ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
replace 'm_projectionsCanvas' by 'm_canvas2D'
parent
a5bf279c
No related branches found
Branches containing commit
No related tags found
1 merge request
!2289
make mask and projection classes more similar
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/View/Frame/Plot2DWithProjectionFrame.cpp
+11
-11
11 additions, 11 deletions
GUI/View/Frame/Plot2DWithProjectionFrame.cpp
GUI/View/Frame/Plot2DWithProjectionFrame.h
+3
-3
3 additions, 3 deletions
GUI/View/Frame/Plot2DWithProjectionFrame.h
with
14 additions
and
14 deletions
GUI/View/Frame/Plot2DWithProjectionFrame.cpp
+
11
−
11
View file @
eff1d4ac
...
...
@@ -26,7 +26,7 @@
Plot2DWithProjectionFrame
::
Plot2DWithProjectionFrame
(
QWidget
*
parent
)
:
DataAccessWidget
(
parent
)
,
m_actions
(
new
ProjectionActions
(
this
))
,
m_
projectionsC
anvas
(
new
ProjectionsEditorCanvas
)
,
m_
c
anvas
2D
(
new
ProjectionsEditorCanvas
)
,
m_canvas1D
(
new
ProjectedGraphsCanvas
)
,
m_scaleEditor
(
new
Scale2DEditor
(
this
))
{
...
...
@@ -38,7 +38,7 @@ Plot2DWithProjectionFrame::Plot2DWithProjectionFrame(QWidget* parent)
auto
*
splitter
=
new
QSplitter
;
layout
->
addWidget
(
splitter
);
splitter
->
setOrientation
(
Qt
::
Vertical
);
splitter
->
addWidget
(
m_
projectionsC
anvas
);
splitter
->
addWidget
(
m_
c
anvas
2D
);
splitter
->
addWidget
(
m_canvas1D
);
layout
->
addWidget
(
m_scaleEditor
);
...
...
@@ -50,13 +50,13 @@ Plot2DWithProjectionFrame::Plot2DWithProjectionFrame(QWidget* parent)
//... Connections
connect
(
m_actions
,
&
ProjectionActions
::
resetViewRequest
,
m_
projectionsC
anvas
,
connect
(
m_actions
,
&
ProjectionActions
::
resetViewRequest
,
m_
c
anvas
2D
,
&
ProjectionsEditorCanvas
::
onResetViewRequest
);
connect
(
m_actions
,
&
ProjectionActions
::
propertyPanelRequest
,
[
this
]
{
m_scaleEditor
->
setHidden
(
!
m_scaleEditor
->
isHidden
());
});
connect
(
toolbar
,
&
ProjectionToolbar
::
activityChanged
,
m_
projectionsC
anvas
,
connect
(
toolbar
,
&
ProjectionToolbar
::
activityChanged
,
m_
c
anvas
2D
,
&
ProjectionsEditorCanvas
::
setProjectionsCanvasMode
);
connect
(
toolbar
,
&
ProjectionToolbar
::
activityChanged
,
m_canvas1D
,
...
...
@@ -65,17 +65,17 @@ Plot2DWithProjectionFrame::Plot2DWithProjectionFrame(QWidget* parent)
connect
(
m_canvas1D
,
&
ProjectedGraphsCanvas
::
changeActivityRequest
,
toolbar
,
&
ProjectionToolbar
::
onProjectionTabChange
);
connect
(
m_
projectionsC
anvas
,
&
ProjectionsEditorCanvas
::
deleteSelectedRequest
,
m_actions
,
connect
(
m_
c
anvas
2D
,
&
ProjectionsEditorCanvas
::
deleteSelectedRequest
,
m_actions
,
&
ProjectionActions
::
onDeleteAction
);
connect
(
m_
projectionsC
anvas
,
&
ProjectionsEditorCanvas
::
changeProjectionsTabRequest
,
m_canvas1D
,
connect
(
m_
c
anvas
2D
,
&
ProjectionsEditorCanvas
::
changeProjectionsTabRequest
,
m_canvas1D
,
&
ProjectedGraphsCanvas
::
onActivityChanged
);
// space bar push (request for zoom mode)
connect
(
m_
projectionsC
anvas
,
&
ProjectionsEditorCanvas
::
changeActivityRequest
,
toolbar
,
connect
(
m_
c
anvas
2D
,
&
ProjectionsEditorCanvas
::
changeActivityRequest
,
toolbar
,
&
ProjectionToolbar
::
onChangeActivityRequest
);
connect
(
m_
projectionsC
anvas
,
&
ProjectionsEditorCanvas
::
marginsChanged
,
m_canvas1D
,
connect
(
m_
c
anvas
2D
,
&
ProjectionsEditorCanvas
::
marginsChanged
,
m_canvas1D
,
&
ProjectedGraphsCanvas
::
onMarginsChanged
);
toolbar
->
onChangeActivityRequest
(
MaskFlags
::
HORIZONTAL_LINE_MODE
);
...
...
@@ -97,11 +97,11 @@ void Plot2DWithProjectionFrame::updateFrame()
{
ASSERT
(
currentData2DItem
());
// The following line must come before 'm_
projectionsC
anvas->setContext()'!
// The following line must come before 'm_
c
anvas
2D
->setContext()'!
// It prevents problem with switching between datasets in projection mode.
m_canvas1D
->
disconnectItem
();
m_
projectionsC
anvas
->
updateCanvas
(
currentData2DItem
());
m_
c
anvas
2D
->
updateCanvas
(
currentData2DItem
());
m_canvas1D
->
setData2DItem
(
currentData2DItem
());
m_actions
->
updateProjsActions
(
currentData2DItem
());
...
...
@@ -115,7 +115,7 @@ void Plot2DWithProjectionFrame::showEvent(QShowEvent*)
void
Plot2DWithProjectionFrame
::
hideEvent
(
QHideEvent
*
)
{
m_
projectionsC
anvas
->
resetCanvas
();
m_
c
anvas
2D
->
resetCanvas
();
m_canvas1D
->
disconnectItem
();
m_canvas1D
->
setData2DItem
(
nullptr
);
}
This diff is collapsed.
Click to expand it.
GUI/View/Frame/Plot2DWithProjectionFrame.h
+
3
−
3
View file @
eff1d4ac
...
...
@@ -39,9 +39,9 @@ private:
void
hideEvent
(
QHideEvent
*
)
override
;
ProjectionActions
*
m_actions
;
ProjectionsEditorCanvas
*
m_
projectionsC
anvas
;
//! canvas with color map at the top
ProjectedGraphsCanvas
*
m_canvas1D
;
//! bottom widget to draw projections plot
Scale2DEditor
*
m_scaleEditor
;
//! panel at the right with properties
ProjectionsEditorCanvas
*
m_
c
anvas
2D
;
//! canvas with color map at the top
ProjectedGraphsCanvas
*
m_canvas1D
;
//! bottom widget to draw projections plot
Scale2DEditor
*
m_scaleEditor
;
//! panel at the right with properties
};
#endif // BORNAGAIN_GUI_VIEW_FRAME_PLOT2DWITHPROJECTIONFRAME_H
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