~ubuntu-branches/ubuntu/lucid/kdebindings/lucid-updates

« back to all changes in this revision

Viewing changes to python/pykde4/docs/html/plasma/Plasma.ServiceJob.html

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-06-28 13:49:04 UTC
  • mfrom: (1.1.19 upstream)
  • Revision ID: james.westby@ubuntu.com-20090628134904-z9npn50sj25hscc9
Tags: 4:4.2.95-0ubuntu1
* New upstream release
  - Bump kdelibs5-dev and kdepimlibs5-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8"?>
 
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
3
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 
4
 
 
5
<head>
 
6
  <title>Plasma.ServiceJob</title>
 
7
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
8
  <meta http-equiv="Content-Style-Type" content="text/css" />
 
9
  <link rel="stylesheet" type="text/css" href="../common/doxygen.css" />
 
10
  <link rel="stylesheet" media="screen" type="text/css" title="KDE Colors" href="../common/kde.css" />
 
11
</head>
 
12
<body>
 
13
<div id="container">
 
14
<div id="header">
 
15
  <div id="header_top">
 
16
    <div>
 
17
      <div>
 
18
        <img alt ="" src="../common/top-kde.jpg"/>
 
19
        KDE 4.3 PyKDE API Reference
 
20
      </div>
 
21
    </div>
 
22
  </div>
 
23
  <div id="header_bottom">
 
24
    <div id="location">
 
25
      <ul>
 
26
        <li>KDE's Python API</li>
 
27
      </ul>
 
28
    </div>
 
29
 
 
30
    <div id="menu">
 
31
      <ul>
 
32
        <li><a href="../modules.html">Overview</a></li>
 
33
<li><a href="http://techbase.kde.org/Development/Languages/Python">PyKDE Home</a></li>
 
34
<li><a href="http://kde.org/family/">Sitemap</a></li>
 
35
<li><a href="http://kde.org/contact/">Contact Us</a></li>
 
36
</ul>
 
37
    </div>
 
38
  </div>
 
39
</div>
 
40
 
 
41
<div id="body_wrapper">
 
42
<div id="body">
 
43
<div id="right">
 
44
<div class="content">
 
45
<div id="main">
 
46
<div class="clearer">&nbsp;</div>
 
47
 
 
48
<h1>ServiceJob Class Reference</h1>
 
49
<code>from PyKDE4.plasma import *</code>
 
50
<p>
 
51
Inherits: <a href="../kdecore/KJob.html">KJob</a> &#x2192; <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html">QObject</a><br />
 
52
 
 
53
Namespace: Plasma<br />
 
54
<h2>Detailed Description</h2>
 
55
 
 
56
<p>ServiceJob plasma/servicejob.h &lt;Plasma/ServiceJob&gt;
 
57
</p>
 
58
<p>
 
59
This class provides jobs for use with Plasma.Service
 
60
</p>
 
61
<p>
 
62
Unlike KJob, you can do the work in start(), since Plasma.Service already
 
63
delays the call to start() until the event loop is reached.
 
64
</p>
 
65
<p>
 
66
If the job is quick enough that it is not worth reporting the progress,
 
67
you just need to implement start() to do the task, then call emitResult()
 
68
at the end of it. If the task does not complete successfully, you should
 
69
set a non-zero error code with setError(int) and an error message with
 
70
setErrorText(QString).
 
71
</p>
 
72
<p>
 
73
If the job is longer (involving network access, for instance), you should
 
74
report the progress at regular intervals. See the KJob documentation for
 
75
information on how to do this.
 
76
</p>
 
77
<table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="2"><br><h2>Methods</h2></td></tr>
 
78
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#obj151115852">__init__</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> destination, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> operation, QMap<QString,QVariant> parameters, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html">QObject</a> parent=0)</td></tr>
 
79
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#obj176586188">destination</a> (self)</td></tr>
 
80
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#obj181372332">operationName</a> (self)</td></tr>
 
81
<tr><td class="memItemLeft" nowrap align="right" valign="top">QMap<QString,QVariant>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#obj186824908">parameters</a> (self)</td></tr>
 
82
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qvariant.html">QVariant</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#obj178041644">result</a> (self)</td></tr>
 
83
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#obj178042892">setResult</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qvariant.html">QVariant</a> result)</td></tr>
 
84
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#obj178042060">start</a> (self)</td></tr>
 
85
</table>
 
86
<hr><h2>Method Documentation</h2><a class="anchor" name="obj151115852"></a>
 
87
<div class="memitem">
 
88
<div class="memproto">
 
89
<table class="memname"><tr>
 
90
<td class="memname">__init__</td>
 
91
<td>(</td>
 
92
<td class="paramtype">&nbsp;<em>self</em>, </td>
 
93
<td class="paramname"></td>
 
94
</tr><tr>
 
95
<td class="memname"></td>
 
96
<td></td>
 
97
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
 
98
<td class="paramname"><em>destination</em>, </td>
 
99
</tr>
 
100
<tr>
 
101
<td class="memname"></td>
 
102
<td></td>
 
103
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
 
104
<td class="paramname"><em>operation</em>, </td>
 
105
</tr>
 
106
<tr>
 
107
<td class="memname"></td>
 
108
<td></td>
 
109
<td class="paramtype">QMap<QString,QVariant>&nbsp;</td>
 
110
<td class="paramname"><em>parameters</em>, </td>
 
111
</tr>
 
112
<tr>
 
113
<td class="memname"></td>
 
114
<td></td>
 
115
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html">QObject</a>&nbsp;</td>
 
116
<td class="paramname"><em>parent=0</em></td>
 
117
</tr>
 
118
<tr>
 
119
<td></td>
 
120
<td>)</td>
 
121
<td></td>
 
122
<td></td>
 
123
<td width="100%"> </td>
 
124
</tr></table>
 
125
</div>
 
126
<div class="memdoc"><p>Default constructor
 
127
</p>
 
128
<p>
 
129
@arg destination the subject that the job is acting on
 
130
@arg operation the action that the job is performing on the <b>destination</b>
 
131
@arg parameters the parameters of the <b>action</b>
 
132
@arg parent the parent object for this service
 
133
</p></div></div><a class="anchor" name="obj176586188"></a>
 
134
<div class="memitem">
 
135
<div class="memproto">
 
136
<table class="memname"><tr>
 
137
<td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> destination</td>
 
138
<td>(</td>
 
139
<td class="paramtype">&nbsp;</td>
 
140
<td class="paramname"><em>self</em>&nbsp;)</td>
 
141
<td width="100%"> </td>
 
142
</tr>
 
143
</table>
 
144
</div>
 
145
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> the subject that the job is acting on
 
146
</dd></dl>
 
147
</p></div></div><a class="anchor" name="obj181372332"></a>
 
148
<div class="memitem">
 
149
<div class="memproto">
 
150
<table class="memname"><tr>
 
151
<td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> operationName</td>
 
152
<td>(</td>
 
153
<td class="paramtype">&nbsp;</td>
 
154
<td class="paramname"><em>self</em>&nbsp;)</td>
 
155
<td width="100%"> </td>
 
156
</tr>
 
157
</table>
 
158
</div>
 
159
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> the operation the job is performing on the destination
 
160
</dd></dl>
 
161
</p></div></div><a class="anchor" name="obj186824908"></a>
 
162
<div class="memitem">
 
163
<div class="memproto">
 
164
<table class="memname"><tr>
 
165
<td class="memname">QMap<QString,QVariant> parameters</td>
 
166
<td>(</td>
 
167
<td class="paramtype">&nbsp;</td>
 
168
<td class="paramname"><em>self</em>&nbsp;)</td>
 
169
<td width="100%"> </td>
 
170
</tr>
 
171
</table>
 
172
</div>
 
173
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> the parameters for the operation
 
174
</dd></dl>
 
175
</p></div></div><a class="anchor" name="obj178041644"></a>
 
176
<div class="memitem">
 
177
<div class="memproto">
 
178
<table class="memname"><tr>
 
179
<td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qvariant.html">QVariant</a> result</td>
 
180
<td>(</td>
 
181
<td class="paramtype">&nbsp;</td>
 
182
<td class="paramname"><em>self</em>&nbsp;)</td>
 
183
<td width="100%"> </td>
 
184
</tr>
 
185
</table>
 
186
</div>
 
187
<div class="memdoc"><p>Returns the result of the operation
 
188
</p>
 
189
<p>
 
190
The result will be invalid if the job has not completed yet, or
 
191
if the job does not have a meaningful result.
 
192
</p>
 
193
<p>
 
194
Note that this should not be used to find out whether the operation
 
195
was successful. Instead, you should check the value of error().
 
196
</p>
 
197
<p>
 
198
<dl class="return" compact><dt><b>Returns:</b></dt><dd> the result of the operation
 
199
</dd></dl>
 
200
</p></div></div><a class="anchor" name="obj178042892"></a>
 
201
<div class="memitem">
 
202
<div class="memproto">
 
203
<table class="memname"><tr>
 
204
<td class="memname"> setResult</td>
 
205
<td>(</td>
 
206
<td class="paramtype">&nbsp;<em>self</em>, </td>
 
207
<td class="paramname"></td>
 
208
</tr><tr>
 
209
<td class="memname"></td>
 
210
<td></td>
 
211
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qvariant.html">QVariant</a>&nbsp;</td>
 
212
<td class="paramname"><em>result</em></td>
 
213
</tr>
 
214
<tr>
 
215
<td></td>
 
216
<td>)</td>
 
217
<td></td>
 
218
<td></td>
 
219
<td width="100%"> </td>
 
220
</tr></table>
 
221
</div>
 
222
<div class="memdoc"><p>Sets the result for an operation.
 
223
</p></div></div><a class="anchor" name="obj178042060"></a>
 
224
<div class="memitem">
 
225
<div class="memproto">
 
226
<table class="memname"><tr>
 
227
<td class="memname"> start</td>
 
228
<td>(</td>
 
229
<td class="paramtype">&nbsp;</td>
 
230
<td class="paramname"><em>self</em>&nbsp;)</td>
 
231
<td width="100%"> </td>
 
232
</tr>
 
233
</table>
 
234
</div>
 
235
<div class="memdoc"><p>Default implementation of start, which simply sets the results to false.
 
236
This makes it easy to create a "failure" job.
 
237
</p></div></div>
 
238
</div>
 
239
</div>
 
240
</div>
 
241
 
 
242
<div id="left">
 
243
 
 
244
<div class="menu_box">
 
245
<div class="nav_list">
 
246
<ul>
 
247
<li><a href="../allclasses.html">Full Index</a></li>
 
248
</ul>
 
249
</div>
 
250
 
 
251
<a name="cp-menu" /><div class="menutitle"><div>
 
252
  <h2 id="cp-menu-project">Modules</h2>
 
253
</div></div>
 
254
<div class="nav_list">
 
255
<ul>
 
256
<li><a href="../akonadi/index.html">akonadi</a></li>
 
257
<li><a href="../dnssd/index.html">dnssd</a></li>
 
258
<li><a href="../kdecore/index.html">kdecore</a></li>
 
259
<li><a href="../kdeui/index.html">kdeui</a></li>
 
260
<li><a href="../khtml/index.html">khtml</a></li>
 
261
<li><a href="../kio/index.html">kio</a></li>
 
262
<li><a href="../knewstuff/index.html">knewstuff</a></li>
 
263
<li><a href="../kparts/index.html">kparts</a></li>
 
264
<li><a href="../kutils/index.html">kutils</a></li>
 
265
<li><a href="../nepomuk/index.html">nepomuk</a></li>
 
266
<li><a href="../phonon/index.html">phonon</a></li>
 
267
<li><a href="../plasma/index.html">plasma</a></li>
 
268
<li><a href="../polkitqt/index.html">polkitqt</a></li>
 
269
<li><a href="../solid/index.html">solid</a></li>
 
270
<li><a href="../soprano/index.html">soprano</a></li>
 
271
</ul></div></div>
 
272
 
 
273
</div>
 
274
 
 
275
</div>
 
276
  <div class="clearer"/>
 
277
</div>
 
278
 
 
279
<div id="end_body"></div>
 
280
</div>
 
281
<div id="footer"><div id="footer_text">
 
282
This documentation is maintained by <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;simon&#64;simonzone&#46;com">Simon Edwards</a>.<br />
 
283
        KDE<sup>&#174;</sup> and <a href="../images/kde_gear_black.png">the K Desktop Environment<sup>&#174;</sup> logo</a> are registered trademarks of <a href="http://ev.kde.org/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
 
284
        <a href="http://www.kde.org/contact/impressum.php">Legal</a>
 
285
    </div></div>
 
286
</body>
 
287
</html>