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
be243258
Commit
be243258
authored
Jul 06, 2021
by
Julia Garriga Ferrer
Browse files
[gui][shift] Emit bool with signal
parent
ee9daef4
Changes
1
Hide whitespace changes
Inline
Side-by-side
darfix/gui/shiftCorrectionWidget.py
View file @
be243258
...
...
@@ -81,7 +81,7 @@ class ShiftCorrectionWidget(qt.QMainWindow):
"""
A widget to apply shift correction to a stack of images
"""
computingSignal
=
qt
.
Signal
()
computingSignal
=
qt
.
Signal
(
bool
)
def
__init__
(
self
,
parent
=
None
):
qt
.
QMainWindow
.
__init__
(
self
,
parent
)
...
...
@@ -158,7 +158,7 @@ class ShiftCorrectionWidget(qt.QMainWindow):
self
.
_inputDock
.
widget
.
correctionB
.
setEnabled
(
False
)
self
.
_inputDock
.
widget
.
abortB
.
show
()
self
.
thread_correction
.
start
()
self
.
computingSignal
.
emit
()
self
.
computingSignal
.
emit
(
True
)
def
abort
(
self
):
self
.
_inputDock
.
widget
.
abortB
.
setEnabled
(
False
)
...
...
@@ -177,13 +177,13 @@ class ShiftCorrectionWidget(qt.QMainWindow):
self
.
thread_detection
.
setArgs
(
self
.
_dimension
,
indices
=
self
.
indices
)
self
.
thread_detection
.
finished
.
connect
(
self
.
_updateShift
)
self
.
thread_detection
.
start
()
self
.
computingSignal
.
emit
()
self
.
computingSignal
.
emit
(
True
)
def
_updateShift
(
self
):
self
.
_inputDock
.
widget
.
_findShiftB
.
setEnabled
(
True
)
self
.
thread_detection
.
finished
.
disconnect
(
self
.
_updateShift
)
self
.
shift
=
numpy
.
round
(
self
.
thread_detection
.
data
[:,
1
],
5
)
self
.
computingSignal
.
emit
()
self
.
computingSignal
.
emit
(
False
)
def
_updateData
(
self
):
"""
...
...
@@ -193,7 +193,7 @@ class ShiftCorrectionWidget(qt.QMainWindow):
self
.
_inputDock
.
widget
.
abortB
.
hide
()
self
.
_inputDock
.
widget
.
abortB
.
setEnabled
(
True
)
self
.
_inputDock
.
widget
.
correctionB
.
setEnabled
(
True
)
self
.
computingSignal
.
emit
()
self
.
computingSignal
.
emit
(
False
)
if
self
.
thread_correction
.
data
:
self
.
_update_dataset
=
self
.
thread_correction
.
data
assert
self
.
_update_dataset
is
not
None
...
...
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