def __init__(self, parent=None, designMode=False, taurusparam=None, toolbar=True, **kwargs): '''see :class:`guiqwt.plot.CurveDialog` for other valid initialization parameters''' CurveDialog.__init__(self, parent=parent, toolbar=toolbar, **kwargs) TaurusBaseWidget.__init__(self, 'TaurusTrendDialog') self.deprecated(rel='4.1', dep='TaurusTrendDialog', alt='TaurusTrend / taurus tpg trend launcher') self.setWindowFlags(Qt.Qt.Widget) self._designMode = designMode self._modelNames = CaselessList() from guiqwt.styles import style_generator self.style = style_generator() self.setSupportedMimeTypes( [TAURUS_MODEL_LIST_MIME_TYPE, TAURUS_ATTR_MIME_TYPE]) from taurus.qt.qtgui.extra_guiqwt.tools import TaurusModelChooserTool, AutoScrollTool self.add_tool(TaurusModelChooserTool, singleModel=False) self.add_tool(AutoScrollTool) self.setModifiableByUser(self._modifiableByUser) if taurusparam is None: taurusparam = TaurusTrendParam() self.defaultTaurusparam = taurusparam self.setContextMenuPolicy(Qt.Qt.CustomContextMenu) self.registerConfigDelegate(self.get_tool(AutoScrollTool))
def setModel(self, models): from guiqwt.styles import style_generator self._ui.taurusTrend.style = style_generator("brmgcykG") self._ui.taurusTrend.setModel(models[:2]) index = models[0].rfind("/") self.model = models[0][:index] self.dev = PyTango.DeviceProxy(self.model) self.id1 = self.dev.subscribe_event('XPosSP', PyTango.EventType.CHANGE_EVENT, self.handle_x) self.id2 = self.dev.subscribe_event('YPosSP', PyTango.EventType.CHANGE_EVENT, self.handle_y) self._ui.taurusTrend_2.setModel(models[2])
def __init__(self, parent=None, designMode=False, toolbar=True, **kwargs): '''see :class:`guiqwt.plot.CurveDialog` for other valid initialization parameters''' CurveDialog.__init__(self, parent=parent, toolbar=toolbar, **kwargs) TaurusBaseWidget.__init__(self, 'TaurusCurveDialog') self.setWindowFlags(Qt.Qt.Widget) self._designMode = designMode self._modelNames = CaselessList() from guiqwt.styles import style_generator self.style = style_generator() self.setSupportedMimeTypes( [TAURUS_MODEL_LIST_MIME_TYPE, TAURUS_ATTR_MIME_TYPE]) from taurus.qt.qtgui.extra_guiqwt.tools import TaurusCurveChooserTool self.add_tool(TaurusCurveChooserTool) self.setModifiableByUser(self._modifiableByUser) self.setContextMenuPolicy(Qt.Qt.CustomContextMenu)
SHOW = True # Show test in GUI-based test launcher import os.path as osp from guiqwt.plot import ImageDialog from guiqwt.tools import ( RectangleTool, EllipseTool, SegmentTool, MultiLineTool, FreeFormTool, ) from guiqwt.builder import make from guiqwt.styles import style_generator, update_style_attr STYLE = style_generator() def customize_shape(shape): global STYLE param = shape.shapeparam style = next(STYLE) update_style_attr(style, param) param.update_shape(shape) shape.plot().replot() def create_window(): gridparam = make.gridparam(background="black", minor_enabled=(False, False), major_style=(".", "gray", 1))
def generate_styles(num_curves): from guiqwt.styles import style_generator styles = style_generator() return [next(styles) for _ in range(num_curves)]
# Licensed under the terms of the CECILL License # (see guiqwt/__init__.py for details) """Shows how to customize a shape created with a tool like RectangleTool""" SHOW = True # Show test in GUI-based test launcher import os.path as osp from guiqwt.plot import ImageDialog from guiqwt.tools import (RectangleTool, EllipseTool, SegmentTool, MultiLineTool, FreeFormTool) from guiqwt.builder import make from guiqwt.styles import style_generator, update_style_attr STYLE = style_generator() def customize_shape(shape): global STYLE param = shape.shapeparam style = next(STYLE) update_style_attr(style, param) param.update_shape(shape) shape.plot().replot() def create_window(): gridparam = make.gridparam(background="black", minor_enabled=(False, False), major_style=(".", "gray", 1)) win = ImageDialog(edit=False, toolbar=True, wintitle="All image and plot tools test",
def __init__(self): self.style = style_generator()
def generate_styles(num_curves): styles = style_generator() return [next(styles) for _ in range(num_curves)]