src/eric7/Documentation/Source/eric7.EricWidgets.EricToolButton.html

branch
eric7
changeset 9209
b99e7fd55fd3
parent 8596
d64760b2da50
child 9643
10839ab864e0
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.EricWidgets.EricToolButton</title>
4 <meta charset="UTF-8">
5 <link rel="stylesheet" href="styles.css">
6 </head>
7 <body>
8 <a NAME="top" ID="top"></a>
9 <h1>eric7.EricWidgets.EricToolButton</h1>
10
11 <p>
12 Module implementing a specialized tool button subclass.
13 </p>
14 <h3>Global Attributes</h3>
15
16 <table>
17 <tr><td>None</td></tr>
18 </table>
19 <h3>Classes</h3>
20
21 <table>
22
23 <tr>
24 <td><a href="#EricToolButton">EricToolButton</a></td>
25 <td>Class implementing a specialized tool button subclass.</td>
26 </tr>
27 <tr>
28 <td><a href="#EricToolButtonOptions">EricToolButtonOptions</a></td>
29 <td>Class defining the tool button options.</td>
30 </tr>
31 </table>
32 <h3>Functions</h3>
33
34 <table>
35 <tr><td>None</td></tr>
36 </table>
37 <hr />
38 <hr />
39 <a NAME="EricToolButton" ID="EricToolButton"></a>
40 <h2>EricToolButton</h2>
41
42 <p>
43 Class implementing a specialized tool button subclass.
44 </p>
45 <h3>Signals</h3>
46 <dl>
47
48 <dt>aboutToHideMenu()</dt>
49 <dd>
50 emitted before the tool button menu is hidden
51 </dd>
52 <dt>aboutToShowMenu()</dt>
53 <dd>
54 emitted before the tool button menu is shown
55 </dd>
56 <dt>controlClicked()</dt>
57 <dd>
58 emitted when the left mouse button was
59 clicked while pressing the Ctrl key
60 </dd>
61 <dt>doubleClicked()</dt>
62 <dd>
63 emitted when the left mouse button was
64 double clicked
65 </dd>
66 <dt>middleClicked()</dt>
67 <dd>
68 emitted when the middle mouse button was clicked
69 </dd>
70 </dl>
71 <h3>Derived from</h3>
72 QToolButton
73 <h3>Class Attributes</h3>
74
75 <table>
76 <tr><td>None</td></tr>
77 </table>
78 <h3>Class Methods</h3>
79
80 <table>
81 <tr><td>None</td></tr>
82 </table>
83 <h3>Methods</h3>
84
85 <table>
86
87 <tr>
88 <td><a href="#EricToolButton.__init__">EricToolButton</a></td>
89 <td>Constructor</td>
90 </tr>
91 <tr>
92 <td><a href="#EricToolButton.__menuAboutToHide">__menuAboutToHide</a></td>
93 <td>Private slot to handle the tool button menu about to be hidden.</td>
94 </tr>
95 <tr>
96 <td><a href="#EricToolButton.__showMenu">__showMenu</a></td>
97 <td>Private slot to show the tool button menu.</td>
98 </tr>
99 <tr>
100 <td><a href="#EricToolButton.badgeText">badgeText</a></td>
101 <td>Public method to get the badge text.</td>
102 </tr>
103 <tr>
104 <td><a href="#EricToolButton.contextMenuEvent">contextMenuEvent</a></td>
105 <td>Protected method to handle context menu events.</td>
106 </tr>
107 <tr>
108 <td><a href="#EricToolButton.menu">menu</a></td>
109 <td>Public method to get a reference to the tool button menu.</td>
110 </tr>
111 <tr>
112 <td><a href="#EricToolButton.mouseDoubleClickEvent">mouseDoubleClickEvent</a></td>
113 <td>Protected method to handle mouse double click events.</td>
114 </tr>
115 <tr>
116 <td><a href="#EricToolButton.mousePressEvent">mousePressEvent</a></td>
117 <td>Protected method to handle mouse press events.</td>
118 </tr>
119 <tr>
120 <td><a href="#EricToolButton.mouseReleaseEvent">mouseReleaseEvent</a></td>
121 <td>Protected method to handle mouse release events.</td>
122 </tr>
123 <tr>
124 <td><a href="#EricToolButton.setBadgeText">setBadgeText</a></td>
125 <td>Public method to set the badge text.</td>
126 </tr>
127 <tr>
128 <td><a href="#EricToolButton.setMenu">setMenu</a></td>
129 <td>Public method to set the tool button menu.</td>
130 </tr>
131 <tr>
132 <td><a href="#EricToolButton.setShowMenuInside">setShowMenuInside</a></td>
133 <td>Public method to set a flag to show the menu edge aligned with the button.</td>
134 </tr>
135 <tr>
136 <td><a href="#EricToolButton.setToolbarButtonLook">setToolbarButtonLook</a></td>
137 <td>Public method to set the toolbar look state.</td>
138 </tr>
139 <tr>
140 <td><a href="#EricToolButton.showMenuInside">showMenuInside</a></td>
141 <td>Public method to check, if the menu edge shall be aligned with the button.</td>
142 </tr>
143 <tr>
144 <td><a href="#EricToolButton.toolbarButtonLook">toolbarButtonLook</a></td>
145 <td>Public method to check, if the button has the toolbar look.</td>
146 </tr>
147 </table>
148 <h3>Static Methods</h3>
149
150 <table>
151 <tr><td>None</td></tr>
152 </table>
153
154 <a NAME="EricToolButton.__init__" ID="EricToolButton.__init__"></a>
155 <h4>EricToolButton (Constructor)</h4>
156 <b>EricToolButton</b>(<i>parent=None</i>)
157
158 <p>
159 Constructor
160 </p>
161 <dl>
162
163 <dt><i>parent</i> (QWidget)</dt>
164 <dd>
165 reference to the parent widget
166 </dd>
167 </dl>
168 <a NAME="EricToolButton.__menuAboutToHide" ID="EricToolButton.__menuAboutToHide"></a>
169 <h4>EricToolButton.__menuAboutToHide</h4>
170 <b>__menuAboutToHide</b>(<i></i>)
171
172 <p>
173 Private slot to handle the tool button menu about to be hidden.
174 </p>
175 <a NAME="EricToolButton.__showMenu" ID="EricToolButton.__showMenu"></a>
176 <h4>EricToolButton.__showMenu</h4>
177 <b>__showMenu</b>(<i></i>)
178
179 <p>
180 Private slot to show the tool button menu.
181 </p>
182 <a NAME="EricToolButton.badgeText" ID="EricToolButton.badgeText"></a>
183 <h4>EricToolButton.badgeText</h4>
184 <b>badgeText</b>(<i></i>)
185
186 <p>
187 Public method to get the badge text.
188 </p>
189 <dl>
190 <dt>Return:</dt>
191 <dd>
192 badge text
193 </dd>
194 </dl>
195 <dl>
196 <dt>Return Type:</dt>
197 <dd>
198 str
199 </dd>
200 </dl>
201 <a NAME="EricToolButton.contextMenuEvent" ID="EricToolButton.contextMenuEvent"></a>
202 <h4>EricToolButton.contextMenuEvent</h4>
203 <b>contextMenuEvent</b>(<i>evt</i>)
204
205 <p>
206 Protected method to handle context menu events.
207 </p>
208 <dl>
209
210 <dt><i>evt</i> (QContextMenuEvent)</dt>
211 <dd>
212 reference to the context menu event
213 </dd>
214 </dl>
215 <a NAME="EricToolButton.menu" ID="EricToolButton.menu"></a>
216 <h4>EricToolButton.menu</h4>
217 <b>menu</b>(<i></i>)
218
219 <p>
220 Public method to get a reference to the tool button menu.
221 </p>
222 <dl>
223 <dt>Return:</dt>
224 <dd>
225 reference to the tool button menu
226 </dd>
227 </dl>
228 <dl>
229 <dt>Return Type:</dt>
230 <dd>
231 QMenu
232 </dd>
233 </dl>
234 <a NAME="EricToolButton.mouseDoubleClickEvent" ID="EricToolButton.mouseDoubleClickEvent"></a>
235 <h4>EricToolButton.mouseDoubleClickEvent</h4>
236 <b>mouseDoubleClickEvent</b>(<i>evt</i>)
237
238 <p>
239 Protected method to handle mouse double click events.
240 </p>
241 <dl>
242
243 <dt><i>evt</i> (QMouseEvent)</dt>
244 <dd>
245 reference to the mouse event
246 </dd>
247 </dl>
248 <a NAME="EricToolButton.mousePressEvent" ID="EricToolButton.mousePressEvent"></a>
249 <h4>EricToolButton.mousePressEvent</h4>
250 <b>mousePressEvent</b>(<i>evt</i>)
251
252 <p>
253 Protected method to handle mouse press events.
254 </p>
255 <dl>
256
257 <dt><i>evt</i> (QMouseEvent)</dt>
258 <dd>
259 reference to the mouse event
260 </dd>
261 </dl>
262 <a NAME="EricToolButton.mouseReleaseEvent" ID="EricToolButton.mouseReleaseEvent"></a>
263 <h4>EricToolButton.mouseReleaseEvent</h4>
264 <b>mouseReleaseEvent</b>(<i>evt</i>)
265
266 <p>
267 Protected method to handle mouse release events.
268 </p>
269 <dl>
270
271 <dt><i>evt</i> (QMouseEvent)</dt>
272 <dd>
273 reference to the mouse event
274 </dd>
275 </dl>
276 <a NAME="EricToolButton.setBadgeText" ID="EricToolButton.setBadgeText"></a>
277 <h4>EricToolButton.setBadgeText</h4>
278 <b>setBadgeText</b>(<i>text</i>)
279
280 <p>
281 Public method to set the badge text.
282 </p>
283 <dl>
284
285 <dt><i>text</i> (str)</dt>
286 <dd>
287 badge text to be set
288 </dd>
289 </dl>
290 <a NAME="EricToolButton.setMenu" ID="EricToolButton.setMenu"></a>
291 <h4>EricToolButton.setMenu</h4>
292 <b>setMenu</b>(<i>menu</i>)
293
294 <p>
295 Public method to set the tool button menu.
296 </p>
297 <dl>
298
299 <dt><i>menu</i> (QMenu)</dt>
300 <dd>
301 reference to the tool button menu
302 </dd>
303 </dl>
304 <a NAME="EricToolButton.setShowMenuInside" ID="EricToolButton.setShowMenuInside"></a>
305 <h4>EricToolButton.setShowMenuInside</h4>
306 <b>setShowMenuInside</b>(<i>enable</i>)
307
308 <p>
309 Public method to set a flag to show the menu edge aligned with
310 the button.
311 </p>
312 <dl>
313
314 <dt><i>enable</i> (bool)</dt>
315 <dd>
316 flag indicating to align the menu edge to the button
317 </dd>
318 </dl>
319 <a NAME="EricToolButton.setToolbarButtonLook" ID="EricToolButton.setToolbarButtonLook"></a>
320 <h4>EricToolButton.setToolbarButtonLook</h4>
321 <b>setToolbarButtonLook</b>(<i>enable</i>)
322
323 <p>
324 Public method to set the toolbar look state.
325 </p>
326 <dl>
327
328 <dt><i>enable</i> (bool)</dt>
329 <dd>
330 flag indicating toolbar look
331 </dd>
332 </dl>
333 <a NAME="EricToolButton.showMenuInside" ID="EricToolButton.showMenuInside"></a>
334 <h4>EricToolButton.showMenuInside</h4>
335 <b>showMenuInside</b>(<i></i>)
336
337 <p>
338 Public method to check, if the menu edge shall be aligned with
339 the button.
340 </p>
341 <dl>
342 <dt>Return:</dt>
343 <dd>
344 flag indicating that the menu edge shall be aligned
345 </dd>
346 </dl>
347 <dl>
348 <dt>Return Type:</dt>
349 <dd>
350 bool
351 </dd>
352 </dl>
353 <a NAME="EricToolButton.toolbarButtonLook" ID="EricToolButton.toolbarButtonLook"></a>
354 <h4>EricToolButton.toolbarButtonLook</h4>
355 <b>toolbarButtonLook</b>(<i></i>)
356
357 <p>
358 Public method to check, if the button has the toolbar look.
359 </p>
360 <dl>
361 <dt>Return:</dt>
362 <dd>
363 flag indicating toolbar look
364 </dd>
365 </dl>
366 <dl>
367 <dt>Return Type:</dt>
368 <dd>
369 bool
370 </dd>
371 </dl>
372 <div align="right"><a href="#top">Up</a></div>
373 <hr />
374 <hr />
375 <a NAME="EricToolButtonOptions" ID="EricToolButtonOptions"></a>
376 <h2>EricToolButtonOptions</h2>
377
378 <p>
379 Class defining the tool button options.
380 </p>
381 <h3>Derived from</h3>
382 enum.IntEnum
383 <h3>Class Attributes</h3>
384
385 <table>
386 <tr><td>DEFAULT</td></tr><tr><td>SHOW_MENU_INSIDE</td></tr><tr><td>TOOLBAR_LOOKUP</td></tr>
387 </table>
388 <h3>Class Methods</h3>
389
390 <table>
391 <tr><td>None</td></tr>
392 </table>
393 <h3>Methods</h3>
394
395 <table>
396 <tr><td>None</td></tr>
397 </table>
398 <h3>Static Methods</h3>
399
400 <table>
401 <tr><td>None</td></tr>
402 </table>
403
404 <div align="right"><a href="#top">Up</a></div>
405 <hr />
406 </body></html>

eric ide

mercurial