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