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