Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
XRD
darfix
Commits
118e61ff
Commit
118e61ff
authored
May 28, 2021
by
Julia Garriga Ferrer
Browse files
[gui][rsm] Add rotate checkbox
parent
a7c6e09e
Changes
1
Hide whitespace changes
Inline
Side-by-side
darfix/gui/rsmWidget.py
View file @
118e61ff
...
...
@@ -26,17 +26,11 @@
__authors__
=
[
"J. Garriga"
]
__license__
=
"MIT"
__date__
=
"27/05/2021"
from
matplotlib.colors
import
hsv_to_rgb
import
numpy
__date__
=
"28/05/2021"
from
silx.gui
import
qt
from
silx.gui.colors
import
Colormap
from
silx.gui.plot
import
Plot2D
from
silx.utils.enum
import
Enum
as
_Enum
import
darfix
from
.operationThread
import
OperationThread
...
...
@@ -49,9 +43,18 @@ class RSMWidget(qt.QMainWindow):
def
__init__
(
self
,
parent
=
None
):
qt
.
QWidget
.
__init__
(
self
,
parent
)
self
.
_rotate
=
False
widget
=
qt
.
QWidget
()
layout
=
qt
.
QVBoxLayout
()
self
.
_plotWidget
=
Plot2D
()
self
.
setCentralWidget
(
self
.
_plotWidget
)
self
.
_rotateCB
=
qt
.
QCheckBox
(
"Rotate RSM"
,
self
)
layout
.
addWidget
(
self
.
_plotWidget
)
layout
.
addWidget
(
self
.
_rotateCB
)
widget
.
setLayout
(
layout
)
self
.
setCentralWidget
(
widget
)
self
.
_rotateCB
.
stateChanged
.
connect
(
self
.
__rotate
)
def
setDataset
(
self
,
dataset
,
indices
=
None
,
bg_indices
=
None
,
bg_dataset
=
None
):
"""
...
...
@@ -76,3 +79,6 @@ class RSMWidget(qt.QMainWindow):
else
:
print
(
"
\n
Computation aborted"
)
def
__rotate
(
self
,
checked
):
self
.
_rotate
=
checked
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