eric6/Documentation/Source/eric6.VCS.StatusMonitorThread.html

changeset 7273
391d6b7b1eff
parent 6942
2602857055c5
child 7989
a21d673a8f99
equal deleted inserted replaced
7272:1779dc278077 7273:391d6b7b1eff
16 16
17 a { color: #BA6D36; } 17 a { color: #BA6D36; }
18 18
19 </style> 19 </style>
20 </head> 20 </head>
21 <body><a NAME="top" ID="top"></a> 21 <body>
22 <a NAME="top" ID="top"></a>
22 <h1>eric6.VCS.StatusMonitorThread</h1> 23 <h1>eric6.VCS.StatusMonitorThread</h1>
24
23 <p> 25 <p>
24 Module implementing the VCS status monitor thread base class. 26 Module implementing the VCS status monitor thread base class.
25 </p> 27 </p>
26 <h3>Global Attributes</h3> 28 <h3>Global Attributes</h3>
29
27 <table> 30 <table>
28 <tr><td>None</td></tr> 31 <tr><td>None</td></tr>
29 </table> 32 </table>
30 <h3>Classes</h3> 33 <h3>Classes</h3>
31 <table> 34
35 <table>
36
32 <tr> 37 <tr>
33 <td><a href="#VcsStatusMonitorThread">VcsStatusMonitorThread</a></td> 38 <td><a href="#VcsStatusMonitorThread">VcsStatusMonitorThread</a></td>
34 <td>Class implementing the VCS status monitor thread base class.</td> 39 <td>Class implementing the VCS status monitor thread base class.</td>
35 </tr> 40 </tr>
36 </table> 41 </table>
37 <h3>Functions</h3> 42 <h3>Functions</h3>
38 <table> 43
39 <tr><td>None</td></tr> 44 <table>
40 </table> 45 <tr><td>None</td></tr>
41 <hr /><hr /> 46 </table>
47 <hr />
48 <hr />
42 <a NAME="VcsStatusMonitorThread" ID="VcsStatusMonitorThread"></a> 49 <a NAME="VcsStatusMonitorThread" ID="VcsStatusMonitorThread"></a>
43 <h2>VcsStatusMonitorThread</h2> 50 <h2>VcsStatusMonitorThread</h2>
51
44 <p> 52 <p>
45 Class implementing the VCS status monitor thread base class. 53 Class implementing the VCS status monitor thread base class.
46 </p><h3>Signals</h3> 54 </p>
47 <dl> 55 <h3>Signals</h3>
56 <dl>
57
48 <dt>vcsStatusMonitorData(list of str)</dt> 58 <dt>vcsStatusMonitorData(list of str)</dt>
49 <dd> 59 <dd>
50 emitted to update the VCS status 60 emitted to update the VCS status
51 </dd><dt>vcsStatusMonitorInfo(str)</dt> 61 </dd>
62 <dt>vcsStatusMonitorInfo(str)</dt>
52 <dd> 63 <dd>
53 emitted to signal some info of the 64 emitted to signal some info of the
54 monitoring thread 65 monitoring thread
55 </dd><dt>vcsStatusMonitorStatus(str, str)</dt> 66 </dd>
67 <dt>vcsStatusMonitorStatus(str, str)</dt>
56 <dd> 68 <dd>
57 emitted to signal the status of 69 emitted to signal the status of
58 the monitoring thread (ok, nok, op) and a status message 70 the monitoring thread (ok, nok, op) and a status message
59 </dd> 71 </dd>
60 </dl> 72 </dl>
61 <h3>Derived from</h3> 73 <h3>Derived from</h3>
62 QThread 74 QThread
63 <h3>Class Attributes</h3> 75 <h3>Class Attributes</h3>
76
64 <table> 77 <table>
65 <tr><td>None</td></tr> 78 <tr><td>None</td></tr>
66 </table> 79 </table>
67 <h3>Class Methods</h3> 80 <h3>Class Methods</h3>
81
68 <table> 82 <table>
69 <tr><td>None</td></tr> 83 <tr><td>None</td></tr>
70 </table> 84 </table>
71 <h3>Methods</h3> 85 <h3>Methods</h3>
72 <table> 86
87 <table>
88
73 <tr> 89 <tr>
74 <td><a href="#VcsStatusMonitorThread.__init__">VcsStatusMonitorThread</a></td> 90 <td><a href="#VcsStatusMonitorThread.__init__">VcsStatusMonitorThread</a></td>
75 <td>Constructor</td> 91 <td>Constructor</td>
76 </tr><tr> 92 </tr>
93 <tr>
77 <td><a href="#VcsStatusMonitorThread._getInfo">_getInfo</a></td> 94 <td><a href="#VcsStatusMonitorThread._getInfo">_getInfo</a></td>
78 <td>Protected method implementing the real info action.</td> 95 <td>Protected method implementing the real info action.</td>
79 </tr><tr> 96 </tr>
97 <tr>
80 <td><a href="#VcsStatusMonitorThread._performMonitor">_performMonitor</a></td> 98 <td><a href="#VcsStatusMonitorThread._performMonitor">_performMonitor</a></td>
81 <td>Protected method implementing the real monitoring action.</td> 99 <td>Protected method implementing the real monitoring action.</td>
82 </tr><tr> 100 </tr>
101 <tr>
83 <td><a href="#VcsStatusMonitorThread._shutdown">_shutdown</a></td> 102 <td><a href="#VcsStatusMonitorThread._shutdown">_shutdown</a></td>
84 <td>Protected method performing shutdown actions.</td> 103 <td>Protected method performing shutdown actions.</td>
85 </tr><tr> 104 </tr>
105 <tr>
86 <td><a href="#VcsStatusMonitorThread.checkStatus">checkStatus</a></td> 106 <td><a href="#VcsStatusMonitorThread.checkStatus">checkStatus</a></td>
87 <td>Public method to wake up the status monitor thread.</td> 107 <td>Public method to wake up the status monitor thread.</td>
88 </tr><tr> 108 </tr>
109 <tr>
89 <td><a href="#VcsStatusMonitorThread.clearCachedState">clearCachedState</a></td> 110 <td><a href="#VcsStatusMonitorThread.clearCachedState">clearCachedState</a></td>
90 <td>Public method to clear the cached VCS state of a file/directory.</td> 111 <td>Public method to clear the cached VCS state of a file/directory.</td>
91 </tr><tr> 112 </tr>
113 <tr>
92 <td><a href="#VcsStatusMonitorThread.getAutoUpdate">getAutoUpdate</a></td> 114 <td><a href="#VcsStatusMonitorThread.getAutoUpdate">getAutoUpdate</a></td>
93 <td>Public method to retrieve the status of the auto update function.</td> 115 <td>Public method to retrieve the status of the auto update function.</td>
94 </tr><tr> 116 </tr>
117 <tr>
95 <td><a href="#VcsStatusMonitorThread.getInterval">getInterval</a></td> 118 <td><a href="#VcsStatusMonitorThread.getInterval">getInterval</a></td>
96 <td>Public method to get the monitor interval.</td> 119 <td>Public method to get the monitor interval.</td>
97 </tr><tr> 120 </tr>
121 <tr>
98 <td><a href="#VcsStatusMonitorThread.run">run</a></td> 122 <td><a href="#VcsStatusMonitorThread.run">run</a></td>
99 <td>Public method implementing the tasks action.</td> 123 <td>Public method implementing the tasks action.</td>
100 </tr><tr> 124 </tr>
125 <tr>
101 <td><a href="#VcsStatusMonitorThread.setAutoUpdate">setAutoUpdate</a></td> 126 <td><a href="#VcsStatusMonitorThread.setAutoUpdate">setAutoUpdate</a></td>
102 <td>Public method to enable the auto update function.</td> 127 <td>Public method to enable the auto update function.</td>
103 </tr><tr> 128 </tr>
129 <tr>
104 <td><a href="#VcsStatusMonitorThread.setInterval">setInterval</a></td> 130 <td><a href="#VcsStatusMonitorThread.setInterval">setInterval</a></td>
105 <td>Public method to change the monitor interval.</td> 131 <td>Public method to change the monitor interval.</td>
106 </tr><tr> 132 </tr>
133 <tr>
107 <td><a href="#VcsStatusMonitorThread.stop">stop</a></td> 134 <td><a href="#VcsStatusMonitorThread.stop">stop</a></td>
108 <td>Public method to stop the monitor thread.</td> 135 <td>Public method to stop the monitor thread.</td>
109 </tr> 136 </tr>
110 </table> 137 </table>
111 <h3>Static Methods</h3> 138 <h3>Static Methods</h3>
112 <table> 139
113 <tr><td>None</td></tr> 140 <table>
114 </table> 141 <tr><td>None</td></tr>
142 </table>
143
115 <a NAME="VcsStatusMonitorThread.__init__" ID="VcsStatusMonitorThread.__init__"></a> 144 <a NAME="VcsStatusMonitorThread.__init__" ID="VcsStatusMonitorThread.__init__"></a>
116 <h4>VcsStatusMonitorThread (Constructor)</h4> 145 <h4>VcsStatusMonitorThread (Constructor)</h4>
117 <b>VcsStatusMonitorThread</b>(<i>interval, project, vcs, parent=None</i>) 146 <b>VcsStatusMonitorThread</b>(<i>interval, project, vcs, parent=None</i>)
147
118 <p> 148 <p>
119 Constructor 149 Constructor
120 </p><dl> 150 </p>
151 <dl>
152
121 <dt><i>interval</i></dt> 153 <dt><i>interval</i></dt>
122 <dd> 154 <dd>
123 new interval in seconds (integer) 155 new interval in seconds (integer)
124 </dd><dt><i>project</i></dt> 156 </dd>
157 <dt><i>project</i></dt>
125 <dd> 158 <dd>
126 reference to the project object (Project) 159 reference to the project object (Project)
127 </dd><dt><i>vcs</i></dt> 160 </dd>
161 <dt><i>vcs</i></dt>
128 <dd> 162 <dd>
129 reference to the version control object 163 reference to the version control object
130 </dd><dt><i>parent</i></dt> 164 </dd>
165 <dt><i>parent</i></dt>
131 <dd> 166 <dd>
132 reference to the parent object (QObject) 167 reference to the parent object (QObject)
133 </dd> 168 </dd>
134 </dl><a NAME="VcsStatusMonitorThread._getInfo" ID="VcsStatusMonitorThread._getInfo"></a> 169 </dl>
170 <a NAME="VcsStatusMonitorThread._getInfo" ID="VcsStatusMonitorThread._getInfo"></a>
135 <h4>VcsStatusMonitorThread._getInfo</h4> 171 <h4>VcsStatusMonitorThread._getInfo</h4>
136 <b>_getInfo</b>(<i></i>) 172 <b>_getInfo</b>(<i></i>)
173
137 <p> 174 <p>
138 Protected method implementing the real info action. 175 Protected method implementing the real info action.
139 </p><p> 176 </p>
177 <p>
140 This method should be overridden and create a short info message to be 178 This method should be overridden and create a short info message to be
141 shown in the main window status bar right next to the status indicator. 179 shown in the main window status bar right next to the status indicator.
142 </p><dl> 180 </p>
181 <dl>
143 <dt>Returns:</dt> 182 <dt>Returns:</dt>
144 <dd> 183 <dd>
145 short info message 184 short info message
146 </dd> 185 </dd>
147 </dl><dl> 186 </dl>
187 <dl>
148 <dt>Return Type:</dt> 188 <dt>Return Type:</dt>
149 <dd> 189 <dd>
150 str 190 str
151 </dd> 191 </dd>
152 </dl><a NAME="VcsStatusMonitorThread._performMonitor" ID="VcsStatusMonitorThread._performMonitor"></a> 192 </dl>
193 <a NAME="VcsStatusMonitorThread._performMonitor" ID="VcsStatusMonitorThread._performMonitor"></a>
153 <h4>VcsStatusMonitorThread._performMonitor</h4> 194 <h4>VcsStatusMonitorThread._performMonitor</h4>
154 <b>_performMonitor</b>(<i></i>) 195 <b>_performMonitor</b>(<i></i>)
196
155 <p> 197 <p>
156 Protected method implementing the real monitoring action. 198 Protected method implementing the real monitoring action.
157 </p><p> 199 </p>
200 <p>
158 This method must be overridden and populate the statusList member 201 This method must be overridden and populate the statusList member
159 variable with a list of strings giving the status in the first column 202 variable with a list of strings giving the status in the first column
160 and the path relative to the project directory starting with the 203 and the path relative to the project directory starting with the
161 third column. The allowed status flags are: 204 third column. The allowed status flags are:
162 <ul> 205 <ul>
166 <li>"R" path was deleted and then re-added</li> 209 <li>"R" path was deleted and then re-added</li>
167 <li>"U" path needs an update</li> 210 <li>"U" path needs an update</li>
168 <li>"Z" path contains a conflict</li> 211 <li>"Z" path contains a conflict</li>
169 <li>" " path is back at normal</li> 212 <li>" " path is back at normal</li>
170 </ul> 213 </ul>
171 </p><dl> 214 </p>
215 <dl>
172 <dt>Returns:</dt> 216 <dt>Returns:</dt>
173 <dd> 217 <dd>
174 tuple of flag indicating successful operation (boolean) and 218 tuple of flag indicating successful operation (boolean) and
175 a status message in case of non successful operation (string) 219 a status message in case of non successful operation (string)
176 </dd> 220 </dd>
177 </dl><dl> 221 </dl>
222 <dl>
223
178 <dt>Raises <b>RuntimeError</b>:</dt> 224 <dt>Raises <b>RuntimeError</b>:</dt>
179 <dd> 225 <dd>
180 to indicate that this method must be 226 to indicate that this method must be
181 implemented by a subclass 227 implemented by a subclass
182 </dd> 228 </dd>
183 </dl><a NAME="VcsStatusMonitorThread._shutdown" ID="VcsStatusMonitorThread._shutdown"></a> 229 </dl>
230 <a NAME="VcsStatusMonitorThread._shutdown" ID="VcsStatusMonitorThread._shutdown"></a>
184 <h4>VcsStatusMonitorThread._shutdown</h4> 231 <h4>VcsStatusMonitorThread._shutdown</h4>
185 <b>_shutdown</b>(<i></i>) 232 <b>_shutdown</b>(<i></i>)
233
186 <p> 234 <p>
187 Protected method performing shutdown actions. 235 Protected method performing shutdown actions.
188 </p><p> 236 </p>
237 <p>
189 The default implementation does nothing. 238 The default implementation does nothing.
190 </p><a NAME="VcsStatusMonitorThread.checkStatus" ID="VcsStatusMonitorThread.checkStatus"></a> 239 </p>
240 <a NAME="VcsStatusMonitorThread.checkStatus" ID="VcsStatusMonitorThread.checkStatus"></a>
191 <h4>VcsStatusMonitorThread.checkStatus</h4> 241 <h4>VcsStatusMonitorThread.checkStatus</h4>
192 <b>checkStatus</b>(<i></i>) 242 <b>checkStatus</b>(<i></i>)
243
193 <p> 244 <p>
194 Public method to wake up the status monitor thread. 245 Public method to wake up the status monitor thread.
195 </p><a NAME="VcsStatusMonitorThread.clearCachedState" ID="VcsStatusMonitorThread.clearCachedState"></a> 246 </p>
247 <a NAME="VcsStatusMonitorThread.clearCachedState" ID="VcsStatusMonitorThread.clearCachedState"></a>
196 <h4>VcsStatusMonitorThread.clearCachedState</h4> 248 <h4>VcsStatusMonitorThread.clearCachedState</h4>
197 <b>clearCachedState</b>(<i>name</i>) 249 <b>clearCachedState</b>(<i>name</i>)
250
198 <p> 251 <p>
199 Public method to clear the cached VCS state of a file/directory. 252 Public method to clear the cached VCS state of a file/directory.
200 </p><dl> 253 </p>
254 <dl>
255
201 <dt><i>name</i></dt> 256 <dt><i>name</i></dt>
202 <dd> 257 <dd>
203 name of the entry to be cleared (string) 258 name of the entry to be cleared (string)
204 </dd> 259 </dd>
205 </dl><a NAME="VcsStatusMonitorThread.getAutoUpdate" ID="VcsStatusMonitorThread.getAutoUpdate"></a> 260 </dl>
261 <a NAME="VcsStatusMonitorThread.getAutoUpdate" ID="VcsStatusMonitorThread.getAutoUpdate"></a>
206 <h4>VcsStatusMonitorThread.getAutoUpdate</h4> 262 <h4>VcsStatusMonitorThread.getAutoUpdate</h4>
207 <b>getAutoUpdate</b>(<i></i>) 263 <b>getAutoUpdate</b>(<i></i>)
264
208 <p> 265 <p>
209 Public method to retrieve the status of the auto update function. 266 Public method to retrieve the status of the auto update function.
210 </p><dl> 267 </p>
268 <dl>
211 <dt>Returns:</dt> 269 <dt>Returns:</dt>
212 <dd> 270 <dd>
213 status of the auto update function (boolean) 271 status of the auto update function (boolean)
214 </dd> 272 </dd>
215 </dl><a NAME="VcsStatusMonitorThread.getInterval" ID="VcsStatusMonitorThread.getInterval"></a> 273 </dl>
274 <a NAME="VcsStatusMonitorThread.getInterval" ID="VcsStatusMonitorThread.getInterval"></a>
216 <h4>VcsStatusMonitorThread.getInterval</h4> 275 <h4>VcsStatusMonitorThread.getInterval</h4>
217 <b>getInterval</b>(<i></i>) 276 <b>getInterval</b>(<i></i>)
277
218 <p> 278 <p>
219 Public method to get the monitor interval. 279 Public method to get the monitor interval.
220 </p><dl> 280 </p>
281 <dl>
221 <dt>Returns:</dt> 282 <dt>Returns:</dt>
222 <dd> 283 <dd>
223 interval in seconds (integer) 284 interval in seconds (integer)
224 </dd> 285 </dd>
225 </dl><a NAME="VcsStatusMonitorThread.run" ID="VcsStatusMonitorThread.run"></a> 286 </dl>
287 <a NAME="VcsStatusMonitorThread.run" ID="VcsStatusMonitorThread.run"></a>
226 <h4>VcsStatusMonitorThread.run</h4> 288 <h4>VcsStatusMonitorThread.run</h4>
227 <b>run</b>(<i></i>) 289 <b>run</b>(<i></i>)
290
228 <p> 291 <p>
229 Public method implementing the tasks action. 292 Public method implementing the tasks action.
230 </p><a NAME="VcsStatusMonitorThread.setAutoUpdate" ID="VcsStatusMonitorThread.setAutoUpdate"></a> 293 </p>
294 <a NAME="VcsStatusMonitorThread.setAutoUpdate" ID="VcsStatusMonitorThread.setAutoUpdate"></a>
231 <h4>VcsStatusMonitorThread.setAutoUpdate</h4> 295 <h4>VcsStatusMonitorThread.setAutoUpdate</h4>
232 <b>setAutoUpdate</b>(<i>auto</i>) 296 <b>setAutoUpdate</b>(<i>auto</i>)
297
233 <p> 298 <p>
234 Public method to enable the auto update function. 299 Public method to enable the auto update function.
235 </p><dl> 300 </p>
301 <dl>
302
236 <dt><i>auto</i></dt> 303 <dt><i>auto</i></dt>
237 <dd> 304 <dd>
238 status of the auto update function (boolean) 305 status of the auto update function (boolean)
239 </dd> 306 </dd>
240 </dl><a NAME="VcsStatusMonitorThread.setInterval" ID="VcsStatusMonitorThread.setInterval"></a> 307 </dl>
308 <a NAME="VcsStatusMonitorThread.setInterval" ID="VcsStatusMonitorThread.setInterval"></a>
241 <h4>VcsStatusMonitorThread.setInterval</h4> 309 <h4>VcsStatusMonitorThread.setInterval</h4>
242 <b>setInterval</b>(<i>interval</i>) 310 <b>setInterval</b>(<i>interval</i>)
311
243 <p> 312 <p>
244 Public method to change the monitor interval. 313 Public method to change the monitor interval.
245 </p><dl> 314 </p>
315 <dl>
316
246 <dt><i>interval</i></dt> 317 <dt><i>interval</i></dt>
247 <dd> 318 <dd>
248 new interval in seconds (integer) 319 new interval in seconds (integer)
249 </dd> 320 </dd>
250 </dl><a NAME="VcsStatusMonitorThread.stop" ID="VcsStatusMonitorThread.stop"></a> 321 </dl>
322 <a NAME="VcsStatusMonitorThread.stop" ID="VcsStatusMonitorThread.stop"></a>
251 <h4>VcsStatusMonitorThread.stop</h4> 323 <h4>VcsStatusMonitorThread.stop</h4>
252 <b>stop</b>(<i></i>) 324 <b>stop</b>(<i></i>)
325
253 <p> 326 <p>
254 Public method to stop the monitor thread. 327 Public method to stop the monitor thread.
255 </p> 328 </p>
256 <div align="right"><a href="#top">Up</a></div> 329 <div align="right"><a href="#top">Up</a></div>
257 <hr /> 330 <hr />

eric ide

mercurial