eric6/Graphics/UMLGraphicsView.py

branch
maintenance
changeset 7560
343db73c4842
parent 7362
028bf21bb5a2
parent 7533
88261c96484b
child 7824
096b3ebc1409
--- a/eric6/Graphics/UMLGraphicsView.py	Sun Apr 05 18:17:08 2020 +0200
+++ b/eric6/Graphics/UMLGraphicsView.py	Sat May 02 13:51:07 2020 +0200
@@ -54,9 +54,9 @@
         self.deltaSize = 100.0
         
         self.__zoomWidget = E5ZoomWidget(
-            UI.PixmapCache.getPixmap("zoomOut.png"),
-            UI.PixmapCache.getPixmap("zoomIn.png"),
-            UI.PixmapCache.getPixmap("zoomReset.png"), self)
+            UI.PixmapCache.getPixmap("zoomOut"),
+            UI.PixmapCache.getPixmap("zoomIn"),
+            UI.PixmapCache.getPixmap("zoomReset"), self)
         parent.statusBar().addPermanentWidget(self.__zoomWidget)
         self.__zoomWidget.setMapping(
             E5GraphicsView.ZoomLevels, E5GraphicsView.ZoomLevelDefault)
@@ -77,85 +77,85 @@
         self.alignMapper.mapped[int].connect(self.__alignShapes)
         
         self.deleteShapeAct = QAction(
-            UI.PixmapCache.getIcon("deleteShape.png"),
+            UI.PixmapCache.getIcon("deleteShape"),
             self.tr("Delete shapes"), self)
         self.deleteShapeAct.triggered.connect(self.__deleteShape)
         
         self.incWidthAct = QAction(
-            UI.PixmapCache.getIcon("sceneWidthInc.png"),
+            UI.PixmapCache.getIcon("sceneWidthInc"),
             self.tr("Increase width by {0} points").format(
                 self.deltaSize),
             self)
         self.incWidthAct.triggered.connect(self.__incWidth)
         
         self.incHeightAct = QAction(
-            UI.PixmapCache.getIcon("sceneHeightInc.png"),
+            UI.PixmapCache.getIcon("sceneHeightInc"),
             self.tr("Increase height by {0} points").format(
                 self.deltaSize),
             self)
         self.incHeightAct.triggered.connect(self.__incHeight)
         
         self.decWidthAct = QAction(
-            UI.PixmapCache.getIcon("sceneWidthDec.png"),
+            UI.PixmapCache.getIcon("sceneWidthDec"),
             self.tr("Decrease width by {0} points").format(
                 self.deltaSize),
             self)
         self.decWidthAct.triggered.connect(self.__decWidth)
         
         self.decHeightAct = QAction(
-            UI.PixmapCache.getIcon("sceneHeightDec.png"),
+            UI.PixmapCache.getIcon("sceneHeightDec"),
             self.tr("Decrease height by {0} points").format(
                 self.deltaSize),
             self)
         self.decHeightAct.triggered.connect(self.__decHeight)
         
         self.setSizeAct = QAction(
-            UI.PixmapCache.getIcon("sceneSize.png"),
+            UI.PixmapCache.getIcon("sceneSize"),
             self.tr("Set size"), self)
         self.setSizeAct.triggered.connect(self.__setSize)
         
         self.rescanAct = QAction(
-            UI.PixmapCache.getIcon("rescan.png"),
+            UI.PixmapCache.getIcon("rescan"),
             self.tr("Re-Scan"), self)
         self.rescanAct.triggered.connect(self.__rescan)
         
         self.relayoutAct = QAction(
-            UI.PixmapCache.getIcon("relayout.png"),
+            UI.PixmapCache.getIcon("relayout"),
             self.tr("Re-Layout"), self)
         self.relayoutAct.triggered.connect(self.__relayout)
         
         self.alignLeftAct = QAction(
-            UI.PixmapCache.getIcon("shapesAlignLeft.png"),
+            UI.PixmapCache.getIcon("shapesAlignLeft"),
             self.tr("Align Left"), self)
         self.alignMapper.setMapping(self.alignLeftAct, Qt.AlignLeft)
         self.alignLeftAct.triggered.connect(self.alignMapper.map)
         
         self.alignHCenterAct = QAction(
-            UI.PixmapCache.getIcon("shapesAlignHCenter.png"),
+            UI.PixmapCache.getIcon("shapesAlignHCenter"),
             self.tr("Align Center Horizontal"), self)
         self.alignMapper.setMapping(self.alignHCenterAct, Qt.AlignHCenter)
         self.alignHCenterAct.triggered.connect(self.alignMapper.map)
         
         self.alignRightAct = QAction(
-            UI.PixmapCache.getIcon("shapesAlignRight.png"),
+            UI.PixmapCache.getIcon("shapesAlignRight"),
             self.tr("Align Right"), self)
         self.alignMapper.setMapping(self.alignRightAct, Qt.AlignRight)
         self.alignRightAct.triggered.connect(self.alignMapper.map)
         
         self.alignTopAct = QAction(
-            UI.PixmapCache.getIcon("shapesAlignTop.png"),
+            UI.PixmapCache.getIcon("shapesAlignTop"),
             self.tr("Align Top"), self)
         self.alignMapper.setMapping(self.alignTopAct, Qt.AlignTop)
         self.alignTopAct.triggered.connect(self.alignMapper.map)
         
         self.alignVCenterAct = QAction(
-            UI.PixmapCache.getIcon("shapesAlignVCenter.png"),
+            UI.PixmapCache.getIcon("shapesAlignVCenter"),
             self.tr("Align Center Vertical"), self)
         self.alignMapper.setMapping(self.alignVCenterAct, Qt.AlignVCenter)
         self.alignVCenterAct.triggered.connect(self.alignMapper.map)
         
         self.alignBottomAct = QAction(
-            UI.PixmapCache.getIcon("shapesAlignBottom.png"),
+            UI.PixmapCache.getIcon("shapesAlignBottom"),
             self.tr("Align Bottom"), self)
         self.alignMapper.setMapping(self.alignBottomAct, Qt.AlignBottom)
         self.alignBottomAct.triggered.connect(self.alignMapper.map)
@@ -744,11 +744,14 @@
                     y = float(y.split("=", 1)[1].strip())
                     itemType = itemType.split("=", 1)[1].strip()
                     if itemType == ClassItem.ItemType:
-                        itm = ClassItem(x=x, y=y, scene=self.scene())
+                        itm = ClassItem(x=x, y=y, scene=self.scene(),
+                                        colors=self.getDrawingColors())
                     elif itemType == ModuleItem.ItemType:
-                        itm = ModuleItem(x=x, y=y, scene=self.scene())
+                        itm = ModuleItem(x=x, y=y, scene=self.scene(),
+                                         colors=self.getDrawingColors())
                     elif itemType == PackageItem.ItemType:
-                        itm = PackageItem(x=x, y=y, scene=self.scene())
+                        itm = PackageItem(x=x, y=y, scene=self.scene(),
+                                          colors=self.getDrawingColors())
                     itm.setId(itemId)
                     umlItems[itemId] = itm
                     if not itm.parseItemDataString(version, itemData):

eric ide

mercurial