QScintilla/MiniEditor.py

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

eric ide

mercurial