|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' |
|
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> |
|
4 <html><head> |
|
5 <title>eric5.E4Gui.E4TabWidget</title> |
|
6 <style> |
|
7 b'body {\n background:white;\n margin: 0em 1em 10em 1em;\n color: black;\n}\n\nh1 { color: white; background: #4FA4FF; }\nh2 { color: white; background: #4FA4FF; }\nh3 { color: white; background: #00557F; }\nh4 { color: white; background: #00557F; }\n \na { color: #AA5500; }\n' |
|
8 </style> |
|
9 </head> |
|
10 <body><a NAME="top" ID="top"></a> |
|
11 <h1>eric5.E4Gui.E4TabWidget</h1> |
|
12 <p> |
|
13 Module implementing a TabWidget class substituting QTabWidget. |
|
14 </p> |
|
15 <h3>Global Attributes</h3> |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 <table> |
|
21 <tr> |
|
22 <td><a href="#E4DnDTabBar">E4DnDTabBar</a></td> |
|
23 <td>Class implementing a tab bar class substituting QTabBar.</td> |
|
24 </tr><tr> |
|
25 <td><a href="#E4TabWidget">E4TabWidget</a></td> |
|
26 <td>Class implementing a tab widget class substituting QTabWidget.</td> |
|
27 </tr><tr> |
|
28 <td><a href="#E4WheelTabBar">E4WheelTabBar</a></td> |
|
29 <td>Class implementing a tab bar class substituting QTabBar to support wheel events.</td> |
|
30 </tr> |
|
31 </table> |
|
32 <h3>Functions</h3> |
|
33 <table> |
|
34 <tr><td>None</td></tr> |
|
35 </table> |
|
36 <hr /><hr /> |
|
37 <a NAME="E4DnDTabBar" ID="E4DnDTabBar"></a> |
|
38 <h2>E4DnDTabBar</h2> |
|
39 <p> |
|
40 Class implementing a tab bar class substituting QTabBar. |
|
41 </p><h4>Signals</h4> |
|
42 <dl> |
|
43 <dt>tabMoveRequested(int, int)</dt> |
|
44 <dd> |
|
45 emitted to signal a tab move request giving |
|
46 the old and new index position |
|
47 </dd> |
|
48 </dl> |
|
49 <h3>Derived from</h3> |
|
50 E4WheelTabBar |
|
51 <h3>Class Attributes</h3> |
|
52 <table> |
|
53 <tr><td>None</td></tr> |
|
54 </table> |
|
55 <h3>Methods</h3> |
|
56 <table> |
|
57 <tr> |
|
58 <td><a href="#E4DnDTabBar.__init__">E4DnDTabBar</a></td> |
|
59 <td>Constructor</td> |
|
60 </tr><tr> |
|
61 <td><a href="#E4DnDTabBar.dragEnterEvent">dragEnterEvent</a></td> |
|
62 <td>Protected method to handle drag enter events.</td> |
|
63 </tr><tr> |
|
64 <td><a href="#E4DnDTabBar.dropEvent">dropEvent</a></td> |
|
65 <td>Protected method to handle drop events.</td> |
|
66 </tr><tr> |
|
67 <td><a href="#E4DnDTabBar.mouseMoveEvent">mouseMoveEvent</a></td> |
|
68 <td>Protected method to handle mouse move events.</td> |
|
69 </tr><tr> |
|
70 <td><a href="#E4DnDTabBar.mousePressEvent">mousePressEvent</a></td> |
|
71 <td>Protected method to handle mouse press events.</td> |
|
72 </tr> |
|
73 </table> |
|
74 <a NAME="E4DnDTabBar.__init__" ID="E4DnDTabBar.__init__"></a> |
|
75 <h4>E4DnDTabBar (Constructor)</h4> |
|
76 <b>E4DnDTabBar</b>(<i>parent = None</i>) |
|
77 <p> |
|
78 Constructor |
|
79 </p><dl> |
|
80 <dt><i>parent</i></dt> |
|
81 <dd> |
|
82 reference to the parent widget (QWidget) |
|
83 </dd> |
|
84 </dl><a NAME="E4DnDTabBar.dragEnterEvent" ID="E4DnDTabBar.dragEnterEvent"></a> |
|
85 <h4>E4DnDTabBar.dragEnterEvent</h4> |
|
86 <b>dragEnterEvent</b>(<i>event</i>) |
|
87 <p> |
|
88 Protected method to handle drag enter events. |
|
89 </p><dl> |
|
90 <dt><i>event</i></dt> |
|
91 <dd> |
|
92 reference to the drag enter event (QDragEnterEvent) |
|
93 </dd> |
|
94 </dl><a NAME="E4DnDTabBar.dropEvent" ID="E4DnDTabBar.dropEvent"></a> |
|
95 <h4>E4DnDTabBar.dropEvent</h4> |
|
96 <b>dropEvent</b>(<i>event</i>) |
|
97 <p> |
|
98 Protected method to handle drop events. |
|
99 </p><dl> |
|
100 <dt><i>event</i></dt> |
|
101 <dd> |
|
102 reference to the drop event (QDropEvent) |
|
103 </dd> |
|
104 </dl><a NAME="E4DnDTabBar.mouseMoveEvent" ID="E4DnDTabBar.mouseMoveEvent"></a> |
|
105 <h4>E4DnDTabBar.mouseMoveEvent</h4> |
|
106 <b>mouseMoveEvent</b>(<i>event</i>) |
|
107 <p> |
|
108 Protected method to handle mouse move events. |
|
109 </p><dl> |
|
110 <dt><i>event</i></dt> |
|
111 <dd> |
|
112 reference to the mouse move event (QMouseEvent) |
|
113 </dd> |
|
114 </dl><a NAME="E4DnDTabBar.mousePressEvent" ID="E4DnDTabBar.mousePressEvent"></a> |
|
115 <h4>E4DnDTabBar.mousePressEvent</h4> |
|
116 <b>mousePressEvent</b>(<i>event</i>) |
|
117 <p> |
|
118 Protected method to handle mouse press events. |
|
119 </p><dl> |
|
120 <dt><i>event</i></dt> |
|
121 <dd> |
|
122 reference to the mouse press event (QMouseEvent) |
|
123 </dd> |
|
124 </dl> |
|
125 <div align="right"><a href="#top">Up</a></div> |
|
126 <hr /><hr /> |
|
127 <a NAME="E4TabWidget" ID="E4TabWidget"></a> |
|
128 <h2>E4TabWidget</h2> |
|
129 <p> |
|
130 Class implementing a tab widget class substituting QTabWidget. |
|
131 </p><p> |
|
132 It provides slots to show the previous and next tab and give |
|
133 them the input focus and it allows to have a context menu for the tabs. |
|
134 </p><h4>Signals</h4> |
|
135 <dl> |
|
136 <dt>customTabContextMenuRequested(const QPoint & point, int index)</dt> |
|
137 <dd> |
|
138 emitted when |
|
139 a context menu for a tab is requested |
|
140 </dd> |
|
141 </dl> |
|
142 <h3>Derived from</h3> |
|
143 QTabWidget |
|
144 <h3>Class Attributes</h3> |
|
145 <table> |
|
146 <tr><td>None</td></tr> |
|
147 </table> |
|
148 <h3>Methods</h3> |
|
149 <table> |
|
150 <tr> |
|
151 <td><a href="#E4TabWidget.__init__">E4TabWidget</a></td> |
|
152 <td>Constructor</td> |
|
153 </tr><tr> |
|
154 <td><a href="#E4TabWidget.__currentChanged">__currentChanged</a></td> |
|
155 <td>Private slot to handle the currentChanged signal.</td> |
|
156 </tr><tr> |
|
157 <td><a href="#E4TabWidget.__freeSide">__freeSide</a></td> |
|
158 <td>Private method to determine the free side of a tab.</td> |
|
159 </tr><tr> |
|
160 <td><a href="#E4TabWidget.__handleTabCustomContextMenuRequested">__handleTabCustomContextMenuRequested</a></td> |
|
161 <td>Private slot to handle the context menu request for the tabbar.</td> |
|
162 </tr><tr> |
|
163 <td><a href="#E4TabWidget.animationLabel">animationLabel</a></td> |
|
164 <td>Public slot to set an animated icon.</td> |
|
165 </tr><tr> |
|
166 <td><a href="#E4TabWidget.moveTab">moveTab</a></td> |
|
167 <td>Public method to move a tab to a new index.</td> |
|
168 </tr><tr> |
|
169 <td><a href="#E4TabWidget.nextTab">nextTab</a></td> |
|
170 <td>Public slot used to show the next tab.</td> |
|
171 </tr><tr> |
|
172 <td><a href="#E4TabWidget.prevTab">prevTab</a></td> |
|
173 <td>Public slot used to show the previous tab.</td> |
|
174 </tr><tr> |
|
175 <td><a href="#E4TabWidget.resetAnimation">resetAnimation</a></td> |
|
176 <td>Public slot to reset an animated icon.</td> |
|
177 </tr><tr> |
|
178 <td><a href="#E4TabWidget.selectTab">selectTab</a></td> |
|
179 <td>Public method to get the index of a tab given a position.</td> |
|
180 </tr><tr> |
|
181 <td><a href="#E4TabWidget.setTabContextMenuPolicy">setTabContextMenuPolicy</a></td> |
|
182 <td>Public method to set the context menu policy of the tab.</td> |
|
183 </tr><tr> |
|
184 <td><a href="#E4TabWidget.switchTab">switchTab</a></td> |
|
185 <td>Public slot used to switch between the current and the previous current tab.</td> |
|
186 </tr> |
|
187 </table> |
|
188 <a NAME="E4TabWidget.__init__" ID="E4TabWidget.__init__"></a> |
|
189 <h4>E4TabWidget (Constructor)</h4> |
|
190 <b>E4TabWidget</b>(<i>parent = None, dnd = False</i>) |
|
191 <p> |
|
192 Constructor |
|
193 </p><dl> |
|
194 <dt><i>parent</i></dt> |
|
195 <dd> |
|
196 reference to the parent widget (QWidget) |
|
197 </dd><dt><i>dnd=</i></dt> |
|
198 <dd> |
|
199 flag indicating the support for Drag & Drop (boolean) |
|
200 </dd> |
|
201 </dl><a NAME="E4TabWidget.__currentChanged" ID="E4TabWidget.__currentChanged"></a> |
|
202 <h4>E4TabWidget.__currentChanged</h4> |
|
203 <b>__currentChanged</b>(<i>index</i>) |
|
204 <p> |
|
205 Private slot to handle the currentChanged signal. |
|
206 </p><dl> |
|
207 <dt><i>index</i></dt> |
|
208 <dd> |
|
209 index of the current tab |
|
210 </dd> |
|
211 </dl><a NAME="E4TabWidget.__freeSide" ID="E4TabWidget.__freeSide"></a> |
|
212 <h4>E4TabWidget.__freeSide</h4> |
|
213 <b>__freeSide</b>(<i></i>) |
|
214 <p> |
|
215 Private method to determine the free side of a tab. |
|
216 </p><dl> |
|
217 <dt>Returns:</dt> |
|
218 <dd> |
|
219 free side (QTabBar.ButtonPosition) |
|
220 </dd> |
|
221 </dl><a NAME="E4TabWidget.__handleTabCustomContextMenuRequested" ID="E4TabWidget.__handleTabCustomContextMenuRequested"></a> |
|
222 <h4>E4TabWidget.__handleTabCustomContextMenuRequested</h4> |
|
223 <b>__handleTabCustomContextMenuRequested</b>(<i>point</i>) |
|
224 <p> |
|
225 Private slot to handle the context menu request for the tabbar. |
|
226 </p><dl> |
|
227 <dt><i>point</i></dt> |
|
228 <dd> |
|
229 point the context menu was requested (QPoint) |
|
230 </dd> |
|
231 </dl><a NAME="E4TabWidget.animationLabel" ID="E4TabWidget.animationLabel"></a> |
|
232 <h4>E4TabWidget.animationLabel</h4> |
|
233 <b>animationLabel</b>(<i>index, animationFile</i>) |
|
234 <p> |
|
235 Public slot to set an animated icon. |
|
236 </p><dl> |
|
237 <dt><i>index</i></dt> |
|
238 <dd> |
|
239 tab index (integer) |
|
240 </dd><dt><i>animationFile</i></dt> |
|
241 <dd> |
|
242 name of the file containing the animation (string) |
|
243 </dd> |
|
244 </dl><dl> |
|
245 <dt>Returns:</dt> |
|
246 <dd> |
|
247 reference to the created label (QLabel) |
|
248 </dd> |
|
249 </dl><a NAME="E4TabWidget.moveTab" ID="E4TabWidget.moveTab"></a> |
|
250 <h4>E4TabWidget.moveTab</h4> |
|
251 <b>moveTab</b>(<i>curIndex, newIndex</i>) |
|
252 <p> |
|
253 Public method to move a tab to a new index. |
|
254 </p><dl> |
|
255 <dt><i>curIndex</i></dt> |
|
256 <dd> |
|
257 index of tab to be moved (integer) |
|
258 </dd><dt><i>newIndex</i></dt> |
|
259 <dd> |
|
260 index the tab should be moved to (integer) |
|
261 </dd> |
|
262 </dl><a NAME="E4TabWidget.nextTab" ID="E4TabWidget.nextTab"></a> |
|
263 <h4>E4TabWidget.nextTab</h4> |
|
264 <b>nextTab</b>(<i></i>) |
|
265 <p> |
|
266 Public slot used to show the next tab. |
|
267 </p><a NAME="E4TabWidget.prevTab" ID="E4TabWidget.prevTab"></a> |
|
268 <h4>E4TabWidget.prevTab</h4> |
|
269 <b>prevTab</b>(<i></i>) |
|
270 <p> |
|
271 Public slot used to show the previous tab. |
|
272 </p><a NAME="E4TabWidget.resetAnimation" ID="E4TabWidget.resetAnimation"></a> |
|
273 <h4>E4TabWidget.resetAnimation</h4> |
|
274 <b>resetAnimation</b>(<i>index</i>) |
|
275 <p> |
|
276 Public slot to reset an animated icon. |
|
277 </p><dl> |
|
278 <dt><i>index</i></dt> |
|
279 <dd> |
|
280 tab index (integer) |
|
281 </dd> |
|
282 </dl><a NAME="E4TabWidget.selectTab" ID="E4TabWidget.selectTab"></a> |
|
283 <h4>E4TabWidget.selectTab</h4> |
|
284 <b>selectTab</b>(<i>pos</i>) |
|
285 <p> |
|
286 Public method to get the index of a tab given a position. |
|
287 </p><dl> |
|
288 <dt><i>pos</i></dt> |
|
289 <dd> |
|
290 position determining the tab index (QPoint) |
|
291 </dd> |
|
292 </dl><dl> |
|
293 <dt>Returns:</dt> |
|
294 <dd> |
|
295 index of the tab (integer) |
|
296 </dd> |
|
297 </dl><a NAME="E4TabWidget.setTabContextMenuPolicy" ID="E4TabWidget.setTabContextMenuPolicy"></a> |
|
298 <h4>E4TabWidget.setTabContextMenuPolicy</h4> |
|
299 <b>setTabContextMenuPolicy</b>(<i>policy</i>) |
|
300 <p> |
|
301 Public method to set the context menu policy of the tab. |
|
302 </p><dl> |
|
303 <dt><i>policy</i></dt> |
|
304 <dd> |
|
305 context menu policy to set (Qt.ContextMenuPolicy) |
|
306 </dd> |
|
307 </dl><a NAME="E4TabWidget.switchTab" ID="E4TabWidget.switchTab"></a> |
|
308 <h4>E4TabWidget.switchTab</h4> |
|
309 <b>switchTab</b>(<i></i>) |
|
310 <p> |
|
311 Public slot used to switch between the current and the previous current tab. |
|
312 </p> |
|
313 <div align="right"><a href="#top">Up</a></div> |
|
314 <hr /><hr /> |
|
315 <a NAME="E4WheelTabBar" ID="E4WheelTabBar"></a> |
|
316 <h2>E4WheelTabBar</h2> |
|
317 <p> |
|
318 Class implementing a tab bar class substituting QTabBar to support wheel events. |
|
319 </p> |
|
320 <h3>Derived from</h3> |
|
321 QTabBar |
|
322 <h3>Class Attributes</h3> |
|
323 <table> |
|
324 <tr><td>None</td></tr> |
|
325 </table> |
|
326 <h3>Methods</h3> |
|
327 <table> |
|
328 <tr> |
|
329 <td><a href="#E4WheelTabBar.__init__">E4WheelTabBar</a></td> |
|
330 <td>Constructor</td> |
|
331 </tr><tr> |
|
332 <td><a href="#E4WheelTabBar.wheelEvent">wheelEvent</a></td> |
|
333 <td>Protected slot to support wheel events.</td> |
|
334 </tr> |
|
335 </table> |
|
336 <a NAME="E4WheelTabBar.__init__" ID="E4WheelTabBar.__init__"></a> |
|
337 <h4>E4WheelTabBar (Constructor)</h4> |
|
338 <b>E4WheelTabBar</b>(<i>parent = None</i>) |
|
339 <p> |
|
340 Constructor |
|
341 </p><dl> |
|
342 <dt><i>parent</i></dt> |
|
343 <dd> |
|
344 reference to the parent widget (QWidget) |
|
345 </dd> |
|
346 </dl><a NAME="E4WheelTabBar.wheelEvent" ID="E4WheelTabBar.wheelEvent"></a> |
|
347 <h4>E4WheelTabBar.wheelEvent</h4> |
|
348 <b>wheelEvent</b>(<i>event</i>) |
|
349 <p> |
|
350 Protected slot to support wheel events. |
|
351 </p><dl> |
|
352 <dt><i>reference</i></dt> |
|
353 <dd> |
|
354 to the wheel event (QWheelEvent) |
|
355 </dd> |
|
356 </dl> |
|
357 <div align="right"><a href="#top">Up</a></div> |
|
358 <hr /> |
|
359 </body></html> |