예제 #1
0
파일: qplplot.py 프로젝트: sihmehmet/DAKOTA
    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
파일: qplplot.py 프로젝트: sihmehmet/DAKOTA
 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()