110 |
111 |
111 def __initActions(self): |
112 def __initActions(self): |
112 """ |
113 """ |
113 Private method to define the user interface actions. |
114 Private method to define the user interface actions. |
114 """ |
115 """ |
115 self.openAct = QAction(UI.PixmapCache.getIcon("openUI.png"), |
116 self.openAct = QAction(UI.PixmapCache.getIcon("openUI.png"), |
116 self.trUtf8('&Open File'), self) |
117 self.trUtf8('&Open File'), self) |
117 self.openAct.setShortcut(QKeySequence(self.trUtf8("Ctrl+O", "File|Open"))) |
118 self.openAct.setShortcut(QKeySequence(self.trUtf8("Ctrl+O", "File|Open"))) |
118 self.openAct.setStatusTip(self.trUtf8('Open a UI file for display')) |
119 self.openAct.setStatusTip(self.trUtf8('Open a UI file for display')) |
119 self.openAct.setWhatsThis(self.trUtf8( |
120 self.openAct.setWhatsThis(self.trUtf8( |
120 """<b>Open File</b>""" |
121 """<b>Open File</b>""" |
121 """<p>This opens a new UI file for display.</p>""" |
122 """<p>This opens a new UI file for display.</p>""" |
122 )) |
123 )) |
123 self.openAct.triggered[()].connect(self.__openFile) |
124 self.openAct.triggered[()].connect(self.__openFile) |
124 |
125 |
125 self.printAct = QAction(UI.PixmapCache.getIcon("print.png"), |
126 self.printAct = QAction(UI.PixmapCache.getIcon("print.png"), |
126 self.trUtf8('&Print'), self) |
127 self.trUtf8('&Print'), self) |
127 self.printAct.setShortcut(QKeySequence(self.trUtf8("Ctrl+P", "File|Print"))) |
128 self.printAct.setShortcut(QKeySequence(self.trUtf8("Ctrl+P", "File|Print"))) |
128 self.printAct.setStatusTip(self.trUtf8('Print a screen capture')) |
129 self.printAct.setStatusTip(self.trUtf8('Print a screen capture')) |
129 self.printAct.setWhatsThis(self.trUtf8( |
130 self.printAct.setWhatsThis(self.trUtf8( |
130 """<b>Print</b>""" |
131 """<b>Print</b>""" |
131 """<p>Print a screen capture.</p>""" |
132 """<p>Print a screen capture.</p>""" |
132 )) |
133 )) |
133 self.printAct.triggered[()].connect(self.__printImage) |
134 self.printAct.triggered[()].connect(self.__printImage) |
134 |
135 |
135 self.printPreviewAct = QAction(UI.PixmapCache.getIcon("printPreview.png"), |
136 self.printPreviewAct = QAction(UI.PixmapCache.getIcon("printPreview.png"), |
136 self.trUtf8('Print Preview'), self) |
137 self.trUtf8('Print Preview'), self) |
137 self.printPreviewAct.setStatusTip(self.trUtf8( |
138 self.printPreviewAct.setStatusTip(self.trUtf8( |
138 'Print preview a screen capture')) |
139 'Print preview a screen capture')) |
139 self.printPreviewAct.setWhatsThis(self.trUtf8( |
140 self.printPreviewAct.setWhatsThis(self.trUtf8( |
140 """<b>Print Preview</b>""" |
141 """<b>Print Preview</b>""" |
141 """<p>Print preview a screen capture.</p>""" |
142 """<p>Print preview a screen capture.</p>""" |
142 )) |
143 )) |
143 self.printPreviewAct.triggered[()].connect(self.__printPreviewImage) |
144 self.printPreviewAct.triggered[()].connect(self.__printPreviewImage) |
144 |
145 |
145 self.imageAct = QAction(UI.PixmapCache.getIcon("screenCapture.png"), |
146 self.imageAct = QAction(UI.PixmapCache.getIcon("screenCapture.png"), |
146 self.trUtf8('&Screen Capture'), self) |
147 self.trUtf8('&Screen Capture'), self) |
147 self.imageAct.setShortcut( |
148 self.imageAct.setShortcut( |
148 QKeySequence(self.trUtf8("Ctrl+S", "File|Screen Capture"))) |
149 QKeySequence(self.trUtf8("Ctrl+S", "File|Screen Capture"))) |
149 self.imageAct.setStatusTip(self.trUtf8('Save a screen capture to an image file')) |
150 self.imageAct.setStatusTip(self.trUtf8('Save a screen capture to an image file')) |
150 self.imageAct.setWhatsThis(self.trUtf8( |
151 self.imageAct.setWhatsThis(self.trUtf8( |
151 """<b>Screen Capture</b>""" |
152 """<b>Screen Capture</b>""" |
152 """<p>Save a screen capture to an image file.</p>""" |
153 """<p>Save a screen capture to an image file.</p>""" |
153 )) |
154 )) |
154 self.imageAct.triggered[()].connect(self.__saveImage) |
155 self.imageAct.triggered[()].connect(self.__saveImage) |
155 |
156 |
156 self.exitAct = QAction(UI.PixmapCache.getIcon("exit.png"), |
157 self.exitAct = QAction(UI.PixmapCache.getIcon("exit.png"), |
157 self.trUtf8('&Quit'), self) |
158 self.trUtf8('&Quit'), self) |
158 self.exitAct.setShortcut(QKeySequence(self.trUtf8("Ctrl+Q", "File|Quit"))) |
159 self.exitAct.setShortcut(QKeySequence(self.trUtf8("Ctrl+Q", "File|Quit"))) |
159 self.exitAct.setStatusTip(self.trUtf8('Quit the application')) |
160 self.exitAct.setStatusTip(self.trUtf8('Quit the application')) |
160 self.exitAct.setWhatsThis(self.trUtf8( |
161 self.exitAct.setWhatsThis(self.trUtf8( |
161 """<b>Quit</b>""" |
162 """<b>Quit</b>""" |