From f737ac4496d79692105f772b834883dc8213a70a Mon Sep 17 00:00:00 2001 From: arve0 Date: Mon, 23 Feb 2015 15:50:12 +0100 Subject: [PATCH] move docstring from viewer.widgets.core to viewer.widgets --- skimage/viewer/widgets/__init__.py | 18 ++++++++++++++++++ skimage/viewer/widgets/core.py | 19 +------------------ 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/skimage/viewer/widgets/__init__.py b/skimage/viewer/widgets/__init__.py index efa9fe9d..2705f371 100644 --- a/skimage/viewer/widgets/__init__.py +++ b/skimage/viewer/widgets/__init__.py @@ -1,2 +1,20 @@ +""" +Widgets for interacting with ImageViewer. + +These widgets should be added to a Plugin subclass using its `add_widget` +method or calling:: + + plugin += Widget(...) + +on a Plugin instance. The Plugin will delegate action based on the widget's +parameter type specified by its `ptype` attribute, which can be:: + + 'arg' : positional argument passed to Plugin's `filter_image` method. + 'kwarg' : keyword argument passed to Plugin's `filter_image` method. + 'plugin' : attribute of Plugin. You'll probably need to add a class + property of the same name that updates the display. + +""" + from .core import * from .history import * diff --git a/skimage/viewer/widgets/core.py b/skimage/viewer/widgets/core.py index ae8be4e7..71f0bc50 100644 --- a/skimage/viewer/widgets/core.py +++ b/skimage/viewer/widgets/core.py @@ -1,20 +1,3 @@ -""" -Widgets for interacting with ImageViewer. - -These widgets should be added to a Plugin subclass using its `add_widget` -method or calling:: - - plugin += Widget(...) - -on a Plugin instance. The Plugin will delegate action based on the widget's -parameter type specified by its `ptype` attribute, which can be: - - 'arg' : positional argument passed to Plugin's `filter_image` method. - 'kwarg' : keyword argument passed to Plugin's `filter_image` method. - 'plugin' : attribute of Plugin. You'll probably need to add a class - property of the same name that updates the display. - -""" from ..qt import QtWidgets, QtCore, Qt from ..utils import RequiredAttr @@ -275,7 +258,7 @@ class CheckBox(BaseWidget): added to a plugin. """ - def __init__(self, name, value=False, alignment='center', ptype='kwarg', + def __init__(self, name, value=False, alignment='center', ptype='kwarg', callback=None): super(CheckBox, self).__init__(name, ptype, callback)