|
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.Graphics.ModuleItem</title> |
|
6 <style> |
|
7 b'body {\n background:white;\n margin: 0em 1em 10em 1em;\n color: black;\n}\n\nh1 { color: white; background: #4FA4FF; }\nh2 { color: white; background: #4FA4FF; }\nh3 { color: white; background: #00557F; }\nh4 { color: white; background: #00557F; }\n \na { color: #AA5500; }\n' |
|
8 </style> |
|
9 </head> |
|
10 <body><a NAME="top" ID="top"></a> |
|
11 <h1>eric5.Graphics.ModuleItem</h1> |
|
12 <p> |
|
13 Module implementing a module item. |
|
14 </p> |
|
15 <h3>Global Attributes</h3> |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 <table> |
|
21 <tr> |
|
22 <td><a href="#ModuleItem">ModuleItem</a></td> |
|
23 <td>Class implementing a module item.</td> |
|
24 </tr><tr> |
|
25 <td><a href="#ModuleModel">ModuleModel</a></td> |
|
26 <td>Class implementing the module model.</td> |
|
27 </tr> |
|
28 </table> |
|
29 <h3>Functions</h3> |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <hr /><hr /> |
|
34 <a NAME="ModuleItem" ID="ModuleItem"></a> |
|
35 <h2>ModuleItem</h2> |
|
36 <p> |
|
37 Class implementing a module item. |
|
38 </p> |
|
39 <h3>Derived from</h3> |
|
40 UMLItem |
|
41 <h3>Class Attributes</h3> |
|
42 <table> |
|
43 <tr><td>None</td></tr> |
|
44 </table> |
|
45 <h3>Methods</h3> |
|
46 <table> |
|
47 <tr> |
|
48 <td><a href="#ModuleItem.__init__">ModuleItem</a></td> |
|
49 <td>Constructor</td> |
|
50 </tr><tr> |
|
51 <td><a href="#ModuleItem.__calculateSize">__calculateSize</a></td> |
|
52 <td>Private method to calculate the size of the module item.</td> |
|
53 </tr><tr> |
|
54 <td><a href="#ModuleItem.__createTexts">__createTexts</a></td> |
|
55 <td>Private method to create the text items of the module item.</td> |
|
56 </tr><tr> |
|
57 <td><a href="#ModuleItem.paint">paint</a></td> |
|
58 <td>Public method to paint the item in local coordinates.</td> |
|
59 </tr><tr> |
|
60 <td><a href="#ModuleItem.setModel">setModel</a></td> |
|
61 <td>Method to set the module model.</td> |
|
62 </tr> |
|
63 </table> |
|
64 <a NAME="ModuleItem.__init__" ID="ModuleItem.__init__"></a> |
|
65 <h4>ModuleItem (Constructor)</h4> |
|
66 <b>ModuleItem</b>(<i>model = None, x = 0, y = 0, rounded = False, parent = None, scene = None</i>) |
|
67 <p> |
|
68 Constructor |
|
69 </p><dl> |
|
70 <dt><i>model</i></dt> |
|
71 <dd> |
|
72 module model containing the module data (ModuleModel) |
|
73 </dd><dt><i>x</i></dt> |
|
74 <dd> |
|
75 x-coordinate (integer) |
|
76 </dd><dt><i>y</i></dt> |
|
77 <dd> |
|
78 y-coordinate (integer) |
|
79 </dd><dt><i>rounded=</i></dt> |
|
80 <dd> |
|
81 flag indicating a rounded corner (boolean) |
|
82 </dd><dt><i>parent=</i></dt> |
|
83 <dd> |
|
84 reference to the parent object (QGraphicsItem) |
|
85 </dd><dt><i>scene=</i></dt> |
|
86 <dd> |
|
87 reference to the scene object (QGraphicsScene) |
|
88 </dd> |
|
89 </dl><a NAME="ModuleItem.__calculateSize" ID="ModuleItem.__calculateSize"></a> |
|
90 <h4>ModuleItem.__calculateSize</h4> |
|
91 <b>__calculateSize</b>(<i></i>) |
|
92 <p> |
|
93 Private method to calculate the size of the module item. |
|
94 </p><a NAME="ModuleItem.__createTexts" ID="ModuleItem.__createTexts"></a> |
|
95 <h4>ModuleItem.__createTexts</h4> |
|
96 <b>__createTexts</b>(<i></i>) |
|
97 <p> |
|
98 Private method to create the text items of the module item. |
|
99 </p><a NAME="ModuleItem.paint" ID="ModuleItem.paint"></a> |
|
100 <h4>ModuleItem.paint</h4> |
|
101 <b>paint</b>(<i>painter, option, widget = None</i>) |
|
102 <p> |
|
103 Public method to paint the item in local coordinates. |
|
104 </p><dl> |
|
105 <dt><i>painter</i></dt> |
|
106 <dd> |
|
107 reference to the painter object (QPainter) |
|
108 </dd><dt><i>option</i></dt> |
|
109 <dd> |
|
110 style options (QStyleOptionGraphicsItem) |
|
111 </dd><dt><i>widget</i></dt> |
|
112 <dd> |
|
113 optional reference to the widget painted on (QWidget) |
|
114 </dd> |
|
115 </dl><a NAME="ModuleItem.setModel" ID="ModuleItem.setModel"></a> |
|
116 <h4>ModuleItem.setModel</h4> |
|
117 <b>setModel</b>(<i>model</i>) |
|
118 <p> |
|
119 Method to set the module model. |
|
120 </p><dl> |
|
121 <dt><i>model</i></dt> |
|
122 <dd> |
|
123 module model containing the module data (ModuleModel) |
|
124 </dd> |
|
125 </dl> |
|
126 <div align="right"><a href="#top">Up</a></div> |
|
127 <hr /><hr /> |
|
128 <a NAME="ModuleModel" ID="ModuleModel"></a> |
|
129 <h2>ModuleModel</h2> |
|
130 <p> |
|
131 Class implementing the module model. |
|
132 </p> |
|
133 <h3>Derived from</h3> |
|
134 object |
|
135 <h3>Class Attributes</h3> |
|
136 <table> |
|
137 <tr><td>None</td></tr> |
|
138 </table> |
|
139 <h3>Methods</h3> |
|
140 <table> |
|
141 <tr> |
|
142 <td><a href="#ModuleModel.__init__">ModuleModel</a></td> |
|
143 <td>Constructor</td> |
|
144 </tr><tr> |
|
145 <td><a href="#ModuleModel.addClass">addClass</a></td> |
|
146 <td>Method to add a class to the module model.</td> |
|
147 </tr><tr> |
|
148 <td><a href="#ModuleModel.getClasses">getClasses</a></td> |
|
149 <td>Method to retrieve the classes of the module.</td> |
|
150 </tr><tr> |
|
151 <td><a href="#ModuleModel.getName">getName</a></td> |
|
152 <td>Method to retrieve the module name.</td> |
|
153 </tr> |
|
154 </table> |
|
155 <a NAME="ModuleModel.__init__" ID="ModuleModel.__init__"></a> |
|
156 <h4>ModuleModel (Constructor)</h4> |
|
157 <b>ModuleModel</b>(<i>name, classlist=[]</i>) |
|
158 <p> |
|
159 Constructor |
|
160 </p><dl> |
|
161 <dt><i>name</i></dt> |
|
162 <dd> |
|
163 the module name (string) |
|
164 </dd><dt><i>classlist</i></dt> |
|
165 <dd> |
|
166 list of class names (list of strings) |
|
167 </dd> |
|
168 </dl><a NAME="ModuleModel.addClass" ID="ModuleModel.addClass"></a> |
|
169 <h4>ModuleModel.addClass</h4> |
|
170 <b>addClass</b>(<i>classname</i>) |
|
171 <p> |
|
172 Method to add a class to the module model. |
|
173 </p><dl> |
|
174 <dt><i>classname</i></dt> |
|
175 <dd> |
|
176 class name to be added (string) |
|
177 </dd> |
|
178 </dl><a NAME="ModuleModel.getClasses" ID="ModuleModel.getClasses"></a> |
|
179 <h4>ModuleModel.getClasses</h4> |
|
180 <b>getClasses</b>(<i></i>) |
|
181 <p> |
|
182 Method to retrieve the classes of the module. |
|
183 </p><dl> |
|
184 <dt>Returns:</dt> |
|
185 <dd> |
|
186 list of class names (list of strings) |
|
187 </dd> |
|
188 </dl><a NAME="ModuleModel.getName" ID="ModuleModel.getName"></a> |
|
189 <h4>ModuleModel.getName</h4> |
|
190 <b>getName</b>(<i></i>) |
|
191 <p> |
|
192 Method to retrieve the module name. |
|
193 </p><dl> |
|
194 <dt>Returns:</dt> |
|
195 <dd> |
|
196 module name (string) |
|
197 </dd> |
|
198 </dl> |
|
199 <div align="right"><a href="#top">Up</a></div> |
|
200 <hr /> |
|
201 </body></html> |