Utilities/AutoSaver.py

changeset 1131
7781e396c903
parent 945
8cd4d08fa9f6
child 1509
c0b5e693b0eb
equal deleted inserted replaced
1130:3e9f0330f833 1131:7781e396c903
22 Constructor 22 Constructor
23 23
24 @param parent reference to the parent object (QObject) 24 @param parent reference to the parent object (QObject)
25 @param save slot to be called to perform the save operation 25 @param save slot to be called to perform the save operation
26 """ 26 """
27 QObject.__init__(self, parent) 27 super().__init__(parent)
28 28
29 if parent is None: 29 if parent is None:
30 raise RuntimeError("AutoSaver: parent must not be None.") 30 raise RuntimeError("AutoSaver: parent must not be None.")
31 31
32 self.__save = save 32 self.__save = save
53 @param evt reference to the timer event (QTimerEvent) 53 @param evt reference to the timer event (QTimerEvent)
54 """ 54 """
55 if evt.timerId() == self.__timer.timerId(): 55 if evt.timerId() == self.__timer.timerId():
56 self.saveIfNeccessary() 56 self.saveIfNeccessary()
57 else: 57 else:
58 QObject.timerEvent(self, evt) 58 super().timerEvent(evt)
59 59
60 def saveIfNeccessary(self): 60 def saveIfNeccessary(self):
61 """ 61 """
62 Public method to activate the save operation. 62 Public method to activate the save operation.
63 """ 63 """

eric ide

mercurial