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