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> |
38 <td><a href="#NotificationWidget">NotificationWidget</a></td> |
42 <td><a href="#NotificationWidget">NotificationWidget</a></td> |
39 <td>Class implementing a Notification widget.</td> |
43 <td>Class implementing a Notification list widget.</td> |
40 </tr> |
44 </tr> |
41 </table> |
45 </table> |
42 <h3>Functions</h3> |
46 <h3>Functions</h3> |
43 |
47 |
44 <table> |
48 <table> |
45 <tr><td>None</td></tr> |
49 <tr><td>None</td></tr> |
46 </table> |
50 </table> |
|
51 <hr /> |
|
52 <hr /> |
|
53 <a NAME="NotificationFrame" ID="NotificationFrame"></a> |
|
54 <h2>NotificationFrame</h2> |
|
55 |
|
56 <p> |
|
57 Class implementing a Notification widget. |
|
58 </p> |
|
59 <h3>Derived from</h3> |
|
60 QFrame, Ui_NotificationFrame |
|
61 <h3>Class Attributes</h3> |
|
62 |
|
63 <table> |
|
64 <tr><td>None</td></tr> |
|
65 </table> |
|
66 <h3>Class Methods</h3> |
|
67 |
|
68 <table> |
|
69 <tr><td>None</td></tr> |
|
70 </table> |
|
71 <h3>Methods</h3> |
|
72 |
|
73 <table> |
|
74 |
|
75 <tr> |
|
76 <td><a href="#NotificationFrame.__init__">NotificationFrame</a></td> |
|
77 <td>Constructor</td> |
|
78 </tr> |
|
79 </table> |
|
80 <h3>Static Methods</h3> |
|
81 |
|
82 <table> |
|
83 <tr><td>None</td></tr> |
|
84 </table> |
|
85 |
|
86 <a NAME="NotificationFrame.__init__" ID="NotificationFrame.__init__"></a> |
|
87 <h4>NotificationFrame (Constructor)</h4> |
|
88 <b>NotificationFrame</b>(<i>icon, heading, text, parent=None</i>) |
|
89 |
|
90 <p> |
|
91 Constructor |
|
92 </p> |
|
93 <dl> |
|
94 |
|
95 <dt><i>icon</i> (QPixmap)</dt> |
|
96 <dd> |
|
97 icon to be used |
|
98 </dd> |
|
99 <dt><i>heading</i> (str)</dt> |
|
100 <dd> |
|
101 heading to be used |
|
102 </dd> |
|
103 <dt><i>text</i> (str)</dt> |
|
104 <dd> |
|
105 text to be used |
|
106 </dd> |
|
107 <dt><i>parent</i> (QWidget)</dt> |
|
108 <dd> |
|
109 reference to the parent widget |
|
110 </dd> |
|
111 </dl> |
|
112 <div align="right"><a href="#top">Up</a></div> |
47 <hr /> |
113 <hr /> |
48 <hr /> |
114 <hr /> |
49 <a NAME="NotificationWidget" ID="NotificationWidget"></a> |
115 <a NAME="NotificationWidget" ID="NotificationWidget"></a> |
50 <h2>NotificationWidget</h2> |
116 <h2>NotificationWidget</h2> |
51 |
117 |
52 <p> |
118 <p> |
53 Class implementing a Notification widget. |
119 Class implementing a Notification list widget. |
54 </p> |
120 </p> |
55 <h3>Derived from</h3> |
121 <h3>Derived from</h3> |
56 QWidget, Ui_NotificationWidget |
122 QWidget |
57 <h3>Class Attributes</h3> |
123 <h3>Class Attributes</h3> |
58 |
124 |
59 <table> |
125 <table> |
60 <tr><td>None</td></tr> |
126 <tr><td>None</td></tr> |
61 </table> |
127 </table> |
71 <tr> |
137 <tr> |
72 <td><a href="#NotificationWidget.__init__">NotificationWidget</a></td> |
138 <td><a href="#NotificationWidget.__init__">NotificationWidget</a></td> |
73 <td>Constructor</td> |
139 <td>Constructor</td> |
74 </tr> |
140 </tr> |
75 <tr> |
141 <tr> |
|
142 <td><a href="#NotificationWidget.__adjustSizeAndPosition">__adjustSizeAndPosition</a></td> |
|
143 <td>Private slot to adjust the notification list widget size and position.</td> |
|
144 </tr> |
|
145 <tr> |
|
146 <td><a href="#NotificationWidget.__removeNotification">__removeNotification</a></td> |
|
147 <td>Private method to remove a notification from the list.</td> |
|
148 </tr> |
|
149 <tr> |
76 <td><a href="#NotificationWidget.mouseMoveEvent">mouseMoveEvent</a></td> |
150 <td><a href="#NotificationWidget.mouseMoveEvent">mouseMoveEvent</a></td> |
77 <td>Protected method to handle dragging the window.</td> |
151 <td>Protected method to handle dragging the window.</td> |
78 </tr> |
152 </tr> |
79 <tr> |
153 <tr> |
80 <td><a href="#NotificationWidget.mousePressEvent">mousePressEvent</a></td> |
154 <td><a href="#NotificationWidget.mousePressEvent">mousePressEvent</a></td> |
83 <tr> |
157 <tr> |
84 <td><a href="#NotificationWidget.mouseReleaseEvent">mouseReleaseEvent</a></td> |
158 <td><a href="#NotificationWidget.mouseReleaseEvent">mouseReleaseEvent</a></td> |
85 <td>Protected method to handle releases of a mouse button.</td> |
159 <td>Protected method to handle releases of a mouse button.</td> |
86 </tr> |
160 </tr> |
87 <tr> |
161 <tr> |
88 <td><a href="#NotificationWidget.setHeading">setHeading</a></td> |
162 <td><a href="#NotificationWidget.showNotification">showNotification</a></td> |
89 <td>Public method to set the heading for the notification.</td> |
163 <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> |
164 </tr> |
107 </table> |
165 </table> |
108 <h3>Static Methods</h3> |
166 <h3>Static Methods</h3> |
109 |
167 |
110 <table> |
168 <table> |
118 <p> |
176 <p> |
119 Constructor |
177 Constructor |
120 </p> |
178 </p> |
121 <dl> |
179 <dl> |
122 |
180 |
123 <dt><i>parent</i></dt> |
181 <dt><i>parent</i> (QWidget)</dt> |
124 <dd> |
182 <dd> |
125 reference to the parent widget (QWidget) |
183 reference to the parent widget |
126 </dd> |
184 </dd> |
127 <dt><i>setPosition</i></dt> |
185 <dt><i>setPosition</i> (bool)</dt> |
128 <dd> |
186 <dd> |
129 flag indicating to set the display |
187 flag indicating to set the display |
130 position interactively (boolean) |
188 position interactively |
|
189 </dd> |
|
190 </dl> |
|
191 <a NAME="NotificationWidget.__adjustSizeAndPosition" ID="NotificationWidget.__adjustSizeAndPosition"></a> |
|
192 <h4>NotificationWidget.__adjustSizeAndPosition</h4> |
|
193 <b>__adjustSizeAndPosition</b>(<i></i>) |
|
194 |
|
195 <p> |
|
196 Private slot to adjust the notification list widget size and position. |
|
197 </p> |
|
198 <a NAME="NotificationWidget.__removeNotification" ID="NotificationWidget.__removeNotification"></a> |
|
199 <h4>NotificationWidget.__removeNotification</h4> |
|
200 <b>__removeNotification</b>(<i>notification</i>) |
|
201 |
|
202 <p> |
|
203 Private method to remove a notification from the list. |
|
204 </p> |
|
205 <dl> |
|
206 |
|
207 <dt><i>notification</i> (NotificationFrame)</dt> |
|
208 <dd> |
|
209 reference to the notification to be removed |
131 </dd> |
210 </dd> |
132 </dl> |
211 </dl> |
133 <a NAME="NotificationWidget.mouseMoveEvent" ID="NotificationWidget.mouseMoveEvent"></a> |
212 <a NAME="NotificationWidget.mouseMoveEvent" ID="NotificationWidget.mouseMoveEvent"></a> |
134 <h4>NotificationWidget.mouseMoveEvent</h4> |
213 <h4>NotificationWidget.mouseMoveEvent</h4> |
135 <b>mouseMoveEvent</b>(<i>evt</i>) |
214 <b>mouseMoveEvent</b>(<i>evt</i>) |
170 <dt><i>evt</i></dt> |
249 <dt><i>evt</i></dt> |
171 <dd> |
250 <dd> |
172 reference to the mouse event (QMouseEvent) |
251 reference to the mouse event (QMouseEvent) |
173 </dd> |
252 </dd> |
174 </dl> |
253 </dl> |
175 <a NAME="NotificationWidget.setHeading" ID="NotificationWidget.setHeading"></a> |
254 <a NAME="NotificationWidget.showNotification" ID="NotificationWidget.showNotification"></a> |
176 <h4>NotificationWidget.setHeading</h4> |
255 <h4>NotificationWidget.showNotification</h4> |
177 <b>setHeading</b>(<i>heading</i>) |
256 <b>showNotification</b>(<i>icon, heading, text, timeout=0</i>) |
178 |
257 |
179 <p> |
258 <p> |
180 Public method to set the heading for the notification. |
259 Public method to show a notification. |
181 </p> |
260 </p> |
182 <dl> |
261 <dl> |
183 |
262 |
184 <dt><i>heading</i></dt> |
263 <dt><i>icon</i> (QPixmap)</dt> |
185 <dd> |
264 <dd> |
186 heading to be used (string) |
265 icon to be used |
187 </dd> |
266 </dd> |
188 </dl> |
267 <dt><i>heading</i> (str)</dt> |
189 <a NAME="NotificationWidget.setPixmap" ID="NotificationWidget.setPixmap"></a> |
268 <dd> |
190 <h4>NotificationWidget.setPixmap</h4> |
269 heading to be used |
191 <b>setPixmap</b>(<i>icon</i>) |
270 </dd> |
192 |
271 <dt><i>text</i> (str)</dt> |
193 <p> |
272 <dd> |
194 Public method to set the icon for the notification. |
273 text to be used |
195 </p> |
274 </dd> |
196 <dl> |
275 <dt><i>timeout</i></dt> |
197 |
276 <dd> |
198 <dt><i>icon</i></dt> |
277 timeout in seconds after which the notification is |
199 <dd> |
278 to be removed (0 = do not remove until it is clicked on) |
200 icon to be used (QPixmap) |
279 </dd> |
201 </dd> |
280 </dl> |
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> |
|
227 <dd> |
|
228 timeout to be used in seconds (0 = indefinitely) |
|
229 </dd> |
|
230 </dl> |
|
231 <a NAME="NotificationWidget.show" ID="NotificationWidget.show"></a> |
|
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> |
281 <div align="right"><a href="#top">Up</a></div> |
239 <hr /> |
282 <hr /> |
240 </body></html> |
283 </body></html> |