def getMaskToolsDockWidget(self): """DockWidget with image mask panel (lazy-loaded).""" if self._maskToolsDockWidget is None: self._maskToolsDockWidget = MaskToolsWidget.MaskToolsDockWidget( plot=self, name='Mask') self._maskToolsDockWidget.hide() self.addDockWidget(qt.Qt.BottomDockWidgetArea, self._maskToolsDockWidget) return self._maskToolsDockWidget
def setUp(self): super(TestMaskToolsWidget, self).setUp() self.plot = PlotWindow() self.widget = MaskToolsWidget.MaskToolsDockWidget(plot=self.plot, name='TEST') self.plot.addDockWidget(qt.Qt.BottomDockWidgetArea, self.widget) self.plot.show() self.qWaitForWindowExposed(self.plot) self.maskWidget = self.widget.widget()
def setUp(self): super(TestMaskToolsWidget, self).setUp() self.widget = MaskToolsWidget.MaskToolsDockWidget(plot=self.plot, name='TEST') self.plot.addDockWidget(qt.Qt.BottomDockWidgetArea, self.widget) self.maskWidget = self.widget.widget()