Ejemplo n.º 1
0
 def __init__(self, manager, scrollFactor=0.2, toolbar_id=None):
     ToggleTool.__init__(self, manager, title='Auto Scroll', icon=None,
             tip='Force X scale to always show the last value',
             toolbar_id=toolbar_id)
     BaseConfigurableClass.__init__(self)
     self.scrollFactor = scrollFactor
     self.registerConfigProperty(self.action.isChecked,
                                 self.setChecked,
                                 'actionChecked')
Ejemplo n.º 2
0
Archivo: tools.py Proyecto: cmft/taurus
 def __init__(self, manager, scrollFactor=0.2, toolbar_id=None):
     ToggleTool.__init__(self, manager, title='Auto Scroll', icon=None,
             tip='Force X scale to always show the last value',
             toolbar_id=toolbar_id)
     BaseConfigurableClass.__init__(self)
     self.scrollFactor = scrollFactor
     self.registerConfigProperty(self.action.isChecked,
                                 self.action.setChecked,
                                 'actionChecked')
Ejemplo n.º 3
0
 def register_plot(self, baseplot):
     ToggleTool.register_plot(self, baseplot)
     # TODO: drop support for guiqwt2 once we support guiqwt3
     import guiqwt
     _guiqwt_major_version = int(guiqwt.__version__.split('.')[0])
     if _guiqwt_major_version < 3:
         from guiqwt.signals import SIG_ITEMS_CHANGED
         baseplot.connect(baseplot, SIG_ITEMS_CHANGED, self.items_changed)
     else:
         baseplot.SIG_ITEMS_CHANGED.connect(self.items_changed)
Ejemplo n.º 4
0
Archivo: tools.py Proyecto: cmft/taurus
 def register_plot(self, baseplot):
     ToggleTool.register_plot(self, baseplot)
     # TODO: drop support for guiqwt2 once we support guiqwt3
     import guiqwt
     _guiqwt_major_version = int(guiqwt.__version__.split('.')[0])
     if _guiqwt_major_version < 3:
         from guiqwt.signals import SIG_ITEMS_CHANGED
         baseplot.connect(baseplot, SIG_ITEMS_CHANGED, self.items_changed)
     else:
         baseplot.SIG_ITEMS_CHANGED.connect(self.items_changed)
Ejemplo n.º 5
0
 def __init__(self, manager, axis, toolbar_id=None):
     ToggleTool.__init__(self,
                         manager,
                         title='Auto-scale %s axis' % axis,
                         icon=None,
                         tip='Auto-scale %s axis when data changes',
                         toolbar_id=toolbar_id)
     BaseConfigurableClass.__init__(self)
     self.axis = axis
     self.registerConfigProperty(self.action.isChecked, self.setChecked,
                                 'actionChecked')
Ejemplo n.º 6
0
 def register_plot(self, baseplot):
     ToggleTool.register_plot(self, baseplot)
     baseplot.SIG_ITEMS_CHANGED.connect(self.items_changed)
     self.__plot = weakref.ref(baseplot)
Ejemplo n.º 7
0
 def register_plot(self, baseplot):
     ToggleTool.register_plot(self, baseplot)
     self.connect(baseplot, SIG_ITEMS_CHANGED, self.items_changed)