Graphics/ClassItem.py

Mon, 07 Oct 2013 19:10:11 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 07 Oct 2013 19:10:11 +0200
changeset 2992
dbdf27746da5
parent 2302
f29e9405c851
child 3057
10516539f238
child 3160
209a07d7e401
permissions
-rw-r--r--

Continued to shorten the code lines to max. 79 characters.

0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
2302
f29e9405c851 Updated copyright for 2013.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2039
diff changeset
3 # Copyright (c) 2007 - 2013 Detlev Offenbach <detlev@die-offenbachs.de>
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing an UML like class item.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
1112
8a7d1b9d18db Improved code quality by getting rid of star imports. That way pyflakes can do its job. A few bugs fixed found by flakes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
10 from PyQt4.QtGui import QFont, QGraphicsSimpleTextItem, QStyle
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
2039
fa41ccd7f7bc Added the capability to rebuild a diagram without losing the current item positions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2034
diff changeset
12 from .UMLItem import UMLModel, UMLItem
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13
2034
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
14 import Utilities
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
15
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
16
2039
fa41ccd7f7bc Added the capability to rebuild a diagram without losing the current item positions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2034
diff changeset
17 class ClassModel(UMLModel):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 Class implementing the class model.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 """
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
21 def __init__(self, name, methods=[], attributes=[]):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 @param name the class name (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 @param methods list of method names of the class
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 (list of strings)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 @param attributes list of attribute names of the class
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 (list of strings)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 """
2039
fa41ccd7f7bc Added the capability to rebuild a diagram without losing the current item positions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2034
diff changeset
31 super().__init__(name)
fa41ccd7f7bc Added the capability to rebuild a diagram without losing the current item positions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2034
diff changeset
32
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 self.methods = methods
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 self.attributes = attributes
2039
fa41ccd7f7bc Added the capability to rebuild a diagram without losing the current item positions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2034
diff changeset
35
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 def addMethod(self, method):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 Method to add a method to the class model.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 @param method method name to be added (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 self.methods.append(method)
2039
fa41ccd7f7bc Added the capability to rebuild a diagram without losing the current item positions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2034
diff changeset
43
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 def addAttribute(self, attribute):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 Method to add an attribute to the class model.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 @param attribute attribute name to be added (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 self.attributes.append(attribute)
2039
fa41ccd7f7bc Added the capability to rebuild a diagram without losing the current item positions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2034
diff changeset
51
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52 def getMethods(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54 Method to retrieve the methods of the class.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 @return list of class methods (list of strings)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
57 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58 return self.methods[:]
2039
fa41ccd7f7bc Added the capability to rebuild a diagram without losing the current item positions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2034
diff changeset
59
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
60 def getAttributes(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 Method to retrieve the attributes of the class.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64 @return list of class attributes (list of strings)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 return self.attributes[:]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
68
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69 class ClassItem(UMLItem):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 Class implementing an UML like class item.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 """
2032
704593d042fe Introduced the ItemType class variable for the various UML graphics items.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2030
diff changeset
73 ItemType = "class"
704593d042fe Introduced the ItemType class variable for the various UML graphics items.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2030
diff changeset
74
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
75 def __init__(self, model=None, external=False, x=0, y=0,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
76 rounded=False, noAttrs=False, parent=None, scene=None):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80 @param model class model containing the class data (ClassModel)
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
81 @param external flag indicating a class defined outside our scope
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
82 (boolean)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83 @param x x-coordinate (integer)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 @param y y-coordinate (integer)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85 @keyparam rounded flag indicating a rounded corner (boolean)
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
86 @keyparam noAttrs flag indicating, that no attributes should be shown
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
87 (boolean)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88 @keyparam parent reference to the parent object (QGraphicsItem)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 @keyparam scene reference to the scene object (QGraphicsScene)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 """
2039
fa41ccd7f7bc Added the capability to rebuild a diagram without losing the current item positions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2034
diff changeset
91 UMLItem.__init__(self, model, x, y, rounded, parent)
fa41ccd7f7bc Added the capability to rebuild a diagram without losing the current item positions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2034
diff changeset
92
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93 self.external = external
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 self.noAttrs = noAttrs
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 scene.addItem(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
97
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98 if self.model:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99 self.__createTexts()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 self.__calculateSize()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 def __createTexts(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
104 Private method to create the text items of the class item.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 if self.model is None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 boldFont = QFont(self.font)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110 boldFont.setBold(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112 attrs = self.model.getAttributes()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 meths = self.model.getMethods()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115 x = self.margin + self.rect().x()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
116 y = self.margin + self.rect().y()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
117 self.header = QGraphicsSimpleTextItem(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
118 self.header.setFont(boldFont)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119 self.header.setText(self.model.getName())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 self.header.setPos(x, y)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121 y += self.header.boundingRect().height() + self.margin
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122 if not self.noAttrs and not self.external:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 if attrs:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124 txt = "\n".join(attrs)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 txt = " "
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 self.attrs = QGraphicsSimpleTextItem(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128 self.attrs.setFont(self.font)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 self.attrs.setText(txt)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
130 self.attrs.setPos(x, y)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
131 y += self.attrs.boundingRect().height() + self.margin
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
133 self.attrs = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
134 if meths:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135 txt = "\n".join(meths)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
136 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
137 txt = " "
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
138 self.meths = QGraphicsSimpleTextItem(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
139 self.meths.setFont(self.font)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
140 self.meths.setText(txt)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
141 self.meths.setPos(x, y)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
142
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
143 def __calculateSize(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
144 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
145 Private method to calculate the size of the class item.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
146 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
147 if self.model is None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
148 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
149
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
150 width = self.header.boundingRect().width()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
151 height = self.header.boundingRect().height()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
152 if self.attrs:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
153 width = max(width, self.attrs.boundingRect().width())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
154 height = height + self.attrs.boundingRect().height() + self.margin
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
155 if self.meths:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
156 width = max(width, self.meths.boundingRect().width())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
157 height = height + self.meths.boundingRect().height()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
158 self.setSize(width + 2 * self.margin, height + 2 * self.margin)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
159
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
160 def setModel(self, model):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
161 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
162 Method to set the class model.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
163
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
164 @param model class model containing the class data (ClassModel)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
165 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
166 self.scene().removeItem(self.header)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
167 self.header = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
168 if self.attrs:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
169 self.scene().removeItem(self.attrs)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
170 self.attrs = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
171 if self.meths:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
172 self.scene().removeItem(self.meths)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
173 self.meths = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
174 self.model = model
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
175 self.__createTexts()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
176 self.__calculateSize()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
177
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
178 def paint(self, painter, option, widget=None):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
179 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
180 Public method to paint the item in local coordinates.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
181
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
182 @param painter reference to the painter object (QPainter)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
183 @param option style options (QStyleOptionGraphicsItem)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
184 @param widget optional reference to the widget painted on (QWidget)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
185 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
186 pen = self.pen()
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
187 if (option.state & QStyle.State_Selected) == \
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
188 QStyle.State(QStyle.State_Selected):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
189 pen.setWidth(2)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
190 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
191 pen.setWidth(1)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
192
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
193 painter.setPen(pen)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
194 painter.setBrush(self.brush())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
195 painter.setFont(self.font)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
196
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
197 offsetX = self.rect().x()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
198 offsetY = self.rect().y()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
199 w = self.rect().width()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
200 h = self.rect().height()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
201
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
202 painter.drawRect(offsetX, offsetY, w, h)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
203 y = self.margin + self.header.boundingRect().height()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
204 painter.drawLine(offsetX, offsetY + y, offsetX + w - 1, offsetY + y)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
205 if self.attrs:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
206 y += self.margin + self.attrs.boundingRect().height()
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
207 painter.drawLine(offsetX, offsetY + y,
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
208 offsetX + w - 1, offsetY + y)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
209
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
210 self.adjustAssociations()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
211
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
212 def isExternal(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
213 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
214 Method returning the external state.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
215
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
216 @return external state (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
217 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
218 return self.external
2030
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
219
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
220 def buildItemDataString(self):
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
221 """
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
222 Public method to build a string to persist the specific item data.
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
223
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
224 This string must start with ", " and should be built like
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
225 "attribute=value" with pairs separated by ", ". value must not
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
226 contain ", " or newlines.
2030
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
227
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
228 @return persistence data (string)
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
229 """
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
230 entries = [
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
231 "is_external={0}".format(self.external),
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
232 "no_attributes={0}".format(self.noAttrs),
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
233 "name={0}".format(self.model.getName()),
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
234 ]
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
235 attributes = self.model.getAttributes()
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
236 if attributes:
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
237 entries.append("attributes={0}".format("||".join(attributes)))
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
238 methods = self.model.getMethods()
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
239 if methods:
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
240 entries.append("methods={0}".format("||".join(methods)))
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
241
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
242 return ", " + ", ".join(entries)
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
243
2034
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
244 def parseItemDataString(self, version, data):
2030
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
245 """
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
246 Public method to parse the given persistence data.
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
247
2034
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
248 @param version version of the data (string)
2030
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
249 @param data persisted data to be parsed (string)
2034
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
250 @return flag indicating success (boolean)
2030
db11a2fe9bbc Implemented functions to save the UML graphics to disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
251 """
2034
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
252 parts = data.split(", ")
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
253 if len(parts) < 3:
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
254 return False
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
255
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
256 name = ""
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
257 attributes = []
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
258 methods = []
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
259
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
260 for part in parts:
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
261 key, value = part.split("=", 1)
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
262 if key == "is_external":
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
263 self.external = Utilities.toBool(value.strip())
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
264 elif key == "no_attributes":
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
265 self.noAttrs = Utilities.toBool(value.strip())
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
266 elif key == "name":
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
267 name = value.strip()
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
268 elif key == "attributes":
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
269 attributes = value.strip().split("||")
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
270 elif key == "methods":
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
271 methods = value.strip().split("||")
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
272 else:
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
273 return False
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
274
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
275 self.model = ClassModel(name, methods, attributes)
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
276 self.__createTexts()
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
277 self.__calculateSize()
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
278
8de0fc1f7fef Implemented functions to load UML graphics from disc.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2033
diff changeset
279 return True

eric ide

mercurial