Пример #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')
Пример #2
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.action.setChecked,
                                 'actionChecked')
Пример #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)
Пример #4
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)
Пример #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')
Пример #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)
Пример #7
0
 def register_plot(self, baseplot):
     ToggleTool.register_plot(self, baseplot)
     self.connect(baseplot, SIG_ITEMS_CHANGED, self.items_changed)