|
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.Helpviewer.History.HistoryMenu</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.Helpviewer.History.HistoryMenu</h1> |
|
24 <p> |
|
25 Module implementing the history menu. |
|
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="#HistoryMenu">HistoryMenu</a></td> |
|
35 <td>Class implementing the history menu.</td> |
|
36 </tr><tr> |
|
37 <td><a href="#HistoryMenuModel">HistoryMenuModel</a></td> |
|
38 <td>Class implementing a model for the history menu.</td> |
|
39 </tr> |
|
40 </table> |
|
41 <h3>Functions</h3> |
|
42 <table> |
|
43 <tr><td>None</td></tr> |
|
44 </table> |
|
45 <hr /><hr /> |
|
46 <a NAME="HistoryMenu" ID="HistoryMenu"></a> |
|
47 <h2>HistoryMenu</h2> |
|
48 <p> |
|
49 Class implementing the history menu. |
|
50 </p><h4>Signals</h4> |
|
51 <dl> |
|
52 <dt>newUrl(const QUrl&, const QString&)</dt> |
|
53 <dd> |
|
54 emitted to open a URL in a new tab |
|
55 </dd><dt>openUrl(const QUrl&, const QString&)</dt> |
|
56 <dd> |
|
57 emitted to open a URL in the current |
|
58 tab |
|
59 </dd> |
|
60 </dl> |
|
61 <h3>Derived from</h3> |
|
62 E4ModelMenu |
|
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="#HistoryMenu.__init__">HistoryMenu</a></td> |
|
71 <td>Constructor</td> |
|
72 </tr><tr> |
|
73 <td><a href="#HistoryMenu.__activated">__activated</a></td> |
|
74 <td>Private slot handling the activated signal.</td> |
|
75 </tr><tr> |
|
76 <td><a href="#HistoryMenu.__clearHistoryDialog">__clearHistoryDialog</a></td> |
|
77 <td>Private slot to clear the history.</td> |
|
78 </tr><tr> |
|
79 <td><a href="#HistoryMenu.__showHistoryDialog">__showHistoryDialog</a></td> |
|
80 <td>Private slot to show the history dialog.</td> |
|
81 </tr><tr> |
|
82 <td><a href="#HistoryMenu.postPopulated">postPopulated</a></td> |
|
83 <td>Public method to add any actions after the tree.</td> |
|
84 </tr><tr> |
|
85 <td><a href="#HistoryMenu.prePopulated">prePopulated</a></td> |
|
86 <td>Public method to add any actions before the tree.</td> |
|
87 </tr><tr> |
|
88 <td><a href="#HistoryMenu.setInitialActions">setInitialActions</a></td> |
|
89 <td>Public method to set the list of actions that should appear first in the menu.</td> |
|
90 </tr> |
|
91 </table> |
|
92 <a NAME="HistoryMenu.__init__" ID="HistoryMenu.__init__"></a> |
|
93 <h4>HistoryMenu (Constructor)</h4> |
|
94 <b>HistoryMenu</b>(<i>parent = None</i>) |
|
95 <p> |
|
96 Constructor |
|
97 </p><dl> |
|
98 <dt><i>parent</i></dt> |
|
99 <dd> |
|
100 reference to the parent widget (QWidget) |
|
101 </dd> |
|
102 </dl><a NAME="HistoryMenu.__activated" ID="HistoryMenu.__activated"></a> |
|
103 <h4>HistoryMenu.__activated</h4> |
|
104 <b>__activated</b>(<i>idx</i>) |
|
105 <p> |
|
106 Private slot handling the activated signal. |
|
107 </p><dl> |
|
108 <dt><i>idx</i></dt> |
|
109 <dd> |
|
110 index of the activated item (QModelIndex) |
|
111 </dd> |
|
112 </dl><a NAME="HistoryMenu.__clearHistoryDialog" ID="HistoryMenu.__clearHistoryDialog"></a> |
|
113 <h4>HistoryMenu.__clearHistoryDialog</h4> |
|
114 <b>__clearHistoryDialog</b>(<i></i>) |
|
115 <p> |
|
116 Private slot to clear the history. |
|
117 </p><a NAME="HistoryMenu.__showHistoryDialog" ID="HistoryMenu.__showHistoryDialog"></a> |
|
118 <h4>HistoryMenu.__showHistoryDialog</h4> |
|
119 <b>__showHistoryDialog</b>(<i></i>) |
|
120 <p> |
|
121 Private slot to show the history dialog. |
|
122 </p><a NAME="HistoryMenu.postPopulated" ID="HistoryMenu.postPopulated"></a> |
|
123 <h4>HistoryMenu.postPopulated</h4> |
|
124 <b>postPopulated</b>(<i></i>) |
|
125 <p> |
|
126 Public method to add any actions after the tree. |
|
127 </p><a NAME="HistoryMenu.prePopulated" ID="HistoryMenu.prePopulated"></a> |
|
128 <h4>HistoryMenu.prePopulated</h4> |
|
129 <b>prePopulated</b>(<i></i>) |
|
130 <p> |
|
131 Public method to add any actions before the tree. |
|
132 </p><dl> |
|
133 <dt>Returns:</dt> |
|
134 <dd> |
|
135 flag indicating if any actions were added (boolean) |
|
136 </dd> |
|
137 </dl><a NAME="HistoryMenu.setInitialActions" ID="HistoryMenu.setInitialActions"></a> |
|
138 <h4>HistoryMenu.setInitialActions</h4> |
|
139 <b>setInitialActions</b>(<i>actions</i>) |
|
140 <p> |
|
141 Public method to set the list of actions that should appear first in the menu. |
|
142 </p><dl> |
|
143 <dt><i>actions</i></dt> |
|
144 <dd> |
|
145 list of initial actions (list of QAction) |
|
146 </dd> |
|
147 </dl> |
|
148 <div align="right"><a href="#top">Up</a></div> |
|
149 <hr /><hr /> |
|
150 <a NAME="HistoryMenuModel" ID="HistoryMenuModel"></a> |
|
151 <h2>HistoryMenuModel</h2> |
|
152 <p> |
|
153 Class implementing a model for the history menu. |
|
154 </p><p> |
|
155 It maps the first bunch of items of the source model to the root. |
|
156 </p> |
|
157 <h3>Derived from</h3> |
|
158 QAbstractProxyModel |
|
159 <h3>Class Attributes</h3> |
|
160 <table> |
|
161 <tr><td>MOVEDROWS</td></tr> |
|
162 </table> |
|
163 <h3>Methods</h3> |
|
164 <table> |
|
165 <tr> |
|
166 <td><a href="#HistoryMenuModel.__init__">HistoryMenuModel</a></td> |
|
167 <td>Constructor</td> |
|
168 </tr><tr> |
|
169 <td><a href="#HistoryMenuModel.bumpedRows">bumpedRows</a></td> |
|
170 <td>Public method to determine the number of rows moved to the root.</td> |
|
171 </tr><tr> |
|
172 <td><a href="#HistoryMenuModel.columnCount">columnCount</a></td> |
|
173 <td>Public method to get the number of columns.</td> |
|
174 </tr><tr> |
|
175 <td><a href="#HistoryMenuModel.index">index</a></td> |
|
176 <td>Public method to create an index.</td> |
|
177 </tr><tr> |
|
178 <td><a href="#HistoryMenuModel.mapFromSource">mapFromSource</a></td> |
|
179 <td>Public method to map an index to the proxy model index.</td> |
|
180 </tr><tr> |
|
181 <td><a href="#HistoryMenuModel.mapToSource">mapToSource</a></td> |
|
182 <td>Public method to map an index to the source model index.</td> |
|
183 </tr><tr> |
|
184 <td><a href="#HistoryMenuModel.mimeData">mimeData</a></td> |
|
185 <td>Public method to return the mime data.</td> |
|
186 </tr><tr> |
|
187 <td><a href="#HistoryMenuModel.parent">parent</a></td> |
|
188 <td>Public method to get the parent index.</td> |
|
189 </tr><tr> |
|
190 <td><a href="#HistoryMenuModel.rowCount">rowCount</a></td> |
|
191 <td>Public method to determine the number of rows.</td> |
|
192 </tr> |
|
193 </table> |
|
194 <a NAME="HistoryMenuModel.__init__" ID="HistoryMenuModel.__init__"></a> |
|
195 <h4>HistoryMenuModel (Constructor)</h4> |
|
196 <b>HistoryMenuModel</b>(<i>sourceModel, parent = None</i>) |
|
197 <p> |
|
198 Constructor |
|
199 </p><dl> |
|
200 <dt><i>sourceModel</i></dt> |
|
201 <dd> |
|
202 reference to the source model (QAbstractItemModel) |
|
203 </dd><dt><i>parent</i></dt> |
|
204 <dd> |
|
205 reference to the parent object (QObject) |
|
206 </dd> |
|
207 </dl><a NAME="HistoryMenuModel.bumpedRows" ID="HistoryMenuModel.bumpedRows"></a> |
|
208 <h4>HistoryMenuModel.bumpedRows</h4> |
|
209 <b>bumpedRows</b>(<i></i>) |
|
210 <p> |
|
211 Public method to determine the number of rows moved to the root. |
|
212 </p><dl> |
|
213 <dt>Returns:</dt> |
|
214 <dd> |
|
215 number of rows moved to the root (integer) |
|
216 </dd> |
|
217 </dl><a NAME="HistoryMenuModel.columnCount" ID="HistoryMenuModel.columnCount"></a> |
|
218 <h4>HistoryMenuModel.columnCount</h4> |
|
219 <b>columnCount</b>(<i>parent = QModelIndex()</i>) |
|
220 <p> |
|
221 Public method to get the number of columns. |
|
222 </p><dl> |
|
223 <dt><i>parent</i></dt> |
|
224 <dd> |
|
225 index of parent (QModelIndex) |
|
226 </dd> |
|
227 </dl><dl> |
|
228 <dt>Returns:</dt> |
|
229 <dd> |
|
230 number of columns (integer) |
|
231 </dd> |
|
232 </dl><a NAME="HistoryMenuModel.index" ID="HistoryMenuModel.index"></a> |
|
233 <h4>HistoryMenuModel.index</h4> |
|
234 <b>index</b>(<i>row, column, parent = QModelIndex()</i>) |
|
235 <p> |
|
236 Public method to create an index. |
|
237 </p><dl> |
|
238 <dt><i>row</i></dt> |
|
239 <dd> |
|
240 row number for the index (integer) |
|
241 </dd><dt><i>column</i></dt> |
|
242 <dd> |
|
243 column number for the index (integer) |
|
244 </dd><dt><i>parent</i></dt> |
|
245 <dd> |
|
246 index of the parent item (QModelIndex) |
|
247 </dd> |
|
248 </dl><dl> |
|
249 <dt>Returns:</dt> |
|
250 <dd> |
|
251 requested index (QModelIndex) |
|
252 </dd> |
|
253 </dl><a NAME="HistoryMenuModel.mapFromSource" ID="HistoryMenuModel.mapFromSource"></a> |
|
254 <h4>HistoryMenuModel.mapFromSource</h4> |
|
255 <b>mapFromSource</b>(<i>sourceIndex</i>) |
|
256 <p> |
|
257 Public method to map an index to the proxy model index. |
|
258 </p><dl> |
|
259 <dt><i>sourceIndex</i></dt> |
|
260 <dd> |
|
261 reference to a source model index (QModelIndex) |
|
262 </dd> |
|
263 </dl><dl> |
|
264 <dt>Returns:</dt> |
|
265 <dd> |
|
266 proxy model index (QModelIndex) |
|
267 </dd> |
|
268 </dl><a NAME="HistoryMenuModel.mapToSource" ID="HistoryMenuModel.mapToSource"></a> |
|
269 <h4>HistoryMenuModel.mapToSource</h4> |
|
270 <b>mapToSource</b>(<i>proxyIndex</i>) |
|
271 <p> |
|
272 Public method to map an index to the source model index. |
|
273 </p><dl> |
|
274 <dt><i>proxyIndex</i></dt> |
|
275 <dd> |
|
276 reference to a proxy model index (QModelIndex) |
|
277 </dd> |
|
278 </dl><dl> |
|
279 <dt>Returns:</dt> |
|
280 <dd> |
|
281 source model index (QModelIndex) |
|
282 </dd> |
|
283 </dl><a NAME="HistoryMenuModel.mimeData" ID="HistoryMenuModel.mimeData"></a> |
|
284 <h4>HistoryMenuModel.mimeData</h4> |
|
285 <b>mimeData</b>(<i>indexes</i>) |
|
286 <p> |
|
287 Public method to return the mime data. |
|
288 </p><dl> |
|
289 <dt><i>indexes</i></dt> |
|
290 <dd> |
|
291 list of indexes (QModelIndexList) |
|
292 </dd> |
|
293 </dl><dl> |
|
294 <dt>Returns:</dt> |
|
295 <dd> |
|
296 mime data (QMimeData) |
|
297 </dd> |
|
298 </dl><a NAME="HistoryMenuModel.parent" ID="HistoryMenuModel.parent"></a> |
|
299 <h4>HistoryMenuModel.parent</h4> |
|
300 <b>parent</b>(<i>index</i>) |
|
301 <p> |
|
302 Public method to get the parent index. |
|
303 </p><dl> |
|
304 <dt><i>index</i></dt> |
|
305 <dd> |
|
306 index of item to get parent (QModelIndex) |
|
307 </dd> |
|
308 </dl><dl> |
|
309 <dt>Returns:</dt> |
|
310 <dd> |
|
311 index of parent (QModelIndex) |
|
312 </dd> |
|
313 </dl><a NAME="HistoryMenuModel.rowCount" ID="HistoryMenuModel.rowCount"></a> |
|
314 <h4>HistoryMenuModel.rowCount</h4> |
|
315 <b>rowCount</b>(<i>parent = QModelIndex()</i>) |
|
316 <p> |
|
317 Public method to determine the number of rows. |
|
318 </p><dl> |
|
319 <dt><i>parent</i></dt> |
|
320 <dd> |
|
321 index of parent (QModelIndex) |
|
322 </dd> |
|
323 </dl><dl> |
|
324 <dt>Returns:</dt> |
|
325 <dd> |
|
326 number of rows (integer) |
|
327 </dd> |
|
328 </dl> |
|
329 <div align="right"><a href="#top">Up</a></div> |
|
330 <hr /> |
|
331 </body></html> |