src/eric7/Utilities/AutoSaver.py

branch
eric7
changeset 10433
328f3ec4b77a
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10432:2fe91fe443dd 10433:328f3ec4b77a
20 20
21 def __init__(self, parent, save): 21 def __init__(self, parent, save):
22 """ 22 """
23 Constructor 23 Constructor
24 24
25 @param parent reference to the parent object (QObject) 25 @param parent reference to the parent object
26 @type QObject
26 @param save slot to be called to perform the save operation 27 @param save slot to be called to perform the save operation
28 @type function
27 @exception RuntimeError raised, if no parent is given 29 @exception RuntimeError raised, if no parent is given
28 """ 30 """
29 super().__init__(parent) 31 super().__init__(parent)
30 32
31 if parent is None: 33 if parent is None:
50 52
51 def timerEvent(self, evt): 53 def timerEvent(self, evt):
52 """ 54 """
53 Protected method handling timer events. 55 Protected method handling timer events.
54 56
55 @param evt reference to the timer event (QTimerEvent) 57 @param evt reference to the timer event
58 @type QTimerEvent
56 """ 59 """
57 if evt.timerId() == self.__timer.timerId(): 60 if evt.timerId() == self.__timer.timerId():
58 self.saveIfNeccessary() 61 self.saveIfNeccessary()
59 else: 62 else:
60 super().timerEvent(evt) 63 super().timerEvent(evt)

eric ide

mercurial