QScintilla/MiniEditor.py

changeset 453
a81097a85889
parent 448
a1f1b226ff4b
child 454
d28d558f7484
equal deleted inserted replaced
452:0bc58cbb64b2 453:a81097a85889
356 self.newAct.setStatusTip(self.trUtf8('Open an empty editor window')) 356 self.newAct.setStatusTip(self.trUtf8('Open an empty editor window'))
357 self.newAct.setWhatsThis(self.trUtf8(\ 357 self.newAct.setWhatsThis(self.trUtf8(\
358 """<b>New</b>""" 358 """<b>New</b>"""
359 """<p>An empty editor window will be created.</p>""" 359 """<p>An empty editor window will be created.</p>"""
360 )) 360 ))
361 self.connect(self.newAct, SIGNAL('triggered()'), self.__newFile) 361 self.newAct.triggered.connect(self.__newFile)
362 self.fileActions.append(self.newAct) 362 self.fileActions.append(self.newAct)
363 363
364 self.openAct = E5Action(self.trUtf8('Open'), 364 self.openAct = E5Action(self.trUtf8('Open'),
365 UI.PixmapCache.getIcon("open.png"), 365 UI.PixmapCache.getIcon("open.png"),
366 self.trUtf8('&Open...'), 366 self.trUtf8('&Open...'),
369 self.openAct.setStatusTip(self.trUtf8('Open a file')) 369 self.openAct.setStatusTip(self.trUtf8('Open a file'))
370 self.openAct.setWhatsThis(self.trUtf8(\ 370 self.openAct.setWhatsThis(self.trUtf8(\
371 """<b>Open a file</b>""" 371 """<b>Open a file</b>"""
372 """<p>You will be asked for the name of a file to be opened.</p>""" 372 """<p>You will be asked for the name of a file to be opened.</p>"""
373 )) 373 ))
374 self.connect(self.openAct, SIGNAL('triggered()'), self.__open) 374 self.openAct.triggered.connect(self.__open)
375 self.fileActions.append(self.openAct) 375 self.fileActions.append(self.openAct)
376 376
377 self.saveAct = E5Action(self.trUtf8('Save'), 377 self.saveAct = E5Action(self.trUtf8('Save'),
378 UI.PixmapCache.getIcon("fileSave.png"), 378 UI.PixmapCache.getIcon("fileSave.png"),
379 self.trUtf8('&Save'), 379 self.trUtf8('&Save'),
382 self.saveAct.setStatusTip(self.trUtf8('Save the current file')) 382 self.saveAct.setStatusTip(self.trUtf8('Save the current file'))
383 self.saveAct.setWhatsThis(self.trUtf8(\ 383 self.saveAct.setWhatsThis(self.trUtf8(\
384 """<b>Save File</b>""" 384 """<b>Save File</b>"""
385 """<p>Save the contents of current editor window.</p>""" 385 """<p>Save the contents of current editor window.</p>"""
386 )) 386 ))
387 self.connect(self.saveAct, SIGNAL('triggered()'), self.__save) 387 self.saveAct.triggered.connect(self.__save)
388 self.fileActions.append(self.saveAct) 388 self.fileActions.append(self.saveAct)
389 389
390 self.saveAsAct = E5Action(self.trUtf8('Save as'), 390 self.saveAsAct = E5Action(self.trUtf8('Save as'),
391 UI.PixmapCache.getIcon("fileSaveAs.png"), 391 UI.PixmapCache.getIcon("fileSaveAs.png"),
392 self.trUtf8('Save &as...'), 392 self.trUtf8('Save &as...'),
396 self.saveAsAct.setWhatsThis(self.trUtf8(\ 396 self.saveAsAct.setWhatsThis(self.trUtf8(\
397 """<b>Save File as</b>""" 397 """<b>Save File as</b>"""
398 """<p>Save the contents of current editor window to a new file.""" 398 """<p>Save the contents of current editor window to a new file."""
399 """ The file can be entered in a file selection dialog.</p>""" 399 """ The file can be entered in a file selection dialog.</p>"""
400 )) 400 ))
401 self.connect(self.saveAsAct, SIGNAL('triggered()'), self.__saveAs) 401 self.saveAsAct.triggered.connect(self.__saveAs)
402 self.fileActions.append(self.saveAsAct) 402 self.fileActions.append(self.saveAsAct)
403 403
404 self.closeAct = E5Action(self.trUtf8('Close'), 404 self.closeAct = E5Action(self.trUtf8('Close'),
405 UI.PixmapCache.getIcon("close.png"), 405 UI.PixmapCache.getIcon("close.png"),
406 self.trUtf8('&Close'), 406 self.trUtf8('&Close'),
409 self.closeAct.setStatusTip(self.trUtf8('Close the editor window')) 409 self.closeAct.setStatusTip(self.trUtf8('Close the editor window'))
410 self.closeAct.setWhatsThis(self.trUtf8(\ 410 self.closeAct.setWhatsThis(self.trUtf8(\
411 """<b>Close Window</b>""" 411 """<b>Close Window</b>"""
412 """<p>Close the current window.</p>""" 412 """<p>Close the current window.</p>"""
413 )) 413 ))
414 self.connect(self.closeAct, SIGNAL('triggered()'), self.close) 414 self.closeAct.triggered.connect(self.close)
415 self.fileActions.append(self.closeAct) 415 self.fileActions.append(self.closeAct)
416 416
417 self.printAct = E5Action(self.trUtf8('Print'), 417 self.printAct = E5Action(self.trUtf8('Print'),
418 UI.PixmapCache.getIcon("print.png"), 418 UI.PixmapCache.getIcon("print.png"),
419 self.trUtf8('&Print'), 419 self.trUtf8('&Print'),
422 self.printAct.setStatusTip(self.trUtf8('Print the current file')) 422 self.printAct.setStatusTip(self.trUtf8('Print the current file'))
423 self.printAct.setWhatsThis(self.trUtf8( 423 self.printAct.setWhatsThis(self.trUtf8(
424 """<b>Print File</b>""" 424 """<b>Print File</b>"""
425 """<p>Print the contents of the current file.</p>""" 425 """<p>Print the contents of the current file.</p>"""
426 )) 426 ))
427 self.connect(self.printAct, SIGNAL('triggered()'), self.__printFile) 427 self.printAct.triggered.connect(self.__printFile)
428 self.fileActions.append(self.printAct) 428 self.fileActions.append(self.printAct)
429 429
430 self.printPreviewAct = \ 430 self.printPreviewAct = \
431 E5Action(self.trUtf8('Print Preview'), 431 E5Action(self.trUtf8('Print Preview'),
432 UI.PixmapCache.getIcon("printPreview.png"), 432 UI.PixmapCache.getIcon("printPreview.png"),
436 'Print preview of the current file')) 436 'Print preview of the current file'))
437 self.printPreviewAct.setWhatsThis(self.trUtf8( 437 self.printPreviewAct.setWhatsThis(self.trUtf8(
438 """<b>Print Preview</b>""" 438 """<b>Print Preview</b>"""
439 """<p>Print preview of the current file.</p>""" 439 """<p>Print preview of the current file.</p>"""
440 )) 440 ))
441 self.connect(self.printPreviewAct, SIGNAL('triggered()'), 441 self.printPreviewAct.triggered.connect(self.__printPreviewFile)
442 self.__printPreviewFile)
443 self.fileActions.append(self.printPreviewAct) 442 self.fileActions.append(self.printPreviewAct)
444 443
445 def __createEditActions(self): 444 def __createEditActions(self):
446 """ 445 """
447 Private method to create the Edit actions. 446 Private method to create the Edit actions.
455 self.undoAct.setStatusTip(self.trUtf8('Undo the last change')) 454 self.undoAct.setStatusTip(self.trUtf8('Undo the last change'))
456 self.undoAct.setWhatsThis(self.trUtf8(\ 455 self.undoAct.setWhatsThis(self.trUtf8(\
457 """<b>Undo</b>""" 456 """<b>Undo</b>"""
458 """<p>Undo the last change done in the current editor.</p>""" 457 """<p>Undo the last change done in the current editor.</p>"""
459 )) 458 ))
460 self.connect(self.undoAct, SIGNAL('triggered()'), self.__undo) 459 self.undoAct.triggered.connect(self.__undo)
461 self.editActions.append(self.undoAct) 460 self.editActions.append(self.undoAct)
462 461
463 self.redoAct = E5Action(self.trUtf8('Redo'), 462 self.redoAct = E5Action(self.trUtf8('Redo'),
464 UI.PixmapCache.getIcon("editRedo.png"), 463 UI.PixmapCache.getIcon("editRedo.png"),
465 self.trUtf8('&Redo'), 464 self.trUtf8('&Redo'),
468 self.redoAct.setStatusTip(self.trUtf8('Redo the last change')) 467 self.redoAct.setStatusTip(self.trUtf8('Redo the last change'))
469 self.redoAct.setWhatsThis(self.trUtf8(\ 468 self.redoAct.setWhatsThis(self.trUtf8(\
470 """<b>Redo</b>""" 469 """<b>Redo</b>"""
471 """<p>Redo the last change done in the current editor.</p>""" 470 """<p>Redo the last change done in the current editor.</p>"""
472 )) 471 ))
473 self.connect(self.redoAct, SIGNAL('triggered()'), self.__redo) 472 self.redoAct.triggered.connect(self.__redo)
474 self.editActions.append(self.redoAct) 473 self.editActions.append(self.redoAct)
475 474
476 self.cutAct = E5Action(self.trUtf8('Cut'), 475 self.cutAct = E5Action(self.trUtf8('Cut'),
477 UI.PixmapCache.getIcon("editCut.png"), 476 UI.PixmapCache.getIcon("editCut.png"),
478 self.trUtf8('Cu&t'), 477 self.trUtf8('Cu&t'),
482 self.cutAct.setStatusTip(self.trUtf8('Cut the selection')) 481 self.cutAct.setStatusTip(self.trUtf8('Cut the selection'))
483 self.cutAct.setWhatsThis(self.trUtf8(\ 482 self.cutAct.setWhatsThis(self.trUtf8(\
484 """<b>Cut</b>""" 483 """<b>Cut</b>"""
485 """<p>Cut the selected text of the current editor to the clipboard.</p>""" 484 """<p>Cut the selected text of the current editor to the clipboard.</p>"""
486 )) 485 ))
487 self.connect(self.cutAct, SIGNAL('triggered()'), self.__textEdit.cut) 486 self.cutAct.triggered.connect(self.__textEdit.cut)
488 self.editActions.append(self.cutAct) 487 self.editActions.append(self.cutAct)
489 488
490 self.copyAct = E5Action(self.trUtf8('Copy'), 489 self.copyAct = E5Action(self.trUtf8('Copy'),
491 UI.PixmapCache.getIcon("editCopy.png"), 490 UI.PixmapCache.getIcon("editCopy.png"),
492 self.trUtf8('&Copy'), 491 self.trUtf8('&Copy'),
496 self.copyAct.setStatusTip(self.trUtf8('Copy the selection')) 495 self.copyAct.setStatusTip(self.trUtf8('Copy the selection'))
497 self.copyAct.setWhatsThis(self.trUtf8(\ 496 self.copyAct.setWhatsThis(self.trUtf8(\
498 """<b>Copy</b>""" 497 """<b>Copy</b>"""
499 """<p>Copy the selected text of the current editor to the clipboard.</p>""" 498 """<p>Copy the selected text of the current editor to the clipboard.</p>"""
500 )) 499 ))
501 self.connect(self.copyAct, SIGNAL('triggered()'), self.__textEdit.copy) 500 self.copyAct.triggered.connect(self.__textEdit.copy)
502 self.editActions.append(self.copyAct) 501 self.editActions.append(self.copyAct)
503 502
504 self.pasteAct = E5Action(self.trUtf8('Paste'), 503 self.pasteAct = E5Action(self.trUtf8('Paste'),
505 UI.PixmapCache.getIcon("editPaste.png"), 504 UI.PixmapCache.getIcon("editPaste.png"),
506 self.trUtf8('&Paste'), 505 self.trUtf8('&Paste'),
511 self.pasteAct.setWhatsThis(self.trUtf8(\ 510 self.pasteAct.setWhatsThis(self.trUtf8(\
512 """<b>Paste</b>""" 511 """<b>Paste</b>"""
513 """<p>Paste the last cut/copied text from the clipboard to""" 512 """<p>Paste the last cut/copied text from the clipboard to"""
514 """ the current editor.</p>""" 513 """ the current editor.</p>"""
515 )) 514 ))
516 self.connect(self.pasteAct, SIGNAL('triggered()'), self.__textEdit.paste) 515 self.pasteAct.triggered.connect(self.__textEdit.paste)
517 self.editActions.append(self.pasteAct) 516 self.editActions.append(self.pasteAct)
518 517
519 self.deleteAct = E5Action(self.trUtf8('Clear'), 518 self.deleteAct = E5Action(self.trUtf8('Clear'),
520 UI.PixmapCache.getIcon("editDelete.png"), 519 UI.PixmapCache.getIcon("editDelete.png"),
521 self.trUtf8('Cl&ear'), 520 self.trUtf8('Cl&ear'),
525 self.deleteAct.setStatusTip(self.trUtf8('Clear all text')) 524 self.deleteAct.setStatusTip(self.trUtf8('Clear all text'))
526 self.deleteAct.setWhatsThis(self.trUtf8(\ 525 self.deleteAct.setWhatsThis(self.trUtf8(\
527 """<b>Clear</b>""" 526 """<b>Clear</b>"""
528 """<p>Delete all text of the current editor.</p>""" 527 """<p>Delete all text of the current editor.</p>"""
529 )) 528 ))
530 self.connect(self.deleteAct, SIGNAL('triggered()'), self.__textEdit.clear) 529 self.deleteAct.triggered.connect(self.__textEdit.clear)
531 self.editActions.append(self.deleteAct) 530 self.editActions.append(self.deleteAct)
532 531
533 self.cutAct.setEnabled(False); 532 self.cutAct.setEnabled(False);
534 self.copyAct.setEnabled(False); 533 self.copyAct.setEnabled(False);
535 self.connect(self.__textEdit, SIGNAL("copyAvailable(bool)"), 534 self.connect(self.__textEdit, SIGNAL("copyAvailable(bool)"),
549 act = E5Action(QApplication.translate('ViewManager', 'Move left one character'), 548 act = E5Action(QApplication.translate('ViewManager', 'Move left one character'),
550 QApplication.translate('ViewManager', 'Move left one character'), 549 QApplication.translate('ViewManager', 'Move left one character'),
551 QKeySequence(QApplication.translate('ViewManager', 'Left')), 0, 550 QKeySequence(QApplication.translate('ViewManager', 'Left')), 0,
552 self.editorActGrp, 'vm_edit_move_left_char') 551 self.editorActGrp, 'vm_edit_move_left_char')
553 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFT) 552 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFT)
554 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 553 act.triggered.connect(self.esm.map)
555 self.editActions.append(act) 554 self.editActions.append(act)
556 555
557 act = E5Action(QApplication.translate('ViewManager', 'Move right one character'), 556 act = E5Action(QApplication.translate('ViewManager', 'Move right one character'),
558 QApplication.translate('ViewManager', 'Move right one character'), 557 QApplication.translate('ViewManager', 'Move right one character'),
559 QKeySequence(QApplication.translate('ViewManager', 'Right')), 0, 558 QKeySequence(QApplication.translate('ViewManager', 'Right')), 0,
560 self.editorActGrp, 'vm_edit_move_right_char') 559 self.editorActGrp, 'vm_edit_move_right_char')
561 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHT) 560 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHT)
562 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 561 act.triggered.connect(self.esm.map)
563 self.editActions.append(act) 562 self.editActions.append(act)
564 563
565 act = E5Action(QApplication.translate('ViewManager', 'Move up one line'), 564 act = E5Action(QApplication.translate('ViewManager', 'Move up one line'),
566 QApplication.translate('ViewManager', 'Move up one line'), 565 QApplication.translate('ViewManager', 'Move up one line'),
567 QKeySequence(QApplication.translate('ViewManager', 'Up')), 0, 566 QKeySequence(QApplication.translate('ViewManager', 'Up')), 0,
568 self.editorActGrp, 'vm_edit_move_up_line') 567 self.editorActGrp, 'vm_edit_move_up_line')
569 self.esm.setMapping(act, QsciScintilla.SCI_LINEUP) 568 self.esm.setMapping(act, QsciScintilla.SCI_LINEUP)
570 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 569 act.triggered.connect(self.esm.map)
571 self.editActions.append(act) 570 self.editActions.append(act)
572 571
573 act = E5Action(QApplication.translate('ViewManager', 'Move down one line'), 572 act = E5Action(QApplication.translate('ViewManager', 'Move down one line'),
574 QApplication.translate('ViewManager', 'Move down one line'), 573 QApplication.translate('ViewManager', 'Move down one line'),
575 QKeySequence(QApplication.translate('ViewManager', 'Down')), 0, 574 QKeySequence(QApplication.translate('ViewManager', 'Down')), 0,
576 self.editorActGrp, 'vm_edit_move_down_line') 575 self.editorActGrp, 'vm_edit_move_down_line')
577 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWN) 576 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWN)
578 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 577 act.triggered.connect(self.esm.map)
579 self.editActions.append(act) 578 self.editActions.append(act)
580 579
581 act = E5Action(QApplication.translate('ViewManager', 'Move left one word part'), 580 act = E5Action(QApplication.translate('ViewManager', 'Move left one word part'),
582 QApplication.translate('ViewManager', 'Move left one word part'), 581 QApplication.translate('ViewManager', 'Move left one word part'),
583 QKeySequence(QApplication.translate('ViewManager', 'Alt+Left')), 0, 582 QKeySequence(QApplication.translate('ViewManager', 'Alt+Left')), 0,
584 self.editorActGrp, 'vm_edit_move_left_word_part') 583 self.editorActGrp, 'vm_edit_move_left_word_part')
585 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFT) 584 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFT)
586 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 585 act.triggered.connect(self.esm.map)
587 self.editActions.append(act) 586 self.editActions.append(act)
588 587
589 act = E5Action(QApplication.translate('ViewManager', 'Move right one word part'), 588 act = E5Action(QApplication.translate('ViewManager', 'Move right one word part'),
590 QApplication.translate('ViewManager', 'Move right one word part'), 589 QApplication.translate('ViewManager', 'Move right one word part'),
591 QKeySequence(QApplication.translate('ViewManager', 'Alt+Right')), 0, 590 QKeySequence(QApplication.translate('ViewManager', 'Alt+Right')), 0,
592 self.editorActGrp, 'vm_edit_move_right_word_part') 591 self.editorActGrp, 'vm_edit_move_right_word_part')
593 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHT) 592 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHT)
594 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 593 act.triggered.connect(self.esm.map)
595 self.editActions.append(act) 594 self.editActions.append(act)
596 595
597 act = E5Action(QApplication.translate('ViewManager', 'Move left one word'), 596 act = E5Action(QApplication.translate('ViewManager', 'Move left one word'),
598 QApplication.translate('ViewManager', 'Move left one word'), 597 QApplication.translate('ViewManager', 'Move left one word'),
599 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Left')), 0, 598 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Left')), 0,
600 self.editorActGrp, 'vm_edit_move_left_word') 599 self.editorActGrp, 'vm_edit_move_left_word')
601 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFT) 600 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFT)
602 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 601 act.triggered.connect(self.esm.map)
603 self.editActions.append(act) 602 self.editActions.append(act)
604 603
605 act = E5Action(QApplication.translate('ViewManager', 'Move right one word'), 604 act = E5Action(QApplication.translate('ViewManager', 'Move right one word'),
606 QApplication.translate('ViewManager', 'Move right one word'), 605 QApplication.translate('ViewManager', 'Move right one word'),
607 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Right')), 606 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Right')),
608 0, 607 0,
609 self.editorActGrp, 'vm_edit_move_right_word') 608 self.editorActGrp, 'vm_edit_move_right_word')
610 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT) 609 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT)
611 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 610 act.triggered.connect(self.esm.map)
612 self.editActions.append(act) 611 self.editActions.append(act)
613 612
614 act = E5Action(QApplication.translate('ViewManager', 613 act = E5Action(QApplication.translate('ViewManager',
615 'Move to first visible character in line'), 614 'Move to first visible character in line'),
616 QApplication.translate('ViewManager', 615 QApplication.translate('ViewManager',
617 'Move to first visible character in line'), 616 'Move to first visible character in line'),
618 QKeySequence(QApplication.translate('ViewManager', 'Home')), 0, 617 QKeySequence(QApplication.translate('ViewManager', 'Home')), 0,
619 self.editorActGrp, 'vm_edit_move_first_visible_char') 618 self.editorActGrp, 'vm_edit_move_first_visible_char')
620 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME) 619 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME)
621 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 620 act.triggered.connect(self.esm.map)
622 self.editActions.append(act) 621 self.editActions.append(act)
623 622
624 act = E5Action(QApplication.translate('ViewManager', 623 act = E5Action(QApplication.translate('ViewManager',
625 'Move to start of displayed line'), 624 'Move to start of displayed line'),
626 QApplication.translate('ViewManager', 625 QApplication.translate('ViewManager',
627 'Move to start of displayed line'), 626 'Move to start of displayed line'),
628 QKeySequence(QApplication.translate('ViewManager', 'Alt+Home')), 0, 627 QKeySequence(QApplication.translate('ViewManager', 'Alt+Home')), 0,
629 self.editorActGrp, 'vm_edit_move_start_line') 628 self.editorActGrp, 'vm_edit_move_start_line')
630 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAY) 629 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAY)
631 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 630 act.triggered.connect(self.esm.map)
632 self.editActions.append(act) 631 self.editActions.append(act)
633 632
634 act = E5Action(QApplication.translate('ViewManager', 'Move to end of line'), 633 act = E5Action(QApplication.translate('ViewManager', 'Move to end of line'),
635 QApplication.translate('ViewManager', 'Move to end of line'), 634 QApplication.translate('ViewManager', 'Move to end of line'),
636 QKeySequence(QApplication.translate('ViewManager', 'End')), 0, 635 QKeySequence(QApplication.translate('ViewManager', 'End')), 0,
637 self.editorActGrp, 'vm_edit_move_end_line') 636 self.editorActGrp, 'vm_edit_move_end_line')
638 self.esm.setMapping(act, QsciScintilla.SCI_LINEEND) 637 self.esm.setMapping(act, QsciScintilla.SCI_LINEEND)
639 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 638 act.triggered.connect(self.esm.map)
640 self.editActions.append(act) 639 self.editActions.append(act)
641 640
642 act = E5Action(QApplication.translate('ViewManager', 'Scroll view down one line'), 641 act = E5Action(QApplication.translate('ViewManager', 'Scroll view down one line'),
643 QApplication.translate('ViewManager', 'Scroll view down one line'), 642 QApplication.translate('ViewManager', 'Scroll view down one line'),
644 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Down')), 0, 643 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Down')), 0,
645 self.editorActGrp, 'vm_edit_scroll_down_line') 644 self.editorActGrp, 'vm_edit_scroll_down_line')
646 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLDOWN) 645 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLDOWN)
647 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 646 act.triggered.connect(self.esm.map)
648 self.editActions.append(act) 647 self.editActions.append(act)
649 648
650 act = E5Action(QApplication.translate('ViewManager', 'Scroll view up one line'), 649 act = E5Action(QApplication.translate('ViewManager', 'Scroll view up one line'),
651 QApplication.translate('ViewManager', 'Scroll view up one line'), 650 QApplication.translate('ViewManager', 'Scroll view up one line'),
652 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Up')), 0, 651 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Up')), 0,
653 self.editorActGrp, 'vm_edit_scroll_up_line') 652 self.editorActGrp, 'vm_edit_scroll_up_line')
654 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLUP) 653 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLUP)
655 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 654 act.triggered.connect(self.esm.map)
656 self.editActions.append(act) 655 self.editActions.append(act)
657 656
658 act = E5Action(QApplication.translate('ViewManager', 'Move up one paragraph'), 657 act = E5Action(QApplication.translate('ViewManager', 'Move up one paragraph'),
659 QApplication.translate('ViewManager', 'Move up one paragraph'), 658 QApplication.translate('ViewManager', 'Move up one paragraph'),
660 QKeySequence(QApplication.translate('ViewManager', 'Alt+Up')), 0, 659 QKeySequence(QApplication.translate('ViewManager', 'Alt+Up')), 0,
661 self.editorActGrp, 'vm_edit_move_up_para') 660 self.editorActGrp, 'vm_edit_move_up_para')
662 self.esm.setMapping(act, QsciScintilla.SCI_PARAUP) 661 self.esm.setMapping(act, QsciScintilla.SCI_PARAUP)
663 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 662 act.triggered.connect(self.esm.map)
664 self.editActions.append(act) 663 self.editActions.append(act)
665 664
666 act = E5Action(QApplication.translate('ViewManager', 'Move down one paragraph'), 665 act = E5Action(QApplication.translate('ViewManager', 'Move down one paragraph'),
667 QApplication.translate('ViewManager', 'Move down one paragraph'), 666 QApplication.translate('ViewManager', 'Move down one paragraph'),
668 QKeySequence(QApplication.translate('ViewManager', 'Alt+Down')), 0, 667 QKeySequence(QApplication.translate('ViewManager', 'Alt+Down')), 0,
669 self.editorActGrp, 'vm_edit_move_down_para') 668 self.editorActGrp, 'vm_edit_move_down_para')
670 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWN) 669 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWN)
671 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 670 act.triggered.connect(self.esm.map)
672 self.editActions.append(act) 671 self.editActions.append(act)
673 672
674 act = E5Action(QApplication.translate('ViewManager', 'Move up one page'), 673 act = E5Action(QApplication.translate('ViewManager', 'Move up one page'),
675 QApplication.translate('ViewManager', 'Move up one page'), 674 QApplication.translate('ViewManager', 'Move up one page'),
676 QKeySequence(QApplication.translate('ViewManager', 'PgUp')), 0, 675 QKeySequence(QApplication.translate('ViewManager', 'PgUp')), 0,
677 self.editorActGrp, 'vm_edit_move_up_page') 676 self.editorActGrp, 'vm_edit_move_up_page')
678 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUP) 677 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUP)
679 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 678 act.triggered.connect(self.esm.map)
680 self.editActions.append(act) 679 self.editActions.append(act)
681 680
682 act = E5Action(QApplication.translate('ViewManager', 'Move down one page'), 681 act = E5Action(QApplication.translate('ViewManager', 'Move down one page'),
683 QApplication.translate('ViewManager', 'Move down one page'), 682 QApplication.translate('ViewManager', 'Move down one page'),
684 QKeySequence(QApplication.translate('ViewManager', 'PgDown')), 0, 683 QKeySequence(QApplication.translate('ViewManager', 'PgDown')), 0,
685 self.editorActGrp, 'vm_edit_move_down_page') 684 self.editorActGrp, 'vm_edit_move_down_page')
686 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWN) 685 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWN)
687 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 686 act.triggered.connect(self.esm.map)
688 self.editActions.append(act) 687 self.editActions.append(act)
689 688
690 act = E5Action(QApplication.translate('ViewManager', 'Move to start of text'), 689 act = E5Action(QApplication.translate('ViewManager', 'Move to start of text'),
691 QApplication.translate('ViewManager', 'Move to start of text'), 690 QApplication.translate('ViewManager', 'Move to start of text'),
692 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Home')), 0, 691 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Home')), 0,
693 self.editorActGrp, 'vm_edit_move_start_text') 692 self.editorActGrp, 'vm_edit_move_start_text')
694 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTART) 693 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTART)
695 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 694 act.triggered.connect(self.esm.map)
696 self.editActions.append(act) 695 self.editActions.append(act)
697 696
698 act = E5Action(QApplication.translate('ViewManager', 'Move to end of text'), 697 act = E5Action(QApplication.translate('ViewManager', 'Move to end of text'),
699 QApplication.translate('ViewManager', 'Move to end of text'), 698 QApplication.translate('ViewManager', 'Move to end of text'),
700 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+End')), 0, 699 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+End')), 0,
701 self.editorActGrp, 'vm_edit_move_end_text') 700 self.editorActGrp, 'vm_edit_move_end_text')
702 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTEND) 701 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTEND)
703 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 702 act.triggered.connect(self.esm.map)
704 self.editActions.append(act) 703 self.editActions.append(act)
705 704
706 act = E5Action(QApplication.translate('ViewManager', 'Indent one level'), 705 act = E5Action(QApplication.translate('ViewManager', 'Indent one level'),
707 QApplication.translate('ViewManager', 'Indent one level'), 706 QApplication.translate('ViewManager', 'Indent one level'),
708 QKeySequence(QApplication.translate('ViewManager', 'Tab')), 0, 707 QKeySequence(QApplication.translate('ViewManager', 'Tab')), 0,
709 self.editorActGrp, 'vm_edit_indent_one_level') 708 self.editorActGrp, 'vm_edit_indent_one_level')
710 self.esm.setMapping(act, QsciScintilla.SCI_TAB) 709 self.esm.setMapping(act, QsciScintilla.SCI_TAB)
711 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 710 act.triggered.connect(self.esm.map)
712 self.editActions.append(act) 711 self.editActions.append(act)
713 712
714 act = E5Action(QApplication.translate('ViewManager', 'Unindent one level'), 713 act = E5Action(QApplication.translate('ViewManager', 'Unindent one level'),
715 QApplication.translate('ViewManager', 'Unindent one level'), 714 QApplication.translate('ViewManager', 'Unindent one level'),
716 QKeySequence(QApplication.translate('ViewManager', 'Shift+Tab')), 0, 715 QKeySequence(QApplication.translate('ViewManager', 'Shift+Tab')), 0,
717 self.editorActGrp, 'vm_edit_unindent_one_level') 716 self.editorActGrp, 'vm_edit_unindent_one_level')
718 self.esm.setMapping(act, QsciScintilla.SCI_BACKTAB) 717 self.esm.setMapping(act, QsciScintilla.SCI_BACKTAB)
719 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 718 act.triggered.connect(self.esm.map)
720 self.editActions.append(act) 719 self.editActions.append(act)
721 720
722 act = E5Action(QApplication.translate('ViewManager', 721 act = E5Action(QApplication.translate('ViewManager',
723 'Extend selection left one character'), 722 'Extend selection left one character'),
724 QApplication.translate('ViewManager', 723 QApplication.translate('ViewManager',
725 'Extend selection left one character'), 724 'Extend selection left one character'),
726 QKeySequence(QApplication.translate('ViewManager', 'Shift+Left')), 725 QKeySequence(QApplication.translate('ViewManager', 'Shift+Left')),
727 0, 726 0,
728 self.editorActGrp, 'vm_edit_extend_selection_left_char') 727 self.editorActGrp, 'vm_edit_extend_selection_left_char')
729 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTEXTEND) 728 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTEXTEND)
730 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 729 act.triggered.connect(self.esm.map)
731 self.editActions.append(act) 730 self.editActions.append(act)
732 731
733 act = E5Action(QApplication.translate('ViewManager', 732 act = E5Action(QApplication.translate('ViewManager',
734 'Extend selection right one character'), 733 'Extend selection right one character'),
735 QApplication.translate('ViewManager', 734 QApplication.translate('ViewManager',
736 'Extend selection right one character'), 735 'Extend selection right one character'),
737 QKeySequence(QApplication.translate('ViewManager', 'Shift+Right')), 736 QKeySequence(QApplication.translate('ViewManager', 'Shift+Right')),
738 0, 737 0,
739 self.editorActGrp, 'vm_edit_extend_selection_right_char') 738 self.editorActGrp, 'vm_edit_extend_selection_right_char')
740 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTEXTEND) 739 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTEXTEND)
741 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 740 act.triggered.connect(self.esm.map)
742 self.editActions.append(act) 741 self.editActions.append(act)
743 742
744 act = E5Action(QApplication.translate('ViewManager', 743 act = E5Action(QApplication.translate('ViewManager',
745 'Extend selection up one line'), 744 'Extend selection up one line'),
746 QApplication.translate('ViewManager', 745 QApplication.translate('ViewManager',
747 'Extend selection up one line'), 746 'Extend selection up one line'),
748 QKeySequence(QApplication.translate('ViewManager', 'Shift+Up')), 0, 747 QKeySequence(QApplication.translate('ViewManager', 'Shift+Up')), 0,
749 self.editorActGrp, 'vm_edit_extend_selection_up_line') 748 self.editorActGrp, 'vm_edit_extend_selection_up_line')
750 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPEXTEND) 749 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPEXTEND)
751 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 750 act.triggered.connect(self.esm.map)
752 self.editActions.append(act) 751 self.editActions.append(act)
753 752
754 act = E5Action(QApplication.translate('ViewManager', 753 act = E5Action(QApplication.translate('ViewManager',
755 'Extend selection down one line'), 754 'Extend selection down one line'),
756 QApplication.translate('ViewManager', 755 QApplication.translate('ViewManager',
757 'Extend selection down one line'), 756 'Extend selection down one line'),
758 QKeySequence(QApplication.translate('ViewManager', 'Shift+Down')), 757 QKeySequence(QApplication.translate('ViewManager', 'Shift+Down')),
759 0, 758 0,
760 self.editorActGrp, 'vm_edit_extend_selection_down_line') 759 self.editorActGrp, 'vm_edit_extend_selection_down_line')
761 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNEXTEND) 760 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNEXTEND)
762 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 761 act.triggered.connect(self.esm.map)
763 self.editActions.append(act) 762 self.editActions.append(act)
764 763
765 act = E5Action(QApplication.translate('ViewManager', 764 act = E5Action(QApplication.translate('ViewManager',
766 'Extend selection left one word part'), 765 'Extend selection left one word part'),
767 QApplication.translate('ViewManager', 766 QApplication.translate('ViewManager',
769 QKeySequence(QApplication.translate('ViewManager', 768 QKeySequence(QApplication.translate('ViewManager',
770 'Alt+Shift+Left')), 769 'Alt+Shift+Left')),
771 0, 770 0,
772 self.editorActGrp, 'vm_edit_extend_selection_left_word_part') 771 self.editorActGrp, 'vm_edit_extend_selection_left_word_part')
773 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFTEXTEND) 772 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFTEXTEND)
774 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 773 act.triggered.connect(self.esm.map)
775 self.editActions.append(act) 774 self.editActions.append(act)
776 775
777 act = E5Action(QApplication.translate('ViewManager', 776 act = E5Action(QApplication.translate('ViewManager',
778 'Extend selection right one word part'), 777 'Extend selection right one word part'),
779 QApplication.translate('ViewManager', 778 QApplication.translate('ViewManager',
781 QKeySequence(QApplication.translate('ViewManager', 780 QKeySequence(QApplication.translate('ViewManager',
782 'Alt+Shift+Right')), 781 'Alt+Shift+Right')),
783 0, 782 0,
784 self.editorActGrp, 'vm_edit_extend_selection_right_word_part') 783 self.editorActGrp, 'vm_edit_extend_selection_right_word_part')
785 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND) 784 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND)
786 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 785 act.triggered.connect(self.esm.map)
787 self.editActions.append(act) 786 self.editActions.append(act)
788 787
789 act = E5Action(QApplication.translate('ViewManager', 788 act = E5Action(QApplication.translate('ViewManager',
790 'Extend selection left one word'), 789 'Extend selection left one word'),
791 QApplication.translate('ViewManager', 790 QApplication.translate('ViewManager',
793 QKeySequence(QApplication.translate('ViewManager', 792 QKeySequence(QApplication.translate('ViewManager',
794 'Ctrl+Shift+Left')), 793 'Ctrl+Shift+Left')),
795 0, 794 0,
796 self.editorActGrp, 'vm_edit_extend_selection_left_word') 795 self.editorActGrp, 'vm_edit_extend_selection_left_word')
797 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEXTEND) 796 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEXTEND)
798 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 797 act.triggered.connect(self.esm.map)
799 self.editActions.append(act) 798 self.editActions.append(act)
800 799
801 act = E5Action(QApplication.translate('ViewManager', 800 act = E5Action(QApplication.translate('ViewManager',
802 'Extend selection right one word'), 801 'Extend selection right one word'),
803 QApplication.translate('ViewManager', 802 QApplication.translate('ViewManager',
805 QKeySequence(QApplication.translate('ViewManager', 804 QKeySequence(QApplication.translate('ViewManager',
806 'Ctrl+Shift+Right')), 805 'Ctrl+Shift+Right')),
807 0, 806 0,
808 self.editorActGrp, 'vm_edit_extend_selection_right_word') 807 self.editorActGrp, 'vm_edit_extend_selection_right_word')
809 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEXTEND) 808 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEXTEND)
810 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 809 act.triggered.connect(self.esm.map)
811 self.editActions.append(act) 810 self.editActions.append(act)
812 811
813 act = E5Action(QApplication.translate('ViewManager', 812 act = E5Action(QApplication.translate('ViewManager',
814 'Extend selection to first visible character in line'), 813 'Extend selection to first visible character in line'),
815 QApplication.translate('ViewManager', 814 QApplication.translate('ViewManager',
816 'Extend selection to first visible character in line'), 815 'Extend selection to first visible character in line'),
817 QKeySequence(QApplication.translate('ViewManager', 'Shift+Home')), 816 QKeySequence(QApplication.translate('ViewManager', 'Shift+Home')),
818 0, 817 0,
819 self.editorActGrp, 'vm_edit_extend_selection_first_visible_char') 818 self.editorActGrp, 'vm_edit_extend_selection_first_visible_char')
820 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEEXTEND) 819 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEEXTEND)
821 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 820 act.triggered.connect(self.esm.map)
822 self.editActions.append(act) 821 self.editActions.append(act)
823 822
824 act = E5Action(QApplication.translate('ViewManager', 823 act = E5Action(QApplication.translate('ViewManager',
825 'Extend selection to start of line'), 824 'Extend selection to start of line'),
826 QApplication.translate('ViewManager', 825 QApplication.translate('ViewManager',
828 QKeySequence(QApplication.translate('ViewManager', 827 QKeySequence(QApplication.translate('ViewManager',
829 'Alt+Shift+Home')), 828 'Alt+Shift+Home')),
830 0, 829 0,
831 self.editorActGrp, 'vm_edit_extend_selection_start_line') 830 self.editorActGrp, 'vm_edit_extend_selection_start_line')
832 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAYEXTEND) 831 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAYEXTEND)
833 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 832 act.triggered.connect(self.esm.map)
834 self.editActions.append(act) 833 self.editActions.append(act)
835 834
836 act = E5Action(QApplication.translate('ViewManager', 835 act = E5Action(QApplication.translate('ViewManager',
837 'Extend selection to end of line'), 836 'Extend selection to end of line'),
838 QApplication.translate('ViewManager', 837 QApplication.translate('ViewManager',
839 'Extend selection to end of line'), 838 'Extend selection to end of line'),
840 QKeySequence(QApplication.translate('ViewManager', 'Shift+End')), 0, 839 QKeySequence(QApplication.translate('ViewManager', 'Shift+End')), 0,
841 self.editorActGrp, 'vm_edit_extend_selection_end_line') 840 self.editorActGrp, 'vm_edit_extend_selection_end_line')
842 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDEXTEND) 841 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDEXTEND)
843 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 842 act.triggered.connect(self.esm.map)
844 self.editActions.append(act) 843 self.editActions.append(act)
845 844
846 act = E5Action(QApplication.translate('ViewManager', 845 act = E5Action(QApplication.translate('ViewManager',
847 'Extend selection up one paragraph'), 846 'Extend selection up one paragraph'),
848 QApplication.translate('ViewManager', 847 QApplication.translate('ViewManager',
849 'Extend selection up one paragraph'), 848 'Extend selection up one paragraph'),
850 QKeySequence(QApplication.translate('ViewManager', 'Alt+Shift+Up')), 849 QKeySequence(QApplication.translate('ViewManager', 'Alt+Shift+Up')),
851 0, 850 0,
852 self.editorActGrp, 'vm_edit_extend_selection_up_para') 851 self.editorActGrp, 'vm_edit_extend_selection_up_para')
853 self.esm.setMapping(act, QsciScintilla.SCI_PARAUPEXTEND) 852 self.esm.setMapping(act, QsciScintilla.SCI_PARAUPEXTEND)
854 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 853 act.triggered.connect(self.esm.map)
855 self.editActions.append(act) 854 self.editActions.append(act)
856 855
857 act = E5Action(QApplication.translate('ViewManager', 856 act = E5Action(QApplication.translate('ViewManager',
858 'Extend selection down one paragraph'), 857 'Extend selection down one paragraph'),
859 QApplication.translate('ViewManager', 858 QApplication.translate('ViewManager',
861 QKeySequence(QApplication.translate('ViewManager', 860 QKeySequence(QApplication.translate('ViewManager',
862 'Alt+Shift+Down')), 861 'Alt+Shift+Down')),
863 0, 862 0,
864 self.editorActGrp, 'vm_edit_extend_selection_down_para') 863 self.editorActGrp, 'vm_edit_extend_selection_down_para')
865 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWNEXTEND) 864 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWNEXTEND)
866 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 865 act.triggered.connect(self.esm.map)
867 self.editActions.append(act) 866 self.editActions.append(act)
868 867
869 act = E5Action(QApplication.translate('ViewManager', 868 act = E5Action(QApplication.translate('ViewManager',
870 'Extend selection up one page'), 869 'Extend selection up one page'),
871 QApplication.translate('ViewManager', 870 QApplication.translate('ViewManager',
872 'Extend selection up one page'), 871 'Extend selection up one page'),
873 QKeySequence(QApplication.translate('ViewManager', 'Shift+PgUp')), 872 QKeySequence(QApplication.translate('ViewManager', 'Shift+PgUp')),
874 0, 873 0,
875 self.editorActGrp, 'vm_edit_extend_selection_up_page') 874 self.editorActGrp, 'vm_edit_extend_selection_up_page')
876 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPEXTEND) 875 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPEXTEND)
877 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 876 act.triggered.connect(self.esm.map)
878 self.editActions.append(act) 877 self.editActions.append(act)
879 878
880 act = E5Action(QApplication.translate('ViewManager', 879 act = E5Action(QApplication.translate('ViewManager',
881 'Extend selection down one page'), 880 'Extend selection down one page'),
882 QApplication.translate('ViewManager', 881 QApplication.translate('ViewManager',
883 'Extend selection down one page'), 882 'Extend selection down one page'),
884 QKeySequence(QApplication.translate('ViewManager', 'Shift+PgDown')), 883 QKeySequence(QApplication.translate('ViewManager', 'Shift+PgDown')),
885 0, 884 0,
886 self.editorActGrp, 'vm_edit_extend_selection_down_page') 885 self.editorActGrp, 'vm_edit_extend_selection_down_page')
887 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNEXTEND) 886 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNEXTEND)
888 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 887 act.triggered.connect(self.esm.map)
889 self.editActions.append(act) 888 self.editActions.append(act)
890 889
891 act = E5Action(QApplication.translate('ViewManager', 890 act = E5Action(QApplication.translate('ViewManager',
892 'Extend selection to start of text'), 891 'Extend selection to start of text'),
893 QApplication.translate('ViewManager', 892 QApplication.translate('ViewManager',
895 QKeySequence(QApplication.translate('ViewManager', 894 QKeySequence(QApplication.translate('ViewManager',
896 'Ctrl+Shift+Home')), 895 'Ctrl+Shift+Home')),
897 0, 896 0,
898 self.editorActGrp, 'vm_edit_extend_selection_start_text') 897 self.editorActGrp, 'vm_edit_extend_selection_start_text')
899 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTARTEXTEND) 898 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTARTEXTEND)
900 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 899 act.triggered.connect(self.esm.map)
901 self.editActions.append(act) 900 self.editActions.append(act)
902 901
903 act = E5Action(QApplication.translate('ViewManager', 902 act = E5Action(QApplication.translate('ViewManager',
904 'Extend selection to end of text'), 903 'Extend selection to end of text'),
905 QApplication.translate('ViewManager', 904 QApplication.translate('ViewManager',
907 QKeySequence(QApplication.translate('ViewManager', 906 QKeySequence(QApplication.translate('ViewManager',
908 'Ctrl+Shift+End')), 907 'Ctrl+Shift+End')),
909 0, 908 0,
910 self.editorActGrp, 'vm_edit_extend_selection_end_text') 909 self.editorActGrp, 'vm_edit_extend_selection_end_text')
911 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTENDEXTEND) 910 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTENDEXTEND)
912 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 911 act.triggered.connect(self.esm.map)
913 self.editActions.append(act) 912 self.editActions.append(act)
914 913
915 act = E5Action(QApplication.translate('ViewManager', 914 act = E5Action(QApplication.translate('ViewManager',
916 'Delete previous character'), 915 'Delete previous character'),
917 QApplication.translate('ViewManager', 'Delete previous character'), 916 QApplication.translate('ViewManager', 'Delete previous character'),
918 QKeySequence(QApplication.translate('ViewManager', 'Backspace')), 917 QKeySequence(QApplication.translate('ViewManager', 'Backspace')),
919 QKeySequence(QApplication.translate('ViewManager', 918 QKeySequence(QApplication.translate('ViewManager',
920 'Shift+Backspace')), 919 'Shift+Backspace')),
921 self.editorActGrp, 'vm_edit_delete_previous_char') 920 self.editorActGrp, 'vm_edit_delete_previous_char')
922 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACK) 921 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACK)
923 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 922 act.triggered.connect(self.esm.map)
924 self.editActions.append(act) 923 self.editActions.append(act)
925 924
926 act = E5Action(QApplication.translate('ViewManager', 925 act = E5Action(QApplication.translate('ViewManager',
927 'Delete previous character if not at line start'), 926 'Delete previous character if not at line start'),
928 QApplication.translate('ViewManager', 927 QApplication.translate('ViewManager',
929 'Delete previous character if not at line start'), 928 'Delete previous character if not at line start'),
930 0, 0, 929 0, 0,
931 self.editorActGrp, 'vm_edit_delet_previous_char_not_line_start') 930 self.editorActGrp, 'vm_edit_delet_previous_char_not_line_start')
932 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACKNOTLINE) 931 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACKNOTLINE)
933 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 932 act.triggered.connect(self.esm.map)
934 self.editActions.append(act) 933 self.editActions.append(act)
935 934
936 act = E5Action(QApplication.translate('ViewManager', 'Delete current character'), 935 act = E5Action(QApplication.translate('ViewManager', 'Delete current character'),
937 QApplication.translate('ViewManager', 'Delete current character'), 936 QApplication.translate('ViewManager', 'Delete current character'),
938 QKeySequence(QApplication.translate('ViewManager', 'Del')), 0, 937 QKeySequence(QApplication.translate('ViewManager', 'Del')), 0,
939 self.editorActGrp, 'vm_edit_delete_current_char') 938 self.editorActGrp, 'vm_edit_delete_current_char')
940 self.esm.setMapping(act, QsciScintilla.SCI_CLEAR) 939 self.esm.setMapping(act, QsciScintilla.SCI_CLEAR)
941 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 940 act.triggered.connect(self.esm.map)
942 self.editActions.append(act) 941 self.editActions.append(act)
943 942
944 act = E5Action(QApplication.translate('ViewManager', 'Delete word to left'), 943 act = E5Action(QApplication.translate('ViewManager', 'Delete word to left'),
945 QApplication.translate('ViewManager', 'Delete word to left'), 944 QApplication.translate('ViewManager', 'Delete word to left'),
946 QKeySequence(QApplication.translate('ViewManager', 945 QKeySequence(QApplication.translate('ViewManager',
947 'Ctrl+Backspace')), 946 'Ctrl+Backspace')),
948 0, 947 0,
949 self.editorActGrp, 'vm_edit_delete_word_left') 948 self.editorActGrp, 'vm_edit_delete_word_left')
950 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDLEFT) 949 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDLEFT)
951 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 950 act.triggered.connect(self.esm.map)
952 self.editActions.append(act) 951 self.editActions.append(act)
953 952
954 act = E5Action(QApplication.translate('ViewManager', 'Delete word to right'), 953 act = E5Action(QApplication.translate('ViewManager', 'Delete word to right'),
955 QApplication.translate('ViewManager', 'Delete word to right'), 954 QApplication.translate('ViewManager', 'Delete word to right'),
956 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Del')), 0, 955 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Del')), 0,
957 self.editorActGrp, 'vm_edit_delete_word_right') 956 self.editorActGrp, 'vm_edit_delete_word_right')
958 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHT) 957 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHT)
959 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 958 act.triggered.connect(self.esm.map)
960 self.editActions.append(act) 959 self.editActions.append(act)
961 960
962 act = E5Action(QApplication.translate('ViewManager', 'Delete line to left'), 961 act = E5Action(QApplication.translate('ViewManager', 'Delete line to left'),
963 QApplication.translate('ViewManager', 'Delete line to left'), 962 QApplication.translate('ViewManager', 'Delete line to left'),
964 QKeySequence(QApplication.translate('ViewManager', 963 QKeySequence(QApplication.translate('ViewManager',
965 'Ctrl+Shift+Backspace')), 964 'Ctrl+Shift+Backspace')),
966 0, 965 0,
967 self.editorActGrp, 'vm_edit_delete_line_left') 966 self.editorActGrp, 'vm_edit_delete_line_left')
968 self.esm.setMapping(act, QsciScintilla.SCI_DELLINELEFT) 967 self.esm.setMapping(act, QsciScintilla.SCI_DELLINELEFT)
969 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 968 act.triggered.connect(self.esm.map)
970 self.editActions.append(act) 969 self.editActions.append(act)
971 970
972 act = E5Action(QApplication.translate('ViewManager', 'Delete line to right'), 971 act = E5Action(QApplication.translate('ViewManager', 'Delete line to right'),
973 QApplication.translate('ViewManager', 'Delete line to right'), 972 QApplication.translate('ViewManager', 'Delete line to right'),
974 QKeySequence(QApplication.translate('ViewManager', 973 QKeySequence(QApplication.translate('ViewManager',
975 'Ctrl+Shift+Del')), 974 'Ctrl+Shift+Del')),
976 0, 975 0,
977 self.editorActGrp, 'vm_edit_delete_line_right') 976 self.editorActGrp, 'vm_edit_delete_line_right')
978 self.esm.setMapping(act, QsciScintilla.SCI_DELLINERIGHT) 977 self.esm.setMapping(act, QsciScintilla.SCI_DELLINERIGHT)
979 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 978 act.triggered.connect(self.esm.map)
980 self.editActions.append(act) 979 self.editActions.append(act)
981 980
982 act = E5Action(QApplication.translate('ViewManager', 'Insert new line'), 981 act = E5Action(QApplication.translate('ViewManager', 'Insert new line'),
983 QApplication.translate('ViewManager', 'Insert new line'), 982 QApplication.translate('ViewManager', 'Insert new line'),
984 QKeySequence(QApplication.translate('ViewManager', 'Return')), 983 QKeySequence(QApplication.translate('ViewManager', 'Return')),
985 QKeySequence(QApplication.translate('ViewManager', 'Enter')), 984 QKeySequence(QApplication.translate('ViewManager', 'Enter')),
986 self.editorActGrp, 'vm_edit_insert_line') 985 self.editorActGrp, 'vm_edit_insert_line')
987 self.esm.setMapping(act, QsciScintilla.SCI_NEWLINE) 986 self.esm.setMapping(act, QsciScintilla.SCI_NEWLINE)
988 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 987 act.triggered.connect(self.esm.map)
989 self.editActions.append(act) 988 self.editActions.append(act)
990 989
991 act = E5Action(QApplication.translate('ViewManager', 990 act = E5Action(QApplication.translate('ViewManager',
992 'Insert new line below current line'), 991 'Insert new line below current line'),
993 QApplication.translate('ViewManager', 992 QApplication.translate('ViewManager',
994 'Insert new line below current line'), 993 'Insert new line below current line'),
995 QKeySequence(QApplication.translate('ViewManager', 'Shift+Return')), 994 QKeySequence(QApplication.translate('ViewManager', 'Shift+Return')),
996 QKeySequence(QApplication.translate('ViewManager', 'Shift+Enter')), 995 QKeySequence(QApplication.translate('ViewManager', 'Shift+Enter')),
997 self.editorActGrp, 'vm_edit_insert_line_below') 996 self.editorActGrp, 'vm_edit_insert_line_below')
998 self.connect(act, SIGNAL('triggered()'), self.__textEdit.newLineBelow) 997 act.triggered.connect(self.__textEdit.newLineBelow)
999 self.editActions.append(act) 998 self.editActions.append(act)
1000 999
1001 act = E5Action(QApplication.translate('ViewManager', 'Delete current line'), 1000 act = E5Action(QApplication.translate('ViewManager', 'Delete current line'),
1002 QApplication.translate('ViewManager', 'Delete current line'), 1001 QApplication.translate('ViewManager', 'Delete current line'),
1003 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+U')), 1002 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+U')),
1004 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Shift+L')), 1003 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Shift+L')),
1005 self.editorActGrp, 'vm_edit_delete_current_line') 1004 self.editorActGrp, 'vm_edit_delete_current_line')
1006 self.esm.setMapping(act, QsciScintilla.SCI_LINEDELETE) 1005 self.esm.setMapping(act, QsciScintilla.SCI_LINEDELETE)
1007 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1006 act.triggered.connect(self.esm.map)
1008 self.editActions.append(act) 1007 self.editActions.append(act)
1009 1008
1010 act = E5Action(QApplication.translate('ViewManager', 'Duplicate current line'), 1009 act = E5Action(QApplication.translate('ViewManager', 'Duplicate current line'),
1011 QApplication.translate('ViewManager', 'Duplicate current line'), 1010 QApplication.translate('ViewManager', 'Duplicate current line'),
1012 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+D')), 0, 1011 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+D')), 0,
1013 self.editorActGrp, 'vm_edit_duplicate_current_line') 1012 self.editorActGrp, 'vm_edit_duplicate_current_line')
1014 self.esm.setMapping(act, QsciScintilla.SCI_LINEDUPLICATE) 1013 self.esm.setMapping(act, QsciScintilla.SCI_LINEDUPLICATE)
1015 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1014 act.triggered.connect(self.esm.map)
1016 self.editActions.append(act) 1015 self.editActions.append(act)
1017 1016
1018 act = E5Action(QApplication.translate('ViewManager', 1017 act = E5Action(QApplication.translate('ViewManager',
1019 'Swap current and previous lines'), 1018 'Swap current and previous lines'),
1020 QApplication.translate('ViewManager', 1019 QApplication.translate('ViewManager',
1021 'Swap current and previous lines'), 1020 'Swap current and previous lines'),
1022 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+T')), 0, 1021 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+T')), 0,
1023 self.editorActGrp, 'vm_edit_swap_current_previous_line') 1022 self.editorActGrp, 'vm_edit_swap_current_previous_line')
1024 self.esm.setMapping(act, QsciScintilla.SCI_LINETRANSPOSE) 1023 self.esm.setMapping(act, QsciScintilla.SCI_LINETRANSPOSE)
1025 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1024 act.triggered.connect(self.esm.map)
1026 self.editActions.append(act) 1025 self.editActions.append(act)
1027 1026
1028 act = E5Action(QApplication.translate('ViewManager', 'Cut current line'), 1027 act = E5Action(QApplication.translate('ViewManager', 'Cut current line'),
1029 QApplication.translate('ViewManager', 'Cut current line'), 1028 QApplication.translate('ViewManager', 'Cut current line'),
1030 QKeySequence(QApplication.translate('ViewManager', 'Alt+Shift+L')), 1029 QKeySequence(QApplication.translate('ViewManager', 'Alt+Shift+L')),
1031 0, 1030 0,
1032 self.editorActGrp, 'vm_edit_cut_current_line') 1031 self.editorActGrp, 'vm_edit_cut_current_line')
1033 self.esm.setMapping(act, QsciScintilla.SCI_LINECUT) 1032 self.esm.setMapping(act, QsciScintilla.SCI_LINECUT)
1034 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1033 act.triggered.connect(self.esm.map)
1035 self.editActions.append(act) 1034 self.editActions.append(act)
1036 1035
1037 act = E5Action(QApplication.translate('ViewManager', 'Copy current line'), 1036 act = E5Action(QApplication.translate('ViewManager', 'Copy current line'),
1038 QApplication.translate('ViewManager', 'Copy current line'), 1037 QApplication.translate('ViewManager', 'Copy current line'),
1039 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Shift+T')), 1038 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Shift+T')),
1040 0, 1039 0,
1041 self.editorActGrp, 'vm_edit_copy_current_line') 1040 self.editorActGrp, 'vm_edit_copy_current_line')
1042 self.esm.setMapping(act, QsciScintilla.SCI_LINECOPY) 1041 self.esm.setMapping(act, QsciScintilla.SCI_LINECOPY)
1043 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1042 act.triggered.connect(self.esm.map)
1044 self.editActions.append(act) 1043 self.editActions.append(act)
1045 1044
1046 act = E5Action(QApplication.translate('ViewManager', 'Toggle insert/overtype'), 1045 act = E5Action(QApplication.translate('ViewManager', 'Toggle insert/overtype'),
1047 QApplication.translate('ViewManager', 'Toggle insert/overtype'), 1046 QApplication.translate('ViewManager', 'Toggle insert/overtype'),
1048 QKeySequence(QApplication.translate('ViewManager', 'Ins')), 0, 1047 QKeySequence(QApplication.translate('ViewManager', 'Ins')), 0,
1049 self.editorActGrp, 'vm_edit_toggle_insert_overtype') 1048 self.editorActGrp, 'vm_edit_toggle_insert_overtype')
1050 self.esm.setMapping(act, QsciScintilla.SCI_EDITTOGGLEOVERTYPE) 1049 self.esm.setMapping(act, QsciScintilla.SCI_EDITTOGGLEOVERTYPE)
1051 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1050 act.triggered.connect(self.esm.map)
1052 self.editActions.append(act) 1051 self.editActions.append(act)
1053 1052
1054 act = E5Action(QApplication.translate('ViewManager', 1053 act = E5Action(QApplication.translate('ViewManager',
1055 'Convert selection to lower case'), 1054 'Convert selection to lower case'),
1056 QApplication.translate('ViewManager', 1055 QApplication.translate('ViewManager',
1057 'Convert selection to lower case'), 1056 'Convert selection to lower case'),
1058 QKeySequence(QApplication.translate('ViewManager', 'Alt+Shift+U')), 1057 QKeySequence(QApplication.translate('ViewManager', 'Alt+Shift+U')),
1059 0, 1058 0,
1060 self.editorActGrp, 'vm_edit_convert_selection_lower') 1059 self.editorActGrp, 'vm_edit_convert_selection_lower')
1061 self.esm.setMapping(act, QsciScintilla.SCI_LOWERCASE) 1060 self.esm.setMapping(act, QsciScintilla.SCI_LOWERCASE)
1062 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1061 act.triggered.connect(self.esm.map)
1063 self.editActions.append(act) 1062 self.editActions.append(act)
1064 1063
1065 act = E5Action(QApplication.translate('ViewManager', 1064 act = E5Action(QApplication.translate('ViewManager',
1066 'Convert selection to upper case'), 1065 'Convert selection to upper case'),
1067 QApplication.translate('ViewManager', 1066 QApplication.translate('ViewManager',
1068 'Convert selection to upper case'), 1067 'Convert selection to upper case'),
1069 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Shift+U')), 1068 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Shift+U')),
1070 0, 1069 0,
1071 self.editorActGrp, 'vm_edit_convert_selection_upper') 1070 self.editorActGrp, 'vm_edit_convert_selection_upper')
1072 self.esm.setMapping(act, QsciScintilla.SCI_UPPERCASE) 1071 self.esm.setMapping(act, QsciScintilla.SCI_UPPERCASE)
1073 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1072 act.triggered.connect(self.esm.map)
1074 self.editActions.append(act) 1073 self.editActions.append(act)
1075 1074
1076 act = E5Action(QApplication.translate('ViewManager', 1075 act = E5Action(QApplication.translate('ViewManager',
1077 'Move to end of displayed line'), 1076 'Move to end of displayed line'),
1078 QApplication.translate('ViewManager', 1077 QApplication.translate('ViewManager',
1079 'Move to end of displayed line'), 1078 'Move to end of displayed line'),
1080 QKeySequence(QApplication.translate('ViewManager', 'Alt+End')), 0, 1079 QKeySequence(QApplication.translate('ViewManager', 'Alt+End')), 0,
1081 self.editorActGrp, 'vm_edit_move_end_displayed_line') 1080 self.editorActGrp, 'vm_edit_move_end_displayed_line')
1082 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAY) 1081 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAY)
1083 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1082 act.triggered.connect(self.esm.map)
1084 self.editActions.append(act) 1083 self.editActions.append(act)
1085 1084
1086 act = E5Action(QApplication.translate('ViewManager', 1085 act = E5Action(QApplication.translate('ViewManager',
1087 'Extend selection to end of displayed line'), 1086 'Extend selection to end of displayed line'),
1088 QApplication.translate('ViewManager', 1087 QApplication.translate('ViewManager',
1089 'Extend selection to end of displayed line'), 1088 'Extend selection to end of displayed line'),
1090 0, 0, 1089 0, 0,
1091 self.editorActGrp, 'vm_edit_extend_selection_end_displayed_line') 1090 self.editorActGrp, 'vm_edit_extend_selection_end_displayed_line')
1092 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAYEXTEND) 1091 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAYEXTEND)
1093 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1092 act.triggered.connect(self.esm.map)
1094 self.editActions.append(act) 1093 self.editActions.append(act)
1095 1094
1096 act = E5Action(QApplication.translate('ViewManager', 'Formfeed'), 1095 act = E5Action(QApplication.translate('ViewManager', 'Formfeed'),
1097 QApplication.translate('ViewManager', 'Formfeed'), 1096 QApplication.translate('ViewManager', 'Formfeed'),
1098 0, 0, 1097 0, 0,
1099 self.editorActGrp, 'vm_edit_formfeed') 1098 self.editorActGrp, 'vm_edit_formfeed')
1100 self.esm.setMapping(act, QsciScintilla.SCI_FORMFEED) 1099 self.esm.setMapping(act, QsciScintilla.SCI_FORMFEED)
1101 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1100 act.triggered.connect(self.esm.map)
1102 self.editActions.append(act) 1101 self.editActions.append(act)
1103 1102
1104 act = E5Action(QApplication.translate('ViewManager', 'Escape'), 1103 act = E5Action(QApplication.translate('ViewManager', 'Escape'),
1105 QApplication.translate('ViewManager', 'Escape'), 1104 QApplication.translate('ViewManager', 'Escape'),
1106 QKeySequence(QApplication.translate('ViewManager', 'Esc')), 0, 1105 QKeySequence(QApplication.translate('ViewManager', 'Esc')), 0,
1107 self.editorActGrp, 'vm_edit_escape') 1106 self.editorActGrp, 'vm_edit_escape')
1108 self.esm.setMapping(act, QsciScintilla.SCI_CANCEL) 1107 self.esm.setMapping(act, QsciScintilla.SCI_CANCEL)
1109 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1108 act.triggered.connect(self.esm.map)
1110 self.editActions.append(act) 1109 self.editActions.append(act)
1111 1110
1112 act = E5Action(QApplication.translate('ViewManager', 1111 act = E5Action(QApplication.translate('ViewManager',
1113 'Extend rectangular selection down one line'), 1112 'Extend rectangular selection down one line'),
1114 QApplication.translate('ViewManager', 1113 QApplication.translate('ViewManager',
1116 QKeySequence(QApplication.translate('ViewManager', 1115 QKeySequence(QApplication.translate('ViewManager',
1117 'Alt+Ctrl+Down')), 1116 'Alt+Ctrl+Down')),
1118 0, 1117 0,
1119 self.editorActGrp, 'vm_edit_extend_rect_selection_down_line') 1118 self.editorActGrp, 'vm_edit_extend_rect_selection_down_line')
1120 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNRECTEXTEND) 1119 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNRECTEXTEND)
1121 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1120 act.triggered.connect(self.esm.map)
1122 self.editActions.append(act) 1121 self.editActions.append(act)
1123 1122
1124 act = E5Action(QApplication.translate('ViewManager', 1123 act = E5Action(QApplication.translate('ViewManager',
1125 'Extend rectangular selection up one line'), 1124 'Extend rectangular selection up one line'),
1126 QApplication.translate('ViewManager', 1125 QApplication.translate('ViewManager',
1127 'Extend rectangular selection up one line'), 1126 'Extend rectangular selection up one line'),
1128 QKeySequence(QApplication.translate('ViewManager', 'Alt+Ctrl+Up')), 1127 QKeySequence(QApplication.translate('ViewManager', 'Alt+Ctrl+Up')),
1129 0, 1128 0,
1130 self.editorActGrp, 'vm_edit_extend_rect_selection_up_line') 1129 self.editorActGrp, 'vm_edit_extend_rect_selection_up_line')
1131 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPRECTEXTEND) 1130 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPRECTEXTEND)
1132 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1131 act.triggered.connect(self.esm.map)
1133 self.editActions.append(act) 1132 self.editActions.append(act)
1134 1133
1135 act = E5Action(QApplication.translate('ViewManager', 1134 act = E5Action(QApplication.translate('ViewManager',
1136 'Extend rectangular selection left one character'), 1135 'Extend rectangular selection left one character'),
1137 QApplication.translate('ViewManager', 1136 QApplication.translate('ViewManager',
1139 QKeySequence(QApplication.translate('ViewManager', 1138 QKeySequence(QApplication.translate('ViewManager',
1140 'Alt+Ctrl+Left')), 1139 'Alt+Ctrl+Left')),
1141 0, 1140 0,
1142 self.editorActGrp, 'vm_edit_extend_rect_selection_left_char') 1141 self.editorActGrp, 'vm_edit_extend_rect_selection_left_char')
1143 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTRECTEXTEND) 1142 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTRECTEXTEND)
1144 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1143 act.triggered.connect(self.esm.map)
1145 self.editActions.append(act) 1144 self.editActions.append(act)
1146 1145
1147 act = E5Action(QApplication.translate('ViewManager', 1146 act = E5Action(QApplication.translate('ViewManager',
1148 'Extend rectangular selection right one character'), 1147 'Extend rectangular selection right one character'),
1149 QApplication.translate('ViewManager', 1148 QApplication.translate('ViewManager',
1151 QKeySequence(QApplication.translate('ViewManager', 1150 QKeySequence(QApplication.translate('ViewManager',
1152 'Alt+Ctrl+Right')), 1151 'Alt+Ctrl+Right')),
1153 0, 1152 0,
1154 self.editorActGrp, 'vm_edit_extend_rect_selection_right_char') 1153 self.editorActGrp, 'vm_edit_extend_rect_selection_right_char')
1155 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTRECTEXTEND) 1154 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTRECTEXTEND)
1156 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1155 act.triggered.connect(self.esm.map)
1157 self.editActions.append(act) 1156 self.editActions.append(act)
1158 1157
1159 act = E5Action(QApplication.translate('ViewManager', 1158 act = E5Action(QApplication.translate('ViewManager',
1160 'Extend rectangular selection to first' 1159 'Extend rectangular selection to first'
1161 ' visible character in line'), 1160 ' visible character in line'),
1166 'Alt+Ctrl+Home')), 1165 'Alt+Ctrl+Home')),
1167 0, 1166 0,
1168 self.editorActGrp, 1167 self.editorActGrp,
1169 'vm_edit_extend_rect_selection_first_visible_char') 1168 'vm_edit_extend_rect_selection_first_visible_char')
1170 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMERECTEXTEND) 1169 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMERECTEXTEND)
1171 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1170 act.triggered.connect(self.esm.map)
1172 self.editActions.append(act) 1171 self.editActions.append(act)
1173 1172
1174 act = E5Action(QApplication.translate('ViewManager', 1173 act = E5Action(QApplication.translate('ViewManager',
1175 'Extend rectangular selection to end of line'), 1174 'Extend rectangular selection to end of line'),
1176 QApplication.translate('ViewManager', 1175 QApplication.translate('ViewManager',
1177 'Extend rectangular selection to end of line'), 1176 'Extend rectangular selection to end of line'),
1178 QKeySequence(QApplication.translate('ViewManager', 'Alt+Ctrl+End')), 1177 QKeySequence(QApplication.translate('ViewManager', 'Alt+Ctrl+End')),
1179 0, 1178 0,
1180 self.editorActGrp, 'vm_edit_extend_rect_selection_end_line') 1179 self.editorActGrp, 'vm_edit_extend_rect_selection_end_line')
1181 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDRECTEXTEND) 1180 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDRECTEXTEND)
1182 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1181 act.triggered.connect(self.esm.map)
1183 self.editActions.append(act) 1182 self.editActions.append(act)
1184 1183
1185 act = E5Action(QApplication.translate('ViewManager', 1184 act = E5Action(QApplication.translate('ViewManager',
1186 'Extend rectangular selection up one page'), 1185 'Extend rectangular selection up one page'),
1187 QApplication.translate('ViewManager', 1186 QApplication.translate('ViewManager',
1189 QKeySequence(QApplication.translate('ViewManager', 1188 QKeySequence(QApplication.translate('ViewManager',
1190 'Alt+Ctrl+PgUp')), 1189 'Alt+Ctrl+PgUp')),
1191 0, 1190 0,
1192 self.editorActGrp, 'vm_edit_extend_rect_selection_up_page') 1191 self.editorActGrp, 'vm_edit_extend_rect_selection_up_page')
1193 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPRECTEXTEND) 1192 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPRECTEXTEND)
1194 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1193 act.triggered.connect(self.esm.map)
1195 self.editActions.append(act) 1194 self.editActions.append(act)
1196 1195
1197 act = E5Action(QApplication.translate('ViewManager', 1196 act = E5Action(QApplication.translate('ViewManager',
1198 'Extend rectangular selection down one page'), 1197 'Extend rectangular selection down one page'),
1199 QApplication.translate('ViewManager', 1198 QApplication.translate('ViewManager',
1201 QKeySequence(QApplication.translate('ViewManager', 1200 QKeySequence(QApplication.translate('ViewManager',
1202 'Alt+Ctrl+PgDown')), 1201 'Alt+Ctrl+PgDown')),
1203 0, 1202 0,
1204 self.editorActGrp, 'vm_edit_extend_rect_selection_down_page') 1203 self.editorActGrp, 'vm_edit_extend_rect_selection_down_page')
1205 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNRECTEXTEND) 1204 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNRECTEXTEND)
1206 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1205 act.triggered.connect(self.esm.map)
1207 self.editActions.append(act) 1206 self.editActions.append(act)
1208 1207
1209 act = E5Action(QApplication.translate('ViewManager', 1208 act = E5Action(QApplication.translate('ViewManager',
1210 'Duplicate current selection'), 1209 'Duplicate current selection'),
1211 QApplication.translate('ViewManager', 1210 QApplication.translate('ViewManager',
1212 'Duplicate current selection'), 1211 'Duplicate current selection'),
1213 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Shift+D')), 1212 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Shift+D')),
1214 0, 1213 0,
1215 self.editorActGrp, 'vm_edit_duplicate_current_selection') 1214 self.editorActGrp, 'vm_edit_duplicate_current_selection')
1216 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE) 1215 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE)
1217 self.connect(act, SIGNAL('triggered()'), self.esm, SLOT('map()')) 1216 act.triggered.connect(self.esm.map)
1218 self.editActions.append(act) 1217 self.editActions.append(act)
1219 1218
1220 self.__textEdit.addActions(self.editorActGrp.actions()) 1219 self.__textEdit.addActions(self.editorActGrp.actions())
1221 1220
1222 def __createSearchActions(self): 1221 def __createSearchActions(self):
1236 """<b>Search</b>""" 1235 """<b>Search</b>"""
1237 """<p>Search for some text in the current editor. A""" 1236 """<p>Search for some text in the current editor. A"""
1238 """ dialog is shown to enter the searchtext and options""" 1237 """ dialog is shown to enter the searchtext and options"""
1239 """ for the search.</p>""" 1238 """ for the search.</p>"""
1240 )) 1239 ))
1241 self.connect(self.searchAct, SIGNAL('triggered()'), self.__search) 1240 self.searchAct.triggered.connect(self.__search)
1242 self.searchActions.append(self.searchAct) 1241 self.searchActions.append(self.searchAct)
1243 1242
1244 self.searchNextAct = E5Action(QApplication.translate('ViewManager', 1243 self.searchNextAct = E5Action(QApplication.translate('ViewManager',
1245 'Search next'), 1244 'Search next'),
1246 UI.PixmapCache.getIcon("findNext.png"), 1245 UI.PixmapCache.getIcon("findNext.png"),
1254 self.searchNextAct.setWhatsThis(QApplication.translate('ViewManager', 1253 self.searchNextAct.setWhatsThis(QApplication.translate('ViewManager',
1255 """<b>Search next</b>""" 1254 """<b>Search next</b>"""
1256 """<p>Search the next occurrence of some text in the current editor.""" 1255 """<p>Search the next occurrence of some text in the current editor."""
1257 """ The previously entered searchtext and options are reused.</p>""" 1256 """ The previously entered searchtext and options are reused.</p>"""
1258 )) 1257 ))
1259 self.connect(self.searchNextAct, SIGNAL('triggered()'), self.searchDlg.findNext) 1258 self.searchNextAct.triggered.connect(self.searchDlg.findNext)
1260 self.searchActions.append(self.searchNextAct) 1259 self.searchActions.append(self.searchNextAct)
1261 1260
1262 self.searchPrevAct = E5Action(QApplication.translate('ViewManager', 1261 self.searchPrevAct = E5Action(QApplication.translate('ViewManager',
1263 'Search previous'), 1262 'Search previous'),
1264 UI.PixmapCache.getIcon("findPrev.png"), 1263 UI.PixmapCache.getIcon("findPrev.png"),
1272 self.searchPrevAct.setWhatsThis(QApplication.translate('ViewManager', 1271 self.searchPrevAct.setWhatsThis(QApplication.translate('ViewManager',
1273 """<b>Search previous</b>""" 1272 """<b>Search previous</b>"""
1274 """<p>Search the previous occurrence of some text in the current editor.""" 1273 """<p>Search the previous occurrence of some text in the current editor."""
1275 """ The previously entered searchtext and options are reused.</p>""" 1274 """ The previously entered searchtext and options are reused.</p>"""
1276 )) 1275 ))
1277 self.connect(self.searchPrevAct, SIGNAL('triggered()'), self.searchDlg.findPrev) 1276 self.searchPrevAct.triggered.connect(self.searchDlg.findPrev)
1278 self.searchActions.append(self.searchPrevAct) 1277 self.searchActions.append(self.searchPrevAct)
1279 1278
1280 self.searchClearMarkersAct = E5Action(QApplication.translate('ViewManager', 1279 self.searchClearMarkersAct = E5Action(QApplication.translate('ViewManager',
1281 'Clear search markers'), 1280 'Clear search markers'),
1282 UI.PixmapCache.getIcon("findClear.png"), 1281 UI.PixmapCache.getIcon("findClear.png"),
1289 'Clear all displayed search markers')) 1288 'Clear all displayed search markers'))
1290 self.searchClearMarkersAct.setWhatsThis(QApplication.translate('ViewManager', 1289 self.searchClearMarkersAct.setWhatsThis(QApplication.translate('ViewManager',
1291 """<b>Clear search markers</b>""" 1290 """<b>Clear search markers</b>"""
1292 """<p>Clear all displayed search markers.</p>""" 1291 """<p>Clear all displayed search markers.</p>"""
1293 )) 1292 ))
1294 self.connect(self.searchClearMarkersAct, SIGNAL('triggered()'), 1293 self.searchClearMarkersAct.triggered.connect(self.__searchClearMarkers)
1295 self.__searchClearMarkers)
1296 self.searchActions.append(self.searchClearMarkersAct) 1294 self.searchActions.append(self.searchClearMarkersAct)
1297 1295
1298 self.replaceAct = E5Action(QApplication.translate('ViewManager', 'Replace'), 1296 self.replaceAct = E5Action(QApplication.translate('ViewManager', 'Replace'),
1299 QApplication.translate('ViewManager', '&Replace...'), 1297 QApplication.translate('ViewManager', '&Replace...'),
1300 QKeySequence(QApplication.translate('ViewManager', 1298 QKeySequence(QApplication.translate('ViewManager',
1307 """<b>Replace</b>""" 1305 """<b>Replace</b>"""
1308 """<p>Search for some text in the current editor and replace it. A""" 1306 """<p>Search for some text in the current editor and replace it. A"""
1309 """ dialog is shown to enter the searchtext, the replacement text""" 1307 """ dialog is shown to enter the searchtext, the replacement text"""
1310 """ and options for the search and replace.</p>""" 1308 """ and options for the search and replace.</p>"""
1311 )) 1309 ))
1312 self.connect(self.replaceAct, SIGNAL('triggered()'), self.__replace) 1310 self.replaceAct.triggered.connect(self.__replace)
1313 self.searchActions.append(self.replaceAct) 1311 self.searchActions.append(self.replaceAct)
1314 1312
1315 def __createHelpActions(self): 1313 def __createHelpActions(self):
1316 """ 1314 """
1317 Private method to create the Help actions. 1315 Private method to create the Help actions.
1321 0, 0, self, 'about_eric') 1319 0, 0, self, 'about_eric')
1322 self.aboutAct.setStatusTip(self.trUtf8('Display information about this software')) 1320 self.aboutAct.setStatusTip(self.trUtf8('Display information about this software'))
1323 self.aboutAct.setWhatsThis(self.trUtf8( 1321 self.aboutAct.setWhatsThis(self.trUtf8(
1324 """<b>About</b>""" 1322 """<b>About</b>"""
1325 """<p>Display some information about this software.</p>""")) 1323 """<p>Display some information about this software.</p>"""))
1326 self.connect(self.aboutAct, SIGNAL('triggered()'), self.__about) 1324 self.aboutAct.triggered.connect(self.__about)
1327 self.helpActions.append(self.aboutAct) 1325 self.helpActions.append(self.aboutAct)
1328 1326
1329 self.aboutQtAct = E5Action(self.trUtf8('About Qt'), 1327 self.aboutQtAct = E5Action(self.trUtf8('About Qt'),
1330 self.trUtf8('About &Qt'), 0, 0, self, 'about_qt') 1328 self.trUtf8('About &Qt'), 0, 0, self, 'about_qt')
1331 self.aboutQtAct.setStatusTip(\ 1329 self.aboutQtAct.setStatusTip(\
1332 self.trUtf8('Display information about the Qt toolkit')) 1330 self.trUtf8('Display information about the Qt toolkit'))
1333 self.aboutQtAct.setWhatsThis(self.trUtf8( 1331 self.aboutQtAct.setWhatsThis(self.trUtf8(
1334 """<b>About Qt</b>""" 1332 """<b>About Qt</b>"""
1335 """<p>Display some information about the Qt toolkit.</p>""" 1333 """<p>Display some information about the Qt toolkit.</p>"""
1336 )) 1334 ))
1337 self.connect(self.aboutQtAct, SIGNAL('triggered()'), self.__aboutQt) 1335 self.aboutQtAct.triggered.connect(self.__aboutQt)
1338 self.helpActions.append(self.aboutQtAct) 1336 self.helpActions.append(self.aboutQtAct)
1339 1337
1340 self.whatsThisAct = E5Action(self.trUtf8('What\'s This?'), 1338 self.whatsThisAct = E5Action(self.trUtf8('What\'s This?'),
1341 UI.PixmapCache.getIcon("whatsThis.png"), 1339 UI.PixmapCache.getIcon("whatsThis.png"),
1342 self.trUtf8('&What\'s This?'), 1340 self.trUtf8('&What\'s This?'),
1349 """ question mark, and you can click on the interface elements to get""" 1347 """ question mark, and you can click on the interface elements to get"""
1350 """ a short description of what they do and how to use them. In""" 1348 """ a short description of what they do and how to use them. In"""
1351 """ dialogs, this feature can be accessed using the context help button""" 1349 """ dialogs, this feature can be accessed using the context help button"""
1352 """ in the titlebar.</p>""" 1350 """ in the titlebar.</p>"""
1353 )) 1351 ))
1354 self.connect(self.whatsThisAct, SIGNAL('triggered()'), self.__whatsThis) 1352 self.whatsThisAct.triggered.connect(self.__whatsThis)
1355 self.helpActions.append(self.whatsThisAct) 1353 self.helpActions.append(self.whatsThisAct)
1356 1354
1357 def __createMenus(self): 1355 def __createMenus(self):
1358 """ 1356 """
1359 Private method to create the menus of the menu bar. 1357 Private method to create the menus of the menu bar.

eric ide

mercurial