1010)
1111from matplotlib .figure import Figure
1212from qtpy .QtGui import QIcon
13- from qtpy .QtWidgets import QVBoxLayout , QWidget
13+ from qtpy .QtWidgets import QLabel , QVBoxLayout , QWidget
1414
1515from .util import Interval , from_napari_css_get_size_of
1616
@@ -133,6 +133,11 @@ class NapariMPLWidget(BaseNapariMPLWidget):
133133 for creating and working with the Matplotlib figure and any axes.
134134 """
135135
136+ #: Number of layers taken as input
137+ n_layers_input = Interval (None , None )
138+ #: Type of layer taken as input
139+ input_layer_types : Tuple [napari .layers .Layer , ...] = (napari .layers .Layer ,)
140+
136141 def __init__ (
137142 self ,
138143 napari_viewer : napari .viewer .Viewer ,
@@ -144,10 +149,9 @@ def __init__(
144149 self ._setup_callbacks ()
145150 self .layers : List [napari .layers .Layer ] = []
146151
147- #: Number of layers taken as input
148- n_layers_input = Interval (None , None )
149- #: Type of layer taken as input
150- input_layer_types : Tuple [napari .layers .Layer , ...] = (napari .layers .Layer ,)
152+ helper_text = self .n_layers_input ._helper_text
153+ if helper_text is not None :
154+ self .layout ().insertWidget (0 , QLabel (helper_text ))
151155
152156 @property
153157 def n_selected_layers (self ) -> int :
0 commit comments