Graphics/UMLGraphicsView.py

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

eric ide

mercurial