~mcfletch/eric/update-to-4.5.13

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html><head>
<title>eric4.VCS.StatusMonitorThread</title>
<style>
body {
    background:white;
    margin: 0em 1em 10em 1em;
    color: black;
}

h1 { color: white; background: #4FA4FF; }
h2 { color: white; background: #4FA4FF; }
h3 { color: white; background: #00557F; }
h4 { color: white; background: #00557F; }
    
a { color: #AA5500; }

</style>
</head>
<body><a NAME="top" ID="top"></a>
<h1>eric4.VCS.StatusMonitorThread</h1>
<p>
Module implementing the VCS status monitor thread base class.
</p>
<h3>Global Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Classes</h3>
<table>
<tr>
<td><a href="#VcsStatusMonitorThread">VcsStatusMonitorThread</a></td>
<td>Class implementing the VCS status monitor thread base class.</td>
</tr>
</table>
<h3>Functions</h3>
<table>
<tr><td>None</td></tr>
</table>
<hr /><hr />
<a NAME="VcsStatusMonitorThread" ID="VcsStatusMonitorThread"></a>
<h2>VcsStatusMonitorThread</h2>
<p>
    Class implementing the VCS status monitor thread base class.
</p><h3>Signals</h3>
<dl>
<dt>vcsStatusMonitorData(QStringList)</dt>
<dd>
emitted to update the VCS status
</dd><dt>vcsStatusMonitorStatus(QString, QString)</dt>
<dd>
emitted to signal the status of the
        monitoring thread (ok, nok, op) and a status message
</dd>
</dl>
<h3>Derived from</h3>
QThread
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Class Methods</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#VcsStatusMonitorThread.__init__">VcsStatusMonitorThread</a></td>
<td>Constructor</td>
</tr><tr>
<td><a href="#VcsStatusMonitorThread._performMonitor">_performMonitor</a></td>
<td>Protected method implementing the real monitoring action.</td>
</tr><tr>
<td><a href="#VcsStatusMonitorThread.checkStatus">checkStatus</a></td>
<td>Public method to wake up the status monitor thread.</td>
</tr><tr>
<td><a href="#VcsStatusMonitorThread.clearCachedState">clearCachedState</a></td>
<td>Public method to clear the cached VCS state of a file/directory.</td>
</tr><tr>
<td><a href="#VcsStatusMonitorThread.getAutoUpdate">getAutoUpdate</a></td>
<td>Public method to retrieve the status of the auto update function.</td>
</tr><tr>
<td><a href="#VcsStatusMonitorThread.getInterval">getInterval</a></td>
<td>Public method to get the monitor interval.</td>
</tr><tr>
<td><a href="#VcsStatusMonitorThread.run">run</a></td>
<td>Protected method implementing the tasks action.</td>
</tr><tr>
<td><a href="#VcsStatusMonitorThread.setAutoUpdate">setAutoUpdate</a></td>
<td>Public method to enable the auto update function.</td>
</tr><tr>
<td><a href="#VcsStatusMonitorThread.setInterval">setInterval</a></td>
<td>Public method to change the monitor interval.</td>
</tr><tr>
<td><a href="#VcsStatusMonitorThread.stop">stop</a></td>
<td>Public method to stop the monitor thread.</td>
</tr>
</table>
<h3>Static Methods</h3>
<table>
<tr><td>None</td></tr>
</table>
<a NAME="VcsStatusMonitorThread.__init__" ID="VcsStatusMonitorThread.__init__"></a>
<h4>VcsStatusMonitorThread (Constructor)</h4>
<b>VcsStatusMonitorThread</b>(<i>interval, projectDir, vcs, parent = None</i>)
<p>
        Constructor
</p><dl>
<dt><i>interval</i></dt>
<dd>
new interval in seconds (integer)
</dd><dt><i>projectDir</i></dt>
<dd>
project directory to monitor (string or QString)
</dd><dt><i>vcs</i></dt>
<dd>
reference to the version control object
</dd><dt><i>parent</i></dt>
<dd>
reference to the parent object (QObject)
</dd>
</dl><a NAME="VcsStatusMonitorThread._performMonitor" ID="VcsStatusMonitorThread._performMonitor"></a>
<h4>VcsStatusMonitorThread._performMonitor</h4>
<b>_performMonitor</b>(<i></i>)
<p>
        Protected method implementing the real monitoring action.
</p><p>
        This method must be overridden and populate the statusList member variable
        with a list of strings giving the status in the first column and the
        path relative to the project directory starting with the third column.
        The allowed status flags are:
        <ul>
            <li>"A" path was added but not yet comitted</li>
            <li>"M" path has local changes</li>
            <li>"R" path was deleted and then re-added</li>
            <li>"U" path needs an update</li>
            <li>"Z" path contains a conflict</li>
            <li>" " path is back at normal</li>
        </ul>
</p><dl>
<dt>Returns:</dt>
<dd>
tuple of flag indicating successful operation (boolean) and
            a status message in case of non successful operation (QString)
</dd>
</dl><a NAME="VcsStatusMonitorThread.checkStatus" ID="VcsStatusMonitorThread.checkStatus"></a>
<h4>VcsStatusMonitorThread.checkStatus</h4>
<b>checkStatus</b>(<i></i>)
<p>
        Public method to wake up the status monitor thread.
</p><a NAME="VcsStatusMonitorThread.clearCachedState" ID="VcsStatusMonitorThread.clearCachedState"></a>
<h4>VcsStatusMonitorThread.clearCachedState</h4>
<b>clearCachedState</b>(<i>name</i>)
<p>
        Public method to clear the cached VCS state of a file/directory.
</p><dl>
<dt><i>name</i></dt>
<dd>
name of the entry to be cleared (QString or string)
</dd>
</dl><a NAME="VcsStatusMonitorThread.getAutoUpdate" ID="VcsStatusMonitorThread.getAutoUpdate"></a>
<h4>VcsStatusMonitorThread.getAutoUpdate</h4>
<b>getAutoUpdate</b>(<i></i>)
<p>
        Public method to retrieve the status of the auto update function.
</p><dl>
<dt>Returns:</dt>
<dd>
status of the auto update function (boolean)
</dd>
</dl><a NAME="VcsStatusMonitorThread.getInterval" ID="VcsStatusMonitorThread.getInterval"></a>
<h4>VcsStatusMonitorThread.getInterval</h4>
<b>getInterval</b>(<i></i>)
<p>
        Public method to get the monitor interval.
</p><dl>
<dt>Returns:</dt>
<dd>
interval in seconds (integer)
</dd>
</dl><a NAME="VcsStatusMonitorThread.run" ID="VcsStatusMonitorThread.run"></a>
<h4>VcsStatusMonitorThread.run</h4>
<b>run</b>(<i></i>)
<p>
        Protected method implementing the tasks action.
</p><a NAME="VcsStatusMonitorThread.setAutoUpdate" ID="VcsStatusMonitorThread.setAutoUpdate"></a>
<h4>VcsStatusMonitorThread.setAutoUpdate</h4>
<b>setAutoUpdate</b>(<i>auto</i>)
<p>
        Public method to enable the auto update function.
</p><dl>
<dt><i>auto</i></dt>
<dd>
status of the auto update function (boolean)
</dd>
</dl><a NAME="VcsStatusMonitorThread.setInterval" ID="VcsStatusMonitorThread.setInterval"></a>
<h4>VcsStatusMonitorThread.setInterval</h4>
<b>setInterval</b>(<i>interval</i>)
<p>
        Public method to change the monitor interval.
</p><dl>
<dt><i>interval</i></dt>
<dd>
new interval in seconds (integer)
</dd>
</dl><a NAME="VcsStatusMonitorThread.stop" ID="VcsStatusMonitorThread.stop"></a>
<h4>VcsStatusMonitorThread.stop</h4>
<b>stop</b>(<i></i>)
<p>
        Public method to stop the monitor thread.
</p>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>