Documentation/Source/eric6.VCS.StatusMonitorThread.html

changeset 3673
e26d7d0c1088
child 6529
1c2968f124b7
equal deleted inserted replaced
3670:f0cb7579c0b4 3673:e26d7d0c1088
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.VCS.StatusMonitorThread</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body><a NAME="top" ID="top"></a>
22 <h1>eric6.VCS.StatusMonitorThread</h1>
23 <p>
24 Module implementing the VCS status monitor thread base class.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>None</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#VcsStatusMonitorThread">VcsStatusMonitorThread</a></td>
34 <td>Class implementing the VCS status monitor thread base class.</td>
35 </tr>
36 </table>
37 <h3>Functions</h3>
38 <table>
39 <tr><td>None</td></tr>
40 </table>
41 <hr /><hr />
42 <a NAME="VcsStatusMonitorThread" ID="VcsStatusMonitorThread"></a>
43 <h2>VcsStatusMonitorThread</h2>
44 <p>
45 Class implementing the VCS status monitor thread base class.
46 </p><h3>Signals</h3>
47 <dl>
48 <dt>vcsStatusMonitorData(list of str)</dt>
49 <dd>
50 emitted to update the VCS status
51 </dd><dt>vcsStatusMonitorStatus(str, str)</dt>
52 <dd>
53 emitted to signal the status of
54 the monitoring thread (ok, nok, op) and a status message
55 </dd>
56 </dl>
57 <h3>Derived from</h3>
58 QThread
59 <h3>Class Attributes</h3>
60 <table>
61 <tr><td>None</td></tr>
62 </table>
63 <h3>Class Methods</h3>
64 <table>
65 <tr><td>None</td></tr>
66 </table>
67 <h3>Methods</h3>
68 <table>
69 <tr>
70 <td><a href="#VcsStatusMonitorThread.__init__">VcsStatusMonitorThread</a></td>
71 <td>Constructor</td>
72 </tr><tr>
73 <td><a href="#VcsStatusMonitorThread._performMonitor">_performMonitor</a></td>
74 <td>Protected method implementing the real monitoring action.</td>
75 </tr><tr>
76 <td><a href="#VcsStatusMonitorThread._shutdown">_shutdown</a></td>
77 <td>Protected method performing shutdown actions.</td>
78 </tr><tr>
79 <td><a href="#VcsStatusMonitorThread.checkStatus">checkStatus</a></td>
80 <td>Public method to wake up the status monitor thread.</td>
81 </tr><tr>
82 <td><a href="#VcsStatusMonitorThread.clearCachedState">clearCachedState</a></td>
83 <td>Public method to clear the cached VCS state of a file/directory.</td>
84 </tr><tr>
85 <td><a href="#VcsStatusMonitorThread.getAutoUpdate">getAutoUpdate</a></td>
86 <td>Public method to retrieve the status of the auto update function.</td>
87 </tr><tr>
88 <td><a href="#VcsStatusMonitorThread.getInterval">getInterval</a></td>
89 <td>Public method to get the monitor interval.</td>
90 </tr><tr>
91 <td><a href="#VcsStatusMonitorThread.run">run</a></td>
92 <td>Public method implementing the tasks action.</td>
93 </tr><tr>
94 <td><a href="#VcsStatusMonitorThread.setAutoUpdate">setAutoUpdate</a></td>
95 <td>Public method to enable the auto update function.</td>
96 </tr><tr>
97 <td><a href="#VcsStatusMonitorThread.setInterval">setInterval</a></td>
98 <td>Public method to change the monitor interval.</td>
99 </tr><tr>
100 <td><a href="#VcsStatusMonitorThread.stop">stop</a></td>
101 <td>Public method to stop the monitor thread.</td>
102 </tr>
103 </table>
104 <h3>Static Methods</h3>
105 <table>
106 <tr><td>None</td></tr>
107 </table>
108 <a NAME="VcsStatusMonitorThread.__init__" ID="VcsStatusMonitorThread.__init__"></a>
109 <h4>VcsStatusMonitorThread (Constructor)</h4>
110 <b>VcsStatusMonitorThread</b>(<i>interval, project, vcs, parent=None</i>)
111 <p>
112 Constructor
113 </p><dl>
114 <dt><i>interval</i></dt>
115 <dd>
116 new interval in seconds (integer)
117 </dd><dt><i>project</i></dt>
118 <dd>
119 reference to the project object (Project)
120 </dd><dt><i>vcs</i></dt>
121 <dd>
122 reference to the version control object
123 </dd><dt><i>parent</i></dt>
124 <dd>
125 reference to the parent object (QObject)
126 </dd>
127 </dl><a NAME="VcsStatusMonitorThread._performMonitor" ID="VcsStatusMonitorThread._performMonitor"></a>
128 <h4>VcsStatusMonitorThread._performMonitor</h4>
129 <b>_performMonitor</b>(<i></i>)
130 <p>
131 Protected method implementing the real monitoring action.
132 </p><p>
133 This method must be overridden and populate the statusList member
134 variable with a list of strings giving the status in the first column
135 and the path relative to the project directory starting with the
136 third column. The allowed status flags are:
137 <ul>
138 <li>"A" path was added but not yet comitted</li>
139 <li>"M" path has local changes</li>
140 <li>"O" path was removed</li>
141 <li>"R" path was deleted and then re-added</li>
142 <li>"U" path needs an update</li>
143 <li>"Z" path contains a conflict</li>
144 <li>" " path is back at normal</li>
145 </ul>
146 </p><dl>
147 <dt>Returns:</dt>
148 <dd>
149 tuple of flag indicating successful operation (boolean) and
150 a status message in case of non successful operation (string)
151 </dd>
152 </dl><dl>
153 <dt>Raises <b>RuntimeError</b>:</dt>
154 <dd>
155 to indicate that this method must be
156 implemented by a subclass
157 </dd>
158 </dl><a NAME="VcsStatusMonitorThread._shutdown" ID="VcsStatusMonitorThread._shutdown"></a>
159 <h4>VcsStatusMonitorThread._shutdown</h4>
160 <b>_shutdown</b>(<i></i>)
161 <p>
162 Protected method performing shutdown actions.
163 </p><p>
164 The default implementation does nothing.
165 </p><a NAME="VcsStatusMonitorThread.checkStatus" ID="VcsStatusMonitorThread.checkStatus"></a>
166 <h4>VcsStatusMonitorThread.checkStatus</h4>
167 <b>checkStatus</b>(<i></i>)
168 <p>
169 Public method to wake up the status monitor thread.
170 </p><a NAME="VcsStatusMonitorThread.clearCachedState" ID="VcsStatusMonitorThread.clearCachedState"></a>
171 <h4>VcsStatusMonitorThread.clearCachedState</h4>
172 <b>clearCachedState</b>(<i>name</i>)
173 <p>
174 Public method to clear the cached VCS state of a file/directory.
175 </p><dl>
176 <dt><i>name</i></dt>
177 <dd>
178 name of the entry to be cleared (string)
179 </dd>
180 </dl><a NAME="VcsStatusMonitorThread.getAutoUpdate" ID="VcsStatusMonitorThread.getAutoUpdate"></a>
181 <h4>VcsStatusMonitorThread.getAutoUpdate</h4>
182 <b>getAutoUpdate</b>(<i></i>)
183 <p>
184 Public method to retrieve the status of the auto update function.
185 </p><dl>
186 <dt>Returns:</dt>
187 <dd>
188 status of the auto update function (boolean)
189 </dd>
190 </dl><a NAME="VcsStatusMonitorThread.getInterval" ID="VcsStatusMonitorThread.getInterval"></a>
191 <h4>VcsStatusMonitorThread.getInterval</h4>
192 <b>getInterval</b>(<i></i>)
193 <p>
194 Public method to get the monitor interval.
195 </p><dl>
196 <dt>Returns:</dt>
197 <dd>
198 interval in seconds (integer)
199 </dd>
200 </dl><a NAME="VcsStatusMonitorThread.run" ID="VcsStatusMonitorThread.run"></a>
201 <h4>VcsStatusMonitorThread.run</h4>
202 <b>run</b>(<i></i>)
203 <p>
204 Public method implementing the tasks action.
205 </p><a NAME="VcsStatusMonitorThread.setAutoUpdate" ID="VcsStatusMonitorThread.setAutoUpdate"></a>
206 <h4>VcsStatusMonitorThread.setAutoUpdate</h4>
207 <b>setAutoUpdate</b>(<i>auto</i>)
208 <p>
209 Public method to enable the auto update function.
210 </p><dl>
211 <dt><i>auto</i></dt>
212 <dd>
213 status of the auto update function (boolean)
214 </dd>
215 </dl><a NAME="VcsStatusMonitorThread.setInterval" ID="VcsStatusMonitorThread.setInterval"></a>
216 <h4>VcsStatusMonitorThread.setInterval</h4>
217 <b>setInterval</b>(<i>interval</i>)
218 <p>
219 Public method to change the monitor interval.
220 </p><dl>
221 <dt><i>interval</i></dt>
222 <dd>
223 new interval in seconds (integer)
224 </dd>
225 </dl><a NAME="VcsStatusMonitorThread.stop" ID="VcsStatusMonitorThread.stop"></a>
226 <h4>VcsStatusMonitorThread.stop</h4>
227 <b>stop</b>(<i></i>)
228 <p>
229 Public method to stop the monitor thread.
230 </p>
231 <div align="right"><a href="#top">Up</a></div>
232 <hr />
233 </body></html>

eric ide

mercurial