Plugins/ViewManagerPlugins/MdiArea/MdiArea.py

changeset 55
b5c84934de9c
parent 13
1af94a91f439
child 88
3701923bccf2
equal deleted inserted replaced
54:31463df17fd5 55:b5c84934de9c
14 14
15 import QScintilla.Editor 15 import QScintilla.Editor
16 16
17 import UI.PixmapCache 17 import UI.PixmapCache
18 18
19 from E4Gui.E4Action import E4Action, addActions 19 from E5Gui.E5Action import E5Action, addActions
20 20
21 import Utilities 21 import Utilities
22 22
23 class MdiArea(QMdiArea, ViewManager): 23 class MdiArea(QMdiArea, ViewManager):
24 """ 24 """
206 206
207 def _initWindowActions(self): 207 def _initWindowActions(self):
208 """ 208 """
209 Protected method to define the user interface actions for window handling. 209 Protected method to define the user interface actions for window handling.
210 """ 210 """
211 self.tileAct = E4Action(self.trUtf8('Tile'), 211 self.tileAct = E5Action(self.trUtf8('Tile'),
212 self.trUtf8('&Tile'), 0, 0, self, 'vm_window_tile') 212 self.trUtf8('&Tile'), 0, 0, self, 'vm_window_tile')
213 self.tileAct.setStatusTip(self.trUtf8('Tile the windows')) 213 self.tileAct.setStatusTip(self.trUtf8('Tile the windows'))
214 self.tileAct.setWhatsThis(self.trUtf8( 214 self.tileAct.setWhatsThis(self.trUtf8(
215 """<b>Tile the windows</b>""" 215 """<b>Tile the windows</b>"""
216 """<p>Rearrange and resize the windows so that they are tiled.</p>""" 216 """<p>Rearrange and resize the windows so that they are tiled.</p>"""
217 )) 217 ))
218 self.connect(self.tileAct, SIGNAL('triggered()'), self.tile) 218 self.connect(self.tileAct, SIGNAL('triggered()'), self.tile)
219 self.windowActions.append(self.tileAct) 219 self.windowActions.append(self.tileAct)
220 220
221 self.cascadeAct = E4Action(self.trUtf8('Cascade'), 221 self.cascadeAct = E5Action(self.trUtf8('Cascade'),
222 self.trUtf8('&Cascade'), 0, 0, self, 'vm_window_cascade') 222 self.trUtf8('&Cascade'), 0, 0, self, 'vm_window_cascade')
223 self.cascadeAct.setStatusTip(self.trUtf8('Cascade the windows')) 223 self.cascadeAct.setStatusTip(self.trUtf8('Cascade the windows'))
224 self.cascadeAct.setWhatsThis(self.trUtf8( 224 self.cascadeAct.setWhatsThis(self.trUtf8(
225 """<b>Cascade the windows</b>""" 225 """<b>Cascade the windows</b>"""
226 """<p>Rearrange and resize the windows so that they are cascaded.</p>""" 226 """<p>Rearrange and resize the windows so that they are cascaded.</p>"""
227 )) 227 ))
228 self.connect(self.cascadeAct, SIGNAL('triggered()'), self.cascade) 228 self.connect(self.cascadeAct, SIGNAL('triggered()'), self.cascade)
229 self.windowActions.append(self.cascadeAct) 229 self.windowActions.append(self.cascadeAct)
230 230
231 self.nextChildAct = E4Action(self.trUtf8('Next'), 231 self.nextChildAct = E5Action(self.trUtf8('Next'),
232 self.trUtf8('&Next'), 0, 0, self, 'vm_window_next') 232 self.trUtf8('&Next'), 0, 0, self, 'vm_window_next')
233 self.nextChildAct.setStatusTip(self.trUtf8('Activate next window')) 233 self.nextChildAct.setStatusTip(self.trUtf8('Activate next window'))
234 self.nextChildAct.setWhatsThis(self.trUtf8( 234 self.nextChildAct.setWhatsThis(self.trUtf8(
235 """<b>Next</b>""" 235 """<b>Next</b>"""
236 """<p>Activate the next window of the list of open windows.</p>""" 236 """<p>Activate the next window of the list of open windows.</p>"""
237 )) 237 ))
238 self.connect(self.nextChildAct, SIGNAL('triggered()'), self.activateNextSubWindow) 238 self.connect(self.nextChildAct, SIGNAL('triggered()'), self.activateNextSubWindow)
239 self.windowActions.append(self.nextChildAct) 239 self.windowActions.append(self.nextChildAct)
240 240
241 self.prevChildAct = E4Action(self.trUtf8('Previous'), 241 self.prevChildAct = E5Action(self.trUtf8('Previous'),
242 self.trUtf8('&Previous'), 0, 0, self, 'vm_window_previous') 242 self.trUtf8('&Previous'), 0, 0, self, 'vm_window_previous')
243 self.prevChildAct.setStatusTip(self.trUtf8('Activate previous window')) 243 self.prevChildAct.setStatusTip(self.trUtf8('Activate previous window'))
244 self.prevChildAct.setWhatsThis(self.trUtf8( 244 self.prevChildAct.setWhatsThis(self.trUtf8(
245 """<b>Previous</b>""" 245 """<b>Previous</b>"""
246 """<p>Activate the previous window of the list of open windows.</p>""" 246 """<p>Activate the previous window of the list of open windows.</p>"""
247 )) 247 ))
248 self.connect(self.prevChildAct, SIGNAL('triggered()'), 248 self.connect(self.prevChildAct, SIGNAL('triggered()'),
249 self.activatePreviousSubWindow) 249 self.activatePreviousSubWindow)
250 self.windowActions.append(self.prevChildAct) 250 self.windowActions.append(self.prevChildAct)
251 251
252 self.restoreAllAct = E4Action(self.trUtf8('Restore All'), 252 self.restoreAllAct = E5Action(self.trUtf8('Restore All'),
253 self.trUtf8('&Restore All'), 0, 0, self, 'vm_window_restore_all') 253 self.trUtf8('&Restore All'), 0, 0, self, 'vm_window_restore_all')
254 self.restoreAllAct.setStatusTip(self.trUtf8('Restore all windows')) 254 self.restoreAllAct.setStatusTip(self.trUtf8('Restore all windows'))
255 self.restoreAllAct.setWhatsThis(self.trUtf8( 255 self.restoreAllAct.setWhatsThis(self.trUtf8(
256 """<b>Restore All</b>""" 256 """<b>Restore All</b>"""
257 """<p>Restores all windows to their original size.</p>""" 257 """<p>Restores all windows to their original size.</p>"""
258 )) 258 ))
259 self.connect(self.restoreAllAct, SIGNAL('triggered()'), self.__restoreAllWindows) 259 self.connect(self.restoreAllAct, SIGNAL('triggered()'), self.__restoreAllWindows)
260 self.windowActions.append(self.restoreAllAct) 260 self.windowActions.append(self.restoreAllAct)
261 261
262 self.iconizeAllAct = E4Action(self.trUtf8('Iconize All'), 262 self.iconizeAllAct = E5Action(self.trUtf8('Iconize All'),
263 self.trUtf8('&Iconize All'), 0, 0, self, 'vm_window_iconize_all') 263 self.trUtf8('&Iconize All'), 0, 0, self, 'vm_window_iconize_all')
264 self.iconizeAllAct.setStatusTip(self.trUtf8('Iconize all windows')) 264 self.iconizeAllAct.setStatusTip(self.trUtf8('Iconize all windows'))
265 self.iconizeAllAct.setWhatsThis(self.trUtf8( 265 self.iconizeAllAct.setWhatsThis(self.trUtf8(
266 """<b>Iconize All</b>""" 266 """<b>Iconize All</b>"""
267 """<p>Iconizes all windows.</p>""" 267 """<p>Iconizes all windows.</p>"""

eric ide

mercurial