Documentation/Source/eric4.Graphics.UMLGraphicsView.html

changeset 3
0d9daebf5b8c
equal deleted inserted replaced
2:bc6196164237 3:0d9daebf5b8c
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.Graphics.UMLGraphicsView</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.Graphics.UMLGraphicsView</h1>
24 <p>
25 Module implementing a subclass of E4GraphicsView for our diagrams.
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="#UMLGraphicsView">UMLGraphicsView</a></td>
35 <td>Class implementing a specialized E4GraphicsView for our diagrams.</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="UMLGraphicsView" ID="UMLGraphicsView"></a>
44 <h2>UMLGraphicsView</h2>
45 <p>
46 Class implementing a specialized E4GraphicsView for our diagrams.
47 </p><h4>Signals</h4>
48 <dl>
49 <dt>relayout()</dt>
50 <dd>
51 emitted to indicate a relayout of the diagram
52 is requested
53 </dd>
54 </dl>
55 <h3>Derived from</h3>
56 E4GraphicsView
57 <h3>Class Attributes</h3>
58 <table>
59 <tr><td>None</td></tr>
60 </table>
61 <h3>Methods</h3>
62 <table>
63 <tr>
64 <td><a href="#UMLGraphicsView.__init__">UMLGraphicsView</a></td>
65 <td>Constructor</td>
66 </tr><tr>
67 <td><a href="#UMLGraphicsView.__alignShapes">__alignShapes</a></td>
68 <td>Private slot to align the selected shapes.</td>
69 </tr><tr>
70 <td><a href="#UMLGraphicsView.__checkSizeActions">__checkSizeActions</a></td>
71 <td>Private slot to set the enabled state of the size actions.</td>
72 </tr><tr>
73 <td><a href="#UMLGraphicsView.__decHeight">__decHeight</a></td>
74 <td>Private method to handle the decrease height context menu entry.</td>
75 </tr><tr>
76 <td><a href="#UMLGraphicsView.__decWidth">__decWidth</a></td>
77 <td>Private method to handle the decrease width context menu entry.</td>
78 </tr><tr>
79 <td><a href="#UMLGraphicsView.__deleteShape">__deleteShape</a></td>
80 <td>Private method to delete the selected shapes from the display.</td>
81 </tr><tr>
82 <td><a href="#UMLGraphicsView.__incHeight">__incHeight</a></td>
83 <td>Private method to handle the increase height context menu entry.</td>
84 </tr><tr>
85 <td><a href="#UMLGraphicsView.__incWidth">__incWidth</a></td>
86 <td>Private method to handle the increase width context menu entry.</td>
87 </tr><tr>
88 <td><a href="#UMLGraphicsView.__initActions">__initActions</a></td>
89 <td>Private method to initialize the view actions.</td>
90 </tr><tr>
91 <td><a href="#UMLGraphicsView.__printDiagram">__printDiagram</a></td>
92 <td>Private slot called to print the diagram.</td>
93 </tr><tr>
94 <td><a href="#UMLGraphicsView.__printPreviewDiagram">__printPreviewDiagram</a></td>
95 <td>Private slot called to show a print preview of the diagram.</td>
96 </tr><tr>
97 <td><a href="#UMLGraphicsView.__relayout">__relayout</a></td>
98 <td>Private method to handle the re-layout context menu entry.</td>
99 </tr><tr>
100 <td><a href="#UMLGraphicsView.__saveImage">__saveImage</a></td>
101 <td>Private method to handle the save context menu entry.</td>
102 </tr><tr>
103 <td><a href="#UMLGraphicsView.__sceneChanged">__sceneChanged</a></td>
104 <td>Private slot called when the scene changes.</td>
105 </tr><tr>
106 <td><a href="#UMLGraphicsView.__setSize">__setSize</a></td>
107 <td>Private method to handle the set size context menu entry.</td>
108 </tr><tr>
109 <td><a href="#UMLGraphicsView.__zoom">__zoom</a></td>
110 <td>Private method to handle the zoom context menu action.</td>
111 </tr><tr>
112 <td><a href="#UMLGraphicsView.filteredItems">filteredItems</a></td>
113 <td>Public method to filter a list of items.</td>
114 </tr><tr>
115 <td><a href="#UMLGraphicsView.initToolBar">initToolBar</a></td>
116 <td>Public method to populate a toolbar with our actions.</td>
117 </tr><tr>
118 <td><a href="#UMLGraphicsView.selectItem">selectItem</a></td>
119 <td>Public method to select an item.</td>
120 </tr><tr>
121 <td><a href="#UMLGraphicsView.selectItems">selectItems</a></td>
122 <td>Public method to select the given items.</td>
123 </tr><tr>
124 <td><a href="#UMLGraphicsView.setDiagramName">setDiagramName</a></td>
125 <td>Public slot to set the diagram name.</td>
126 </tr>
127 </table>
128 <a NAME="UMLGraphicsView.__init__" ID="UMLGraphicsView.__init__"></a>
129 <h4>UMLGraphicsView (Constructor)</h4>
130 <b>UMLGraphicsView</b>(<i>scene, diagramName = "Unnamed", parent = None, name = None</i>)
131 <p>
132 Constructor
133 </p><dl>
134 <dt><i>scene</i></dt>
135 <dd>
136 reference to the scene object (QGraphicsScene)
137 </dd><dt><i>diagramName</i></dt>
138 <dd>
139 name of the diagram (string)
140 </dd><dt><i>parent</i></dt>
141 <dd>
142 parent widget of the view (QWidget)
143 </dd><dt><i>name</i></dt>
144 <dd>
145 name of the view widget (string)
146 </dd>
147 </dl><a NAME="UMLGraphicsView.__alignShapes" ID="UMLGraphicsView.__alignShapes"></a>
148 <h4>UMLGraphicsView.__alignShapes</h4>
149 <b>__alignShapes</b>(<i>alignment</i>)
150 <p>
151 Private slot to align the selected shapes.
152 </p><dl>
153 <dt><i>alignment</i></dt>
154 <dd>
155 alignment type (Qt.AlignmentFlag)
156 </dd>
157 </dl><a NAME="UMLGraphicsView.__checkSizeActions" ID="UMLGraphicsView.__checkSizeActions"></a>
158 <h4>UMLGraphicsView.__checkSizeActions</h4>
159 <b>__checkSizeActions</b>(<i></i>)
160 <p>
161 Private slot to set the enabled state of the size actions.
162 </p><a NAME="UMLGraphicsView.__decHeight" ID="UMLGraphicsView.__decHeight"></a>
163 <h4>UMLGraphicsView.__decHeight</h4>
164 <b>__decHeight</b>(<i></i>)
165 <p>
166 Private method to handle the decrease height context menu entry.
167 </p><a NAME="UMLGraphicsView.__decWidth" ID="UMLGraphicsView.__decWidth"></a>
168 <h4>UMLGraphicsView.__decWidth</h4>
169 <b>__decWidth</b>(<i></i>)
170 <p>
171 Private method to handle the decrease width context menu entry.
172 </p><a NAME="UMLGraphicsView.__deleteShape" ID="UMLGraphicsView.__deleteShape"></a>
173 <h4>UMLGraphicsView.__deleteShape</h4>
174 <b>__deleteShape</b>(<i></i>)
175 <p>
176 Private method to delete the selected shapes from the display.
177 </p><a NAME="UMLGraphicsView.__incHeight" ID="UMLGraphicsView.__incHeight"></a>
178 <h4>UMLGraphicsView.__incHeight</h4>
179 <b>__incHeight</b>(<i></i>)
180 <p>
181 Private method to handle the increase height context menu entry.
182 </p><a NAME="UMLGraphicsView.__incWidth" ID="UMLGraphicsView.__incWidth"></a>
183 <h4>UMLGraphicsView.__incWidth</h4>
184 <b>__incWidth</b>(<i></i>)
185 <p>
186 Private method to handle the increase width context menu entry.
187 </p><a NAME="UMLGraphicsView.__initActions" ID="UMLGraphicsView.__initActions"></a>
188 <h4>UMLGraphicsView.__initActions</h4>
189 <b>__initActions</b>(<i></i>)
190 <p>
191 Private method to initialize the view actions.
192 </p><a NAME="UMLGraphicsView.__printDiagram" ID="UMLGraphicsView.__printDiagram"></a>
193 <h4>UMLGraphicsView.__printDiagram</h4>
194 <b>__printDiagram</b>(<i></i>)
195 <p>
196 Private slot called to print the diagram.
197 </p><a NAME="UMLGraphicsView.__printPreviewDiagram" ID="UMLGraphicsView.__printPreviewDiagram"></a>
198 <h4>UMLGraphicsView.__printPreviewDiagram</h4>
199 <b>__printPreviewDiagram</b>(<i></i>)
200 <p>
201 Private slot called to show a print preview of the diagram.
202 </p><a NAME="UMLGraphicsView.__relayout" ID="UMLGraphicsView.__relayout"></a>
203 <h4>UMLGraphicsView.__relayout</h4>
204 <b>__relayout</b>(<i></i>)
205 <p>
206 Private method to handle the re-layout context menu entry.
207 </p><a NAME="UMLGraphicsView.__saveImage" ID="UMLGraphicsView.__saveImage"></a>
208 <h4>UMLGraphicsView.__saveImage</h4>
209 <b>__saveImage</b>(<i></i>)
210 <p>
211 Private method to handle the save context menu entry.
212 </p><a NAME="UMLGraphicsView.__sceneChanged" ID="UMLGraphicsView.__sceneChanged"></a>
213 <h4>UMLGraphicsView.__sceneChanged</h4>
214 <b>__sceneChanged</b>(<i>areas</i>)
215 <p>
216 Private slot called when the scene changes.
217 </p><dl>
218 <dt><i>areas</i></dt>
219 <dd>
220 list of rectangles that contain changes (list of QRectF)
221 </dd>
222 </dl><a NAME="UMLGraphicsView.__setSize" ID="UMLGraphicsView.__setSize"></a>
223 <h4>UMLGraphicsView.__setSize</h4>
224 <b>__setSize</b>(<i></i>)
225 <p>
226 Private method to handle the set size context menu entry.
227 </p><a NAME="UMLGraphicsView.__zoom" ID="UMLGraphicsView.__zoom"></a>
228 <h4>UMLGraphicsView.__zoom</h4>
229 <b>__zoom</b>(<i></i>)
230 <p>
231 Private method to handle the zoom context menu action.
232 </p><a NAME="UMLGraphicsView.filteredItems" ID="UMLGraphicsView.filteredItems"></a>
233 <h4>UMLGraphicsView.filteredItems</h4>
234 <b>filteredItems</b>(<i>items</i>)
235 <p>
236 Public method to filter a list of items.
237 </p><dl>
238 <dt><i>items</i></dt>
239 <dd>
240 list of items as returned by the scene object
241 (QGraphicsItem)
242 </dd>
243 </dl><dl>
244 <dt>Returns:</dt>
245 <dd>
246 list of interesting collision items (QGraphicsItem)
247 </dd>
248 </dl><a NAME="UMLGraphicsView.initToolBar" ID="UMLGraphicsView.initToolBar"></a>
249 <h4>UMLGraphicsView.initToolBar</h4>
250 <b>initToolBar</b>(<i></i>)
251 <p>
252 Public method to populate a toolbar with our actions.
253 </p><dl>
254 <dt>Returns:</dt>
255 <dd>
256 the populated toolBar (QToolBar)
257 </dd>
258 </dl><a NAME="UMLGraphicsView.selectItem" ID="UMLGraphicsView.selectItem"></a>
259 <h4>UMLGraphicsView.selectItem</h4>
260 <b>selectItem</b>(<i>item</i>)
261 <p>
262 Public method to select an item.
263 </p><dl>
264 <dt><i>item</i></dt>
265 <dd>
266 item to be selected (QGraphicsItemItem)
267 </dd>
268 </dl><a NAME="UMLGraphicsView.selectItems" ID="UMLGraphicsView.selectItems"></a>
269 <h4>UMLGraphicsView.selectItems</h4>
270 <b>selectItems</b>(<i>items</i>)
271 <p>
272 Public method to select the given items.
273 </p><dl>
274 <dt><i>items</i></dt>
275 <dd>
276 list of items to be selected (list of QGraphicsItemItem)
277 </dd>
278 </dl><a NAME="UMLGraphicsView.setDiagramName" ID="UMLGraphicsView.setDiagramName"></a>
279 <h4>UMLGraphicsView.setDiagramName</h4>
280 <b>setDiagramName</b>(<i>name</i>)
281 <p>
282 Public slot to set the diagram name.
283 </p><dl>
284 <dt><i>name</i></dt>
285 <dd>
286 diagram name (string)
287 </dd>
288 </dl>
289 <div align="right"><a href="#top">Up</a></div>
290 <hr />
291 </body></html>

eric ide

mercurial