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
a5f72e6b
Commit
a5f72e6b
authored
1 year ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
replace 'm_currentActivity' by 'm_current_activity'
parent
7ae95f54
No related branches found
No related tags found
1 merge request
!2290
replace camel case in member vars; simplify updateCanvas API
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/View/Canvas/ProjectionsEditorCanvas.cpp
+9
-9
9 additions, 9 deletions
GUI/View/Canvas/ProjectionsEditorCanvas.cpp
GUI/View/Canvas/ProjectionsEditorCanvas.h
+1
-1
1 addition, 1 deletion
GUI/View/Canvas/ProjectionsEditorCanvas.h
with
10 additions
and
10 deletions
GUI/View/Canvas/ProjectionsEditorCanvas.cpp
+
9
−
9
View file @
a5f72e6b
...
@@ -30,7 +30,7 @@ ProjectionsEditorCanvas::ProjectionsEditorCanvas()
...
@@ -30,7 +30,7 @@ ProjectionsEditorCanvas::ProjectionsEditorCanvas()
:
m_scene
(
new
MaskGraphicsScene
)
:
m_scene
(
new
MaskGraphicsScene
)
,
m_view
(
new
MaskGraphicsView
(
m_scene
))
,
m_view
(
new
MaskGraphicsView
(
m_scene
))
,
m_status_label
(
new
PlotStatusLabel
(
nullptr
,
this
))
,
m_status_label
(
new
PlotStatusLabel
(
nullptr
,
this
))
,
m_current
A
ctivity
(
MaskFlags
::
HORIZONTAL_LINE_MODE
)
,
m_current
_a
ctivity
(
MaskFlags
::
HORIZONTAL_LINE_MODE
)
{
{
setSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Expanding
);
setSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Expanding
);
...
@@ -48,10 +48,10 @@ ProjectionsEditorCanvas::ProjectionsEditorCanvas()
...
@@ -48,10 +48,10 @@ ProjectionsEditorCanvas::ProjectionsEditorCanvas()
// automatically switch to the appropriate projection tab
// automatically switch to the appropriate projection tab
connect
(
m_scene
,
&
MaskGraphicsScene
::
lineItemMoved
,
[
this
](
LineItem
*
sender
)
{
connect
(
m_scene
,
&
MaskGraphicsScene
::
lineItemMoved
,
[
this
](
LineItem
*
sender
)
{
if
(
dynamic_cast
<
HorizontalLineItem
*>
(
sender
)
if
(
dynamic_cast
<
HorizontalLineItem
*>
(
sender
)
&&
(
m_current
A
ctivity
!=
MaskFlags
::
VERTICAL_LINE_MODE
))
&&
(
m_current
_a
ctivity
!=
MaskFlags
::
VERTICAL_LINE_MODE
))
emit
changeProjectionsTabRequest
(
MaskFlags
::
HORIZONTAL_LINE_MODE
);
emit
changeProjectionsTabRequest
(
MaskFlags
::
HORIZONTAL_LINE_MODE
);
if
(
dynamic_cast
<
VerticalLineItem
*>
(
sender
)
if
(
dynamic_cast
<
VerticalLineItem
*>
(
sender
)
&&
(
m_current
A
ctivity
!=
MaskFlags
::
HORIZONTAL_LINE_MODE
))
&&
(
m_current
_a
ctivity
!=
MaskFlags
::
HORIZONTAL_LINE_MODE
))
emit
changeProjectionsTabRequest
(
MaskFlags
::
VERTICAL_LINE_MODE
);
emit
changeProjectionsTabRequest
(
MaskFlags
::
VERTICAL_LINE_MODE
);
});
});
}
}
...
@@ -91,7 +91,7 @@ void ProjectionsEditorCanvas::updateCanvas(Data2DItem* data_item)
...
@@ -91,7 +91,7 @@ void ProjectionsEditorCanvas::updateCanvas(Data2DItem* data_item)
m_status_label
->
setPlot
(
cm
);
m_status_label
->
setPlot
(
cm
);
onLeavingColorMap
();
onLeavingColorMap
();
m_scene
->
onActivityChanged
(
m_current
A
ctivity
);
m_scene
->
onActivityChanged
(
m_current
_a
ctivity
);
}
}
void
ProjectionsEditorCanvas
::
resetCanvas
()
void
ProjectionsEditorCanvas
::
resetCanvas
()
...
@@ -115,9 +115,9 @@ void ProjectionsEditorCanvas::onEnteringColorMap()
...
@@ -115,9 +115,9 @@ void ProjectionsEditorCanvas::onEnteringColorMap()
if
(
m_live_projection
)
if
(
m_live_projection
)
return
;
return
;
if
(
m_current
A
ctivity
==
MaskFlags
::
HORIZONTAL_LINE_MODE
)
if
(
m_current
_a
ctivity
==
MaskFlags
::
HORIZONTAL_LINE_MODE
)
m_live_projection
=
std
::
make_unique
<
HorizontalLineItem
>
();
m_live_projection
=
std
::
make_unique
<
HorizontalLineItem
>
();
else
if
(
m_current
A
ctivity
==
MaskFlags
::
VERTICAL_LINE_MODE
)
else
if
(
m_current
_a
ctivity
==
MaskFlags
::
VERTICAL_LINE_MODE
)
m_live_projection
=
std
::
make_unique
<
VerticalLineItem
>
();
m_live_projection
=
std
::
make_unique
<
VerticalLineItem
>
();
if
(
m_live_projection
)
{
if
(
m_live_projection
)
{
...
@@ -138,9 +138,9 @@ void ProjectionsEditorCanvas::onLeavingColorMap()
...
@@ -138,9 +138,9 @@ void ProjectionsEditorCanvas::onLeavingColorMap()
void
ProjectionsEditorCanvas
::
onPositionChanged
(
double
x
,
double
y
)
void
ProjectionsEditorCanvas
::
onPositionChanged
(
double
x
,
double
y
)
{
{
if
(
m_live_projection
)
{
if
(
m_live_projection
)
{
if
(
m_current
A
ctivity
==
MaskFlags
::
HORIZONTAL_LINE_MODE
)
if
(
m_current
_a
ctivity
==
MaskFlags
::
HORIZONTAL_LINE_MODE
)
dynamic_cast
<
HorizontalLineItem
*>
(
m_live_projection
.
get
())
->
setPos
(
y
);
dynamic_cast
<
HorizontalLineItem
*>
(
m_live_projection
.
get
())
->
setPos
(
y
);
else
if
(
m_current
A
ctivity
==
MaskFlags
::
VERTICAL_LINE_MODE
)
else
if
(
m_current
_a
ctivity
==
MaskFlags
::
VERTICAL_LINE_MODE
)
dynamic_cast
<
VerticalLineItem
*>
(
m_live_projection
.
get
())
->
setPos
(
x
);
dynamic_cast
<
VerticalLineItem
*>
(
m_live_projection
.
get
())
->
setPos
(
x
);
}
}
}
}
...
@@ -154,7 +154,7 @@ void ProjectionsEditorCanvas::onResetViewRequest()
...
@@ -154,7 +154,7 @@ void ProjectionsEditorCanvas::onResetViewRequest()
void
ProjectionsEditorCanvas
::
setProjectionsCanvasMode
(
MaskFlags
::
MaskMode
mask_mode
)
void
ProjectionsEditorCanvas
::
setProjectionsCanvasMode
(
MaskFlags
::
MaskMode
mask_mode
)
{
{
m_current
A
ctivity
=
mask_mode
;
m_current
_a
ctivity
=
mask_mode
;
m_scene
->
onActivityChanged
(
mask_mode
);
m_scene
->
onActivityChanged
(
mask_mode
);
onLeavingColorMap
();
onLeavingColorMap
();
}
}
This diff is collapsed.
Click to expand it.
GUI/View/Canvas/ProjectionsEditorCanvas.h
+
1
−
1
View file @
a5f72e6b
...
@@ -62,7 +62,7 @@ private:
...
@@ -62,7 +62,7 @@ private:
PlotStatusLabel
*
m_status_label
;
PlotStatusLabel
*
m_status_label
;
Data2DItem
*
m_data_item
;
Data2DItem
*
m_data_item
;
std
::
unique_ptr
<
LineItem
>
m_live_projection
;
//!< temporary, matching mouse move
std
::
unique_ptr
<
LineItem
>
m_live_projection
;
//!< temporary, matching mouse move
MaskFlags
::
MaskMode
m_current
A
ctivity
;
MaskFlags
::
MaskMode
m_current
_a
ctivity
;
};
};
#endif // BORNAGAIN_GUI_VIEW_CANVAS_PROJECTIONSEDITORCANVAS_H
#endif // BORNAGAIN_GUI_VIEW_CANVAS_PROJECTIONSEDITORCANVAS_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