200 y = self.margin + self.header.boundingRect().height() + latchH |
200 y = self.margin + self.header.boundingRect().height() + latchH |
201 painter.drawLine(offsetX, offsetY + y, offsetX + w - 1, offsetY + y) |
201 painter.drawLine(offsetX, offsetY + y, offsetX + w - 1, offsetY + y) |
202 |
202 |
203 self.adjustAssociations() |
203 self.adjustAssociations() |
204 |
204 |
205 def buildItemDataString(self): |
|
206 """ |
|
207 Public method to build a string to persist the specific item data. |
|
208 |
|
209 This string must start with ", " and should be built like |
|
210 "attribute=value" with pairs separated by ", ". value must not |
|
211 contain ", " or newlines. |
|
212 |
|
213 @return persistence data |
|
214 @rtype str |
|
215 """ |
|
216 entries = [ |
|
217 "no_modules={0}".format(self.noModules), |
|
218 "name={0}".format(self.model.getName()), |
|
219 ] |
|
220 modules = self.model.getModules() |
|
221 if modules: |
|
222 entries.append("modules={0}".format("||".join(modules))) |
|
223 |
|
224 return ", " + ", ".join(entries) |
|
225 |
|
226 def parseItemDataString(self, version, data): |
205 def parseItemDataString(self, version, data): |
227 """ |
206 """ |
228 Public method to parse the given persistence data. |
207 Public method to parse the given persistence data. |
229 |
208 |
230 @param version version of the data |
209 @param version version of the data |