def __init__(self,
              parent=None,
              designMode=False,
              toolbar=True,
              stackMode='deltatime',
              buffersize=512,
              options=None,
              **kwargs):
     '''see :class:`guiqwt.plot.ImageDialog` for other valid initialization parameters'''
     defaultOptions = dict(lock_aspect_ratio=False)
     if options is not None:
         defaultOptions.update(options)
     ImageDialog.__init__(self,
                          parent=parent,
                          toolbar=toolbar,
                          options=defaultOptions,
                          **kwargs)
     TaurusBaseWidget.__init__(self, "TaurusTrend2DDialog")
     self.trendItem = None
     self.buffersize = buffersize
     self._useArchiving = False
     self._stackMode = stackMode
     self.setStackMode(stackMode)
     self.setWindowFlags(Qt.Qt.Widget)
     # add some tools
     for toolklass in (TaurusModelChooserTool, AutoScrollTool):
         self.add_tool(toolklass)
     self.get_tool(TaurusModelChooserTool).singleModel = True
     self.setModifiableByUser(self._modifiableByUser)
     self.setContextMenuPolicy(Qt.Qt.CustomContextMenu)
Beispiel #2
0
 def __init__(self, parent=None, designMode=False, toolbar=True, **kwargs):
     '''see :class:`guiqwt.plot.ImageDialog` for other valid initialization parameters'''
     ImageDialog.__init__(self, parent=parent, toolbar=toolbar, **kwargs)
     TaurusBaseWidget.__init__(self, 'TaurusImageDialog')
     self.setWindowFlags(Qt.Qt.Widget)
     self.imgItem = None
     from taurus.qt.qtgui.extra_guiqwt.tools import TaurusModelChooserTool
     self.add_tool(TaurusModelChooserTool, singleModel=True)
     self.setModifiableByUser(True)
     self.setContextMenuPolicy(Qt.Qt.CustomContextMenu)
Beispiel #3
0
 def __init__(self, parent, wintitle=None, options=None, resize_to=None):
     if wintitle is None:
         wintitle = _("Rotate & Crop")
     ImageDialog.__init__(self, wintitle=wintitle, edit=True,
                          toolbar=False, options=options, parent=parent)
     if resize_to is not None:
         width, height = resize_to
         self.resize(width, height)
     self.accepted.connect(self.accept_changes)
     self.rejected.connect(self.reject_changes)
Beispiel #4
0
 def __init__(self, parent=None, designMode=False, toolbar=True,
              stackMode='deltatime', buffersize=512, options=None, **kwargs):
     """see :class:`guiqwt.plot.ImageDialog` for other valid initialization
     parameters"""
     defaultOptions = dict(lock_aspect_ratio=False)
     if options is not None:
         defaultOptions.update(options)
     ImageDialog.__init__(self, parent=parent, toolbar=toolbar,
                          options=defaultOptions, **kwargs)
     TaurusBaseWidget.__init__(self, "TaurusTrend2DDialog")
     self.trendItem = None
     self.buffersize = buffersize
     self._useArchiving = False
     self._stackMode = stackMode
     self.setStackMode(stackMode)
     self.setWindowFlags(Qt.Qt.Widget)
     # add some tools
     for toolklass in (TaurusModelChooserTool, AutoScrollTool):
         self.add_tool(toolklass)
     self.get_tool(TaurusModelChooserTool).singleModel = True
     self.setModifiableByUser(self._modifiableByUser)
     self.setContextMenuPolicy(Qt.Qt.CustomContextMenu)
     self.registerConfigDelegate(self.get_tool(AutoScrollTool))
Beispiel #5
0
    def __init__(self,
                 parent=None,
                 designMode=False,
                 toolbar=True,
                 stackMode='deltatime',
                 buffersize=512,
                 options=None,
                 autoscale='xyz',
                 **kwargs):
        """

        :param param: param to be passed to XYImageItem constructor
        :param buffersize: (int) size of the stack
        :param stackMode: (str) can be 'datetime', 'timedelta' or 'event'
        :param autoscale: (str) if autscale string contains 'x', the x axis 
                          will be autoscaled. Same with 'y' and 'z'.
                          Defaults to 'xyz'
        """
        """see :class:`guiqwt.plot.ImageDialog` for other valid initialization
        parameters"""
        defaultOptions = dict(lock_aspect_ratio=False)
        if options is not None:
            defaultOptions.update(options)
        ImageDialog.__init__(self,
                             parent=parent,
                             toolbar=toolbar,
                             options=defaultOptions,
                             **kwargs)
        TaurusBaseWidget.__init__(self, "TaurusTrend2DDialog")
        self.trendItem = None
        self.buffersize = buffersize
        self._useArchiving = False
        self._stackMode = stackMode
        self.setStackMode(stackMode)
        self.setWindowFlags(Qt.Qt.Widget)
        # add some tools
        for toolklass in (TaurusModelChooserTool, AutoScrollTool,
                          AutoScaleXTool, AutoScaleYTool, AutoScaleZTool):
            self.add_tool(toolklass)
        self.get_tool(TaurusModelChooserTool).singleModel = True

        if 'x' in autoscale.lower():
            self.get_tool(AutoScaleXTool).setChecked(True)
        if 'y' in autoscale.lower():
            self.get_tool(AutoScaleYTool).setChecked(True)
        if 'z' in autoscale.lower():
            self.get_tool(AutoScaleZTool).setChecked(True)

        self.setModifiableByUser(self._modifiableByUser)
        self.setContextMenuPolicy(Qt.Qt.CustomContextMenu)

        # Config properties
        self.setModelInConfig(True)
        self.registerConfigDelegate(self.trendItem or BaseConfigurableClass(),
                                    name='trendItem')
        self.registerConfigDelegate(self.get_tool(AutoScrollTool),
                                    name='AutoScrollTool')
        self.registerConfigDelegate(self.get_tool(AutoScaleXTool),
                                    name='AutoScaleXTool')
        self.registerConfigDelegate(self.get_tool(AutoScaleYTool),
                                    name='AutoScaleYTool')
        self.registerConfigDelegate(self.get_tool(AutoScaleZTool),
                                    name='AutoScaleZTool')
        self.registerConfigProperty(self.getStackMode, self.setStackMode,
                                    'stackMode')
        self.registerConfigProperty(self._get_axes_conf, self._set_axes_conf,
                                    'axes_confs')