Esempio n. 1
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)
Esempio n. 2
0
File: tools.py Progetto: 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)
Esempio n. 3
0
 def register_plot(self, baseplot):
     ToggleTool.register_plot(self, baseplot)
     baseplot.SIG_ITEMS_CHANGED.connect(self.items_changed)
     self.__plot = weakref.ref(baseplot)
Esempio n. 4
0
 def register_plot(self, baseplot):
     ToggleTool.register_plot(self, baseplot)
     self.connect(baseplot, SIG_ITEMS_CHANGED, self.items_changed)