Skip to content
Snippets Groups Projects
Commit bf20b6b9 authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Change to standard function names

parent 0848f758
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,7 @@ from qtpy.QtWidgets import QVBoxLayout ...@@ -17,6 +17,7 @@ from qtpy.QtWidgets import QVBoxLayout
# local package imports # local package imports
from workbench.plugins.base import PluginWidget from workbench.plugins.base import PluginWidget
# from mantidqt.utils.qt import toQSettings when readSettings/writeSettings are implemented
class AlgorithmSelector(PluginWidget): class AlgorithmSelector(PluginWidget):
...@@ -39,5 +40,8 @@ class AlgorithmSelector(PluginWidget): ...@@ -39,5 +40,8 @@ class AlgorithmSelector(PluginWidget):
def get_plugin_title(self): def get_plugin_title(self):
return "Algorithms" return "Algorithms"
def read_user_settings(self, _): def readSettings(self, _):
pass
def writeSettings(self, _):
pass pass
...@@ -36,11 +36,16 @@ class PluginWidget(QWidget): ...@@ -36,11 +36,16 @@ class PluginWidget(QWidget):
def get_plugin_title(self): def get_plugin_title(self):
raise NotImplementedError() raise NotImplementedError()
def read_user_settings(self, qsettings): def readSettings(self, qsettings):
"""Called by the main window to ask the plugin to """Called by the main window to ask the plugin to
load user configuration""" load user configuration"""
raise NotImplementedError() raise NotImplementedError()
def writeSettings(self, qsettings):
"""Called by the main window to ask the plugin to
save user configuration"""
raise NotImplementedError()
def register_plugin(self, menu=None): def register_plugin(self, menu=None):
"""Called by the parent widget/window and should """Called by the parent widget/window and should
perform any setup required to use the plugin. perform any setup required to use the plugin.
......
...@@ -19,6 +19,7 @@ from qtpy.QtWidgets import QVBoxLayout ...@@ -19,6 +19,7 @@ from qtpy.QtWidgets import QVBoxLayout
# local package imports # local package imports
from workbench.plugins.base import PluginWidget from workbench.plugins.base import PluginWidget
# from mantidqt.utils.qt import toQSettings when readSettings/writeSettings are implemented
# Initial content # Initial content
...@@ -75,7 +76,10 @@ class MultiFileEditor(PluginWidget): ...@@ -75,7 +76,10 @@ class MultiFileEditor(PluginWidget):
def get_plugin_title(self): def get_plugin_title(self):
return "Editor" return "Editor"
def read_user_settings(self, _): def readSettings(self, _):
pass
def writeSettings(self, _):
pass pass
def register_plugin(self): def register_plugin(self):
......
...@@ -16,7 +16,7 @@ import sys ...@@ -16,7 +16,7 @@ import sys
from mantidqt.widgets.jupyterconsole import InProcessJupyterConsole from mantidqt.widgets.jupyterconsole import InProcessJupyterConsole
try: try:
from IPython.core.usage import quick_guide from IPython.core.usage import quick_guide
except ImportError: # quick_guide was removed in IPython 6.0 except ImportError: # quick_guide was removed in IPython 6.0
quick_guide = '' quick_guide = ''
from IPython.core.usage import release as ipy_release from IPython.core.usage import release as ipy_release
from matplotlib import __version__ as mpl_version from matplotlib import __version__ as mpl_version
...@@ -25,6 +25,7 @@ from qtpy.QtWidgets import QVBoxLayout ...@@ -25,6 +25,7 @@ from qtpy.QtWidgets import QVBoxLayout
# local package imports # local package imports
from workbench.plugins.base import PluginWidget from workbench.plugins.base import PluginWidget
# from mantidqt.utils.qt import toQSettings when readSettings/writeSettings are implemented
DEFAULT_BANNER_PARTS = [ DEFAULT_BANNER_PARTS = [
'IPython {version} -- An enhanced Interactive Python.\n'.format( 'IPython {version} -- An enhanced Interactive Python.\n'.format(
...@@ -63,7 +64,10 @@ class JupyterConsole(PluginWidget): ...@@ -63,7 +64,10 @@ class JupyterConsole(PluginWidget):
def get_plugin_title(self): def get_plugin_title(self):
return "IPython" return "IPython"
def read_user_settings(self, _): def readSettings(self, _):
pass
def writeSettings(self, _):
pass pass
def register_plugin(self, menu=None): def register_plugin(self, menu=None):
......
...@@ -18,6 +18,7 @@ from qtpy.QtWidgets import QVBoxLayout ...@@ -18,6 +18,7 @@ from qtpy.QtWidgets import QVBoxLayout
from workbench.plugins.base import PluginWidget from workbench.plugins.base import PluginWidget
from workbench.plotting.globalfiguremanager import GlobalFigureManager from workbench.plotting.globalfiguremanager import GlobalFigureManager
from workbench.widgets.plotselector.presenter import PlotSelectorPresenter from workbench.widgets.plotselector.presenter import PlotSelectorPresenter
# from mantidqt.utils.qt import toQSettings when readSettings/writeSettings are implemented
class PlotSelector(PluginWidget): class PlotSelector(PluginWidget):
...@@ -42,5 +43,8 @@ class PlotSelector(PluginWidget): ...@@ -42,5 +43,8 @@ class PlotSelector(PluginWidget):
def get_plugin_title(self): def get_plugin_title(self):
return "Plots" return "Plots"
def read_user_settings(self, _): def readSettings(self, _):
pass
def writeSettings(self, _):
pass pass
...@@ -20,6 +20,7 @@ from qtpy.QtWidgets import QMessageBox, QVBoxLayout ...@@ -20,6 +20,7 @@ from qtpy.QtWidgets import QMessageBox, QVBoxLayout
# local package imports # local package imports
from workbench.plugins.base import PluginWidget from workbench.plugins.base import PluginWidget
from workbench.plotting.functions import can_overplot, pcolormesh, plot_from_names from workbench.plotting.functions import can_overplot, pcolormesh, plot_from_names
# from mantidqt.utils.qt import toQSettings when readSettings/writeSettings are implemented
class WorkspaceWidget(PluginWidget): class WorkspaceWidget(PluginWidget):
...@@ -55,7 +56,10 @@ class WorkspaceWidget(PluginWidget): ...@@ -55,7 +56,10 @@ class WorkspaceWidget(PluginWidget):
def get_plugin_title(self): def get_plugin_title(self):
return "Workspaces" return "Workspaces"
def read_user_settings(self, _): def readSettings(self, _):
pass
def writeSettings(self, _):
pass pass
# ----------------- Behaviour -------------------- # ----------------- Behaviour --------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment