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
@@ -178,6 +178,11 @@ class NapariMPLWidget(BaseNapariMPLWidget):
178178 for creating and working with the Matplotlib figure and any axes.
179179 """
180180
181+ #: Number of layers taken as input
182+ n_layers_input = Interval (None , None )
183+ #: Type of layer taken as input
184+ input_layer_types : Tuple [napari .layers .Layer , ...] = (napari .layers .Layer ,)
185+
181186 def __init__ (
182187 self ,
183188 napari_viewer : napari .viewer .Viewer ,
@@ -187,10 +192,9 @@ def __init__(
187192 self ._setup_callbacks ()
188193 self .layers : List [napari .layers .Layer ] = []
189194
190- #: Number of layers taken as input
191- n_layers_input = Interval (None , None )
192- #: Type of layer taken as input
193- input_layer_types : Tuple [napari .layers .Layer , ...] = (napari .layers .Layer ,)
195+ helper_text = self .n_layers_input ._helper_text
196+ if helper_text is not None :
197+ self .layout ().insertWidget (0 , QLabel (helper_text ))
194198
195199 @property
196200 def n_selected_layers (self ) -> int :
0 commit comments