16 |
16 |
17 a { color: #BA6D36; } |
17 a { color: #BA6D36; } |
18 |
18 |
19 </style> |
19 </style> |
20 </head> |
20 </head> |
21 <body><a NAME="top" ID="top"></a> |
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
22 <h1>eric6.E5Gui.E5ModelMenu</h1> |
23 <h1>eric6.E5Gui.E5ModelMenu</h1> |
|
24 |
23 <p> |
25 <p> |
24 Module implementing a menu populated from a QAbstractItemModel. |
26 Module implementing a menu populated from a QAbstractItemModel. |
25 </p> |
27 </p> |
26 <h3>Global Attributes</h3> |
28 <h3>Global Attributes</h3> |
|
29 |
27 <table> |
30 <table> |
28 <tr><td>None</td></tr> |
31 <tr><td>None</td></tr> |
29 </table> |
32 </table> |
30 <h3>Classes</h3> |
33 <h3>Classes</h3> |
|
34 |
31 <table> |
35 <table> |
|
36 |
32 <tr> |
37 <tr> |
33 <td><a href="#E5ModelMenu">E5ModelMenu</a></td> |
38 <td><a href="#E5ModelMenu">E5ModelMenu</a></td> |
34 <td>Class implementing a menu populated from a QAbstractItemModel.</td> |
39 <td>Class implementing a menu populated from a QAbstractItemModel.</td> |
35 </tr> |
40 </tr> |
36 </table> |
41 </table> |
37 <h3>Functions</h3> |
42 <h3>Functions</h3> |
|
43 |
38 <table> |
44 <table> |
39 <tr><td>None</td></tr> |
45 <tr><td>None</td></tr> |
40 </table> |
46 </table> |
41 <hr /><hr /> |
47 <hr /> |
|
48 <hr /> |
42 <a NAME="E5ModelMenu" ID="E5ModelMenu"></a> |
49 <a NAME="E5ModelMenu" ID="E5ModelMenu"></a> |
43 <h2>E5ModelMenu</h2> |
50 <h2>E5ModelMenu</h2> |
|
51 |
44 <p> |
52 <p> |
45 Class implementing a menu populated from a QAbstractItemModel. |
53 Class implementing a menu populated from a QAbstractItemModel. |
46 </p><h3>Signals</h3> |
54 </p> |
47 <dl> |
55 <h3>Signals</h3> |
|
56 <dl> |
|
57 |
48 <dt>activated(QModelIndex)</dt> |
58 <dt>activated(QModelIndex)</dt> |
49 <dd> |
59 <dd> |
50 emitted when an action has been triggered |
60 emitted when an action has been triggered |
51 </dd> |
61 </dd> |
52 </dl> |
62 </dl> |
53 <h3>Derived from</h3> |
63 <h3>Derived from</h3> |
54 QMenu |
64 QMenu |
55 <h3>Class Attributes</h3> |
65 <h3>Class Attributes</h3> |
|
66 |
56 <table> |
67 <table> |
57 <tr><td>None</td></tr> |
68 <tr><td>None</td></tr> |
58 </table> |
69 </table> |
59 <h3>Class Methods</h3> |
70 <h3>Class Methods</h3> |
|
71 |
60 <table> |
72 <table> |
61 <tr><td>None</td></tr> |
73 <tr><td>None</td></tr> |
62 </table> |
74 </table> |
63 <h3>Methods</h3> |
75 <h3>Methods</h3> |
|
76 |
64 <table> |
77 <table> |
|
78 |
65 <tr> |
79 <tr> |
66 <td><a href="#E5ModelMenu.__init__">E5ModelMenu</a></td> |
80 <td><a href="#E5ModelMenu.__init__">E5ModelMenu</a></td> |
67 <td>Constructor</td> |
81 <td>Constructor</td> |
68 </tr><tr> |
82 </tr> |
|
83 <tr> |
69 <td><a href="#E5ModelMenu.__aboutToShow">__aboutToShow</a></td> |
84 <td><a href="#E5ModelMenu.__aboutToShow">__aboutToShow</a></td> |
70 <td>Private slot to show the menu.</td> |
85 <td>Private slot to show the menu.</td> |
71 </tr><tr> |
86 </tr> |
|
87 <tr> |
72 <td><a href="#E5ModelMenu.__actionTriggered">__actionTriggered</a></td> |
88 <td><a href="#E5ModelMenu.__actionTriggered">__actionTriggered</a></td> |
73 <td>Private slot to handle the triggering of an action.</td> |
89 <td>Private slot to handle the triggering of an action.</td> |
74 </tr><tr> |
90 </tr> |
|
91 <tr> |
75 <td><a href="#E5ModelMenu.__makeAction">__makeAction</a></td> |
92 <td><a href="#E5ModelMenu.__makeAction">__makeAction</a></td> |
76 <td>Private method to create an action.</td> |
93 <td>Private method to create an action.</td> |
77 </tr><tr> |
94 </tr> |
|
95 <tr> |
78 <td><a href="#E5ModelMenu.createBaseMenu">createBaseMenu</a></td> |
96 <td><a href="#E5ModelMenu.createBaseMenu">createBaseMenu</a></td> |
79 <td>Public method to get the menu that is used to populate sub menu's.</td> |
97 <td>Public method to get the menu that is used to populate sub menu's.</td> |
80 </tr><tr> |
98 </tr> |
|
99 <tr> |
81 <td><a href="#E5ModelMenu.createMenu">createMenu</a></td> |
100 <td><a href="#E5ModelMenu.createMenu">createMenu</a></td> |
82 <td>Public method to put all the children of a parent into a menu of a given length.</td> |
101 <td>Public method to put all the children of a parent into a menu of a given length.</td> |
83 </tr><tr> |
102 </tr> |
|
103 <tr> |
84 <td><a href="#E5ModelMenu.dragEnterEvent">dragEnterEvent</a></td> |
104 <td><a href="#E5ModelMenu.dragEnterEvent">dragEnterEvent</a></td> |
85 <td>Protected method to handle drag enter events.</td> |
105 <td>Protected method to handle drag enter events.</td> |
86 </tr><tr> |
106 </tr> |
|
107 <tr> |
87 <td><a href="#E5ModelMenu.dropEvent">dropEvent</a></td> |
108 <td><a href="#E5ModelMenu.dropEvent">dropEvent</a></td> |
88 <td>Protected method to handle drop events.</td> |
109 <td>Protected method to handle drop events.</td> |
89 </tr><tr> |
110 </tr> |
|
111 <tr> |
90 <td><a href="#E5ModelMenu.firstSeparator">firstSeparator</a></td> |
112 <td><a href="#E5ModelMenu.firstSeparator">firstSeparator</a></td> |
91 <td>Public method to get the first separator.</td> |
113 <td>Public method to get the first separator.</td> |
92 </tr><tr> |
114 </tr> |
|
115 <tr> |
93 <td><a href="#E5ModelMenu.index">index</a></td> |
116 <td><a href="#E5ModelMenu.index">index</a></td> |
94 <td>Public method to get the index of an action.</td> |
117 <td>Public method to get the index of an action.</td> |
95 </tr><tr> |
118 </tr> |
|
119 <tr> |
96 <td><a href="#E5ModelMenu.makeAction">makeAction</a></td> |
120 <td><a href="#E5ModelMenu.makeAction">makeAction</a></td> |
97 <td>Public method to create an action.</td> |
121 <td>Public method to create an action.</td> |
98 </tr><tr> |
122 </tr> |
|
123 <tr> |
99 <td><a href="#E5ModelMenu.maxRows">maxRows</a></td> |
124 <td><a href="#E5ModelMenu.maxRows">maxRows</a></td> |
100 <td>Public method to get the maximum number of entries to show.</td> |
125 <td>Public method to get the maximum number of entries to show.</td> |
101 </tr><tr> |
126 </tr> |
|
127 <tr> |
102 <td><a href="#E5ModelMenu.model">model</a></td> |
128 <td><a href="#E5ModelMenu.model">model</a></td> |
103 <td>Public method to get a reference to the model.</td> |
129 <td>Public method to get a reference to the model.</td> |
104 </tr><tr> |
130 </tr> |
|
131 <tr> |
105 <td><a href="#E5ModelMenu.mouseMoveEvent">mouseMoveEvent</a></td> |
132 <td><a href="#E5ModelMenu.mouseMoveEvent">mouseMoveEvent</a></td> |
106 <td>Protected method to handle mouse move events.</td> |
133 <td>Protected method to handle mouse move events.</td> |
107 </tr><tr> |
134 </tr> |
|
135 <tr> |
108 <td><a href="#E5ModelMenu.mousePressEvent">mousePressEvent</a></td> |
136 <td><a href="#E5ModelMenu.mousePressEvent">mousePressEvent</a></td> |
109 <td>Protected method handling mouse press events.</td> |
137 <td>Protected method handling mouse press events.</td> |
110 </tr><tr> |
138 </tr> |
|
139 <tr> |
111 <td><a href="#E5ModelMenu.mouseReleaseEvent">mouseReleaseEvent</a></td> |
140 <td><a href="#E5ModelMenu.mouseReleaseEvent">mouseReleaseEvent</a></td> |
112 <td>Protected method handling mouse release events.</td> |
141 <td>Protected method handling mouse release events.</td> |
113 </tr><tr> |
142 </tr> |
|
143 <tr> |
114 <td><a href="#E5ModelMenu.postPopulated">postPopulated</a></td> |
144 <td><a href="#E5ModelMenu.postPopulated">postPopulated</a></td> |
115 <td>Public method to add any actions after the tree.</td> |
145 <td>Public method to add any actions after the tree.</td> |
116 </tr><tr> |
146 </tr> |
|
147 <tr> |
117 <td><a href="#E5ModelMenu.prePopulated">prePopulated</a></td> |
148 <td><a href="#E5ModelMenu.prePopulated">prePopulated</a></td> |
118 <td>Public method to add any actions before the tree.</td> |
149 <td>Public method to add any actions before the tree.</td> |
119 </tr><tr> |
150 </tr> |
|
151 <tr> |
120 <td><a href="#E5ModelMenu.removeEntry">removeEntry</a></td> |
152 <td><a href="#E5ModelMenu.removeEntry">removeEntry</a></td> |
121 <td>Public method to remove a menu entry.</td> |
153 <td>Public method to remove a menu entry.</td> |
122 </tr><tr> |
154 </tr> |
|
155 <tr> |
123 <td><a href="#E5ModelMenu.resetFlags">resetFlags</a></td> |
156 <td><a href="#E5ModelMenu.resetFlags">resetFlags</a></td> |
124 <td>Public method to reset the saved internal state.</td> |
157 <td>Public method to reset the saved internal state.</td> |
125 </tr><tr> |
158 </tr> |
|
159 <tr> |
126 <td><a href="#E5ModelMenu.rootIndex">rootIndex</a></td> |
160 <td><a href="#E5ModelMenu.rootIndex">rootIndex</a></td> |
127 <td>Public method to get the index of the root item.</td> |
161 <td>Public method to get the index of the root item.</td> |
128 </tr><tr> |
162 </tr> |
|
163 <tr> |
129 <td><a href="#E5ModelMenu.separatorRole">separatorRole</a></td> |
164 <td><a href="#E5ModelMenu.separatorRole">separatorRole</a></td> |
130 <td>Public method to get the role of the separator.</td> |
165 <td>Public method to get the role of the separator.</td> |
131 </tr><tr> |
166 </tr> |
|
167 <tr> |
132 <td><a href="#E5ModelMenu.setFirstSeparator">setFirstSeparator</a></td> |
168 <td><a href="#E5ModelMenu.setFirstSeparator">setFirstSeparator</a></td> |
133 <td>Public method to set the first separator.</td> |
169 <td>Public method to set the first separator.</td> |
134 </tr><tr> |
170 </tr> |
|
171 <tr> |
135 <td><a href="#E5ModelMenu.setMaxRows">setMaxRows</a></td> |
172 <td><a href="#E5ModelMenu.setMaxRows">setMaxRows</a></td> |
136 <td>Public method to set the maximum number of entries to show.</td> |
173 <td>Public method to set the maximum number of entries to show.</td> |
137 </tr><tr> |
174 </tr> |
|
175 <tr> |
138 <td><a href="#E5ModelMenu.setModel">setModel</a></td> |
176 <td><a href="#E5ModelMenu.setModel">setModel</a></td> |
139 <td>Public method to set the model for the menu.</td> |
177 <td>Public method to set the model for the menu.</td> |
140 </tr><tr> |
178 </tr> |
|
179 <tr> |
141 <td><a href="#E5ModelMenu.setRootIndex">setRootIndex</a></td> |
180 <td><a href="#E5ModelMenu.setRootIndex">setRootIndex</a></td> |
142 <td>Public method to set the index of the root item.</td> |
181 <td>Public method to set the index of the root item.</td> |
143 </tr><tr> |
182 </tr> |
|
183 <tr> |
144 <td><a href="#E5ModelMenu.setSeparatorRole">setSeparatorRole</a></td> |
184 <td><a href="#E5ModelMenu.setSeparatorRole">setSeparatorRole</a></td> |
145 <td>Public method to set the role of the separator.</td> |
185 <td>Public method to set the role of the separator.</td> |
146 </tr><tr> |
186 </tr> |
|
187 <tr> |
147 <td><a href="#E5ModelMenu.setStatusBarTextRole">setStatusBarTextRole</a></td> |
188 <td><a href="#E5ModelMenu.setStatusBarTextRole">setStatusBarTextRole</a></td> |
148 <td>Public method to set the role of the status bar text.</td> |
189 <td>Public method to set the role of the status bar text.</td> |
149 </tr><tr> |
190 </tr> |
|
191 <tr> |
150 <td><a href="#E5ModelMenu.statusBarTextRole">statusBarTextRole</a></td> |
192 <td><a href="#E5ModelMenu.statusBarTextRole">statusBarTextRole</a></td> |
151 <td>Public method to get the role of the status bar text.</td> |
193 <td>Public method to get the role of the status bar text.</td> |
152 </tr> |
194 </tr> |
153 </table> |
195 </table> |
154 <h3>Static Methods</h3> |
196 <h3>Static Methods</h3> |
|
197 |
155 <table> |
198 <table> |
156 <tr><td>None</td></tr> |
199 <tr><td>None</td></tr> |
157 </table> |
200 </table> |
|
201 |
158 <a NAME="E5ModelMenu.__init__" ID="E5ModelMenu.__init__"></a> |
202 <a NAME="E5ModelMenu.__init__" ID="E5ModelMenu.__init__"></a> |
159 <h4>E5ModelMenu (Constructor)</h4> |
203 <h4>E5ModelMenu (Constructor)</h4> |
160 <b>E5ModelMenu</b>(<i>parent=None</i>) |
204 <b>E5ModelMenu</b>(<i>parent=None</i>) |
|
205 |
161 <p> |
206 <p> |
162 Constructor |
207 Constructor |
163 </p><dl> |
208 </p> |
|
209 <dl> |
|
210 |
164 <dt><i>parent</i></dt> |
211 <dt><i>parent</i></dt> |
165 <dd> |
212 <dd> |
166 reference to the parent widget (QWidget) |
213 reference to the parent widget (QWidget) |
167 </dd> |
214 </dd> |
168 </dl><a NAME="E5ModelMenu.__aboutToShow" ID="E5ModelMenu.__aboutToShow"></a> |
215 </dl> |
|
216 <a NAME="E5ModelMenu.__aboutToShow" ID="E5ModelMenu.__aboutToShow"></a> |
169 <h4>E5ModelMenu.__aboutToShow</h4> |
217 <h4>E5ModelMenu.__aboutToShow</h4> |
170 <b>__aboutToShow</b>(<i></i>) |
218 <b>__aboutToShow</b>(<i></i>) |
|
219 |
171 <p> |
220 <p> |
172 Private slot to show the menu. |
221 Private slot to show the menu. |
173 </p><a NAME="E5ModelMenu.__actionTriggered" ID="E5ModelMenu.__actionTriggered"></a> |
222 </p> |
|
223 <a NAME="E5ModelMenu.__actionTriggered" ID="E5ModelMenu.__actionTriggered"></a> |
174 <h4>E5ModelMenu.__actionTriggered</h4> |
224 <h4>E5ModelMenu.__actionTriggered</h4> |
175 <b>__actionTriggered</b>(<i>action</i>) |
225 <b>__actionTriggered</b>(<i>action</i>) |
|
226 |
176 <p> |
227 <p> |
177 Private slot to handle the triggering of an action. |
228 Private slot to handle the triggering of an action. |
178 </p><dl> |
229 </p> |
|
230 <dl> |
|
231 |
179 <dt><i>action</i></dt> |
232 <dt><i>action</i></dt> |
180 <dd> |
233 <dd> |
181 reference to the action that was triggered (QAction) |
234 reference to the action that was triggered (QAction) |
182 </dd> |
235 </dd> |
183 </dl><a NAME="E5ModelMenu.__makeAction" ID="E5ModelMenu.__makeAction"></a> |
236 </dl> |
|
237 <a NAME="E5ModelMenu.__makeAction" ID="E5ModelMenu.__makeAction"></a> |
184 <h4>E5ModelMenu.__makeAction</h4> |
238 <h4>E5ModelMenu.__makeAction</h4> |
185 <b>__makeAction</b>(<i>idx</i>) |
239 <b>__makeAction</b>(<i>idx</i>) |
|
240 |
186 <p> |
241 <p> |
187 Private method to create an action. |
242 Private method to create an action. |
188 </p><dl> |
243 </p> |
|
244 <dl> |
|
245 |
189 <dt><i>idx</i></dt> |
246 <dt><i>idx</i></dt> |
190 <dd> |
247 <dd> |
191 index of the item to create an action for (QModelIndex) |
248 index of the item to create an action for (QModelIndex) |
192 </dd> |
249 </dd> |
193 </dl><dl> |
250 </dl> |
|
251 <dl> |
194 <dt>Returns:</dt> |
252 <dt>Returns:</dt> |
195 <dd> |
253 <dd> |
196 reference to the created action (QAction) |
254 reference to the created action (QAction) |
197 </dd> |
255 </dd> |
198 </dl><a NAME="E5ModelMenu.createBaseMenu" ID="E5ModelMenu.createBaseMenu"></a> |
256 </dl> |
|
257 <a NAME="E5ModelMenu.createBaseMenu" ID="E5ModelMenu.createBaseMenu"></a> |
199 <h4>E5ModelMenu.createBaseMenu</h4> |
258 <h4>E5ModelMenu.createBaseMenu</h4> |
200 <b>createBaseMenu</b>(<i></i>) |
259 <b>createBaseMenu</b>(<i></i>) |
|
260 |
201 <p> |
261 <p> |
202 Public method to get the menu that is used to populate sub menu's. |
262 Public method to get the menu that is used to populate sub menu's. |
203 </p><dl> |
263 </p> |
|
264 <dl> |
204 <dt>Returns:</dt> |
265 <dt>Returns:</dt> |
205 <dd> |
266 <dd> |
206 reference to the menu (E5ModelMenu) |
267 reference to the menu (E5ModelMenu) |
207 </dd> |
268 </dd> |
208 </dl><a NAME="E5ModelMenu.createMenu" ID="E5ModelMenu.createMenu"></a> |
269 </dl> |
|
270 <a NAME="E5ModelMenu.createMenu" ID="E5ModelMenu.createMenu"></a> |
209 <h4>E5ModelMenu.createMenu</h4> |
271 <h4>E5ModelMenu.createMenu</h4> |
210 <b>createMenu</b>(<i>parent, max_, parentMenu=None, menu=None</i>) |
272 <b>createMenu</b>(<i>parent, max_, parentMenu=None, menu=None</i>) |
|
273 |
211 <p> |
274 <p> |
212 Public method to put all the children of a parent into a menu of a |
275 Public method to put all the children of a parent into a menu of a |
213 given length. |
276 given length. |
214 </p><dl> |
277 </p> |
|
278 <dl> |
|
279 |
215 <dt><i>parent</i></dt> |
280 <dt><i>parent</i></dt> |
216 <dd> |
281 <dd> |
217 index of the parent item (QModelIndex) |
282 index of the parent item (QModelIndex) |
218 </dd><dt><i>max_</i></dt> |
283 </dd> |
|
284 <dt><i>max_</i></dt> |
219 <dd> |
285 <dd> |
220 maximum number of entries (integer) |
286 maximum number of entries (integer) |
221 </dd><dt><i>parentMenu</i></dt> |
287 </dd> |
|
288 <dt><i>parentMenu</i></dt> |
222 <dd> |
289 <dd> |
223 reference to the parent menu (QMenu) |
290 reference to the parent menu (QMenu) |
224 </dd><dt><i>menu</i></dt> |
291 </dd> |
|
292 <dt><i>menu</i></dt> |
225 <dd> |
293 <dd> |
226 reference to the menu to be populated (QMenu) |
294 reference to the menu to be populated (QMenu) |
227 </dd> |
295 </dd> |
228 </dl><a NAME="E5ModelMenu.dragEnterEvent" ID="E5ModelMenu.dragEnterEvent"></a> |
296 </dl> |
|
297 <a NAME="E5ModelMenu.dragEnterEvent" ID="E5ModelMenu.dragEnterEvent"></a> |
229 <h4>E5ModelMenu.dragEnterEvent</h4> |
298 <h4>E5ModelMenu.dragEnterEvent</h4> |
230 <b>dragEnterEvent</b>(<i>evt</i>) |
299 <b>dragEnterEvent</b>(<i>evt</i>) |
|
300 |
231 <p> |
301 <p> |
232 Protected method to handle drag enter events. |
302 Protected method to handle drag enter events. |
233 </p><dl> |
303 </p> |
|
304 <dl> |
|
305 |
234 <dt><i>evt</i></dt> |
306 <dt><i>evt</i></dt> |
235 <dd> |
307 <dd> |
236 reference to the event (QDragEnterEvent) |
308 reference to the event (QDragEnterEvent) |
237 </dd> |
309 </dd> |
238 </dl><a NAME="E5ModelMenu.dropEvent" ID="E5ModelMenu.dropEvent"></a> |
310 </dl> |
|
311 <a NAME="E5ModelMenu.dropEvent" ID="E5ModelMenu.dropEvent"></a> |
239 <h4>E5ModelMenu.dropEvent</h4> |
312 <h4>E5ModelMenu.dropEvent</h4> |
240 <b>dropEvent</b>(<i>evt</i>) |
313 <b>dropEvent</b>(<i>evt</i>) |
|
314 |
241 <p> |
315 <p> |
242 Protected method to handle drop events. |
316 Protected method to handle drop events. |
243 </p><dl> |
317 </p> |
|
318 <dl> |
|
319 |
244 <dt><i>evt</i></dt> |
320 <dt><i>evt</i></dt> |
245 <dd> |
321 <dd> |
246 reference to the event (QDropEvent) |
322 reference to the event (QDropEvent) |
247 </dd> |
323 </dd> |
248 </dl><a NAME="E5ModelMenu.firstSeparator" ID="E5ModelMenu.firstSeparator"></a> |
324 </dl> |
|
325 <a NAME="E5ModelMenu.firstSeparator" ID="E5ModelMenu.firstSeparator"></a> |
249 <h4>E5ModelMenu.firstSeparator</h4> |
326 <h4>E5ModelMenu.firstSeparator</h4> |
250 <b>firstSeparator</b>(<i></i>) |
327 <b>firstSeparator</b>(<i></i>) |
|
328 |
251 <p> |
329 <p> |
252 Public method to get the first separator. |
330 Public method to get the first separator. |
253 </p><dl> |
331 </p> |
|
332 <dl> |
254 <dt>Returns:</dt> |
333 <dt>Returns:</dt> |
255 <dd> |
334 <dd> |
256 row number of the first separator (integer) |
335 row number of the first separator (integer) |
257 </dd> |
336 </dd> |
258 </dl><a NAME="E5ModelMenu.index" ID="E5ModelMenu.index"></a> |
337 </dl> |
|
338 <a NAME="E5ModelMenu.index" ID="E5ModelMenu.index"></a> |
259 <h4>E5ModelMenu.index</h4> |
339 <h4>E5ModelMenu.index</h4> |
260 <b>index</b>(<i>action</i>) |
340 <b>index</b>(<i>action</i>) |
|
341 |
261 <p> |
342 <p> |
262 Public method to get the index of an action. |
343 Public method to get the index of an action. |
263 </p><dl> |
344 </p> |
|
345 <dl> |
|
346 |
264 <dt><i>action</i></dt> |
347 <dt><i>action</i></dt> |
265 <dd> |
348 <dd> |
266 reference to the action to get the index for (QAction) |
349 reference to the action to get the index for (QAction) |
267 </dd> |
350 </dd> |
268 </dl><dl> |
351 </dl> |
|
352 <dl> |
269 <dt>Returns:</dt> |
353 <dt>Returns:</dt> |
270 <dd> |
354 <dd> |
271 index of the action (QModelIndex) |
355 index of the action (QModelIndex) |
272 </dd> |
356 </dd> |
273 </dl><a NAME="E5ModelMenu.makeAction" ID="E5ModelMenu.makeAction"></a> |
357 </dl> |
|
358 <a NAME="E5ModelMenu.makeAction" ID="E5ModelMenu.makeAction"></a> |
274 <h4>E5ModelMenu.makeAction</h4> |
359 <h4>E5ModelMenu.makeAction</h4> |
275 <b>makeAction</b>(<i>icon, text, parent</i>) |
360 <b>makeAction</b>(<i>icon, text, parent</i>) |
|
361 |
276 <p> |
362 <p> |
277 Public method to create an action. |
363 Public method to create an action. |
278 </p><dl> |
364 </p> |
|
365 <dl> |
|
366 |
279 <dt><i>icon</i></dt> |
367 <dt><i>icon</i></dt> |
280 <dd> |
368 <dd> |
281 icon of the action (QIcon) |
369 icon of the action (QIcon) |
282 </dd><dt><i>text</i></dt> |
370 </dd> |
|
371 <dt><i>text</i></dt> |
283 <dd> |
372 <dd> |
284 text of the action (string) |
373 text of the action (string) |
285 </dd><dt><i>parent</i></dt> |
374 </dd> |
|
375 <dt><i>parent</i></dt> |
286 <dd> |
376 <dd> |
287 reference to the parent object (QObject) |
377 reference to the parent object (QObject) |
288 </dd> |
378 </dd> |
289 </dl><dl> |
379 </dl> |
|
380 <dl> |
290 <dt>Returns:</dt> |
381 <dt>Returns:</dt> |
291 <dd> |
382 <dd> |
292 reference to the created action (QAction) |
383 reference to the created action (QAction) |
293 </dd> |
384 </dd> |
294 </dl><a NAME="E5ModelMenu.maxRows" ID="E5ModelMenu.maxRows"></a> |
385 </dl> |
|
386 <a NAME="E5ModelMenu.maxRows" ID="E5ModelMenu.maxRows"></a> |
295 <h4>E5ModelMenu.maxRows</h4> |
387 <h4>E5ModelMenu.maxRows</h4> |
296 <b>maxRows</b>(<i></i>) |
388 <b>maxRows</b>(<i></i>) |
|
389 |
297 <p> |
390 <p> |
298 Public method to get the maximum number of entries to show. |
391 Public method to get the maximum number of entries to show. |
299 </p><dl> |
392 </p> |
|
393 <dl> |
300 <dt>Returns:</dt> |
394 <dt>Returns:</dt> |
301 <dd> |
395 <dd> |
302 maximum number of entries to show (integer) |
396 maximum number of entries to show (integer) |
303 </dd> |
397 </dd> |
304 </dl><a NAME="E5ModelMenu.model" ID="E5ModelMenu.model"></a> |
398 </dl> |
|
399 <a NAME="E5ModelMenu.model" ID="E5ModelMenu.model"></a> |
305 <h4>E5ModelMenu.model</h4> |
400 <h4>E5ModelMenu.model</h4> |
306 <b>model</b>(<i></i>) |
401 <b>model</b>(<i></i>) |
|
402 |
307 <p> |
403 <p> |
308 Public method to get a reference to the model. |
404 Public method to get a reference to the model. |
309 </p><dl> |
405 </p> |
|
406 <dl> |
310 <dt>Returns:</dt> |
407 <dt>Returns:</dt> |
311 <dd> |
408 <dd> |
312 reference to the model (QAbstractItemModel) |
409 reference to the model (QAbstractItemModel) |
313 </dd> |
410 </dd> |
314 </dl><a NAME="E5ModelMenu.mouseMoveEvent" ID="E5ModelMenu.mouseMoveEvent"></a> |
411 </dl> |
|
412 <a NAME="E5ModelMenu.mouseMoveEvent" ID="E5ModelMenu.mouseMoveEvent"></a> |
315 <h4>E5ModelMenu.mouseMoveEvent</h4> |
413 <h4>E5ModelMenu.mouseMoveEvent</h4> |
316 <b>mouseMoveEvent</b>(<i>evt</i>) |
414 <b>mouseMoveEvent</b>(<i>evt</i>) |
|
415 |
317 <p> |
416 <p> |
318 Protected method to handle mouse move events. |
417 Protected method to handle mouse move events. |
319 </p><dl> |
418 </p> |
|
419 <dl> |
|
420 |
320 <dt><i>evt</i></dt> |
421 <dt><i>evt</i></dt> |
321 <dd> |
422 <dd> |
322 reference to the event (QMouseEvent) |
423 reference to the event (QMouseEvent) |
323 </dd> |
424 </dd> |
324 </dl><a NAME="E5ModelMenu.mousePressEvent" ID="E5ModelMenu.mousePressEvent"></a> |
425 </dl> |
|
426 <a NAME="E5ModelMenu.mousePressEvent" ID="E5ModelMenu.mousePressEvent"></a> |
325 <h4>E5ModelMenu.mousePressEvent</h4> |
427 <h4>E5ModelMenu.mousePressEvent</h4> |
326 <b>mousePressEvent</b>(<i>evt</i>) |
428 <b>mousePressEvent</b>(<i>evt</i>) |
|
429 |
327 <p> |
430 <p> |
328 Protected method handling mouse press events. |
431 Protected method handling mouse press events. |
329 </p><dl> |
432 </p> |
|
433 <dl> |
|
434 |
330 <dt><i>evt</i></dt> |
435 <dt><i>evt</i></dt> |
331 <dd> |
436 <dd> |
332 reference to the event object (QMouseEvent) |
437 reference to the event object (QMouseEvent) |
333 </dd> |
438 </dd> |
334 </dl><a NAME="E5ModelMenu.mouseReleaseEvent" ID="E5ModelMenu.mouseReleaseEvent"></a> |
439 </dl> |
|
440 <a NAME="E5ModelMenu.mouseReleaseEvent" ID="E5ModelMenu.mouseReleaseEvent"></a> |
335 <h4>E5ModelMenu.mouseReleaseEvent</h4> |
441 <h4>E5ModelMenu.mouseReleaseEvent</h4> |
336 <b>mouseReleaseEvent</b>(<i>evt</i>) |
442 <b>mouseReleaseEvent</b>(<i>evt</i>) |
|
443 |
337 <p> |
444 <p> |
338 Protected method handling mouse release events. |
445 Protected method handling mouse release events. |
339 </p><dl> |
446 </p> |
|
447 <dl> |
|
448 |
340 <dt><i>evt</i></dt> |
449 <dt><i>evt</i></dt> |
341 <dd> |
450 <dd> |
342 reference to the event object (QMouseEvent) |
451 reference to the event object (QMouseEvent) |
343 </dd> |
452 </dd> |
344 </dl><a NAME="E5ModelMenu.postPopulated" ID="E5ModelMenu.postPopulated"></a> |
453 </dl> |
|
454 <a NAME="E5ModelMenu.postPopulated" ID="E5ModelMenu.postPopulated"></a> |
345 <h4>E5ModelMenu.postPopulated</h4> |
455 <h4>E5ModelMenu.postPopulated</h4> |
346 <b>postPopulated</b>(<i></i>) |
456 <b>postPopulated</b>(<i></i>) |
|
457 |
347 <p> |
458 <p> |
348 Public method to add any actions after the tree. |
459 Public method to add any actions after the tree. |
349 </p><a NAME="E5ModelMenu.prePopulated" ID="E5ModelMenu.prePopulated"></a> |
460 </p> |
|
461 <a NAME="E5ModelMenu.prePopulated" ID="E5ModelMenu.prePopulated"></a> |
350 <h4>E5ModelMenu.prePopulated</h4> |
462 <h4>E5ModelMenu.prePopulated</h4> |
351 <b>prePopulated</b>(<i></i>) |
463 <b>prePopulated</b>(<i></i>) |
|
464 |
352 <p> |
465 <p> |
353 Public method to add any actions before the tree. |
466 Public method to add any actions before the tree. |
354 </p><dl> |
467 </p> |
|
468 <dl> |
355 <dt>Returns:</dt> |
469 <dt>Returns:</dt> |
356 <dd> |
470 <dd> |
357 flag indicating if any actions were added |
471 flag indicating if any actions were added |
358 </dd> |
472 </dd> |
359 </dl><a NAME="E5ModelMenu.removeEntry" ID="E5ModelMenu.removeEntry"></a> |
473 </dl> |
|
474 <a NAME="E5ModelMenu.removeEntry" ID="E5ModelMenu.removeEntry"></a> |
360 <h4>E5ModelMenu.removeEntry</h4> |
475 <h4>E5ModelMenu.removeEntry</h4> |
361 <b>removeEntry</b>(<i>idx</i>) |
476 <b>removeEntry</b>(<i>idx</i>) |
|
477 |
362 <p> |
478 <p> |
363 Public method to remove a menu entry. |
479 Public method to remove a menu entry. |
364 </p><dl> |
480 </p> |
|
481 <dl> |
|
482 |
365 <dt><i>idx</i></dt> |
483 <dt><i>idx</i></dt> |
366 <dd> |
484 <dd> |
367 index of the entry to be removed (QModelIndex) |
485 index of the entry to be removed (QModelIndex) |
368 </dd> |
486 </dd> |
369 </dl><a NAME="E5ModelMenu.resetFlags" ID="E5ModelMenu.resetFlags"></a> |
487 </dl> |
|
488 <a NAME="E5ModelMenu.resetFlags" ID="E5ModelMenu.resetFlags"></a> |
370 <h4>E5ModelMenu.resetFlags</h4> |
489 <h4>E5ModelMenu.resetFlags</h4> |
371 <b>resetFlags</b>(<i></i>) |
490 <b>resetFlags</b>(<i></i>) |
|
491 |
372 <p> |
492 <p> |
373 Public method to reset the saved internal state. |
493 Public method to reset the saved internal state. |
374 </p><a NAME="E5ModelMenu.rootIndex" ID="E5ModelMenu.rootIndex"></a> |
494 </p> |
|
495 <a NAME="E5ModelMenu.rootIndex" ID="E5ModelMenu.rootIndex"></a> |
375 <h4>E5ModelMenu.rootIndex</h4> |
496 <h4>E5ModelMenu.rootIndex</h4> |
376 <b>rootIndex</b>(<i></i>) |
497 <b>rootIndex</b>(<i></i>) |
|
498 |
377 <p> |
499 <p> |
378 Public method to get the index of the root item. |
500 Public method to get the index of the root item. |
379 </p><dl> |
501 </p> |
|
502 <dl> |
380 <dt>Returns:</dt> |
503 <dt>Returns:</dt> |
381 <dd> |
504 <dd> |
382 index of the root item (QModelIndex) |
505 index of the root item (QModelIndex) |
383 </dd> |
506 </dd> |
384 </dl><a NAME="E5ModelMenu.separatorRole" ID="E5ModelMenu.separatorRole"></a> |
507 </dl> |
|
508 <a NAME="E5ModelMenu.separatorRole" ID="E5ModelMenu.separatorRole"></a> |
385 <h4>E5ModelMenu.separatorRole</h4> |
509 <h4>E5ModelMenu.separatorRole</h4> |
386 <b>separatorRole</b>(<i></i>) |
510 <b>separatorRole</b>(<i></i>) |
|
511 |
387 <p> |
512 <p> |
388 Public method to get the role of the separator. |
513 Public method to get the role of the separator. |
389 </p><dl> |
514 </p> |
|
515 <dl> |
390 <dt>Returns:</dt> |
516 <dt>Returns:</dt> |
391 <dd> |
517 <dd> |
392 role of the separator (integer) |
518 role of the separator (integer) |
393 </dd> |
519 </dd> |
394 </dl><a NAME="E5ModelMenu.setFirstSeparator" ID="E5ModelMenu.setFirstSeparator"></a> |
520 </dl> |
|
521 <a NAME="E5ModelMenu.setFirstSeparator" ID="E5ModelMenu.setFirstSeparator"></a> |
395 <h4>E5ModelMenu.setFirstSeparator</h4> |
522 <h4>E5ModelMenu.setFirstSeparator</h4> |
396 <b>setFirstSeparator</b>(<i>offset</i>) |
523 <b>setFirstSeparator</b>(<i>offset</i>) |
|
524 |
397 <p> |
525 <p> |
398 Public method to set the first separator. |
526 Public method to set the first separator. |
399 </p><dl> |
527 </p> |
|
528 <dl> |
|
529 |
400 <dt><i>offset</i></dt> |
530 <dt><i>offset</i></dt> |
401 <dd> |
531 <dd> |
402 row number of the first separator (integer) |
532 row number of the first separator (integer) |
403 </dd> |
533 </dd> |
404 </dl><a NAME="E5ModelMenu.setMaxRows" ID="E5ModelMenu.setMaxRows"></a> |
534 </dl> |
|
535 <a NAME="E5ModelMenu.setMaxRows" ID="E5ModelMenu.setMaxRows"></a> |
405 <h4>E5ModelMenu.setMaxRows</h4> |
536 <h4>E5ModelMenu.setMaxRows</h4> |
406 <b>setMaxRows</b>(<i>rows</i>) |
537 <b>setMaxRows</b>(<i>rows</i>) |
|
538 |
407 <p> |
539 <p> |
408 Public method to set the maximum number of entries to show. |
540 Public method to set the maximum number of entries to show. |
409 </p><dl> |
541 </p> |
|
542 <dl> |
|
543 |
410 <dt><i>rows</i></dt> |
544 <dt><i>rows</i></dt> |
411 <dd> |
545 <dd> |
412 maximum number of entries to show (integer) |
546 maximum number of entries to show (integer) |
413 </dd> |
547 </dd> |
414 </dl><a NAME="E5ModelMenu.setModel" ID="E5ModelMenu.setModel"></a> |
548 </dl> |
|
549 <a NAME="E5ModelMenu.setModel" ID="E5ModelMenu.setModel"></a> |
415 <h4>E5ModelMenu.setModel</h4> |
550 <h4>E5ModelMenu.setModel</h4> |
416 <b>setModel</b>(<i>model</i>) |
551 <b>setModel</b>(<i>model</i>) |
|
552 |
417 <p> |
553 <p> |
418 Public method to set the model for the menu. |
554 Public method to set the model for the menu. |
419 </p><dl> |
555 </p> |
|
556 <dl> |
|
557 |
420 <dt><i>model</i></dt> |
558 <dt><i>model</i></dt> |
421 <dd> |
559 <dd> |
422 reference to the model (QAbstractItemModel) |
560 reference to the model (QAbstractItemModel) |
423 </dd> |
561 </dd> |
424 </dl><a NAME="E5ModelMenu.setRootIndex" ID="E5ModelMenu.setRootIndex"></a> |
562 </dl> |
|
563 <a NAME="E5ModelMenu.setRootIndex" ID="E5ModelMenu.setRootIndex"></a> |
425 <h4>E5ModelMenu.setRootIndex</h4> |
564 <h4>E5ModelMenu.setRootIndex</h4> |
426 <b>setRootIndex</b>(<i>index</i>) |
565 <b>setRootIndex</b>(<i>index</i>) |
|
566 |
427 <p> |
567 <p> |
428 Public method to set the index of the root item. |
568 Public method to set the index of the root item. |
429 </p><dl> |
569 </p> |
|
570 <dl> |
|
571 |
430 <dt><i>index</i></dt> |
572 <dt><i>index</i></dt> |
431 <dd> |
573 <dd> |
432 index of the root item (QModelIndex) |
574 index of the root item (QModelIndex) |
433 </dd> |
575 </dd> |
434 </dl><a NAME="E5ModelMenu.setSeparatorRole" ID="E5ModelMenu.setSeparatorRole"></a> |
576 </dl> |
|
577 <a NAME="E5ModelMenu.setSeparatorRole" ID="E5ModelMenu.setSeparatorRole"></a> |
435 <h4>E5ModelMenu.setSeparatorRole</h4> |
578 <h4>E5ModelMenu.setSeparatorRole</h4> |
436 <b>setSeparatorRole</b>(<i>role</i>) |
579 <b>setSeparatorRole</b>(<i>role</i>) |
|
580 |
437 <p> |
581 <p> |
438 Public method to set the role of the separator. |
582 Public method to set the role of the separator. |
439 </p><dl> |
583 </p> |
|
584 <dl> |
|
585 |
440 <dt><i>role</i></dt> |
586 <dt><i>role</i></dt> |
441 <dd> |
587 <dd> |
442 role of the separator (integer) |
588 role of the separator (integer) |
443 </dd> |
589 </dd> |
444 </dl><a NAME="E5ModelMenu.setStatusBarTextRole" ID="E5ModelMenu.setStatusBarTextRole"></a> |
590 </dl> |
|
591 <a NAME="E5ModelMenu.setStatusBarTextRole" ID="E5ModelMenu.setStatusBarTextRole"></a> |
445 <h4>E5ModelMenu.setStatusBarTextRole</h4> |
592 <h4>E5ModelMenu.setStatusBarTextRole</h4> |
446 <b>setStatusBarTextRole</b>(<i>role</i>) |
593 <b>setStatusBarTextRole</b>(<i>role</i>) |
|
594 |
447 <p> |
595 <p> |
448 Public method to set the role of the status bar text. |
596 Public method to set the role of the status bar text. |
449 </p><dl> |
597 </p> |
|
598 <dl> |
|
599 |
450 <dt><i>role</i></dt> |
600 <dt><i>role</i></dt> |
451 <dd> |
601 <dd> |
452 role of the status bar text (integer) |
602 role of the status bar text (integer) |
453 </dd> |
603 </dd> |
454 </dl><a NAME="E5ModelMenu.statusBarTextRole" ID="E5ModelMenu.statusBarTextRole"></a> |
604 </dl> |
|
605 <a NAME="E5ModelMenu.statusBarTextRole" ID="E5ModelMenu.statusBarTextRole"></a> |
455 <h4>E5ModelMenu.statusBarTextRole</h4> |
606 <h4>E5ModelMenu.statusBarTextRole</h4> |
456 <b>statusBarTextRole</b>(<i></i>) |
607 <b>statusBarTextRole</b>(<i></i>) |
|
608 |
457 <p> |
609 <p> |
458 Public method to get the role of the status bar text. |
610 Public method to get the role of the status bar text. |
459 </p><dl> |
611 </p> |
|
612 <dl> |
460 <dt>Returns:</dt> |
613 <dt>Returns:</dt> |
461 <dd> |
614 <dd> |
462 role of the status bar text (integer) |
615 role of the status bar text (integer) |
463 </dd> |
616 </dd> |
464 </dl> |
617 </dl> |