Documentation/Source/eric4.E4Gui.E4TabWidget.html

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

eric ide

mercurial