Graphics/UMLGraphicsView.py

changeset 456
d766de2ccbc7
parent 455
9a7e0b7b801e
parent 454
d28d558f7484
child 457
608a9c14f4c9
equal deleted inserted replaced
455:9a7e0b7b801e 456:d766de2ccbc7
58 self.alignMapper.mapped[int].connect(self.__alignShapes) 58 self.alignMapper.mapped[int].connect(self.__alignShapes)
59 59
60 self.deleteShapeAct = \ 60 self.deleteShapeAct = \
61 QAction(UI.PixmapCache.getIcon("deleteShape.png"), 61 QAction(UI.PixmapCache.getIcon("deleteShape.png"),
62 self.trUtf8("Delete shapes"), self) 62 self.trUtf8("Delete shapes"), self)
63 self.deleteShapeAct.triggered.connect(self.__deleteShape) 63 self.deleteShapeAct.triggered[()].connect(self.__deleteShape)
64 64
65 self.saveAct = \ 65 self.saveAct = \
66 QAction(UI.PixmapCache.getIcon("fileSave.png"), 66 QAction(UI.PixmapCache.getIcon("fileSave.png"),
67 self.trUtf8("Save as PNG"), self) 67 self.trUtf8("Save as PNG"), self)
68 self.saveAct.triggered.connect(self.__saveImage) 68 self.saveAct.triggered[()].connect(self.__saveImage)
69 69
70 self.printAct = \ 70 self.printAct = \
71 QAction(UI.PixmapCache.getIcon("print.png"), 71 QAction(UI.PixmapCache.getIcon("print.png"),
72 self.trUtf8("Print"), self) 72 self.trUtf8("Print"), self)
73 self.printAct.triggered.connect(self.__printDiagram) 73 self.printAct.triggered[()].connect(self.__printDiagram)
74 74
75 self.printPreviewAct = \ 75 self.printPreviewAct = \
76 QAction(UI.PixmapCache.getIcon("printPreview.png"), 76 QAction(UI.PixmapCache.getIcon("printPreview.png"),
77 self.trUtf8("Print Preview"), self) 77 self.trUtf8("Print Preview"), self)
78 self.printPreviewAct.triggered.connect(self.__printPreviewDiagram) 78 self.printPreviewAct.triggered[()].connect(self.__printPreviewDiagram)
79 79
80 self.zoomInAct = \ 80 self.zoomInAct = \
81 QAction(UI.PixmapCache.getIcon("zoomIn.png"), 81 QAction(UI.PixmapCache.getIcon("zoomIn.png"),
82 self.trUtf8("Zoom in"), self) 82 self.trUtf8("Zoom in"), self)
83 self.zoomInAct.triggered.connect(self.zoomIn) 83 self.zoomInAct.triggered[()].connect(self.zoomIn)
84 84
85 self.zoomOutAct = \ 85 self.zoomOutAct = \
86 QAction(UI.PixmapCache.getIcon("zoomOut.png"), 86 QAction(UI.PixmapCache.getIcon("zoomOut.png"),
87 self.trUtf8("Zoom out"), self) 87 self.trUtf8("Zoom out"), self)
88 self.zoomOutAct.triggered.connect(self.zoomOut) 88 self.zoomOutAct.triggered[()].connect(self.zoomOut)
89 89
90 self.zoomAct = \ 90 self.zoomAct = \
91 QAction(UI.PixmapCache.getIcon("zoomTo.png"), 91 QAction(UI.PixmapCache.getIcon("zoomTo.png"),
92 self.trUtf8("Zoom..."), self) 92 self.trUtf8("Zoom..."), self)
93 self.zoomAct.triggered.connect(self.__zoom) 93 self.zoomAct.triggered[()].connect(self.__zoom)
94 94
95 self.zoomResetAct = \ 95 self.zoomResetAct = \
96 QAction(UI.PixmapCache.getIcon("zoomReset.png"), 96 QAction(UI.PixmapCache.getIcon("zoomReset.png"),
97 self.trUtf8("Zoom reset"), self) 97 self.trUtf8("Zoom reset"), self)
98 self.zoomResetAct.triggered.connect(self.zoomReset) 98 self.zoomResetAct.triggered[()].connect(self.zoomReset)
99 99
100 self.incWidthAct = \ 100 self.incWidthAct = \
101 QAction(UI.PixmapCache.getIcon("sceneWidthInc.png"), 101 QAction(UI.PixmapCache.getIcon("sceneWidthInc.png"),
102 self.trUtf8("Increase width by {0} points").format(self.deltaSize), 102 self.trUtf8("Increase width by {0} points").format(self.deltaSize),
103 self) 103 self)
104 self.incWidthAct.triggered.connect(self.__incWidth) 104 self.incWidthAct.triggered[()].connect(self.__incWidth)
105 105
106 self.incHeightAct = \ 106 self.incHeightAct = \
107 QAction(UI.PixmapCache.getIcon("sceneHeightInc.png"), 107 QAction(UI.PixmapCache.getIcon("sceneHeightInc.png"),
108 self.trUtf8("Increase height by {0} points").format(self.deltaSize), 108 self.trUtf8("Increase height by {0} points").format(self.deltaSize),
109 self) 109 self)
110 self.incHeightAct.triggered.connect(self.__incHeight) 110 self.incHeightAct.triggered[()].connect(self.__incHeight)
111 111
112 self.decWidthAct = \ 112 self.decWidthAct = \
113 QAction(UI.PixmapCache.getIcon("sceneWidthDec.png"), 113 QAction(UI.PixmapCache.getIcon("sceneWidthDec.png"),
114 self.trUtf8("Decrease width by {0} points").format(self.deltaSize), 114 self.trUtf8("Decrease width by {0} points").format(self.deltaSize),
115 self) 115 self)
116 self.decWidthAct.triggered.connect(self.__decWidth) 116 self.decWidthAct.triggered[()].connect(self.__decWidth)
117 117
118 self.decHeightAct = \ 118 self.decHeightAct = \
119 QAction(UI.PixmapCache.getIcon("sceneHeightDec.png"), 119 QAction(UI.PixmapCache.getIcon("sceneHeightDec.png"),
120 self.trUtf8("Decrease height by {0} points").format(self.deltaSize), 120 self.trUtf8("Decrease height by {0} points").format(self.deltaSize),
121 self) 121 self)
122 self.decHeightAct.triggered.connect(self.__decHeight) 122 self.decHeightAct.triggered[()].connect(self.__decHeight)
123 123
124 self.setSizeAct = \ 124 self.setSizeAct = \
125 QAction(UI.PixmapCache.getIcon("sceneSize.png"), 125 QAction(UI.PixmapCache.getIcon("sceneSize.png"),
126 self.trUtf8("Set size"), self) 126 self.trUtf8("Set size"), self)
127 self.setSizeAct.triggered.connect(self.__setSize) 127 self.setSizeAct.triggered[()].connect(self.__setSize)
128 128
129 self.relayoutAct = \ 129 self.relayoutAct = \
130 QAction(UI.PixmapCache.getIcon("reload.png"), 130 QAction(UI.PixmapCache.getIcon("reload.png"),
131 self.trUtf8("Re-Layout"), self) 131 self.trUtf8("Re-Layout"), self)
132 self.relayoutAct.triggered.connect(self.__relayout) 132 self.relayoutAct.triggered[()].connect(self.__relayout)
133 133
134 self.alignLeftAct = \ 134 self.alignLeftAct = \
135 QAction(UI.PixmapCache.getIcon("shapesAlignLeft"), 135 QAction(UI.PixmapCache.getIcon("shapesAlignLeft"),
136 self.trUtf8("Align Left"), self) 136 self.trUtf8("Align Left"), self)
137 self.alignMapper.setMapping(self.alignLeftAct, Qt.AlignLeft) 137 self.alignMapper.setMapping(self.alignLeftAct, Qt.AlignLeft)

eric ide

mercurial