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