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

eric ide

mercurial