56 </table> |
56 </table> |
57 <h3>Methods</h3> |
57 <h3>Methods</h3> |
58 <table> |
58 <table> |
59 <tr> |
59 <tr> |
60 <td><a href="#ClassItem.__init__">ClassItem</a></td> |
60 <td><a href="#ClassItem.__init__">ClassItem</a></td> |
61 <td>Constructor</td> |
61 <td>Constructor</td> |
62 </tr><tr> |
62 </tr><tr> |
63 <td><a href="#ClassItem.__calculateSize">__calculateSize</a></td> |
63 <td><a href="#ClassItem.__calculateSize">__calculateSize</a></td> |
64 <td>Private method to calculate the size of the class item.</td> |
64 <td>Private method to calculate the size of the class item.</td> |
65 </tr><tr> |
65 </tr><tr> |
66 <td><a href="#ClassItem.__createTexts">__createTexts</a></td> |
66 <td><a href="#ClassItem.__createTexts">__createTexts</a></td> |
67 <td>Private method to create the text items of the class item.</td> |
67 <td>Private method to create the text items of the class item.</td> |
68 </tr><tr> |
68 </tr><tr> |
69 <td><a href="#ClassItem.isExternal">isExternal</a></td> |
69 <td><a href="#ClassItem.isExternal">isExternal</a></td> |
70 <td>Method returning the external state.</td> |
70 <td>Method returning the external state.</td> |
71 </tr><tr> |
71 </tr><tr> |
72 <td><a href="#ClassItem.paint">paint</a></td> |
72 <td><a href="#ClassItem.paint">paint</a></td> |
73 <td>Public method to paint the item in local coordinates.</td> |
73 <td>Public method to paint the item in local coordinates.</td> |
74 </tr><tr> |
74 </tr><tr> |
75 <td><a href="#ClassItem.setModel">setModel</a></td> |
75 <td><a href="#ClassItem.setModel">setModel</a></td> |
76 <td>Method to set the class model.</td> |
76 <td>Method to set the class model.</td> |
77 </tr> |
77 </tr> |
78 </table> |
78 </table> |
79 <a NAME="ClassItem.__init__" ID="ClassItem.__init__"></a> |
79 <a NAME="ClassItem.__init__" ID="ClassItem.__init__"></a> |
80 <h4>ClassItem (Constructor)</h4> |
80 <h4>ClassItem (Constructor)</h4> |
81 <b>ClassItem</b>(<i>model = None, external = False, x = 0, y = 0, rounded = False, noAttrs = False, parent = None, scene = None</i>) |
81 <b>ClassItem</b>(<i>model = None, external = False, x = 0, y = 0, rounded = False, noAttrs = False, parent = None, scene = None</i>) |
82 <p> |
82 <p> |
83 Constructor |
83 Constructor |
84 </p><dl> |
84 </p><dl> |
85 <dt><i>model</i></dt> |
85 <dt><i>model</i></dt> |
86 <dd> |
86 <dd> |
87 class model containing the class data (ClassModel) |
87 class model containing the class data (ClassModel) |
88 </dd><dt><i>external</i></dt> |
88 </dd><dt><i>external</i></dt> |
89 <dd> |
89 <dd> |
90 flag indicating a class defined outside our scope (boolean) |
90 flag indicating a class defined outside our scope (boolean) |
91 </dd><dt><i>x</i></dt> |
91 </dd><dt><i>x</i></dt> |
92 <dd> |
92 <dd> |
93 x-coordinate (integer) |
93 x-coordinate (integer) |
94 </dd><dt><i>y</i></dt> |
94 </dd><dt><i>y</i></dt> |
95 <dd> |
95 <dd> |
96 y-coordinate (integer) |
96 y-coordinate (integer) |
97 </dd><dt><i>rounded=</i></dt> |
97 </dd><dt><i>rounded=</i></dt> |
98 <dd> |
98 <dd> |
99 flag indicating a rounded corner (boolean) |
99 flag indicating a rounded corner (boolean) |
100 </dd><dt><i>noAttrs=</i></dt> |
100 </dd><dt><i>noAttrs=</i></dt> |
101 <dd> |
101 <dd> |
102 flag indicating, that no attributes should be shown (boolean) |
102 flag indicating, that no attributes should be shown (boolean) |
103 </dd><dt><i>parent=</i></dt> |
103 </dd><dt><i>parent=</i></dt> |
104 <dd> |
104 <dd> |
105 reference to the parent object (QGraphicsItem) |
105 reference to the parent object (QGraphicsItem) |
106 </dd><dt><i>scene=</i></dt> |
106 </dd><dt><i>scene=</i></dt> |
107 <dd> |
107 <dd> |
108 reference to the scene object (QGraphicsScene) |
108 reference to the scene object (QGraphicsScene) |
109 </dd> |
109 </dd> |
110 </dl><a NAME="ClassItem.__calculateSize" ID="ClassItem.__calculateSize"></a> |
110 </dl><a NAME="ClassItem.__calculateSize" ID="ClassItem.__calculateSize"></a> |
111 <h4>ClassItem.__calculateSize</h4> |
111 <h4>ClassItem.__calculateSize</h4> |
112 <b>__calculateSize</b>(<i></i>) |
112 <b>__calculateSize</b>(<i></i>) |
113 <p> |
113 <p> |
114 Private method to calculate the size of the class item. |
114 Private method to calculate the size of the class item. |
115 </p><a NAME="ClassItem.__createTexts" ID="ClassItem.__createTexts"></a> |
115 </p><a NAME="ClassItem.__createTexts" ID="ClassItem.__createTexts"></a> |
116 <h4>ClassItem.__createTexts</h4> |
116 <h4>ClassItem.__createTexts</h4> |
117 <b>__createTexts</b>(<i></i>) |
117 <b>__createTexts</b>(<i></i>) |
118 <p> |
118 <p> |
119 Private method to create the text items of the class item. |
119 Private method to create the text items of the class item. |
120 </p><a NAME="ClassItem.isExternal" ID="ClassItem.isExternal"></a> |
120 </p><a NAME="ClassItem.isExternal" ID="ClassItem.isExternal"></a> |
121 <h4>ClassItem.isExternal</h4> |
121 <h4>ClassItem.isExternal</h4> |
122 <b>isExternal</b>(<i></i>) |
122 <b>isExternal</b>(<i></i>) |
123 <p> |
123 <p> |
124 Method returning the external state. |
124 Method returning the external state. |
125 </p><dl> |
125 </p><dl> |
126 <dt>Returns:</dt> |
126 <dt>Returns:</dt> |
127 <dd> |
127 <dd> |
128 external state (boolean) |
128 external state (boolean) |
129 </dd> |
129 </dd> |
130 </dl><a NAME="ClassItem.paint" ID="ClassItem.paint"></a> |
130 </dl><a NAME="ClassItem.paint" ID="ClassItem.paint"></a> |
131 <h4>ClassItem.paint</h4> |
131 <h4>ClassItem.paint</h4> |
132 <b>paint</b>(<i>painter, option, widget = None</i>) |
132 <b>paint</b>(<i>painter, option, widget = None</i>) |
133 <p> |
133 <p> |
134 Public method to paint the item in local coordinates. |
134 Public method to paint the item in local coordinates. |
135 </p><dl> |
135 </p><dl> |
136 <dt><i>painter</i></dt> |
136 <dt><i>painter</i></dt> |
137 <dd> |
137 <dd> |
138 reference to the painter object (QPainter) |
138 reference to the painter object (QPainter) |
139 </dd><dt><i>option</i></dt> |
139 </dd><dt><i>option</i></dt> |
140 <dd> |
140 <dd> |
141 style options (QStyleOptionGraphicsItem) |
141 style options (QStyleOptionGraphicsItem) |
142 </dd><dt><i>widget</i></dt> |
142 </dd><dt><i>widget</i></dt> |
143 <dd> |
143 <dd> |
144 optional reference to the widget painted on (QWidget) |
144 optional reference to the widget painted on (QWidget) |
145 </dd> |
145 </dd> |
146 </dl><a NAME="ClassItem.setModel" ID="ClassItem.setModel"></a> |
146 </dl><a NAME="ClassItem.setModel" ID="ClassItem.setModel"></a> |
147 <h4>ClassItem.setModel</h4> |
147 <h4>ClassItem.setModel</h4> |
148 <b>setModel</b>(<i>model</i>) |
148 <b>setModel</b>(<i>model</i>) |
149 <p> |
149 <p> |
150 Method to set the class model. |
150 Method to set the class model. |
151 </p><dl> |
151 </p><dl> |
152 <dt><i>model</i></dt> |
152 <dt><i>model</i></dt> |
153 <dd> |
153 <dd> |
154 class model containing the class data (ClassModel) |
154 class model containing the class data (ClassModel) |
155 </dd> |
155 </dd> |
156 </dl> |
156 </dl> |
157 <div align="right"><a href="#top">Up</a></div> |
157 <div align="right"><a href="#top">Up</a></div> |
158 <hr /><hr /> |
158 <hr /><hr /> |
159 <a NAME="ClassModel" ID="ClassModel"></a> |
159 <a NAME="ClassModel" ID="ClassModel"></a> |
160 <h2>ClassModel</h2> |
160 <h2>ClassModel</h2> |
161 <p> |
161 <p> |
162 Class implementing the class model. |
162 Class implementing the class model. |
163 </p> |
163 </p> |
164 <h3>Derived from</h3> |
164 <h3>Derived from</h3> |
165 object |
165 object |
166 <h3>Class Attributes</h3> |
166 <h3>Class Attributes</h3> |
167 <table> |
167 <table> |
169 </table> |
169 </table> |
170 <h3>Methods</h3> |
170 <h3>Methods</h3> |
171 <table> |
171 <table> |
172 <tr> |
172 <tr> |
173 <td><a href="#ClassModel.__init__">ClassModel</a></td> |
173 <td><a href="#ClassModel.__init__">ClassModel</a></td> |
174 <td>Constructor</td> |
174 <td>Constructor</td> |
175 </tr><tr> |
175 </tr><tr> |
176 <td><a href="#ClassModel.addAttribute">addAttribute</a></td> |
176 <td><a href="#ClassModel.addAttribute">addAttribute</a></td> |
177 <td>Method to add an attribute to the class model.</td> |
177 <td>Method to add an attribute to the class model.</td> |
178 </tr><tr> |
178 </tr><tr> |
179 <td><a href="#ClassModel.addMethod">addMethod</a></td> |
179 <td><a href="#ClassModel.addMethod">addMethod</a></td> |
180 <td>Method to add a method to the class model.</td> |
180 <td>Method to add a method to the class model.</td> |
181 </tr><tr> |
181 </tr><tr> |
182 <td><a href="#ClassModel.getAttributes">getAttributes</a></td> |
182 <td><a href="#ClassModel.getAttributes">getAttributes</a></td> |
183 <td>Method to retrieve the attributes of the class.</td> |
183 <td>Method to retrieve the attributes of the class.</td> |
184 </tr><tr> |
184 </tr><tr> |
185 <td><a href="#ClassModel.getMethods">getMethods</a></td> |
185 <td><a href="#ClassModel.getMethods">getMethods</a></td> |
186 <td>Method to retrieve the methods of the class.</td> |
186 <td>Method to retrieve the methods of the class.</td> |
187 </tr><tr> |
187 </tr><tr> |
188 <td><a href="#ClassModel.getName">getName</a></td> |
188 <td><a href="#ClassModel.getName">getName</a></td> |
189 <td>Method to retrieve the class name.</td> |
189 <td>Method to retrieve the class name.</td> |
190 </tr> |
190 </tr> |
191 </table> |
191 </table> |
192 <a NAME="ClassModel.__init__" ID="ClassModel.__init__"></a> |
192 <a NAME="ClassModel.__init__" ID="ClassModel.__init__"></a> |
193 <h4>ClassModel (Constructor)</h4> |
193 <h4>ClassModel (Constructor)</h4> |
194 <b>ClassModel</b>(<i>name, methods = [], attributes = []</i>) |
194 <b>ClassModel</b>(<i>name, methods = [], attributes = []</i>) |
195 <p> |
195 <p> |
196 Constructor |
196 Constructor |
197 </p><dl> |
197 </p><dl> |
198 <dt><i>name</i></dt> |
198 <dt><i>name</i></dt> |
199 <dd> |
199 <dd> |
200 the class name (string) |
200 the class name (string) |
201 </dd><dt><i>methods</i></dt> |
201 </dd><dt><i>methods</i></dt> |
202 <dd> |
202 <dd> |
203 list of method names of the class |
203 list of method names of the class |
204 (list of strings) |
204 (list of strings) |
205 </dd><dt><i>attributes</i></dt> |
205 </dd><dt><i>attributes</i></dt> |
206 <dd> |
206 <dd> |
207 list of attribute names of the class |
207 list of attribute names of the class |
208 (list of strings) |
208 (list of strings) |
209 </dd> |
209 </dd> |
210 </dl><a NAME="ClassModel.addAttribute" ID="ClassModel.addAttribute"></a> |
210 </dl><a NAME="ClassModel.addAttribute" ID="ClassModel.addAttribute"></a> |
211 <h4>ClassModel.addAttribute</h4> |
211 <h4>ClassModel.addAttribute</h4> |
212 <b>addAttribute</b>(<i>attribute</i>) |
212 <b>addAttribute</b>(<i>attribute</i>) |
213 <p> |
213 <p> |
214 Method to add an attribute to the class model. |
214 Method to add an attribute to the class model. |
215 </p><dl> |
215 </p><dl> |
216 <dt><i>attribute</i></dt> |
216 <dt><i>attribute</i></dt> |
217 <dd> |
217 <dd> |
218 attribute name to be added (string) |
218 attribute name to be added (string) |
219 </dd> |
219 </dd> |
220 </dl><a NAME="ClassModel.addMethod" ID="ClassModel.addMethod"></a> |
220 </dl><a NAME="ClassModel.addMethod" ID="ClassModel.addMethod"></a> |
221 <h4>ClassModel.addMethod</h4> |
221 <h4>ClassModel.addMethod</h4> |
222 <b>addMethod</b>(<i>method</i>) |
222 <b>addMethod</b>(<i>method</i>) |
223 <p> |
223 <p> |
224 Method to add a method to the class model. |
224 Method to add a method to the class model. |
225 </p><dl> |
225 </p><dl> |
226 <dt><i>method</i></dt> |
226 <dt><i>method</i></dt> |
227 <dd> |
227 <dd> |
228 method name to be added (string) |
228 method name to be added (string) |
229 </dd> |
229 </dd> |
230 </dl><a NAME="ClassModel.getAttributes" ID="ClassModel.getAttributes"></a> |
230 </dl><a NAME="ClassModel.getAttributes" ID="ClassModel.getAttributes"></a> |
231 <h4>ClassModel.getAttributes</h4> |
231 <h4>ClassModel.getAttributes</h4> |
232 <b>getAttributes</b>(<i></i>) |
232 <b>getAttributes</b>(<i></i>) |
233 <p> |
233 <p> |
234 Method to retrieve the attributes of the class. |
234 Method to retrieve the attributes of the class. |
235 </p><dl> |
235 </p><dl> |
236 <dt>Returns:</dt> |
236 <dt>Returns:</dt> |
237 <dd> |
237 <dd> |
238 list of class attributes (list of strings) |
238 list of class attributes (list of strings) |
239 </dd> |
239 </dd> |
240 </dl><a NAME="ClassModel.getMethods" ID="ClassModel.getMethods"></a> |
240 </dl><a NAME="ClassModel.getMethods" ID="ClassModel.getMethods"></a> |
241 <h4>ClassModel.getMethods</h4> |
241 <h4>ClassModel.getMethods</h4> |
242 <b>getMethods</b>(<i></i>) |
242 <b>getMethods</b>(<i></i>) |
243 <p> |
243 <p> |
244 Method to retrieve the methods of the class. |
244 Method to retrieve the methods of the class. |
245 </p><dl> |
245 </p><dl> |
246 <dt>Returns:</dt> |
246 <dt>Returns:</dt> |
247 <dd> |
247 <dd> |
248 list of class methods (list of strings) |
248 list of class methods (list of strings) |
249 </dd> |
249 </dd> |
250 </dl><a NAME="ClassModel.getName" ID="ClassModel.getName"></a> |
250 </dl><a NAME="ClassModel.getName" ID="ClassModel.getName"></a> |
251 <h4>ClassModel.getName</h4> |
251 <h4>ClassModel.getName</h4> |
252 <b>getName</b>(<i></i>) |
252 <b>getName</b>(<i></i>) |
253 <p> |
253 <p> |
254 Method to retrieve the class name. |
254 Method to retrieve the class name. |
255 </p><dl> |
255 </p><dl> |
256 <dt>Returns:</dt> |
256 <dt>Returns:</dt> |
257 <dd> |
257 <dd> |
258 class name (string) |
258 class name (string) |
259 </dd> |
259 </dd> |
260 </dl> |
260 </dl> |
261 <div align="right"><a href="#top">Up</a></div> |
261 <div align="right"><a href="#top">Up</a></div> |
262 <hr /> |
262 <hr /> |
263 </body></html> |
263 </body></html> |