Ejemplo n.º 1
0
 def eventFilter(self, source, event):
     # currently the only source is the raw plot window
     if event.type() == QEvent.Close:
         self.data_changed()
         bads = self.model.current["data"].info["bads"]
         if self.bads != bads:
             self.model.history.append(f'data.info["bads"] = {bads}')
     return QObject.eventFilter(self, source, event)
Ejemplo n.º 2
0
 def eventFilter(self, obj: QObject, event: QEvent):
     if obj.objectName() == "lineEdit":
         if event.type() == QEvent.DragEnter:
             new_method.lineEdit_dragEnterEvent(event)
             return True
         if event.type() == QEvent.Drop:
             new_method.lineEdit_dropEvent(self, event)
             return True
     return QObject.eventFilter(self, obj, event)
Ejemplo n.º 3
0
    def eventFilter(self, watched, event):
        if watched == QCoreApplication.instance():
            if event.type() == QEvent.ApplicationFontChange:
                self.update()

        return QObject.eventFilter(watched, event)