@@ -142,6 +142,8 @@ def select_with_shape_tool(
142142 size : tuple [int , int ] = None ,
143143 other_items : list [QwtPlotItem ] = [],
144144 tooldialogclass : SelectDialog = SelectDialog ,
145+ toolbar : bool = False ,
146+ options : PlotOptions | None = None ,
145147 icon = None ,
146148 ** kwargs ,
147149) -> AbstractShape :
@@ -155,6 +157,8 @@ def select_with_shape_tool(
155157 size: Dialog size
156158 other_items: Other items to be displayed
157159 tooldialogclass: Tool dialog class
160+ toolbar: show/hide toolbar
161+ options: plot options
158162 icon: Icon
159163 kwargs: Keyword arguments for the tool class
160164
@@ -165,7 +169,9 @@ def select_with_shape_tool(
165169 title = "Select an area then press OK to accept"
166170 if icon is not None :
167171 icon = get_icon (icon ) if isinstance (icon , str ) else icon
168- win : SelectDialog = tooldialogclass (parent , title = title , edit = True , icon = icon )
172+ win : SelectDialog = tooldialogclass (
173+ parent , title = title , edit = True , toolbar = toolbar , options = options , icon = icon
174+ )
169175 win .set_image_and_tool (item , toolclass , ** kwargs )
170176 plot = win .get_plot ()
171177 for other_item in other_items :
0 commit comments