-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into remove_qt_from_meta_yaml
- Loading branch information
Showing
12 changed files
with
226 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright (C) 2020 ISIS Rutherford Appleton Laboratory UKRI | ||
# SPDX - License - Identifier: GPL-3.0-or-later | ||
|
||
from mantidimaging.gui.mvp_base.presenter import BasePresenter | ||
from mantidimaging.gui.windows.stack_choice.view import Notification | ||
|
||
|
||
class StackChoicePresenterMixin(BasePresenter): | ||
""" | ||
Implements common functions for StackChoice and StackCompare, but does | ||
not do enough on it's own for a successful view initialisation - it needs | ||
to be mixed into another presenter that extends it | ||
""" | ||
def notify(self, signal: Notification): | ||
if signal == Notification.TOGGLE_LOCK_HISTOGRAMS: | ||
self.do_toggle_lock_histograms() | ||
|
||
def do_toggle_lock_histograms(self): | ||
# The state of the button changes before this signal is triggered | ||
# so on first click you get isChecked = True | ||
histograms_should_lock = self.view.lockHistograms.isChecked() | ||
|
||
if histograms_should_lock: | ||
self.view.connect_histogram_changes() | ||
else: | ||
self.view.disconnect_histogram_changes() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.