|
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.contextMenuEvent">contextMenuEvent</a></td> |
|
90 <td>Protected method to handle context menu events.</td> |
|
91 </tr><tr> |
|
92 <td><a href="#E5ToolButton.menu">menu</a></td> |
|
93 <td>Public method to get a reference to the tool button menu.</td> |
|
94 </tr><tr> |
|
95 <td><a href="#E5ToolButton.mouseDoubleClickEvent">mouseDoubleClickEvent</a></td> |
|
96 <td>Protected method to handle mouse double click events.</td> |
|
97 </tr><tr> |
|
98 <td><a href="#E5ToolButton.mousePressEvent">mousePressEvent</a></td> |
|
99 <td>Protected method to handle mouse press events.</td> |
|
100 </tr><tr> |
|
101 <td><a href="#E5ToolButton.mouseReleaseEvent">mouseReleaseEvent</a></td> |
|
102 <td>Protected method to handle mouse release events.</td> |
|
103 </tr><tr> |
|
104 <td><a href="#E5ToolButton.setMenu">setMenu</a></td> |
|
105 <td>Public method to set the tool button menu.</td> |
|
106 </tr><tr> |
|
107 <td><a href="#E5ToolButton.setShowMenuInside">setShowMenuInside</a></td> |
|
108 <td>Public method to set a flag to show the menu edge aligned with the button.</td> |
|
109 </tr><tr> |
|
110 <td><a href="#E5ToolButton.setToolbarButtonLook">setToolbarButtonLook</a></td> |
|
111 <td>Public method to set the toolbar look state.</td> |
|
112 </tr><tr> |
|
113 <td><a href="#E5ToolButton.showMenuInside">showMenuInside</a></td> |
|
114 <td>Public method to check, if the menu edge shall be aligned with the button.</td> |
|
115 </tr><tr> |
|
116 <td><a href="#E5ToolButton.toolbarButtonLook">toolbarButtonLook</a></td> |
|
117 <td>Public method to check, if the button has the toolbar look.</td> |
|
118 </tr> |
|
119 </table> |
|
120 <h3>Static Methods</h3> |
|
121 <table> |
|
122 <tr><td>None</td></tr> |
|
123 </table> |
|
124 <a NAME="E5ToolButton.__init__" ID="E5ToolButton.__init__"></a> |
|
125 <h4>E5ToolButton (Constructor)</h4> |
|
126 <b>E5ToolButton</b>(<i>parent=None</i>) |
|
127 <p> |
|
128 Constructor |
|
129 </p><dl> |
|
130 <dt><i>parent</i> (QWidget)</dt> |
|
131 <dd> |
|
132 reference to the parent widget |
|
133 </dd> |
|
134 </dl><a NAME="E5ToolButton.__menuAboutToHide" ID="E5ToolButton.__menuAboutToHide"></a> |
|
135 <h4>E5ToolButton.__menuAboutToHide</h4> |
|
136 <b>__menuAboutToHide</b>(<i></i>) |
|
137 <p> |
|
138 Private slot to handle the tool button menu about to be hidden. |
|
139 </p><a NAME="E5ToolButton.__showMenu" ID="E5ToolButton.__showMenu"></a> |
|
140 <h4>E5ToolButton.__showMenu</h4> |
|
141 <b>__showMenu</b>(<i></i>) |
|
142 <p> |
|
143 Private slot to show the tool button menu. |
|
144 </p><a NAME="E5ToolButton.contextMenuEvent" ID="E5ToolButton.contextMenuEvent"></a> |
|
145 <h4>E5ToolButton.contextMenuEvent</h4> |
|
146 <b>contextMenuEvent</b>(<i>evt</i>) |
|
147 <p> |
|
148 Protected method to handle context menu events. |
|
149 </p><dl> |
|
150 <dt><i>evt</i> (QContextMenuEvent)</dt> |
|
151 <dd> |
|
152 reference to the context menu event |
|
153 </dd> |
|
154 </dl><a NAME="E5ToolButton.menu" ID="E5ToolButton.menu"></a> |
|
155 <h4>E5ToolButton.menu</h4> |
|
156 <b>menu</b>(<i></i>) |
|
157 <p> |
|
158 Public method to get a reference to the tool button menu. |
|
159 </p><dl> |
|
160 <dt>Returns:</dt> |
|
161 <dd> |
|
162 reference to the tool button menu |
|
163 </dd> |
|
164 </dl><dl> |
|
165 <dt>Return Type:</dt> |
|
166 <dd> |
|
167 QMenu |
|
168 </dd> |
|
169 </dl><a NAME="E5ToolButton.mouseDoubleClickEvent" ID="E5ToolButton.mouseDoubleClickEvent"></a> |
|
170 <h4>E5ToolButton.mouseDoubleClickEvent</h4> |
|
171 <b>mouseDoubleClickEvent</b>(<i>evt</i>) |
|
172 <p> |
|
173 Protected method to handle mouse double click events. |
|
174 </p><dl> |
|
175 <dt><i>evt</i> (QMouseEvent)</dt> |
|
176 <dd> |
|
177 reference to the mouse event |
|
178 </dd> |
|
179 </dl><a NAME="E5ToolButton.mousePressEvent" ID="E5ToolButton.mousePressEvent"></a> |
|
180 <h4>E5ToolButton.mousePressEvent</h4> |
|
181 <b>mousePressEvent</b>(<i>evt</i>) |
|
182 <p> |
|
183 Protected method to handle mouse press events. |
|
184 </p><dl> |
|
185 <dt><i>evt</i> (QMouseEvent)</dt> |
|
186 <dd> |
|
187 reference to the mouse event |
|
188 </dd> |
|
189 </dl><a NAME="E5ToolButton.mouseReleaseEvent" ID="E5ToolButton.mouseReleaseEvent"></a> |
|
190 <h4>E5ToolButton.mouseReleaseEvent</h4> |
|
191 <b>mouseReleaseEvent</b>(<i>evt</i>) |
|
192 <p> |
|
193 Protected method to handle mouse release events. |
|
194 </p><dl> |
|
195 <dt><i>evt</i> (QMouseEvent)</dt> |
|
196 <dd> |
|
197 reference to the mouse event |
|
198 </dd> |
|
199 </dl><a NAME="E5ToolButton.setMenu" ID="E5ToolButton.setMenu"></a> |
|
200 <h4>E5ToolButton.setMenu</h4> |
|
201 <b>setMenu</b>(<i>menu</i>) |
|
202 <p> |
|
203 Public method to set the tool button menu. |
|
204 </p><dl> |
|
205 <dt><i>menu</i> (QMenu)</dt> |
|
206 <dd> |
|
207 reference to the tool button menu |
|
208 </dd> |
|
209 </dl><a NAME="E5ToolButton.setShowMenuInside" ID="E5ToolButton.setShowMenuInside"></a> |
|
210 <h4>E5ToolButton.setShowMenuInside</h4> |
|
211 <b>setShowMenuInside</b>(<i>enable</i>) |
|
212 <p> |
|
213 Public method to set a flag to show the menu edge aligned with |
|
214 the button. |
|
215 </p><dl> |
|
216 <dt><i>enable</i> (bool)</dt> |
|
217 <dd> |
|
218 flag indicating to align the menu edge to the button |
|
219 </dd> |
|
220 </dl><a NAME="E5ToolButton.setToolbarButtonLook" ID="E5ToolButton.setToolbarButtonLook"></a> |
|
221 <h4>E5ToolButton.setToolbarButtonLook</h4> |
|
222 <b>setToolbarButtonLook</b>(<i>enable</i>) |
|
223 <p> |
|
224 Public method to set the toolbar look state. |
|
225 </p><dl> |
|
226 <dt><i>enable</i> (bool)</dt> |
|
227 <dd> |
|
228 flag indicating toolbar look |
|
229 </dd> |
|
230 </dl><a NAME="E5ToolButton.showMenuInside" ID="E5ToolButton.showMenuInside"></a> |
|
231 <h4>E5ToolButton.showMenuInside</h4> |
|
232 <b>showMenuInside</b>(<i></i>) |
|
233 <p> |
|
234 Public method to check, if the menu edge shall be aligned with |
|
235 the button. |
|
236 </p><dl> |
|
237 <dt>Returns:</dt> |
|
238 <dd> |
|
239 flag indicating that the menu edge shall be aligned |
|
240 </dd> |
|
241 </dl><dl> |
|
242 <dt>Return Type:</dt> |
|
243 <dd> |
|
244 bool |
|
245 </dd> |
|
246 </dl><a NAME="E5ToolButton.toolbarButtonLook" ID="E5ToolButton.toolbarButtonLook"></a> |
|
247 <h4>E5ToolButton.toolbarButtonLook</h4> |
|
248 <b>toolbarButtonLook</b>(<i></i>) |
|
249 <p> |
|
250 Public method to check, if the button has the toolbar look. |
|
251 </p><dl> |
|
252 <dt>Returns:</dt> |
|
253 <dd> |
|
254 flag indicating toolbar look |
|
255 </dd> |
|
256 </dl><dl> |
|
257 <dt>Return Type:</dt> |
|
258 <dd> |
|
259 bool |
|
260 </dd> |
|
261 </dl> |
|
262 <div align="right"><a href="#top">Up</a></div> |
|
263 <hr /> |
|
264 </body></html> |