3343:f7a6d271bb40 | 3345:071afe8be2a1 |
---|---|
7 Module implementing the viewmanager base class. | 7 Module implementing the viewmanager base class. |
8 """ | 8 """ |
9 | 9 |
10 import os | 10 import os |
11 | 11 |
12 from PyQt4.QtCore import QSignalMapper, QTimer, QFileInfo, pyqtSignal, \ | 12 from PyQt4.QtCore import pyqtSlot, pyqtSignal, QSignalMapper, QTimer, \ |
13 QRegExp, QObject, Qt | 13 QFileInfo, QRegExp, QObject, Qt |
14 from PyQt4.QtGui import QColor, QKeySequence, QLineEdit, QToolBar, \ | 14 from PyQt4.QtGui import QColor, QKeySequence, QLineEdit, QToolBar, \ |
15 QWidgetAction, QDialog, QApplication, QMenu, QPalette, QComboBox, QPixmap | 15 QWidgetAction, QDialog, QApplication, QMenu, QPalette, QComboBox, QPixmap |
16 from PyQt4.Qsci import QsciScintilla | 16 from PyQt4.Qsci import QsciScintilla |
17 | 17 |
18 from E5Gui.E5Application import e5App | 18 from E5Gui.E5Application import e5App |
573 self.newAct.setWhatsThis(QApplication.translate( | 573 self.newAct.setWhatsThis(QApplication.translate( |
574 'ViewManager', | 574 'ViewManager', |
575 """<b>New</b>""" | 575 """<b>New</b>""" |
576 """<p>An empty editor window will be created.</p>""" | 576 """<p>An empty editor window will be created.</p>""" |
577 )) | 577 )) |
578 self.newAct.triggered[()].connect(self.newEditor) | 578 self.newAct.triggered.connect(self.newEditor) |
579 self.fileActions.append(self.newAct) | 579 self.fileActions.append(self.newAct) |
580 | 580 |
581 self.openAct = E5Action( | 581 self.openAct = E5Action( |
582 QApplication.translate('ViewManager', 'Open'), | 582 QApplication.translate('ViewManager', 'Open'), |
583 UI.PixmapCache.getIcon("open.png"), | 583 UI.PixmapCache.getIcon("open.png"), |
591 'ViewManager', | 591 'ViewManager', |
592 """<b>Open a file</b>""" | 592 """<b>Open a file</b>""" |
593 """<p>You will be asked for the name of a file to be opened""" | 593 """<p>You will be asked for the name of a file to be opened""" |
594 """ in an editor window.</p>""" | 594 """ in an editor window.</p>""" |
595 )) | 595 )) |
596 self.openAct.triggered[()].connect(self.openFiles) | 596 self.openAct.triggered.connect(self.openFiles) |
597 self.fileActions.append(self.openAct) | 597 self.fileActions.append(self.openAct) |
598 | 598 |
599 self.closeActGrp = createActionGroup(self) | 599 self.closeActGrp = createActionGroup(self) |
600 | 600 |
601 self.closeAct = E5Action( | 601 self.closeAct = E5Action( |
610 self.closeAct.setWhatsThis(QApplication.translate( | 610 self.closeAct.setWhatsThis(QApplication.translate( |
611 'ViewManager', | 611 'ViewManager', |
612 """<b>Close Window</b>""" | 612 """<b>Close Window</b>""" |
613 """<p>Close the current window.</p>""" | 613 """<p>Close the current window.</p>""" |
614 )) | 614 )) |
615 self.closeAct.triggered[()].connect(self.closeCurrentWindow) | 615 self.closeAct.triggered.connect(self.closeCurrentWindow) |
616 self.fileActions.append(self.closeAct) | 616 self.fileActions.append(self.closeAct) |
617 | 617 |
618 self.closeAllAct = E5Action( | 618 self.closeAllAct = E5Action( |
619 QApplication.translate('ViewManager', 'Close All'), | 619 QApplication.translate('ViewManager', 'Close All'), |
620 QApplication.translate('ViewManager', 'Clos&e All'), | 620 QApplication.translate('ViewManager', 'Clos&e All'), |
624 self.closeAllAct.setWhatsThis(QApplication.translate( | 624 self.closeAllAct.setWhatsThis(QApplication.translate( |
625 'ViewManager', | 625 'ViewManager', |
626 """<b>Close All Windows</b>""" | 626 """<b>Close All Windows</b>""" |
627 """<p>Close all editor windows.</p>""" | 627 """<p>Close all editor windows.</p>""" |
628 )) | 628 )) |
629 self.closeAllAct.triggered[()].connect(self.closeAllWindows) | 629 self.closeAllAct.triggered.connect(self.closeAllWindows) |
630 self.fileActions.append(self.closeAllAct) | 630 self.fileActions.append(self.closeAllAct) |
631 | 631 |
632 self.closeActGrp.setEnabled(False) | 632 self.closeActGrp.setEnabled(False) |
633 | 633 |
634 self.saveActGrp = createActionGroup(self) | 634 self.saveActGrp = createActionGroup(self) |
645 self.saveAct.setWhatsThis(QApplication.translate( | 645 self.saveAct.setWhatsThis(QApplication.translate( |
646 'ViewManager', | 646 'ViewManager', |
647 """<b>Save File</b>""" | 647 """<b>Save File</b>""" |
648 """<p>Save the contents of current editor window.</p>""" | 648 """<p>Save the contents of current editor window.</p>""" |
649 )) | 649 )) |
650 self.saveAct.triggered[()].connect(self.saveCurrentEditor) | 650 self.saveAct.triggered.connect(self.saveCurrentEditor) |
651 self.fileActions.append(self.saveAct) | 651 self.fileActions.append(self.saveAct) |
652 | 652 |
653 self.saveAsAct = E5Action( | 653 self.saveAsAct = E5Action( |
654 QApplication.translate('ViewManager', 'Save as'), | 654 QApplication.translate('ViewManager', 'Save as'), |
655 UI.PixmapCache.getIcon("fileSaveAs.png"), | 655 UI.PixmapCache.getIcon("fileSaveAs.png"), |
663 'ViewManager', | 663 'ViewManager', |
664 """<b>Save File as</b>""" | 664 """<b>Save File as</b>""" |
665 """<p>Save the contents of current editor window to a new file.""" | 665 """<p>Save the contents of current editor window to a new file.""" |
666 """ The file can be entered in a file selection dialog.</p>""" | 666 """ The file can be entered in a file selection dialog.</p>""" |
667 )) | 667 )) |
668 self.saveAsAct.triggered[()].connect(self.saveAsCurrentEditor) | 668 self.saveAsAct.triggered.connect(self.saveAsCurrentEditor) |
669 self.fileActions.append(self.saveAsAct) | 669 self.fileActions.append(self.saveAsAct) |
670 | 670 |
671 self.saveAllAct = E5Action( | 671 self.saveAllAct = E5Action( |
672 QApplication.translate('ViewManager', 'Save all'), | 672 QApplication.translate('ViewManager', 'Save all'), |
673 UI.PixmapCache.getIcon("fileSaveAll.png"), | 673 UI.PixmapCache.getIcon("fileSaveAll.png"), |
678 self.saveAllAct.setWhatsThis(QApplication.translate( | 678 self.saveAllAct.setWhatsThis(QApplication.translate( |
679 'ViewManager', | 679 'ViewManager', |
680 """<b>Save All Files</b>""" | 680 """<b>Save All Files</b>""" |
681 """<p>Save the contents of all editor windows.</p>""" | 681 """<p>Save the contents of all editor windows.</p>""" |
682 )) | 682 )) |
683 self.saveAllAct.triggered[()].connect(self.saveAllEditors) | 683 self.saveAllAct.triggered.connect(self.saveAllEditors) |
684 self.fileActions.append(self.saveAllAct) | 684 self.fileActions.append(self.saveAllAct) |
685 | 685 |
686 self.saveActGrp.setEnabled(False) | 686 self.saveActGrp.setEnabled(False) |
687 | 687 |
688 self.printAct = E5Action( | 688 self.printAct = E5Action( |
697 self.printAct.setWhatsThis(QApplication.translate( | 697 self.printAct.setWhatsThis(QApplication.translate( |
698 'ViewManager', | 698 'ViewManager', |
699 """<b>Print File</b>""" | 699 """<b>Print File</b>""" |
700 """<p>Print the contents of current editor window.</p>""" | 700 """<p>Print the contents of current editor window.</p>""" |
701 )) | 701 )) |
702 self.printAct.triggered[()].connect(self.printCurrentEditor) | 702 self.printAct.triggered.connect(self.printCurrentEditor) |
703 self.printAct.setEnabled(False) | 703 self.printAct.setEnabled(False) |
704 self.fileActions.append(self.printAct) | 704 self.fileActions.append(self.printAct) |
705 | 705 |
706 self.printPreviewAct = E5Action( | 706 self.printPreviewAct = E5Action( |
707 QApplication.translate('ViewManager', 'Print Preview'), | 707 QApplication.translate('ViewManager', 'Print Preview'), |
713 self.printPreviewAct.setWhatsThis(QApplication.translate( | 713 self.printPreviewAct.setWhatsThis(QApplication.translate( |
714 'ViewManager', | 714 'ViewManager', |
715 """<b>Print Preview</b>""" | 715 """<b>Print Preview</b>""" |
716 """<p>Print preview of the current editor window.</p>""" | 716 """<p>Print preview of the current editor window.</p>""" |
717 )) | 717 )) |
718 self.printPreviewAct.triggered[()].connect( | 718 self.printPreviewAct.triggered.connect( |
719 self.printPreviewCurrentEditor) | 719 self.printPreviewCurrentEditor) |
720 self.printPreviewAct.setEnabled(False) | 720 self.printPreviewAct.setEnabled(False) |
721 self.fileActions.append(self.printPreviewAct) | 721 self.fileActions.append(self.printPreviewAct) |
722 | 722 |
723 self.findFileNameAct = E5Action( | 723 self.findFileNameAct = E5Action( |
731 self.findFileNameAct.setWhatsThis(QApplication.translate( | 731 self.findFileNameAct.setWhatsThis(QApplication.translate( |
732 'ViewManager', | 732 'ViewManager', |
733 """<b>Search File</b>""" | 733 """<b>Search File</b>""" |
734 """<p>Search for a file.</p>""" | 734 """<p>Search for a file.</p>""" |
735 )) | 735 )) |
736 self.findFileNameAct.triggered[()].connect(self.__findFileName) | 736 self.findFileNameAct.triggered.connect(self.__findFileName) |
737 self.fileActions.append(self.findFileNameAct) | 737 self.fileActions.append(self.findFileNameAct) |
738 | 738 |
739 def initFileMenu(self): | 739 def initFileMenu(self): |
740 """ | 740 """ |
741 Public method to create the File menu. | 741 Public method to create the File menu. |
851 self.undoAct.setWhatsThis(QApplication.translate( | 851 self.undoAct.setWhatsThis(QApplication.translate( |
852 'ViewManager', | 852 'ViewManager', |
853 """<b>Undo</b>""" | 853 """<b>Undo</b>""" |
854 """<p>Undo the last change done in the current editor.</p>""" | 854 """<p>Undo the last change done in the current editor.</p>""" |
855 )) | 855 )) |
856 self.undoAct.triggered[()].connect(self.__editUndo) | 856 self.undoAct.triggered.connect(self.__editUndo) |
857 self.editActions.append(self.undoAct) | 857 self.editActions.append(self.undoAct) |
858 | 858 |
859 self.redoAct = E5Action( | 859 self.redoAct = E5Action( |
860 QApplication.translate('ViewManager', 'Redo'), | 860 QApplication.translate('ViewManager', 'Redo'), |
861 UI.PixmapCache.getIcon("editRedo.png"), | 861 UI.PixmapCache.getIcon("editRedo.png"), |
869 self.redoAct.setWhatsThis(QApplication.translate( | 869 self.redoAct.setWhatsThis(QApplication.translate( |
870 'ViewManager', | 870 'ViewManager', |
871 """<b>Redo</b>""" | 871 """<b>Redo</b>""" |
872 """<p>Redo the last change done in the current editor.</p>""" | 872 """<p>Redo the last change done in the current editor.</p>""" |
873 )) | 873 )) |
874 self.redoAct.triggered[()].connect(self.__editRedo) | 874 self.redoAct.triggered.connect(self.__editRedo) |
875 self.editActions.append(self.redoAct) | 875 self.editActions.append(self.redoAct) |
876 | 876 |
877 self.revertAct = E5Action( | 877 self.revertAct = E5Action( |
878 QApplication.translate( | 878 QApplication.translate( |
879 'ViewManager', 'Revert to last saved state'), | 879 'ViewManager', 'Revert to last saved state'), |
889 'ViewManager', | 889 'ViewManager', |
890 """<b>Revert to last saved state</b>""" | 890 """<b>Revert to last saved state</b>""" |
891 """<p>Undo all changes up to the last saved state""" | 891 """<p>Undo all changes up to the last saved state""" |
892 """ of the current editor.</p>""" | 892 """ of the current editor.</p>""" |
893 )) | 893 )) |
894 self.revertAct.triggered[()].connect(self.__editRevert) | 894 self.revertAct.triggered.connect(self.__editRevert) |
895 self.editActions.append(self.revertAct) | 895 self.editActions.append(self.revertAct) |
896 | 896 |
897 self.copyActGrp = createActionGroup(self.editActGrp) | 897 self.copyActGrp = createActionGroup(self.editActGrp) |
898 | 898 |
899 self.cutAct = E5Action( | 899 self.cutAct = E5Action( |
911 'ViewManager', | 911 'ViewManager', |
912 """<b>Cut</b>""" | 912 """<b>Cut</b>""" |
913 """<p>Cut the selected text of the current editor to the""" | 913 """<p>Cut the selected text of the current editor to the""" |
914 """ clipboard.</p>""" | 914 """ clipboard.</p>""" |
915 )) | 915 )) |
916 self.cutAct.triggered[()].connect(self.__editCut) | 916 self.cutAct.triggered.connect(self.__editCut) |
917 self.editActions.append(self.cutAct) | 917 self.editActions.append(self.cutAct) |
918 | 918 |
919 self.copyAct = E5Action( | 919 self.copyAct = E5Action( |
920 QApplication.translate('ViewManager', 'Copy'), | 920 QApplication.translate('ViewManager', 'Copy'), |
921 UI.PixmapCache.getIcon("editCopy.png"), | 921 UI.PixmapCache.getIcon("editCopy.png"), |
931 'ViewManager', | 931 'ViewManager', |
932 """<b>Copy</b>""" | 932 """<b>Copy</b>""" |
933 """<p>Copy the selected text of the current editor to the""" | 933 """<p>Copy the selected text of the current editor to the""" |
934 """ clipboard.</p>""" | 934 """ clipboard.</p>""" |
935 )) | 935 )) |
936 self.copyAct.triggered[()].connect(self.__editCopy) | 936 self.copyAct.triggered.connect(self.__editCopy) |
937 self.editActions.append(self.copyAct) | 937 self.editActions.append(self.copyAct) |
938 | 938 |
939 self.pasteAct = E5Action( | 939 self.pasteAct = E5Action( |
940 QApplication.translate('ViewManager', 'Paste'), | 940 QApplication.translate('ViewManager', 'Paste'), |
941 UI.PixmapCache.getIcon("editPaste.png"), | 941 UI.PixmapCache.getIcon("editPaste.png"), |
951 'ViewManager', | 951 'ViewManager', |
952 """<b>Paste</b>""" | 952 """<b>Paste</b>""" |
953 """<p>Paste the last cut/copied text from the clipboard to""" | 953 """<p>Paste the last cut/copied text from the clipboard to""" |
954 """ the current editor.</p>""" | 954 """ the current editor.</p>""" |
955 )) | 955 )) |
956 self.pasteAct.triggered[()].connect(self.__editPaste) | 956 self.pasteAct.triggered.connect(self.__editPaste) |
957 self.editActions.append(self.pasteAct) | 957 self.editActions.append(self.pasteAct) |
958 | 958 |
959 self.deleteAct = E5Action( | 959 self.deleteAct = E5Action( |
960 QApplication.translate('ViewManager', 'Clear'), | 960 QApplication.translate('ViewManager', 'Clear'), |
961 UI.PixmapCache.getIcon("editDelete.png"), | 961 UI.PixmapCache.getIcon("editDelete.png"), |
969 self.deleteAct.setWhatsThis(QApplication.translate( | 969 self.deleteAct.setWhatsThis(QApplication.translate( |
970 'ViewManager', | 970 'ViewManager', |
971 """<b>Clear</b>""" | 971 """<b>Clear</b>""" |
972 """<p>Delete all text of the current editor.</p>""" | 972 """<p>Delete all text of the current editor.</p>""" |
973 )) | 973 )) |
974 self.deleteAct.triggered[()].connect(self.__editDelete) | 974 self.deleteAct.triggered.connect(self.__editDelete) |
975 self.editActions.append(self.deleteAct) | 975 self.editActions.append(self.deleteAct) |
976 | 976 |
977 self.joinAct = E5Action( | 977 self.joinAct = E5Action( |
978 QApplication.translate('ViewManager', 'Join Lines'), | 978 QApplication.translate('ViewManager', 'Join Lines'), |
979 QApplication.translate('ViewManager', 'Join Lines'), | 979 QApplication.translate('ViewManager', 'Join Lines'), |
986 self.joinAct.setWhatsThis(QApplication.translate( | 986 self.joinAct.setWhatsThis(QApplication.translate( |
987 'ViewManager', | 987 'ViewManager', |
988 """<b>Join Lines</b>""" | 988 """<b>Join Lines</b>""" |
989 """<p>Join the current and the next lines.</p>""" | 989 """<p>Join the current and the next lines.</p>""" |
990 )) | 990 )) |
991 self.joinAct.triggered[()].connect(self.__editJoin) | 991 self.joinAct.triggered.connect(self.__editJoin) |
992 self.editActions.append(self.joinAct) | 992 self.editActions.append(self.joinAct) |
993 | 993 |
994 self.indentAct = E5Action( | 994 self.indentAct = E5Action( |
995 QApplication.translate('ViewManager', 'Indent'), | 995 QApplication.translate('ViewManager', 'Indent'), |
996 UI.PixmapCache.getIcon("editIndent.png"), | 996 UI.PixmapCache.getIcon("editIndent.png"), |
1005 'ViewManager', | 1005 'ViewManager', |
1006 """<b>Indent</b>""" | 1006 """<b>Indent</b>""" |
1007 """<p>Indents the current line or the lines of the""" | 1007 """<p>Indents the current line or the lines of the""" |
1008 """ selection by one level.</p>""" | 1008 """ selection by one level.</p>""" |
1009 )) | 1009 )) |
1010 self.indentAct.triggered[()].connect(self.__editIndent) | 1010 self.indentAct.triggered.connect(self.__editIndent) |
1011 self.editActions.append(self.indentAct) | 1011 self.editActions.append(self.indentAct) |
1012 | 1012 |
1013 self.unindentAct = E5Action( | 1013 self.unindentAct = E5Action( |
1014 QApplication.translate('ViewManager', 'Unindent'), | 1014 QApplication.translate('ViewManager', 'Unindent'), |
1015 UI.PixmapCache.getIcon("editUnindent.png"), | 1015 UI.PixmapCache.getIcon("editUnindent.png"), |
1024 'ViewManager', | 1024 'ViewManager', |
1025 """<b>Unindent</b>""" | 1025 """<b>Unindent</b>""" |
1026 """<p>Unindents the current line or the lines of the""" | 1026 """<p>Unindents the current line or the lines of the""" |
1027 """ selection by one level.</p>""" | 1027 """ selection by one level.</p>""" |
1028 )) | 1028 )) |
1029 self.unindentAct.triggered[()].connect(self.__editUnindent) | 1029 self.unindentAct.triggered.connect(self.__editUnindent) |
1030 self.editActions.append(self.unindentAct) | 1030 self.editActions.append(self.unindentAct) |
1031 | 1031 |
1032 self.smartIndentAct = E5Action( | 1032 self.smartIndentAct = E5Action( |
1033 QApplication.translate('ViewManager', 'Smart indent'), | 1033 QApplication.translate('ViewManager', 'Smart indent'), |
1034 UI.PixmapCache.getIcon("editSmartIndent.png"), | 1034 UI.PixmapCache.getIcon("editSmartIndent.png"), |
1043 'ViewManager', | 1043 'ViewManager', |
1044 """<b>Smart indent</b>""" | 1044 """<b>Smart indent</b>""" |
1045 """<p>Indents the current line or the lines of the""" | 1045 """<p>Indents the current line or the lines of the""" |
1046 """ current selection smartly.</p>""" | 1046 """ current selection smartly.</p>""" |
1047 )) | 1047 )) |
1048 self.smartIndentAct.triggered[()].connect(self.__editSmartIndent) | 1048 self.smartIndentAct.triggered.connect(self.__editSmartIndent) |
1049 self.editActions.append(self.smartIndentAct) | 1049 self.editActions.append(self.smartIndentAct) |
1050 | 1050 |
1051 self.commentAct = E5Action( | 1051 self.commentAct = E5Action( |
1052 QApplication.translate('ViewManager', 'Comment'), | 1052 QApplication.translate('ViewManager', 'Comment'), |
1053 UI.PixmapCache.getIcon("editComment.png"), | 1053 UI.PixmapCache.getIcon("editComment.png"), |
1062 'ViewManager', | 1062 'ViewManager', |
1063 """<b>Comment</b>""" | 1063 """<b>Comment</b>""" |
1064 """<p>Comments the current line or the lines of the""" | 1064 """<p>Comments the current line or the lines of the""" |
1065 """ current selection.</p>""" | 1065 """ current selection.</p>""" |
1066 )) | 1066 )) |
1067 self.commentAct.triggered[()].connect(self.__editComment) | 1067 self.commentAct.triggered.connect(self.__editComment) |
1068 self.editActions.append(self.commentAct) | 1068 self.editActions.append(self.commentAct) |
1069 | 1069 |
1070 self.uncommentAct = E5Action( | 1070 self.uncommentAct = E5Action( |
1071 QApplication.translate('ViewManager', 'Uncomment'), | 1071 QApplication.translate('ViewManager', 'Uncomment'), |
1072 UI.PixmapCache.getIcon("editUncomment.png"), | 1072 UI.PixmapCache.getIcon("editUncomment.png"), |
1081 'ViewManager', | 1081 'ViewManager', |
1082 """<b>Uncomment</b>""" | 1082 """<b>Uncomment</b>""" |
1083 """<p>Uncomments the current line or the lines of the""" | 1083 """<p>Uncomments the current line or the lines of the""" |
1084 """ current selection.</p>""" | 1084 """ current selection.</p>""" |
1085 )) | 1085 )) |
1086 self.uncommentAct.triggered[()].connect(self.__editUncomment) | 1086 self.uncommentAct.triggered.connect(self.__editUncomment) |
1087 self.editActions.append(self.uncommentAct) | 1087 self.editActions.append(self.uncommentAct) |
1088 | 1088 |
1089 self.toggleCommentAct = E5Action( | 1089 self.toggleCommentAct = E5Action( |
1090 QApplication.translate('ViewManager', 'Toggle Comment'), | 1090 QApplication.translate('ViewManager', 'Toggle Comment'), |
1091 UI.PixmapCache.getIcon("editToggleComment.png"), | 1091 UI.PixmapCache.getIcon("editToggleComment.png"), |
1103 """<b>Toggle Comment</b>""" | 1103 """<b>Toggle Comment</b>""" |
1104 """<p>If the current line does not start with a block comment,""" | 1104 """<p>If the current line does not start with a block comment,""" |
1105 """ the current line or selection is commented. If it is already""" | 1105 """ the current line or selection is commented. If it is already""" |
1106 """ commented, this comment block is uncommented. </p>""" | 1106 """ commented, this comment block is uncommented. </p>""" |
1107 )) | 1107 )) |
1108 self.toggleCommentAct.triggered[()].connect(self.__editToggleComment) | 1108 self.toggleCommentAct.triggered.connect(self.__editToggleComment) |
1109 self.editActions.append(self.toggleCommentAct) | 1109 self.editActions.append(self.toggleCommentAct) |
1110 | 1110 |
1111 self.streamCommentAct = E5Action( | 1111 self.streamCommentAct = E5Action( |
1112 QApplication.translate('ViewManager', 'Stream Comment'), | 1112 QApplication.translate('ViewManager', 'Stream Comment'), |
1113 QApplication.translate('ViewManager', 'Stream Comment'), | 1113 QApplication.translate('ViewManager', 'Stream Comment'), |
1120 'ViewManager', | 1120 'ViewManager', |
1121 """<b>Stream Comment</b>""" | 1121 """<b>Stream Comment</b>""" |
1122 """<p>Stream comments the current line or the current""" | 1122 """<p>Stream comments the current line or the current""" |
1123 """ selection.</p>""" | 1123 """ selection.</p>""" |
1124 )) | 1124 )) |
1125 self.streamCommentAct.triggered[()].connect(self.__editStreamComment) | 1125 self.streamCommentAct.triggered.connect(self.__editStreamComment) |
1126 self.editActions.append(self.streamCommentAct) | 1126 self.editActions.append(self.streamCommentAct) |
1127 | 1127 |
1128 self.boxCommentAct = E5Action( | 1128 self.boxCommentAct = E5Action( |
1129 QApplication.translate('ViewManager', 'Box Comment'), | 1129 QApplication.translate('ViewManager', 'Box Comment'), |
1130 QApplication.translate('ViewManager', 'Box Comment'), | 1130 QApplication.translate('ViewManager', 'Box Comment'), |
1136 'ViewManager', | 1136 'ViewManager', |
1137 """<b>Box Comment</b>""" | 1137 """<b>Box Comment</b>""" |
1138 """<p>Box comments the current line or the lines of the""" | 1138 """<p>Box comments the current line or the lines of the""" |
1139 """ current selection.</p>""" | 1139 """ current selection.</p>""" |
1140 )) | 1140 )) |
1141 self.boxCommentAct.triggered[()].connect(self.__editBoxComment) | 1141 self.boxCommentAct.triggered.connect(self.__editBoxComment) |
1142 self.editActions.append(self.boxCommentAct) | 1142 self.editActions.append(self.boxCommentAct) |
1143 | 1143 |
1144 self.selectBraceAct = E5Action( | 1144 self.selectBraceAct = E5Action( |
1145 QApplication.translate('ViewManager', 'Select to brace'), | 1145 QApplication.translate('ViewManager', 'Select to brace'), |
1146 QApplication.translate('ViewManager', 'Select to &brace'), | 1146 QApplication.translate('ViewManager', 'Select to &brace'), |
1154 'ViewManager', | 1154 'ViewManager', |
1155 """<b>Select to brace</b>""" | 1155 """<b>Select to brace</b>""" |
1156 """<p>Select text of the current editor to the matching""" | 1156 """<p>Select text of the current editor to the matching""" |
1157 """ brace.</p>""" | 1157 """ brace.</p>""" |
1158 )) | 1158 )) |
1159 self.selectBraceAct.triggered[()].connect(self.__editSelectBrace) | 1159 self.selectBraceAct.triggered.connect(self.__editSelectBrace) |
1160 self.editActions.append(self.selectBraceAct) | 1160 self.editActions.append(self.selectBraceAct) |
1161 | 1161 |
1162 self.selectAllAct = E5Action( | 1162 self.selectAllAct = E5Action( |
1163 QApplication.translate('ViewManager', 'Select all'), | 1163 QApplication.translate('ViewManager', 'Select all'), |
1164 QApplication.translate('ViewManager', '&Select all'), | 1164 QApplication.translate('ViewManager', '&Select all'), |
1171 self.selectAllAct.setWhatsThis(QApplication.translate( | 1171 self.selectAllAct.setWhatsThis(QApplication.translate( |
1172 'ViewManager', | 1172 'ViewManager', |
1173 """<b>Select All</b>""" | 1173 """<b>Select All</b>""" |
1174 """<p>Select all text of the current editor.</p>""" | 1174 """<p>Select all text of the current editor.</p>""" |
1175 )) | 1175 )) |
1176 self.selectAllAct.triggered[()].connect(self.__editSelectAll) | 1176 self.selectAllAct.triggered.connect(self.__editSelectAll) |
1177 self.editActions.append(self.selectAllAct) | 1177 self.editActions.append(self.selectAllAct) |
1178 | 1178 |
1179 self.deselectAllAct = E5Action( | 1179 self.deselectAllAct = E5Action( |
1180 QApplication.translate('ViewManager', 'Deselect all'), | 1180 QApplication.translate('ViewManager', 'Deselect all'), |
1181 QApplication.translate('ViewManager', '&Deselect all'), | 1181 QApplication.translate('ViewManager', '&Deselect all'), |
1188 self.deselectAllAct.setWhatsThis(QApplication.translate( | 1188 self.deselectAllAct.setWhatsThis(QApplication.translate( |
1189 'ViewManager', | 1189 'ViewManager', |
1190 """<b>Deselect All</b>""" | 1190 """<b>Deselect All</b>""" |
1191 """<p>Deselect all text of the current editor.</p>""" | 1191 """<p>Deselect all text of the current editor.</p>""" |
1192 )) | 1192 )) |
1193 self.deselectAllAct.triggered[()].connect(self.__editDeselectAll) | 1193 self.deselectAllAct.triggered.connect(self.__editDeselectAll) |
1194 self.editActions.append(self.deselectAllAct) | 1194 self.editActions.append(self.deselectAllAct) |
1195 | 1195 |
1196 self.convertEOLAct = E5Action( | 1196 self.convertEOLAct = E5Action( |
1197 QApplication.translate( | 1197 QApplication.translate( |
1198 'ViewManager', 'Convert Line End Characters'), | 1198 'ViewManager', 'Convert Line End Characters'), |
1206 'ViewManager', | 1206 'ViewManager', |
1207 """<b>Convert Line End Characters</b>""" | 1207 """<b>Convert Line End Characters</b>""" |
1208 """<p>Convert the line end characters to the currently set""" | 1208 """<p>Convert the line end characters to the currently set""" |
1209 """ type.</p>""" | 1209 """ type.</p>""" |
1210 )) | 1210 )) |
1211 self.convertEOLAct.triggered[()].connect(self.__convertEOL) | 1211 self.convertEOLAct.triggered.connect(self.__convertEOL) |
1212 self.editActions.append(self.convertEOLAct) | 1212 self.editActions.append(self.convertEOLAct) |
1213 | 1213 |
1214 self.shortenEmptyAct = E5Action( | 1214 self.shortenEmptyAct = E5Action( |
1215 QApplication.translate('ViewManager', 'Shorten empty lines'), | 1215 QApplication.translate('ViewManager', 'Shorten empty lines'), |
1216 QApplication.translate('ViewManager', 'Shorten empty lines'), | 1216 QApplication.translate('ViewManager', 'Shorten empty lines'), |
1222 'ViewManager', | 1222 'ViewManager', |
1223 """<b>Shorten empty lines</b>""" | 1223 """<b>Shorten empty lines</b>""" |
1224 """<p>Shorten lines consisting solely of whitespace""" | 1224 """<p>Shorten lines consisting solely of whitespace""" |
1225 """ characters.</p>""" | 1225 """ characters.</p>""" |
1226 )) | 1226 )) |
1227 self.shortenEmptyAct.triggered[()].connect(self.__shortenEmptyLines) | 1227 self.shortenEmptyAct.triggered.connect(self.__shortenEmptyLines) |
1228 self.editActions.append(self.shortenEmptyAct) | 1228 self.editActions.append(self.shortenEmptyAct) |
1229 | 1229 |
1230 self.autoCompleteAct = E5Action( | 1230 self.autoCompleteAct = E5Action( |
1231 QApplication.translate('ViewManager', 'Autocomplete'), | 1231 QApplication.translate('ViewManager', 'Autocomplete'), |
1232 QApplication.translate('ViewManager', '&Autocomplete'), | 1232 QApplication.translate('ViewManager', '&Autocomplete'), |
1240 'ViewManager', | 1240 'ViewManager', |
1241 """<b>Autocomplete</b>""" | 1241 """<b>Autocomplete</b>""" |
1242 """<p>Performs an autocompletion of the word containing""" | 1242 """<p>Performs an autocompletion of the word containing""" |
1243 """ the cursor.</p>""" | 1243 """ the cursor.</p>""" |
1244 )) | 1244 )) |
1245 self.autoCompleteAct.triggered[()].connect(self.__editAutoComplete) | 1245 self.autoCompleteAct.triggered.connect(self.__editAutoComplete) |
1246 self.editActions.append(self.autoCompleteAct) | 1246 self.editActions.append(self.autoCompleteAct) |
1247 | 1247 |
1248 self.autoCompleteFromDocAct = E5Action( | 1248 self.autoCompleteFromDocAct = E5Action( |
1249 QApplication.translate( | 1249 QApplication.translate( |
1250 'ViewManager', 'Autocomplete from Document'), | 1250 'ViewManager', 'Autocomplete from Document'), |
1262 'ViewManager', | 1262 'ViewManager', |
1263 """<b>Autocomplete from Document</b>""" | 1263 """<b>Autocomplete from Document</b>""" |
1264 """<p>Performs an autocompletion from document of the word""" | 1264 """<p>Performs an autocompletion from document of the word""" |
1265 """ containing the cursor.</p>""" | 1265 """ containing the cursor.</p>""" |
1266 )) | 1266 )) |
1267 self.autoCompleteFromDocAct.triggered[()].connect( | 1267 self.autoCompleteFromDocAct.triggered.connect( |
1268 self.__editAutoCompleteFromDoc) | 1268 self.__editAutoCompleteFromDoc) |
1269 self.editActions.append(self.autoCompleteFromDocAct) | 1269 self.editActions.append(self.autoCompleteFromDocAct) |
1270 | 1270 |
1271 self.autoCompleteFromAPIsAct = E5Action( | 1271 self.autoCompleteFromAPIsAct = E5Action( |
1272 QApplication.translate('ViewManager', 'Autocomplete from APIs'), | 1272 QApplication.translate('ViewManager', 'Autocomplete from APIs'), |
1283 'ViewManager', | 1283 'ViewManager', |
1284 """<b>Autocomplete from APIs</b>""" | 1284 """<b>Autocomplete from APIs</b>""" |
1285 """<p>Performs an autocompletion from APIs of the word""" | 1285 """<p>Performs an autocompletion from APIs of the word""" |
1286 """ containing the cursor.</p>""" | 1286 """ containing the cursor.</p>""" |
1287 )) | 1287 )) |
1288 self.autoCompleteFromAPIsAct.triggered[()].connect( | 1288 self.autoCompleteFromAPIsAct.triggered.connect( |
1289 self.__editAutoCompleteFromAPIs) | 1289 self.__editAutoCompleteFromAPIs) |
1290 self.editActions.append(self.autoCompleteFromAPIsAct) | 1290 self.editActions.append(self.autoCompleteFromAPIsAct) |
1291 | 1291 |
1292 self.autoCompleteFromAllAct = E5Action( | 1292 self.autoCompleteFromAllAct = E5Action( |
1293 QApplication.translate( | 1293 QApplication.translate( |
1306 'ViewManager', | 1306 'ViewManager', |
1307 """<b>Autocomplete from Document and APIs</b>""" | 1307 """<b>Autocomplete from Document and APIs</b>""" |
1308 """<p>Performs an autocompletion from document and APIs""" | 1308 """<p>Performs an autocompletion from document and APIs""" |
1309 """ of the word containing the cursor.</p>""" | 1309 """ of the word containing the cursor.</p>""" |
1310 )) | 1310 )) |
1311 self.autoCompleteFromAllAct.triggered[()].connect( | 1311 self.autoCompleteFromAllAct.triggered.connect( |
1312 self.__editAutoCompleteFromAll) | 1312 self.__editAutoCompleteFromAll) |
1313 self.editActions.append(self.autoCompleteFromAllAct) | 1313 self.editActions.append(self.autoCompleteFromAllAct) |
1314 | 1314 |
1315 self.calltipsAct = E5Action( | 1315 self.calltipsAct = E5Action( |
1316 QApplication.translate('ViewManager', 'Calltip'), | 1316 QApplication.translate('ViewManager', 'Calltip'), |
1325 'ViewManager', | 1325 'ViewManager', |
1326 """<b>Calltip</b>""" | 1326 """<b>Calltip</b>""" |
1327 """<p>Show calltips based on the characters immediately to the""" | 1327 """<p>Show calltips based on the characters immediately to the""" |
1328 """ left of the cursor.</p>""" | 1328 """ left of the cursor.</p>""" |
1329 )) | 1329 )) |
1330 self.calltipsAct.triggered[()].connect(self.__editShowCallTips) | 1330 self.calltipsAct.triggered.connect(self.__editShowCallTips) |
1331 self.editActions.append(self.calltipsAct) | 1331 self.editActions.append(self.calltipsAct) |
1332 | 1332 |
1333 self.sortAct = E5Action( | 1333 self.sortAct = E5Action( |
1334 QApplication.translate('ViewManager', 'Sort'), | 1334 QApplication.translate('ViewManager', 'Sort'), |
1335 QApplication.translate('ViewManager', 'Sort'), | 1335 QApplication.translate('ViewManager', 'Sort'), |
1344 'ViewManager', | 1344 'ViewManager', |
1345 """<b>Sort</b>""" | 1345 """<b>Sort</b>""" |
1346 """<p>Sort the lines spanned by a rectangular selection based on""" | 1346 """<p>Sort the lines spanned by a rectangular selection based on""" |
1347 """ the selection ignoring leading and trailing whitespace.</p>""" | 1347 """ the selection ignoring leading and trailing whitespace.</p>""" |
1348 )) | 1348 )) |
1349 self.sortAct.triggered[()].connect(self.__editSortSelectedLines) | 1349 self.sortAct.triggered.connect(self.__editSortSelectedLines) |
1350 self.editActions.append(self.sortAct) | 1350 self.editActions.append(self.sortAct) |
1351 | 1351 |
1352 self.editActGrp.setEnabled(False) | 1352 self.editActGrp.setEnabled(False) |
1353 self.copyActGrp.setEnabled(False) | 1353 self.copyActGrp.setEnabled(False) |
1354 | 1354 |
1368 self.editorActGrp, 'vm_edit_move_left_char') | 1368 self.editorActGrp, 'vm_edit_move_left_char') |
1369 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFT) | 1369 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFT) |
1370 if isMacPlatform(): | 1370 if isMacPlatform(): |
1371 act.setAlternateShortcut(QKeySequence( | 1371 act.setAlternateShortcut(QKeySequence( |
1372 QApplication.translate('ViewManager', 'Meta+B'))) | 1372 QApplication.translate('ViewManager', 'Meta+B'))) |
1373 act.triggered[()].connect(self.esm.map) | 1373 act.triggered.connect(self.esm.map) |
1374 self.editActions.append(act) | 1374 self.editActions.append(act) |
1375 | 1375 |
1376 act = E5Action( | 1376 act = E5Action( |
1377 QApplication.translate('ViewManager', 'Move right one character'), | 1377 QApplication.translate('ViewManager', 'Move right one character'), |
1378 QApplication.translate('ViewManager', 'Move right one character'), | 1378 QApplication.translate('ViewManager', 'Move right one character'), |
1380 self.editorActGrp, 'vm_edit_move_right_char') | 1380 self.editorActGrp, 'vm_edit_move_right_char') |
1381 if isMacPlatform(): | 1381 if isMacPlatform(): |
1382 act.setAlternateShortcut(QKeySequence( | 1382 act.setAlternateShortcut(QKeySequence( |
1383 QApplication.translate('ViewManager', 'Meta+F'))) | 1383 QApplication.translate('ViewManager', 'Meta+F'))) |
1384 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHT) | 1384 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHT) |
1385 act.triggered[()].connect(self.esm.map) | 1385 act.triggered.connect(self.esm.map) |
1386 self.editActions.append(act) | 1386 self.editActions.append(act) |
1387 | 1387 |
1388 act = E5Action( | 1388 act = E5Action( |
1389 QApplication.translate('ViewManager', 'Move up one line'), | 1389 QApplication.translate('ViewManager', 'Move up one line'), |
1390 QApplication.translate('ViewManager', 'Move up one line'), | 1390 QApplication.translate('ViewManager', 'Move up one line'), |
1392 self.editorActGrp, 'vm_edit_move_up_line') | 1392 self.editorActGrp, 'vm_edit_move_up_line') |
1393 if isMacPlatform(): | 1393 if isMacPlatform(): |
1394 act.setAlternateShortcut(QKeySequence( | 1394 act.setAlternateShortcut(QKeySequence( |
1395 QApplication.translate('ViewManager', 'Meta+P'))) | 1395 QApplication.translate('ViewManager', 'Meta+P'))) |
1396 self.esm.setMapping(act, QsciScintilla.SCI_LINEUP) | 1396 self.esm.setMapping(act, QsciScintilla.SCI_LINEUP) |
1397 act.triggered[()].connect(self.esm.map) | 1397 act.triggered.connect(self.esm.map) |
1398 self.editActions.append(act) | 1398 self.editActions.append(act) |
1399 | 1399 |
1400 act = E5Action( | 1400 act = E5Action( |
1401 QApplication.translate('ViewManager', 'Move down one line'), | 1401 QApplication.translate('ViewManager', 'Move down one line'), |
1402 QApplication.translate('ViewManager', 'Move down one line'), | 1402 QApplication.translate('ViewManager', 'Move down one line'), |
1404 self.editorActGrp, 'vm_edit_move_down_line') | 1404 self.editorActGrp, 'vm_edit_move_down_line') |
1405 if isMacPlatform(): | 1405 if isMacPlatform(): |
1406 act.setAlternateShortcut(QKeySequence( | 1406 act.setAlternateShortcut(QKeySequence( |
1407 QApplication.translate('ViewManager', 'Meta+N'))) | 1407 QApplication.translate('ViewManager', 'Meta+N'))) |
1408 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWN) | 1408 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWN) |
1409 act.triggered[()].connect(self.esm.map) | 1409 act.triggered.connect(self.esm.map) |
1410 self.editActions.append(act) | 1410 self.editActions.append(act) |
1411 | 1411 |
1412 act = E5Action( | 1412 act = E5Action( |
1413 QApplication.translate('ViewManager', 'Move left one word part'), | 1413 QApplication.translate('ViewManager', 'Move left one word part'), |
1414 QApplication.translate('ViewManager', 'Move left one word part'), | 1414 QApplication.translate('ViewManager', 'Move left one word part'), |
1416 self.editorActGrp, 'vm_edit_move_left_word_part') | 1416 self.editorActGrp, 'vm_edit_move_left_word_part') |
1417 if not isMacPlatform(): | 1417 if not isMacPlatform(): |
1418 act.setShortcut(QKeySequence( | 1418 act.setShortcut(QKeySequence( |
1419 QApplication.translate('ViewManager', 'Alt+Left'))) | 1419 QApplication.translate('ViewManager', 'Alt+Left'))) |
1420 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFT) | 1420 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFT) |
1421 act.triggered[()].connect(self.esm.map) | 1421 act.triggered.connect(self.esm.map) |
1422 self.editActions.append(act) | 1422 self.editActions.append(act) |
1423 | 1423 |
1424 act = E5Action( | 1424 act = E5Action( |
1425 QApplication.translate('ViewManager', 'Move right one word part'), | 1425 QApplication.translate('ViewManager', 'Move right one word part'), |
1426 QApplication.translate('ViewManager', 'Move right one word part'), | 1426 QApplication.translate('ViewManager', 'Move right one word part'), |
1428 self.editorActGrp, 'vm_edit_move_right_word_part') | 1428 self.editorActGrp, 'vm_edit_move_right_word_part') |
1429 if not isMacPlatform(): | 1429 if not isMacPlatform(): |
1430 act.setShortcut(QKeySequence( | 1430 act.setShortcut(QKeySequence( |
1431 QApplication.translate('ViewManager', 'Alt+Right'))) | 1431 QApplication.translate('ViewManager', 'Alt+Right'))) |
1432 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHT) | 1432 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHT) |
1433 act.triggered[()].connect(self.esm.map) | 1433 act.triggered.connect(self.esm.map) |
1434 self.editActions.append(act) | 1434 self.editActions.append(act) |
1435 | 1435 |
1436 act = E5Action( | 1436 act = E5Action( |
1437 QApplication.translate('ViewManager', 'Move left one word'), | 1437 QApplication.translate('ViewManager', 'Move left one word'), |
1438 QApplication.translate('ViewManager', 'Move left one word'), | 1438 QApplication.translate('ViewManager', 'Move left one word'), |
1443 QApplication.translate('ViewManager', 'Alt+Left'))) | 1443 QApplication.translate('ViewManager', 'Alt+Left'))) |
1444 else: | 1444 else: |
1445 act.setShortcut(QKeySequence( | 1445 act.setShortcut(QKeySequence( |
1446 QApplication.translate('ViewManager', 'Ctrl+Left'))) | 1446 QApplication.translate('ViewManager', 'Ctrl+Left'))) |
1447 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFT) | 1447 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFT) |
1448 act.triggered[()].connect(self.esm.map) | 1448 act.triggered.connect(self.esm.map) |
1449 self.editActions.append(act) | 1449 self.editActions.append(act) |
1450 | 1450 |
1451 act = E5Action( | 1451 act = E5Action( |
1452 QApplication.translate('ViewManager', 'Move right one word'), | 1452 QApplication.translate('ViewManager', 'Move right one word'), |
1453 QApplication.translate('ViewManager', 'Move right one word'), | 1453 QApplication.translate('ViewManager', 'Move right one word'), |
1455 self.editorActGrp, 'vm_edit_move_right_word') | 1455 self.editorActGrp, 'vm_edit_move_right_word') |
1456 if not isMacPlatform(): | 1456 if not isMacPlatform(): |
1457 act.setShortcut(QKeySequence( | 1457 act.setShortcut(QKeySequence( |
1458 QApplication.translate('ViewManager', 'Ctrl+Right'))) | 1458 QApplication.translate('ViewManager', 'Ctrl+Right'))) |
1459 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT) | 1459 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT) |
1460 act.triggered[()].connect(self.esm.map) | 1460 act.triggered.connect(self.esm.map) |
1461 self.editActions.append(act) | 1461 self.editActions.append(act) |
1462 | 1462 |
1463 act = E5Action( | 1463 act = E5Action( |
1464 QApplication.translate( | 1464 QApplication.translate( |
1465 'ViewManager', | 1465 'ViewManager', |
1471 self.editorActGrp, 'vm_edit_move_first_visible_char') | 1471 self.editorActGrp, 'vm_edit_move_first_visible_char') |
1472 if not isMacPlatform(): | 1472 if not isMacPlatform(): |
1473 act.setShortcut(QKeySequence( | 1473 act.setShortcut(QKeySequence( |
1474 QApplication.translate('ViewManager', 'Home'))) | 1474 QApplication.translate('ViewManager', 'Home'))) |
1475 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME) | 1475 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME) |
1476 act.triggered[()].connect(self.esm.map) | 1476 act.triggered.connect(self.esm.map) |
1477 self.editActions.append(act) | 1477 self.editActions.append(act) |
1478 | 1478 |
1479 act = E5Action( | 1479 act = E5Action( |
1480 QApplication.translate( | 1480 QApplication.translate( |
1481 'ViewManager', 'Move to start of display line'), | 1481 'ViewManager', 'Move to start of display line'), |
1488 QApplication.translate('ViewManager', 'Ctrl+Left'))) | 1488 QApplication.translate('ViewManager', 'Ctrl+Left'))) |
1489 else: | 1489 else: |
1490 act.setShortcut(QKeySequence( | 1490 act.setShortcut(QKeySequence( |
1491 QApplication.translate('ViewManager', 'Alt+Home'))) | 1491 QApplication.translate('ViewManager', 'Alt+Home'))) |
1492 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAY) | 1492 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAY) |
1493 act.triggered[()].connect(self.esm.map) | 1493 act.triggered.connect(self.esm.map) |
1494 self.editActions.append(act) | 1494 self.editActions.append(act) |
1495 | 1495 |
1496 act = E5Action( | 1496 act = E5Action( |
1497 QApplication.translate( | 1497 QApplication.translate( |
1498 'ViewManager', 'Move to end of document line'), | 1498 'ViewManager', 'Move to end of document line'), |
1505 QApplication.translate('ViewManager', 'Meta+E'))) | 1505 QApplication.translate('ViewManager', 'Meta+E'))) |
1506 else: | 1506 else: |
1507 act.setShortcut(QKeySequence( | 1507 act.setShortcut(QKeySequence( |
1508 QApplication.translate('ViewManager', 'End'))) | 1508 QApplication.translate('ViewManager', 'End'))) |
1509 self.esm.setMapping(act, QsciScintilla.SCI_LINEEND) | 1509 self.esm.setMapping(act, QsciScintilla.SCI_LINEEND) |
1510 act.triggered[()].connect(self.esm.map) | 1510 act.triggered.connect(self.esm.map) |
1511 self.editActions.append(act) | 1511 self.editActions.append(act) |
1512 | 1512 |
1513 act = E5Action( | 1513 act = E5Action( |
1514 QApplication.translate('ViewManager', 'Scroll view down one line'), | 1514 QApplication.translate('ViewManager', 'Scroll view down one line'), |
1515 QApplication.translate('ViewManager', 'Scroll view down one line'), | 1515 QApplication.translate('ViewManager', 'Scroll view down one line'), |
1516 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Down')), | 1516 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Down')), |
1517 0, | 1517 0, |
1518 self.editorActGrp, 'vm_edit_scroll_down_line') | 1518 self.editorActGrp, 'vm_edit_scroll_down_line') |
1519 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLDOWN) | 1519 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLDOWN) |
1520 act.triggered[()].connect(self.esm.map) | 1520 act.triggered.connect(self.esm.map) |
1521 self.editActions.append(act) | 1521 self.editActions.append(act) |
1522 | 1522 |
1523 act = E5Action( | 1523 act = E5Action( |
1524 QApplication.translate('ViewManager', 'Scroll view up one line'), | 1524 QApplication.translate('ViewManager', 'Scroll view up one line'), |
1525 QApplication.translate('ViewManager', 'Scroll view up one line'), | 1525 QApplication.translate('ViewManager', 'Scroll view up one line'), |
1526 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Up')), 0, | 1526 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Up')), 0, |
1527 self.editorActGrp, 'vm_edit_scroll_up_line') | 1527 self.editorActGrp, 'vm_edit_scroll_up_line') |
1528 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLUP) | 1528 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLUP) |
1529 act.triggered[()].connect(self.esm.map) | 1529 act.triggered.connect(self.esm.map) |
1530 self.editActions.append(act) | 1530 self.editActions.append(act) |
1531 | 1531 |
1532 act = E5Action( | 1532 act = E5Action( |
1533 QApplication.translate('ViewManager', 'Move up one paragraph'), | 1533 QApplication.translate('ViewManager', 'Move up one paragraph'), |
1534 QApplication.translate('ViewManager', 'Move up one paragraph'), | 1534 QApplication.translate('ViewManager', 'Move up one paragraph'), |
1535 QKeySequence(QApplication.translate('ViewManager', 'Alt+Up')), 0, | 1535 QKeySequence(QApplication.translate('ViewManager', 'Alt+Up')), 0, |
1536 self.editorActGrp, 'vm_edit_move_up_para') | 1536 self.editorActGrp, 'vm_edit_move_up_para') |
1537 self.esm.setMapping(act, QsciScintilla.SCI_PARAUP) | 1537 self.esm.setMapping(act, QsciScintilla.SCI_PARAUP) |
1538 act.triggered[()].connect(self.esm.map) | 1538 act.triggered.connect(self.esm.map) |
1539 self.editActions.append(act) | 1539 self.editActions.append(act) |
1540 | 1540 |
1541 act = E5Action( | 1541 act = E5Action( |
1542 QApplication.translate('ViewManager', 'Move down one paragraph'), | 1542 QApplication.translate('ViewManager', 'Move down one paragraph'), |
1543 QApplication.translate('ViewManager', 'Move down one paragraph'), | 1543 QApplication.translate('ViewManager', 'Move down one paragraph'), |
1544 QKeySequence(QApplication.translate('ViewManager', 'Alt+Down')), 0, | 1544 QKeySequence(QApplication.translate('ViewManager', 'Alt+Down')), 0, |
1545 self.editorActGrp, 'vm_edit_move_down_para') | 1545 self.editorActGrp, 'vm_edit_move_down_para') |
1546 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWN) | 1546 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWN) |
1547 act.triggered[()].connect(self.esm.map) | 1547 act.triggered.connect(self.esm.map) |
1548 self.editActions.append(act) | 1548 self.editActions.append(act) |
1549 | 1549 |
1550 act = E5Action( | 1550 act = E5Action( |
1551 QApplication.translate('ViewManager', 'Move up one page'), | 1551 QApplication.translate('ViewManager', 'Move up one page'), |
1552 QApplication.translate('ViewManager', 'Move up one page'), | 1552 QApplication.translate('ViewManager', 'Move up one page'), |
1553 QKeySequence(QApplication.translate('ViewManager', 'PgUp')), 0, | 1553 QKeySequence(QApplication.translate('ViewManager', 'PgUp')), 0, |
1554 self.editorActGrp, 'vm_edit_move_up_page') | 1554 self.editorActGrp, 'vm_edit_move_up_page') |
1555 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUP) | 1555 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUP) |
1556 act.triggered[()].connect(self.esm.map) | 1556 act.triggered.connect(self.esm.map) |
1557 self.editActions.append(act) | 1557 self.editActions.append(act) |
1558 | 1558 |
1559 act = E5Action( | 1559 act = E5Action( |
1560 QApplication.translate('ViewManager', 'Move down one page'), | 1560 QApplication.translate('ViewManager', 'Move down one page'), |
1561 QApplication.translate('ViewManager', 'Move down one page'), | 1561 QApplication.translate('ViewManager', 'Move down one page'), |
1563 self.editorActGrp, 'vm_edit_move_down_page') | 1563 self.editorActGrp, 'vm_edit_move_down_page') |
1564 if isMacPlatform(): | 1564 if isMacPlatform(): |
1565 act.setAlternateShortcut(QKeySequence( | 1565 act.setAlternateShortcut(QKeySequence( |
1566 QApplication.translate('ViewManager', 'Meta+V'))) | 1566 QApplication.translate('ViewManager', 'Meta+V'))) |
1567 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWN) | 1567 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWN) |
1568 act.triggered[()].connect(self.esm.map) | 1568 act.triggered.connect(self.esm.map) |
1569 self.editActions.append(act) | 1569 self.editActions.append(act) |
1570 | 1570 |
1571 act = E5Action( | 1571 act = E5Action( |
1572 QApplication.translate('ViewManager', 'Move to start of document'), | 1572 QApplication.translate('ViewManager', 'Move to start of document'), |
1573 QApplication.translate('ViewManager', 'Move to start of document'), | 1573 QApplication.translate('ViewManager', 'Move to start of document'), |
1578 QApplication.translate('ViewManager', 'Ctrl+Up'))) | 1578 QApplication.translate('ViewManager', 'Ctrl+Up'))) |
1579 else: | 1579 else: |
1580 act.setShortcut(QKeySequence( | 1580 act.setShortcut(QKeySequence( |
1581 QApplication.translate('ViewManager', 'Ctrl+Home'))) | 1581 QApplication.translate('ViewManager', 'Ctrl+Home'))) |
1582 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTART) | 1582 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTART) |
1583 act.triggered[()].connect(self.esm.map) | 1583 act.triggered.connect(self.esm.map) |
1584 self.editActions.append(act) | 1584 self.editActions.append(act) |
1585 | 1585 |
1586 act = E5Action( | 1586 act = E5Action( |
1587 QApplication.translate('ViewManager', 'Move to end of document'), | 1587 QApplication.translate('ViewManager', 'Move to end of document'), |
1588 QApplication.translate('ViewManager', 'Move to end of document'), | 1588 QApplication.translate('ViewManager', 'Move to end of document'), |
1593 QApplication.translate('ViewManager', 'Ctrl+Down'))) | 1593 QApplication.translate('ViewManager', 'Ctrl+Down'))) |
1594 else: | 1594 else: |
1595 act.setShortcut(QKeySequence( | 1595 act.setShortcut(QKeySequence( |
1596 QApplication.translate('ViewManager', 'Ctrl+End'))) | 1596 QApplication.translate('ViewManager', 'Ctrl+End'))) |
1597 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTEND) | 1597 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTEND) |
1598 act.triggered[()].connect(self.esm.map) | 1598 act.triggered.connect(self.esm.map) |
1599 self.editActions.append(act) | 1599 self.editActions.append(act) |
1600 | 1600 |
1601 act = E5Action( | 1601 act = E5Action( |
1602 QApplication.translate('ViewManager', 'Indent one level'), | 1602 QApplication.translate('ViewManager', 'Indent one level'), |
1603 QApplication.translate('ViewManager', 'Indent one level'), | 1603 QApplication.translate('ViewManager', 'Indent one level'), |
1604 QKeySequence(QApplication.translate('ViewManager', 'Tab')), 0, | 1604 QKeySequence(QApplication.translate('ViewManager', 'Tab')), 0, |
1605 self.editorActGrp, 'vm_edit_indent_one_level') | 1605 self.editorActGrp, 'vm_edit_indent_one_level') |
1606 self.esm.setMapping(act, QsciScintilla.SCI_TAB) | 1606 self.esm.setMapping(act, QsciScintilla.SCI_TAB) |
1607 act.triggered[()].connect(self.esm.map) | 1607 act.triggered.connect(self.esm.map) |
1608 self.editActions.append(act) | 1608 self.editActions.append(act) |
1609 | 1609 |
1610 act = E5Action( | 1610 act = E5Action( |
1611 QApplication.translate('ViewManager', 'Unindent one level'), | 1611 QApplication.translate('ViewManager', 'Unindent one level'), |
1612 QApplication.translate('ViewManager', 'Unindent one level'), | 1612 QApplication.translate('ViewManager', 'Unindent one level'), |
1613 QKeySequence(QApplication.translate('ViewManager', 'Shift+Tab')), | 1613 QKeySequence(QApplication.translate('ViewManager', 'Shift+Tab')), |
1614 0, | 1614 0, |
1615 self.editorActGrp, 'vm_edit_unindent_one_level') | 1615 self.editorActGrp, 'vm_edit_unindent_one_level') |
1616 self.esm.setMapping(act, QsciScintilla.SCI_BACKTAB) | 1616 self.esm.setMapping(act, QsciScintilla.SCI_BACKTAB) |
1617 act.triggered[()].connect(self.esm.map) | 1617 act.triggered.connect(self.esm.map) |
1618 self.editActions.append(act) | 1618 self.editActions.append(act) |
1619 | 1619 |
1620 act = E5Action( | 1620 act = E5Action( |
1621 QApplication.translate( | 1621 QApplication.translate( |
1622 'ViewManager', 'Extend selection left one character'), | 1622 'ViewManager', 'Extend selection left one character'), |
1627 self.editorActGrp, 'vm_edit_extend_selection_left_char') | 1627 self.editorActGrp, 'vm_edit_extend_selection_left_char') |
1628 if isMacPlatform(): | 1628 if isMacPlatform(): |
1629 act.setAlternateShortcut(QKeySequence( | 1629 act.setAlternateShortcut(QKeySequence( |
1630 QApplication.translate('ViewManager', 'Meta+Shift+B'))) | 1630 QApplication.translate('ViewManager', 'Meta+Shift+B'))) |
1631 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTEXTEND) | 1631 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTEXTEND) |
1632 act.triggered[()].connect(self.esm.map) | 1632 act.triggered.connect(self.esm.map) |
1633 self.editActions.append(act) | 1633 self.editActions.append(act) |
1634 | 1634 |
1635 act = E5Action( | 1635 act = E5Action( |
1636 QApplication.translate( | 1636 QApplication.translate( |
1637 'ViewManager', 'Extend selection right one character'), | 1637 'ViewManager', 'Extend selection right one character'), |
1642 self.editorActGrp, 'vm_edit_extend_selection_right_char') | 1642 self.editorActGrp, 'vm_edit_extend_selection_right_char') |
1643 if isMacPlatform(): | 1643 if isMacPlatform(): |
1644 act.setAlternateShortcut(QKeySequence( | 1644 act.setAlternateShortcut(QKeySequence( |
1645 QApplication.translate('ViewManager', 'Meta+Shift+F'))) | 1645 QApplication.translate('ViewManager', 'Meta+Shift+F'))) |
1646 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTEXTEND) | 1646 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTEXTEND) |
1647 act.triggered[()].connect(self.esm.map) | 1647 act.triggered.connect(self.esm.map) |
1648 self.editActions.append(act) | 1648 self.editActions.append(act) |
1649 | 1649 |
1650 act = E5Action( | 1650 act = E5Action( |
1651 QApplication.translate( | 1651 QApplication.translate( |
1652 'ViewManager', 'Extend selection up one line'), | 1652 'ViewManager', 'Extend selection up one line'), |
1656 self.editorActGrp, 'vm_edit_extend_selection_up_line') | 1656 self.editorActGrp, 'vm_edit_extend_selection_up_line') |
1657 if isMacPlatform(): | 1657 if isMacPlatform(): |
1658 act.setAlternateShortcut(QKeySequence( | 1658 act.setAlternateShortcut(QKeySequence( |
1659 QApplication.translate('ViewManager', 'Meta+Shift+P'))) | 1659 QApplication.translate('ViewManager', 'Meta+Shift+P'))) |
1660 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPEXTEND) | 1660 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPEXTEND) |
1661 act.triggered[()].connect(self.esm.map) | 1661 act.triggered.connect(self.esm.map) |
1662 self.editActions.append(act) | 1662 self.editActions.append(act) |
1663 | 1663 |
1664 act = E5Action( | 1664 act = E5Action( |
1665 QApplication.translate( | 1665 QApplication.translate( |
1666 'ViewManager', 'Extend selection down one line'), | 1666 'ViewManager', 'Extend selection down one line'), |
1671 self.editorActGrp, 'vm_edit_extend_selection_down_line') | 1671 self.editorActGrp, 'vm_edit_extend_selection_down_line') |
1672 if isMacPlatform(): | 1672 if isMacPlatform(): |
1673 act.setAlternateShortcut(QKeySequence( | 1673 act.setAlternateShortcut(QKeySequence( |
1674 QApplication.translate('ViewManager', 'Meta+Shift+N'))) | 1674 QApplication.translate('ViewManager', 'Meta+Shift+N'))) |
1675 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNEXTEND) | 1675 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNEXTEND) |
1676 act.triggered[()].connect(self.esm.map) | 1676 act.triggered.connect(self.esm.map) |
1677 self.editActions.append(act) | 1677 self.editActions.append(act) |
1678 | 1678 |
1679 act = E5Action( | 1679 act = E5Action( |
1680 QApplication.translate( | 1680 QApplication.translate( |
1681 'ViewManager', 'Extend selection left one word part'), | 1681 'ViewManager', 'Extend selection left one word part'), |
1685 self.editorActGrp, 'vm_edit_extend_selection_left_word_part') | 1685 self.editorActGrp, 'vm_edit_extend_selection_left_word_part') |
1686 if not isMacPlatform(): | 1686 if not isMacPlatform(): |
1687 act.setShortcut(QKeySequence( | 1687 act.setShortcut(QKeySequence( |
1688 QApplication.translate('ViewManager', 'Alt+Shift+Left'))) | 1688 QApplication.translate('ViewManager', 'Alt+Shift+Left'))) |
1689 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFTEXTEND) | 1689 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFTEXTEND) |
1690 act.triggered[()].connect(self.esm.map) | 1690 act.triggered.connect(self.esm.map) |
1691 self.editActions.append(act) | 1691 self.editActions.append(act) |
1692 | 1692 |
1693 act = E5Action( | 1693 act = E5Action( |
1694 QApplication.translate( | 1694 QApplication.translate( |
1695 'ViewManager', 'Extend selection right one word part'), | 1695 'ViewManager', 'Extend selection right one word part'), |
1699 self.editorActGrp, 'vm_edit_extend_selection_right_word_part') | 1699 self.editorActGrp, 'vm_edit_extend_selection_right_word_part') |
1700 if not isMacPlatform(): | 1700 if not isMacPlatform(): |
1701 act.setShortcut(QKeySequence( | 1701 act.setShortcut(QKeySequence( |
1702 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) | 1702 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
1703 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND) | 1703 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND) |
1704 act.triggered[()].connect(self.esm.map) | 1704 act.triggered.connect(self.esm.map) |
1705 self.editActions.append(act) | 1705 self.editActions.append(act) |
1706 | 1706 |
1707 act = E5Action( | 1707 act = E5Action( |
1708 QApplication.translate( | 1708 QApplication.translate( |
1709 'ViewManager', 'Extend selection left one word'), | 1709 'ViewManager', 'Extend selection left one word'), |
1716 QApplication.translate('ViewManager', 'Alt+Shift+Left'))) | 1716 QApplication.translate('ViewManager', 'Alt+Shift+Left'))) |
1717 else: | 1717 else: |
1718 act.setShortcut(QKeySequence( | 1718 act.setShortcut(QKeySequence( |
1719 QApplication.translate('ViewManager', 'Ctrl+Shift+Left'))) | 1719 QApplication.translate('ViewManager', 'Ctrl+Shift+Left'))) |
1720 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEXTEND) | 1720 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEXTEND) |
1721 act.triggered[()].connect(self.esm.map) | 1721 act.triggered.connect(self.esm.map) |
1722 self.editActions.append(act) | 1722 self.editActions.append(act) |
1723 | 1723 |
1724 act = E5Action( | 1724 act = E5Action( |
1725 QApplication.translate( | 1725 QApplication.translate( |
1726 'ViewManager', 'Extend selection right one word'), | 1726 'ViewManager', 'Extend selection right one word'), |
1733 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) | 1733 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
1734 else: | 1734 else: |
1735 act.setShortcut(QKeySequence( | 1735 act.setShortcut(QKeySequence( |
1736 QApplication.translate('ViewManager', 'Ctrl+Shift+Right'))) | 1736 QApplication.translate('ViewManager', 'Ctrl+Shift+Right'))) |
1737 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEXTEND) | 1737 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEXTEND) |
1738 act.triggered[()].connect(self.esm.map) | 1738 act.triggered.connect(self.esm.map) |
1739 self.editActions.append(act) | 1739 self.editActions.append(act) |
1740 | 1740 |
1741 act = E5Action( | 1741 act = E5Action( |
1742 QApplication.translate( | 1742 QApplication.translate( |
1743 'ViewManager', | 1743 'ViewManager', |
1751 self.editorActGrp, 'vm_edit_extend_selection_first_visible_char') | 1751 self.editorActGrp, 'vm_edit_extend_selection_first_visible_char') |
1752 if not isMacPlatform(): | 1752 if not isMacPlatform(): |
1753 act.setShortcut(QKeySequence( | 1753 act.setShortcut(QKeySequence( |
1754 QApplication.translate('ViewManager', 'Shift+Home'))) | 1754 QApplication.translate('ViewManager', 'Shift+Home'))) |
1755 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEEXTEND) | 1755 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEEXTEND) |
1756 act.triggered[()].connect(self.esm.map) | 1756 act.triggered.connect(self.esm.map) |
1757 self.editActions.append(act) | 1757 self.editActions.append(act) |
1758 | 1758 |
1759 act = E5Action( | 1759 act = E5Action( |
1760 QApplication.translate( | 1760 QApplication.translate( |
1761 'ViewManager', 'Extend selection to end of document line'), | 1761 'ViewManager', 'Extend selection to end of document line'), |
1768 QApplication.translate('ViewManager', 'Meta+Shift+E'))) | 1768 QApplication.translate('ViewManager', 'Meta+Shift+E'))) |
1769 else: | 1769 else: |
1770 act.setShortcut(QKeySequence( | 1770 act.setShortcut(QKeySequence( |
1771 QApplication.translate('ViewManager', 'Shift+End'))) | 1771 QApplication.translate('ViewManager', 'Shift+End'))) |
1772 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDEXTEND) | 1772 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDEXTEND) |
1773 act.triggered[()].connect(self.esm.map) | 1773 act.triggered.connect(self.esm.map) |
1774 self.editActions.append(act) | 1774 self.editActions.append(act) |
1775 | 1775 |
1776 act = E5Action( | 1776 act = E5Action( |
1777 QApplication.translate( | 1777 QApplication.translate( |
1778 'ViewManager', 'Extend selection up one paragraph'), | 1778 'ViewManager', 'Extend selection up one paragraph'), |
1781 QKeySequence(QApplication.translate( | 1781 QKeySequence(QApplication.translate( |
1782 'ViewManager', 'Alt+Shift+Up')), | 1782 'ViewManager', 'Alt+Shift+Up')), |
1783 0, | 1783 0, |
1784 self.editorActGrp, 'vm_edit_extend_selection_up_para') | 1784 self.editorActGrp, 'vm_edit_extend_selection_up_para') |
1785 self.esm.setMapping(act, QsciScintilla.SCI_PARAUPEXTEND) | 1785 self.esm.setMapping(act, QsciScintilla.SCI_PARAUPEXTEND) |
1786 act.triggered[()].connect(self.esm.map) | 1786 act.triggered.connect(self.esm.map) |
1787 self.editActions.append(act) | 1787 self.editActions.append(act) |
1788 | 1788 |
1789 act = E5Action( | 1789 act = E5Action( |
1790 QApplication.translate( | 1790 QApplication.translate( |
1791 'ViewManager', 'Extend selection down one paragraph'), | 1791 'ViewManager', 'Extend selection down one paragraph'), |
1794 QKeySequence(QApplication.translate( | 1794 QKeySequence(QApplication.translate( |
1795 'ViewManager', 'Alt+Shift+Down')), | 1795 'ViewManager', 'Alt+Shift+Down')), |
1796 0, | 1796 0, |
1797 self.editorActGrp, 'vm_edit_extend_selection_down_para') | 1797 self.editorActGrp, 'vm_edit_extend_selection_down_para') |
1798 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWNEXTEND) | 1798 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWNEXTEND) |
1799 act.triggered[()].connect(self.esm.map) | 1799 act.triggered.connect(self.esm.map) |
1800 self.editActions.append(act) | 1800 self.editActions.append(act) |
1801 | 1801 |
1802 act = E5Action( | 1802 act = E5Action( |
1803 QApplication.translate( | 1803 QApplication.translate( |
1804 'ViewManager', 'Extend selection up one page'), | 1804 'ViewManager', 'Extend selection up one page'), |
1806 'ViewManager', 'Extend selection up one page'), | 1806 'ViewManager', 'Extend selection up one page'), |
1807 QKeySequence(QApplication.translate('ViewManager', 'Shift+PgUp')), | 1807 QKeySequence(QApplication.translate('ViewManager', 'Shift+PgUp')), |
1808 0, | 1808 0, |
1809 self.editorActGrp, 'vm_edit_extend_selection_up_page') | 1809 self.editorActGrp, 'vm_edit_extend_selection_up_page') |
1810 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPEXTEND) | 1810 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPEXTEND) |
1811 act.triggered[()].connect(self.esm.map) | 1811 act.triggered.connect(self.esm.map) |
1812 self.editActions.append(act) | 1812 self.editActions.append(act) |
1813 | 1813 |
1814 act = E5Action( | 1814 act = E5Action( |
1815 QApplication.translate( | 1815 QApplication.translate( |
1816 'ViewManager', 'Extend selection down one page'), | 1816 'ViewManager', 'Extend selection down one page'), |
1822 self.editorActGrp, 'vm_edit_extend_selection_down_page') | 1822 self.editorActGrp, 'vm_edit_extend_selection_down_page') |
1823 if isMacPlatform(): | 1823 if isMacPlatform(): |
1824 act.setAlternateShortcut(QKeySequence( | 1824 act.setAlternateShortcut(QKeySequence( |
1825 QApplication.translate('ViewManager', 'Meta+Shift+V'))) | 1825 QApplication.translate('ViewManager', 'Meta+Shift+V'))) |
1826 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNEXTEND) | 1826 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNEXTEND) |
1827 act.triggered[()].connect(self.esm.map) | 1827 act.triggered.connect(self.esm.map) |
1828 self.editActions.append(act) | 1828 self.editActions.append(act) |
1829 | 1829 |
1830 act = E5Action( | 1830 act = E5Action( |
1831 QApplication.translate( | 1831 QApplication.translate( |
1832 'ViewManager', 'Extend selection to start of document'), | 1832 'ViewManager', 'Extend selection to start of document'), |
1839 QApplication.translate('ViewManager', 'Ctrl+Shift+Up'))) | 1839 QApplication.translate('ViewManager', 'Ctrl+Shift+Up'))) |
1840 else: | 1840 else: |
1841 act.setShortcut(QKeySequence( | 1841 act.setShortcut(QKeySequence( |
1842 QApplication.translate('ViewManager', 'Ctrl+Shift+Home'))) | 1842 QApplication.translate('ViewManager', 'Ctrl+Shift+Home'))) |
1843 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTARTEXTEND) | 1843 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTARTEXTEND) |
1844 act.triggered[()].connect(self.esm.map) | 1844 act.triggered.connect(self.esm.map) |
1845 self.editActions.append(act) | 1845 self.editActions.append(act) |
1846 | 1846 |
1847 act = E5Action( | 1847 act = E5Action( |
1848 QApplication.translate( | 1848 QApplication.translate( |
1849 'ViewManager', 'Extend selection to end of document'), | 1849 'ViewManager', 'Extend selection to end of document'), |
1856 QApplication.translate('ViewManager', 'Ctrl+Shift+Down'))) | 1856 QApplication.translate('ViewManager', 'Ctrl+Shift+Down'))) |
1857 else: | 1857 else: |
1858 act.setShortcut(QKeySequence( | 1858 act.setShortcut(QKeySequence( |
1859 QApplication.translate('ViewManager', 'Ctrl+Shift+End'))) | 1859 QApplication.translate('ViewManager', 'Ctrl+Shift+End'))) |
1860 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTENDEXTEND) | 1860 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTENDEXTEND) |
1861 act.triggered[()].connect(self.esm.map) | 1861 act.triggered.connect(self.esm.map) |
1862 self.editActions.append(act) | 1862 self.editActions.append(act) |
1863 | 1863 |
1864 act = E5Action( | 1864 act = E5Action( |
1865 QApplication.translate('ViewManager', 'Delete previous character'), | 1865 QApplication.translate('ViewManager', 'Delete previous character'), |
1866 QApplication.translate('ViewManager', 'Delete previous character'), | 1866 QApplication.translate('ViewManager', 'Delete previous character'), |
1872 QApplication.translate('ViewManager', 'Meta+H'))) | 1872 QApplication.translate('ViewManager', 'Meta+H'))) |
1873 else: | 1873 else: |
1874 act.setAlternateShortcut(QKeySequence( | 1874 act.setAlternateShortcut(QKeySequence( |
1875 QApplication.translate('ViewManager', 'Shift+Backspace'))) | 1875 QApplication.translate('ViewManager', 'Shift+Backspace'))) |
1876 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACK) | 1876 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACK) |
1877 act.triggered[()].connect(self.esm.map) | 1877 act.triggered.connect(self.esm.map) |
1878 self.editActions.append(act) | 1878 self.editActions.append(act) |
1879 | 1879 |
1880 act = E5Action( | 1880 act = E5Action( |
1881 QApplication.translate( | 1881 QApplication.translate( |
1882 'ViewManager', | 1882 'ViewManager', |
1885 'ViewManager', | 1885 'ViewManager', |
1886 'Delete previous character if not at start of line'), | 1886 'Delete previous character if not at start of line'), |
1887 0, 0, | 1887 0, 0, |
1888 self.editorActGrp, 'vm_edit_delet_previous_char_not_line_start') | 1888 self.editorActGrp, 'vm_edit_delet_previous_char_not_line_start') |
1889 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACKNOTLINE) | 1889 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACKNOTLINE) |
1890 act.triggered[()].connect(self.esm.map) | 1890 act.triggered.connect(self.esm.map) |
1891 self.editActions.append(act) | 1891 self.editActions.append(act) |
1892 | 1892 |
1893 act = E5Action( | 1893 act = E5Action( |
1894 QApplication.translate('ViewManager', 'Delete current character'), | 1894 QApplication.translate('ViewManager', 'Delete current character'), |
1895 QApplication.translate('ViewManager', 'Delete current character'), | 1895 QApplication.translate('ViewManager', 'Delete current character'), |
1897 self.editorActGrp, 'vm_edit_delete_current_char') | 1897 self.editorActGrp, 'vm_edit_delete_current_char') |
1898 if isMacPlatform(): | 1898 if isMacPlatform(): |
1899 act.setAlternateShortcut(QKeySequence( | 1899 act.setAlternateShortcut(QKeySequence( |
1900 QApplication.translate('ViewManager', 'Meta+D'))) | 1900 QApplication.translate('ViewManager', 'Meta+D'))) |
1901 self.esm.setMapping(act, QsciScintilla.SCI_CLEAR) | 1901 self.esm.setMapping(act, QsciScintilla.SCI_CLEAR) |
1902 act.triggered[()].connect(self.esm.map) | 1902 act.triggered.connect(self.esm.map) |
1903 self.editActions.append(act) | 1903 self.editActions.append(act) |
1904 | 1904 |
1905 act = E5Action( | 1905 act = E5Action( |
1906 QApplication.translate('ViewManager', 'Delete word to left'), | 1906 QApplication.translate('ViewManager', 'Delete word to left'), |
1907 QApplication.translate('ViewManager', 'Delete word to left'), | 1907 QApplication.translate('ViewManager', 'Delete word to left'), |
1908 QKeySequence(QApplication.translate( | 1908 QKeySequence(QApplication.translate( |
1909 'ViewManager', 'Ctrl+Backspace')), | 1909 'ViewManager', 'Ctrl+Backspace')), |
1910 0, | 1910 0, |
1911 self.editorActGrp, 'vm_edit_delete_word_left') | 1911 self.editorActGrp, 'vm_edit_delete_word_left') |
1912 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDLEFT) | 1912 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDLEFT) |
1913 act.triggered[()].connect(self.esm.map) | 1913 act.triggered.connect(self.esm.map) |
1914 self.editActions.append(act) | 1914 self.editActions.append(act) |
1915 | 1915 |
1916 act = E5Action( | 1916 act = E5Action( |
1917 QApplication.translate('ViewManager', 'Delete word to right'), | 1917 QApplication.translate('ViewManager', 'Delete word to right'), |
1918 QApplication.translate('ViewManager', 'Delete word to right'), | 1918 QApplication.translate('ViewManager', 'Delete word to right'), |
1919 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Del')), 0, | 1919 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Del')), 0, |
1920 self.editorActGrp, 'vm_edit_delete_word_right') | 1920 self.editorActGrp, 'vm_edit_delete_word_right') |
1921 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHT) | 1921 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHT) |
1922 act.triggered[()].connect(self.esm.map) | 1922 act.triggered.connect(self.esm.map) |
1923 self.editActions.append(act) | 1923 self.editActions.append(act) |
1924 | 1924 |
1925 act = E5Action( | 1925 act = E5Action( |
1926 QApplication.translate('ViewManager', 'Delete line to left'), | 1926 QApplication.translate('ViewManager', 'Delete line to left'), |
1927 QApplication.translate('ViewManager', 'Delete line to left'), | 1927 QApplication.translate('ViewManager', 'Delete line to left'), |
1928 QKeySequence(QApplication.translate( | 1928 QKeySequence(QApplication.translate( |
1929 'ViewManager', 'Ctrl+Shift+Backspace')), | 1929 'ViewManager', 'Ctrl+Shift+Backspace')), |
1930 0, | 1930 0, |
1931 self.editorActGrp, 'vm_edit_delete_line_left') | 1931 self.editorActGrp, 'vm_edit_delete_line_left') |
1932 self.esm.setMapping(act, QsciScintilla.SCI_DELLINELEFT) | 1932 self.esm.setMapping(act, QsciScintilla.SCI_DELLINELEFT) |
1933 act.triggered[()].connect(self.esm.map) | 1933 act.triggered.connect(self.esm.map) |
1934 self.editActions.append(act) | 1934 self.editActions.append(act) |
1935 | 1935 |
1936 act = E5Action( | 1936 act = E5Action( |
1937 QApplication.translate('ViewManager', 'Delete line to right'), | 1937 QApplication.translate('ViewManager', 'Delete line to right'), |
1938 QApplication.translate('ViewManager', 'Delete line to right'), | 1938 QApplication.translate('ViewManager', 'Delete line to right'), |
1943 QApplication.translate('ViewManager', 'Meta+K'))) | 1943 QApplication.translate('ViewManager', 'Meta+K'))) |
1944 else: | 1944 else: |
1945 act.setShortcut(QKeySequence( | 1945 act.setShortcut(QKeySequence( |
1946 QApplication.translate('ViewManager', 'Ctrl+Shift+Del'))) | 1946 QApplication.translate('ViewManager', 'Ctrl+Shift+Del'))) |
1947 self.esm.setMapping(act, QsciScintilla.SCI_DELLINERIGHT) | 1947 self.esm.setMapping(act, QsciScintilla.SCI_DELLINERIGHT) |
1948 act.triggered[()].connect(self.esm.map) | 1948 act.triggered.connect(self.esm.map) |
1949 self.editActions.append(act) | 1949 self.editActions.append(act) |
1950 | 1950 |
1951 act = E5Action( | 1951 act = E5Action( |
1952 QApplication.translate('ViewManager', 'Insert new line'), | 1952 QApplication.translate('ViewManager', 'Insert new line'), |
1953 QApplication.translate('ViewManager', 'Insert new line'), | 1953 QApplication.translate('ViewManager', 'Insert new line'), |
1954 QKeySequence(QApplication.translate('ViewManager', 'Return')), | 1954 QKeySequence(QApplication.translate('ViewManager', 'Return')), |
1955 QKeySequence(QApplication.translate('ViewManager', 'Enter')), | 1955 QKeySequence(QApplication.translate('ViewManager', 'Enter')), |
1956 self.editorActGrp, 'vm_edit_insert_line') | 1956 self.editorActGrp, 'vm_edit_insert_line') |
1957 self.esm.setMapping(act, QsciScintilla.SCI_NEWLINE) | 1957 self.esm.setMapping(act, QsciScintilla.SCI_NEWLINE) |
1958 act.triggered[()].connect(self.esm.map) | 1958 act.triggered.connect(self.esm.map) |
1959 self.editActions.append(act) | 1959 self.editActions.append(act) |
1960 | 1960 |
1961 act = E5Action( | 1961 act = E5Action( |
1962 QApplication.translate( | 1962 QApplication.translate( |
1963 'ViewManager', 'Insert new line below current line'), | 1963 'ViewManager', 'Insert new line below current line'), |
1965 'ViewManager', 'Insert new line below current line'), | 1965 'ViewManager', 'Insert new line below current line'), |
1966 QKeySequence(QApplication.translate( | 1966 QKeySequence(QApplication.translate( |
1967 'ViewManager', 'Shift+Return')), | 1967 'ViewManager', 'Shift+Return')), |
1968 QKeySequence(QApplication.translate('ViewManager', 'Shift+Enter')), | 1968 QKeySequence(QApplication.translate('ViewManager', 'Shift+Enter')), |
1969 self.editorActGrp, 'vm_edit_insert_line_below') | 1969 self.editorActGrp, 'vm_edit_insert_line_below') |
1970 act.triggered[()].connect(self.__newLineBelow) | 1970 act.triggered.connect(self.__newLineBelow) |
1971 self.editActions.append(act) | 1971 self.editActions.append(act) |
1972 | 1972 |
1973 act = E5Action( | 1973 act = E5Action( |
1974 QApplication.translate('ViewManager', 'Delete current line'), | 1974 QApplication.translate('ViewManager', 'Delete current line'), |
1975 QApplication.translate('ViewManager', 'Delete current line'), | 1975 QApplication.translate('ViewManager', 'Delete current line'), |
1976 QKeySequence(QApplication.translate( | 1976 QKeySequence(QApplication.translate( |
1977 'ViewManager', 'Ctrl+Shift+L')), | 1977 'ViewManager', 'Ctrl+Shift+L')), |
1978 0, | 1978 0, |
1979 self.editorActGrp, 'vm_edit_delete_current_line') | 1979 self.editorActGrp, 'vm_edit_delete_current_line') |
1980 self.esm.setMapping(act, QsciScintilla.SCI_LINEDELETE) | 1980 self.esm.setMapping(act, QsciScintilla.SCI_LINEDELETE) |
1981 act.triggered[()].connect(self.esm.map) | 1981 act.triggered.connect(self.esm.map) |
1982 self.editActions.append(act) | 1982 self.editActions.append(act) |
1983 | 1983 |
1984 act = E5Action( | 1984 act = E5Action( |
1985 QApplication.translate('ViewManager', 'Duplicate current line'), | 1985 QApplication.translate('ViewManager', 'Duplicate current line'), |
1986 QApplication.translate('ViewManager', 'Duplicate current line'), | 1986 QApplication.translate('ViewManager', 'Duplicate current line'), |
1987 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+D')), 0, | 1987 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+D')), 0, |
1988 self.editorActGrp, 'vm_edit_duplicate_current_line') | 1988 self.editorActGrp, 'vm_edit_duplicate_current_line') |
1989 self.esm.setMapping(act, QsciScintilla.SCI_LINEDUPLICATE) | 1989 self.esm.setMapping(act, QsciScintilla.SCI_LINEDUPLICATE) |
1990 act.triggered[()].connect(self.esm.map) | 1990 act.triggered.connect(self.esm.map) |
1991 self.editActions.append(act) | 1991 self.editActions.append(act) |
1992 | 1992 |
1993 act = E5Action( | 1993 act = E5Action( |
1994 QApplication.translate( | 1994 QApplication.translate( |
1995 'ViewManager', 'Swap current and previous lines'), | 1995 'ViewManager', 'Swap current and previous lines'), |
1996 QApplication.translate( | 1996 QApplication.translate( |
1997 'ViewManager', 'Swap current and previous lines'), | 1997 'ViewManager', 'Swap current and previous lines'), |
1998 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+T')), 0, | 1998 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+T')), 0, |
1999 self.editorActGrp, 'vm_edit_swap_current_previous_line') | 1999 self.editorActGrp, 'vm_edit_swap_current_previous_line') |
2000 self.esm.setMapping(act, QsciScintilla.SCI_LINETRANSPOSE) | 2000 self.esm.setMapping(act, QsciScintilla.SCI_LINETRANSPOSE) |
2001 act.triggered[()].connect(self.esm.map) | 2001 act.triggered.connect(self.esm.map) |
2002 self.editActions.append(act) | 2002 self.editActions.append(act) |
2003 | 2003 |
2004 act = E5Action( | 2004 act = E5Action( |
2005 QApplication.translate('ViewManager', 'Cut current line'), | 2005 QApplication.translate('ViewManager', 'Cut current line'), |
2006 QApplication.translate('ViewManager', 'Cut current line'), | 2006 QApplication.translate('ViewManager', 'Cut current line'), |
2007 QKeySequence(QApplication.translate('ViewManager', 'Alt+Shift+L')), | 2007 QKeySequence(QApplication.translate('ViewManager', 'Alt+Shift+L')), |
2008 0, | 2008 0, |
2009 self.editorActGrp, 'vm_edit_cut_current_line') | 2009 self.editorActGrp, 'vm_edit_cut_current_line') |
2010 self.esm.setMapping(act, QsciScintilla.SCI_LINECUT) | 2010 self.esm.setMapping(act, QsciScintilla.SCI_LINECUT) |
2011 act.triggered[()].connect(self.esm.map) | 2011 act.triggered.connect(self.esm.map) |
2012 self.editActions.append(act) | 2012 self.editActions.append(act) |
2013 | 2013 |
2014 act = E5Action( | 2014 act = E5Action( |
2015 QApplication.translate('ViewManager', 'Copy current line'), | 2015 QApplication.translate('ViewManager', 'Copy current line'), |
2016 QApplication.translate('ViewManager', 'Copy current line'), | 2016 QApplication.translate('ViewManager', 'Copy current line'), |
2017 QKeySequence(QApplication.translate( | 2017 QKeySequence(QApplication.translate( |
2018 'ViewManager', 'Ctrl+Shift+T')), | 2018 'ViewManager', 'Ctrl+Shift+T')), |
2019 0, | 2019 0, |
2020 self.editorActGrp, 'vm_edit_copy_current_line') | 2020 self.editorActGrp, 'vm_edit_copy_current_line') |
2021 self.esm.setMapping(act, QsciScintilla.SCI_LINECOPY) | 2021 self.esm.setMapping(act, QsciScintilla.SCI_LINECOPY) |
2022 act.triggered[()].connect(self.esm.map) | 2022 act.triggered.connect(self.esm.map) |
2023 self.editActions.append(act) | 2023 self.editActions.append(act) |
2024 | 2024 |
2025 act = E5Action( | 2025 act = E5Action( |
2026 QApplication.translate('ViewManager', 'Toggle insert/overtype'), | 2026 QApplication.translate('ViewManager', 'Toggle insert/overtype'), |
2027 QApplication.translate('ViewManager', 'Toggle insert/overtype'), | 2027 QApplication.translate('ViewManager', 'Toggle insert/overtype'), |
2028 QKeySequence(QApplication.translate('ViewManager', 'Ins')), 0, | 2028 QKeySequence(QApplication.translate('ViewManager', 'Ins')), 0, |
2029 self.editorActGrp, 'vm_edit_toggle_insert_overtype') | 2029 self.editorActGrp, 'vm_edit_toggle_insert_overtype') |
2030 self.esm.setMapping(act, QsciScintilla.SCI_EDITTOGGLEOVERTYPE) | 2030 self.esm.setMapping(act, QsciScintilla.SCI_EDITTOGGLEOVERTYPE) |
2031 act.triggered[()].connect(self.esm.map) | 2031 act.triggered.connect(self.esm.map) |
2032 self.editActions.append(act) | 2032 self.editActions.append(act) |
2033 | 2033 |
2034 act = E5Action( | 2034 act = E5Action( |
2035 QApplication.translate( | 2035 QApplication.translate( |
2036 'ViewManager', 'Move to end of display line'), | 2036 'ViewManager', 'Move to end of display line'), |
2043 QApplication.translate('ViewManager', 'Ctrl+Right'))) | 2043 QApplication.translate('ViewManager', 'Ctrl+Right'))) |
2044 else: | 2044 else: |
2045 act.setShortcut(QKeySequence( | 2045 act.setShortcut(QKeySequence( |
2046 QApplication.translate('ViewManager', 'Alt+End'))) | 2046 QApplication.translate('ViewManager', 'Alt+End'))) |
2047 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAY) | 2047 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAY) |
2048 act.triggered[()].connect(self.esm.map) | 2048 act.triggered.connect(self.esm.map) |
2049 self.editActions.append(act) | 2049 self.editActions.append(act) |
2050 | 2050 |
2051 act = E5Action( | 2051 act = E5Action( |
2052 QApplication.translate( | 2052 QApplication.translate( |
2053 'ViewManager', 'Extend selection to end of display line'), | 2053 'ViewManager', 'Extend selection to end of display line'), |
2057 self.editorActGrp, 'vm_edit_extend_selection_end_displayed_line') | 2057 self.editorActGrp, 'vm_edit_extend_selection_end_displayed_line') |
2058 if isMacPlatform(): | 2058 if isMacPlatform(): |
2059 act.setShortcut(QKeySequence( | 2059 act.setShortcut(QKeySequence( |
2060 QApplication.translate('ViewManager', 'Ctrl+Shift+Right'))) | 2060 QApplication.translate('ViewManager', 'Ctrl+Shift+Right'))) |
2061 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAYEXTEND) | 2061 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAYEXTEND) |
2062 act.triggered[()].connect(self.esm.map) | 2062 act.triggered.connect(self.esm.map) |
2063 self.editActions.append(act) | 2063 self.editActions.append(act) |
2064 | 2064 |
2065 act = E5Action( | 2065 act = E5Action( |
2066 QApplication.translate('ViewManager', 'Formfeed'), | 2066 QApplication.translate('ViewManager', 'Formfeed'), |
2067 QApplication.translate('ViewManager', 'Formfeed'), | 2067 QApplication.translate('ViewManager', 'Formfeed'), |
2068 0, 0, | 2068 0, 0, |
2069 self.editorActGrp, 'vm_edit_formfeed') | 2069 self.editorActGrp, 'vm_edit_formfeed') |
2070 self.esm.setMapping(act, QsciScintilla.SCI_FORMFEED) | 2070 self.esm.setMapping(act, QsciScintilla.SCI_FORMFEED) |
2071 act.triggered[()].connect(self.esm.map) | 2071 act.triggered.connect(self.esm.map) |
2072 self.editActions.append(act) | 2072 self.editActions.append(act) |
2073 | 2073 |
2074 act = E5Action( | 2074 act = E5Action( |
2075 QApplication.translate('ViewManager', 'Escape'), | 2075 QApplication.translate('ViewManager', 'Escape'), |
2076 QApplication.translate('ViewManager', 'Escape'), | 2076 QApplication.translate('ViewManager', 'Escape'), |
2077 QKeySequence(QApplication.translate('ViewManager', 'Esc')), 0, | 2077 QKeySequence(QApplication.translate('ViewManager', 'Esc')), 0, |
2078 self.editorActGrp, 'vm_edit_escape') | 2078 self.editorActGrp, 'vm_edit_escape') |
2079 self.esm.setMapping(act, QsciScintilla.SCI_CANCEL) | 2079 self.esm.setMapping(act, QsciScintilla.SCI_CANCEL) |
2080 act.triggered[()].connect(self.esm.map) | 2080 act.triggered.connect(self.esm.map) |
2081 self.editActions.append(act) | 2081 self.editActions.append(act) |
2082 | 2082 |
2083 act = E5Action( | 2083 act = E5Action( |
2084 QApplication.translate( | 2084 QApplication.translate( |
2085 'ViewManager', 'Extend rectangular selection down one line'), | 2085 'ViewManager', 'Extend rectangular selection down one line'), |
2091 self.editorActGrp, 'vm_edit_extend_rect_selection_down_line') | 2091 self.editorActGrp, 'vm_edit_extend_rect_selection_down_line') |
2092 if isMacPlatform(): | 2092 if isMacPlatform(): |
2093 act.setAlternateShortcut(QKeySequence( | 2093 act.setAlternateShortcut(QKeySequence( |
2094 QApplication.translate('ViewManager', 'Meta+Alt+Shift+N'))) | 2094 QApplication.translate('ViewManager', 'Meta+Alt+Shift+N'))) |
2095 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNRECTEXTEND) | 2095 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNRECTEXTEND) |
2096 act.triggered[()].connect(self.esm.map) | 2096 act.triggered.connect(self.esm.map) |
2097 self.editActions.append(act) | 2097 self.editActions.append(act) |
2098 | 2098 |
2099 act = E5Action( | 2099 act = E5Action( |
2100 QApplication.translate( | 2100 QApplication.translate( |
2101 'ViewManager', 'Extend rectangular selection up one line'), | 2101 'ViewManager', 'Extend rectangular selection up one line'), |
2106 self.editorActGrp, 'vm_edit_extend_rect_selection_up_line') | 2106 self.editorActGrp, 'vm_edit_extend_rect_selection_up_line') |
2107 if isMacPlatform(): | 2107 if isMacPlatform(): |
2108 act.setAlternateShortcut(QKeySequence( | 2108 act.setAlternateShortcut(QKeySequence( |
2109 QApplication.translate('ViewManager', 'Meta+Alt+Shift+P'))) | 2109 QApplication.translate('ViewManager', 'Meta+Alt+Shift+P'))) |
2110 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPRECTEXTEND) | 2110 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPRECTEXTEND) |
2111 act.triggered[()].connect(self.esm.map) | 2111 act.triggered.connect(self.esm.map) |
2112 self.editActions.append(act) | 2112 self.editActions.append(act) |
2113 | 2113 |
2114 act = E5Action( | 2114 act = E5Action( |
2115 QApplication.translate( | 2115 QApplication.translate( |
2116 'ViewManager', | 2116 'ViewManager', |
2124 self.editorActGrp, 'vm_edit_extend_rect_selection_left_char') | 2124 self.editorActGrp, 'vm_edit_extend_rect_selection_left_char') |
2125 if isMacPlatform(): | 2125 if isMacPlatform(): |
2126 act.setAlternateShortcut(QKeySequence( | 2126 act.setAlternateShortcut(QKeySequence( |
2127 QApplication.translate('ViewManager', 'Meta+Alt+Shift+B'))) | 2127 QApplication.translate('ViewManager', 'Meta+Alt+Shift+B'))) |
2128 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTRECTEXTEND) | 2128 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTRECTEXTEND) |
2129 act.triggered[()].connect(self.esm.map) | 2129 act.triggered.connect(self.esm.map) |
2130 self.editActions.append(act) | 2130 self.editActions.append(act) |
2131 | 2131 |
2132 act = E5Action( | 2132 act = E5Action( |
2133 QApplication.translate( | 2133 QApplication.translate( |
2134 'ViewManager', | 2134 'ViewManager', |
2142 self.editorActGrp, 'vm_edit_extend_rect_selection_right_char') | 2142 self.editorActGrp, 'vm_edit_extend_rect_selection_right_char') |
2143 if isMacPlatform(): | 2143 if isMacPlatform(): |
2144 act.setAlternateShortcut(QKeySequence( | 2144 act.setAlternateShortcut(QKeySequence( |
2145 QApplication.translate('ViewManager', 'Meta+Alt+Shift+F'))) | 2145 QApplication.translate('ViewManager', 'Meta+Alt+Shift+F'))) |
2146 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTRECTEXTEND) | 2146 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTRECTEXTEND) |
2147 act.triggered[()].connect(self.esm.map) | 2147 act.triggered.connect(self.esm.map) |
2148 self.editActions.append(act) | 2148 self.editActions.append(act) |
2149 | 2149 |
2150 act = E5Action( | 2150 act = E5Action( |
2151 QApplication.translate( | 2151 QApplication.translate( |
2152 'ViewManager', | 2152 'ViewManager', |
2161 'vm_edit_extend_rect_selection_first_visible_char') | 2161 'vm_edit_extend_rect_selection_first_visible_char') |
2162 if not isMacPlatform(): | 2162 if not isMacPlatform(): |
2163 act.setShortcut(QKeySequence( | 2163 act.setShortcut(QKeySequence( |
2164 QApplication.translate('ViewManager', 'Alt+Shift+Home'))) | 2164 QApplication.translate('ViewManager', 'Alt+Shift+Home'))) |
2165 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMERECTEXTEND) | 2165 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMERECTEXTEND) |
2166 act.triggered[()].connect(self.esm.map) | 2166 act.triggered.connect(self.esm.map) |
2167 self.editActions.append(act) | 2167 self.editActions.append(act) |
2168 | 2168 |
2169 act = E5Action( | 2169 act = E5Action( |
2170 QApplication.translate( | 2170 QApplication.translate( |
2171 'ViewManager', | 2171 'ViewManager', |
2180 QApplication.translate('ViewManager', 'Meta+Alt+Shift+E'))) | 2180 QApplication.translate('ViewManager', 'Meta+Alt+Shift+E'))) |
2181 else: | 2181 else: |
2182 act.setShortcut(QKeySequence( | 2182 act.setShortcut(QKeySequence( |
2183 QApplication.translate('ViewManager', 'Alt+Shift+End'))) | 2183 QApplication.translate('ViewManager', 'Alt+Shift+End'))) |
2184 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDRECTEXTEND) | 2184 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDRECTEXTEND) |
2185 act.triggered[()].connect(self.esm.map) | 2185 act.triggered.connect(self.esm.map) |
2186 self.editActions.append(act) | 2186 self.editActions.append(act) |
2187 | 2187 |
2188 act = E5Action( | 2188 act = E5Action( |
2189 QApplication.translate( | 2189 QApplication.translate( |
2190 'ViewManager', | 2190 'ViewManager', |
2195 QKeySequence(QApplication.translate( | 2195 QKeySequence(QApplication.translate( |
2196 'ViewManager', 'Alt+Shift+PgUp')), | 2196 'ViewManager', 'Alt+Shift+PgUp')), |
2197 0, | 2197 0, |
2198 self.editorActGrp, 'vm_edit_extend_rect_selection_up_page') | 2198 self.editorActGrp, 'vm_edit_extend_rect_selection_up_page') |
2199 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPRECTEXTEND) | 2199 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPRECTEXTEND) |
2200 act.triggered[()].connect(self.esm.map) | 2200 act.triggered.connect(self.esm.map) |
2201 self.editActions.append(act) | 2201 self.editActions.append(act) |
2202 | 2202 |
2203 act = E5Action( | 2203 act = E5Action( |
2204 QApplication.translate( | 2204 QApplication.translate( |
2205 'ViewManager', | 2205 'ViewManager', |
2213 self.editorActGrp, 'vm_edit_extend_rect_selection_down_page') | 2213 self.editorActGrp, 'vm_edit_extend_rect_selection_down_page') |
2214 if isMacPlatform(): | 2214 if isMacPlatform(): |
2215 act.setAlternateShortcut(QKeySequence( | 2215 act.setAlternateShortcut(QKeySequence( |
2216 QApplication.translate('ViewManager', 'Meta+Alt+Shift+V'))) | 2216 QApplication.translate('ViewManager', 'Meta+Alt+Shift+V'))) |
2217 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNRECTEXTEND) | 2217 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNRECTEXTEND) |
2218 act.triggered[()].connect(self.esm.map) | 2218 act.triggered.connect(self.esm.map) |
2219 self.editActions.append(act) | 2219 self.editActions.append(act) |
2220 | 2220 |
2221 act = E5Action( | 2221 act = E5Action( |
2222 QApplication.translate( | 2222 QApplication.translate( |
2223 'ViewManager', 'Duplicate current selection'), | 2223 'ViewManager', 'Duplicate current selection'), |
2226 QKeySequence(QApplication.translate( | 2226 QKeySequence(QApplication.translate( |
2227 'ViewManager', 'Ctrl+Shift+D')), | 2227 'ViewManager', 'Ctrl+Shift+D')), |
2228 0, | 2228 0, |
2229 self.editorActGrp, 'vm_edit_duplicate_current_selection') | 2229 self.editorActGrp, 'vm_edit_duplicate_current_selection') |
2230 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE) | 2230 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE) |
2231 act.triggered[()].connect(self.esm.map) | 2231 act.triggered.connect(self.esm.map) |
2232 self.editActions.append(act) | 2232 self.editActions.append(act) |
2233 | 2233 |
2234 if hasattr(QsciScintilla, "SCI_SCROLLTOSTART"): | 2234 if hasattr(QsciScintilla, "SCI_SCROLLTOSTART"): |
2235 act = E5Action( | 2235 act = E5Action( |
2236 QApplication.translate( | 2236 QApplication.translate( |
2241 self.editorActGrp, 'vm_edit_scroll_start_text') | 2241 self.editorActGrp, 'vm_edit_scroll_start_text') |
2242 if isMacPlatform(): | 2242 if isMacPlatform(): |
2243 act.setShortcut(QKeySequence( | 2243 act.setShortcut(QKeySequence( |
2244 QApplication.translate('ViewManager', 'Home'))) | 2244 QApplication.translate('ViewManager', 'Home'))) |
2245 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOSTART) | 2245 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOSTART) |
2246 act.triggered[()].connect(self.esm.map) | 2246 act.triggered.connect(self.esm.map) |
2247 self.editActions.append(act) | 2247 self.editActions.append(act) |
2248 | 2248 |
2249 if hasattr(QsciScintilla, "SCI_SCROLLTOEND"): | 2249 if hasattr(QsciScintilla, "SCI_SCROLLTOEND"): |
2250 act = E5Action( | 2250 act = E5Action( |
2251 QApplication.translate( | 2251 QApplication.translate( |
2256 self.editorActGrp, 'vm_edit_scroll_end_text') | 2256 self.editorActGrp, 'vm_edit_scroll_end_text') |
2257 if isMacPlatform(): | 2257 if isMacPlatform(): |
2258 act.setShortcut(QKeySequence( | 2258 act.setShortcut(QKeySequence( |
2259 QApplication.translate('ViewManager', 'End'))) | 2259 QApplication.translate('ViewManager', 'End'))) |
2260 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOEND) | 2260 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOEND) |
2261 act.triggered[()].connect(self.esm.map) | 2261 act.triggered.connect(self.esm.map) |
2262 self.editActions.append(act) | 2262 self.editActions.append(act) |
2263 | 2263 |
2264 if hasattr(QsciScintilla, "SCI_VERTICALCENTRECARET"): | 2264 if hasattr(QsciScintilla, "SCI_VERTICALCENTRECARET"): |
2265 act = E5Action( | 2265 act = E5Action( |
2266 QApplication.translate( | 2266 QApplication.translate( |
2271 self.editorActGrp, 'vm_edit_scroll_vertically_center') | 2271 self.editorActGrp, 'vm_edit_scroll_vertically_center') |
2272 if isMacPlatform(): | 2272 if isMacPlatform(): |
2273 act.setShortcut(QKeySequence( | 2273 act.setShortcut(QKeySequence( |
2274 QApplication.translate('ViewManager', 'Meta+L'))) | 2274 QApplication.translate('ViewManager', 'Meta+L'))) |
2275 self.esm.setMapping(act, QsciScintilla.SCI_VERTICALCENTRECARET) | 2275 self.esm.setMapping(act, QsciScintilla.SCI_VERTICALCENTRECARET) |
2276 act.triggered[()].connect(self.esm.map) | 2276 act.triggered.connect(self.esm.map) |
2277 self.editActions.append(act) | 2277 self.editActions.append(act) |
2278 | 2278 |
2279 if hasattr(QsciScintilla, "SCI_WORDRIGHTEND"): | 2279 if hasattr(QsciScintilla, "SCI_WORDRIGHTEND"): |
2280 act = E5Action( | 2280 act = E5Action( |
2281 QApplication.translate( | 2281 QApplication.translate( |
2286 self.editorActGrp, 'vm_edit_move_end_next_word') | 2286 self.editorActGrp, 'vm_edit_move_end_next_word') |
2287 if isMacPlatform(): | 2287 if isMacPlatform(): |
2288 act.setShortcut(QKeySequence( | 2288 act.setShortcut(QKeySequence( |
2289 QApplication.translate('ViewManager', 'Alt+Right'))) | 2289 QApplication.translate('ViewManager', 'Alt+Right'))) |
2290 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEND) | 2290 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEND) |
2291 act.triggered[()].connect(self.esm.map) | 2291 act.triggered.connect(self.esm.map) |
2292 self.editActions.append(act) | 2292 self.editActions.append(act) |
2293 | 2293 |
2294 if hasattr(QsciScintilla, "SCI_WORDRIGHTENDEXTEND"): | 2294 if hasattr(QsciScintilla, "SCI_WORDRIGHTENDEXTEND"): |
2295 act = E5Action( | 2295 act = E5Action( |
2296 QApplication.translate( | 2296 QApplication.translate( |
2301 self.editorActGrp, 'vm_edit_select_end_next_word') | 2301 self.editorActGrp, 'vm_edit_select_end_next_word') |
2302 if isMacPlatform(): | 2302 if isMacPlatform(): |
2303 act.setShortcut(QKeySequence( | 2303 act.setShortcut(QKeySequence( |
2304 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) | 2304 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
2305 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTENDEXTEND) | 2305 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTENDEXTEND) |
2306 act.triggered[()].connect(self.esm.map) | 2306 act.triggered.connect(self.esm.map) |
2307 self.editActions.append(act) | 2307 self.editActions.append(act) |
2308 | 2308 |
2309 if hasattr(QsciScintilla, "SCI_WORDLEFTEND"): | 2309 if hasattr(QsciScintilla, "SCI_WORDLEFTEND"): |
2310 act = E5Action( | 2310 act = E5Action( |
2311 QApplication.translate( | 2311 QApplication.translate( |
2313 QApplication.translate( | 2313 QApplication.translate( |
2314 'ViewManager', 'Move to end of previous word'), | 2314 'ViewManager', 'Move to end of previous word'), |
2315 0, 0, | 2315 0, 0, |
2316 self.editorActGrp, 'vm_edit_move_end_previous_word') | 2316 self.editorActGrp, 'vm_edit_move_end_previous_word') |
2317 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEND) | 2317 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEND) |
2318 act.triggered[()].connect(self.esm.map) | 2318 act.triggered.connect(self.esm.map) |
2319 self.editActions.append(act) | 2319 self.editActions.append(act) |
2320 | 2320 |
2321 if hasattr(QsciScintilla, "SCI_WORDLEFTENDEXTEND"): | 2321 if hasattr(QsciScintilla, "SCI_WORDLEFTENDEXTEND"): |
2322 act = E5Action( | 2322 act = E5Action( |
2323 QApplication.translate( | 2323 QApplication.translate( |
2325 QApplication.translate( | 2325 QApplication.translate( |
2326 'ViewManager', 'Extend selection to end of previous word'), | 2326 'ViewManager', 'Extend selection to end of previous word'), |
2327 0, 0, | 2327 0, 0, |
2328 self.editorActGrp, 'vm_edit_select_end_previous_word') | 2328 self.editorActGrp, 'vm_edit_select_end_previous_word') |
2329 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTENDEXTEND) | 2329 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTENDEXTEND) |
2330 act.triggered[()].connect(self.esm.map) | 2330 act.triggered.connect(self.esm.map) |
2331 self.editActions.append(act) | 2331 self.editActions.append(act) |
2332 | 2332 |
2333 if hasattr(QsciScintilla, "SCI_HOME"): | 2333 if hasattr(QsciScintilla, "SCI_HOME"): |
2334 act = E5Action( | 2334 act = E5Action( |
2335 QApplication.translate( | 2335 QApplication.translate( |
2340 self.editorActGrp, 'vm_edit_move_start_document_line') | 2340 self.editorActGrp, 'vm_edit_move_start_document_line') |
2341 if isMacPlatform(): | 2341 if isMacPlatform(): |
2342 act.setShortcut(QKeySequence( | 2342 act.setShortcut(QKeySequence( |
2343 QApplication.translate('ViewManager', 'Meta+A'))) | 2343 QApplication.translate('ViewManager', 'Meta+A'))) |
2344 self.esm.setMapping(act, QsciScintilla.SCI_HOME) | 2344 self.esm.setMapping(act, QsciScintilla.SCI_HOME) |
2345 act.triggered[()].connect(self.esm.map) | 2345 act.triggered.connect(self.esm.map) |
2346 self.editActions.append(act) | 2346 self.editActions.append(act) |
2347 | 2347 |
2348 if hasattr(QsciScintilla, "SCI_HOMEEXTEND"): | 2348 if hasattr(QsciScintilla, "SCI_HOMEEXTEND"): |
2349 act = E5Action( | 2349 act = E5Action( |
2350 QApplication.translate( | 2350 QApplication.translate( |
2358 'vm_edit_extend_selection_start_document_line') | 2358 'vm_edit_extend_selection_start_document_line') |
2359 if isMacPlatform(): | 2359 if isMacPlatform(): |
2360 act.setShortcut(QKeySequence( | 2360 act.setShortcut(QKeySequence( |
2361 QApplication.translate('ViewManager', 'Meta+Shift+A'))) | 2361 QApplication.translate('ViewManager', 'Meta+Shift+A'))) |
2362 self.esm.setMapping(act, QsciScintilla.SCI_HOME) | 2362 self.esm.setMapping(act, QsciScintilla.SCI_HOME) |
2363 act.triggered[()].connect(self.esm.map) | 2363 act.triggered.connect(self.esm.map) |
2364 self.editActions.append(act) | 2364 self.editActions.append(act) |
2365 | 2365 |
2366 if hasattr(QsciScintilla, "SCI_HOMERECTEXTEND"): | 2366 if hasattr(QsciScintilla, "SCI_HOMERECTEXTEND"): |
2367 act = E5Action( | 2367 act = E5Action( |
2368 QApplication.translate( | 2368 QApplication.translate( |
2375 self.editorActGrp, 'vm_edit_select_rect_start_line') | 2375 self.editorActGrp, 'vm_edit_select_rect_start_line') |
2376 if isMacPlatform(): | 2376 if isMacPlatform(): |
2377 act.setShortcut(QKeySequence( | 2377 act.setShortcut(QKeySequence( |
2378 QApplication.translate('ViewManager', 'Meta+Alt+Shift+A'))) | 2378 QApplication.translate('ViewManager', 'Meta+Alt+Shift+A'))) |
2379 self.esm.setMapping(act, QsciScintilla.SCI_HOMERECTEXTEND) | 2379 self.esm.setMapping(act, QsciScintilla.SCI_HOMERECTEXTEND) |
2380 act.triggered[()].connect(self.esm.map) | 2380 act.triggered.connect(self.esm.map) |
2381 self.editActions.append(act) | 2381 self.editActions.append(act) |
2382 | 2382 |
2383 if hasattr(QsciScintilla, "SCI_HOMEDISPLAYEXTEND"): | 2383 if hasattr(QsciScintilla, "SCI_HOMEDISPLAYEXTEND"): |
2384 act = E5Action( | 2384 act = E5Action( |
2385 QApplication.translate( | 2385 QApplication.translate( |
2393 'vm_edit_extend_selection_start_display_line') | 2393 'vm_edit_extend_selection_start_display_line') |
2394 if isMacPlatform(): | 2394 if isMacPlatform(): |
2395 act.setShortcut(QKeySequence( | 2395 act.setShortcut(QKeySequence( |
2396 QApplication.translate('ViewManager', 'Ctrl+Shift+Left'))) | 2396 QApplication.translate('ViewManager', 'Ctrl+Shift+Left'))) |
2397 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAYEXTEND) | 2397 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAYEXTEND) |
2398 act.triggered[()].connect(self.esm.map) | 2398 act.triggered.connect(self.esm.map) |
2399 self.editActions.append(act) | 2399 self.editActions.append(act) |
2400 | 2400 |
2401 if hasattr(QsciScintilla, "SCI_HOMEWRAP"): | 2401 if hasattr(QsciScintilla, "SCI_HOMEWRAP"): |
2402 act = E5Action( | 2402 act = E5Action( |
2403 QApplication.translate( | 2403 QApplication.translate( |
2407 'ViewManager', | 2407 'ViewManager', |
2408 'Move to start of display or document line'), | 2408 'Move to start of display or document line'), |
2409 0, 0, | 2409 0, 0, |
2410 self.editorActGrp, 'vm_edit_move_start_display_document_line') | 2410 self.editorActGrp, 'vm_edit_move_start_display_document_line') |
2411 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAP) | 2411 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAP) |
2412 act.triggered[()].connect(self.esm.map) | 2412 act.triggered.connect(self.esm.map) |
2413 self.editActions.append(act) | 2413 self.editActions.append(act) |
2414 | 2414 |
2415 if hasattr(QsciScintilla, "SCI_HOMEWRAPEXTEND"): | 2415 if hasattr(QsciScintilla, "SCI_HOMEWRAPEXTEND"): |
2416 act = E5Action( | 2416 act = E5Action( |
2417 QApplication.translate( | 2417 QApplication.translate( |
2422 'Extend selection to start of display or document line'), | 2422 'Extend selection to start of display or document line'), |
2423 0, 0, | 2423 0, 0, |
2424 self.editorActGrp, | 2424 self.editorActGrp, |
2425 'vm_edit_extend_selection_start_display_document_line') | 2425 'vm_edit_extend_selection_start_display_document_line') |
2426 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAPEXTEND) | 2426 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAPEXTEND) |
2427 act.triggered[()].connect(self.esm.map) | 2427 act.triggered.connect(self.esm.map) |
2428 self.editActions.append(act) | 2428 self.editActions.append(act) |
2429 | 2429 |
2430 if hasattr(QsciScintilla, "SCI_VCHOMEWRAP"): | 2430 if hasattr(QsciScintilla, "SCI_VCHOMEWRAP"): |
2431 act = E5Action( | 2431 act = E5Action( |
2432 QApplication.translate( | 2432 QApplication.translate( |
2439 ' line'), | 2439 ' line'), |
2440 0, 0, | 2440 0, 0, |
2441 self.editorActGrp, | 2441 self.editorActGrp, |
2442 'vm_edit_move_first_visible_char_document_line') | 2442 'vm_edit_move_first_visible_char_document_line') |
2443 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEWRAP) | 2443 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEWRAP) |
2444 act.triggered[()].connect(self.esm.map) | 2444 act.triggered.connect(self.esm.map) |
2445 self.editActions.append(act) | 2445 self.editActions.append(act) |
2446 | 2446 |
2447 if hasattr(QsciScintilla, "SCI_VCHOMEWRAPEXTEND"): | 2447 if hasattr(QsciScintilla, "SCI_VCHOMEWRAPEXTEND"): |
2448 act = E5Action( | 2448 act = E5Action( |
2449 QApplication.translate( | 2449 QApplication.translate( |
2456 ' display or document line'), | 2456 ' display or document line'), |
2457 0, 0, | 2457 0, 0, |
2458 self.editorActGrp, | 2458 self.editorActGrp, |
2459 'vm_edit_extend_selection_first_visible_char_document_line') | 2459 'vm_edit_extend_selection_first_visible_char_document_line') |
2460 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEWRAPEXTEND) | 2460 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEWRAPEXTEND) |
2461 act.triggered[()].connect(self.esm.map) | 2461 act.triggered.connect(self.esm.map) |
2462 self.editActions.append(act) | 2462 self.editActions.append(act) |
2463 | 2463 |
2464 if hasattr(QsciScintilla, "SCI_LINEENDWRAP"): | 2464 if hasattr(QsciScintilla, "SCI_LINEENDWRAP"): |
2465 act = E5Action( | 2465 act = E5Action( |
2466 QApplication.translate( | 2466 QApplication.translate( |
2470 'ViewManager', | 2470 'ViewManager', |
2471 'Move to end of display or document line'), | 2471 'Move to end of display or document line'), |
2472 0, 0, | 2472 0, 0, |
2473 self.editorActGrp, 'vm_edit_end_start_display_document_line') | 2473 self.editorActGrp, 'vm_edit_end_start_display_document_line') |
2474 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDWRAP) | 2474 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDWRAP) |
2475 act.triggered[()].connect(self.esm.map) | 2475 act.triggered.connect(self.esm.map) |
2476 self.editActions.append(act) | 2476 self.editActions.append(act) |
2477 | 2477 |
2478 if hasattr(QsciScintilla, "SCI_LINEENDWRAPEXTEND"): | 2478 if hasattr(QsciScintilla, "SCI_LINEENDWRAPEXTEND"): |
2479 act = E5Action( | 2479 act = E5Action( |
2480 QApplication.translate( | 2480 QApplication.translate( |
2485 'Extend selection to end of display or document line'), | 2485 'Extend selection to end of display or document line'), |
2486 0, 0, | 2486 0, 0, |
2487 self.editorActGrp, | 2487 self.editorActGrp, |
2488 'vm_edit_extend_selection_end_display_document_line') | 2488 'vm_edit_extend_selection_end_display_document_line') |
2489 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDWRAPEXTEND) | 2489 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDWRAPEXTEND) |
2490 act.triggered[()].connect(self.esm.map) | 2490 act.triggered.connect(self.esm.map) |
2491 self.editActions.append(act) | 2491 self.editActions.append(act) |
2492 | 2492 |
2493 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUP"): | 2493 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUP"): |
2494 act = E5Action( | 2494 act = E5Action( |
2495 QApplication.translate( | 2495 QApplication.translate( |
2497 QApplication.translate( | 2497 QApplication.translate( |
2498 'ViewManager', 'Stuttered move up one page'), | 2498 'ViewManager', 'Stuttered move up one page'), |
2499 0, 0, | 2499 0, 0, |
2500 self.editorActGrp, 'vm_edit_stuttered_move_up_page') | 2500 self.editorActGrp, 'vm_edit_stuttered_move_up_page') |
2501 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUP) | 2501 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUP) |
2502 act.triggered[()].connect(self.esm.map) | 2502 act.triggered.connect(self.esm.map) |
2503 self.editActions.append(act) | 2503 self.editActions.append(act) |
2504 | 2504 |
2505 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUPEXTEND"): | 2505 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUPEXTEND"): |
2506 act = E5Action( | 2506 act = E5Action( |
2507 QApplication.translate( | 2507 QApplication.translate( |
2510 'ViewManager', 'Stuttered extend selection up one page'), | 2510 'ViewManager', 'Stuttered extend selection up one page'), |
2511 0, 0, | 2511 0, 0, |
2512 self.editorActGrp, | 2512 self.editorActGrp, |
2513 'vm_edit_stuttered_extend_selection_up_page') | 2513 'vm_edit_stuttered_extend_selection_up_page') |
2514 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUPEXTEND) | 2514 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUPEXTEND) |
2515 act.triggered[()].connect(self.esm.map) | 2515 act.triggered.connect(self.esm.map) |
2516 self.editActions.append(act) | 2516 self.editActions.append(act) |
2517 | 2517 |
2518 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWN"): | 2518 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWN"): |
2519 act = E5Action( | 2519 act = E5Action( |
2520 QApplication.translate( | 2520 QApplication.translate( |
2522 QApplication.translate( | 2522 QApplication.translate( |
2523 'ViewManager', 'Stuttered move down one page'), | 2523 'ViewManager', 'Stuttered move down one page'), |
2524 0, 0, | 2524 0, 0, |
2525 self.editorActGrp, 'vm_edit_stuttered_move_down_page') | 2525 self.editorActGrp, 'vm_edit_stuttered_move_down_page') |
2526 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWN) | 2526 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWN) |
2527 act.triggered[()].connect(self.esm.map) | 2527 act.triggered.connect(self.esm.map) |
2528 self.editActions.append(act) | 2528 self.editActions.append(act) |
2529 | 2529 |
2530 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWNEXTEND"): | 2530 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWNEXTEND"): |
2531 act = E5Action( | 2531 act = E5Action( |
2532 QApplication.translate( | 2532 QApplication.translate( |
2535 'ViewManager', 'Stuttered extend selection down one page'), | 2535 'ViewManager', 'Stuttered extend selection down one page'), |
2536 0, 0, | 2536 0, 0, |
2537 self.editorActGrp, | 2537 self.editorActGrp, |
2538 'vm_edit_stuttered_extend_selection_down_page') | 2538 'vm_edit_stuttered_extend_selection_down_page') |
2539 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWNEXTEND) | 2539 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWNEXTEND) |
2540 act.triggered[()].connect(self.esm.map) | 2540 act.triggered.connect(self.esm.map) |
2541 self.editActions.append(act) | 2541 self.editActions.append(act) |
2542 | 2542 |
2543 if hasattr(QsciScintilla, "SCI_DELWORDRIGHTEND"): | 2543 if hasattr(QsciScintilla, "SCI_DELWORDRIGHTEND"): |
2544 act = E5Action( | 2544 act = E5Action( |
2545 QApplication.translate( | 2545 QApplication.translate( |
2550 self.editorActGrp, 'vm_edit_delete_right_end_next_word') | 2550 self.editorActGrp, 'vm_edit_delete_right_end_next_word') |
2551 if isMacPlatform(): | 2551 if isMacPlatform(): |
2552 act.setShortcut(QKeySequence( | 2552 act.setShortcut(QKeySequence( |
2553 QApplication.translate('ViewManager', 'Alt+Del'))) | 2553 QApplication.translate('ViewManager', 'Alt+Del'))) |
2554 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHTEND) | 2554 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHTEND) |
2555 act.triggered[()].connect(self.esm.map) | 2555 act.triggered.connect(self.esm.map) |
2556 self.editActions.append(act) | 2556 self.editActions.append(act) |
2557 | 2557 |
2558 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESUP"): | 2558 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESUP"): |
2559 act = E5Action( | 2559 act = E5Action( |
2560 QApplication.translate( | 2560 QApplication.translate( |
2562 QApplication.translate( | 2562 QApplication.translate( |
2563 'ViewManager', 'Move selected lines up one line'), | 2563 'ViewManager', 'Move selected lines up one line'), |
2564 0, 0, | 2564 0, 0, |
2565 self.editorActGrp, 'vm_edit_move_selection_up_one_line') | 2565 self.editorActGrp, 'vm_edit_move_selection_up_one_line') |
2566 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESUP) | 2566 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESUP) |
2567 act.triggered[()].connect(self.esm.map) | 2567 act.triggered.connect(self.esm.map) |
2568 self.editActions.append(act) | 2568 self.editActions.append(act) |
2569 | 2569 |
2570 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESDOWN"): | 2570 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESDOWN"): |
2571 act = E5Action( | 2571 act = E5Action( |
2572 QApplication.translate( | 2572 QApplication.translate( |
2574 QApplication.translate( | 2574 QApplication.translate( |
2575 'ViewManager', 'Move selected lines down one line'), | 2575 'ViewManager', 'Move selected lines down one line'), |
2576 0, 0, | 2576 0, 0, |
2577 self.editorActGrp, 'vm_edit_move_selection_down_one_line') | 2577 self.editorActGrp, 'vm_edit_move_selection_down_one_line') |
2578 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESDOWN) | 2578 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESDOWN) |
2579 act.triggered[()].connect(self.esm.map) | 2579 act.triggered.connect(self.esm.map) |
2580 self.editActions.append(act) | 2580 self.editActions.append(act) |
2581 | 2581 |
2582 self.editorActGrp.setEnabled(False) | 2582 self.editorActGrp.setEnabled(False) |
2583 | 2583 |
2584 self.editLowerCaseAct = E5Action( | 2584 self.editLowerCaseAct = E5Action( |
2588 'ViewManager', 'Convert selection to lower case'), | 2588 'ViewManager', 'Convert selection to lower case'), |
2589 QKeySequence(QApplication.translate('ViewManager', 'Alt+Shift+U')), | 2589 QKeySequence(QApplication.translate('ViewManager', 'Alt+Shift+U')), |
2590 0, | 2590 0, |
2591 self.editActGrp, 'vm_edit_convert_selection_lower') | 2591 self.editActGrp, 'vm_edit_convert_selection_lower') |
2592 self.esm.setMapping(self.editLowerCaseAct, QsciScintilla.SCI_LOWERCASE) | 2592 self.esm.setMapping(self.editLowerCaseAct, QsciScintilla.SCI_LOWERCASE) |
2593 self.editLowerCaseAct.triggered[()].connect(self.esm.map) | 2593 self.editLowerCaseAct.triggered.connect(self.esm.map) |
2594 self.editActions.append(self.editLowerCaseAct) | 2594 self.editActions.append(self.editLowerCaseAct) |
2595 | 2595 |
2596 self.editUpperCaseAct = E5Action( | 2596 self.editUpperCaseAct = E5Action( |
2597 QApplication.translate( | 2597 QApplication.translate( |
2598 'ViewManager', 'Convert selection to upper case'), | 2598 'ViewManager', 'Convert selection to upper case'), |
2601 QKeySequence(QApplication.translate( | 2601 QKeySequence(QApplication.translate( |
2602 'ViewManager', 'Ctrl+Shift+U')), | 2602 'ViewManager', 'Ctrl+Shift+U')), |
2603 0, | 2603 0, |
2604 self.editActGrp, 'vm_edit_convert_selection_upper') | 2604 self.editActGrp, 'vm_edit_convert_selection_upper') |
2605 self.esm.setMapping(self.editUpperCaseAct, QsciScintilla.SCI_UPPERCASE) | 2605 self.esm.setMapping(self.editUpperCaseAct, QsciScintilla.SCI_UPPERCASE) |
2606 self.editUpperCaseAct.triggered[()].connect(self.esm.map) | 2606 self.editUpperCaseAct.triggered.connect(self.esm.map) |
2607 self.editActions.append(self.editUpperCaseAct) | 2607 self.editActions.append(self.editUpperCaseAct) |
2608 | 2608 |
2609 def initEditMenu(self): | 2609 def initEditMenu(self): |
2610 """ | 2610 """ |
2611 Public method to create the Edit menu. | 2611 Public method to create the Edit menu. |
2745 """<b>Search</b>""" | 2745 """<b>Search</b>""" |
2746 """<p>Search for some text in the current editor. A""" | 2746 """<p>Search for some text in the current editor. A""" |
2747 """ dialog is shown to enter the searchtext and options""" | 2747 """ dialog is shown to enter the searchtext and options""" |
2748 """ for the search.</p>""" | 2748 """ for the search.</p>""" |
2749 )) | 2749 )) |
2750 self.searchAct.triggered[()].connect(self.__search) | 2750 self.searchAct.triggered.connect(self.__search) |
2751 self.searchActions.append(self.searchAct) | 2751 self.searchActions.append(self.searchAct) |
2752 | 2752 |
2753 self.searchNextAct = E5Action( | 2753 self.searchNextAct = E5Action( |
2754 QApplication.translate( | 2754 QApplication.translate( |
2755 'ViewManager', 'Search next'), | 2755 'ViewManager', 'Search next'), |
2766 """<b>Search next</b>""" | 2766 """<b>Search next</b>""" |
2767 """<p>Search the next occurrence of some text in the current""" | 2767 """<p>Search the next occurrence of some text in the current""" |
2768 """ editor. The previously entered searchtext and options are""" | 2768 """ editor. The previously entered searchtext and options are""" |
2769 """ reused.</p>""" | 2769 """ reused.</p>""" |
2770 )) | 2770 )) |
2771 self.searchNextAct.triggered[()].connect(self.__searchWidget.findNext) | 2771 self.searchNextAct.triggered.connect(self.__searchWidget.findNext) |
2772 self.searchActions.append(self.searchNextAct) | 2772 self.searchActions.append(self.searchNextAct) |
2773 | 2773 |
2774 self.searchPrevAct = E5Action( | 2774 self.searchPrevAct = E5Action( |
2775 QApplication.translate('ViewManager', 'Search previous'), | 2775 QApplication.translate('ViewManager', 'Search previous'), |
2776 UI.PixmapCache.getIcon("findPrev.png"), | 2776 UI.PixmapCache.getIcon("findPrev.png"), |
2786 """<b>Search previous</b>""" | 2786 """<b>Search previous</b>""" |
2787 """<p>Search the previous occurrence of some text in the current""" | 2787 """<p>Search the previous occurrence of some text in the current""" |
2788 """ editor. The previously entered searchtext and options are""" | 2788 """ editor. The previously entered searchtext and options are""" |
2789 """ reused.</p>""" | 2789 """ reused.</p>""" |
2790 )) | 2790 )) |
2791 self.searchPrevAct.triggered[()].connect(self.__searchWidget.findPrev) | 2791 self.searchPrevAct.triggered.connect(self.__searchWidget.findPrev) |
2792 self.searchActions.append(self.searchPrevAct) | 2792 self.searchActions.append(self.searchPrevAct) |
2793 | 2793 |
2794 self.searchClearMarkersAct = E5Action( | 2794 self.searchClearMarkersAct = E5Action( |
2795 QApplication.translate('ViewManager', 'Clear search markers'), | 2795 QApplication.translate('ViewManager', 'Clear search markers'), |
2796 UI.PixmapCache.getIcon("findClear.png"), | 2796 UI.PixmapCache.getIcon("findClear.png"), |
2804 self.searchClearMarkersAct.setWhatsThis(QApplication.translate( | 2804 self.searchClearMarkersAct.setWhatsThis(QApplication.translate( |
2805 'ViewManager', | 2805 'ViewManager', |
2806 """<b>Clear search markers</b>""" | 2806 """<b>Clear search markers</b>""" |
2807 """<p>Clear all displayed search markers.</p>""" | 2807 """<p>Clear all displayed search markers.</p>""" |
2808 )) | 2808 )) |
2809 self.searchClearMarkersAct.triggered[()].connect( | 2809 self.searchClearMarkersAct.triggered.connect( |
2810 self.__searchClearMarkers) | 2810 self.__searchClearMarkers) |
2811 self.searchActions.append(self.searchClearMarkersAct) | 2811 self.searchActions.append(self.searchClearMarkersAct) |
2812 | 2812 |
2813 self.searchNextWordAct = E5Action( | 2813 self.searchNextWordAct = E5Action( |
2814 QApplication.translate( | 2814 QApplication.translate( |
2828 'ViewManager', | 2828 'ViewManager', |
2829 """<b>Search current word forward</b>""" | 2829 """<b>Search current word forward</b>""" |
2830 """<p>Search the next occurrence of the current word of the""" | 2830 """<p>Search the next occurrence of the current word of the""" |
2831 """ current editor.</p>""" | 2831 """ current editor.</p>""" |
2832 )) | 2832 )) |
2833 self.searchNextWordAct.triggered[()].connect(self.__findNextWord) | 2833 self.searchNextWordAct.triggered.connect(self.__findNextWord) |
2834 self.searchActions.append(self.searchNextWordAct) | 2834 self.searchActions.append(self.searchNextWordAct) |
2835 | 2835 |
2836 self.searchPrevWordAct = E5Action( | 2836 self.searchPrevWordAct = E5Action( |
2837 QApplication.translate( | 2837 QApplication.translate( |
2838 'ViewManager', 'Search current word backward'), | 2838 'ViewManager', 'Search current word backward'), |
2851 'ViewManager', | 2851 'ViewManager', |
2852 """<b>Search current word backward</b>""" | 2852 """<b>Search current word backward</b>""" |
2853 """<p>Search the previous occurrence of the current word of the""" | 2853 """<p>Search the previous occurrence of the current word of the""" |
2854 """ current editor.</p>""" | 2854 """ current editor.</p>""" |
2855 )) | 2855 )) |
2856 self.searchPrevWordAct.triggered[()].connect(self.__findPrevWord) | 2856 self.searchPrevWordAct.triggered.connect(self.__findPrevWord) |
2857 self.searchActions.append(self.searchPrevWordAct) | 2857 self.searchActions.append(self.searchPrevWordAct) |
2858 | 2858 |
2859 self.replaceAct = E5Action( | 2859 self.replaceAct = E5Action( |
2860 QApplication.translate('ViewManager', 'Replace'), | 2860 QApplication.translate('ViewManager', 'Replace'), |
2861 QApplication.translate('ViewManager', '&Replace...'), | 2861 QApplication.translate('ViewManager', '&Replace...'), |
2870 """<b>Replace</b>""" | 2870 """<b>Replace</b>""" |
2871 """<p>Search for some text in the current editor and replace it.""" | 2871 """<p>Search for some text in the current editor and replace it.""" |
2872 """ A dialog is shown to enter the searchtext, the replacement""" | 2872 """ A dialog is shown to enter the searchtext, the replacement""" |
2873 """ text and options for the search and replace.</p>""" | 2873 """ text and options for the search and replace.</p>""" |
2874 )) | 2874 )) |
2875 self.replaceAct.triggered[()].connect(self.__replace) | 2875 self.replaceAct.triggered.connect(self.__replace) |
2876 self.searchActions.append(self.replaceAct) | 2876 self.searchActions.append(self.replaceAct) |
2877 | 2877 |
2878 self.quickSearchAct = E5Action( | 2878 self.quickSearchAct = E5Action( |
2879 QApplication.translate('ViewManager', 'Quicksearch'), | 2879 QApplication.translate('ViewManager', 'Quicksearch'), |
2880 UI.PixmapCache.getIcon("quickFindNext.png"), | 2880 UI.PixmapCache.getIcon("quickFindNext.png"), |
2891 """<p>This activates the quicksearch function of the IDE by""" | 2891 """<p>This activates the quicksearch function of the IDE by""" |
2892 """ giving focus to the quicksearch entry field. If this field""" | 2892 """ giving focus to the quicksearch entry field. If this field""" |
2893 """ is already active and contains text, it searches for the""" | 2893 """ is already active and contains text, it searches for the""" |
2894 """ next occurrence of this text.</p>""" | 2894 """ next occurrence of this text.</p>""" |
2895 )) | 2895 )) |
2896 self.quickSearchAct.triggered[()].connect(self.__quickSearch) | 2896 self.quickSearchAct.triggered.connect(self.__quickSearch) |
2897 self.searchActions.append(self.quickSearchAct) | 2897 self.searchActions.append(self.quickSearchAct) |
2898 | 2898 |
2899 self.quickSearchBackAct = E5Action( | 2899 self.quickSearchBackAct = E5Action( |
2900 QApplication.translate('ViewManager', 'Quicksearch backwards'), | 2900 QApplication.translate('ViewManager', 'Quicksearch backwards'), |
2901 UI.PixmapCache.getIcon("quickFindPrev.png"), | 2901 UI.PixmapCache.getIcon("quickFindPrev.png"), |
2911 'ViewManager', | 2911 'ViewManager', |
2912 """<b>Quicksearch backwards</b>""" | 2912 """<b>Quicksearch backwards</b>""" |
2913 """<p>This searches the previous occurrence of the quicksearch""" | 2913 """<p>This searches the previous occurrence of the quicksearch""" |
2914 """ text.</p>""" | 2914 """ text.</p>""" |
2915 )) | 2915 )) |
2916 self.quickSearchBackAct.triggered[()].connect(self.__quickSearchPrev) | 2916 self.quickSearchBackAct.triggered.connect(self.__quickSearchPrev) |
2917 self.searchActions.append(self.quickSearchBackAct) | 2917 self.searchActions.append(self.quickSearchBackAct) |
2918 | 2918 |
2919 self.quickSearchExtendAct = E5Action( | 2919 self.quickSearchExtendAct = E5Action( |
2920 QApplication.translate('ViewManager', 'Quicksearch extend'), | 2920 QApplication.translate('ViewManager', 'Quicksearch extend'), |
2921 UI.PixmapCache.getIcon("quickFindExtend.png"), | 2921 UI.PixmapCache.getIcon("quickFindExtend.png"), |
2931 'ViewManager', | 2931 'ViewManager', |
2932 """<b>Quicksearch extend</b>""" | 2932 """<b>Quicksearch extend</b>""" |
2933 """<p>This extends the quicksearch text to the end of the word""" | 2933 """<p>This extends the quicksearch text to the end of the word""" |
2934 """ currently found.</p>""" | 2934 """ currently found.</p>""" |
2935 )) | 2935 )) |
2936 self.quickSearchExtendAct.triggered[()].connect( | 2936 self.quickSearchExtendAct.triggered.connect( |
2937 self.__quickSearchExtend) | 2937 self.__quickSearchExtend) |
2938 self.searchActions.append(self.quickSearchExtendAct) | 2938 self.searchActions.append(self.quickSearchExtendAct) |
2939 | 2939 |
2940 self.gotoAct = E5Action( | 2940 self.gotoAct = E5Action( |
2941 QApplication.translate('ViewManager', 'Goto Line'), | 2941 QApplication.translate('ViewManager', 'Goto Line'), |
2951 'ViewManager', | 2951 'ViewManager', |
2952 """<b>Goto Line</b>""" | 2952 """<b>Goto Line</b>""" |
2953 """<p>Go to a specific line of text in the current editor.""" | 2953 """<p>Go to a specific line of text in the current editor.""" |
2954 """ A dialog is shown to enter the linenumber.</p>""" | 2954 """ A dialog is shown to enter the linenumber.</p>""" |
2955 )) | 2955 )) |
2956 self.gotoAct.triggered[()].connect(self.__goto) | 2956 self.gotoAct.triggered.connect(self.__goto) |
2957 self.searchActions.append(self.gotoAct) | 2957 self.searchActions.append(self.gotoAct) |
2958 | 2958 |
2959 self.gotoBraceAct = E5Action( | 2959 self.gotoBraceAct = E5Action( |
2960 QApplication.translate('ViewManager', 'Goto Brace'), | 2960 QApplication.translate('ViewManager', 'Goto Brace'), |
2961 UI.PixmapCache.getIcon("gotoBrace.png"), | 2961 UI.PixmapCache.getIcon("gotoBrace.png"), |
2969 self.gotoBraceAct.setWhatsThis(QApplication.translate( | 2969 self.gotoBraceAct.setWhatsThis(QApplication.translate( |
2970 'ViewManager', | 2970 'ViewManager', |
2971 """<b>Goto Brace</b>""" | 2971 """<b>Goto Brace</b>""" |
2972 """<p>Go to the matching brace in the current editor.</p>""" | 2972 """<p>Go to the matching brace in the current editor.</p>""" |
2973 )) | 2973 )) |
2974 self.gotoBraceAct.triggered[()].connect(self.__gotoBrace) | 2974 self.gotoBraceAct.triggered.connect(self.__gotoBrace) |
2975 self.searchActions.append(self.gotoBraceAct) | 2975 self.searchActions.append(self.gotoBraceAct) |
2976 | 2976 |
2977 self.gotoLastEditAct = E5Action( | 2977 self.gotoLastEditAct = E5Action( |
2978 QApplication.translate('ViewManager', 'Goto Last Edit Location'), | 2978 QApplication.translate('ViewManager', 'Goto Last Edit Location'), |
2979 UI.PixmapCache.getIcon("gotoLastEditPosition.png"), | 2979 UI.PixmapCache.getIcon("gotoLastEditPosition.png"), |
2989 'ViewManager', | 2989 'ViewManager', |
2990 """<b>Goto Last Edit Location</b>""" | 2990 """<b>Goto Last Edit Location</b>""" |
2991 """<p>Go to the location of the last edit in the current""" | 2991 """<p>Go to the location of the last edit in the current""" |
2992 """ editor.</p>""" | 2992 """ editor.</p>""" |
2993 )) | 2993 )) |
2994 self.gotoLastEditAct.triggered[()].connect(self.__gotoLastEditPosition) | 2994 self.gotoLastEditAct.triggered.connect(self.__gotoLastEditPosition) |
2995 self.searchActions.append(self.gotoLastEditAct) | 2995 self.searchActions.append(self.gotoLastEditAct) |
2996 | 2996 |
2997 self.gotoPreviousDefAct = E5Action( | 2997 self.gotoPreviousDefAct = E5Action( |
2998 QApplication.translate( | 2998 QApplication.translate( |
2999 'ViewManager', 'Goto Previous Method or Class'), | 2999 'ViewManager', 'Goto Previous Method or Class'), |
3012 'ViewManager', | 3012 'ViewManager', |
3013 """<b>Goto Previous Method or Class</b>""" | 3013 """<b>Goto Previous Method or Class</b>""" |
3014 """<p>Goes to the line of the previous method or class""" | 3014 """<p>Goes to the line of the previous method or class""" |
3015 """ definition and highlights the name.</p>""" | 3015 """ definition and highlights the name.</p>""" |
3016 )) | 3016 )) |
3017 self.gotoPreviousDefAct.triggered[()].connect( | 3017 self.gotoPreviousDefAct.triggered.connect( |
3018 self.__gotoPreviousMethodClass) | 3018 self.__gotoPreviousMethodClass) |
3019 self.searchActions.append(self.gotoPreviousDefAct) | 3019 self.searchActions.append(self.gotoPreviousDefAct) |
3020 | 3020 |
3021 self.gotoNextDefAct = E5Action( | 3021 self.gotoNextDefAct = E5Action( |
3022 QApplication.translate('ViewManager', 'Goto Next Method or Class'), | 3022 QApplication.translate('ViewManager', 'Goto Next Method or Class'), |
3032 'ViewManager', | 3032 'ViewManager', |
3033 """<b>Goto Next Method or Class</b>""" | 3033 """<b>Goto Next Method or Class</b>""" |
3034 """<p>Goes to the line of the next method or class definition""" | 3034 """<p>Goes to the line of the next method or class definition""" |
3035 """ and highlights the name.</p>""" | 3035 """ and highlights the name.</p>""" |
3036 )) | 3036 )) |
3037 self.gotoNextDefAct.triggered[()].connect(self.__gotoNextMethodClass) | 3037 self.gotoNextDefAct.triggered.connect(self.__gotoNextMethodClass) |
3038 self.searchActions.append(self.gotoNextDefAct) | 3038 self.searchActions.append(self.gotoNextDefAct) |
3039 | 3039 |
3040 self.searchActGrp.setEnabled(False) | 3040 self.searchActGrp.setEnabled(False) |
3041 | 3041 |
3042 self.searchFilesAct = E5Action( | 3042 self.searchFilesAct = E5Action( |
3054 """<b>Search in Files</b>""" | 3054 """<b>Search in Files</b>""" |
3055 """<p>Search for some text in the files of a directory tree""" | 3055 """<p>Search for some text in the files of a directory tree""" |
3056 """ or the project. A dialog is shown to enter the searchtext""" | 3056 """ or the project. A dialog is shown to enter the searchtext""" |
3057 """ and options for the search and to display the result.</p>""" | 3057 """ and options for the search and to display the result.</p>""" |
3058 )) | 3058 )) |
3059 self.searchFilesAct.triggered[()].connect(self.__searchFiles) | 3059 self.searchFilesAct.triggered.connect(self.__searchFiles) |
3060 self.searchActions.append(self.searchFilesAct) | 3060 self.searchActions.append(self.searchFilesAct) |
3061 | 3061 |
3062 self.replaceFilesAct = E5Action( | 3062 self.replaceFilesAct = E5Action( |
3063 QApplication.translate('ViewManager', 'Replace in Files'), | 3063 QApplication.translate('ViewManager', 'Replace in Files'), |
3064 QApplication.translate('ViewManager', 'Replace in F&iles...'), | 3064 QApplication.translate('ViewManager', 'Replace in F&iles...'), |
3074 """<p>Search for some text in the files of a directory tree""" | 3074 """<p>Search for some text in the files of a directory tree""" |
3075 """ or the project and replace it. A dialog is shown to enter""" | 3075 """ or the project and replace it. A dialog is shown to enter""" |
3076 """ the searchtext, the replacement text and options for the""" | 3076 """ the searchtext, the replacement text and options for the""" |
3077 """ search and to display the result.</p>""" | 3077 """ search and to display the result.</p>""" |
3078 )) | 3078 )) |
3079 self.replaceFilesAct.triggered[()].connect(self.__replaceFiles) | 3079 self.replaceFilesAct.triggered.connect(self.__replaceFiles) |
3080 self.searchActions.append(self.replaceFilesAct) | 3080 self.searchActions.append(self.replaceFilesAct) |
3081 | 3081 |
3082 self.searchOpenFilesAct = E5Action( | 3082 self.searchOpenFilesAct = E5Action( |
3083 QApplication.translate('ViewManager', 'Search in Open Files'), | 3083 QApplication.translate('ViewManager', 'Search in Open Files'), |
3084 UI.PixmapCache.getIcon("documentFind.png"), | 3084 UI.PixmapCache.getIcon("documentFind.png"), |
3095 """<b>Search in Open Files</b>""" | 3095 """<b>Search in Open Files</b>""" |
3096 """<p>Search for some text in the currently opened files.""" | 3096 """<p>Search for some text in the currently opened files.""" |
3097 """ A dialog is shown to enter the searchtext""" | 3097 """ A dialog is shown to enter the searchtext""" |
3098 """ and options for the search and to display the result.</p>""" | 3098 """ and options for the search and to display the result.</p>""" |
3099 )) | 3099 )) |
3100 self.searchOpenFilesAct.triggered[()].connect(self.__searchOpenFiles) | 3100 self.searchOpenFilesAct.triggered.connect(self.__searchOpenFiles) |
3101 self.searchActions.append(self.searchOpenFilesAct) | 3101 self.searchActions.append(self.searchOpenFilesAct) |
3102 | 3102 |
3103 self.replaceOpenFilesAct = E5Action( | 3103 self.replaceOpenFilesAct = E5Action( |
3104 QApplication.translate('ViewManager', 'Replace in Open Files'), | 3104 QApplication.translate('ViewManager', 'Replace in Open Files'), |
3105 QApplication.translate('ViewManager', 'Replace in Open Files...'), | 3105 QApplication.translate('ViewManager', 'Replace in Open Files...'), |
3116 """<p>Search for some text in the currently opened files""" | 3116 """<p>Search for some text in the currently opened files""" |
3117 """ and replace it. A dialog is shown to enter""" | 3117 """ and replace it. A dialog is shown to enter""" |
3118 """ the searchtext, the replacement text and options for the""" | 3118 """ the searchtext, the replacement text and options for the""" |
3119 """ search and to display the result.</p>""" | 3119 """ search and to display the result.</p>""" |
3120 )) | 3120 )) |
3121 self.replaceOpenFilesAct.triggered[()].connect(self.__replaceOpenFiles) | 3121 self.replaceOpenFilesAct.triggered.connect(self.__replaceOpenFiles) |
3122 self.searchActions.append(self.replaceOpenFilesAct) | 3122 self.searchActions.append(self.replaceOpenFilesAct) |
3123 | 3123 |
3124 def initSearchToolbars(self, toolbarManager): | 3124 def initSearchToolbars(self, toolbarManager): |
3125 """ | 3125 """ |
3126 Public method to create the Search toolbars. | 3126 Public method to create the Search toolbars. |
3246 self.zoomInAct.setWhatsThis(QApplication.translate( | 3246 self.zoomInAct.setWhatsThis(QApplication.translate( |
3247 'ViewManager', | 3247 'ViewManager', |
3248 """<b>Zoom in</b>""" | 3248 """<b>Zoom in</b>""" |
3249 """<p>Zoom in on the text. This makes the text bigger.</p>""" | 3249 """<p>Zoom in on the text. This makes the text bigger.</p>""" |
3250 )) | 3250 )) |
3251 self.zoomInAct.triggered[()].connect(self.__zoomIn) | 3251 self.zoomInAct.triggered.connect(self.__zoomIn) |
3252 self.viewActions.append(self.zoomInAct) | 3252 self.viewActions.append(self.zoomInAct) |
3253 | 3253 |
3254 self.zoomOutAct = E5Action( | 3254 self.zoomOutAct = E5Action( |
3255 QApplication.translate('ViewManager', 'Zoom out'), | 3255 QApplication.translate('ViewManager', 'Zoom out'), |
3256 UI.PixmapCache.getIcon("zoomOut.png"), | 3256 UI.PixmapCache.getIcon("zoomOut.png"), |
3265 self.zoomOutAct.setWhatsThis(QApplication.translate( | 3265 self.zoomOutAct.setWhatsThis(QApplication.translate( |
3266 'ViewManager', | 3266 'ViewManager', |
3267 """<b>Zoom out</b>""" | 3267 """<b>Zoom out</b>""" |
3268 """<p>Zoom out on the text. This makes the text smaller.</p>""" | 3268 """<p>Zoom out on the text. This makes the text smaller.</p>""" |
3269 )) | 3269 )) |
3270 self.zoomOutAct.triggered[()].connect(self.__zoomOut) | 3270 self.zoomOutAct.triggered.connect(self.__zoomOut) |
3271 self.viewActions.append(self.zoomOutAct) | 3271 self.viewActions.append(self.zoomOutAct) |
3272 | 3272 |
3273 self.zoomResetAct = E5Action( | 3273 self.zoomResetAct = E5Action( |
3274 QApplication.translate('ViewManager', 'Zoom reset'), | 3274 QApplication.translate('ViewManager', 'Zoom reset'), |
3275 UI.PixmapCache.getIcon("zoomReset.png"), | 3275 UI.PixmapCache.getIcon("zoomReset.png"), |
3284 'ViewManager', | 3284 'ViewManager', |
3285 """<b>Zoom reset</b>""" | 3285 """<b>Zoom reset</b>""" |
3286 """<p>Reset the zoom of the text. """ | 3286 """<p>Reset the zoom of the text. """ |
3287 """This sets the zoom factor to 100%.</p>""" | 3287 """This sets the zoom factor to 100%.</p>""" |
3288 )) | 3288 )) |
3289 self.zoomResetAct.triggered[()].connect(self.__zoomReset) | 3289 self.zoomResetAct.triggered.connect(self.__zoomReset) |
3290 self.viewActions.append(self.zoomResetAct) | 3290 self.viewActions.append(self.zoomResetAct) |
3291 | 3291 |
3292 self.zoomToAct = E5Action( | 3292 self.zoomToAct = E5Action( |
3293 QApplication.translate('ViewManager', 'Zoom'), | 3293 QApplication.translate('ViewManager', 'Zoom'), |
3294 UI.PixmapCache.getIcon("zoomTo.png"), | 3294 UI.PixmapCache.getIcon("zoomTo.png"), |
3303 'ViewManager', | 3303 'ViewManager', |
3304 """<b>Zoom</b>""" | 3304 """<b>Zoom</b>""" |
3305 """<p>Zoom the text. This opens a dialog where the""" | 3305 """<p>Zoom the text. This opens a dialog where the""" |
3306 """ desired size can be entered.</p>""" | 3306 """ desired size can be entered.</p>""" |
3307 )) | 3307 )) |
3308 self.zoomToAct.triggered[()].connect(self.__zoom) | 3308 self.zoomToAct.triggered.connect(self.__zoom) |
3309 self.viewActions.append(self.zoomToAct) | 3309 self.viewActions.append(self.zoomToAct) |
3310 | 3310 |
3311 self.toggleAllAct = E5Action( | 3311 self.toggleAllAct = E5Action( |
3312 QApplication.translate('ViewManager', 'Toggle all folds'), | 3312 QApplication.translate('ViewManager', 'Toggle all folds'), |
3313 QApplication.translate('ViewManager', 'Toggle &all folds'), | 3313 QApplication.translate('ViewManager', 'Toggle &all folds'), |
3317 self.toggleAllAct.setWhatsThis(QApplication.translate( | 3317 self.toggleAllAct.setWhatsThis(QApplication.translate( |
3318 'ViewManager', | 3318 'ViewManager', |
3319 """<b>Toggle all folds</b>""" | 3319 """<b>Toggle all folds</b>""" |
3320 """<p>Toggle all folds of the current editor.</p>""" | 3320 """<p>Toggle all folds of the current editor.</p>""" |
3321 )) | 3321 )) |
3322 self.toggleAllAct.triggered[()].connect(self.__toggleAll) | 3322 self.toggleAllAct.triggered.connect(self.__toggleAll) |
3323 self.viewActions.append(self.toggleAllAct) | 3323 self.viewActions.append(self.toggleAllAct) |
3324 | 3324 |
3325 self.toggleAllChildrenAct = E5Action( | 3325 self.toggleAllChildrenAct = E5Action( |
3326 QApplication.translate( | 3326 QApplication.translate( |
3327 'ViewManager', 'Toggle all folds (including children)'), | 3327 'ViewManager', 'Toggle all folds (including children)'), |
3334 'ViewManager', | 3334 'ViewManager', |
3335 """<b>Toggle all folds (including children)</b>""" | 3335 """<b>Toggle all folds (including children)</b>""" |
3336 """<p>Toggle all folds of the current editor including""" | 3336 """<p>Toggle all folds of the current editor including""" |
3337 """ all children.</p>""" | 3337 """ all children.</p>""" |
3338 )) | 3338 )) |
3339 self.toggleAllChildrenAct.triggered[()].connect( | 3339 self.toggleAllChildrenAct.triggered.connect( |
3340 self.__toggleAllChildren) | 3340 self.__toggleAllChildren) |
3341 self.viewActions.append(self.toggleAllChildrenAct) | 3341 self.viewActions.append(self.toggleAllChildrenAct) |
3342 | 3342 |
3343 self.toggleCurrentAct = E5Action( | 3343 self.toggleCurrentAct = E5Action( |
3344 QApplication.translate('ViewManager', 'Toggle current fold'), | 3344 QApplication.translate('ViewManager', 'Toggle current fold'), |
3350 'ViewManager', | 3350 'ViewManager', |
3351 """<b>Toggle current fold</b>""" | 3351 """<b>Toggle current fold</b>""" |
3352 """<p>Toggle the folds of the current line of the current""" | 3352 """<p>Toggle the folds of the current line of the current""" |
3353 """ editor.</p>""" | 3353 """ editor.</p>""" |
3354 )) | 3354 )) |
3355 self.toggleCurrentAct.triggered[()].connect(self.__toggleCurrent) | 3355 self.toggleCurrentAct.triggered.connect(self.__toggleCurrent) |
3356 self.viewActions.append(self.toggleCurrentAct) | 3356 self.viewActions.append(self.toggleCurrentAct) |
3357 | 3357 |
3358 self.unhighlightAct = E5Action( | 3358 self.unhighlightAct = E5Action( |
3359 QApplication.translate('ViewManager', 'Remove all highlights'), | 3359 QApplication.translate('ViewManager', 'Remove all highlights'), |
3360 UI.PixmapCache.getIcon("unhighlight.png"), | 3360 UI.PixmapCache.getIcon("unhighlight.png"), |
3366 self.unhighlightAct.setWhatsThis(QApplication.translate( | 3366 self.unhighlightAct.setWhatsThis(QApplication.translate( |
3367 'ViewManager', | 3367 'ViewManager', |
3368 """<b>Remove all highlights</b>""" | 3368 """<b>Remove all highlights</b>""" |
3369 """<p>Remove the highlights of all editors.</p>""" | 3369 """<p>Remove the highlights of all editors.</p>""" |
3370 )) | 3370 )) |
3371 self.unhighlightAct.triggered[()].connect(self.unhighlight) | 3371 self.unhighlightAct.triggered.connect(self.unhighlight) |
3372 self.viewActions.append(self.unhighlightAct) | 3372 self.viewActions.append(self.unhighlightAct) |
3373 | 3373 |
3374 self.newDocumentViewAct = E5Action( | 3374 self.newDocumentViewAct = E5Action( |
3375 QApplication.translate('ViewManager', 'New Document View'), | 3375 QApplication.translate('ViewManager', 'New Document View'), |
3376 UI.PixmapCache.getIcon("documentNewView.png"), | 3376 UI.PixmapCache.getIcon("documentNewView.png"), |
3383 """<b>New Document View</b>""" | 3383 """<b>New Document View</b>""" |
3384 """<p>Opens a new view of the current document. Both views show""" | 3384 """<p>Opens a new view of the current document. Both views show""" |
3385 """ the same document. However, the cursors may be positioned""" | 3385 """ the same document. However, the cursors may be positioned""" |
3386 """ independently.</p>""" | 3386 """ independently.</p>""" |
3387 )) | 3387 )) |
3388 self.newDocumentViewAct.triggered[()].connect(self.__newDocumentView) | 3388 self.newDocumentViewAct.triggered.connect(self.__newDocumentView) |
3389 self.viewActions.append(self.newDocumentViewAct) | 3389 self.viewActions.append(self.newDocumentViewAct) |
3390 | 3390 |
3391 self.newDocumentSplitViewAct = E5Action( | 3391 self.newDocumentSplitViewAct = E5Action( |
3392 QApplication.translate( | 3392 QApplication.translate( |
3393 'ViewManager', 'New Document View (with new split)'), | 3393 'ViewManager', 'New Document View (with new split)'), |
3403 """<b>New Document View</b>""" | 3403 """<b>New Document View</b>""" |
3404 """<p>Opens a new view of the current document in a new split.""" | 3404 """<p>Opens a new view of the current document in a new split.""" |
3405 """ Both views show the same document. However, the cursors may""" | 3405 """ Both views show the same document. However, the cursors may""" |
3406 """ be positioned independently.</p>""" | 3406 """ be positioned independently.</p>""" |
3407 )) | 3407 )) |
3408 self.newDocumentSplitViewAct.triggered[()].connect( | 3408 self.newDocumentSplitViewAct.triggered.connect( |
3409 self.__newDocumentSplitView) | 3409 self.__newDocumentSplitView) |
3410 self.viewActions.append(self.newDocumentSplitViewAct) | 3410 self.viewActions.append(self.newDocumentSplitViewAct) |
3411 | 3411 |
3412 self.splitViewAct = E5Action( | 3412 self.splitViewAct = E5Action( |
3413 QApplication.translate('ViewManager', 'Split view'), | 3413 QApplication.translate('ViewManager', 'Split view'), |
3419 self.splitViewAct.setWhatsThis(QApplication.translate( | 3419 self.splitViewAct.setWhatsThis(QApplication.translate( |
3420 'ViewManager', | 3420 'ViewManager', |
3421 """<b>Split view</b>""" | 3421 """<b>Split view</b>""" |
3422 """<p>Add a split to the view.</p>""" | 3422 """<p>Add a split to the view.</p>""" |
3423 )) | 3423 )) |
3424 self.splitViewAct.triggered[()].connect(self.__splitView) | 3424 self.splitViewAct.triggered.connect(self.__splitView) |
3425 self.viewActions.append(self.splitViewAct) | 3425 self.viewActions.append(self.splitViewAct) |
3426 | 3426 |
3427 self.splitOrientationAct = E5Action( | 3427 self.splitOrientationAct = E5Action( |
3428 QApplication.translate('ViewManager', 'Arrange horizontally'), | 3428 QApplication.translate('ViewManager', 'Arrange horizontally'), |
3429 QApplication.translate('ViewManager', 'Arrange &horizontally'), | 3429 QApplication.translate('ViewManager', 'Arrange &horizontally'), |
3449 self.splitRemoveAct.setWhatsThis(QApplication.translate( | 3449 self.splitRemoveAct.setWhatsThis(QApplication.translate( |
3450 'ViewManager', | 3450 'ViewManager', |
3451 """<b>Remove split</b>""" | 3451 """<b>Remove split</b>""" |
3452 """<p>Remove the current split.</p>""" | 3452 """<p>Remove the current split.</p>""" |
3453 )) | 3453 )) |
3454 self.splitRemoveAct.triggered[()].connect(self.removeSplit) | 3454 self.splitRemoveAct.triggered.connect(self.removeSplit) |
3455 self.viewActions.append(self.splitRemoveAct) | 3455 self.viewActions.append(self.splitRemoveAct) |
3456 | 3456 |
3457 self.nextSplitAct = E5Action( | 3457 self.nextSplitAct = E5Action( |
3458 QApplication.translate('ViewManager', 'Next split'), | 3458 QApplication.translate('ViewManager', 'Next split'), |
3459 QApplication.translate('ViewManager', '&Next split'), | 3459 QApplication.translate('ViewManager', '&Next split'), |
3466 self.nextSplitAct.setWhatsThis(QApplication.translate( | 3466 self.nextSplitAct.setWhatsThis(QApplication.translate( |
3467 'ViewManager', | 3467 'ViewManager', |
3468 """<b>Next split</b>""" | 3468 """<b>Next split</b>""" |
3469 """<p>Move to the next split.</p>""" | 3469 """<p>Move to the next split.</p>""" |
3470 )) | 3470 )) |
3471 self.nextSplitAct.triggered[()].connect(self.nextSplit) | 3471 self.nextSplitAct.triggered.connect(self.nextSplit) |
3472 self.viewActions.append(self.nextSplitAct) | 3472 self.viewActions.append(self.nextSplitAct) |
3473 | 3473 |
3474 self.prevSplitAct = E5Action( | 3474 self.prevSplitAct = E5Action( |
3475 QApplication.translate('ViewManager', 'Previous split'), | 3475 QApplication.translate('ViewManager', 'Previous split'), |
3476 QApplication.translate('ViewManager', '&Previous split'), | 3476 QApplication.translate('ViewManager', '&Previous split'), |
3482 self.prevSplitAct.setWhatsThis(QApplication.translate( | 3482 self.prevSplitAct.setWhatsThis(QApplication.translate( |
3483 'ViewManager', | 3483 'ViewManager', |
3484 """<b>Previous split</b>""" | 3484 """<b>Previous split</b>""" |
3485 """<p>Move to the previous split.</p>""" | 3485 """<p>Move to the previous split.</p>""" |
3486 )) | 3486 )) |
3487 self.prevSplitAct.triggered[()].connect(self.prevSplit) | 3487 self.prevSplitAct.triggered.connect(self.prevSplit) |
3488 self.viewActions.append(self.prevSplitAct) | 3488 self.viewActions.append(self.prevSplitAct) |
3489 | 3489 |
3490 self.previewAct = E5Action( | 3490 self.previewAct = E5Action( |
3491 QApplication.translate('ViewManager', 'Preview'), | 3491 QApplication.translate('ViewManager', 'Preview'), |
3492 UI.PixmapCache.getIcon("previewer.png"), | 3492 UI.PixmapCache.getIcon("previewer.png"), |
3590 self.macroStartRecAct.setWhatsThis(QApplication.translate( | 3590 self.macroStartRecAct.setWhatsThis(QApplication.translate( |
3591 'ViewManager', | 3591 'ViewManager', |
3592 """<b>Start Macro Recording</b>""" | 3592 """<b>Start Macro Recording</b>""" |
3593 """<p>Start recording editor commands into a new macro.</p>""" | 3593 """<p>Start recording editor commands into a new macro.</p>""" |
3594 )) | 3594 )) |
3595 self.macroStartRecAct.triggered[()].connect(self.__macroStartRecording) | 3595 self.macroStartRecAct.triggered.connect(self.__macroStartRecording) |
3596 self.macroActions.append(self.macroStartRecAct) | 3596 self.macroActions.append(self.macroStartRecAct) |
3597 | 3597 |
3598 self.macroStopRecAct = E5Action( | 3598 self.macroStopRecAct = E5Action( |
3599 QApplication.translate('ViewManager', 'Stop Macro Recording'), | 3599 QApplication.translate('ViewManager', 'Stop Macro Recording'), |
3600 QApplication.translate('ViewManager', 'Sto&p Macro Recording'), | 3600 QApplication.translate('ViewManager', 'Sto&p Macro Recording'), |
3604 self.macroStopRecAct.setWhatsThis(QApplication.translate( | 3604 self.macroStopRecAct.setWhatsThis(QApplication.translate( |
3605 'ViewManager', | 3605 'ViewManager', |
3606 """<b>Stop Macro Recording</b>""" | 3606 """<b>Stop Macro Recording</b>""" |
3607 """<p>Stop recording editor commands into a new macro.</p>""" | 3607 """<p>Stop recording editor commands into a new macro.</p>""" |
3608 )) | 3608 )) |
3609 self.macroStopRecAct.triggered[()].connect(self.__macroStopRecording) | 3609 self.macroStopRecAct.triggered.connect(self.__macroStopRecording) |
3610 self.macroActions.append(self.macroStopRecAct) | 3610 self.macroActions.append(self.macroStopRecAct) |
3611 | 3611 |
3612 self.macroRunAct = E5Action( | 3612 self.macroRunAct = E5Action( |
3613 QApplication.translate('ViewManager', 'Run Macro'), | 3613 QApplication.translate('ViewManager', 'Run Macro'), |
3614 QApplication.translate('ViewManager', '&Run Macro'), | 3614 QApplication.translate('ViewManager', '&Run Macro'), |
3618 self.macroRunAct.setWhatsThis(QApplication.translate( | 3618 self.macroRunAct.setWhatsThis(QApplication.translate( |
3619 'ViewManager', | 3619 'ViewManager', |
3620 """<b>Run Macro</b>""" | 3620 """<b>Run Macro</b>""" |
3621 """<p>Run a previously recorded editor macro.</p>""" | 3621 """<p>Run a previously recorded editor macro.</p>""" |
3622 )) | 3622 )) |
3623 self.macroRunAct.triggered[()].connect(self.__macroRun) | 3623 self.macroRunAct.triggered.connect(self.__macroRun) |
3624 self.macroActions.append(self.macroRunAct) | 3624 self.macroActions.append(self.macroRunAct) |
3625 | 3625 |
3626 self.macroDeleteAct = E5Action( | 3626 self.macroDeleteAct = E5Action( |
3627 QApplication.translate('ViewManager', 'Delete Macro'), | 3627 QApplication.translate('ViewManager', 'Delete Macro'), |
3628 QApplication.translate('ViewManager', '&Delete Macro'), | 3628 QApplication.translate('ViewManager', '&Delete Macro'), |
3632 self.macroDeleteAct.setWhatsThis(QApplication.translate( | 3632 self.macroDeleteAct.setWhatsThis(QApplication.translate( |
3633 'ViewManager', | 3633 'ViewManager', |
3634 """<b>Delete Macro</b>""" | 3634 """<b>Delete Macro</b>""" |
3635 """<p>Delete a previously recorded editor macro.</p>""" | 3635 """<p>Delete a previously recorded editor macro.</p>""" |
3636 )) | 3636 )) |
3637 self.macroDeleteAct.triggered[()].connect(self.__macroDelete) | 3637 self.macroDeleteAct.triggered.connect(self.__macroDelete) |
3638 self.macroActions.append(self.macroDeleteAct) | 3638 self.macroActions.append(self.macroDeleteAct) |
3639 | 3639 |
3640 self.macroLoadAct = E5Action( | 3640 self.macroLoadAct = E5Action( |
3641 QApplication.translate('ViewManager', 'Load Macro'), | 3641 QApplication.translate('ViewManager', 'Load Macro'), |
3642 QApplication.translate('ViewManager', '&Load Macro'), | 3642 QApplication.translate('ViewManager', '&Load Macro'), |
3646 self.macroLoadAct.setWhatsThis(QApplication.translate( | 3646 self.macroLoadAct.setWhatsThis(QApplication.translate( |
3647 'ViewManager', | 3647 'ViewManager', |
3648 """<b>Load Macro</b>""" | 3648 """<b>Load Macro</b>""" |
3649 """<p>Load an editor macro from a file.</p>""" | 3649 """<p>Load an editor macro from a file.</p>""" |
3650 )) | 3650 )) |
3651 self.macroLoadAct.triggered[()].connect(self.__macroLoad) | 3651 self.macroLoadAct.triggered.connect(self.__macroLoad) |
3652 self.macroActions.append(self.macroLoadAct) | 3652 self.macroActions.append(self.macroLoadAct) |
3653 | 3653 |
3654 self.macroSaveAct = E5Action( | 3654 self.macroSaveAct = E5Action( |
3655 QApplication.translate('ViewManager', 'Save Macro'), | 3655 QApplication.translate('ViewManager', 'Save Macro'), |
3656 QApplication.translate('ViewManager', '&Save Macro'), | 3656 QApplication.translate('ViewManager', '&Save Macro'), |
3660 self.macroSaveAct.setWhatsThis(QApplication.translate( | 3660 self.macroSaveAct.setWhatsThis(QApplication.translate( |
3661 'ViewManager', | 3661 'ViewManager', |
3662 """<b>Save Macro</b>""" | 3662 """<b>Save Macro</b>""" |
3663 """<p>Save a previously recorded editor macro to a file.</p>""" | 3663 """<p>Save a previously recorded editor macro to a file.</p>""" |
3664 )) | 3664 )) |
3665 self.macroSaveAct.triggered[()].connect(self.__macroSave) | 3665 self.macroSaveAct.triggered.connect(self.__macroSave) |
3666 self.macroActions.append(self.macroSaveAct) | 3666 self.macroActions.append(self.macroSaveAct) |
3667 | 3667 |
3668 self.macroActGrp.setEnabled(False) | 3668 self.macroActGrp.setEnabled(False) |
3669 | 3669 |
3670 def initMacroMenu(self): | 3670 def initMacroMenu(self): |
3704 'ViewManager', | 3704 'ViewManager', |
3705 """<b>Toggle Bookmark</b>""" | 3705 """<b>Toggle Bookmark</b>""" |
3706 """<p>Toggle a bookmark at the current line of the current""" | 3706 """<p>Toggle a bookmark at the current line of the current""" |
3707 """ editor.</p>""" | 3707 """ editor.</p>""" |
3708 )) | 3708 )) |
3709 self.bookmarkToggleAct.triggered[()].connect(self.__toggleBookmark) | 3709 self.bookmarkToggleAct.triggered.connect(self.__toggleBookmark) |
3710 self.bookmarkActions.append(self.bookmarkToggleAct) | 3710 self.bookmarkActions.append(self.bookmarkToggleAct) |
3711 | 3711 |
3712 self.bookmarkNextAct = E5Action( | 3712 self.bookmarkNextAct = E5Action( |
3713 QApplication.translate('ViewManager', 'Next Bookmark'), | 3713 QApplication.translate('ViewManager', 'Next Bookmark'), |
3714 UI.PixmapCache.getIcon("bookmarkNext.png"), | 3714 UI.PixmapCache.getIcon("bookmarkNext.png"), |
3722 self.bookmarkNextAct.setWhatsThis(QApplication.translate( | 3722 self.bookmarkNextAct.setWhatsThis(QApplication.translate( |
3723 'ViewManager', | 3723 'ViewManager', |
3724 """<b>Next Bookmark</b>""" | 3724 """<b>Next Bookmark</b>""" |
3725 """<p>Go to next bookmark of the current editor.</p>""" | 3725 """<p>Go to next bookmark of the current editor.</p>""" |
3726 )) | 3726 )) |
3727 self.bookmarkNextAct.triggered[()].connect(self.__nextBookmark) | 3727 self.bookmarkNextAct.triggered.connect(self.__nextBookmark) |
3728 self.bookmarkActions.append(self.bookmarkNextAct) | 3728 self.bookmarkActions.append(self.bookmarkNextAct) |
3729 | 3729 |
3730 self.bookmarkPreviousAct = E5Action( | 3730 self.bookmarkPreviousAct = E5Action( |
3731 QApplication.translate('ViewManager', 'Previous Bookmark'), | 3731 QApplication.translate('ViewManager', 'Previous Bookmark'), |
3732 UI.PixmapCache.getIcon("bookmarkPrevious.png"), | 3732 UI.PixmapCache.getIcon("bookmarkPrevious.png"), |
3740 self.bookmarkPreviousAct.setWhatsThis(QApplication.translate( | 3740 self.bookmarkPreviousAct.setWhatsThis(QApplication.translate( |
3741 'ViewManager', | 3741 'ViewManager', |
3742 """<b>Previous Bookmark</b>""" | 3742 """<b>Previous Bookmark</b>""" |
3743 """<p>Go to previous bookmark of the current editor.</p>""" | 3743 """<p>Go to previous bookmark of the current editor.</p>""" |
3744 )) | 3744 )) |
3745 self.bookmarkPreviousAct.triggered[()].connect(self.__previousBookmark) | 3745 self.bookmarkPreviousAct.triggered.connect(self.__previousBookmark) |
3746 self.bookmarkActions.append(self.bookmarkPreviousAct) | 3746 self.bookmarkActions.append(self.bookmarkPreviousAct) |
3747 | 3747 |
3748 self.bookmarkClearAct = E5Action( | 3748 self.bookmarkClearAct = E5Action( |
3749 QApplication.translate('ViewManager', 'Clear Bookmarks'), | 3749 QApplication.translate('ViewManager', 'Clear Bookmarks'), |
3750 QApplication.translate('ViewManager', '&Clear Bookmarks'), | 3750 QApplication.translate('ViewManager', '&Clear Bookmarks'), |
3757 self.bookmarkClearAct.setWhatsThis(QApplication.translate( | 3757 self.bookmarkClearAct.setWhatsThis(QApplication.translate( |
3758 'ViewManager', | 3758 'ViewManager', |
3759 """<b>Clear Bookmarks</b>""" | 3759 """<b>Clear Bookmarks</b>""" |
3760 """<p>Clear bookmarks of all editors.</p>""" | 3760 """<p>Clear bookmarks of all editors.</p>""" |
3761 )) | 3761 )) |
3762 self.bookmarkClearAct.triggered[()].connect(self.__clearAllBookmarks) | 3762 self.bookmarkClearAct.triggered.connect(self.__clearAllBookmarks) |
3763 self.bookmarkActions.append(self.bookmarkClearAct) | 3763 self.bookmarkActions.append(self.bookmarkClearAct) |
3764 | 3764 |
3765 self.syntaxErrorGotoAct = E5Action( | 3765 self.syntaxErrorGotoAct = E5Action( |
3766 QApplication.translate('ViewManager', 'Goto Syntax Error'), | 3766 QApplication.translate('ViewManager', 'Goto Syntax Error'), |
3767 UI.PixmapCache.getIcon("syntaxErrorGoto.png"), | 3767 UI.PixmapCache.getIcon("syntaxErrorGoto.png"), |
3773 self.syntaxErrorGotoAct.setWhatsThis(QApplication.translate( | 3773 self.syntaxErrorGotoAct.setWhatsThis(QApplication.translate( |
3774 'ViewManager', | 3774 'ViewManager', |
3775 """<b>Goto Syntax Error</b>""" | 3775 """<b>Goto Syntax Error</b>""" |
3776 """<p>Go to next syntax error of the current editor.</p>""" | 3776 """<p>Go to next syntax error of the current editor.</p>""" |
3777 )) | 3777 )) |
3778 self.syntaxErrorGotoAct.triggered[()].connect(self.__gotoSyntaxError) | 3778 self.syntaxErrorGotoAct.triggered.connect(self.__gotoSyntaxError) |
3779 self.bookmarkActions.append(self.syntaxErrorGotoAct) | 3779 self.bookmarkActions.append(self.syntaxErrorGotoAct) |
3780 | 3780 |
3781 self.syntaxErrorClearAct = E5Action( | 3781 self.syntaxErrorClearAct = E5Action( |
3782 QApplication.translate('ViewManager', 'Clear Syntax Errors'), | 3782 QApplication.translate('ViewManager', 'Clear Syntax Errors'), |
3783 QApplication.translate('ViewManager', 'Clear &Syntax Errors'), | 3783 QApplication.translate('ViewManager', 'Clear &Syntax Errors'), |
3788 self.syntaxErrorClearAct.setWhatsThis(QApplication.translate( | 3788 self.syntaxErrorClearAct.setWhatsThis(QApplication.translate( |
3789 'ViewManager', | 3789 'ViewManager', |
3790 """<b>Clear Syntax Errors</b>""" | 3790 """<b>Clear Syntax Errors</b>""" |
3791 """<p>Clear syntax errors of all editors.</p>""" | 3791 """<p>Clear syntax errors of all editors.</p>""" |
3792 )) | 3792 )) |
3793 self.syntaxErrorClearAct.triggered[()].connect( | 3793 self.syntaxErrorClearAct.triggered.connect( |
3794 self.__clearAllSyntaxErrors) | 3794 self.__clearAllSyntaxErrors) |
3795 self.bookmarkActions.append(self.syntaxErrorClearAct) | 3795 self.bookmarkActions.append(self.syntaxErrorClearAct) |
3796 | 3796 |
3797 self.warningsNextAct = E5Action( | 3797 self.warningsNextAct = E5Action( |
3798 QApplication.translate('ViewManager', 'Next warning message'), | 3798 QApplication.translate('ViewManager', 'Next warning message'), |
3806 'ViewManager', | 3806 'ViewManager', |
3807 """<b>Next warning message</b>""" | 3807 """<b>Next warning message</b>""" |
3808 """<p>Go to next line of the current editor""" | 3808 """<p>Go to next line of the current editor""" |
3809 """ having a pyflakes warning.</p>""" | 3809 """ having a pyflakes warning.</p>""" |
3810 )) | 3810 )) |
3811 self.warningsNextAct.triggered[()].connect(self.__nextWarning) | 3811 self.warningsNextAct.triggered.connect(self.__nextWarning) |
3812 self.bookmarkActions.append(self.warningsNextAct) | 3812 self.bookmarkActions.append(self.warningsNextAct) |
3813 | 3813 |
3814 self.warningsPreviousAct = E5Action( | 3814 self.warningsPreviousAct = E5Action( |
3815 QApplication.translate('ViewManager', 'Previous warning message'), | 3815 QApplication.translate('ViewManager', 'Previous warning message'), |
3816 UI.PixmapCache.getIcon("warningPrev.png"), | 3816 UI.PixmapCache.getIcon("warningPrev.png"), |
3824 'ViewManager', | 3824 'ViewManager', |
3825 """<b>Previous warning message</b>""" | 3825 """<b>Previous warning message</b>""" |
3826 """<p>Go to previous line of the current editor""" | 3826 """<p>Go to previous line of the current editor""" |
3827 """ having a pyflakes warning.</p>""" | 3827 """ having a pyflakes warning.</p>""" |
3828 )) | 3828 )) |
3829 self.warningsPreviousAct.triggered[()].connect(self.__previousWarning) | 3829 self.warningsPreviousAct.triggered.connect(self.__previousWarning) |
3830 self.bookmarkActions.append(self.warningsPreviousAct) | 3830 self.bookmarkActions.append(self.warningsPreviousAct) |
3831 | 3831 |
3832 self.warningsClearAct = E5Action( | 3832 self.warningsClearAct = E5Action( |
3833 QApplication.translate('ViewManager', 'Clear Warning Messages'), | 3833 QApplication.translate('ViewManager', 'Clear Warning Messages'), |
3834 QApplication.translate('ViewManager', 'Clear &Warning Messages'), | 3834 QApplication.translate('ViewManager', 'Clear &Warning Messages'), |
3839 self.warningsClearAct.setWhatsThis(QApplication.translate( | 3839 self.warningsClearAct.setWhatsThis(QApplication.translate( |
3840 'ViewManager', | 3840 'ViewManager', |
3841 """<b>Clear Warning Messages</b>""" | 3841 """<b>Clear Warning Messages</b>""" |
3842 """<p>Clear pyflakes warning messages of all editors.</p>""" | 3842 """<p>Clear pyflakes warning messages of all editors.</p>""" |
3843 )) | 3843 )) |
3844 self.warningsClearAct.triggered[()].connect(self.__clearAllWarnings) | 3844 self.warningsClearAct.triggered.connect(self.__clearAllWarnings) |
3845 self.bookmarkActions.append(self.warningsClearAct) | 3845 self.bookmarkActions.append(self.warningsClearAct) |
3846 | 3846 |
3847 self.notcoveredNextAct = E5Action( | 3847 self.notcoveredNextAct = E5Action( |
3848 QApplication.translate('ViewManager', 'Next uncovered line'), | 3848 QApplication.translate('ViewManager', 'Next uncovered line'), |
3849 UI.PixmapCache.getIcon("notcoveredNext.png"), | 3849 UI.PixmapCache.getIcon("notcoveredNext.png"), |
3856 'ViewManager', | 3856 'ViewManager', |
3857 """<b>Next uncovered line</b>""" | 3857 """<b>Next uncovered line</b>""" |
3858 """<p>Go to next line of the current editor marked as not""" | 3858 """<p>Go to next line of the current editor marked as not""" |
3859 """ covered.</p>""" | 3859 """ covered.</p>""" |
3860 )) | 3860 )) |
3861 self.notcoveredNextAct.triggered[()].connect(self.__nextUncovered) | 3861 self.notcoveredNextAct.triggered.connect(self.__nextUncovered) |
3862 self.bookmarkActions.append(self.notcoveredNextAct) | 3862 self.bookmarkActions.append(self.notcoveredNextAct) |
3863 | 3863 |
3864 self.notcoveredPreviousAct = E5Action( | 3864 self.notcoveredPreviousAct = E5Action( |
3865 QApplication.translate('ViewManager', 'Previous uncovered line'), | 3865 QApplication.translate('ViewManager', 'Previous uncovered line'), |
3866 UI.PixmapCache.getIcon("notcoveredPrev.png"), | 3866 UI.PixmapCache.getIcon("notcoveredPrev.png"), |
3874 'ViewManager', | 3874 'ViewManager', |
3875 """<b>Previous uncovered line</b>""" | 3875 """<b>Previous uncovered line</b>""" |
3876 """<p>Go to previous line of the current editor marked""" | 3876 """<p>Go to previous line of the current editor marked""" |
3877 """ as not covered.</p>""" | 3877 """ as not covered.</p>""" |
3878 )) | 3878 )) |
3879 self.notcoveredPreviousAct.triggered[()].connect( | 3879 self.notcoveredPreviousAct.triggered.connect( |
3880 self.__previousUncovered) | 3880 self.__previousUncovered) |
3881 self.bookmarkActions.append(self.notcoveredPreviousAct) | 3881 self.bookmarkActions.append(self.notcoveredPreviousAct) |
3882 | 3882 |
3883 self.taskNextAct = E5Action( | 3883 self.taskNextAct = E5Action( |
3884 QApplication.translate('ViewManager', 'Next Task'), | 3884 QApplication.translate('ViewManager', 'Next Task'), |
3891 self.taskNextAct.setWhatsThis(QApplication.translate( | 3891 self.taskNextAct.setWhatsThis(QApplication.translate( |
3892 'ViewManager', | 3892 'ViewManager', |
3893 """<b>Next Task</b>""" | 3893 """<b>Next Task</b>""" |
3894 """<p>Go to next line of the current editor having a task.</p>""" | 3894 """<p>Go to next line of the current editor having a task.</p>""" |
3895 )) | 3895 )) |
3896 self.taskNextAct.triggered[()].connect(self.__nextTask) | 3896 self.taskNextAct.triggered.connect(self.__nextTask) |
3897 self.bookmarkActions.append(self.taskNextAct) | 3897 self.bookmarkActions.append(self.taskNextAct) |
3898 | 3898 |
3899 self.taskPreviousAct = E5Action( | 3899 self.taskPreviousAct = E5Action( |
3900 QApplication.translate('ViewManager', 'Previous Task'), | 3900 QApplication.translate('ViewManager', 'Previous Task'), |
3901 UI.PixmapCache.getIcon("taskPrev.png"), | 3901 UI.PixmapCache.getIcon("taskPrev.png"), |
3909 'ViewManager', | 3909 'ViewManager', |
3910 """<b>Previous Task</b>""" | 3910 """<b>Previous Task</b>""" |
3911 """<p>Go to previous line of the current editor having a""" | 3911 """<p>Go to previous line of the current editor having a""" |
3912 """ task.</p>""" | 3912 """ task.</p>""" |
3913 )) | 3913 )) |
3914 self.taskPreviousAct.triggered[()].connect(self.__previousTask) | 3914 self.taskPreviousAct.triggered.connect(self.__previousTask) |
3915 self.bookmarkActions.append(self.taskPreviousAct) | 3915 self.bookmarkActions.append(self.taskPreviousAct) |
3916 | 3916 |
3917 self.changeNextAct = E5Action( | 3917 self.changeNextAct = E5Action( |
3918 QApplication.translate('ViewManager', 'Next Change'), | 3918 QApplication.translate('ViewManager', 'Next Change'), |
3919 UI.PixmapCache.getIcon("changeNext.png"), | 3919 UI.PixmapCache.getIcon("changeNext.png"), |
3926 'ViewManager', | 3926 'ViewManager', |
3927 """<b>Next Change</b>""" | 3927 """<b>Next Change</b>""" |
3928 """<p>Go to next line of the current editor having a change""" | 3928 """<p>Go to next line of the current editor having a change""" |
3929 """ marker.</p>""" | 3929 """ marker.</p>""" |
3930 )) | 3930 )) |
3931 self.changeNextAct.triggered[()].connect(self.__nextChange) | 3931 self.changeNextAct.triggered.connect(self.__nextChange) |
3932 self.bookmarkActions.append(self.changeNextAct) | 3932 self.bookmarkActions.append(self.changeNextAct) |
3933 | 3933 |
3934 self.changePreviousAct = E5Action( | 3934 self.changePreviousAct = E5Action( |
3935 QApplication.translate('ViewManager', 'Previous Change'), | 3935 QApplication.translate('ViewManager', 'Previous Change'), |
3936 UI.PixmapCache.getIcon("changePrev.png"), | 3936 UI.PixmapCache.getIcon("changePrev.png"), |
3944 'ViewManager', | 3944 'ViewManager', |
3945 """<b>Previous Change</b>""" | 3945 """<b>Previous Change</b>""" |
3946 """<p>Go to previous line of the current editor having""" | 3946 """<p>Go to previous line of the current editor having""" |
3947 """ a change marker.</p>""" | 3947 """ a change marker.</p>""" |
3948 )) | 3948 )) |
3949 self.changePreviousAct.triggered[()].connect(self.__previousChange) | 3949 self.changePreviousAct.triggered.connect(self.__previousChange) |
3950 self.bookmarkActions.append(self.changePreviousAct) | 3950 self.bookmarkActions.append(self.changePreviousAct) |
3951 | 3951 |
3952 self.bookmarkActGrp.setEnabled(False) | 3952 self.bookmarkActGrp.setEnabled(False) |
3953 | 3953 |
3954 def initBookmarkMenu(self): | 3954 def initBookmarkMenu(self): |
4052 self.spellCheckAct.setWhatsThis(QApplication.translate( | 4052 self.spellCheckAct.setWhatsThis(QApplication.translate( |
4053 'ViewManager', | 4053 'ViewManager', |
4054 """<b>Check spelling</b>""" | 4054 """<b>Check spelling</b>""" |
4055 """<p>Perform a spell check of the current editor.</p>""" | 4055 """<p>Perform a spell check of the current editor.</p>""" |
4056 )) | 4056 )) |
4057 self.spellCheckAct.triggered[()].connect(self.__spellCheck) | 4057 self.spellCheckAct.triggered.connect(self.__spellCheck) |
4058 self.spellingActions.append(self.spellCheckAct) | 4058 self.spellingActions.append(self.spellCheckAct) |
4059 | 4059 |
4060 self.autoSpellCheckAct = E5Action( | 4060 self.autoSpellCheckAct = E5Action( |
4061 QApplication.translate('ViewManager', 'Automatic spell checking'), | 4061 QApplication.translate('ViewManager', 'Automatic spell checking'), |
4062 UI.PixmapCache.getIcon("autospellchecking.png"), | 4062 UI.PixmapCache.getIcon("autospellchecking.png"), |
4072 """<p>Activate or deactivate the automatic spell checking""" | 4072 """<p>Activate or deactivate the automatic spell checking""" |
4073 """ function of all editors.</p>""" | 4073 """ function of all editors.</p>""" |
4074 )) | 4074 )) |
4075 self.autoSpellCheckAct.setChecked( | 4075 self.autoSpellCheckAct.setChecked( |
4076 Preferences.getEditor("AutoSpellCheckingEnabled")) | 4076 Preferences.getEditor("AutoSpellCheckingEnabled")) |
4077 self.autoSpellCheckAct.triggered[()].connect( | 4077 self.autoSpellCheckAct.triggered.connect( |
4078 self.__setAutoSpellChecking) | 4078 self.__setAutoSpellChecking) |
4079 self.spellingActions.append(self.autoSpellCheckAct) | 4079 self.spellingActions.append(self.autoSpellCheckAct) |
4080 | 4080 |
4081 self.__enableSpellingActions() | 4081 self.__enableSpellingActions() |
4082 | 4082 |
4143 | 4143 |
4144 ################################################################## | 4144 ################################################################## |
4145 ## Methods and slots that deal with file and window handling | 4145 ## Methods and slots that deal with file and window handling |
4146 ################################################################## | 4146 ################################################################## |
4147 | 4147 |
4148 @pyqtSlot() | |
4148 def openFiles(self, prog=None): | 4149 def openFiles(self, prog=None): |
4149 """ | 4150 """ |
4150 Public slot to open some files. | 4151 Public slot to open some files. |
4151 | 4152 |
4152 @param prog name of file to be opened (string) | 4153 @param prog name of file to be opened (string) |
4562 pixmap = UI.PixmapCache.getPixmap("eolWindows.png") | 4563 pixmap = UI.PixmapCache.getPixmap("eolWindows.png") |
4563 else: | 4564 else: |
4564 pixmap = QPixmap() | 4565 pixmap = QPixmap() |
4565 return pixmap | 4566 return pixmap |
4566 | 4567 |
4568 @pyqtSlot() | |
4567 def unhighlight(self, current=False): | 4569 def unhighlight(self, current=False): |
4568 """ | 4570 """ |
4569 Public method to switch off all highlights. | 4571 Public method to switch off all highlights. |
4570 | 4572 |
4571 @param current flag indicating only the current editor should be | 4573 @param current flag indicating only the current editor should be |
5580 aw = self.activeWindow() | 5582 aw = self.activeWindow() |
5581 if aw: | 5583 if aw: |
5582 aw.zoomTo(0) | 5584 aw.zoomTo(0) |
5583 self.sbZoom.setValue(aw.getZoom()) | 5585 self.sbZoom.setValue(aw.getZoom()) |
5584 | 5586 |
5587 @pyqtSlot() | |
5588 @pyqtSlot(int) | |
5585 def __zoom(self, value=None): | 5589 def __zoom(self, value=None): |
5586 """ | 5590 """ |
5587 Private method to handle the zoom action. | 5591 Private method to handle the zoom action. |
5588 | 5592 |
5589 @keyparam value zoom value to be set (integer) | 5593 @keyparam value zoom value to be set (integer) |