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
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
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)
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)
def event(self, event): if event.type() == QEvent.WindowActivate: self.guiHandler.windowActivated() return QMainWindow.event(self, event)