Tools/TRPreviewer.py

changeset 454
d28d558f7484
parent 453
a81097a85889
child 456
d766de2ccbc7
equal deleted inserted replaced
453:a81097a85889 454:d28d558f7484
146 self.openUIAct.setStatusTip(self.trUtf8('Open UI files for display')) 146 self.openUIAct.setStatusTip(self.trUtf8('Open UI files for display'))
147 self.openUIAct.setWhatsThis(self.trUtf8( 147 self.openUIAct.setWhatsThis(self.trUtf8(
148 """<b>Open UI Files</b>""" 148 """<b>Open UI Files</b>"""
149 """<p>This opens some UI files for display.</p>""" 149 """<p>This opens some UI files for display.</p>"""
150 )) 150 ))
151 self.openUIAct.triggered.connect(self.__openWidget) 151 self.openUIAct.triggered[()].connect(self.__openWidget)
152 152
153 self.openQMAct = QAction(UI.PixmapCache.getIcon("openQM.png"), 153 self.openQMAct = QAction(UI.PixmapCache.getIcon("openQM.png"),
154 self.trUtf8('Open &Translation Files...'), self) 154 self.trUtf8('Open &Translation Files...'), self)
155 self.openQMAct.setStatusTip(self.trUtf8('Open Translation files for display')) 155 self.openQMAct.setStatusTip(self.trUtf8('Open Translation files for display'))
156 self.openQMAct.setWhatsThis(self.trUtf8( 156 self.openQMAct.setWhatsThis(self.trUtf8(
157 """<b>Open Translation Files</b>""" 157 """<b>Open Translation Files</b>"""
158 """<p>This opens some translation files for display.</p>""" 158 """<p>This opens some translation files for display.</p>"""
159 )) 159 ))
160 self.openQMAct.triggered.connect(self.__openTranslation) 160 self.openQMAct.triggered[()].connect(self.__openTranslation)
161 161
162 self.reloadAct = QAction(UI.PixmapCache.getIcon("reload.png"), 162 self.reloadAct = QAction(UI.PixmapCache.getIcon("reload.png"),
163 self.trUtf8('&Reload Translations'), self) 163 self.trUtf8('&Reload Translations'), self)
164 self.reloadAct.setStatusTip(self.trUtf8('Reload the loaded translations')) 164 self.reloadAct.setStatusTip(self.trUtf8('Reload the loaded translations'))
165 self.reloadAct.setWhatsThis(self.trUtf8( 165 self.reloadAct.setWhatsThis(self.trUtf8(
166 """<b>Reload Translations</b>""" 166 """<b>Reload Translations</b>"""
167 """<p>This reloads the translations for the loaded languages.</p>""" 167 """<p>This reloads the translations for the loaded languages.</p>"""
168 )) 168 ))
169 self.reloadAct.triggered.connect(self.translations.reload) 169 self.reloadAct.triggered[()].connect(self.translations.reload)
170 170
171 self.exitAct = QAction(UI.PixmapCache.getIcon("exit.png"), 171 self.exitAct = QAction(UI.PixmapCache.getIcon("exit.png"),
172 self.trUtf8('&Quit'), self) 172 self.trUtf8('&Quit'), self)
173 self.exitAct.setShortcut(QKeySequence(self.trUtf8("Ctrl+Q","File|Quit"))) 173 self.exitAct.setShortcut(QKeySequence(self.trUtf8("Ctrl+Q","File|Quit")))
174 self.exitAct.setStatusTip(self.trUtf8('Quit the application')) 174 self.exitAct.setStatusTip(self.trUtf8('Quit the application'))
189 """ question mark, and you can click on the interface elements to get""" 189 """ question mark, and you can click on the interface elements to get"""
190 """ a short description of what they do and how to use them. In""" 190 """ a short description of what they do and how to use them. In"""
191 """ dialogs, this feature can be accessed using the context help""" 191 """ dialogs, this feature can be accessed using the context help"""
192 """ button in the titlebar.</p>""" 192 """ button in the titlebar.</p>"""
193 )) 193 ))
194 self.whatsThisAct.triggered.connect(self.__whatsThis) 194 self.whatsThisAct.triggered[()].connect(self.__whatsThis)
195 195
196 self.aboutAct = QAction(self.trUtf8('&About'), self) 196 self.aboutAct = QAction(self.trUtf8('&About'), self)
197 self.aboutAct.setStatusTip(self.trUtf8('Display information about this software')) 197 self.aboutAct.setStatusTip(self.trUtf8('Display information about this software'))
198 self.aboutAct.setWhatsThis(self.trUtf8( 198 self.aboutAct.setWhatsThis(self.trUtf8(
199 """<b>About</b>""" 199 """<b>About</b>"""
200 """<p>Display some information about this software.</p>""" 200 """<p>Display some information about this software.</p>"""
201 )) 201 ))
202 self.aboutAct.triggered.connect(self.__about) 202 self.aboutAct.triggered[()].connect(self.__about)
203 203
204 self.aboutQtAct = QAction(self.trUtf8('About &Qt'), self) 204 self.aboutQtAct = QAction(self.trUtf8('About &Qt'), self)
205 self.aboutQtAct.setStatusTip(\ 205 self.aboutQtAct.setStatusTip(\
206 self.trUtf8('Display information about the Qt toolkit')) 206 self.trUtf8('Display information about the Qt toolkit'))
207 self.aboutQtAct.setWhatsThis(self.trUtf8( 207 self.aboutQtAct.setWhatsThis(self.trUtf8(
208 """<b>About Qt</b>""" 208 """<b>About Qt</b>"""
209 """<p>Display some information about the Qt toolkit.</p>""" 209 """<p>Display some information about the Qt toolkit.</p>"""
210 )) 210 ))
211 self.aboutQtAct.triggered.connect(self.__aboutQt) 211 self.aboutQtAct.triggered[()].connect(self.__aboutQt)
212 212
213 self.tileAct = QAction(self.trUtf8('&Tile'), self) 213 self.tileAct = QAction(self.trUtf8('&Tile'), self)
214 self.tileAct.setStatusTip(self.trUtf8('Tile the windows')) 214 self.tileAct.setStatusTip(self.trUtf8('Tile the windows'))
215 self.tileAct.setWhatsThis(self.trUtf8( 215 self.tileAct.setWhatsThis(self.trUtf8(
216 """<b>Tile the windows</b>""" 216 """<b>Tile the windows</b>"""
217 """<p>Rearrange and resize the windows so that they are tiled.</p>""" 217 """<p>Rearrange and resize the windows so that they are tiled.</p>"""
218 )) 218 ))
219 self.tileAct.triggered.connect(self.preview.tile) 219 self.tileAct.triggered[()].connect(self.preview.tile)
220 220
221 self.cascadeAct = QAction(self.trUtf8('&Cascade'), self) 221 self.cascadeAct = QAction(self.trUtf8('&Cascade'), self)
222 self.cascadeAct.setStatusTip(self.trUtf8('Cascade the windows')) 222 self.cascadeAct.setStatusTip(self.trUtf8('Cascade the windows'))
223 self.cascadeAct.setWhatsThis(self.trUtf8( 223 self.cascadeAct.setWhatsThis(self.trUtf8(
224 """<b>Cascade the windows</b>""" 224 """<b>Cascade the windows</b>"""
225 """<p>Rearrange and resize the windows so that they are cascaded.</p>""" 225 """<p>Rearrange and resize the windows so that they are cascaded.</p>"""
226 )) 226 ))
227 self.cascadeAct.triggered.connect(self.preview.cascade) 227 self.cascadeAct.triggered[()].connect(self.preview.cascade)
228 228
229 self.closeAct = QAction(UI.PixmapCache.getIcon("close.png"), 229 self.closeAct = QAction(UI.PixmapCache.getIcon("close.png"),
230 self.trUtf8('&Close'), self) 230 self.trUtf8('&Close'), self)
231 self.closeAct.setShortcut(QKeySequence(self.trUtf8("Ctrl+W","File|Close"))) 231 self.closeAct.setShortcut(QKeySequence(self.trUtf8("Ctrl+W","File|Close")))
232 self.closeAct.setStatusTip(self.trUtf8('Close the current window')) 232 self.closeAct.setStatusTip(self.trUtf8('Close the current window'))
233 self.closeAct.setWhatsThis(self.trUtf8( 233 self.closeAct.setWhatsThis(self.trUtf8(
234 """<b>Close Window</b>""" 234 """<b>Close Window</b>"""
235 """<p>Close the current window.</p>""" 235 """<p>Close the current window.</p>"""
236 )) 236 ))
237 self.closeAct.triggered.connect(self.preview.closeWidget) 237 self.closeAct.triggered[()].connect(self.preview.closeWidget)
238 238
239 self.closeAllAct = QAction(self.trUtf8('Clos&e All'), self) 239 self.closeAllAct = QAction(self.trUtf8('Clos&e All'), self)
240 self.closeAllAct.setStatusTip(self.trUtf8('Close all windows')) 240 self.closeAllAct.setStatusTip(self.trUtf8('Close all windows'))
241 self.closeAllAct.setWhatsThis(self.trUtf8( 241 self.closeAllAct.setWhatsThis(self.trUtf8(
242 """<b>Close All Windows</b>""" 242 """<b>Close All Windows</b>"""
243 """<p>Close all windows.</p>""" 243 """<p>Close all windows.</p>"""
244 )) 244 ))
245 self.closeAllAct.triggered.connect(self.preview.closeAllWidgets) 245 self.closeAllAct.triggered[()].connect(self.preview.closeAllWidgets)
246 246
247 def __initMenus(self): 247 def __initMenus(self):
248 """ 248 """
249 Private method to create the menus. 249 Private method to create the menus.
250 """ 250 """

eric ide

mercurial