eric6/Documentation/Source/eric6.Graphics.PackageItem.html

branch
maintenance
changeset 6989
8b8cadf8d7e9
parent 6942
2602857055c5
child 7273
391d6b7b1eff
equal deleted inserted replaced
6938:7926553b7509 6989:8b8cadf8d7e9
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.Graphics.PackageItem</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body><a NAME="top" ID="top"></a>
22 <h1>eric6.Graphics.PackageItem</h1>
23 <p>
24 Module implementing a package item.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>None</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#PackageItem">PackageItem</a></td>
34 <td>Class implementing a package item.</td>
35 </tr><tr>
36 <td><a href="#PackageModel">PackageModel</a></td>
37 <td>Class implementing the package model.</td>
38 </tr>
39 </table>
40 <h3>Functions</h3>
41 <table>
42 <tr><td>None</td></tr>
43 </table>
44 <hr /><hr />
45 <a NAME="PackageItem" ID="PackageItem"></a>
46 <h2>PackageItem</h2>
47 <p>
48 Class implementing a package item.
49 </p>
50 <h3>Derived from</h3>
51 UMLItem
52 <h3>Class Attributes</h3>
53 <table>
54 <tr><td>ItemType</td></tr>
55 </table>
56 <h3>Class Methods</h3>
57 <table>
58 <tr><td>None</td></tr>
59 </table>
60 <h3>Methods</h3>
61 <table>
62 <tr>
63 <td><a href="#PackageItem.__init__">PackageItem</a></td>
64 <td>Constructor</td>
65 </tr><tr>
66 <td><a href="#PackageItem.__calculateSize">__calculateSize</a></td>
67 <td>Private method to calculate the size of the package widget.</td>
68 </tr><tr>
69 <td><a href="#PackageItem.__createTexts">__createTexts</a></td>
70 <td>Private method to create the text items of the class item.</td>
71 </tr><tr>
72 <td><a href="#PackageItem.buildItemDataString">buildItemDataString</a></td>
73 <td>Public method to build a string to persist the specific item data.</td>
74 </tr><tr>
75 <td><a href="#PackageItem.paint">paint</a></td>
76 <td>Public method to paint the item in local coordinates.</td>
77 </tr><tr>
78 <td><a href="#PackageItem.parseItemDataString">parseItemDataString</a></td>
79 <td>Public method to parse the given persistence data.</td>
80 </tr><tr>
81 <td><a href="#PackageItem.setModel">setModel</a></td>
82 <td>Public method to set the package model.</td>
83 </tr>
84 </table>
85 <h3>Static Methods</h3>
86 <table>
87 <tr><td>None</td></tr>
88 </table>
89 <a NAME="PackageItem.__init__" ID="PackageItem.__init__"></a>
90 <h4>PackageItem (Constructor)</h4>
91 <b>PackageItem</b>(<i>model=None, x=0, y=0, rounded=False, noModules=False, parent=None, scene=None</i>)
92 <p>
93 Constructor
94 </p><dl>
95 <dt><i>model</i></dt>
96 <dd>
97 package model containing the package data (PackageModel)
98 </dd><dt><i>x</i></dt>
99 <dd>
100 x-coordinate (integer)
101 </dd><dt><i>y</i></dt>
102 <dd>
103 y-coordinate (integer)
104 </dd><dt><i>rounded</i></dt>
105 <dd>
106 flag indicating a rounded corner (boolean)
107 </dd><dt><i>noModules=</i></dt>
108 <dd>
109 flag indicating, that no module names should be
110 shown (boolean)
111 </dd><dt><i>parent=</i></dt>
112 <dd>
113 reference to the parent object (QGraphicsItem)
114 </dd><dt><i>scene=</i></dt>
115 <dd>
116 reference to the scene object (QGraphicsScene)
117 </dd>
118 </dl><a NAME="PackageItem.__calculateSize" ID="PackageItem.__calculateSize"></a>
119 <h4>PackageItem.__calculateSize</h4>
120 <b>__calculateSize</b>(<i></i>)
121 <p>
122 Private method to calculate the size of the package widget.
123 </p><a NAME="PackageItem.__createTexts" ID="PackageItem.__createTexts"></a>
124 <h4>PackageItem.__createTexts</h4>
125 <b>__createTexts</b>(<i></i>)
126 <p>
127 Private method to create the text items of the class item.
128 </p><a NAME="PackageItem.buildItemDataString" ID="PackageItem.buildItemDataString"></a>
129 <h4>PackageItem.buildItemDataString</h4>
130 <b>buildItemDataString</b>(<i></i>)
131 <p>
132 Public method to build a string to persist the specific item data.
133 </p><p>
134 This string must start with ", " and should be built like
135 "attribute=value" with pairs separated by ", ". value must not
136 contain ", " or newlines.
137 </p><dl>
138 <dt>Returns:</dt>
139 <dd>
140 persistence data (string)
141 </dd>
142 </dl><a NAME="PackageItem.paint" ID="PackageItem.paint"></a>
143 <h4>PackageItem.paint</h4>
144 <b>paint</b>(<i>painter, option, widget=None</i>)
145 <p>
146 Public method to paint the item in local coordinates.
147 </p><dl>
148 <dt><i>painter</i></dt>
149 <dd>
150 reference to the painter object (QPainter)
151 </dd><dt><i>option</i></dt>
152 <dd>
153 style options (QStyleOptionGraphicsItem)
154 </dd><dt><i>widget</i></dt>
155 <dd>
156 optional reference to the widget painted on (QWidget)
157 </dd>
158 </dl><a NAME="PackageItem.parseItemDataString" ID="PackageItem.parseItemDataString"></a>
159 <h4>PackageItem.parseItemDataString</h4>
160 <b>parseItemDataString</b>(<i>version, data</i>)
161 <p>
162 Public method to parse the given persistence data.
163 </p><dl>
164 <dt><i>version</i></dt>
165 <dd>
166 version of the data (string)
167 </dd><dt><i>data</i></dt>
168 <dd>
169 persisted data to be parsed (string)
170 </dd>
171 </dl><dl>
172 <dt>Returns:</dt>
173 <dd>
174 flag indicating success (boolean)
175 </dd>
176 </dl><a NAME="PackageItem.setModel" ID="PackageItem.setModel"></a>
177 <h4>PackageItem.setModel</h4>
178 <b>setModel</b>(<i>model</i>)
179 <p>
180 Public method to set the package model.
181 </p><dl>
182 <dt><i>model</i></dt>
183 <dd>
184 package model containing the package data (PackageModel)
185 </dd>
186 </dl>
187 <div align="right"><a href="#top">Up</a></div>
188 <hr /><hr />
189 <a NAME="PackageModel" ID="PackageModel"></a>
190 <h2>PackageModel</h2>
191 <p>
192 Class implementing the package model.
193 </p>
194 <h3>Derived from</h3>
195 UMLModel
196 <h3>Class Attributes</h3>
197 <table>
198 <tr><td>None</td></tr>
199 </table>
200 <h3>Class Methods</h3>
201 <table>
202 <tr><td>None</td></tr>
203 </table>
204 <h3>Methods</h3>
205 <table>
206 <tr>
207 <td><a href="#PackageModel.__init__">PackageModel</a></td>
208 <td>Constructor</td>
209 </tr><tr>
210 <td><a href="#PackageModel.addModule">addModule</a></td>
211 <td>Public method to add a module to the package model.</td>
212 </tr><tr>
213 <td><a href="#PackageModel.getModules">getModules</a></td>
214 <td>Public method to retrieve the modules of the package.</td>
215 </tr>
216 </table>
217 <h3>Static Methods</h3>
218 <table>
219 <tr><td>None</td></tr>
220 </table>
221 <a NAME="PackageModel.__init__" ID="PackageModel.__init__"></a>
222 <h4>PackageModel (Constructor)</h4>
223 <b>PackageModel</b>(<i>name, moduleslist=None</i>)
224 <p>
225 Constructor
226 </p><dl>
227 <dt><i>name</i></dt>
228 <dd>
229 package name (string)
230 </dd><dt><i>moduleslist</i></dt>
231 <dd>
232 list of module names (list of strings)
233 </dd>
234 </dl><a NAME="PackageModel.addModule" ID="PackageModel.addModule"></a>
235 <h4>PackageModel.addModule</h4>
236 <b>addModule</b>(<i>modulename</i>)
237 <p>
238 Public method to add a module to the package model.
239 </p><dl>
240 <dt><i>modulename</i></dt>
241 <dd>
242 module name to be added (string)
243 </dd>
244 </dl><a NAME="PackageModel.getModules" ID="PackageModel.getModules"></a>
245 <h4>PackageModel.getModules</h4>
246 <b>getModules</b>(<i></i>)
247 <p>
248 Public method to retrieve the modules of the package.
249 </p><dl>
250 <dt>Returns:</dt>
251 <dd>
252 list of module names (list of strings)
253 </dd>
254 </dl>
255 <div align="right"><a href="#top">Up</a></div>
256 <hr />
257 </body></html>

eric ide

mercurial