Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
acc70b26
Commit
acc70b26
authored
Sep 13, 2021
by
Walsh, Michael
Committed by
Whitfield, Ross
Sep 16, 2021
Browse files
added rotation property to shape features
parent
b760ca53
Changes
2
Hide whitespace changes
Inline
Side-by-side
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentWidgetMaskTab.h
View file @
acc70b26
...
...
@@ -208,6 +208,7 @@ protected:
QtProperty
*
m_top
;
QtProperty
*
m_right
;
QtProperty
*
m_bottom
;
QtProperty
*
m_rotation
;
QMap
<
QtProperty
*
,
QString
>
m_doublePropertyMap
;
QMap
<
QString
,
QtProperty
*>
m_pointPropertyMap
;
...
...
qt/widgets/instrumentview/src/InstrumentWidgetMaskTab.cpp
View file @
acc70b26
...
...
@@ -609,6 +609,7 @@ void InstrumentWidgetMaskTab::clearProperties() {
m_top
=
nullptr
;
m_right
=
nullptr
;
m_bottom
=
nullptr
;
m_rotation
=
nullptr
;
}
void
InstrumentWidgetMaskTab
::
setProperties
()
{
...
...
@@ -622,10 +623,12 @@ void InstrumentWidgetMaskTab::setProperties() {
m_top
=
addDoubleProperty
(
"top"
);
m_right
=
addDoubleProperty
(
"right"
);
m_bottom
=
addDoubleProperty
(
"bottom"
);
m_rotation
=
addDoubleProperty
(
"rotation"
);
boundingRectGroup
->
addSubProperty
(
m_left
);
boundingRectGroup
->
addSubProperty
(
m_top
);
boundingRectGroup
->
addSubProperty
(
m_right
);
boundingRectGroup
->
addSubProperty
(
m_bottom
);
boundingRectGroup
->
addSubProperty
(
m_rotation
);
// point properties
QStringList
pointProperties
=
m_instrWidget
->
getSurface
()
->
getCurrentPointNames
();
...
...
@@ -661,7 +664,7 @@ void InstrumentWidgetMaskTab::doubleChanged(QtProperty *prop) {
if
(
!
m_userEditing
)
return
;
if
(
prop
==
m_left
||
prop
==
m_top
||
prop
==
m_right
||
prop
==
m_bottom
)
{
if
(
prop
==
m_left
||
prop
==
m_top
||
prop
==
m_right
||
prop
==
m_bottom
||
prop
==
m_rotation
)
{
m_userEditing
=
false
;
double
x0
=
std
::
min
(
m_doubleManager
->
value
(
m_left
),
m_doubleManager
->
value
(
m_right
));
double
x1
=
std
::
max
(
m_doubleManager
->
value
(
m_left
),
m_doubleManager
->
value
(
m_right
));
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment