|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Utilities.AutoSaver</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.Utilities.AutoSaver</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing an auto saver class. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#AutoSaver">AutoSaver</a></td> |
|
25 <td>Class implementing the auto saver.</td> |
|
26 </tr> |
|
27 </table> |
|
28 <h3>Functions</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <hr /> |
|
34 <hr /> |
|
35 <a NAME="AutoSaver" ID="AutoSaver"></a> |
|
36 <h2>AutoSaver</h2> |
|
37 |
|
38 <p> |
|
39 Class implementing the auto saver. |
|
40 </p> |
|
41 <h3>Derived from</h3> |
|
42 QObject |
|
43 <h3>Class Attributes</h3> |
|
44 |
|
45 <table> |
|
46 <tr><td>AUTOSAVE_IN</td></tr><tr><td>MAXWAIT</td></tr> |
|
47 </table> |
|
48 <h3>Class Methods</h3> |
|
49 |
|
50 <table> |
|
51 <tr><td>None</td></tr> |
|
52 </table> |
|
53 <h3>Methods</h3> |
|
54 |
|
55 <table> |
|
56 |
|
57 <tr> |
|
58 <td><a href="#AutoSaver.__init__">AutoSaver</a></td> |
|
59 <td>Constructor</td> |
|
60 </tr> |
|
61 <tr> |
|
62 <td><a href="#AutoSaver.changeOccurred">changeOccurred</a></td> |
|
63 <td>Public slot handling a change.</td> |
|
64 </tr> |
|
65 <tr> |
|
66 <td><a href="#AutoSaver.saveIfNeccessary">saveIfNeccessary</a></td> |
|
67 <td>Public method to activate the save operation.</td> |
|
68 </tr> |
|
69 <tr> |
|
70 <td><a href="#AutoSaver.timerEvent">timerEvent</a></td> |
|
71 <td>Protected method handling timer events.</td> |
|
72 </tr> |
|
73 </table> |
|
74 <h3>Static Methods</h3> |
|
75 |
|
76 <table> |
|
77 <tr><td>None</td></tr> |
|
78 </table> |
|
79 |
|
80 <a NAME="AutoSaver.__init__" ID="AutoSaver.__init__"></a> |
|
81 <h4>AutoSaver (Constructor)</h4> |
|
82 <b>AutoSaver</b>(<i>parent, save</i>) |
|
83 |
|
84 <p> |
|
85 Constructor |
|
86 </p> |
|
87 <dl> |
|
88 |
|
89 <dt><i>parent</i></dt> |
|
90 <dd> |
|
91 reference to the parent object (QObject) |
|
92 </dd> |
|
93 <dt><i>save</i></dt> |
|
94 <dd> |
|
95 slot to be called to perform the save operation |
|
96 </dd> |
|
97 </dl> |
|
98 <dl> |
|
99 |
|
100 <dt>Raises <b>RuntimeError</b>:</dt> |
|
101 <dd> |
|
102 raised, if no parent is given |
|
103 </dd> |
|
104 </dl> |
|
105 <a NAME="AutoSaver.changeOccurred" ID="AutoSaver.changeOccurred"></a> |
|
106 <h4>AutoSaver.changeOccurred</h4> |
|
107 <b>changeOccurred</b>(<i></i>) |
|
108 |
|
109 <p> |
|
110 Public slot handling a change. |
|
111 </p> |
|
112 <a NAME="AutoSaver.saveIfNeccessary" ID="AutoSaver.saveIfNeccessary"></a> |
|
113 <h4>AutoSaver.saveIfNeccessary</h4> |
|
114 <b>saveIfNeccessary</b>(<i></i>) |
|
115 |
|
116 <p> |
|
117 Public method to activate the save operation. |
|
118 </p> |
|
119 <a NAME="AutoSaver.timerEvent" ID="AutoSaver.timerEvent"></a> |
|
120 <h4>AutoSaver.timerEvent</h4> |
|
121 <b>timerEvent</b>(<i>evt</i>) |
|
122 |
|
123 <p> |
|
124 Protected method handling timer events. |
|
125 </p> |
|
126 <dl> |
|
127 |
|
128 <dt><i>evt</i></dt> |
|
129 <dd> |
|
130 reference to the timer event (QTimerEvent) |
|
131 </dd> |
|
132 </dl> |
|
133 <div align="right"><a href="#top">Up</a></div> |
|
134 <hr /> |
|
135 </body></html> |