155 |
155 |
156 def __initActions(self): |
156 def __initActions(self): |
157 """ |
157 """ |
158 Private method to define the user interface actions. |
158 Private method to define the user interface actions. |
159 """ |
159 """ |
160 self.openUIAct = QAction(UI.PixmapCache.getIcon("openUI.png"), |
160 self.openUIAct = QAction( |
161 self.trUtf8('&Open UI Files...'), self) |
161 UI.PixmapCache.getIcon("openUI.png"), |
|
162 self.trUtf8('&Open UI Files...'), self) |
162 self.openUIAct.setStatusTip(self.trUtf8('Open UI files for display')) |
163 self.openUIAct.setStatusTip(self.trUtf8('Open UI files for display')) |
163 self.openUIAct.setWhatsThis(self.trUtf8( |
164 self.openUIAct.setWhatsThis(self.trUtf8( |
164 """<b>Open UI Files</b>""" |
165 """<b>Open UI Files</b>""" |
165 """<p>This opens some UI files for display.</p>""" |
166 """<p>This opens some UI files for display.</p>""" |
166 )) |
167 )) |
167 self.openUIAct.triggered[()].connect(self.__openWidget) |
168 self.openUIAct.triggered[()].connect(self.__openWidget) |
168 |
169 |
169 self.openQMAct = QAction(UI.PixmapCache.getIcon("openQM.png"), |
170 self.openQMAct = QAction( |
170 self.trUtf8('Open &Translation Files...'), self) |
171 UI.PixmapCache.getIcon("openQM.png"), |
|
172 self.trUtf8('Open &Translation Files...'), self) |
171 self.openQMAct.setStatusTip(self.trUtf8( |
173 self.openQMAct.setStatusTip(self.trUtf8( |
172 'Open Translation files for display')) |
174 'Open Translation files for display')) |
173 self.openQMAct.setWhatsThis(self.trUtf8( |
175 self.openQMAct.setWhatsThis(self.trUtf8( |
174 """<b>Open Translation Files</b>""" |
176 """<b>Open Translation Files</b>""" |
175 """<p>This opens some translation files for display.</p>""" |
177 """<p>This opens some translation files for display.</p>""" |
176 )) |
178 )) |
177 self.openQMAct.triggered[()].connect(self.__openTranslation) |
179 self.openQMAct.triggered[()].connect(self.__openTranslation) |
178 |
180 |
179 self.reloadAct = QAction(UI.PixmapCache.getIcon("reload.png"), |
181 self.reloadAct = QAction( |
180 self.trUtf8('&Reload Translations'), self) |
182 UI.PixmapCache.getIcon("reload.png"), |
|
183 self.trUtf8('&Reload Translations'), self) |
181 self.reloadAct.setStatusTip(self.trUtf8( |
184 self.reloadAct.setStatusTip(self.trUtf8( |
182 'Reload the loaded translations')) |
185 'Reload the loaded translations')) |
183 self.reloadAct.setWhatsThis(self.trUtf8( |
186 self.reloadAct.setWhatsThis(self.trUtf8( |
184 """<b>Reload Translations</b>""" |
187 """<b>Reload Translations</b>""" |
185 """<p>This reloads the translations for the loaded""" |
188 """<p>This reloads the translations for the loaded""" |
186 """ languages.</p>""" |
189 """ languages.</p>""" |
187 )) |
190 )) |
188 self.reloadAct.triggered[()].connect(self.translations.reload) |
191 self.reloadAct.triggered[()].connect(self.translations.reload) |
189 |
192 |
190 self.exitAct = QAction(UI.PixmapCache.getIcon("exit.png"), |
193 self.exitAct = QAction( |
191 self.trUtf8('&Quit'), self) |
194 UI.PixmapCache.getIcon("exit.png"), self.trUtf8('&Quit'), self) |
192 self.exitAct.setShortcut(QKeySequence( |
195 self.exitAct.setShortcut(QKeySequence( |
193 self.trUtf8("Ctrl+Q", "File|Quit"))) |
196 self.trUtf8("Ctrl+Q", "File|Quit"))) |
194 self.exitAct.setStatusTip(self.trUtf8('Quit the application')) |
197 self.exitAct.setStatusTip(self.trUtf8('Quit the application')) |
195 self.exitAct.setWhatsThis(self.trUtf8( |
198 self.exitAct.setWhatsThis(self.trUtf8( |
196 """<b>Quit</b>""" |
199 """<b>Quit</b>""" |
197 """<p>Quit the application.</p>""" |
200 """<p>Quit the application.</p>""" |
198 )) |
201 )) |
199 self.exitAct.triggered[()].connect(qApp.closeAllWindows) |
202 self.exitAct.triggered[()].connect(qApp.closeAllWindows) |
200 |
203 |
201 self.whatsThisAct = QAction(UI.PixmapCache.getIcon("whatsThis.png"), |
204 self.whatsThisAct = QAction( |
202 self.trUtf8('&What\'s This?'), self) |
205 UI.PixmapCache.getIcon("whatsThis.png"), |
|
206 self.trUtf8('&What\'s This?'), self) |
203 self.whatsThisAct.setShortcut(QKeySequence(self.trUtf8("Shift+F1"))) |
207 self.whatsThisAct.setShortcut(QKeySequence(self.trUtf8("Shift+F1"))) |
204 self.whatsThisAct.setStatusTip(self.trUtf8('Context sensitive help')) |
208 self.whatsThisAct.setStatusTip(self.trUtf8('Context sensitive help')) |
205 self.whatsThisAct.setWhatsThis(self.trUtf8( |
209 self.whatsThisAct.setWhatsThis(self.trUtf8( |
206 """<b>Display context sensitive help</b>""" |
210 """<b>Display context sensitive help</b>""" |
207 """<p>In What's This? mode, the mouse cursor shows an arrow""" |
211 """<p>In What's This? mode, the mouse cursor shows an arrow""" |
246 """<p>Rearrange and resize the windows so that they are""" |
250 """<p>Rearrange and resize the windows so that they are""" |
247 """ cascaded.</p>""" |
251 """ cascaded.</p>""" |
248 )) |
252 )) |
249 self.cascadeAct.triggered[()].connect(self.preview.cascadeSubWindows) |
253 self.cascadeAct.triggered[()].connect(self.preview.cascadeSubWindows) |
250 |
254 |
251 self.closeAct = QAction(UI.PixmapCache.getIcon("close.png"), |
255 self.closeAct = QAction( |
252 self.trUtf8('&Close'), self) |
256 UI.PixmapCache.getIcon("close.png"), self.trUtf8('&Close'), self) |
253 self.closeAct.setShortcut(QKeySequence(self.trUtf8( |
257 self.closeAct.setShortcut(QKeySequence(self.trUtf8( |
254 "Ctrl+W", "File|Close"))) |
258 "Ctrl+W", "File|Close"))) |
255 self.closeAct.setStatusTip(self.trUtf8('Close the current window')) |
259 self.closeAct.setStatusTip(self.trUtf8('Close the current window')) |
256 self.closeAct.setWhatsThis(self.trUtf8( |
260 self.closeAct.setWhatsThis(self.trUtf8( |
257 """<b>Close Window</b>""" |
261 """<b>Close Window</b>""" |