131 self.openAct.setStatusTip(self.tr('Open a UI file for display')) |
131 self.openAct.setStatusTip(self.tr('Open a UI file for display')) |
132 self.openAct.setWhatsThis(self.tr( |
132 self.openAct.setWhatsThis(self.tr( |
133 """<b>Open File</b>""" |
133 """<b>Open File</b>""" |
134 """<p>This opens a new UI file for display.</p>""" |
134 """<p>This opens a new UI file for display.</p>""" |
135 )) |
135 )) |
136 self.openAct.triggered[()].connect(self.__openFile) |
136 self.openAct.triggered.connect(self.__openFile) |
137 |
137 |
138 self.printAct = QAction( |
138 self.printAct = QAction( |
139 UI.PixmapCache.getIcon("print.png"), |
139 UI.PixmapCache.getIcon("print.png"), |
140 self.tr('&Print'), self) |
140 self.tr('&Print'), self) |
141 self.printAct.setShortcut( |
141 self.printAct.setShortcut( |
143 self.printAct.setStatusTip(self.tr('Print a screen capture')) |
143 self.printAct.setStatusTip(self.tr('Print a screen capture')) |
144 self.printAct.setWhatsThis(self.tr( |
144 self.printAct.setWhatsThis(self.tr( |
145 """<b>Print</b>""" |
145 """<b>Print</b>""" |
146 """<p>Print a screen capture.</p>""" |
146 """<p>Print a screen capture.</p>""" |
147 )) |
147 )) |
148 self.printAct.triggered[()].connect(self.__printImage) |
148 self.printAct.triggered.connect(self.__printImage) |
149 |
149 |
150 self.printPreviewAct = QAction( |
150 self.printPreviewAct = QAction( |
151 UI.PixmapCache.getIcon("printPreview.png"), |
151 UI.PixmapCache.getIcon("printPreview.png"), |
152 self.tr('Print Preview'), self) |
152 self.tr('Print Preview'), self) |
153 self.printPreviewAct.setStatusTip(self.tr( |
153 self.printPreviewAct.setStatusTip(self.tr( |
154 'Print preview a screen capture')) |
154 'Print preview a screen capture')) |
155 self.printPreviewAct.setWhatsThis(self.tr( |
155 self.printPreviewAct.setWhatsThis(self.tr( |
156 """<b>Print Preview</b>""" |
156 """<b>Print Preview</b>""" |
157 """<p>Print preview a screen capture.</p>""" |
157 """<p>Print preview a screen capture.</p>""" |
158 )) |
158 )) |
159 self.printPreviewAct.triggered[()].connect(self.__printPreviewImage) |
159 self.printPreviewAct.triggered.connect(self.__printPreviewImage) |
160 |
160 |
161 self.imageAct = QAction( |
161 self.imageAct = QAction( |
162 UI.PixmapCache.getIcon("screenCapture.png"), |
162 UI.PixmapCache.getIcon("screenCapture.png"), |
163 self.tr('&Screen Capture'), self) |
163 self.tr('&Screen Capture'), self) |
164 self.imageAct.setShortcut( |
164 self.imageAct.setShortcut( |
167 'Save a screen capture to an image file')) |
167 'Save a screen capture to an image file')) |
168 self.imageAct.setWhatsThis(self.tr( |
168 self.imageAct.setWhatsThis(self.tr( |
169 """<b>Screen Capture</b>""" |
169 """<b>Screen Capture</b>""" |
170 """<p>Save a screen capture to an image file.</p>""" |
170 """<p>Save a screen capture to an image file.</p>""" |
171 )) |
171 )) |
172 self.imageAct.triggered[()].connect(self.__saveImage) |
172 self.imageAct.triggered.connect(self.__saveImage) |
173 |
173 |
174 self.exitAct = QAction( |
174 self.exitAct = QAction( |
175 UI.PixmapCache.getIcon("exit.png"), self.tr('&Quit'), self) |
175 UI.PixmapCache.getIcon("exit.png"), self.tr('&Quit'), self) |
176 self.exitAct.setShortcut( |
176 self.exitAct.setShortcut( |
177 QKeySequence(self.tr("Ctrl+Q", "File|Quit"))) |
177 QKeySequence(self.tr("Ctrl+Q", "File|Quit"))) |
178 self.exitAct.setStatusTip(self.tr('Quit the application')) |
178 self.exitAct.setStatusTip(self.tr('Quit the application')) |
179 self.exitAct.setWhatsThis(self.tr( |
179 self.exitAct.setWhatsThis(self.tr( |
180 """<b>Quit</b>""" |
180 """<b>Quit</b>""" |
181 """<p>Quit the application.</p>""" |
181 """<p>Quit the application.</p>""" |
182 )) |
182 )) |
183 self.exitAct.triggered[()].connect(qApp.closeAllWindows) |
183 self.exitAct.triggered.connect(qApp.closeAllWindows) |
184 |
184 |
185 self.copyAct = QAction( |
185 self.copyAct = QAction( |
186 UI.PixmapCache.getIcon("editCopy.png"), self.tr('&Copy'), self) |
186 UI.PixmapCache.getIcon("editCopy.png"), self.tr('&Copy'), self) |
187 self.copyAct.setShortcut( |
187 self.copyAct.setShortcut( |
188 QKeySequence(self.tr("Ctrl+C", "Edit|Copy"))) |
188 QKeySequence(self.tr("Ctrl+C", "Edit|Copy"))) |
190 self.tr('Copy screen capture to clipboard')) |
190 self.tr('Copy screen capture to clipboard')) |
191 self.copyAct.setWhatsThis(self.tr( |
191 self.copyAct.setWhatsThis(self.tr( |
192 """<b>Copy</b>""" |
192 """<b>Copy</b>""" |
193 """<p>Copy screen capture to clipboard.</p>""" |
193 """<p>Copy screen capture to clipboard.</p>""" |
194 )) |
194 )) |
195 self.copyAct.triggered[()].connect(self.__copyImageToClipboard) |
195 self.copyAct.triggered.connect(self.__copyImageToClipboard) |
196 |
196 |
197 self.whatsThisAct = QAction( |
197 self.whatsThisAct = QAction( |
198 UI.PixmapCache.getIcon("whatsThis.png"), |
198 UI.PixmapCache.getIcon("whatsThis.png"), |
199 self.tr('&What\'s This?'), self) |
199 self.tr('&What\'s This?'), self) |
200 self.whatsThisAct.setShortcut(QKeySequence(self.tr("Shift+F1"))) |
200 self.whatsThisAct.setShortcut(QKeySequence(self.tr("Shift+F1"))) |
205 """ with a question mark, and you can click on the interface""" |
205 """ with a question mark, and you can click on the interface""" |
206 """ elements to get a short description of what they do and""" |
206 """ elements to get a short description of what they do and""" |
207 """ how to use them. In dialogs, this feature can be accessed""" |
207 """ how to use them. In dialogs, this feature can be accessed""" |
208 """ using the context help button in the titlebar.</p>""" |
208 """ using the context help button in the titlebar.</p>""" |
209 )) |
209 )) |
210 self.whatsThisAct.triggered[()].connect(self.__whatsThis) |
210 self.whatsThisAct.triggered.connect(self.__whatsThis) |
211 |
211 |
212 self.aboutAct = QAction(self.tr('&About'), self) |
212 self.aboutAct = QAction(self.tr('&About'), self) |
213 self.aboutAct.setStatusTip(self.tr( |
213 self.aboutAct.setStatusTip(self.tr( |
214 'Display information about this software')) |
214 'Display information about this software')) |
215 self.aboutAct.setWhatsThis(self.tr( |
215 self.aboutAct.setWhatsThis(self.tr( |
216 """<b>About</b>""" |
216 """<b>About</b>""" |
217 """<p>Display some information about this software.</p>""" |
217 """<p>Display some information about this software.</p>""" |
218 )) |
218 )) |
219 self.aboutAct.triggered[()].connect(self.__about) |
219 self.aboutAct.triggered.connect(self.__about) |
220 |
220 |
221 self.aboutQtAct = QAction(self.tr('About &Qt'), self) |
221 self.aboutQtAct = QAction(self.tr('About &Qt'), self) |
222 self.aboutQtAct.setStatusTip( |
222 self.aboutQtAct.setStatusTip( |
223 self.tr('Display information about the Qt toolkit')) |
223 self.tr('Display information about the Qt toolkit')) |
224 self.aboutQtAct.setWhatsThis(self.tr( |
224 self.aboutQtAct.setWhatsThis(self.tr( |
225 """<b>About Qt</b>""" |
225 """<b>About Qt</b>""" |
226 """<p>Display some information about the Qt toolkit.</p>""" |
226 """<p>Display some information about the Qt toolkit.</p>""" |
227 )) |
227 )) |
228 self.aboutQtAct.triggered[()].connect(self.__aboutQt) |
228 self.aboutQtAct.triggered.connect(self.__aboutQt) |
229 |
229 |
230 def __initMenus(self): |
230 def __initMenus(self): |
231 """ |
231 """ |
232 Private method to create the menus. |
232 Private method to create the menus. |
233 """ |
233 """ |