Beispiel #1
0
    def start(self, close=False):
        # Create plot window
        win = self.WIN_CLASS(toolbar=True, wintitle=self.name)
        win.show()
        QApplication.processEvents()
        plot = win.get_plot()

        # Create item (ignore this step in benchmark result!)
        self.make_item()

        # Benchmarking
        t0 = time.time()
        self.add_to_plot(plot)
        print(self.name + ':')
        print("    N  = %d" % self.nsamples)
        plot.replot()  # Force replot
        print("    dt = %d ms" % ((time.time() - t0) * 1e3))
        if close:
            win.close()
Beispiel #2
0
 def start(self, close=False):
     # Create plot window
     win = self.WIN_CLASS(toolbar=True, wintitle=self.name)
     win.show()
     QApplication.processEvents()
     plot = win.get_plot()
     
     # Create item (ignore this step in benchmark result!)
     self.make_item()
     
     # Benchmarking
     t0 = time.time()
     self.add_to_plot(plot)
     print(self.name+':')
     print("    N  = %d" % self.nsamples)
     plot.replot()  # Force replot
     print("    dt = %d ms" % ((time.time()-t0)*1e3))
     if close:
         win.close()
Beispiel #3
0
 def xcsw_is_visible(self, state):
     if state:
         QApplication.processEvents()
         self.adjust_ycsw_height()
     else:
         self.adjust_ycsw_height(0)
Beispiel #4
0
 def adjust_ycsw_height(self, height=None):
     if height is None:
         height = self.xcsw.height() - self.ycsw.toolbar.height()
     self.ycsw.adjust_height(height)
     if height:
         QApplication.processEvents()
Beispiel #5
0
 def xcsw_is_visible(self, state):
     if state:
         QApplication.processEvents()
         self.adjust_ycsw_height()
     else:
         self.adjust_ycsw_height(0)
Beispiel #6
0
 def adjust_ycsw_height(self, height=None):
     if height is None:
         height = self.xcsw.height()-self.ycsw.toolbar.height()
     self.ycsw.adjust_height(height)
     if height:
         QApplication.processEvents()