|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.E5Gui.E5ModelToolBar</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.E5Gui.E5ModelToolBar</h1> |
|
23 <p> |
|
24 Module implementing a tool bar populated from a QAbstractItemModel. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#E5ModelToolBar">E5ModelToolBar</a></td> |
|
34 <td>Class implementing a tool bar populated from a QAbstractItemModel.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr><td>None</td></tr> |
|
40 </table> |
|
41 <hr /><hr /> |
|
42 <a NAME="E5ModelToolBar" ID="E5ModelToolBar"></a> |
|
43 <h2>E5ModelToolBar</h2> |
|
44 <p> |
|
45 Class implementing a tool bar populated from a QAbstractItemModel. |
|
46 </p><h3>Signals</h3> |
|
47 <dl> |
|
48 <dt>activated(QModelIndex)</dt> |
|
49 <dd> |
|
50 emitted when an action has been triggered |
|
51 </dd> |
|
52 </dl> |
|
53 <h3>Derived from</h3> |
|
54 QToolBar |
|
55 <h3>Class Attributes</h3> |
|
56 <table> |
|
57 <tr><td>None</td></tr> |
|
58 </table> |
|
59 <h3>Class Methods</h3> |
|
60 <table> |
|
61 <tr><td>None</td></tr> |
|
62 </table> |
|
63 <h3>Methods</h3> |
|
64 <table> |
|
65 <tr> |
|
66 <td><a href="#E5ModelToolBar.__init__">E5ModelToolBar</a></td> |
|
67 <td>Constructor</td> |
|
68 </tr><tr> |
|
69 <td><a href="#E5ModelToolBar._build">_build</a></td> |
|
70 <td>Protected slot to build the tool bar.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#E5ModelToolBar._createMenu">_createMenu</a></td> |
|
73 <td>Protected method to create the menu for a tool bar action.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#E5ModelToolBar.dragEnterEvent">dragEnterEvent</a></td> |
|
76 <td>Protected method to handle drag enter events.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#E5ModelToolBar.dropEvent">dropEvent</a></td> |
|
79 <td>Protected method to handle drop events.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#E5ModelToolBar.eventFilter">eventFilter</a></td> |
|
82 <td>Public method to handle event for other objects.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#E5ModelToolBar.hideEvent">hideEvent</a></td> |
|
85 <td>Protected method to handle hide events.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#E5ModelToolBar.index">index</a></td> |
|
88 <td>Public method to get the index of an action.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#E5ModelToolBar.model">model</a></td> |
|
91 <td>Public method to get a reference to the model.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#E5ModelToolBar.mouseMoveEvent">mouseMoveEvent</a></td> |
|
94 <td>Protected method to handle mouse move events.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#E5ModelToolBar.resetFlags">resetFlags</a></td> |
|
97 <td>Public method to reset the saved internal state.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#E5ModelToolBar.rootIndex">rootIndex</a></td> |
|
100 <td>Public method to get the root index.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#E5ModelToolBar.setModel">setModel</a></td> |
|
103 <td>Public method to set the model for the tool bar.</td> |
|
104 </tr><tr> |
|
105 <td><a href="#E5ModelToolBar.setRootIndex">setRootIndex</a></td> |
|
106 <td>Public method to set the root index.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#E5ModelToolBar.showEvent">showEvent</a></td> |
|
109 <td>Protected method to handle show events.</td> |
|
110 </tr> |
|
111 </table> |
|
112 <h3>Static Methods</h3> |
|
113 <table> |
|
114 <tr><td>None</td></tr> |
|
115 </table> |
|
116 <a NAME="E5ModelToolBar.__init__" ID="E5ModelToolBar.__init__"></a> |
|
117 <h4>E5ModelToolBar (Constructor)</h4> |
|
118 <b>E5ModelToolBar</b>(<i>title=None, parent=None</i>) |
|
119 <p> |
|
120 Constructor |
|
121 </p><dl> |
|
122 <dt><i>title</i></dt> |
|
123 <dd> |
|
124 title for the tool bar (string) |
|
125 </dd><dt><i>parent</i></dt> |
|
126 <dd> |
|
127 reference to the parent widget (QWidget) |
|
128 </dd> |
|
129 </dl><a NAME="E5ModelToolBar._build" ID="E5ModelToolBar._build"></a> |
|
130 <h4>E5ModelToolBar._build</h4> |
|
131 <b>_build</b>(<i></i>) |
|
132 <p> |
|
133 Protected slot to build the tool bar. |
|
134 </p><a NAME="E5ModelToolBar._createMenu" ID="E5ModelToolBar._createMenu"></a> |
|
135 <h4>E5ModelToolBar._createMenu</h4> |
|
136 <b>_createMenu</b>(<i></i>) |
|
137 <p> |
|
138 Protected method to create the menu for a tool bar action. |
|
139 </p><dl> |
|
140 <dt>Returns:</dt> |
|
141 <dd> |
|
142 menu for a tool bar action (E5ModelMenu) |
|
143 </dd> |
|
144 </dl><a NAME="E5ModelToolBar.dragEnterEvent" ID="E5ModelToolBar.dragEnterEvent"></a> |
|
145 <h4>E5ModelToolBar.dragEnterEvent</h4> |
|
146 <b>dragEnterEvent</b>(<i>evt</i>) |
|
147 <p> |
|
148 Protected method to handle drag enter events. |
|
149 </p><dl> |
|
150 <dt><i>evt</i></dt> |
|
151 <dd> |
|
152 reference to the event (QDragEnterEvent) |
|
153 </dd> |
|
154 </dl><a NAME="E5ModelToolBar.dropEvent" ID="E5ModelToolBar.dropEvent"></a> |
|
155 <h4>E5ModelToolBar.dropEvent</h4> |
|
156 <b>dropEvent</b>(<i>evt</i>) |
|
157 <p> |
|
158 Protected method to handle drop events. |
|
159 </p><dl> |
|
160 <dt><i>evt</i></dt> |
|
161 <dd> |
|
162 reference to the event (QDropEvent) |
|
163 </dd> |
|
164 </dl><a NAME="E5ModelToolBar.eventFilter" ID="E5ModelToolBar.eventFilter"></a> |
|
165 <h4>E5ModelToolBar.eventFilter</h4> |
|
166 <b>eventFilter</b>(<i>obj, evt</i>) |
|
167 <p> |
|
168 Public method to handle event for other objects. |
|
169 </p><dl> |
|
170 <dt><i>obj</i></dt> |
|
171 <dd> |
|
172 reference to the object (QObject) |
|
173 </dd><dt><i>evt</i></dt> |
|
174 <dd> |
|
175 reference to the event (QEvent) |
|
176 </dd> |
|
177 </dl><dl> |
|
178 <dt>Returns:</dt> |
|
179 <dd> |
|
180 flag indicating that the event should be filtered out (boolean) |
|
181 </dd> |
|
182 </dl><a NAME="E5ModelToolBar.hideEvent" ID="E5ModelToolBar.hideEvent"></a> |
|
183 <h4>E5ModelToolBar.hideEvent</h4> |
|
184 <b>hideEvent</b>(<i>evt</i>) |
|
185 <p> |
|
186 Protected method to handle hide events. |
|
187 </p><dl> |
|
188 <dt><i>evt</i></dt> |
|
189 <dd> |
|
190 reference to the hide event (QHideEvent) |
|
191 </dd> |
|
192 </dl><a NAME="E5ModelToolBar.index" ID="E5ModelToolBar.index"></a> |
|
193 <h4>E5ModelToolBar.index</h4> |
|
194 <b>index</b>(<i>action</i>) |
|
195 <p> |
|
196 Public method to get the index of an action. |
|
197 </p><dl> |
|
198 <dt><i>action</i></dt> |
|
199 <dd> |
|
200 reference to the action to get the index for (QAction) |
|
201 </dd> |
|
202 </dl><dl> |
|
203 <dt>Returns:</dt> |
|
204 <dd> |
|
205 index of the action (QModelIndex) |
|
206 </dd> |
|
207 </dl><a NAME="E5ModelToolBar.model" ID="E5ModelToolBar.model"></a> |
|
208 <h4>E5ModelToolBar.model</h4> |
|
209 <b>model</b>(<i></i>) |
|
210 <p> |
|
211 Public method to get a reference to the model. |
|
212 </p><dl> |
|
213 <dt>Returns:</dt> |
|
214 <dd> |
|
215 reference to the model (QAbstractItemModel) |
|
216 </dd> |
|
217 </dl><a NAME="E5ModelToolBar.mouseMoveEvent" ID="E5ModelToolBar.mouseMoveEvent"></a> |
|
218 <h4>E5ModelToolBar.mouseMoveEvent</h4> |
|
219 <b>mouseMoveEvent</b>(<i>evt</i>) |
|
220 <p> |
|
221 Protected method to handle mouse move events. |
|
222 </p><dl> |
|
223 <dt><i>evt</i></dt> |
|
224 <dd> |
|
225 reference to the event (QMouseEvent) |
|
226 </dd> |
|
227 </dl><a NAME="E5ModelToolBar.resetFlags" ID="E5ModelToolBar.resetFlags"></a> |
|
228 <h4>E5ModelToolBar.resetFlags</h4> |
|
229 <b>resetFlags</b>(<i></i>) |
|
230 <p> |
|
231 Public method to reset the saved internal state. |
|
232 </p><a NAME="E5ModelToolBar.rootIndex" ID="E5ModelToolBar.rootIndex"></a> |
|
233 <h4>E5ModelToolBar.rootIndex</h4> |
|
234 <b>rootIndex</b>(<i></i>) |
|
235 <p> |
|
236 Public method to get the root index. |
|
237 </p><dl> |
|
238 <dt>Returns:</dt> |
|
239 <dd> |
|
240 root index (QModelIndex) |
|
241 </dd> |
|
242 </dl><a NAME="E5ModelToolBar.setModel" ID="E5ModelToolBar.setModel"></a> |
|
243 <h4>E5ModelToolBar.setModel</h4> |
|
244 <b>setModel</b>(<i>model</i>) |
|
245 <p> |
|
246 Public method to set the model for the tool bar. |
|
247 </p><dl> |
|
248 <dt><i>model</i></dt> |
|
249 <dd> |
|
250 reference to the model (QAbstractItemModel) |
|
251 </dd> |
|
252 </dl><a NAME="E5ModelToolBar.setRootIndex" ID="E5ModelToolBar.setRootIndex"></a> |
|
253 <h4>E5ModelToolBar.setRootIndex</h4> |
|
254 <b>setRootIndex</b>(<i>idx</i>) |
|
255 <p> |
|
256 Public method to set the root index. |
|
257 </p><dl> |
|
258 <dt><i>idx</i></dt> |
|
259 <dd> |
|
260 index to be set as the root index (QModelIndex) |
|
261 </dd> |
|
262 </dl><a NAME="E5ModelToolBar.showEvent" ID="E5ModelToolBar.showEvent"></a> |
|
263 <h4>E5ModelToolBar.showEvent</h4> |
|
264 <b>showEvent</b>(<i>evt</i>) |
|
265 <p> |
|
266 Protected method to handle show events. |
|
267 </p><dl> |
|
268 <dt><i>evt</i></dt> |
|
269 <dd> |
|
270 reference to the hide event (QHideEvent) |
|
271 </dd> |
|
272 </dl> |
|
273 <div align="right"><a href="#top">Up</a></div> |
|
274 <hr /> |
|
275 </body></html> |