33 <h3>Classes</h3> |
33 <h3>Classes</h3> |
34 |
34 |
35 <table> |
35 <table> |
36 |
36 |
37 <tr> |
37 <tr> |
|
38 <td><a href="#NotificationFrame">NotificationFrame</a></td> |
|
39 <td>Class implementing a Notification widget.</td> |
|
40 </tr> |
|
41 <tr> |
|
42 <td><a href="#NotificationTypes">NotificationTypes</a></td> |
|
43 <td>Class implementing the notification types.</td> |
|
44 </tr> |
|
45 <tr> |
38 <td><a href="#NotificationWidget">NotificationWidget</a></td> |
46 <td><a href="#NotificationWidget">NotificationWidget</a></td> |
39 <td>Class implementing a Notification widget.</td> |
47 <td>Class implementing a Notification list widget.</td> |
40 </tr> |
48 </tr> |
41 </table> |
49 </table> |
42 <h3>Functions</h3> |
50 <h3>Functions</h3> |
43 |
51 |
44 <table> |
52 <table> |
45 <tr><td>None</td></tr> |
53 <tr><td>None</td></tr> |
46 </table> |
54 </table> |
|
55 <hr /> |
|
56 <hr /> |
|
57 <a NAME="NotificationFrame" ID="NotificationFrame"></a> |
|
58 <h2>NotificationFrame</h2> |
|
59 |
|
60 <p> |
|
61 Class implementing a Notification widget. |
|
62 </p> |
|
63 <h3>Derived from</h3> |
|
64 QFrame, Ui_NotificationFrame |
|
65 <h3>Class Attributes</h3> |
|
66 |
|
67 <table> |
|
68 <tr><td>NotificationStyleSheetTemplate</td></tr> |
|
69 </table> |
|
70 <h3>Class Methods</h3> |
|
71 |
|
72 <table> |
|
73 |
|
74 <tr> |
|
75 <td><a href="#NotificationFrame.getIcon">getIcon</a></td> |
|
76 <td>Class method to get the icon for a specific notification kind.</td> |
|
77 </tr> |
|
78 <tr> |
|
79 <td><a href="#NotificationFrame.getStyleSheet">getStyleSheet</a></td> |
|
80 <td>Class method to get a style sheet for specific notification kind.</td> |
|
81 </tr> |
|
82 </table> |
|
83 <h3>Methods</h3> |
|
84 |
|
85 <table> |
|
86 |
|
87 <tr> |
|
88 <td><a href="#NotificationFrame.__init__">NotificationFrame</a></td> |
|
89 <td>Constructor</td> |
|
90 </tr> |
|
91 </table> |
|
92 <h3>Static Methods</h3> |
|
93 |
|
94 <table> |
|
95 <tr><td>None</td></tr> |
|
96 </table> |
|
97 |
|
98 <a NAME="NotificationFrame.getIcon" ID="NotificationFrame.getIcon"></a> |
|
99 <h4>NotificationFrame.getIcon (class method)</h4> |
|
100 <b>getIcon</b>(<i>kind</i>) |
|
101 |
|
102 <p> |
|
103 Class method to get the icon for a specific notification kind. |
|
104 </p> |
|
105 <dl> |
|
106 |
|
107 <dt><i>kind</i> (NotificationTypes)</dt> |
|
108 <dd> |
|
109 notification kind |
|
110 </dd> |
|
111 </dl> |
|
112 <dl> |
|
113 <dt>Return:</dt> |
|
114 <dd> |
|
115 icon for the notification kind |
|
116 </dd> |
|
117 </dl> |
|
118 <dl> |
|
119 <dt>Return Type:</dt> |
|
120 <dd> |
|
121 QPixmap |
|
122 </dd> |
|
123 </dl> |
|
124 <a NAME="NotificationFrame.getStyleSheet" ID="NotificationFrame.getStyleSheet"></a> |
|
125 <h4>NotificationFrame.getStyleSheet (class method)</h4> |
|
126 <b>getStyleSheet</b>(<i>kind</i>) |
|
127 |
|
128 <p> |
|
129 Class method to get a style sheet for specific notification kind. |
|
130 </p> |
|
131 <dl> |
|
132 |
|
133 <dt><i>kind</i> (NotificationTypes)</dt> |
|
134 <dd> |
|
135 notification kind |
|
136 </dd> |
|
137 </dl> |
|
138 <dl> |
|
139 <dt>Return:</dt> |
|
140 <dd> |
|
141 string containing the style sheet for the notification kind |
|
142 </dd> |
|
143 </dl> |
|
144 <dl> |
|
145 <dt>Return Type:</dt> |
|
146 <dd> |
|
147 str |
|
148 </dd> |
|
149 </dl> |
|
150 <a NAME="NotificationFrame.__init__" ID="NotificationFrame.__init__"></a> |
|
151 <h4>NotificationFrame (Constructor)</h4> |
|
152 <b>NotificationFrame</b>(<i>icon, heading, text, kind=NotificationTypes.Information, parent=None</i>) |
|
153 |
|
154 <p> |
|
155 Constructor |
|
156 </p> |
|
157 <dl> |
|
158 |
|
159 <dt><i>icon</i> (QPixmap)</dt> |
|
160 <dd> |
|
161 icon to be used |
|
162 </dd> |
|
163 <dt><i>heading</i> (str)</dt> |
|
164 <dd> |
|
165 heading to be used |
|
166 </dd> |
|
167 <dt><i>text</i> (str)</dt> |
|
168 <dd> |
|
169 text to be used |
|
170 </dd> |
|
171 <dt><i>kind</i> (NotificationTypes)</dt> |
|
172 <dd> |
|
173 kind of notification to be shown |
|
174 </dd> |
|
175 <dt><i>parent</i> (QWidget)</dt> |
|
176 <dd> |
|
177 reference to the parent widget |
|
178 </dd> |
|
179 </dl> |
|
180 <div align="right"><a href="#top">Up</a></div> |
|
181 <hr /> |
|
182 <hr /> |
|
183 <a NAME="NotificationTypes" ID="NotificationTypes"></a> |
|
184 <h2>NotificationTypes</h2> |
|
185 |
|
186 <p> |
|
187 Class implementing the notification types. |
|
188 </p> |
|
189 <h3>Derived from</h3> |
|
190 Enum |
|
191 <h3>Class Attributes</h3> |
|
192 |
|
193 <table> |
|
194 <tr><td>Critical</td></tr><tr><td>Information</td></tr><tr><td>Other</td></tr><tr><td>Warning</td></tr> |
|
195 </table> |
|
196 <h3>Class Methods</h3> |
|
197 |
|
198 <table> |
|
199 <tr><td>None</td></tr> |
|
200 </table> |
|
201 <h3>Methods</h3> |
|
202 |
|
203 <table> |
|
204 <tr><td>None</td></tr> |
|
205 </table> |
|
206 <h3>Static Methods</h3> |
|
207 |
|
208 <table> |
|
209 <tr><td>None</td></tr> |
|
210 </table> |
|
211 |
|
212 <div align="right"><a href="#top">Up</a></div> |
47 <hr /> |
213 <hr /> |
48 <hr /> |
214 <hr /> |
49 <a NAME="NotificationWidget" ID="NotificationWidget"></a> |
215 <a NAME="NotificationWidget" ID="NotificationWidget"></a> |
50 <h2>NotificationWidget</h2> |
216 <h2>NotificationWidget</h2> |
51 |
217 |
52 <p> |
218 <p> |
53 Class implementing a Notification widget. |
219 Class implementing a Notification list widget. |
54 </p> |
220 </p> |
55 <h3>Derived from</h3> |
221 <h3>Derived from</h3> |
56 QWidget, Ui_NotificationWidget |
222 QWidget |
57 <h3>Class Attributes</h3> |
223 <h3>Class Attributes</h3> |
58 |
224 |
59 <table> |
225 <table> |
60 <tr><td>None</td></tr> |
226 <tr><td>None</td></tr> |
61 </table> |
227 </table> |
83 <tr> |
257 <tr> |
84 <td><a href="#NotificationWidget.mouseReleaseEvent">mouseReleaseEvent</a></td> |
258 <td><a href="#NotificationWidget.mouseReleaseEvent">mouseReleaseEvent</a></td> |
85 <td>Protected method to handle releases of a mouse button.</td> |
259 <td>Protected method to handle releases of a mouse button.</td> |
86 </tr> |
260 </tr> |
87 <tr> |
261 <tr> |
88 <td><a href="#NotificationWidget.setHeading">setHeading</a></td> |
262 <td><a href="#NotificationWidget.showNotification">showNotification</a></td> |
89 <td>Public method to set the heading for the notification.</td> |
263 <td>Public method to show a notification.</td> |
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#NotificationWidget.setPixmap">setPixmap</a></td> |
|
93 <td>Public method to set the icon for the notification.</td> |
|
94 </tr> |
|
95 <tr> |
|
96 <td><a href="#NotificationWidget.setText">setText</a></td> |
|
97 <td>Public method to set the text for the notification.</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#NotificationWidget.setTimeout">setTimeout</a></td> |
|
101 <td>Public method to set the timeout for the notification.</td> |
|
102 </tr> |
|
103 <tr> |
|
104 <td><a href="#NotificationWidget.show">show</a></td> |
|
105 <td>Public method to show the notification.</td> |
|
106 </tr> |
264 </tr> |
107 </table> |
265 </table> |
108 <h3>Static Methods</h3> |
266 <h3>Static Methods</h3> |
109 |
267 |
110 <table> |
268 <table> |
118 <p> |
276 <p> |
119 Constructor |
277 Constructor |
120 </p> |
278 </p> |
121 <dl> |
279 <dl> |
122 |
280 |
123 <dt><i>parent</i></dt> |
281 <dt><i>parent</i> (QWidget)</dt> |
124 <dd> |
282 <dd> |
125 reference to the parent widget (QWidget) |
283 reference to the parent widget |
126 </dd> |
284 </dd> |
127 <dt><i>setPosition</i></dt> |
285 <dt><i>setPosition</i> (bool)</dt> |
128 <dd> |
286 <dd> |
129 flag indicating to set the display |
287 flag indicating to set the display |
130 position interactively (boolean) |
288 position interactively |
|
289 </dd> |
|
290 </dl> |
|
291 <a NAME="NotificationWidget.__adjustSizeAndPosition" ID="NotificationWidget.__adjustSizeAndPosition"></a> |
|
292 <h4>NotificationWidget.__adjustSizeAndPosition</h4> |
|
293 <b>__adjustSizeAndPosition</b>(<i></i>) |
|
294 |
|
295 <p> |
|
296 Private slot to adjust the notification list widget size and position. |
|
297 </p> |
|
298 <a NAME="NotificationWidget.__removeNotification" ID="NotificationWidget.__removeNotification"></a> |
|
299 <h4>NotificationWidget.__removeNotification</h4> |
|
300 <b>__removeNotification</b>(<i>notification</i>) |
|
301 |
|
302 <p> |
|
303 Private method to remove a notification from the list. |
|
304 </p> |
|
305 <dl> |
|
306 |
|
307 <dt><i>notification</i> (NotificationFrame)</dt> |
|
308 <dd> |
|
309 reference to the notification to be removed |
131 </dd> |
310 </dd> |
132 </dl> |
311 </dl> |
133 <a NAME="NotificationWidget.mouseMoveEvent" ID="NotificationWidget.mouseMoveEvent"></a> |
312 <a NAME="NotificationWidget.mouseMoveEvent" ID="NotificationWidget.mouseMoveEvent"></a> |
134 <h4>NotificationWidget.mouseMoveEvent</h4> |
313 <h4>NotificationWidget.mouseMoveEvent</h4> |
135 <b>mouseMoveEvent</b>(<i>evt</i>) |
314 <b>mouseMoveEvent</b>(<i>evt</i>) |
170 <dt><i>evt</i></dt> |
349 <dt><i>evt</i></dt> |
171 <dd> |
350 <dd> |
172 reference to the mouse event (QMouseEvent) |
351 reference to the mouse event (QMouseEvent) |
173 </dd> |
352 </dd> |
174 </dl> |
353 </dl> |
175 <a NAME="NotificationWidget.setHeading" ID="NotificationWidget.setHeading"></a> |
354 <a NAME="NotificationWidget.showNotification" ID="NotificationWidget.showNotification"></a> |
176 <h4>NotificationWidget.setHeading</h4> |
355 <h4>NotificationWidget.showNotification</h4> |
177 <b>setHeading</b>(<i>heading</i>) |
356 <b>showNotification</b>(<i>icon, heading, text, kind=NotificationTypes.Information, timeout=0</i>) |
178 |
357 |
179 <p> |
358 <p> |
180 Public method to set the heading for the notification. |
359 Public method to show a notification. |
181 </p> |
360 </p> |
182 <dl> |
361 <dl> |
183 |
362 |
184 <dt><i>heading</i></dt> |
363 <dt><i>icon</i> (QPixmap)</dt> |
185 <dd> |
364 <dd> |
186 heading to be used (string) |
365 icon to be used |
187 </dd> |
366 </dd> |
188 </dl> |
367 <dt><i>heading</i> (str)</dt> |
189 <a NAME="NotificationWidget.setPixmap" ID="NotificationWidget.setPixmap"></a> |
368 <dd> |
190 <h4>NotificationWidget.setPixmap</h4> |
369 heading to be used |
191 <b>setPixmap</b>(<i>icon</i>) |
370 </dd> |
192 |
371 <dt><i>text</i> (str)</dt> |
193 <p> |
372 <dd> |
194 Public method to set the icon for the notification. |
373 text to be used |
195 </p> |
374 </dd> |
196 <dl> |
375 <dt><i>kind</i> (NotificationTypes)</dt> |
197 |
376 <dd> |
198 <dt><i>icon</i></dt> |
377 kind of notification to be shown |
199 <dd> |
378 </dd> |
200 icon to be used (QPixmap) |
|
201 </dd> |
|
202 </dl> |
|
203 <a NAME="NotificationWidget.setText" ID="NotificationWidget.setText"></a> |
|
204 <h4>NotificationWidget.setText</h4> |
|
205 <b>setText</b>(<i>text</i>) |
|
206 |
|
207 <p> |
|
208 Public method to set the text for the notification. |
|
209 </p> |
|
210 <dl> |
|
211 |
|
212 <dt><i>text</i></dt> |
|
213 <dd> |
|
214 text to be used (string) |
|
215 </dd> |
|
216 </dl> |
|
217 <a NAME="NotificationWidget.setTimeout" ID="NotificationWidget.setTimeout"></a> |
|
218 <h4>NotificationWidget.setTimeout</h4> |
|
219 <b>setTimeout</b>(<i>timeout</i>) |
|
220 |
|
221 <p> |
|
222 Public method to set the timeout for the notification. |
|
223 </p> |
|
224 <dl> |
|
225 |
|
226 <dt><i>timeout</i> (int)</dt> |
379 <dt><i>timeout</i> (int)</dt> |
227 <dd> |
380 <dd> |
228 timeout to be used in seconds (0 = indefinitely) |
381 timeout in seconds after which the notification is |
229 </dd> |
382 to be removed (0 = do not remove until it is clicked on) |
230 </dl> |
383 </dd> |
231 <a NAME="NotificationWidget.show" ID="NotificationWidget.show"></a> |
384 </dl> |
232 <h4>NotificationWidget.show</h4> |
|
233 <b>show</b>(<i></i>) |
|
234 |
|
235 <p> |
|
236 Public method to show the notification. |
|
237 </p> |
|
238 <div align="right"><a href="#top">Up</a></div> |
385 <div align="right"><a href="#top">Up</a></div> |
239 <hr /> |
386 <hr /> |
240 </body></html> |
387 </body></html> |