|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.E5Gui.E5ToolButton</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.E5Gui.E5ToolButton</h1> |
|
23 <p> |
|
24 Module implementing a specialized tool button subclass. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#E5ToolButton">E5ToolButton</a></td> |
|
34 <td>Class implementing a specialized tool button subclass.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr><td>None</td></tr> |
|
40 </table> |
|
41 <hr /><hr /> |
|
42 <a NAME="E5ToolButton" ID="E5ToolButton"></a> |
|
43 <h2>E5ToolButton</h2> |
|
44 <p> |
|
45 Class implementing a specialized tool button subclass. |
|
46 </p><h3>Signals</h3> |
|
47 <dl> |
|
48 <dt>aboutToHideMenu()</dt> |
|
49 <dd> |
|
50 emitted before the tool button menu is hidden |
|
51 </dd><dt>aboutToShowMenu()</dt> |
|
52 <dd> |
|
53 emitted before the tool button menu is shown |
|
54 </dd><dt>controlClicked()</dt> |
|
55 <dd> |
|
56 emitted when the left mouse button was |
|
57 clicked while pressing the Ctrl key |
|
58 </dd><dt>doubleClicked()</dt> |
|
59 <dd> |
|
60 emitted when the left mouse button was |
|
61 double clicked |
|
62 </dd><dt>middleClicked()</dt> |
|
63 <dd> |
|
64 emitted when the middle mouse button was clicked |
|
65 </dd> |
|
66 </dl> |
|
67 <h3>Derived from</h3> |
|
68 QToolButton |
|
69 <h3>Class Attributes</h3> |
|
70 <table> |
|
71 <tr><td>NoOptions</td></tr><tr><td>ShowMenuInsideOption</td></tr><tr><td>ToolBarLookOption</td></tr> |
|
72 </table> |
|
73 <h3>Class Methods</h3> |
|
74 <table> |
|
75 <tr><td>None</td></tr> |
|
76 </table> |
|
77 <h3>Methods</h3> |
|
78 <table> |
|
79 <tr> |
|
80 <td><a href="#E5ToolButton.__init__">E5ToolButton</a></td> |
|
81 <td>Constructor</td> |
|
82 </tr><tr> |
|
83 <td><a href="#E5ToolButton.__menuAboutToHide">__menuAboutToHide</a></td> |
|
84 <td>Private slot to handle the tool button menu about to be hidden.</td> |
|
85 </tr><tr> |
|
86 <td><a href="#E5ToolButton.__showMenu">__showMenu</a></td> |
|
87 <td>Private slot to show the tool button menu.</td> |
|
88 </tr><tr> |
|
89 <td><a href="#E5ToolButton.badgeText">badgeText</a></td> |
|
90 <td>Public method to get the badge text.</td> |
|
91 </tr><tr> |
|
92 <td><a href="#E5ToolButton.contextMenuEvent">contextMenuEvent</a></td> |
|
93 <td>Protected method to handle context menu events.</td> |
|
94 </tr><tr> |
|
95 <td><a href="#E5ToolButton.menu">menu</a></td> |
|
96 <td>Public method to get a reference to the tool button menu.</td> |
|
97 </tr><tr> |
|
98 <td><a href="#E5ToolButton.mouseDoubleClickEvent">mouseDoubleClickEvent</a></td> |
|
99 <td>Protected method to handle mouse double click events.</td> |
|
100 </tr><tr> |
|
101 <td><a href="#E5ToolButton.mousePressEvent">mousePressEvent</a></td> |
|
102 <td>Protected method to handle mouse press events.</td> |
|
103 </tr><tr> |
|
104 <td><a href="#E5ToolButton.mouseReleaseEvent">mouseReleaseEvent</a></td> |
|
105 <td>Protected method to handle mouse release events.</td> |
|
106 </tr><tr> |
|
107 <td><a href="#E5ToolButton.setBadgeText">setBadgeText</a></td> |
|
108 <td>Public method to set the badge text.</td> |
|
109 </tr><tr> |
|
110 <td><a href="#E5ToolButton.setMenu">setMenu</a></td> |
|
111 <td>Public method to set the tool button menu.</td> |
|
112 </tr><tr> |
|
113 <td><a href="#E5ToolButton.setShowMenuInside">setShowMenuInside</a></td> |
|
114 <td>Public method to set a flag to show the menu edge aligned with the button.</td> |
|
115 </tr><tr> |
|
116 <td><a href="#E5ToolButton.setToolbarButtonLook">setToolbarButtonLook</a></td> |
|
117 <td>Public method to set the toolbar look state.</td> |
|
118 </tr><tr> |
|
119 <td><a href="#E5ToolButton.showMenuInside">showMenuInside</a></td> |
|
120 <td>Public method to check, if the menu edge shall be aligned with the button.</td> |
|
121 </tr><tr> |
|
122 <td><a href="#E5ToolButton.toolbarButtonLook">toolbarButtonLook</a></td> |
|
123 <td>Public method to check, if the button has the toolbar look.</td> |
|
124 </tr> |
|
125 </table> |
|
126 <h3>Static Methods</h3> |
|
127 <table> |
|
128 <tr><td>None</td></tr> |
|
129 </table> |
|
130 <a NAME="E5ToolButton.__init__" ID="E5ToolButton.__init__"></a> |
|
131 <h4>E5ToolButton (Constructor)</h4> |
|
132 <b>E5ToolButton</b>(<i>parent=None</i>) |
|
133 <p> |
|
134 Constructor |
|
135 </p><dl> |
|
136 <dt><i>parent</i> (QWidget)</dt> |
|
137 <dd> |
|
138 reference to the parent widget |
|
139 </dd> |
|
140 </dl><a NAME="E5ToolButton.__menuAboutToHide" ID="E5ToolButton.__menuAboutToHide"></a> |
|
141 <h4>E5ToolButton.__menuAboutToHide</h4> |
|
142 <b>__menuAboutToHide</b>(<i></i>) |
|
143 <p> |
|
144 Private slot to handle the tool button menu about to be hidden. |
|
145 </p><a NAME="E5ToolButton.__showMenu" ID="E5ToolButton.__showMenu"></a> |
|
146 <h4>E5ToolButton.__showMenu</h4> |
|
147 <b>__showMenu</b>(<i></i>) |
|
148 <p> |
|
149 Private slot to show the tool button menu. |
|
150 </p><a NAME="E5ToolButton.badgeText" ID="E5ToolButton.badgeText"></a> |
|
151 <h4>E5ToolButton.badgeText</h4> |
|
152 <b>badgeText</b>(<i></i>) |
|
153 <p> |
|
154 Public method to get the badge text. |
|
155 </p><dl> |
|
156 <dt>Returns:</dt> |
|
157 <dd> |
|
158 badge text |
|
159 </dd> |
|
160 </dl><dl> |
|
161 <dt>Return Type:</dt> |
|
162 <dd> |
|
163 str |
|
164 </dd> |
|
165 </dl><a NAME="E5ToolButton.contextMenuEvent" ID="E5ToolButton.contextMenuEvent"></a> |
|
166 <h4>E5ToolButton.contextMenuEvent</h4> |
|
167 <b>contextMenuEvent</b>(<i>evt</i>) |
|
168 <p> |
|
169 Protected method to handle context menu events. |
|
170 </p><dl> |
|
171 <dt><i>evt</i> (QContextMenuEvent)</dt> |
|
172 <dd> |
|
173 reference to the context menu event |
|
174 </dd> |
|
175 </dl><a NAME="E5ToolButton.menu" ID="E5ToolButton.menu"></a> |
|
176 <h4>E5ToolButton.menu</h4> |
|
177 <b>menu</b>(<i></i>) |
|
178 <p> |
|
179 Public method to get a reference to the tool button menu. |
|
180 </p><dl> |
|
181 <dt>Returns:</dt> |
|
182 <dd> |
|
183 reference to the tool button menu |
|
184 </dd> |
|
185 </dl><dl> |
|
186 <dt>Return Type:</dt> |
|
187 <dd> |
|
188 QMenu |
|
189 </dd> |
|
190 </dl><a NAME="E5ToolButton.mouseDoubleClickEvent" ID="E5ToolButton.mouseDoubleClickEvent"></a> |
|
191 <h4>E5ToolButton.mouseDoubleClickEvent</h4> |
|
192 <b>mouseDoubleClickEvent</b>(<i>evt</i>) |
|
193 <p> |
|
194 Protected method to handle mouse double click events. |
|
195 </p><dl> |
|
196 <dt><i>evt</i> (QMouseEvent)</dt> |
|
197 <dd> |
|
198 reference to the mouse event |
|
199 </dd> |
|
200 </dl><a NAME="E5ToolButton.mousePressEvent" ID="E5ToolButton.mousePressEvent"></a> |
|
201 <h4>E5ToolButton.mousePressEvent</h4> |
|
202 <b>mousePressEvent</b>(<i>evt</i>) |
|
203 <p> |
|
204 Protected method to handle mouse press events. |
|
205 </p><dl> |
|
206 <dt><i>evt</i> (QMouseEvent)</dt> |
|
207 <dd> |
|
208 reference to the mouse event |
|
209 </dd> |
|
210 </dl><a NAME="E5ToolButton.mouseReleaseEvent" ID="E5ToolButton.mouseReleaseEvent"></a> |
|
211 <h4>E5ToolButton.mouseReleaseEvent</h4> |
|
212 <b>mouseReleaseEvent</b>(<i>evt</i>) |
|
213 <p> |
|
214 Protected method to handle mouse release events. |
|
215 </p><dl> |
|
216 <dt><i>evt</i> (QMouseEvent)</dt> |
|
217 <dd> |
|
218 reference to the mouse event |
|
219 </dd> |
|
220 </dl><a NAME="E5ToolButton.setBadgeText" ID="E5ToolButton.setBadgeText"></a> |
|
221 <h4>E5ToolButton.setBadgeText</h4> |
|
222 <b>setBadgeText</b>(<i>text</i>) |
|
223 <p> |
|
224 Public method to set the badge text. |
|
225 </p><dl> |
|
226 <dt><i>text</i> (str)</dt> |
|
227 <dd> |
|
228 badge text to be set |
|
229 </dd> |
|
230 </dl><a NAME="E5ToolButton.setMenu" ID="E5ToolButton.setMenu"></a> |
|
231 <h4>E5ToolButton.setMenu</h4> |
|
232 <b>setMenu</b>(<i>menu</i>) |
|
233 <p> |
|
234 Public method to set the tool button menu. |
|
235 </p><dl> |
|
236 <dt><i>menu</i> (QMenu)</dt> |
|
237 <dd> |
|
238 reference to the tool button menu |
|
239 </dd> |
|
240 </dl><a NAME="E5ToolButton.setShowMenuInside" ID="E5ToolButton.setShowMenuInside"></a> |
|
241 <h4>E5ToolButton.setShowMenuInside</h4> |
|
242 <b>setShowMenuInside</b>(<i>enable</i>) |
|
243 <p> |
|
244 Public method to set a flag to show the menu edge aligned with |
|
245 the button. |
|
246 </p><dl> |
|
247 <dt><i>enable</i> (bool)</dt> |
|
248 <dd> |
|
249 flag indicating to align the menu edge to the button |
|
250 </dd> |
|
251 </dl><a NAME="E5ToolButton.setToolbarButtonLook" ID="E5ToolButton.setToolbarButtonLook"></a> |
|
252 <h4>E5ToolButton.setToolbarButtonLook</h4> |
|
253 <b>setToolbarButtonLook</b>(<i>enable</i>) |
|
254 <p> |
|
255 Public method to set the toolbar look state. |
|
256 </p><dl> |
|
257 <dt><i>enable</i> (bool)</dt> |
|
258 <dd> |
|
259 flag indicating toolbar look |
|
260 </dd> |
|
261 </dl><a NAME="E5ToolButton.showMenuInside" ID="E5ToolButton.showMenuInside"></a> |
|
262 <h4>E5ToolButton.showMenuInside</h4> |
|
263 <b>showMenuInside</b>(<i></i>) |
|
264 <p> |
|
265 Public method to check, if the menu edge shall be aligned with |
|
266 the button. |
|
267 </p><dl> |
|
268 <dt>Returns:</dt> |
|
269 <dd> |
|
270 flag indicating that the menu edge shall be aligned |
|
271 </dd> |
|
272 </dl><dl> |
|
273 <dt>Return Type:</dt> |
|
274 <dd> |
|
275 bool |
|
276 </dd> |
|
277 </dl><a NAME="E5ToolButton.toolbarButtonLook" ID="E5ToolButton.toolbarButtonLook"></a> |
|
278 <h4>E5ToolButton.toolbarButtonLook</h4> |
|
279 <b>toolbarButtonLook</b>(<i></i>) |
|
280 <p> |
|
281 Public method to check, if the button has the toolbar look. |
|
282 </p><dl> |
|
283 <dt>Returns:</dt> |
|
284 <dd> |
|
285 flag indicating toolbar look |
|
286 </dd> |
|
287 </dl><dl> |
|
288 <dt>Return Type:</dt> |
|
289 <dd> |
|
290 bool |
|
291 </dd> |
|
292 </dl> |
|
293 <div align="right"><a href="#top">Up</a></div> |
|
294 <hr /> |
|
295 </body></html> |