예제 #1
0
 def event(self, event):
     """ Emits activated() signal if correct event occures and if correct changeEvent occured before.
     
     Also see changeEvent().
     The Application shall connect to windowActivated().
     """
     QMainWindow.event(self, event)
     if self._justActivated and event.type() == QEvent.LayoutRequest:
         self._justActivated = False
         self.emit(SIGNAL("windowActivated()"))
     elif event.type()==QEvent.WindowActivate:
         self.emit(SIGNAL("windowActivated()"))
     return False
예제 #2
0
 def event(self, event):
     """ Emits activated() signal if correct event occures and if correct changeEvent occured before.
     
     Also see changeEvent().
     The Application shall connect to windowActivated().
     """
     QMainWindow.event(self, event)
     if self._justActivated and event.type() == QEvent.LayoutRequest:
         self._justActivated = False
         self.emit(SIGNAL("windowActivated()"))
     elif event.type() == QEvent.WindowActivate:
         self.emit(SIGNAL("windowActivated()"))
     return False
예제 #3
0
 def event(self, event):
     if isinstance(event, algo.NextImage):
         dlg = self.copy_dlg
         if dlg is not None:
             dlg.imageProgress.setValue(event.currentImage)
             dlg.pointProgress.setMaximum(event.nbPoints)
             dlg.pointProgress.setValue(0)
         return True
     elif isinstance(event, algo.NextPoint):
         dlg = self.copy_dlg
         if dlg is not None:
             dlg.pointProgress.setValue(event.currentPoint)
         return True
     elif isinstance(event, algo.FoundAll):
         dlg = self.copy_dlg
         if dlg is not None:
             self.cancelCopy()
             dlg.accept()
         return True
     elif isinstance(event, algo.Aborted):
         dlg = self.copy_dlg
         if dlg is not None:
             self.cancelCopy()
             dlg.accept()
         return True
     return QMainWindow.event(self, event)
예제 #4
0
파일: mainwindow.py 프로젝트: vertrex/DFF
 def event(self, event):
     mouse_status = int(QApplication.mouseButtons())
     # if updating tabbar while mouse pressed, behaviour can be weird
     if mouse_status & 0x00000001 == 0 and self.__tabMoved:
         self.__tabMoved = False
         self.updateTabBar()
     return QMainWindow.event(self, event)
예제 #5
0
 def event(self, event):
     if isinstance(event, algo.NextImage):
         dlg = self.copy_dlg
         if dlg is not None:
             dlg.imageProgress.setValue(event.currentImage)
             dlg.pointProgress.setMaximum(event.nbPoints)
             dlg.pointProgress.setValue(0)
         return True
     elif isinstance(event, algo.NextPoint):
         dlg = self.copy_dlg
         if dlg is not None:
             dlg.pointProgress.setValue(event.currentPoint)
         return True
     elif isinstance(event, algo.FoundAll):
         dlg = self.copy_dlg
         if dlg is not None:
             self.cancelCopy()
             dlg.accept()
         return True
     elif isinstance(event, algo.Aborted):
         dlg = self.copy_dlg
         if dlg is not None:
             self.cancelCopy()
             dlg.accept()
         return True
     return QMainWindow.event(self, event)
예제 #6
0
 def event(self, event):
     if event.type() == QEvent.WindowActivate:
         self.guiHandler.windowActivated()
     return QMainWindow.event(self, event)