|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' |
|
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> |
|
4 <html><head> |
|
5 <title>eric5.VCS.StatusMonitorThread</title> |
|
6 <style> |
|
7 b'body {\n background:white;\n margin: 0em 1em 10em 1em;\n color: black;\n}\n\nh1 { color: white; background: #4FA4FF; }\nh2 { color: white; background: #4FA4FF; }\nh3 { color: white; background: #00557F; }\nh4 { color: white; background: #00557F; }\n \na { color: #AA5500; }\n' |
|
8 </style> |
|
9 </head> |
|
10 <body><a NAME="top" ID="top"></a> |
|
11 <h1>eric5.VCS.StatusMonitorThread</h1> |
|
12 <p> |
|
13 Module implementing the VCS status monitor thread base class. |
|
14 </p> |
|
15 <h3>Global Attributes</h3> |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 <table> |
|
21 <tr> |
|
22 <td><a href="#VcsStatusMonitorThread">VcsStatusMonitorThread</a></td> |
|
23 <td>Class implementing the VCS status monitor thread base class.</td> |
|
24 </tr> |
|
25 </table> |
|
26 <h3>Functions</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <hr /><hr /> |
|
31 <a NAME="VcsStatusMonitorThread" ID="VcsStatusMonitorThread"></a> |
|
32 <h2>VcsStatusMonitorThread</h2> |
|
33 <p> |
|
34 Class implementing the VCS status monitor thread base class. |
|
35 </p><h4>Signals</h4> |
|
36 <dl> |
|
37 <dt>vcsStatusMonitorData(QStringList)</dt> |
|
38 <dd> |
|
39 emitted to update the VCS status |
|
40 </dd><dt>vcsStatusMonitorStatus(QString, QString)</dt> |
|
41 <dd> |
|
42 emitted to signal the status of the |
|
43 monitoring thread (ok, nok, op) and a status message |
|
44 </dd> |
|
45 </dl> |
|
46 <h3>Derived from</h3> |
|
47 QThread |
|
48 <h3>Class Attributes</h3> |
|
49 <table> |
|
50 <tr><td>None</td></tr> |
|
51 </table> |
|
52 <h3>Methods</h3> |
|
53 <table> |
|
54 <tr> |
|
55 <td><a href="#VcsStatusMonitorThread.__init__">VcsStatusMonitorThread</a></td> |
|
56 <td>Constructor</td> |
|
57 </tr><tr> |
|
58 <td><a href="#VcsStatusMonitorThread._performMonitor">_performMonitor</a></td> |
|
59 <td>Protected method implementing the real monitoring action.</td> |
|
60 </tr><tr> |
|
61 <td><a href="#VcsStatusMonitorThread.checkStatus">checkStatus</a></td> |
|
62 <td>Public method to wake up the status monitor thread.</td> |
|
63 </tr><tr> |
|
64 <td><a href="#VcsStatusMonitorThread.clearCachedState">clearCachedState</a></td> |
|
65 <td>Public method to clear the cached VCS state of a file/directory.</td> |
|
66 </tr><tr> |
|
67 <td><a href="#VcsStatusMonitorThread.getAutoUpdate">getAutoUpdate</a></td> |
|
68 <td>Public method to retrieve the status of the auto update function.</td> |
|
69 </tr><tr> |
|
70 <td><a href="#VcsStatusMonitorThread.getInterval">getInterval</a></td> |
|
71 <td>Public method to get the monitor interval.</td> |
|
72 </tr><tr> |
|
73 <td><a href="#VcsStatusMonitorThread.run">run</a></td> |
|
74 <td>Protected method implementing the tasks action.</td> |
|
75 </tr><tr> |
|
76 <td><a href="#VcsStatusMonitorThread.setAutoUpdate">setAutoUpdate</a></td> |
|
77 <td>Public method to enable the auto update function.</td> |
|
78 </tr><tr> |
|
79 <td><a href="#VcsStatusMonitorThread.setInterval">setInterval</a></td> |
|
80 <td>Public method to change the monitor interval.</td> |
|
81 </tr><tr> |
|
82 <td><a href="#VcsStatusMonitorThread.stop">stop</a></td> |
|
83 <td>Public method to stop the monitor thread.</td> |
|
84 </tr> |
|
85 </table> |
|
86 <a NAME="VcsStatusMonitorThread.__init__" ID="VcsStatusMonitorThread.__init__"></a> |
|
87 <h4>VcsStatusMonitorThread (Constructor)</h4> |
|
88 <b>VcsStatusMonitorThread</b>(<i>interval, projectDir, vcs, parent = None</i>) |
|
89 <p> |
|
90 Constructor |
|
91 </p><dl> |
|
92 <dt><i>interval</i></dt> |
|
93 <dd> |
|
94 new interval in seconds (integer) |
|
95 </dd><dt><i>projectDir</i></dt> |
|
96 <dd> |
|
97 project directory to monitor (string) |
|
98 </dd><dt><i>vcs</i></dt> |
|
99 <dd> |
|
100 reference to the version control object |
|
101 </dd><dt><i>parent</i></dt> |
|
102 <dd> |
|
103 reference to the parent object (QObject) |
|
104 </dd> |
|
105 </dl><a NAME="VcsStatusMonitorThread._performMonitor" ID="VcsStatusMonitorThread._performMonitor"></a> |
|
106 <h4>VcsStatusMonitorThread._performMonitor</h4> |
|
107 <b>_performMonitor</b>(<i></i>) |
|
108 <p> |
|
109 Protected method implementing the real monitoring action. |
|
110 </p><p> |
|
111 This method must be overridden and populate the statusList member variable |
|
112 with a list of strings giving the status in the first column and the |
|
113 path relative to the project directory starting with the third column. |
|
114 The allowed status flags are: |
|
115 <ul> |
|
116 <li>"A" path was added but not yet comitted</li> |
|
117 <li>"M" path has local changes</li> |
|
118 <li>"R" path was deleted and then re-added</li> |
|
119 <li>"U" path needs an update</li> |
|
120 <li>"Z" path contains a conflict</li> |
|
121 <li>" " path is back at normal</li> |
|
122 </ul> |
|
123 </p><dl> |
|
124 <dt>Returns:</dt> |
|
125 <dd> |
|
126 tuple of flag indicating successful operation (boolean) and |
|
127 a status message in case of non successful operation (QString) |
|
128 </dd> |
|
129 </dl><a NAME="VcsStatusMonitorThread.checkStatus" ID="VcsStatusMonitorThread.checkStatus"></a> |
|
130 <h4>VcsStatusMonitorThread.checkStatus</h4> |
|
131 <b>checkStatus</b>(<i></i>) |
|
132 <p> |
|
133 Public method to wake up the status monitor thread. |
|
134 </p><a NAME="VcsStatusMonitorThread.clearCachedState" ID="VcsStatusMonitorThread.clearCachedState"></a> |
|
135 <h4>VcsStatusMonitorThread.clearCachedState</h4> |
|
136 <b>clearCachedState</b>(<i>name</i>) |
|
137 <p> |
|
138 Public method to clear the cached VCS state of a file/directory. |
|
139 </p><dl> |
|
140 <dt><i>name</i></dt> |
|
141 <dd> |
|
142 name of the entry to be cleared (string) |
|
143 </dd> |
|
144 </dl><a NAME="VcsStatusMonitorThread.getAutoUpdate" ID="VcsStatusMonitorThread.getAutoUpdate"></a> |
|
145 <h4>VcsStatusMonitorThread.getAutoUpdate</h4> |
|
146 <b>getAutoUpdate</b>(<i></i>) |
|
147 <p> |
|
148 Public method to retrieve the status of the auto update function. |
|
149 </p><dl> |
|
150 <dt>Returns:</dt> |
|
151 <dd> |
|
152 status of the auto update function (boolean) |
|
153 </dd> |
|
154 </dl><a NAME="VcsStatusMonitorThread.getInterval" ID="VcsStatusMonitorThread.getInterval"></a> |
|
155 <h4>VcsStatusMonitorThread.getInterval</h4> |
|
156 <b>getInterval</b>(<i></i>) |
|
157 <p> |
|
158 Public method to get the monitor interval. |
|
159 </p><dl> |
|
160 <dt>Returns:</dt> |
|
161 <dd> |
|
162 interval in seconds (integer) |
|
163 </dd> |
|
164 </dl><a NAME="VcsStatusMonitorThread.run" ID="VcsStatusMonitorThread.run"></a> |
|
165 <h4>VcsStatusMonitorThread.run</h4> |
|
166 <b>run</b>(<i></i>) |
|
167 <p> |
|
168 Protected method implementing the tasks action. |
|
169 </p><a NAME="VcsStatusMonitorThread.setAutoUpdate" ID="VcsStatusMonitorThread.setAutoUpdate"></a> |
|
170 <h4>VcsStatusMonitorThread.setAutoUpdate</h4> |
|
171 <b>setAutoUpdate</b>(<i>auto</i>) |
|
172 <p> |
|
173 Public method to enable the auto update function. |
|
174 </p><dl> |
|
175 <dt><i>auto</i></dt> |
|
176 <dd> |
|
177 status of the auto update function (boolean) |
|
178 </dd> |
|
179 </dl><a NAME="VcsStatusMonitorThread.setInterval" ID="VcsStatusMonitorThread.setInterval"></a> |
|
180 <h4>VcsStatusMonitorThread.setInterval</h4> |
|
181 <b>setInterval</b>(<i>interval</i>) |
|
182 <p> |
|
183 Public method to change the monitor interval. |
|
184 </p><dl> |
|
185 <dt><i>interval</i></dt> |
|
186 <dd> |
|
187 new interval in seconds (integer) |
|
188 </dd> |
|
189 </dl><a NAME="VcsStatusMonitorThread.stop" ID="VcsStatusMonitorThread.stop"></a> |
|
190 <h4>VcsStatusMonitorThread.stop</h4> |
|
191 <b>stop</b>(<i></i>) |
|
192 <p> |
|
193 Public method to stop the monitor thread. |
|
194 </p> |
|
195 <div align="right"><a href="#top">Up</a></div> |
|
196 <hr /> |
|
197 </body></html> |