Tools/TRPreviewer.py

changeset 3345
071afe8be2a1
parent 3201
0f115f6db6cb
child 3484
645c12de6b0c
equal deleted inserted replaced
3343:f7a6d271bb40 3345:071afe8be2a1
160 self.openUIAct.setStatusTip(self.tr('Open UI files for display')) 160 self.openUIAct.setStatusTip(self.tr('Open UI files for display'))
161 self.openUIAct.setWhatsThis(self.tr( 161 self.openUIAct.setWhatsThis(self.tr(
162 """<b>Open UI Files</b>""" 162 """<b>Open UI Files</b>"""
163 """<p>This opens some UI files for display.</p>""" 163 """<p>This opens some UI files for display.</p>"""
164 )) 164 ))
165 self.openUIAct.triggered[()].connect(self.__openWidget) 165 self.openUIAct.triggered.connect(self.__openWidget)
166 166
167 self.openQMAct = QAction( 167 self.openQMAct = QAction(
168 UI.PixmapCache.getIcon("openQM.png"), 168 UI.PixmapCache.getIcon("openQM.png"),
169 self.tr('Open &Translation Files...'), self) 169 self.tr('Open &Translation Files...'), self)
170 self.openQMAct.setStatusTip(self.tr( 170 self.openQMAct.setStatusTip(self.tr(
171 'Open Translation files for display')) 171 'Open Translation files for display'))
172 self.openQMAct.setWhatsThis(self.tr( 172 self.openQMAct.setWhatsThis(self.tr(
173 """<b>Open Translation Files</b>""" 173 """<b>Open Translation Files</b>"""
174 """<p>This opens some translation files for display.</p>""" 174 """<p>This opens some translation files for display.</p>"""
175 )) 175 ))
176 self.openQMAct.triggered[()].connect(self.__openTranslation) 176 self.openQMAct.triggered.connect(self.__openTranslation)
177 177
178 self.reloadAct = QAction( 178 self.reloadAct = QAction(
179 UI.PixmapCache.getIcon("reload.png"), 179 UI.PixmapCache.getIcon("reload.png"),
180 self.tr('&Reload Translations'), self) 180 self.tr('&Reload Translations'), self)
181 self.reloadAct.setStatusTip(self.tr( 181 self.reloadAct.setStatusTip(self.tr(
183 self.reloadAct.setWhatsThis(self.tr( 183 self.reloadAct.setWhatsThis(self.tr(
184 """<b>Reload Translations</b>""" 184 """<b>Reload Translations</b>"""
185 """<p>This reloads the translations for the loaded""" 185 """<p>This reloads the translations for the loaded"""
186 """ languages.</p>""" 186 """ languages.</p>"""
187 )) 187 ))
188 self.reloadAct.triggered[()].connect(self.translations.reload) 188 self.reloadAct.triggered.connect(self.translations.reload)
189 189
190 self.exitAct = QAction( 190 self.exitAct = QAction(
191 UI.PixmapCache.getIcon("exit.png"), self.tr('&Quit'), self) 191 UI.PixmapCache.getIcon("exit.png"), self.tr('&Quit'), self)
192 self.exitAct.setShortcut(QKeySequence( 192 self.exitAct.setShortcut(QKeySequence(
193 self.tr("Ctrl+Q", "File|Quit"))) 193 self.tr("Ctrl+Q", "File|Quit")))
194 self.exitAct.setStatusTip(self.tr('Quit the application')) 194 self.exitAct.setStatusTip(self.tr('Quit the application'))
195 self.exitAct.setWhatsThis(self.tr( 195 self.exitAct.setWhatsThis(self.tr(
196 """<b>Quit</b>""" 196 """<b>Quit</b>"""
197 """<p>Quit the application.</p>""" 197 """<p>Quit the application.</p>"""
198 )) 198 ))
199 self.exitAct.triggered[()].connect(qApp.closeAllWindows) 199 self.exitAct.triggered.connect(qApp.closeAllWindows)
200 200
201 self.whatsThisAct = QAction( 201 self.whatsThisAct = QAction(
202 UI.PixmapCache.getIcon("whatsThis.png"), 202 UI.PixmapCache.getIcon("whatsThis.png"),
203 self.tr('&What\'s This?'), self) 203 self.tr('&What\'s This?'), self)
204 self.whatsThisAct.setShortcut(QKeySequence(self.tr("Shift+F1"))) 204 self.whatsThisAct.setShortcut(QKeySequence(self.tr("Shift+F1")))
209 """ with a question mark, and you can click on the interface""" 209 """ with a question mark, and you can click on the interface"""
210 """ elements to get a short description of what they do and""" 210 """ elements to get a short description of what they do and"""
211 """ how to use them. In dialogs, this feature can be accessed""" 211 """ how to use them. In dialogs, this feature can be accessed"""
212 """ using the context help button in the titlebar.</p>""" 212 """ using the context help button in the titlebar.</p>"""
213 )) 213 ))
214 self.whatsThisAct.triggered[()].connect(self.__whatsThis) 214 self.whatsThisAct.triggered.connect(self.__whatsThis)
215 215
216 self.aboutAct = QAction(self.tr('&About'), self) 216 self.aboutAct = QAction(self.tr('&About'), self)
217 self.aboutAct.setStatusTip(self.tr( 217 self.aboutAct.setStatusTip(self.tr(
218 'Display information about this software')) 218 'Display information about this software'))
219 self.aboutAct.setWhatsThis(self.tr( 219 self.aboutAct.setWhatsThis(self.tr(
220 """<b>About</b>""" 220 """<b>About</b>"""
221 """<p>Display some information about this software.</p>""" 221 """<p>Display some information about this software.</p>"""
222 )) 222 ))
223 self.aboutAct.triggered[()].connect(self.__about) 223 self.aboutAct.triggered.connect(self.__about)
224 224
225 self.aboutQtAct = QAction(self.tr('About &Qt'), self) 225 self.aboutQtAct = QAction(self.tr('About &Qt'), self)
226 self.aboutQtAct.setStatusTip( 226 self.aboutQtAct.setStatusTip(
227 self.tr('Display information about the Qt toolkit')) 227 self.tr('Display information about the Qt toolkit'))
228 self.aboutQtAct.setWhatsThis(self.tr( 228 self.aboutQtAct.setWhatsThis(self.tr(
229 """<b>About Qt</b>""" 229 """<b>About Qt</b>"""
230 """<p>Display some information about the Qt toolkit.</p>""" 230 """<p>Display some information about the Qt toolkit.</p>"""
231 )) 231 ))
232 self.aboutQtAct.triggered[()].connect(self.__aboutQt) 232 self.aboutQtAct.triggered.connect(self.__aboutQt)
233 233
234 self.tileAct = QAction(self.tr('&Tile'), self) 234 self.tileAct = QAction(self.tr('&Tile'), self)
235 self.tileAct.setStatusTip(self.tr('Tile the windows')) 235 self.tileAct.setStatusTip(self.tr('Tile the windows'))
236 self.tileAct.setWhatsThis(self.tr( 236 self.tileAct.setWhatsThis(self.tr(
237 """<b>Tile the windows</b>""" 237 """<b>Tile the windows</b>"""
238 """<p>Rearrange and resize the windows so that they are""" 238 """<p>Rearrange and resize the windows so that they are"""
239 """ tiled.</p>""" 239 """ tiled.</p>"""
240 )) 240 ))
241 self.tileAct.triggered[()].connect(self.preview.tileSubWindows) 241 self.tileAct.triggered.connect(self.preview.tileSubWindows)
242 242
243 self.cascadeAct = QAction(self.tr('&Cascade'), self) 243 self.cascadeAct = QAction(self.tr('&Cascade'), self)
244 self.cascadeAct.setStatusTip(self.tr('Cascade the windows')) 244 self.cascadeAct.setStatusTip(self.tr('Cascade the windows'))
245 self.cascadeAct.setWhatsThis(self.tr( 245 self.cascadeAct.setWhatsThis(self.tr(
246 """<b>Cascade the windows</b>""" 246 """<b>Cascade the windows</b>"""
247 """<p>Rearrange and resize the windows so that they are""" 247 """<p>Rearrange and resize the windows so that they are"""
248 """ cascaded.</p>""" 248 """ cascaded.</p>"""
249 )) 249 ))
250 self.cascadeAct.triggered[()].connect(self.preview.cascadeSubWindows) 250 self.cascadeAct.triggered.connect(self.preview.cascadeSubWindows)
251 251
252 self.closeAct = QAction( 252 self.closeAct = QAction(
253 UI.PixmapCache.getIcon("close.png"), self.tr('&Close'), self) 253 UI.PixmapCache.getIcon("close.png"), self.tr('&Close'), self)
254 self.closeAct.setShortcut(QKeySequence(self.tr( 254 self.closeAct.setShortcut(QKeySequence(self.tr(
255 "Ctrl+W", "File|Close"))) 255 "Ctrl+W", "File|Close")))
256 self.closeAct.setStatusTip(self.tr('Close the current window')) 256 self.closeAct.setStatusTip(self.tr('Close the current window'))
257 self.closeAct.setWhatsThis(self.tr( 257 self.closeAct.setWhatsThis(self.tr(
258 """<b>Close Window</b>""" 258 """<b>Close Window</b>"""
259 """<p>Close the current window.</p>""" 259 """<p>Close the current window.</p>"""
260 )) 260 ))
261 self.closeAct.triggered[()].connect(self.preview.closeWidget) 261 self.closeAct.triggered.connect(self.preview.closeWidget)
262 262
263 self.closeAllAct = QAction(self.tr('Clos&e All'), self) 263 self.closeAllAct = QAction(self.tr('Clos&e All'), self)
264 self.closeAllAct.setStatusTip(self.tr('Close all windows')) 264 self.closeAllAct.setStatusTip(self.tr('Close all windows'))
265 self.closeAllAct.setWhatsThis(self.tr( 265 self.closeAllAct.setWhatsThis(self.tr(
266 """<b>Close All Windows</b>""" 266 """<b>Close All Windows</b>"""
267 """<p>Close all windows.</p>""" 267 """<p>Close all windows.</p>"""
268 )) 268 ))
269 self.closeAllAct.triggered[()].connect(self.preview.closeAllWidgets) 269 self.closeAllAct.triggered.connect(self.preview.closeAllWidgets)
270 270
271 def __initMenus(self): 271 def __initMenus(self):
272 """ 272 """
273 Private method to create the menus. 273 Private method to create the menus.
274 """ 274 """

eric ide

mercurial