544 self.esm = QSignalMapper(self) |
557 self.esm = QSignalMapper(self) |
545 self.esm.mapped[int].connect(self.__textEdit.editorCommand) |
558 self.esm.mapped[int].connect(self.__textEdit.editorCommand) |
546 |
559 |
547 self.editorActGrp = createActionGroup(self) |
560 self.editorActGrp = createActionGroup(self) |
548 |
561 |
549 act = E5Action(QApplication.translate('ViewManager', 'Move left one character'), |
562 act = E5Action( |
550 QApplication.translate('ViewManager', 'Move left one character'), |
563 QApplication.translate('ViewManager', 'Move left one character'), |
551 QKeySequence(QApplication.translate('ViewManager', 'Left')), 0, |
564 QApplication.translate('ViewManager', 'Move left one character'), |
552 self.editorActGrp, 'vm_edit_move_left_char') |
565 QKeySequence(QApplication.translate('ViewManager', 'Left')), 0, |
|
566 self.editorActGrp, 'vm_edit_move_left_char') |
553 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFT) |
567 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFT) |
554 if isMacPlatform(): |
568 if isMacPlatform(): |
555 act.setAlternateShortcut(QKeySequence( |
569 act.setAlternateShortcut(QKeySequence( |
556 QApplication.translate('ViewManager', 'Meta+B'))) |
570 QApplication.translate('ViewManager', 'Meta+B'))) |
557 act.triggered[()].connect(self.esm.map) |
571 act.triggered[()].connect(self.esm.map) |
558 self.editActions.append(act) |
572 self.editActions.append(act) |
559 |
573 |
560 act = E5Action(QApplication.translate('ViewManager', 'Move right one character'), |
574 act = E5Action( |
561 QApplication.translate('ViewManager', 'Move right one character'), |
575 QApplication.translate('ViewManager', 'Move right one character'), |
562 QKeySequence(QApplication.translate('ViewManager', 'Right')), 0, |
576 QApplication.translate('ViewManager', 'Move right one character'), |
563 self.editorActGrp, 'vm_edit_move_right_char') |
577 QKeySequence(QApplication.translate('ViewManager', 'Right')), 0, |
|
578 self.editorActGrp, 'vm_edit_move_right_char') |
564 if isMacPlatform(): |
579 if isMacPlatform(): |
565 act.setAlternateShortcut(QKeySequence( |
580 act.setAlternateShortcut(QKeySequence( |
566 QApplication.translate('ViewManager', 'Meta+F'))) |
581 QApplication.translate('ViewManager', 'Meta+F'))) |
567 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHT) |
582 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHT) |
568 act.triggered[()].connect(self.esm.map) |
583 act.triggered[()].connect(self.esm.map) |
569 self.editActions.append(act) |
584 self.editActions.append(act) |
570 |
585 |
571 act = E5Action(QApplication.translate('ViewManager', 'Move up one line'), |
586 act = E5Action( |
572 QApplication.translate('ViewManager', 'Move up one line'), |
587 QApplication.translate('ViewManager', 'Move up one line'), |
573 QKeySequence(QApplication.translate('ViewManager', 'Up')), 0, |
588 QApplication.translate('ViewManager', 'Move up one line'), |
574 self.editorActGrp, 'vm_edit_move_up_line') |
589 QKeySequence(QApplication.translate('ViewManager', 'Up')), 0, |
|
590 self.editorActGrp, 'vm_edit_move_up_line') |
575 if isMacPlatform(): |
591 if isMacPlatform(): |
576 act.setAlternateShortcut(QKeySequence( |
592 act.setAlternateShortcut(QKeySequence( |
577 QApplication.translate('ViewManager', 'Meta+P'))) |
593 QApplication.translate('ViewManager', 'Meta+P'))) |
578 self.esm.setMapping(act, QsciScintilla.SCI_LINEUP) |
594 self.esm.setMapping(act, QsciScintilla.SCI_LINEUP) |
579 act.triggered[()].connect(self.esm.map) |
595 act.triggered[()].connect(self.esm.map) |
580 self.editActions.append(act) |
596 self.editActions.append(act) |
581 |
597 |
582 act = E5Action(QApplication.translate('ViewManager', 'Move down one line'), |
598 act = E5Action( |
583 QApplication.translate('ViewManager', 'Move down one line'), |
599 QApplication.translate('ViewManager', 'Move down one line'), |
584 QKeySequence(QApplication.translate('ViewManager', 'Down')), 0, |
600 QApplication.translate('ViewManager', 'Move down one line'), |
585 self.editorActGrp, 'vm_edit_move_down_line') |
601 QKeySequence(QApplication.translate('ViewManager', 'Down')), 0, |
|
602 self.editorActGrp, 'vm_edit_move_down_line') |
586 if isMacPlatform(): |
603 if isMacPlatform(): |
587 act.setAlternateShortcut(QKeySequence( |
604 act.setAlternateShortcut(QKeySequence( |
588 QApplication.translate('ViewManager', 'Meta+N'))) |
605 QApplication.translate('ViewManager', 'Meta+N'))) |
589 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWN) |
606 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWN) |
590 act.triggered[()].connect(self.esm.map) |
607 act.triggered[()].connect(self.esm.map) |
591 self.editActions.append(act) |
608 self.editActions.append(act) |
592 |
609 |
593 act = E5Action(QApplication.translate('ViewManager', 'Move left one word part'), |
610 act = E5Action( |
594 QApplication.translate('ViewManager', 'Move left one word part'), |
611 QApplication.translate('ViewManager', 'Move left one word part'), |
595 0, 0, |
612 QApplication.translate('ViewManager', 'Move left one word part'), |
596 self.editorActGrp, 'vm_edit_move_left_word_part') |
613 0, 0, |
|
614 self.editorActGrp, 'vm_edit_move_left_word_part') |
597 if not isMacPlatform(): |
615 if not isMacPlatform(): |
598 act.setShortcut(QKeySequence( |
616 act.setShortcut(QKeySequence( |
599 QApplication.translate('ViewManager', 'Alt+Left'))) |
617 QApplication.translate('ViewManager', 'Alt+Left'))) |
600 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFT) |
618 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFT) |
601 act.triggered[()].connect(self.esm.map) |
619 act.triggered[()].connect(self.esm.map) |
602 self.editActions.append(act) |
620 self.editActions.append(act) |
603 |
621 |
604 act = E5Action(QApplication.translate('ViewManager', 'Move right one word part'), |
622 act = E5Action( |
605 QApplication.translate('ViewManager', 'Move right one word part'), |
623 QApplication.translate('ViewManager', 'Move right one word part'), |
606 0, 0, |
624 QApplication.translate('ViewManager', 'Move right one word part'), |
607 self.editorActGrp, 'vm_edit_move_right_word_part') |
625 0, 0, |
|
626 self.editorActGrp, 'vm_edit_move_right_word_part') |
608 if not isMacPlatform(): |
627 if not isMacPlatform(): |
609 act.setShortcut(QKeySequence( |
628 act.setShortcut(QKeySequence( |
610 QApplication.translate('ViewManager', 'Alt+Right'))) |
629 QApplication.translate('ViewManager', 'Alt+Right'))) |
611 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHT) |
630 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHT) |
612 act.triggered[()].connect(self.esm.map) |
631 act.triggered[()].connect(self.esm.map) |
613 self.editActions.append(act) |
632 self.editActions.append(act) |
614 |
633 |
615 act = E5Action(QApplication.translate('ViewManager', 'Move left one word'), |
634 act = E5Action( |
616 QApplication.translate('ViewManager', 'Move left one word'), |
635 QApplication.translate('ViewManager', 'Move left one word'), |
617 0, 0, |
636 QApplication.translate('ViewManager', 'Move left one word'), |
618 self.editorActGrp, 'vm_edit_move_left_word') |
637 0, 0, |
|
638 self.editorActGrp, 'vm_edit_move_left_word') |
619 if isMacPlatform(): |
639 if isMacPlatform(): |
620 act.setShortcut(QKeySequence( |
640 act.setShortcut(QKeySequence( |
621 QApplication.translate('ViewManager', 'Alt+Left'))) |
641 QApplication.translate('ViewManager', 'Alt+Left'))) |
622 else: |
642 else: |
623 act.setShortcut(QKeySequence( |
643 act.setShortcut(QKeySequence( |
624 QApplication.translate('ViewManager', 'Ctrl+Left'))) |
644 QApplication.translate('ViewManager', 'Ctrl+Left'))) |
625 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFT) |
645 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFT) |
626 act.triggered[()].connect(self.esm.map) |
646 act.triggered[()].connect(self.esm.map) |
627 self.editActions.append(act) |
647 self.editActions.append(act) |
628 |
648 |
629 act = E5Action(QApplication.translate('ViewManager', 'Move right one word'), |
649 act = E5Action( |
630 QApplication.translate('ViewManager', 'Move right one word'), |
650 QApplication.translate('ViewManager', 'Move right one word'), |
631 0, 0, |
651 QApplication.translate('ViewManager', 'Move right one word'), |
632 self.editorActGrp, 'vm_edit_move_right_word') |
652 0, 0, |
|
653 self.editorActGrp, 'vm_edit_move_right_word') |
633 if isMacPlatform(): |
654 if isMacPlatform(): |
634 act.setShortcut(QKeySequence( |
655 act.setShortcut(QKeySequence( |
635 QApplication.translate('ViewManager', 'Alt+Right'))) |
656 QApplication.translate('ViewManager', 'Alt+Right'))) |
636 else: |
657 else: |
637 act.setShortcut(QKeySequence( |
658 act.setShortcut(QKeySequence( |
683 QApplication.translate('ViewManager', 'End'))) |
704 QApplication.translate('ViewManager', 'End'))) |
684 self.esm.setMapping(act, QsciScintilla.SCI_LINEEND) |
705 self.esm.setMapping(act, QsciScintilla.SCI_LINEEND) |
685 act.triggered[()].connect(self.esm.map) |
706 act.triggered[()].connect(self.esm.map) |
686 self.editActions.append(act) |
707 self.editActions.append(act) |
687 |
708 |
688 act = E5Action(QApplication.translate('ViewManager', 'Scroll view down one line'), |
709 act = E5Action( |
689 QApplication.translate('ViewManager', 'Scroll view down one line'), |
710 QApplication.translate('ViewManager', 'Scroll view down one line'), |
690 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Down')), 0, |
711 QApplication.translate('ViewManager', 'Scroll view down one line'), |
691 self.editorActGrp, 'vm_edit_scroll_down_line') |
712 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Down')), |
|
713 0, self.editorActGrp, 'vm_edit_scroll_down_line') |
692 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLDOWN) |
714 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLDOWN) |
693 act.triggered[()].connect(self.esm.map) |
715 act.triggered[()].connect(self.esm.map) |
694 self.editActions.append(act) |
716 self.editActions.append(act) |
695 |
717 |
696 act = E5Action(QApplication.translate('ViewManager', 'Scroll view up one line'), |
718 act = E5Action( |
697 QApplication.translate('ViewManager', 'Scroll view up one line'), |
719 QApplication.translate('ViewManager', 'Scroll view up one line'), |
698 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Up')), 0, |
720 QApplication.translate('ViewManager', 'Scroll view up one line'), |
699 self.editorActGrp, 'vm_edit_scroll_up_line') |
721 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Up')), 0, |
|
722 self.editorActGrp, 'vm_edit_scroll_up_line') |
700 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLUP) |
723 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLUP) |
701 act.triggered[()].connect(self.esm.map) |
724 act.triggered[()].connect(self.esm.map) |
702 self.editActions.append(act) |
725 self.editActions.append(act) |
703 |
726 |
704 act = E5Action(QApplication.translate('ViewManager', 'Move up one paragraph'), |
727 act = E5Action( |
705 QApplication.translate('ViewManager', 'Move up one paragraph'), |
728 QApplication.translate('ViewManager', 'Move up one paragraph'), |
706 QKeySequence(QApplication.translate('ViewManager', 'Alt+Up')), 0, |
729 QApplication.translate('ViewManager', 'Move up one paragraph'), |
707 self.editorActGrp, 'vm_edit_move_up_para') |
730 QKeySequence(QApplication.translate('ViewManager', 'Alt+Up')), 0, |
|
731 self.editorActGrp, 'vm_edit_move_up_para') |
708 self.esm.setMapping(act, QsciScintilla.SCI_PARAUP) |
732 self.esm.setMapping(act, QsciScintilla.SCI_PARAUP) |
709 act.triggered[()].connect(self.esm.map) |
733 act.triggered[()].connect(self.esm.map) |
710 self.editActions.append(act) |
734 self.editActions.append(act) |
711 |
735 |
712 act = E5Action(QApplication.translate('ViewManager', 'Move down one paragraph'), |
736 act = E5Action( |
713 QApplication.translate('ViewManager', 'Move down one paragraph'), |
737 QApplication.translate('ViewManager', 'Move down one paragraph'), |
714 QKeySequence(QApplication.translate('ViewManager', 'Alt+Down')), 0, |
738 QApplication.translate('ViewManager', 'Move down one paragraph'), |
715 self.editorActGrp, 'vm_edit_move_down_para') |
739 QKeySequence(QApplication.translate('ViewManager', 'Alt+Down')), 0, |
|
740 self.editorActGrp, 'vm_edit_move_down_para') |
716 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWN) |
741 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWN) |
717 act.triggered[()].connect(self.esm.map) |
742 act.triggered[()].connect(self.esm.map) |
718 self.editActions.append(act) |
743 self.editActions.append(act) |
719 |
744 |
720 act = E5Action(QApplication.translate('ViewManager', 'Move up one page'), |
745 act = E5Action( |
721 QApplication.translate('ViewManager', 'Move up one page'), |
746 QApplication.translate('ViewManager', 'Move up one page'), |
722 QKeySequence(QApplication.translate('ViewManager', 'PgUp')), 0, |
747 QApplication.translate('ViewManager', 'Move up one page'), |
723 self.editorActGrp, 'vm_edit_move_up_page') |
748 QKeySequence(QApplication.translate('ViewManager', 'PgUp')), 0, |
|
749 self.editorActGrp, 'vm_edit_move_up_page') |
724 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUP) |
750 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUP) |
725 act.triggered[()].connect(self.esm.map) |
751 act.triggered[()].connect(self.esm.map) |
726 self.editActions.append(act) |
752 self.editActions.append(act) |
727 |
753 |
728 act = E5Action(QApplication.translate('ViewManager', 'Move down one page'), |
754 act = E5Action( |
729 QApplication.translate('ViewManager', 'Move down one page'), |
755 QApplication.translate('ViewManager', 'Move down one page'), |
730 QKeySequence(QApplication.translate('ViewManager', 'PgDown')), 0, |
756 QApplication.translate('ViewManager', 'Move down one page'), |
731 self.editorActGrp, 'vm_edit_move_down_page') |
757 QKeySequence(QApplication.translate('ViewManager', 'PgDown')), 0, |
|
758 self.editorActGrp, 'vm_edit_move_down_page') |
732 if isMacPlatform(): |
759 if isMacPlatform(): |
733 act.setAlternateShortcut(QKeySequence( |
760 act.setAlternateShortcut(QKeySequence( |
734 QApplication.translate('ViewManager', 'Meta+V'))) |
761 QApplication.translate('ViewManager', 'Meta+V'))) |
735 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWN) |
762 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWN) |
736 act.triggered[()].connect(self.esm.map) |
763 act.triggered[()].connect(self.esm.map) |
737 self.editActions.append(act) |
764 self.editActions.append(act) |
738 |
765 |
739 act = E5Action(QApplication.translate('ViewManager', 'Move to start of document'), |
766 act = E5Action( |
740 QApplication.translate('ViewManager', 'Move to start of document'), |
767 QApplication.translate('ViewManager', 'Move to start of document'), |
741 0, 0, |
768 QApplication.translate('ViewManager', 'Move to start of document'), |
742 self.editorActGrp, 'vm_edit_move_start_text') |
769 0, 0, |
|
770 self.editorActGrp, 'vm_edit_move_start_text') |
743 if isMacPlatform(): |
771 if isMacPlatform(): |
744 act.setShortcut(QKeySequence( |
772 act.setShortcut(QKeySequence( |
745 QApplication.translate('ViewManager', 'Ctrl+Up'))) |
773 QApplication.translate('ViewManager', 'Ctrl+Up'))) |
746 else: |
774 else: |
747 act.setShortcut(QKeySequence( |
775 act.setShortcut(QKeySequence( |
748 QApplication.translate('ViewManager', 'Ctrl+Home'))) |
776 QApplication.translate('ViewManager', 'Ctrl+Home'))) |
749 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTART) |
777 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTART) |
750 act.triggered[()].connect(self.esm.map) |
778 act.triggered[()].connect(self.esm.map) |
751 self.editActions.append(act) |
779 self.editActions.append(act) |
752 |
780 |
753 act = E5Action(QApplication.translate('ViewManager', 'Move to end of document'), |
781 act = E5Action( |
754 QApplication.translate('ViewManager', 'Move to end of document'), |
782 QApplication.translate('ViewManager', 'Move to end of document'), |
755 0, 0, |
783 QApplication.translate('ViewManager', 'Move to end of document'), |
756 self.editorActGrp, 'vm_edit_move_end_text') |
784 0, 0, |
|
785 self.editorActGrp, 'vm_edit_move_end_text') |
757 if isMacPlatform(): |
786 if isMacPlatform(): |
758 act.setShortcut(QKeySequence( |
787 act.setShortcut(QKeySequence( |
759 QApplication.translate('ViewManager', 'Ctrl+Down'))) |
788 QApplication.translate('ViewManager', 'Ctrl+Down'))) |
760 else: |
789 else: |
761 act.setShortcut(QKeySequence( |
790 act.setShortcut(QKeySequence( |
762 QApplication.translate('ViewManager', 'Ctrl+End'))) |
791 QApplication.translate('ViewManager', 'Ctrl+End'))) |
763 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTEND) |
792 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTEND) |
764 act.triggered[()].connect(self.esm.map) |
793 act.triggered[()].connect(self.esm.map) |
765 self.editActions.append(act) |
794 self.editActions.append(act) |
766 |
795 |
767 act = E5Action(QApplication.translate('ViewManager', 'Indent one level'), |
796 act = E5Action( |
768 QApplication.translate('ViewManager', 'Indent one level'), |
797 QApplication.translate('ViewManager', 'Indent one level'), |
769 QKeySequence(QApplication.translate('ViewManager', 'Tab')), 0, |
798 QApplication.translate('ViewManager', 'Indent one level'), |
770 self.editorActGrp, 'vm_edit_indent_one_level') |
799 QKeySequence(QApplication.translate('ViewManager', 'Tab')), 0, |
|
800 self.editorActGrp, 'vm_edit_indent_one_level') |
771 self.esm.setMapping(act, QsciScintilla.SCI_TAB) |
801 self.esm.setMapping(act, QsciScintilla.SCI_TAB) |
772 act.triggered[()].connect(self.esm.map) |
802 act.triggered[()].connect(self.esm.map) |
773 self.editActions.append(act) |
803 self.editActions.append(act) |
774 |
804 |
775 act = E5Action(QApplication.translate('ViewManager', 'Unindent one level'), |
805 act = E5Action( |
776 QApplication.translate('ViewManager', 'Unindent one level'), |
806 QApplication.translate('ViewManager', 'Unindent one level'), |
777 QKeySequence(QApplication.translate('ViewManager', 'Shift+Tab')), 0, |
807 QApplication.translate('ViewManager', 'Unindent one level'), |
778 self.editorActGrp, 'vm_edit_unindent_one_level') |
808 QKeySequence(QApplication.translate('ViewManager', 'Shift+Tab')), |
|
809 0, self.editorActGrp, 'vm_edit_unindent_one_level') |
779 self.esm.setMapping(act, QsciScintilla.SCI_BACKTAB) |
810 self.esm.setMapping(act, QsciScintilla.SCI_BACKTAB) |
780 act.triggered[()].connect(self.esm.map) |
811 act.triggered[()].connect(self.esm.map) |
781 self.editActions.append(act) |
812 self.editActions.append(act) |
782 |
813 |
783 act = E5Action(QApplication.translate('ViewManager', |
814 act = E5Action( |
784 'Extend selection left one character'), |
815 QApplication.translate( |
785 QApplication.translate('ViewManager', |
816 'ViewManager', 'Extend selection left one character'), |
786 'Extend selection left one character'), |
817 QApplication.translate( |
787 QKeySequence(QApplication.translate('ViewManager', 'Shift+Left')), |
818 'ViewManager', |
788 0, |
819 'Extend selection left one character'), |
789 self.editorActGrp, 'vm_edit_extend_selection_left_char') |
820 QKeySequence(QApplication.translate('ViewManager', 'Shift+Left')), |
|
821 0, self.editorActGrp, 'vm_edit_extend_selection_left_char') |
790 if isMacPlatform(): |
822 if isMacPlatform(): |
791 act.setAlternateShortcut(QKeySequence( |
823 act.setAlternateShortcut(QKeySequence( |
792 QApplication.translate('ViewManager', 'Meta+Shift+B'))) |
824 QApplication.translate('ViewManager', 'Meta+Shift+B'))) |
793 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTEXTEND) |
825 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTEXTEND) |
794 act.triggered[()].connect(self.esm.map) |
826 act.triggered[()].connect(self.esm.map) |
795 self.editActions.append(act) |
827 self.editActions.append(act) |
796 |
828 |
797 act = E5Action(QApplication.translate('ViewManager', |
829 act = E5Action( |
798 'Extend selection right one character'), |
830 QApplication.translate( |
799 QApplication.translate('ViewManager', |
831 'ViewManager', |
800 'Extend selection right one character'), |
832 'Extend selection right one character'), |
801 QKeySequence(QApplication.translate('ViewManager', 'Shift+Right')), |
833 QApplication.translate( |
802 0, |
834 'ViewManager', |
803 self.editorActGrp, 'vm_edit_extend_selection_right_char') |
835 'Extend selection right one character'), |
|
836 QKeySequence(QApplication.translate('ViewManager', 'Shift+Right')), |
|
837 0, self.editorActGrp, 'vm_edit_extend_selection_right_char') |
804 if isMacPlatform(): |
838 if isMacPlatform(): |
805 act.setAlternateShortcut(QKeySequence( |
839 act.setAlternateShortcut(QKeySequence( |
806 QApplication.translate('ViewManager', 'Meta+Shift+F'))) |
840 QApplication.translate('ViewManager', 'Meta+Shift+F'))) |
807 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTEXTEND) |
841 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTEXTEND) |
808 act.triggered[()].connect(self.esm.map) |
842 act.triggered[()].connect(self.esm.map) |
809 self.editActions.append(act) |
843 self.editActions.append(act) |
810 |
844 |
811 act = E5Action(QApplication.translate('ViewManager', |
845 act = E5Action( |
812 'Extend selection up one line'), |
846 QApplication.translate( |
813 QApplication.translate('ViewManager', |
847 'ViewManager', |
814 'Extend selection up one line'), |
848 'Extend selection up one line'), |
815 QKeySequence(QApplication.translate('ViewManager', 'Shift+Up')), 0, |
849 QApplication.translate( |
816 self.editorActGrp, 'vm_edit_extend_selection_up_line') |
850 'ViewManager', |
|
851 'Extend selection up one line'), |
|
852 QKeySequence(QApplication.translate('ViewManager', 'Shift+Up')), 0, |
|
853 self.editorActGrp, 'vm_edit_extend_selection_up_line') |
817 if isMacPlatform(): |
854 if isMacPlatform(): |
818 act.setAlternateShortcut(QKeySequence( |
855 act.setAlternateShortcut(QKeySequence( |
819 QApplication.translate('ViewManager', 'Meta+Shift+P'))) |
856 QApplication.translate('ViewManager', 'Meta+Shift+P'))) |
820 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPEXTEND) |
857 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPEXTEND) |
821 act.triggered[()].connect(self.esm.map) |
858 act.triggered[()].connect(self.esm.map) |
822 self.editActions.append(act) |
859 self.editActions.append(act) |
823 |
860 |
824 act = E5Action(QApplication.translate('ViewManager', |
861 act = E5Action( |
825 'Extend selection down one line'), |
862 QApplication.translate( |
826 QApplication.translate('ViewManager', |
863 'ViewManager', |
827 'Extend selection down one line'), |
864 'Extend selection down one line'), |
828 QKeySequence(QApplication.translate('ViewManager', 'Shift+Down')), |
865 QApplication.translate( |
829 0, |
866 'ViewManager', |
830 self.editorActGrp, 'vm_edit_extend_selection_down_line') |
867 'Extend selection down one line'), |
|
868 QKeySequence(QApplication.translate('ViewManager', 'Shift+Down')), |
|
869 0, self.editorActGrp, 'vm_edit_extend_selection_down_line') |
831 if isMacPlatform(): |
870 if isMacPlatform(): |
832 act.setAlternateShortcut(QKeySequence( |
871 act.setAlternateShortcut(QKeySequence( |
833 QApplication.translate('ViewManager', 'Meta+Shift+N'))) |
872 QApplication.translate('ViewManager', 'Meta+Shift+N'))) |
834 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNEXTEND) |
873 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNEXTEND) |
835 act.triggered[()].connect(self.esm.map) |
874 act.triggered[()].connect(self.esm.map) |
836 self.editActions.append(act) |
875 self.editActions.append(act) |
837 |
876 |
838 act = E5Action(QApplication.translate('ViewManager', |
877 act = E5Action( |
839 'Extend selection left one word part'), |
878 QApplication.translate( |
840 QApplication.translate('ViewManager', |
879 'ViewManager', |
841 'Extend selection left one word part'), |
880 'Extend selection left one word part'), |
842 0, 0, |
881 QApplication.translate( |
843 self.editorActGrp, 'vm_edit_extend_selection_left_word_part') |
882 'ViewManager', |
|
883 'Extend selection left one word part'), |
|
884 0, 0, |
|
885 self.editorActGrp, 'vm_edit_extend_selection_left_word_part') |
844 if not isMacPlatform(): |
886 if not isMacPlatform(): |
845 act.setShortcut(QKeySequence( |
887 act.setShortcut(QKeySequence( |
846 QApplication.translate('ViewManager', 'Alt+Shift+Left'))) |
888 QApplication.translate('ViewManager', 'Alt+Shift+Left'))) |
847 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFTEXTEND) |
889 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFTEXTEND) |
848 act.triggered[()].connect(self.esm.map) |
890 act.triggered[()].connect(self.esm.map) |
849 self.editActions.append(act) |
891 self.editActions.append(act) |
850 |
892 |
851 act = E5Action(QApplication.translate('ViewManager', |
893 act = E5Action( |
852 'Extend selection right one word part'), |
894 QApplication.translate( |
853 QApplication.translate('ViewManager', |
895 'ViewManager', |
854 'Extend selection right one word part'), |
896 'Extend selection right one word part'), |
855 0, 0, |
897 QApplication.translate( |
856 self.editorActGrp, 'vm_edit_extend_selection_right_word_part') |
898 'ViewManager', |
|
899 'Extend selection right one word part'), |
|
900 0, 0, |
|
901 self.editorActGrp, 'vm_edit_extend_selection_right_word_part') |
857 if not isMacPlatform(): |
902 if not isMacPlatform(): |
858 act.setShortcut(QKeySequence( |
903 act.setShortcut(QKeySequence( |
859 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
904 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
860 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND) |
905 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND) |
861 act.triggered[()].connect(self.esm.map) |
906 act.triggered[()].connect(self.esm.map) |
1000 QApplication.translate('ViewManager', 'Ctrl+Shift+End'))) |
1058 QApplication.translate('ViewManager', 'Ctrl+Shift+End'))) |
1001 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTENDEXTEND) |
1059 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTENDEXTEND) |
1002 act.triggered[()].connect(self.esm.map) |
1060 act.triggered[()].connect(self.esm.map) |
1003 self.editActions.append(act) |
1061 self.editActions.append(act) |
1004 |
1062 |
1005 act = E5Action(QApplication.translate('ViewManager', |
1063 act = E5Action( |
1006 'Delete previous character'), |
1064 QApplication.translate( |
1007 QApplication.translate('ViewManager', 'Delete previous character'), |
1065 'ViewManager', |
1008 QKeySequence(QApplication.translate('ViewManager', 'Backspace')), |
1066 'Delete previous character'), |
1009 0, |
1067 QApplication.translate('ViewManager', 'Delete previous character'), |
1010 self.editorActGrp, 'vm_edit_delete_previous_char') |
1068 QKeySequence(QApplication.translate('ViewManager', 'Backspace')), |
|
1069 0, self.editorActGrp, 'vm_edit_delete_previous_char') |
1011 if isMacPlatform(): |
1070 if isMacPlatform(): |
1012 act.setAlternateShortcut(QKeySequence( |
1071 act.setAlternateShortcut(QKeySequence( |
1013 QApplication.translate('ViewManager', 'Meta+H'))) |
1072 QApplication.translate('ViewManager', 'Meta+H'))) |
1014 else: |
1073 else: |
1015 act.setAlternateShortcut(QKeySequence( |
1074 act.setAlternateShortcut(QKeySequence( |
1016 QApplication.translate('ViewManager', 'Shift+Backspace'))) |
1075 QApplication.translate('ViewManager', 'Shift+Backspace'))) |
1017 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACK) |
1076 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACK) |
1018 act.triggered[()].connect(self.esm.map) |
1077 act.triggered[()].connect(self.esm.map) |
1019 self.editActions.append(act) |
1078 self.editActions.append(act) |
1020 |
1079 |
1021 act = E5Action(QApplication.translate('ViewManager', |
1080 act = E5Action( |
1022 'Delete previous character if not at start of line'), |
1081 QApplication.translate( |
1023 QApplication.translate('ViewManager', |
1082 'ViewManager', |
1024 'Delete previous character if not at start of line'), |
1083 'Delete previous character if not at start of line'), |
1025 0, 0, |
1084 QApplication.translate( |
1026 self.editorActGrp, 'vm_edit_delet_previous_char_not_line_start') |
1085 'ViewManager', |
|
1086 'Delete previous character if not at start of line'), |
|
1087 0, 0, |
|
1088 self.editorActGrp, 'vm_edit_delet_previous_char_not_line_start') |
1027 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACKNOTLINE) |
1089 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACKNOTLINE) |
1028 act.triggered[()].connect(self.esm.map) |
1090 act.triggered[()].connect(self.esm.map) |
1029 self.editActions.append(act) |
1091 self.editActions.append(act) |
1030 |
1092 |
1031 act = E5Action(QApplication.translate('ViewManager', 'Delete current character'), |
1093 act = E5Action( |
1032 QApplication.translate('ViewManager', 'Delete current character'), |
1094 QApplication.translate('ViewManager', 'Delete current character'), |
1033 QKeySequence(QApplication.translate('ViewManager', 'Del')), 0, |
1095 QApplication.translate('ViewManager', 'Delete current character'), |
1034 self.editorActGrp, 'vm_edit_delete_current_char') |
1096 QKeySequence(QApplication.translate('ViewManager', 'Del')), 0, |
|
1097 self.editorActGrp, 'vm_edit_delete_current_char') |
1035 if isMacPlatform(): |
1098 if isMacPlatform(): |
1036 act.setAlternateShortcut(QKeySequence( |
1099 act.setAlternateShortcut(QKeySequence( |
1037 QApplication.translate('ViewManager', 'Meta+D'))) |
1100 QApplication.translate('ViewManager', 'Meta+D'))) |
1038 self.esm.setMapping(act, QsciScintilla.SCI_CLEAR) |
1101 self.esm.setMapping(act, QsciScintilla.SCI_CLEAR) |
1039 act.triggered[()].connect(self.esm.map) |
1102 act.triggered[()].connect(self.esm.map) |
1040 self.editActions.append(act) |
1103 self.editActions.append(act) |
1041 |
1104 |
1042 act = E5Action(QApplication.translate('ViewManager', 'Delete word to left'), |
1105 act = E5Action( |
1043 QApplication.translate('ViewManager', 'Delete word to left'), |
1106 QApplication.translate('ViewManager', 'Delete word to left'), |
1044 QKeySequence(QApplication.translate('ViewManager', |
1107 QApplication.translate('ViewManager', 'Delete word to left'), |
1045 'Ctrl+Backspace')), |
1108 QKeySequence(QApplication.translate('ViewManager', |
1046 0, |
1109 'Ctrl+Backspace')), |
1047 self.editorActGrp, 'vm_edit_delete_word_left') |
1110 0, self.editorActGrp, 'vm_edit_delete_word_left') |
1048 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDLEFT) |
1111 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDLEFT) |
1049 act.triggered[()].connect(self.esm.map) |
1112 act.triggered[()].connect(self.esm.map) |
1050 self.editActions.append(act) |
1113 self.editActions.append(act) |
1051 |
1114 |
1052 act = E5Action(QApplication.translate('ViewManager', 'Delete word to right'), |
1115 act = E5Action( |
1053 QApplication.translate('ViewManager', 'Delete word to right'), |
1116 QApplication.translate('ViewManager', 'Delete word to right'), |
1054 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Del')), 0, |
1117 QApplication.translate('ViewManager', 'Delete word to right'), |
1055 self.editorActGrp, 'vm_edit_delete_word_right') |
1118 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Del')), 0, |
|
1119 self.editorActGrp, 'vm_edit_delete_word_right') |
1056 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHT) |
1120 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHT) |
1057 act.triggered[()].connect(self.esm.map) |
1121 act.triggered[()].connect(self.esm.map) |
1058 self.editActions.append(act) |
1122 self.editActions.append(act) |
1059 |
1123 |
1060 act = E5Action(QApplication.translate('ViewManager', 'Delete line to left'), |
1124 act = E5Action( |
1061 QApplication.translate('ViewManager', 'Delete line to left'), |
1125 QApplication.translate('ViewManager', 'Delete line to left'), |
1062 QKeySequence(QApplication.translate('ViewManager', |
1126 QApplication.translate('ViewManager', 'Delete line to left'), |
1063 'Ctrl+Shift+Backspace')), |
1127 QKeySequence(QApplication.translate('ViewManager', |
1064 0, |
1128 'Ctrl+Shift+Backspace')), |
1065 self.editorActGrp, 'vm_edit_delete_line_left') |
1129 0, self.editorActGrp, 'vm_edit_delete_line_left') |
1066 self.esm.setMapping(act, QsciScintilla.SCI_DELLINELEFT) |
1130 self.esm.setMapping(act, QsciScintilla.SCI_DELLINELEFT) |
1067 act.triggered[()].connect(self.esm.map) |
1131 act.triggered[()].connect(self.esm.map) |
1068 self.editActions.append(act) |
1132 self.editActions.append(act) |
1069 |
1133 |
1070 act = E5Action(QApplication.translate('ViewManager', 'Delete line to right'), |
1134 act = E5Action( |
1071 QApplication.translate('ViewManager', 'Delete line to right'), |
1135 QApplication.translate('ViewManager', 'Delete line to right'), |
1072 0, 0, |
1136 QApplication.translate('ViewManager', 'Delete line to right'), |
1073 self.editorActGrp, 'vm_edit_delete_line_right') |
1137 0, 0, |
|
1138 self.editorActGrp, 'vm_edit_delete_line_right') |
1074 if isMacPlatform(): |
1139 if isMacPlatform(): |
1075 act.setShortcut(QKeySequence( |
1140 act.setShortcut(QKeySequence( |
1076 QApplication.translate('ViewManager', 'Meta+K'))) |
1141 QApplication.translate('ViewManager', 'Meta+K'))) |
1077 else: |
1142 else: |
1078 act.setShortcut(QKeySequence( |
1143 act.setShortcut(QKeySequence( |
1079 QApplication.translate('ViewManager', 'Ctrl+Shift+Del'))) |
1144 QApplication.translate('ViewManager', 'Ctrl+Shift+Del'))) |
1080 self.esm.setMapping(act, QsciScintilla.SCI_DELLINERIGHT) |
1145 self.esm.setMapping(act, QsciScintilla.SCI_DELLINERIGHT) |
1081 act.triggered[()].connect(self.esm.map) |
1146 act.triggered[()].connect(self.esm.map) |
1082 self.editActions.append(act) |
1147 self.editActions.append(act) |
1083 |
1148 |
1084 act = E5Action(QApplication.translate('ViewManager', 'Insert new line'), |
1149 act = E5Action( |
1085 QApplication.translate('ViewManager', 'Insert new line'), |
1150 QApplication.translate('ViewManager', 'Insert new line'), |
1086 QKeySequence(QApplication.translate('ViewManager', 'Return')), |
1151 QApplication.translate('ViewManager', 'Insert new line'), |
1087 QKeySequence(QApplication.translate('ViewManager', 'Enter')), |
1152 QKeySequence(QApplication.translate('ViewManager', 'Return')), |
1088 self.editorActGrp, 'vm_edit_insert_line') |
1153 QKeySequence(QApplication.translate('ViewManager', 'Enter')), |
|
1154 self.editorActGrp, 'vm_edit_insert_line') |
1089 self.esm.setMapping(act, QsciScintilla.SCI_NEWLINE) |
1155 self.esm.setMapping(act, QsciScintilla.SCI_NEWLINE) |
1090 act.triggered[()].connect(self.esm.map) |
1156 act.triggered[()].connect(self.esm.map) |
1091 self.editActions.append(act) |
1157 self.editActions.append(act) |
1092 |
1158 |
1093 act = E5Action(QApplication.translate('ViewManager', 'Delete current line'), |
1159 act = E5Action( |
1094 QApplication.translate('ViewManager', 'Delete current line'), |
1160 QApplication.translate('ViewManager', 'Delete current line'), |
1095 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Shift+L')), |
1161 QApplication.translate('ViewManager', 'Delete current line'), |
1096 0, |
1162 QKeySequence(QApplication.translate('ViewManager', |
1097 self.editorActGrp, 'vm_edit_delete_current_line') |
1163 'Ctrl+Shift+L')), |
|
1164 0, self.editorActGrp, 'vm_edit_delete_current_line') |
1098 self.esm.setMapping(act, QsciScintilla.SCI_LINEDELETE) |
1165 self.esm.setMapping(act, QsciScintilla.SCI_LINEDELETE) |
1099 act.triggered[()].connect(self.esm.map) |
1166 act.triggered[()].connect(self.esm.map) |
1100 self.editActions.append(act) |
1167 self.editActions.append(act) |
1101 |
1168 |
1102 act = E5Action(QApplication.translate('ViewManager', 'Duplicate current line'), |
1169 act = E5Action( |
1103 QApplication.translate('ViewManager', 'Duplicate current line'), |
1170 QApplication.translate('ViewManager', 'Duplicate current line'), |
1104 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+D')), 0, |
1171 QApplication.translate('ViewManager', 'Duplicate current line'), |
1105 self.editorActGrp, 'vm_edit_duplicate_current_line') |
1172 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+D')), 0, |
|
1173 self.editorActGrp, 'vm_edit_duplicate_current_line') |
1106 self.esm.setMapping(act, QsciScintilla.SCI_LINEDUPLICATE) |
1174 self.esm.setMapping(act, QsciScintilla.SCI_LINEDUPLICATE) |
1107 act.triggered[()].connect(self.esm.map) |
1175 act.triggered[()].connect(self.esm.map) |
1108 self.editActions.append(act) |
1176 self.editActions.append(act) |
1109 |
1177 |
1110 act = E5Action(QApplication.translate('ViewManager', |
1178 act = E5Action( |
1111 'Swap current and previous lines'), |
1179 QApplication.translate( |
1112 QApplication.translate('ViewManager', |
1180 'ViewManager', |
1113 'Swap current and previous lines'), |
1181 'Swap current and previous lines'), |
1114 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+T')), 0, |
1182 QApplication.translate( |
1115 self.editorActGrp, 'vm_edit_swap_current_previous_line') |
1183 'ViewManager', |
|
1184 'Swap current and previous lines'), |
|
1185 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+T')), 0, |
|
1186 self.editorActGrp, 'vm_edit_swap_current_previous_line') |
1116 self.esm.setMapping(act, QsciScintilla.SCI_LINETRANSPOSE) |
1187 self.esm.setMapping(act, QsciScintilla.SCI_LINETRANSPOSE) |
1117 act.triggered[()].connect(self.esm.map) |
1188 act.triggered[()].connect(self.esm.map) |
1118 self.editActions.append(act) |
1189 self.editActions.append(act) |
1119 |
1190 |
1120 act = E5Action(QApplication.translate('ViewManager', 'Cut current line'), |
1191 act = E5Action( |
1121 QApplication.translate('ViewManager', 'Cut current line'), |
1192 QApplication.translate('ViewManager', 'Cut current line'), |
1122 QKeySequence(QApplication.translate('ViewManager', 'Alt+Shift+L')), |
1193 QApplication.translate('ViewManager', 'Cut current line'), |
1123 0, |
1194 QKeySequence(QApplication.translate('ViewManager', 'Alt+Shift+L')), |
1124 self.editorActGrp, 'vm_edit_cut_current_line') |
1195 0, self.editorActGrp, 'vm_edit_cut_current_line') |
1125 self.esm.setMapping(act, QsciScintilla.SCI_LINECUT) |
1196 self.esm.setMapping(act, QsciScintilla.SCI_LINECUT) |
1126 act.triggered[()].connect(self.esm.map) |
1197 act.triggered[()].connect(self.esm.map) |
1127 self.editActions.append(act) |
1198 self.editActions.append(act) |
1128 |
1199 |
1129 act = E5Action(QApplication.translate('ViewManager', 'Copy current line'), |
1200 act = E5Action( |
1130 QApplication.translate('ViewManager', 'Copy current line'), |
1201 QApplication.translate('ViewManager', 'Copy current line'), |
1131 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Shift+T')), |
1202 QApplication.translate('ViewManager', 'Copy current line'), |
1132 0, |
1203 QKeySequence(QApplication.translate('ViewManager', |
1133 self.editorActGrp, 'vm_edit_copy_current_line') |
1204 'Ctrl+Shift+T')), |
|
1205 0, self.editorActGrp, 'vm_edit_copy_current_line') |
1134 self.esm.setMapping(act, QsciScintilla.SCI_LINECOPY) |
1206 self.esm.setMapping(act, QsciScintilla.SCI_LINECOPY) |
1135 act.triggered[()].connect(self.esm.map) |
1207 act.triggered[()].connect(self.esm.map) |
1136 self.editActions.append(act) |
1208 self.editActions.append(act) |
1137 |
1209 |
1138 act = E5Action(QApplication.translate('ViewManager', 'Toggle insert/overtype'), |
1210 act = E5Action( |
1139 QApplication.translate('ViewManager', 'Toggle insert/overtype'), |
1211 QApplication.translate('ViewManager', 'Toggle insert/overtype'), |
1140 QKeySequence(QApplication.translate('ViewManager', 'Ins')), 0, |
1212 QApplication.translate('ViewManager', 'Toggle insert/overtype'), |
1141 self.editorActGrp, 'vm_edit_toggle_insert_overtype') |
1213 QKeySequence(QApplication.translate('ViewManager', 'Ins')), 0, |
|
1214 self.editorActGrp, 'vm_edit_toggle_insert_overtype') |
1142 self.esm.setMapping(act, QsciScintilla.SCI_EDITTOGGLEOVERTYPE) |
1215 self.esm.setMapping(act, QsciScintilla.SCI_EDITTOGGLEOVERTYPE) |
1143 act.triggered[()].connect(self.esm.map) |
1216 act.triggered[()].connect(self.esm.map) |
1144 self.editActions.append(act) |
1217 self.editActions.append(act) |
1145 |
1218 |
1146 act = E5Action(QApplication.translate('ViewManager', |
1219 act = E5Action( |
1147 'Convert selection to lower case'), |
1220 QApplication.translate( |
1148 QApplication.translate('ViewManager', |
1221 'ViewManager', |
1149 'Convert selection to lower case'), |
1222 'Convert selection to lower case'), |
1150 QKeySequence(QApplication.translate('ViewManager', 'Alt+Shift+U')), |
1223 QApplication.translate( |
1151 0, |
1224 'ViewManager', |
1152 self.editorActGrp, 'vm_edit_convert_selection_lower') |
1225 'Convert selection to lower case'), |
|
1226 QKeySequence(QApplication.translate('ViewManager', 'Alt+Shift+U')), |
|
1227 0, self.editorActGrp, 'vm_edit_convert_selection_lower') |
1153 self.esm.setMapping(act, QsciScintilla.SCI_LOWERCASE) |
1228 self.esm.setMapping(act, QsciScintilla.SCI_LOWERCASE) |
1154 act.triggered[()].connect(self.esm.map) |
1229 act.triggered[()].connect(self.esm.map) |
1155 self.editActions.append(act) |
1230 self.editActions.append(act) |
1156 |
1231 |
1157 act = E5Action(QApplication.translate('ViewManager', |
1232 act = E5Action( |
1158 'Convert selection to upper case'), |
1233 QApplication.translate( |
1159 QApplication.translate('ViewManager', |
1234 'ViewManager', |
1160 'Convert selection to upper case'), |
1235 'Convert selection to upper case'), |
1161 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Shift+U')), |
1236 QApplication.translate( |
1162 0, |
1237 'ViewManager', |
1163 self.editorActGrp, 'vm_edit_convert_selection_upper') |
1238 'Convert selection to upper case'), |
|
1239 QKeySequence(QApplication.translate('ViewManager', |
|
1240 'Ctrl+Shift+U')), |
|
1241 0, self.editorActGrp, 'vm_edit_convert_selection_upper') |
1164 self.esm.setMapping(act, QsciScintilla.SCI_UPPERCASE) |
1242 self.esm.setMapping(act, QsciScintilla.SCI_UPPERCASE) |
1165 act.triggered[()].connect(self.esm.map) |
1243 act.triggered[()].connect(self.esm.map) |
1166 self.editActions.append(act) |
1244 self.editActions.append(act) |
1167 |
1245 |
1168 act = E5Action(QApplication.translate('ViewManager', |
1246 act = E5Action(QApplication.translate('ViewManager', |
1200 self.editorActGrp, 'vm_edit_formfeed') |
1281 self.editorActGrp, 'vm_edit_formfeed') |
1201 self.esm.setMapping(act, QsciScintilla.SCI_FORMFEED) |
1282 self.esm.setMapping(act, QsciScintilla.SCI_FORMFEED) |
1202 act.triggered[()].connect(self.esm.map) |
1283 act.triggered[()].connect(self.esm.map) |
1203 self.editActions.append(act) |
1284 self.editActions.append(act) |
1204 |
1285 |
1205 act = E5Action(QApplication.translate('ViewManager', 'Escape'), |
1286 act = E5Action( |
1206 QApplication.translate('ViewManager', 'Escape'), |
1287 QApplication.translate('ViewManager', 'Escape'), |
1207 QKeySequence(QApplication.translate('ViewManager', 'Esc')), 0, |
1288 QApplication.translate('ViewManager', 'Escape'), |
1208 self.editorActGrp, 'vm_edit_escape') |
1289 QKeySequence(QApplication.translate('ViewManager', 'Esc')), 0, |
|
1290 self.editorActGrp, 'vm_edit_escape') |
1209 self.esm.setMapping(act, QsciScintilla.SCI_CANCEL) |
1291 self.esm.setMapping(act, QsciScintilla.SCI_CANCEL) |
1210 act.triggered[()].connect(self.esm.map) |
1292 act.triggered[()].connect(self.esm.map) |
1211 self.editActions.append(act) |
1293 self.editActions.append(act) |
1212 |
1294 |
1213 act = E5Action(QApplication.translate('ViewManager', |
1295 act = E5Action( |
1214 'Extend rectangular selection down one line'), |
1296 QApplication.translate( |
1215 QApplication.translate('ViewManager', |
1297 'ViewManager', |
1216 'Extend rectangular selection down one line'), |
1298 'Extend rectangular selection down one line'), |
1217 QKeySequence(QApplication.translate('ViewManager', |
1299 QApplication.translate( |
1218 'Alt+Ctrl+Down')), |
1300 'ViewManager', |
1219 0, |
1301 'Extend rectangular selection down one line'), |
1220 self.editorActGrp, 'vm_edit_extend_rect_selection_down_line') |
1302 QKeySequence(QApplication.translate('ViewManager', |
|
1303 'Alt+Ctrl+Down')), |
|
1304 0, self.editorActGrp, 'vm_edit_extend_rect_selection_down_line') |
1221 if isMacPlatform(): |
1305 if isMacPlatform(): |
1222 act.setAlternateShortcut(QKeySequence( |
1306 act.setAlternateShortcut(QKeySequence( |
1223 QApplication.translate('ViewManager', 'Meta+Alt+Shift+N'))) |
1307 QApplication.translate('ViewManager', 'Meta+Alt+Shift+N'))) |
1224 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNRECTEXTEND) |
1308 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNRECTEXTEND) |
1225 act.triggered[()].connect(self.esm.map) |
1309 act.triggered[()].connect(self.esm.map) |
1226 self.editActions.append(act) |
1310 self.editActions.append(act) |
1227 |
1311 |
1228 act = E5Action(QApplication.translate('ViewManager', |
1312 act = E5Action( |
1229 'Extend rectangular selection up one line'), |
1313 QApplication.translate( |
1230 QApplication.translate('ViewManager', |
1314 'ViewManager', |
1231 'Extend rectangular selection up one line'), |
1315 'Extend rectangular selection up one line'), |
1232 QKeySequence(QApplication.translate('ViewManager', 'Alt+Ctrl+Up')), |
1316 QApplication.translate( |
1233 0, |
1317 'ViewManager', |
1234 self.editorActGrp, 'vm_edit_extend_rect_selection_up_line') |
1318 'Extend rectangular selection up one line'), |
|
1319 QKeySequence(QApplication.translate('ViewManager', 'Alt+Ctrl+Up')), |
|
1320 0, self.editorActGrp, 'vm_edit_extend_rect_selection_up_line') |
1235 if isMacPlatform(): |
1321 if isMacPlatform(): |
1236 act.setAlternateShortcut(QKeySequence( |
1322 act.setAlternateShortcut(QKeySequence( |
1237 QApplication.translate('ViewManager', 'Meta+Alt+Shift+P'))) |
1323 QApplication.translate('ViewManager', 'Meta+Alt+Shift+P'))) |
1238 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPRECTEXTEND) |
1324 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPRECTEXTEND) |
1239 act.triggered[()].connect(self.esm.map) |
1325 act.triggered[()].connect(self.esm.map) |
1240 self.editActions.append(act) |
1326 self.editActions.append(act) |
1241 |
1327 |
1242 act = E5Action(QApplication.translate('ViewManager', |
1328 act = E5Action( |
1243 'Extend rectangular selection left one character'), |
1329 QApplication.translate( |
1244 QApplication.translate('ViewManager', |
1330 'ViewManager', |
1245 'Extend rectangular selection left one character'), |
1331 'Extend rectangular selection left one character'), |
1246 QKeySequence(QApplication.translate('ViewManager', |
1332 QApplication.translate( |
1247 'Alt+Ctrl+Left')), |
1333 'ViewManager', |
1248 0, |
1334 'Extend rectangular selection left one character'), |
1249 self.editorActGrp, 'vm_edit_extend_rect_selection_left_char') |
1335 QKeySequence(QApplication.translate('ViewManager', |
|
1336 'Alt+Ctrl+Left')), |
|
1337 0, self.editorActGrp, 'vm_edit_extend_rect_selection_left_char') |
1250 if isMacPlatform(): |
1338 if isMacPlatform(): |
1251 act.setAlternateShortcut(QKeySequence( |
1339 act.setAlternateShortcut(QKeySequence( |
1252 QApplication.translate('ViewManager', 'Meta+Alt+Shift+B'))) |
1340 QApplication.translate('ViewManager', 'Meta+Alt+Shift+B'))) |
1253 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTRECTEXTEND) |
1341 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTRECTEXTEND) |
1254 act.triggered[()].connect(self.esm.map) |
1342 act.triggered[()].connect(self.esm.map) |
1255 self.editActions.append(act) |
1343 self.editActions.append(act) |
1256 |
1344 |
1257 act = E5Action(QApplication.translate('ViewManager', |
1345 act = E5Action( |
1258 'Extend rectangular selection right one character'), |
1346 QApplication.translate( |
1259 QApplication.translate('ViewManager', |
1347 'ViewManager', |
1260 'Extend rectangular selection right one character'), |
1348 'Extend rectangular selection right one character'), |
1261 QKeySequence(QApplication.translate('ViewManager', |
1349 QApplication.translate( |
1262 'Alt+Ctrl+Right')), |
1350 'ViewManager', |
1263 0, |
1351 'Extend rectangular selection right one character'), |
1264 self.editorActGrp, 'vm_edit_extend_rect_selection_right_char') |
1352 QKeySequence(QApplication.translate('ViewManager', |
|
1353 'Alt+Ctrl+Right')), |
|
1354 0, self.editorActGrp, 'vm_edit_extend_rect_selection_right_char') |
1265 if isMacPlatform(): |
1355 if isMacPlatform(): |
1266 act.setAlternateShortcut(QKeySequence( |
1356 act.setAlternateShortcut(QKeySequence( |
1267 QApplication.translate('ViewManager', 'Meta+Alt+Shift+F'))) |
1357 QApplication.translate('ViewManager', 'Meta+Alt+Shift+F'))) |
1268 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTRECTEXTEND) |
1358 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTRECTEXTEND) |
1269 act.triggered[()].connect(self.esm.map) |
1359 act.triggered[()].connect(self.esm.map) |
1283 QApplication.translate('ViewManager', 'Alt+Shift+Home'))) |
1373 QApplication.translate('ViewManager', 'Alt+Shift+Home'))) |
1284 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMERECTEXTEND) |
1374 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMERECTEXTEND) |
1285 act.triggered[()].connect(self.esm.map) |
1375 act.triggered[()].connect(self.esm.map) |
1286 self.editActions.append(act) |
1376 self.editActions.append(act) |
1287 |
1377 |
1288 act = E5Action(QApplication.translate('ViewManager', |
1378 act = E5Action( |
1289 'Extend rectangular selection to end of document line'), |
1379 QApplication.translate( |
1290 QApplication.translate('ViewManager', |
1380 'ViewManager', |
1291 'Extend rectangular selection to end of document line'), |
1381 'Extend rectangular selection to end of document line'), |
1292 0, 0, |
1382 QApplication.translate( |
1293 self.editorActGrp, 'vm_edit_extend_rect_selection_end_line') |
1383 'ViewManager', |
|
1384 'Extend rectangular selection to end of document line'), |
|
1385 0, 0, |
|
1386 self.editorActGrp, 'vm_edit_extend_rect_selection_end_line') |
1294 if isMacPlatform(): |
1387 if isMacPlatform(): |
1295 act.setShortcut(QKeySequence( |
1388 act.setShortcut(QKeySequence( |
1296 QApplication.translate('ViewManager', 'Meta+Alt+Shift+E'))) |
1389 QApplication.translate('ViewManager', 'Meta+Alt+Shift+E'))) |
1297 else: |
1390 else: |
1298 act.setShortcut(QKeySequence( |
1391 act.setShortcut(QKeySequence( |
1299 QApplication.translate('ViewManager', 'Alt+Shift+End'))) |
1392 QApplication.translate('ViewManager', 'Alt+Shift+End'))) |
1300 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDRECTEXTEND) |
1393 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDRECTEXTEND) |
1301 act.triggered[()].connect(self.esm.map) |
1394 act.triggered[()].connect(self.esm.map) |
1302 self.editActions.append(act) |
1395 self.editActions.append(act) |
1303 |
1396 |
1304 act = E5Action(QApplication.translate('ViewManager', |
1397 act = E5Action( |
1305 'Extend rectangular selection up one page'), |
1398 QApplication.translate( |
1306 QApplication.translate('ViewManager', |
1399 'ViewManager', |
1307 'Extend rectangular selection up one page'), |
1400 'Extend rectangular selection up one page'), |
1308 QKeySequence(QApplication.translate('ViewManager', |
1401 QApplication.translate( |
1309 'Alt+Shift+PgUp')), |
1402 'ViewManager', |
1310 0, |
1403 'Extend rectangular selection up one page'), |
1311 self.editorActGrp, 'vm_edit_extend_rect_selection_up_page') |
1404 QKeySequence(QApplication.translate('ViewManager', |
|
1405 'Alt+Shift+PgUp')), |
|
1406 0, self.editorActGrp, 'vm_edit_extend_rect_selection_up_page') |
1312 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPRECTEXTEND) |
1407 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPRECTEXTEND) |
1313 act.triggered[()].connect(self.esm.map) |
1408 act.triggered[()].connect(self.esm.map) |
1314 self.editActions.append(act) |
1409 self.editActions.append(act) |
1315 |
1410 |
1316 act = E5Action(QApplication.translate('ViewManager', |
1411 act = E5Action( |
1317 'Extend rectangular selection down one page'), |
1412 QApplication.translate( |
1318 QApplication.translate('ViewManager', |
1413 'ViewManager', |
1319 'Extend rectangular selection down one page'), |
1414 'Extend rectangular selection down one page'), |
1320 QKeySequence(QApplication.translate('ViewManager', |
1415 QApplication.translate( |
1321 'Alt+Shift+PgDown')), |
1416 'ViewManager', |
1322 0, |
1417 'Extend rectangular selection down one page'), |
1323 self.editorActGrp, 'vm_edit_extend_rect_selection_down_page') |
1418 QKeySequence(QApplication.translate('ViewManager', |
|
1419 'Alt+Shift+PgDown')), |
|
1420 0, self.editorActGrp, 'vm_edit_extend_rect_selection_down_page') |
1324 if isMacPlatform(): |
1421 if isMacPlatform(): |
1325 act.setAlternateShortcut(QKeySequence( |
1422 act.setAlternateShortcut(QKeySequence( |
1326 QApplication.translate('ViewManager', 'Meta+Alt+Shift+V'))) |
1423 QApplication.translate('ViewManager', 'Meta+Alt+Shift+V'))) |
1327 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNRECTEXTEND) |
1424 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNRECTEXTEND) |
1328 act.triggered[()].connect(self.esm.map) |
1425 act.triggered[()].connect(self.esm.map) |
1329 self.editActions.append(act) |
1426 self.editActions.append(act) |
1330 |
1427 |
1331 act = E5Action(QApplication.translate('ViewManager', |
1428 act = E5Action( |
1332 'Duplicate current selection'), |
1429 QApplication.translate( |
1333 QApplication.translate('ViewManager', |
1430 'ViewManager', |
1334 'Duplicate current selection'), |
1431 'Duplicate current selection'), |
1335 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Shift+D')), |
1432 QApplication.translate( |
1336 0, |
1433 'ViewManager', |
1337 self.editorActGrp, 'vm_edit_duplicate_current_selection') |
1434 'Duplicate current selection'), |
|
1435 QKeySequence(QApplication.translate('ViewManager', |
|
1436 'Ctrl+Shift+D')), |
|
1437 0, self.editorActGrp, 'vm_edit_duplicate_current_selection') |
1338 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE) |
1438 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE) |
1339 act.triggered[()].connect(self.esm.map) |
1439 act.triggered[()].connect(self.esm.map) |
1340 self.editActions.append(act) |
1440 self.editActions.append(act) |
1341 |
1441 |
1342 if hasattr(QsciScintilla, "SCI_SCROLLTOSTART"): |
1442 if hasattr(QsciScintilla, "SCI_SCROLLTOSTART"): |
1444 self.esm.setMapping(act, QsciScintilla.SCI_HOME) |
1544 self.esm.setMapping(act, QsciScintilla.SCI_HOME) |
1445 act.triggered[()].connect(self.esm.map) |
1545 act.triggered[()].connect(self.esm.map) |
1446 self.editActions.append(act) |
1546 self.editActions.append(act) |
1447 |
1547 |
1448 if hasattr(QsciScintilla, "SCI_HOMEEXTEND"): |
1548 if hasattr(QsciScintilla, "SCI_HOMEEXTEND"): |
1449 act = E5Action(QApplication.translate('ViewManager', |
1549 act = E5Action( |
1450 'Extend selection to start of document line'), |
1550 QApplication.translate( |
1451 QApplication.translate('ViewManager', |
1551 'ViewManager', |
1452 'Extend selection to start of document line'), |
1552 'Extend selection to start of document line'), |
1453 0, 0, |
1553 QApplication.translate( |
1454 self.editorActGrp, 'vm_edit_extend_selection_start_document_line') |
1554 'ViewManager', |
|
1555 'Extend selection to start of document line'), |
|
1556 0, 0, |
|
1557 self.editorActGrp, |
|
1558 'vm_edit_extend_selection_start_document_line') |
1455 if isMacPlatform(): |
1559 if isMacPlatform(): |
1456 act.setShortcut(QKeySequence( |
1560 act.setShortcut(QKeySequence( |
1457 QApplication.translate('ViewManager', 'Meta+Shift+A'))) |
1561 QApplication.translate('ViewManager', 'Meta+Shift+A'))) |
1458 self.esm.setMapping(act, QsciScintilla.SCI_HOME) |
1562 self.esm.setMapping(act, QsciScintilla.SCI_HOME) |
1459 act.triggered[()].connect(self.esm.map) |
1563 act.triggered[()].connect(self.esm.map) |
1460 self.editActions.append(act) |
1564 self.editActions.append(act) |
1461 |
1565 |
1462 if hasattr(QsciScintilla, "SCI_HOMERECTEXTEND"): |
1566 if hasattr(QsciScintilla, "SCI_HOMERECTEXTEND"): |
1463 act = E5Action(QApplication.translate('ViewManager', |
1567 act = E5Action( |
1464 'Extend rectangular selection to start of document line'), |
1568 QApplication.translate( |
1465 QApplication.translate('ViewManager', |
1569 'ViewManager', |
1466 'Extend rectangular selection to start of document line'), |
1570 'Extend rectangular selection to start of document line'), |
1467 0, 0, |
1571 QApplication.translate( |
1468 self.editorActGrp, 'vm_edit_select_rect_start_line') |
1572 'ViewManager', |
|
1573 'Extend rectangular selection to start of document line'), |
|
1574 0, 0, |
|
1575 self.editorActGrp, 'vm_edit_select_rect_start_line') |
1469 if isMacPlatform(): |
1576 if isMacPlatform(): |
1470 act.setShortcut(QKeySequence( |
1577 act.setShortcut(QKeySequence( |
1471 QApplication.translate('ViewManager', 'Meta+Alt+Shift+A'))) |
1578 QApplication.translate('ViewManager', 'Meta+Alt+Shift+A'))) |
1472 self.esm.setMapping(act, QsciScintilla.SCI_HOMERECTEXTEND) |
1579 self.esm.setMapping(act, QsciScintilla.SCI_HOMERECTEXTEND) |
1473 act.triggered[()].connect(self.esm.map) |
1580 act.triggered[()].connect(self.esm.map) |
1474 self.editActions.append(act) |
1581 self.editActions.append(act) |
1475 |
1582 |
1476 if hasattr(QsciScintilla, "SCI_HOMEDISPLAYEXTEND"): |
1583 if hasattr(QsciScintilla, "SCI_HOMEDISPLAYEXTEND"): |
1477 act = E5Action(QApplication.translate('ViewManager', |
1584 act = E5Action( |
1478 'Extend selection to start of display line'), |
1585 QApplication.translate( |
1479 QApplication.translate('ViewManager', |
1586 'ViewManager', |
1480 'Extend selection to start of display line'), |
1587 'Extend selection to start of display line'), |
1481 0, 0, |
1588 QApplication.translate( |
1482 self.editorActGrp, 'vm_edit_extend_selection_start_display_line') |
1589 'ViewManager', |
|
1590 'Extend selection to start of display line'), |
|
1591 0, 0, |
|
1592 self.editorActGrp, |
|
1593 'vm_edit_extend_selection_start_display_line') |
1483 if isMacPlatform(): |
1594 if isMacPlatform(): |
1484 act.setShortcut(QKeySequence( |
1595 act.setShortcut(QKeySequence( |
1485 QApplication.translate('ViewManager', 'Ctrl+Shift+Left'))) |
1596 QApplication.translate('ViewManager', 'Ctrl+Shift+Left'))) |
1486 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAYEXTEND) |
1597 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAYEXTEND) |
1487 act.triggered[()].connect(self.esm.map) |
1598 act.triggered[()].connect(self.esm.map) |
1488 self.editActions.append(act) |
1599 self.editActions.append(act) |
1489 |
1600 |
1490 if hasattr(QsciScintilla, "SCI_HOMEWRAP"): |
1601 if hasattr(QsciScintilla, "SCI_HOMEWRAP"): |
1491 act = E5Action(QApplication.translate('ViewManager', |
1602 act = E5Action( |
1492 'Move to start of display or document line'), |
1603 QApplication.translate( |
1493 QApplication.translate('ViewManager', |
1604 'ViewManager', |
1494 'Move to start of display or document line'), |
1605 'Move to start of display or document line'), |
1495 0, 0, |
1606 QApplication.translate( |
1496 self.editorActGrp, 'vm_edit_move_start_display_document_line') |
1607 'ViewManager', |
|
1608 'Move to start of display or document line'), |
|
1609 0, 0, |
|
1610 self.editorActGrp, 'vm_edit_move_start_display_document_line') |
1497 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAP) |
1611 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAP) |
1498 act.triggered[()].connect(self.esm.map) |
1612 act.triggered[()].connect(self.esm.map) |
1499 self.editActions.append(act) |
1613 self.editActions.append(act) |
1500 |
1614 |
1501 if hasattr(QsciScintilla, "SCI_HOMEWRAPEXTEND"): |
1615 if hasattr(QsciScintilla, "SCI_HOMEWRAPEXTEND"): |
1502 act = E5Action(QApplication.translate('ViewManager', |
1616 act = E5Action( |
1503 'Extend selection to start of display or document line'), |
1617 QApplication.translate( |
1504 QApplication.translate('ViewManager', |
1618 'ViewManager', |
1505 'Extend selection to start of display or document line'), |
1619 'Extend selection to start of display or document line'), |
1506 0, 0, |
1620 QApplication.translate( |
1507 self.editorActGrp, |
1621 'ViewManager', |
1508 'vm_edit_extend_selection_start_display_document_line') |
1622 'Extend selection to start of display or document line'), |
|
1623 0, 0, |
|
1624 self.editorActGrp, |
|
1625 'vm_edit_extend_selection_start_display_document_line') |
1509 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAPEXTEND) |
1626 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAPEXTEND) |
1510 act.triggered[()].connect(self.esm.map) |
1627 act.triggered[()].connect(self.esm.map) |
1511 self.editActions.append(act) |
1628 self.editActions.append(act) |
1512 |
1629 |
1513 if hasattr(QsciScintilla, "SCI_VCHOMEWRAP"): |
1630 if hasattr(QsciScintilla, "SCI_VCHOMEWRAP"): |
1593 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWN) |
1723 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWN) |
1594 act.triggered[()].connect(self.esm.map) |
1724 act.triggered[()].connect(self.esm.map) |
1595 self.editActions.append(act) |
1725 self.editActions.append(act) |
1596 |
1726 |
1597 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWNEXTEND"): |
1727 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWNEXTEND"): |
1598 act = E5Action(QApplication.translate('ViewManager', |
1728 act = E5Action( |
1599 'Stuttered extend selection down one page'), |
1729 QApplication.translate( |
1600 QApplication.translate('ViewManager', |
1730 'ViewManager', |
1601 'Stuttered extend selection down one page'), |
1731 'Stuttered extend selection down one page'), |
1602 0, 0, |
1732 QApplication.translate( |
1603 self.editorActGrp, 'vm_edit_stuttered_extend_selection_down_page') |
1733 'ViewManager', |
|
1734 'Stuttered extend selection down one page'), |
|
1735 0, 0, |
|
1736 self.editorActGrp, |
|
1737 'vm_edit_stuttered_extend_selection_down_page') |
1604 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWNEXTEND) |
1738 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWNEXTEND) |
1605 act.triggered[()].connect(self.esm.map) |
1739 act.triggered[()].connect(self.esm.map) |
1606 self.editActions.append(act) |
1740 self.editActions.append(act) |
1607 |
1741 |
1608 if hasattr(QsciScintilla, "SCI_DELWORDRIGHTEND"): |
1742 if hasattr(QsciScintilla, "SCI_DELWORDRIGHTEND"): |
1609 act = E5Action(QApplication.translate('ViewManager', |
1743 act = E5Action( |
1610 'Delete right to end of next word'), |
1744 QApplication.translate( |
1611 QApplication.translate('ViewManager', |
1745 'ViewManager', |
1612 'Delete right to end of next word'), |
1746 'Delete right to end of next word'), |
1613 0, 0, |
1747 QApplication.translate( |
1614 self.editorActGrp, 'vm_edit_delete_right_end_next_word') |
1748 'ViewManager', |
|
1749 'Delete right to end of next word'), |
|
1750 0, 0, |
|
1751 self.editorActGrp, 'vm_edit_delete_right_end_next_word') |
1615 if isMacPlatform(): |
1752 if isMacPlatform(): |
1616 act.setShortcut(QKeySequence( |
1753 act.setShortcut(QKeySequence( |
1617 QApplication.translate('ViewManager', 'Alt+Del'))) |
1754 QApplication.translate('ViewManager', 'Alt+Del'))) |
1618 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHTEND) |
1755 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHTEND) |
1619 act.triggered[()].connect(self.esm.map) |
1756 act.triggered[()].connect(self.esm.map) |
1620 self.editActions.append(act) |
1757 self.editActions.append(act) |
1621 |
1758 |
1622 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESUP"): |
1759 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESUP"): |
1623 act = E5Action(QApplication.translate('ViewManager', |
1760 act = E5Action( |
1624 'Move selected lines up one line'), |
1761 QApplication.translate( |
1625 QApplication.translate('ViewManager', |
1762 'ViewManager', |
1626 'Move selected lines up one line'), |
1763 'Move selected lines up one line'), |
1627 0, 0, |
1764 QApplication.translate( |
1628 self.editorActGrp, 'vm_edit_move_selection_up_one_line') |
1765 'ViewManager', |
|
1766 'Move selected lines up one line'), |
|
1767 0, 0, |
|
1768 self.editorActGrp, 'vm_edit_move_selection_up_one_line') |
1629 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESUP) |
1769 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESUP) |
1630 act.triggered[()].connect(self.esm.map) |
1770 act.triggered[()].connect(self.esm.map) |
1631 self.editActions.append(act) |
1771 self.editActions.append(act) |
1632 |
1772 |
1633 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESDOWN"): |
1773 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESDOWN"): |
1634 act = E5Action(QApplication.translate('ViewManager', |
1774 act = E5Action( |
1635 'Move selected lines down one line'), |
1775 QApplication.translate( |
1636 QApplication.translate('ViewManager', |
1776 'ViewManager', |
1637 'Move selected lines down one line'), |
1777 'Move selected lines down one line'), |
1638 0, 0, |
1778 QApplication.translate( |
1639 self.editorActGrp, 'vm_edit_move_selection_down_one_line') |
1779 'ViewManager', |
|
1780 'Move selected lines down one line'), |
|
1781 0, 0, |
|
1782 self.editorActGrp, 'vm_edit_move_selection_down_one_line') |
1640 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESDOWN) |
1783 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESDOWN) |
1641 act.triggered[()].connect(self.esm.map) |
1784 act.triggered[()].connect(self.esm.map) |
1642 self.editActions.append(act) |
1785 self.editActions.append(act) |
1643 |
1786 |
1644 act = E5Action(QApplication.translate('ViewManager', |
1787 act = E5Action( |
1645 'Duplicate current selection'), |
1788 QApplication.translate( |
1646 QApplication.translate('ViewManager', |
1789 'ViewManager', |
1647 'Duplicate current selection'), |
1790 'Duplicate current selection'), |
1648 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Shift+D')), |
1791 QApplication.translate( |
1649 0, |
1792 'ViewManager', |
1650 self.editorActGrp, 'vm_edit_duplicate_current_selection') |
1793 'Duplicate current selection'), |
|
1794 QKeySequence(QApplication.translate('ViewManager', |
|
1795 'Ctrl+Shift+D')), |
|
1796 0, self.editorActGrp, 'vm_edit_duplicate_current_selection') |
1651 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE) |
1797 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE) |
1652 act.triggered[()].connect(self.esm.map) |
1798 act.triggered[()].connect(self.esm.map) |
1653 self.editActions.append(act) |
1799 self.editActions.append(act) |
1654 |
1800 |
1655 self.__textEdit.addActions(self.editorActGrp.actions()) |
1801 self.__textEdit.addActions(self.editorActGrp.actions()) |
1656 |
1802 |
1657 def __createSearchActions(self): |
1803 def __createSearchActions(self): |
1658 """ |
1804 """ |
1659 Private method defining the user interface actions for the search commands. |
1805 Private method defining the user interface actions for the search |
1660 """ |
1806 commands. |
1661 self.searchAct = E5Action(QApplication.translate('ViewManager', 'Search'), |
1807 """ |
1662 UI.PixmapCache.getIcon("find.png"), |
1808 self.searchAct = E5Action( |
1663 QApplication.translate('ViewManager', '&Search...'), |
1809 QApplication.translate('ViewManager', 'Search'), |
1664 QKeySequence(QApplication.translate('ViewManager', |
1810 UI.PixmapCache.getIcon("find.png"), |
1665 "Ctrl+F", "Search|Search")), |
1811 QApplication.translate('ViewManager', '&Search...'), |
1666 0, |
1812 QKeySequence(QApplication.translate( |
1667 self, 'vm_search') |
1813 'ViewManager', "Ctrl+F", "Search|Search")), |
|
1814 0, |
|
1815 self, 'vm_search') |
1668 self.searchAct.setStatusTip(QApplication.translate('ViewManager', |
1816 self.searchAct.setStatusTip(QApplication.translate('ViewManager', |
1669 'Search for a text')) |
1817 'Search for a text')) |
1670 self.searchAct.setWhatsThis(QApplication.translate('ViewManager', |
1818 self.searchAct.setWhatsThis(QApplication.translate('ViewManager', |
1671 """<b>Search</b>""" |
1819 """<b>Search</b>""" |
1672 """<p>Search for some text in the current editor. A""" |
1820 """<p>Search for some text in the current editor. A""" |
1704 self, 'vm_search_previous') |
1853 self, 'vm_search_previous') |
1705 self.searchPrevAct.setStatusTip(QApplication.translate('ViewManager', |
1854 self.searchPrevAct.setStatusTip(QApplication.translate('ViewManager', |
1706 'Search previous occurrence of text')) |
1855 'Search previous occurrence of text')) |
1707 self.searchPrevAct.setWhatsThis(QApplication.translate('ViewManager', |
1856 self.searchPrevAct.setWhatsThis(QApplication.translate('ViewManager', |
1708 """<b>Search previous</b>""" |
1857 """<b>Search previous</b>""" |
1709 """<p>Search the previous occurrence of some text in the current editor.""" |
1858 """<p>Search the previous occurrence of some text in the""" |
1710 """ The previously entered searchtext and options are reused.</p>""" |
1859 """ current editor. The previously entered searchtext and""" |
|
1860 """ options are reused.</p>""" |
1711 )) |
1861 )) |
1712 self.searchPrevAct.triggered[()].connect(self.searchDlg.findPrev) |
1862 self.searchPrevAct.triggered[()].connect(self.searchDlg.findPrev) |
1713 self.searchActions.append(self.searchPrevAct) |
1863 self.searchActions.append(self.searchPrevAct) |
1714 |
1864 |
1715 self.searchClearMarkersAct = E5Action(QApplication.translate('ViewManager', |
1865 self.searchClearMarkersAct = E5Action( |
1716 'Clear search markers'), |
1866 QApplication.translate('ViewManager', |
1717 UI.PixmapCache.getIcon("findClear.png"), |
1867 'Clear search markers'), |
1718 QApplication.translate('ViewManager', 'Clear search markers'), |
1868 UI.PixmapCache.getIcon("findClear.png"), |
1719 QKeySequence(QApplication.translate('ViewManager', |
1869 QApplication.translate('ViewManager', 'Clear search markers'), |
1720 "Ctrl+3", "Search|Clear search markers")), |
1870 QKeySequence(QApplication.translate( |
1721 0, |
1871 'ViewManager', "Ctrl+3", "Search|Clear search markers")), |
1722 self, 'vm_clear_search_markers') |
1872 0, |
1723 self.searchClearMarkersAct.setStatusTip(QApplication.translate('ViewManager', |
1873 self, 'vm_clear_search_markers') |
1724 'Clear all displayed search markers')) |
1874 self.searchClearMarkersAct.setStatusTip(QApplication.translate( |
1725 self.searchClearMarkersAct.setWhatsThis(QApplication.translate('ViewManager', |
1875 'ViewManager', 'Clear all displayed search markers')) |
|
1876 self.searchClearMarkersAct.setWhatsThis(QApplication.translate( |
|
1877 'ViewManager', |
1726 """<b>Clear search markers</b>""" |
1878 """<b>Clear search markers</b>""" |
1727 """<p>Clear all displayed search markers.</p>""" |
1879 """<p>Clear all displayed search markers.</p>""" |
1728 )) |
1880 )) |
1729 self.searchClearMarkersAct.triggered[()].connect(self.__searchClearMarkers) |
1881 self.searchClearMarkersAct.triggered[()].connect( |
|
1882 self.__searchClearMarkers) |
1730 self.searchActions.append(self.searchClearMarkersAct) |
1883 self.searchActions.append(self.searchClearMarkersAct) |
1731 |
1884 |
1732 self.replaceAct = E5Action(QApplication.translate('ViewManager', 'Replace'), |
1885 self.replaceAct = E5Action( |
1733 QApplication.translate('ViewManager', '&Replace...'), |
1886 QApplication.translate('ViewManager', 'Replace'), |
1734 QKeySequence(QApplication.translate('ViewManager', |
1887 QApplication.translate('ViewManager', '&Replace...'), |
1735 "Ctrl+R", "Search|Replace")), |
1888 QKeySequence(QApplication.translate( |
1736 0, |
1889 'ViewManager', "Ctrl+R", "Search|Replace")), |
1737 self, 'vm_search_replace') |
1890 0, |
|
1891 self, 'vm_search_replace') |
1738 self.replaceAct.setStatusTip(QApplication.translate('ViewManager', |
1892 self.replaceAct.setStatusTip(QApplication.translate('ViewManager', |
1739 'Replace some text')) |
1893 'Replace some text')) |
1740 self.replaceAct.setWhatsThis(QApplication.translate('ViewManager', |
1894 self.replaceAct.setWhatsThis(QApplication.translate('ViewManager', |
1741 """<b>Replace</b>""" |
1895 """<b>Replace</b>""" |
1742 """<p>Search for some text in the current editor and replace it. A""" |
1896 """<p>Search for some text in the current editor and replace""" |
1743 """ dialog is shown to enter the searchtext, the replacement text""" |
1897 """ it. A dialog is shown to enter the searchtext, the""" |
1744 """ and options for the search and replace.</p>""" |
1898 """ replacement text and options for the search and replace.</p>""" |
1745 )) |
1899 )) |
1746 self.replaceAct.triggered[()].connect(self.__replace) |
1900 self.replaceAct.triggered[()].connect(self.__replace) |
1747 self.searchActions.append(self.replaceAct) |
1901 self.searchActions.append(self.replaceAct) |
1748 |
1902 |
1749 def __createHelpActions(self): |
1903 def __createHelpActions(self): |