Tools/UIPreviewer.py

changeset 454
d28d558f7484
parent 453
a81097a85889
child 456
d766de2ccbc7
equal deleted inserted replaced
453:a81097a85889 454:d28d558f7484
117 self.openAct.setStatusTip(self.trUtf8('Open a UI file for display')) 117 self.openAct.setStatusTip(self.trUtf8('Open a UI file for display'))
118 self.openAct.setWhatsThis(self.trUtf8( 118 self.openAct.setWhatsThis(self.trUtf8(
119 """<b>Open File</b>""" 119 """<b>Open File</b>"""
120 """<p>This opens a new UI file for display.</p>""" 120 """<p>This opens a new UI file for display.</p>"""
121 )) 121 ))
122 self.openAct.triggered.connect(self.__openFile) 122 self.openAct.triggered[()].connect(self.__openFile)
123 123
124 self.printAct = QAction(UI.PixmapCache.getIcon("print.png"), 124 self.printAct = QAction(UI.PixmapCache.getIcon("print.png"),
125 self.trUtf8('&Print'), self) 125 self.trUtf8('&Print'), self)
126 self.printAct.setShortcut(QKeySequence(self.trUtf8("Ctrl+P", "File|Print"))) 126 self.printAct.setShortcut(QKeySequence(self.trUtf8("Ctrl+P", "File|Print")))
127 self.printAct.setStatusTip(self.trUtf8('Print a screen capture')) 127 self.printAct.setStatusTip(self.trUtf8('Print a screen capture'))
128 self.printAct.setWhatsThis(self.trUtf8( 128 self.printAct.setWhatsThis(self.trUtf8(
129 """<b>Print</b>""" 129 """<b>Print</b>"""
130 """<p>Print a screen capture.</p>""" 130 """<p>Print a screen capture.</p>"""
131 )) 131 ))
132 self.printAct.triggered.connect(self.__printImage) 132 self.printAct.triggered[()].connect(self.__printImage)
133 133
134 self.printPreviewAct = QAction(UI.PixmapCache.getIcon("printPreview.png"), 134 self.printPreviewAct = QAction(UI.PixmapCache.getIcon("printPreview.png"),
135 self.trUtf8('Print Preview'), self) 135 self.trUtf8('Print Preview'), self)
136 self.printPreviewAct.setStatusTip(self.trUtf8( 136 self.printPreviewAct.setStatusTip(self.trUtf8(
137 'Print preview a screen capture')) 137 'Print preview a screen capture'))
138 self.printPreviewAct.setWhatsThis(self.trUtf8( 138 self.printPreviewAct.setWhatsThis(self.trUtf8(
139 """<b>Print Preview</b>""" 139 """<b>Print Preview</b>"""
140 """<p>Print preview a screen capture.</p>""" 140 """<p>Print preview a screen capture.</p>"""
141 )) 141 ))
142 self.printPreviewAct.triggered.connect(self.__printPreviewImage) 142 self.printPreviewAct.triggered[()].connect(self.__printPreviewImage)
143 143
144 self.imageAct = QAction(UI.PixmapCache.getIcon("screenCapture.png"), 144 self.imageAct = QAction(UI.PixmapCache.getIcon("screenCapture.png"),
145 self.trUtf8('&Screen Capture'), self) 145 self.trUtf8('&Screen Capture'), self)
146 self.imageAct.setShortcut(\ 146 self.imageAct.setShortcut(\
147 QKeySequence(self.trUtf8("Ctrl+S", "File|Screen Capture"))) 147 QKeySequence(self.trUtf8("Ctrl+S", "File|Screen Capture")))
148 self.imageAct.setStatusTip(self.trUtf8('Save a screen capture to an image file')) 148 self.imageAct.setStatusTip(self.trUtf8('Save a screen capture to an image file'))
149 self.imageAct.setWhatsThis(self.trUtf8( 149 self.imageAct.setWhatsThis(self.trUtf8(
150 """<b>Screen Capture</b>""" 150 """<b>Screen Capture</b>"""
151 """<p>Save a screen capture to an image file.</p>""" 151 """<p>Save a screen capture to an image file.</p>"""
152 )) 152 ))
153 self.imageAct.triggered.connect(self.__saveImage) 153 self.imageAct.triggered[()].connect(self.__saveImage)
154 154
155 self.exitAct = QAction(UI.PixmapCache.getIcon("exit.png"), 155 self.exitAct = QAction(UI.PixmapCache.getIcon("exit.png"),
156 self.trUtf8('&Quit'), self) 156 self.trUtf8('&Quit'), self)
157 self.exitAct.setShortcut(QKeySequence(self.trUtf8("Ctrl+Q", "File|Quit"))) 157 self.exitAct.setShortcut(QKeySequence(self.trUtf8("Ctrl+Q", "File|Quit")))
158 self.exitAct.setStatusTip(self.trUtf8('Quit the application')) 158 self.exitAct.setStatusTip(self.trUtf8('Quit the application'))
169 self.copyAct.setStatusTip(self.trUtf8('Copy screen capture to clipboard')) 169 self.copyAct.setStatusTip(self.trUtf8('Copy screen capture to clipboard'))
170 self.copyAct.setWhatsThis(self.trUtf8( 170 self.copyAct.setWhatsThis(self.trUtf8(
171 """<b>Copy</b>""" 171 """<b>Copy</b>"""
172 """<p>Copy screen capture to clipboard.</p>""" 172 """<p>Copy screen capture to clipboard.</p>"""
173 )) 173 ))
174 self.copyAct.triggered.connect(self.__copyImageToClipboard) 174 self.copyAct.triggered[()].connect(self.__copyImageToClipboard)
175 175
176 self.whatsThisAct = QAction(UI.PixmapCache.getIcon("whatsThis.png"), 176 self.whatsThisAct = QAction(UI.PixmapCache.getIcon("whatsThis.png"),
177 self.trUtf8('&What\'s This?'), self) 177 self.trUtf8('&What\'s This?'), self)
178 self.whatsThisAct.setShortcut(QKeySequence(self.trUtf8("Shift+F1"))) 178 self.whatsThisAct.setShortcut(QKeySequence(self.trUtf8("Shift+F1")))
179 self.whatsThisAct.setStatusTip(self.trUtf8('Context sensitive help')) 179 self.whatsThisAct.setStatusTip(self.trUtf8('Context sensitive help'))
183 """ question mark, and you can click on the interface elements to get""" 183 """ question mark, and you can click on the interface elements to get"""
184 """ a short description of what they do and how to use them. In""" 184 """ a short description of what they do and how to use them. In"""
185 """ dialogs, this feature can be accessed using the context help""" 185 """ dialogs, this feature can be accessed using the context help"""
186 """ button in the titlebar.</p>""" 186 """ button in the titlebar.</p>"""
187 )) 187 ))
188 self.whatsThisAct.triggered.connect(self.__whatsThis) 188 self.whatsThisAct.triggered[()].connect(self.__whatsThis)
189 189
190 self.aboutAct = QAction(self.trUtf8('&About'), self) 190 self.aboutAct = QAction(self.trUtf8('&About'), self)
191 self.aboutAct.setStatusTip(self.trUtf8('Display information about this software')) 191 self.aboutAct.setStatusTip(self.trUtf8('Display information about this software'))
192 self.aboutAct.setWhatsThis(self.trUtf8( 192 self.aboutAct.setWhatsThis(self.trUtf8(
193 """<b>About</b>""" 193 """<b>About</b>"""
194 """<p>Display some information about this software.</p>""" 194 """<p>Display some information about this software.</p>"""
195 )) 195 ))
196 self.aboutAct.triggered.connect(self.__about) 196 self.aboutAct.triggered[()].connect(self.__about)
197 197
198 self.aboutQtAct = QAction(self.trUtf8('About &Qt'), self) 198 self.aboutQtAct = QAction(self.trUtf8('About &Qt'), self)
199 self.aboutQtAct.setStatusTip(\ 199 self.aboutQtAct.setStatusTip(\
200 self.trUtf8('Display information about the Qt toolkit')) 200 self.trUtf8('Display information about the Qt toolkit'))
201 self.aboutQtAct.setWhatsThis(self.trUtf8( 201 self.aboutQtAct.setWhatsThis(self.trUtf8(
202 """<b>About Qt</b>""" 202 """<b>About Qt</b>"""
203 """<p>Display some information about the Qt toolkit.</p>""" 203 """<p>Display some information about the Qt toolkit.</p>"""
204 )) 204 ))
205 self.aboutQtAct.triggered.connect(self.__aboutQt) 205 self.aboutQtAct.triggered[()].connect(self.__aboutQt)
206 206
207 def __initMenus(self): 207 def __initMenus(self):
208 """ 208 """
209 Private method to create the menus. 209 Private method to create the menus.
210 """ 210 """

eric ide

mercurial