53 </table> |
53 </table> |
54 <h3>Methods</h3> |
54 <h3>Methods</h3> |
55 <table> |
55 <table> |
56 <tr> |
56 <tr> |
57 <td><a href="#UMLItem.__init__">UMLItem</a></td> |
57 <td><a href="#UMLItem.__init__">UMLItem</a></td> |
58 <td>Constructor</td> |
58 <td>Constructor</td> |
59 </tr><tr> |
59 </tr><tr> |
60 <td><a href="#UMLItem.addAssociation">addAssociation</a></td> |
60 <td><a href="#UMLItem.addAssociation">addAssociation</a></td> |
61 <td>Method to add an association to this widget.</td> |
61 <td>Method to add an association to this widget.</td> |
62 </tr><tr> |
62 </tr><tr> |
63 <td><a href="#UMLItem.adjustAssociations">adjustAssociations</a></td> |
63 <td><a href="#UMLItem.adjustAssociations">adjustAssociations</a></td> |
64 <td>Method to adjust the associations to widget movements.</td> |
64 <td>Method to adjust the associations to widget movements.</td> |
65 </tr><tr> |
65 </tr><tr> |
66 <td><a href="#UMLItem.itemChange">itemChange</a></td> |
66 <td><a href="#UMLItem.itemChange">itemChange</a></td> |
67 <td>Protected method called when an items state changes.</td> |
67 <td>Protected method called when an items state changes.</td> |
68 </tr><tr> |
68 </tr><tr> |
69 <td><a href="#UMLItem.moveBy">moveBy</a></td> |
69 <td><a href="#UMLItem.moveBy">moveBy</a></td> |
70 <td>Overriden method to move the widget relative.</td> |
70 <td>Overriden method to move the widget relative.</td> |
71 </tr><tr> |
71 </tr><tr> |
72 <td><a href="#UMLItem.paint">paint</a></td> |
72 <td><a href="#UMLItem.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="#UMLItem.removeAssociation">removeAssociation</a></td> |
75 <td><a href="#UMLItem.removeAssociation">removeAssociation</a></td> |
76 <td>Method to remove an association to this widget.</td> |
76 <td>Method to remove an association to this widget.</td> |
77 </tr><tr> |
77 </tr><tr> |
78 <td><a href="#UMLItem.removeAssociations">removeAssociations</a></td> |
78 <td><a href="#UMLItem.removeAssociations">removeAssociations</a></td> |
79 <td>Method to remove all associations of this widget.</td> |
79 <td>Method to remove all associations of this widget.</td> |
80 </tr><tr> |
80 </tr><tr> |
81 <td><a href="#UMLItem.setPos">setPos</a></td> |
81 <td><a href="#UMLItem.setPos">setPos</a></td> |
82 <td>Overriden method to set the items position.</td> |
82 <td>Overriden method to set the items position.</td> |
83 </tr><tr> |
83 </tr><tr> |
84 <td><a href="#UMLItem.setSize">setSize</a></td> |
84 <td><a href="#UMLItem.setSize">setSize</a></td> |
85 <td>Public method to set the rectangles size.</td> |
85 <td>Public method to set the rectangles size.</td> |
86 </tr> |
86 </tr> |
87 </table> |
87 </table> |
88 <a NAME="UMLItem.__init__" ID="UMLItem.__init__"></a> |
88 <a NAME="UMLItem.__init__" ID="UMLItem.__init__"></a> |
89 <h4>UMLItem (Constructor)</h4> |
89 <h4>UMLItem (Constructor)</h4> |
90 <b>UMLItem</b>(<i>x = 0, y = 0, rounded = False, parent = None</i>) |
90 <b>UMLItem</b>(<i>x = 0, y = 0, rounded = False, parent = None</i>) |
91 <p> |
91 <p> |
92 Constructor |
92 Constructor |
93 </p><dl> |
93 </p><dl> |
94 <dt><i>x</i></dt> |
94 <dt><i>x</i></dt> |
95 <dd> |
95 <dd> |
96 x-coordinate (integer) |
96 x-coordinate (integer) |
97 </dd><dt><i>y</i></dt> |
97 </dd><dt><i>y</i></dt> |
98 <dd> |
98 <dd> |
99 y-coordinate (integer) |
99 y-coordinate (integer) |
100 </dd><dt><i>rounded</i></dt> |
100 </dd><dt><i>rounded</i></dt> |
101 <dd> |
101 <dd> |
102 flag indicating a rounded corner (boolean) |
102 flag indicating a rounded corner (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> |
106 </dd> |
107 </dl><a NAME="UMLItem.addAssociation" ID="UMLItem.addAssociation"></a> |
107 </dl><a NAME="UMLItem.addAssociation" ID="UMLItem.addAssociation"></a> |
108 <h4>UMLItem.addAssociation</h4> |
108 <h4>UMLItem.addAssociation</h4> |
109 <b>addAssociation</b>(<i>assoc</i>) |
109 <b>addAssociation</b>(<i>assoc</i>) |
110 <p> |
110 <p> |
111 Method to add an association to this widget. |
111 Method to add an association to this widget. |
112 </p><dl> |
112 </p><dl> |
113 <dt><i>assoc</i></dt> |
113 <dt><i>assoc</i></dt> |
114 <dd> |
114 <dd> |
115 association to be added (AssociationWidget) |
115 association to be added (AssociationWidget) |
116 </dd> |
116 </dd> |
117 </dl><a NAME="UMLItem.adjustAssociations" ID="UMLItem.adjustAssociations"></a> |
117 </dl><a NAME="UMLItem.adjustAssociations" ID="UMLItem.adjustAssociations"></a> |
118 <h4>UMLItem.adjustAssociations</h4> |
118 <h4>UMLItem.adjustAssociations</h4> |
119 <b>adjustAssociations</b>(<i></i>) |
119 <b>adjustAssociations</b>(<i></i>) |
120 <p> |
120 <p> |
121 Method to adjust the associations to widget movements. |
121 Method to adjust the associations to widget movements. |
122 </p><a NAME="UMLItem.itemChange" ID="UMLItem.itemChange"></a> |
122 </p><a NAME="UMLItem.itemChange" ID="UMLItem.itemChange"></a> |
123 <h4>UMLItem.itemChange</h4> |
123 <h4>UMLItem.itemChange</h4> |
124 <b>itemChange</b>(<i>change, value</i>) |
124 <b>itemChange</b>(<i>change, value</i>) |
125 <p> |
125 <p> |
126 Protected method called when an items state changes. |
126 Protected method called when an items state changes. |
127 </p><dl> |
127 </p><dl> |
128 <dt><i>change</i></dt> |
128 <dt><i>change</i></dt> |
129 <dd> |
129 <dd> |
130 the item's change (QGraphicsItem.GraphicsItemChange) |
130 the item's change (QGraphicsItem.GraphicsItemChange) |
131 </dd><dt><i>value</i></dt> |
131 </dd><dt><i>value</i></dt> |
132 <dd> |
132 <dd> |
133 the value of the change |
133 the value of the change |
134 </dd> |
134 </dd> |
135 </dl><dl> |
135 </dl><dl> |
136 <dt>Returns:</dt> |
136 <dt>Returns:</dt> |
137 <dd> |
137 <dd> |
138 adjusted values |
138 adjusted values |
139 </dd> |
139 </dd> |
140 </dl><a NAME="UMLItem.moveBy" ID="UMLItem.moveBy"></a> |
140 </dl><a NAME="UMLItem.moveBy" ID="UMLItem.moveBy"></a> |
141 <h4>UMLItem.moveBy</h4> |
141 <h4>UMLItem.moveBy</h4> |
142 <b>moveBy</b>(<i>dx, dy</i>) |
142 <b>moveBy</b>(<i>dx, dy</i>) |
143 <p> |
143 <p> |
144 Overriden method to move the widget relative. |
144 Overriden method to move the widget relative. |
145 </p><dl> |
145 </p><dl> |
146 <dt><i>dx</i></dt> |
146 <dt><i>dx</i></dt> |
147 <dd> |
147 <dd> |
148 relative movement in x-direction (float) |
148 relative movement in x-direction (float) |
149 </dd><dt><i>dy</i></dt> |
149 </dd><dt><i>dy</i></dt> |
150 <dd> |
150 <dd> |
151 relative movement in y-direction (float) |
151 relative movement in y-direction (float) |
152 </dd> |
152 </dd> |
153 </dl><a NAME="UMLItem.paint" ID="UMLItem.paint"></a> |
153 </dl><a NAME="UMLItem.paint" ID="UMLItem.paint"></a> |
154 <h4>UMLItem.paint</h4> |
154 <h4>UMLItem.paint</h4> |
155 <b>paint</b>(<i>painter, option, widget = None</i>) |
155 <b>paint</b>(<i>painter, option, widget = None</i>) |
156 <p> |
156 <p> |
157 Public method to paint the item in local coordinates. |
157 Public method to paint the item in local coordinates. |
158 </p><dl> |
158 </p><dl> |
159 <dt><i>painter</i></dt> |
159 <dt><i>painter</i></dt> |
160 <dd> |
160 <dd> |
161 reference to the painter object (QPainter) |
161 reference to the painter object (QPainter) |
162 </dd><dt><i>option</i></dt> |
162 </dd><dt><i>option</i></dt> |
163 <dd> |
163 <dd> |
164 style options (QStyleOptionGraphicsItem) |
164 style options (QStyleOptionGraphicsItem) |
165 </dd><dt><i>widget</i></dt> |
165 </dd><dt><i>widget</i></dt> |
166 <dd> |
166 <dd> |
167 optional reference to the widget painted on (QWidget) |
167 optional reference to the widget painted on (QWidget) |
168 </dd> |
168 </dd> |
169 </dl><a NAME="UMLItem.removeAssociation" ID="UMLItem.removeAssociation"></a> |
169 </dl><a NAME="UMLItem.removeAssociation" ID="UMLItem.removeAssociation"></a> |
170 <h4>UMLItem.removeAssociation</h4> |
170 <h4>UMLItem.removeAssociation</h4> |
171 <b>removeAssociation</b>(<i>assoc</i>) |
171 <b>removeAssociation</b>(<i>assoc</i>) |
172 <p> |
172 <p> |
173 Method to remove an association to this widget. |
173 Method to remove an association to this widget. |
174 </p><dl> |
174 </p><dl> |
175 <dt><i>assoc</i></dt> |
175 <dt><i>assoc</i></dt> |
176 <dd> |
176 <dd> |
177 association to be removed (AssociationWidget) |
177 association to be removed (AssociationWidget) |
178 </dd> |
178 </dd> |
179 </dl><a NAME="UMLItem.removeAssociations" ID="UMLItem.removeAssociations"></a> |
179 </dl><a NAME="UMLItem.removeAssociations" ID="UMLItem.removeAssociations"></a> |
180 <h4>UMLItem.removeAssociations</h4> |
180 <h4>UMLItem.removeAssociations</h4> |
181 <b>removeAssociations</b>(<i></i>) |
181 <b>removeAssociations</b>(<i></i>) |
182 <p> |
182 <p> |
183 Method to remove all associations of this widget. |
183 Method to remove all associations of this widget. |
184 </p><a NAME="UMLItem.setPos" ID="UMLItem.setPos"></a> |
184 </p><a NAME="UMLItem.setPos" ID="UMLItem.setPos"></a> |
185 <h4>UMLItem.setPos</h4> |
185 <h4>UMLItem.setPos</h4> |
186 <b>setPos</b>(<i>x, y</i>) |
186 <b>setPos</b>(<i>x, y</i>) |
187 <p> |
187 <p> |
188 Overriden method to set the items position. |
188 Overriden method to set the items position. |
189 </p><dl> |
189 </p><dl> |
190 <dt><i>x</i></dt> |
190 <dt><i>x</i></dt> |
191 <dd> |
191 <dd> |
192 absolute x-position (float) |
192 absolute x-position (float) |
193 </dd><dt><i>y</i></dt> |
193 </dd><dt><i>y</i></dt> |
194 <dd> |
194 <dd> |
195 absolute y-position (float) |
195 absolute y-position (float) |
196 </dd> |
196 </dd> |
197 </dl><a NAME="UMLItem.setSize" ID="UMLItem.setSize"></a> |
197 </dl><a NAME="UMLItem.setSize" ID="UMLItem.setSize"></a> |
198 <h4>UMLItem.setSize</h4> |
198 <h4>UMLItem.setSize</h4> |
199 <b>setSize</b>(<i>width, height</i>) |
199 <b>setSize</b>(<i>width, height</i>) |
200 <p> |
200 <p> |
201 Public method to set the rectangles size. |
201 Public method to set the rectangles size. |
202 </p><dl> |
202 </p><dl> |
203 <dt><i>width</i></dt> |
203 <dt><i>width</i></dt> |
204 <dd> |
204 <dd> |
205 width of the rectangle (float) |
205 width of the rectangle (float) |
206 </dd><dt><i>height</i></dt> |
206 </dd><dt><i>height</i></dt> |
207 <dd> |
207 <dd> |
208 height of the rectangle (float) |
208 height of the rectangle (float) |
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> |