160 self.openUIAct = QAction( |
160 self.openUIAct = QAction( |
161 UI.PixmapCache.getIcon("openUI.png"), |
161 UI.PixmapCache.getIcon("openUI.png"), |
162 self.trUtf8('&Open UI Files...'), self) |
162 self.trUtf8('&Open UI Files...'), self) |
163 self.openUIAct.setStatusTip(self.trUtf8('Open UI files for display')) |
163 self.openUIAct.setStatusTip(self.trUtf8('Open UI files for display')) |
164 self.openUIAct.setWhatsThis(self.trUtf8( |
164 self.openUIAct.setWhatsThis(self.trUtf8( |
165 """<b>Open UI Files</b>""" |
165 """<b>Open UI Files</b>""" |
166 """<p>This opens some UI files for display.</p>""" |
166 """<p>This opens some UI files for display.</p>""" |
167 )) |
167 )) |
168 self.openUIAct.triggered[()].connect(self.__openWidget) |
168 self.openUIAct.triggered[()].connect(self.__openWidget) |
169 |
169 |
170 self.openQMAct = QAction( |
170 self.openQMAct = QAction( |
171 UI.PixmapCache.getIcon("openQM.png"), |
171 UI.PixmapCache.getIcon("openQM.png"), |
172 self.trUtf8('Open &Translation Files...'), self) |
172 self.trUtf8('Open &Translation Files...'), self) |
173 self.openQMAct.setStatusTip(self.trUtf8( |
173 self.openQMAct.setStatusTip(self.trUtf8( |
174 'Open Translation files for display')) |
174 'Open Translation files for display')) |
175 self.openQMAct.setWhatsThis(self.trUtf8( |
175 self.openQMAct.setWhatsThis(self.trUtf8( |
176 """<b>Open Translation Files</b>""" |
176 """<b>Open Translation Files</b>""" |
177 """<p>This opens some translation files for display.</p>""" |
177 """<p>This opens some translation files for display.</p>""" |
178 )) |
178 )) |
179 self.openQMAct.triggered[()].connect(self.__openTranslation) |
179 self.openQMAct.triggered[()].connect(self.__openTranslation) |
180 |
180 |
181 self.reloadAct = QAction( |
181 self.reloadAct = QAction( |
182 UI.PixmapCache.getIcon("reload.png"), |
182 UI.PixmapCache.getIcon("reload.png"), |
194 UI.PixmapCache.getIcon("exit.png"), self.trUtf8('&Quit'), self) |
194 UI.PixmapCache.getIcon("exit.png"), self.trUtf8('&Quit'), self) |
195 self.exitAct.setShortcut(QKeySequence( |
195 self.exitAct.setShortcut(QKeySequence( |
196 self.trUtf8("Ctrl+Q", "File|Quit"))) |
196 self.trUtf8("Ctrl+Q", "File|Quit"))) |
197 self.exitAct.setStatusTip(self.trUtf8('Quit the application')) |
197 self.exitAct.setStatusTip(self.trUtf8('Quit the application')) |
198 self.exitAct.setWhatsThis(self.trUtf8( |
198 self.exitAct.setWhatsThis(self.trUtf8( |
199 """<b>Quit</b>""" |
199 """<b>Quit</b>""" |
200 """<p>Quit the application.</p>""" |
200 """<p>Quit the application.</p>""" |
201 )) |
201 )) |
202 self.exitAct.triggered[()].connect(qApp.closeAllWindows) |
202 self.exitAct.triggered[()].connect(qApp.closeAllWindows) |
203 |
203 |
204 self.whatsThisAct = QAction( |
204 self.whatsThisAct = QAction( |
205 UI.PixmapCache.getIcon("whatsThis.png"), |
205 UI.PixmapCache.getIcon("whatsThis.png"), |
218 |
218 |
219 self.aboutAct = QAction(self.trUtf8('&About'), self) |
219 self.aboutAct = QAction(self.trUtf8('&About'), self) |
220 self.aboutAct.setStatusTip(self.trUtf8( |
220 self.aboutAct.setStatusTip(self.trUtf8( |
221 'Display information about this software')) |
221 'Display information about this software')) |
222 self.aboutAct.setWhatsThis(self.trUtf8( |
222 self.aboutAct.setWhatsThis(self.trUtf8( |
223 """<b>About</b>""" |
223 """<b>About</b>""" |
224 """<p>Display some information about this software.</p>""" |
224 """<p>Display some information about this software.</p>""" |
225 )) |
225 )) |
226 self.aboutAct.triggered[()].connect(self.__about) |
226 self.aboutAct.triggered[()].connect(self.__about) |
227 |
227 |
228 self.aboutQtAct = QAction(self.trUtf8('About &Qt'), self) |
228 self.aboutQtAct = QAction(self.trUtf8('About &Qt'), self) |
229 self.aboutQtAct.setStatusTip( |
229 self.aboutQtAct.setStatusTip( |
230 self.trUtf8('Display information about the Qt toolkit')) |
230 self.trUtf8('Display information about the Qt toolkit')) |
231 self.aboutQtAct.setWhatsThis(self.trUtf8( |
231 self.aboutQtAct.setWhatsThis(self.trUtf8( |
232 """<b>About Qt</b>""" |
232 """<b>About Qt</b>""" |
233 """<p>Display some information about the Qt toolkit.</p>""" |
233 """<p>Display some information about the Qt toolkit.</p>""" |
234 )) |
234 )) |
235 self.aboutQtAct.triggered[()].connect(self.__aboutQt) |
235 self.aboutQtAct.triggered[()].connect(self.__aboutQt) |
236 |
236 |
237 self.tileAct = QAction(self.trUtf8('&Tile'), self) |
237 self.tileAct = QAction(self.trUtf8('&Tile'), self) |
238 self.tileAct.setStatusTip(self.trUtf8('Tile the windows')) |
238 self.tileAct.setStatusTip(self.trUtf8('Tile the windows')) |
256 UI.PixmapCache.getIcon("close.png"), self.trUtf8('&Close'), self) |
256 UI.PixmapCache.getIcon("close.png"), self.trUtf8('&Close'), self) |
257 self.closeAct.setShortcut(QKeySequence(self.trUtf8( |
257 self.closeAct.setShortcut(QKeySequence(self.trUtf8( |
258 "Ctrl+W", "File|Close"))) |
258 "Ctrl+W", "File|Close"))) |
259 self.closeAct.setStatusTip(self.trUtf8('Close the current window')) |
259 self.closeAct.setStatusTip(self.trUtf8('Close the current window')) |
260 self.closeAct.setWhatsThis(self.trUtf8( |
260 self.closeAct.setWhatsThis(self.trUtf8( |
261 """<b>Close Window</b>""" |
261 """<b>Close Window</b>""" |
262 """<p>Close the current window.</p>""" |
262 """<p>Close the current window.</p>""" |
263 )) |
263 )) |
264 self.closeAct.triggered[()].connect(self.preview.closeWidget) |
264 self.closeAct.triggered[()].connect(self.preview.closeWidget) |
265 |
265 |
266 self.closeAllAct = QAction(self.trUtf8('Clos&e All'), self) |
266 self.closeAllAct = QAction(self.trUtf8('Clos&e All'), self) |
267 self.closeAllAct.setStatusTip(self.trUtf8('Close all windows')) |
267 self.closeAllAct.setStatusTip(self.trUtf8('Close all windows')) |
268 self.closeAllAct.setWhatsThis(self.trUtf8( |
268 self.closeAllAct.setWhatsThis(self.trUtf8( |
269 """<b>Close All Windows</b>""" |
269 """<b>Close All Windows</b>""" |
270 """<p>Close all windows.</p>""" |
270 """<p>Close all windows.</p>""" |
271 )) |
271 )) |
272 self.closeAllAct.triggered[()].connect(self.preview.closeAllWidgets) |
272 self.closeAllAct.triggered[()].connect(self.preview.closeAllWidgets) |
273 |
273 |
274 def __initMenus(self): |
274 def __initMenus(self): |
275 """ |
275 """ |
509 if trans is None: |
509 if trans is None: |
510 E5MessageBox.warning( |
510 E5MessageBox.warning( |
511 self.parent(), |
511 self.parent(), |
512 self.trUtf8("Set Translator"), |
512 self.trUtf8("Set Translator"), |
513 self.trUtf8( |
513 self.trUtf8( |
514 """<p>The translator <b>{0}</b> is not known.</p>""")\ |
514 """<p>The translator <b>{0}</b> is not known.</p>""") |
515 .format(name)) |
515 .format(name)) |
516 return |
516 return |
517 |
517 |
518 nTranslator = trans.translator |
518 nTranslator = trans.translator |
519 |
519 |
520 if nTranslator == self.currentTranslator: |
520 if nTranslator == self.currentTranslator: |
726 if not self.__widget: |
726 if not self.__widget: |
727 E5MessageBox.warning( |
727 E5MessageBox.warning( |
728 self, |
728 self, |
729 self.trUtf8("Load UI File"), |
729 self.trUtf8("Load UI File"), |
730 self.trUtf8( |
730 self.trUtf8( |
731 """<p>The file <b>{0}</b> could not be loaded.</p>""")\ |
731 """<p>The file <b>{0}</b> could not be loaded.</p>""") |
732 .format(self.__uiFileName)) |
732 .format(self.__uiFileName)) |
733 self.__valid = False |
733 self.__valid = False |
734 return |
734 return |
735 |
735 |
736 self.__widget.setParent(self) |
736 self.__widget.setParent(self) |
737 self.__layout.addWidget(self.__widget) |
737 self.__layout.addWidget(self.__widget) |
782 if not name: |
782 if not name: |
783 E5MessageBox.warning( |
783 E5MessageBox.warning( |
784 self, |
784 self, |
785 self.trUtf8("Load UI File"), |
785 self.trUtf8("Load UI File"), |
786 self.trUtf8( |
786 self.trUtf8( |
787 """<p>The file <b>{0}</b> could not be loaded.</p>""")\ |
787 """<p>The file <b>{0}</b> could not be loaded.</p>""") |
788 .format(uiFileName)) |
788 .format(uiFileName)) |
789 return |
789 return |
790 |
790 |
791 uname = name |
791 uname = name |
792 cnt = 1 |
792 cnt = 1 |
793 while self.findChild(WidgetView, uname) is not None: |
793 while self.findChild(WidgetView, uname) is not None: |