示例#1
0
    def eventFilter(self, ob, ev):

        if (hasattr(plplot, "semaphore")):
            if (plplot.owner is not self):
                plplot.semaphore.acquire()
                plplot.owner = self
        plplot.plsstrm(self.ipls)

        print " intercettato event ", ev.type()

        if (self.count == 1):
            self.Init()
            self.is_created = 1
            self.count = 2

        if (self.is_created):
            print " EVENTO = ", ev.type(), " ", qt.QEvent.Resize
            if (ev.type() == qt.QEvent.Paint):
                plplot_widget.plexpose()
                timer = qt.QTimer(self)
                self.connect(timer, qt.SIGNAL("timeout()"), self.exposeQUIET)
                timer.start(0, 1)
                return 1
            elif (ev.type() == qt.QEvent.Resize):
                print " RESIZE "
                self.resizeQUIET()
                return 1
            else:
                if (ev.type() == 12):
                    plplot_widget.plexpose()
        if (hasattr(plplot, "semaphore")):
            plplot.semaphore.release()

        return 0
示例#2
0
   def eventFilter(self,ob,ev):

      if(hasattr(plplot,"semaphore")):
        if(plplot.owner is not self): 
           plplot.semaphore.acquire()
           plplot.owner=self
      plplot.plsstrm(self.ipls)

      print " intercettato event ",  ev.type() 
      
      if(self.count==1):
        self.Init()
        self.is_created=1
        self.count=2
  
      if(self.is_created):
        print " EVENTO = ",ev.type() , " ", qt.QEvent.Resize
        if(ev.type()==qt.QEvent.Paint):
	  plplot_widget.plexpose()
          timer =  qt.QTimer( self )
	  self.connect( timer, qt.SIGNAL("timeout()"), self.exposeQUIET)
	  timer.start( 0, 1)
          return 1
        elif(ev.type()==qt.QEvent.Resize):
          print " RESIZE "
          self.resizeQUIET()  
          return 1
        else:
          if(ev.type()==12) :
	   plplot_widget.plexpose();
      if(hasattr(plplot,"semaphore")):
        plplot.semaphore.release()
  
      return 0
示例#3
0
 def exposeQUIET(self):
     if (hasattr(plplot, "semaphore")):
         if (plplot.owner is not self):
             plplot.semaphore.acquire()
             plplot.owner = self
     plplot.plsstrm(self.ipls)
     plplot_widget.plexpose()
     if (hasattr(plplot, "semaphore")):
         plplot.semaphore.release()
示例#4
0
 def exposeQUIET(self):
    if(hasattr(plplot,"semaphore")):
      if(plplot.owner is not self): 
         plplot.semaphore.acquire()
         plplot.owner=self
    plplot.plsstrm(self.ipls)
    plplot_widget.plexpose()
    if(hasattr(plplot,"semaphore")):
      plplot.semaphore.release()