897 self.editActions.append(self.revertAct) |
906 self.editActions.append(self.revertAct) |
898 |
907 |
899 self.copyActGrp = createActionGroup(self.editActGrp) |
908 self.copyActGrp = createActionGroup(self.editActGrp) |
900 |
909 |
901 self.cutAct = E5Action( |
910 self.cutAct = E5Action( |
902 QApplication.translate('ViewManager', 'Cut'), |
911 QCoreApplication.translate('ViewManager', 'Cut'), |
903 UI.PixmapCache.getIcon("editCut.png"), |
912 UI.PixmapCache.getIcon("editCut.png"), |
904 QApplication.translate('ViewManager', 'Cu&t'), |
913 QCoreApplication.translate('ViewManager', 'Cu&t'), |
905 QKeySequence(QApplication.translate( |
914 QKeySequence(QCoreApplication.translate( |
906 'ViewManager', "Ctrl+X", "Edit|Cut")), |
915 'ViewManager', "Ctrl+X", "Edit|Cut")), |
907 QKeySequence(QApplication.translate( |
916 QKeySequence(QCoreApplication.translate( |
908 'ViewManager', "Shift+Del", "Edit|Cut")), |
917 'ViewManager', "Shift+Del", "Edit|Cut")), |
909 self.copyActGrp, 'vm_edit_cut') |
918 self.copyActGrp, 'vm_edit_cut') |
910 self.cutAct.setStatusTip(QApplication.translate( |
919 self.cutAct.setStatusTip(QCoreApplication.translate( |
911 'ViewManager', 'Cut the selection')) |
920 'ViewManager', 'Cut the selection')) |
912 self.cutAct.setWhatsThis(QApplication.translate( |
921 self.cutAct.setWhatsThis(QCoreApplication.translate( |
913 'ViewManager', |
922 'ViewManager', |
914 """<b>Cut</b>""" |
923 """<b>Cut</b>""" |
915 """<p>Cut the selected text of the current editor to the""" |
924 """<p>Cut the selected text of the current editor to the""" |
916 """ clipboard.</p>""" |
925 """ clipboard.</p>""" |
917 )) |
926 )) |
918 self.cutAct.triggered.connect(self.__editCut) |
927 self.cutAct.triggered.connect(self.__editCut) |
919 self.editActions.append(self.cutAct) |
928 self.editActions.append(self.cutAct) |
920 |
929 |
921 self.copyAct = E5Action( |
930 self.copyAct = E5Action( |
922 QApplication.translate('ViewManager', 'Copy'), |
931 QCoreApplication.translate('ViewManager', 'Copy'), |
923 UI.PixmapCache.getIcon("editCopy.png"), |
932 UI.PixmapCache.getIcon("editCopy.png"), |
924 QApplication.translate('ViewManager', '&Copy'), |
933 QCoreApplication.translate('ViewManager', '&Copy'), |
925 QKeySequence(QApplication.translate( |
934 QKeySequence(QCoreApplication.translate( |
926 'ViewManager', "Ctrl+C", "Edit|Copy")), |
935 'ViewManager', "Ctrl+C", "Edit|Copy")), |
927 QKeySequence(QApplication.translate( |
936 QKeySequence(QCoreApplication.translate( |
928 'ViewManager', "Ctrl+Ins", "Edit|Copy")), |
937 'ViewManager', "Ctrl+Ins", "Edit|Copy")), |
929 self.copyActGrp, 'vm_edit_copy') |
938 self.copyActGrp, 'vm_edit_copy') |
930 self.copyAct.setStatusTip(QApplication.translate( |
939 self.copyAct.setStatusTip(QCoreApplication.translate( |
931 'ViewManager', 'Copy the selection')) |
940 'ViewManager', 'Copy the selection')) |
932 self.copyAct.setWhatsThis(QApplication.translate( |
941 self.copyAct.setWhatsThis(QCoreApplication.translate( |
933 'ViewManager', |
942 'ViewManager', |
934 """<b>Copy</b>""" |
943 """<b>Copy</b>""" |
935 """<p>Copy the selected text of the current editor to the""" |
944 """<p>Copy the selected text of the current editor to the""" |
936 """ clipboard.</p>""" |
945 """ clipboard.</p>""" |
937 )) |
946 )) |
938 self.copyAct.triggered.connect(self.__editCopy) |
947 self.copyAct.triggered.connect(self.__editCopy) |
939 self.editActions.append(self.copyAct) |
948 self.editActions.append(self.copyAct) |
940 |
949 |
941 self.pasteAct = E5Action( |
950 self.pasteAct = E5Action( |
942 QApplication.translate('ViewManager', 'Paste'), |
951 QCoreApplication.translate('ViewManager', 'Paste'), |
943 UI.PixmapCache.getIcon("editPaste.png"), |
952 UI.PixmapCache.getIcon("editPaste.png"), |
944 QApplication.translate('ViewManager', '&Paste'), |
953 QCoreApplication.translate('ViewManager', '&Paste'), |
945 QKeySequence(QApplication.translate( |
954 QKeySequence(QCoreApplication.translate( |
946 'ViewManager', "Ctrl+V", "Edit|Paste")), |
955 'ViewManager', "Ctrl+V", "Edit|Paste")), |
947 QKeySequence(QApplication.translate( |
956 QKeySequence(QCoreApplication.translate( |
948 'ViewManager', "Shift+Ins", "Edit|Paste")), |
957 'ViewManager', "Shift+Ins", "Edit|Paste")), |
949 self.copyActGrp, 'vm_edit_paste') |
958 self.copyActGrp, 'vm_edit_paste') |
950 self.pasteAct.setStatusTip(QApplication.translate( |
959 self.pasteAct.setStatusTip(QCoreApplication.translate( |
951 'ViewManager', 'Paste the last cut/copied text')) |
960 'ViewManager', 'Paste the last cut/copied text')) |
952 self.pasteAct.setWhatsThis(QApplication.translate( |
961 self.pasteAct.setWhatsThis(QCoreApplication.translate( |
953 'ViewManager', |
962 'ViewManager', |
954 """<b>Paste</b>""" |
963 """<b>Paste</b>""" |
955 """<p>Paste the last cut/copied text from the clipboard to""" |
964 """<p>Paste the last cut/copied text from the clipboard to""" |
956 """ the current editor.</p>""" |
965 """ the current editor.</p>""" |
957 )) |
966 )) |
958 self.pasteAct.triggered.connect(self.__editPaste) |
967 self.pasteAct.triggered.connect(self.__editPaste) |
959 self.editActions.append(self.pasteAct) |
968 self.editActions.append(self.pasteAct) |
960 |
969 |
961 self.deleteAct = E5Action( |
970 self.deleteAct = E5Action( |
962 QApplication.translate('ViewManager', 'Clear'), |
971 QCoreApplication.translate('ViewManager', 'Clear'), |
963 UI.PixmapCache.getIcon("editDelete.png"), |
972 UI.PixmapCache.getIcon("editDelete.png"), |
964 QApplication.translate('ViewManager', 'Clear'), |
973 QCoreApplication.translate('ViewManager', 'Clear'), |
965 QKeySequence(QApplication.translate( |
974 QKeySequence(QCoreApplication.translate( |
966 'ViewManager', "Alt+Shift+C", "Edit|Clear")), |
975 'ViewManager', "Alt+Shift+C", "Edit|Clear")), |
967 0, |
976 0, |
968 self.copyActGrp, 'vm_edit_clear') |
977 self.copyActGrp, 'vm_edit_clear') |
969 self.deleteAct.setStatusTip(QApplication.translate( |
978 self.deleteAct.setStatusTip(QCoreApplication.translate( |
970 'ViewManager', 'Clear all text')) |
979 'ViewManager', 'Clear all text')) |
971 self.deleteAct.setWhatsThis(QApplication.translate( |
980 self.deleteAct.setWhatsThis(QCoreApplication.translate( |
972 'ViewManager', |
981 'ViewManager', |
973 """<b>Clear</b>""" |
982 """<b>Clear</b>""" |
974 """<p>Delete all text of the current editor.</p>""" |
983 """<p>Delete all text of the current editor.</p>""" |
975 )) |
984 )) |
976 self.deleteAct.triggered.connect(self.__editDelete) |
985 self.deleteAct.triggered.connect(self.__editDelete) |
977 self.editActions.append(self.deleteAct) |
986 self.editActions.append(self.deleteAct) |
978 |
987 |
979 self.joinAct = E5Action( |
988 self.joinAct = E5Action( |
980 QApplication.translate('ViewManager', 'Join Lines'), |
989 QCoreApplication.translate('ViewManager', 'Join Lines'), |
981 QApplication.translate('ViewManager', 'Join Lines'), |
990 QCoreApplication.translate('ViewManager', 'Join Lines'), |
982 QKeySequence(QApplication.translate( |
991 QKeySequence(QCoreApplication.translate( |
983 'ViewManager', "Ctrl+J", "Edit|Join Lines")), |
992 'ViewManager', "Ctrl+J", "Edit|Join Lines")), |
984 0, |
993 0, |
985 self.copyActGrp, 'vm_edit_join_lines') |
994 self.copyActGrp, 'vm_edit_join_lines') |
986 self.joinAct.setStatusTip(QApplication.translate( |
995 self.joinAct.setStatusTip(QCoreApplication.translate( |
987 'ViewManager', 'Join Lines')) |
996 'ViewManager', 'Join Lines')) |
988 self.joinAct.setWhatsThis(QApplication.translate( |
997 self.joinAct.setWhatsThis(QCoreApplication.translate( |
989 'ViewManager', |
998 'ViewManager', |
990 """<b>Join Lines</b>""" |
999 """<b>Join Lines</b>""" |
991 """<p>Join the current and the next lines.</p>""" |
1000 """<p>Join the current and the next lines.</p>""" |
992 )) |
1001 )) |
993 self.joinAct.triggered.connect(self.__editJoin) |
1002 self.joinAct.triggered.connect(self.__editJoin) |
994 self.editActions.append(self.joinAct) |
1003 self.editActions.append(self.joinAct) |
995 |
1004 |
996 self.indentAct = E5Action( |
1005 self.indentAct = E5Action( |
997 QApplication.translate('ViewManager', 'Indent'), |
1006 QCoreApplication.translate('ViewManager', 'Indent'), |
998 UI.PixmapCache.getIcon("editIndent.png"), |
1007 UI.PixmapCache.getIcon("editIndent.png"), |
999 QApplication.translate('ViewManager', '&Indent'), |
1008 QCoreApplication.translate('ViewManager', '&Indent'), |
1000 QKeySequence(QApplication.translate( |
1009 QKeySequence(QCoreApplication.translate( |
1001 'ViewManager', "Ctrl+I", "Edit|Indent")), |
1010 'ViewManager', "Ctrl+I", "Edit|Indent")), |
1002 0, |
1011 0, |
1003 self.editActGrp, 'vm_edit_indent') |
1012 self.editActGrp, 'vm_edit_indent') |
1004 self.indentAct.setStatusTip(QApplication.translate( |
1013 self.indentAct.setStatusTip(QCoreApplication.translate( |
1005 'ViewManager', 'Indent line')) |
1014 'ViewManager', 'Indent line')) |
1006 self.indentAct.setWhatsThis(QApplication.translate( |
1015 self.indentAct.setWhatsThis(QCoreApplication.translate( |
1007 'ViewManager', |
1016 'ViewManager', |
1008 """<b>Indent</b>""" |
1017 """<b>Indent</b>""" |
1009 """<p>Indents the current line or the lines of the""" |
1018 """<p>Indents the current line or the lines of the""" |
1010 """ selection by one level.</p>""" |
1019 """ selection by one level.</p>""" |
1011 )) |
1020 )) |
1012 self.indentAct.triggered.connect(self.__editIndent) |
1021 self.indentAct.triggered.connect(self.__editIndent) |
1013 self.editActions.append(self.indentAct) |
1022 self.editActions.append(self.indentAct) |
1014 |
1023 |
1015 self.unindentAct = E5Action( |
1024 self.unindentAct = E5Action( |
1016 QApplication.translate('ViewManager', 'Unindent'), |
1025 QCoreApplication.translate('ViewManager', 'Unindent'), |
1017 UI.PixmapCache.getIcon("editUnindent.png"), |
1026 UI.PixmapCache.getIcon("editUnindent.png"), |
1018 QApplication.translate('ViewManager', 'U&nindent'), |
1027 QCoreApplication.translate('ViewManager', 'U&nindent'), |
1019 QKeySequence(QApplication.translate( |
1028 QKeySequence(QCoreApplication.translate( |
1020 'ViewManager', "Ctrl+Shift+I", "Edit|Unindent")), |
1029 'ViewManager', "Ctrl+Shift+I", "Edit|Unindent")), |
1021 0, |
1030 0, |
1022 self.editActGrp, 'vm_edit_unindent') |
1031 self.editActGrp, 'vm_edit_unindent') |
1023 self.unindentAct.setStatusTip(QApplication.translate( |
1032 self.unindentAct.setStatusTip(QCoreApplication.translate( |
1024 'ViewManager', 'Unindent line')) |
1033 'ViewManager', 'Unindent line')) |
1025 self.unindentAct.setWhatsThis(QApplication.translate( |
1034 self.unindentAct.setWhatsThis(QCoreApplication.translate( |
1026 'ViewManager', |
1035 'ViewManager', |
1027 """<b>Unindent</b>""" |
1036 """<b>Unindent</b>""" |
1028 """<p>Unindents the current line or the lines of the""" |
1037 """<p>Unindents the current line or the lines of the""" |
1029 """ selection by one level.</p>""" |
1038 """ selection by one level.</p>""" |
1030 )) |
1039 )) |
1031 self.unindentAct.triggered.connect(self.__editUnindent) |
1040 self.unindentAct.triggered.connect(self.__editUnindent) |
1032 self.editActions.append(self.unindentAct) |
1041 self.editActions.append(self.unindentAct) |
1033 |
1042 |
1034 self.smartIndentAct = E5Action( |
1043 self.smartIndentAct = E5Action( |
1035 QApplication.translate('ViewManager', 'Smart indent'), |
1044 QCoreApplication.translate('ViewManager', 'Smart indent'), |
1036 UI.PixmapCache.getIcon("editSmartIndent.png"), |
1045 UI.PixmapCache.getIcon("editSmartIndent.png"), |
1037 QApplication.translate('ViewManager', 'Smart indent'), |
1046 QCoreApplication.translate('ViewManager', 'Smart indent'), |
1038 QKeySequence(QApplication.translate( |
1047 QKeySequence(QCoreApplication.translate( |
1039 'ViewManager', "Ctrl+Alt+I", "Edit|Smart indent")), |
1048 'ViewManager', "Ctrl+Alt+I", "Edit|Smart indent")), |
1040 0, |
1049 0, |
1041 self.editActGrp, 'vm_edit_smart_indent') |
1050 self.editActGrp, 'vm_edit_smart_indent') |
1042 self.smartIndentAct.setStatusTip(QApplication.translate( |
1051 self.smartIndentAct.setStatusTip(QCoreApplication.translate( |
1043 'ViewManager', 'Smart indent Line or Selection')) |
1052 'ViewManager', 'Smart indent Line or Selection')) |
1044 self.smartIndentAct.setWhatsThis(QApplication.translate( |
1053 self.smartIndentAct.setWhatsThis(QCoreApplication.translate( |
1045 'ViewManager', |
1054 'ViewManager', |
1046 """<b>Smart indent</b>""" |
1055 """<b>Smart indent</b>""" |
1047 """<p>Indents the current line or the lines of the""" |
1056 """<p>Indents the current line or the lines of the""" |
1048 """ current selection smartly.</p>""" |
1057 """ current selection smartly.</p>""" |
1049 )) |
1058 )) |
1050 self.smartIndentAct.triggered.connect(self.__editSmartIndent) |
1059 self.smartIndentAct.triggered.connect(self.__editSmartIndent) |
1051 self.editActions.append(self.smartIndentAct) |
1060 self.editActions.append(self.smartIndentAct) |
1052 |
1061 |
1053 self.commentAct = E5Action( |
1062 self.commentAct = E5Action( |
1054 QApplication.translate('ViewManager', 'Comment'), |
1063 QCoreApplication.translate('ViewManager', 'Comment'), |
1055 UI.PixmapCache.getIcon("editComment.png"), |
1064 UI.PixmapCache.getIcon("editComment.png"), |
1056 QApplication.translate('ViewManager', 'C&omment'), |
1065 QCoreApplication.translate('ViewManager', 'C&omment'), |
1057 QKeySequence(QApplication.translate( |
1066 QKeySequence(QCoreApplication.translate( |
1058 'ViewManager', "Ctrl+M", "Edit|Comment")), |
1067 'ViewManager', "Ctrl+M", "Edit|Comment")), |
1059 0, |
1068 0, |
1060 self.editActGrp, 'vm_edit_comment') |
1069 self.editActGrp, 'vm_edit_comment') |
1061 self.commentAct.setStatusTip(QApplication.translate( |
1070 self.commentAct.setStatusTip(QCoreApplication.translate( |
1062 'ViewManager', 'Comment Line or Selection')) |
1071 'ViewManager', 'Comment Line or Selection')) |
1063 self.commentAct.setWhatsThis(QApplication.translate( |
1072 self.commentAct.setWhatsThis(QCoreApplication.translate( |
1064 'ViewManager', |
1073 'ViewManager', |
1065 """<b>Comment</b>""" |
1074 """<b>Comment</b>""" |
1066 """<p>Comments the current line or the lines of the""" |
1075 """<p>Comments the current line or the lines of the""" |
1067 """ current selection.</p>""" |
1076 """ current selection.</p>""" |
1068 )) |
1077 )) |
1069 self.commentAct.triggered.connect(self.__editComment) |
1078 self.commentAct.triggered.connect(self.__editComment) |
1070 self.editActions.append(self.commentAct) |
1079 self.editActions.append(self.commentAct) |
1071 |
1080 |
1072 self.uncommentAct = E5Action( |
1081 self.uncommentAct = E5Action( |
1073 QApplication.translate('ViewManager', 'Uncomment'), |
1082 QCoreApplication.translate('ViewManager', 'Uncomment'), |
1074 UI.PixmapCache.getIcon("editUncomment.png"), |
1083 UI.PixmapCache.getIcon("editUncomment.png"), |
1075 QApplication.translate('ViewManager', 'Unco&mment'), |
1084 QCoreApplication.translate('ViewManager', 'Unco&mment'), |
1076 QKeySequence(QApplication.translate( |
1085 QKeySequence(QCoreApplication.translate( |
1077 'ViewManager', "Alt+Ctrl+M", "Edit|Uncomment")), |
1086 'ViewManager', "Alt+Ctrl+M", "Edit|Uncomment")), |
1078 0, |
1087 0, |
1079 self.editActGrp, 'vm_edit_uncomment') |
1088 self.editActGrp, 'vm_edit_uncomment') |
1080 self.uncommentAct.setStatusTip(QApplication.translate( |
1089 self.uncommentAct.setStatusTip(QCoreApplication.translate( |
1081 'ViewManager', 'Uncomment Line or Selection')) |
1090 'ViewManager', 'Uncomment Line or Selection')) |
1082 self.uncommentAct.setWhatsThis(QApplication.translate( |
1091 self.uncommentAct.setWhatsThis(QCoreApplication.translate( |
1083 'ViewManager', |
1092 'ViewManager', |
1084 """<b>Uncomment</b>""" |
1093 """<b>Uncomment</b>""" |
1085 """<p>Uncomments the current line or the lines of the""" |
1094 """<p>Uncomments the current line or the lines of the""" |
1086 """ current selection.</p>""" |
1095 """ current selection.</p>""" |
1087 )) |
1096 )) |
1088 self.uncommentAct.triggered.connect(self.__editUncomment) |
1097 self.uncommentAct.triggered.connect(self.__editUncomment) |
1089 self.editActions.append(self.uncommentAct) |
1098 self.editActions.append(self.uncommentAct) |
1090 |
1099 |
1091 self.toggleCommentAct = E5Action( |
1100 self.toggleCommentAct = E5Action( |
1092 QApplication.translate('ViewManager', 'Toggle Comment'), |
1101 QCoreApplication.translate('ViewManager', 'Toggle Comment'), |
1093 UI.PixmapCache.getIcon("editToggleComment.png"), |
1102 UI.PixmapCache.getIcon("editToggleComment.png"), |
1094 QApplication.translate('ViewManager', 'Toggle Comment'), |
1103 QCoreApplication.translate('ViewManager', 'Toggle Comment'), |
1095 QKeySequence(QApplication.translate( |
1104 QKeySequence(QCoreApplication.translate( |
1096 'ViewManager', "Ctrl+Shift+M", "Edit|Toggle Comment")), |
1105 'ViewManager', "Ctrl+Shift+M", "Edit|Toggle Comment")), |
1097 0, |
1106 0, |
1098 self.editActGrp, 'vm_edit_toggle_comment') |
1107 self.editActGrp, 'vm_edit_toggle_comment') |
1099 self.toggleCommentAct.setStatusTip(QApplication.translate( |
1108 self.toggleCommentAct.setStatusTip(QCoreApplication.translate( |
1100 'ViewManager', |
1109 'ViewManager', |
1101 'Toggle the comment of the current line, selection or' |
1110 'Toggle the comment of the current line, selection or' |
1102 ' comment block')) |
1111 ' comment block')) |
1103 self.toggleCommentAct.setWhatsThis(QApplication.translate( |
1112 self.toggleCommentAct.setWhatsThis(QCoreApplication.translate( |
1104 'ViewManager', |
1113 'ViewManager', |
1105 """<b>Toggle Comment</b>""" |
1114 """<b>Toggle Comment</b>""" |
1106 """<p>If the current line does not start with a block comment,""" |
1115 """<p>If the current line does not start with a block comment,""" |
1107 """ the current line or selection is commented. If it is already""" |
1116 """ the current line or selection is commented. If it is already""" |
1108 """ commented, this comment block is uncommented. </p>""" |
1117 """ commented, this comment block is uncommented. </p>""" |
1109 )) |
1118 )) |
1110 self.toggleCommentAct.triggered.connect(self.__editToggleComment) |
1119 self.toggleCommentAct.triggered.connect(self.__editToggleComment) |
1111 self.editActions.append(self.toggleCommentAct) |
1120 self.editActions.append(self.toggleCommentAct) |
1112 |
1121 |
1113 self.streamCommentAct = E5Action( |
1122 self.streamCommentAct = E5Action( |
1114 QApplication.translate('ViewManager', 'Stream Comment'), |
1123 QCoreApplication.translate('ViewManager', 'Stream Comment'), |
1115 QApplication.translate('ViewManager', 'Stream Comment'), |
1124 QCoreApplication.translate('ViewManager', 'Stream Comment'), |
1116 0, 0, |
1125 0, 0, |
1117 self.editActGrp, 'vm_edit_stream_comment') |
1126 self.editActGrp, 'vm_edit_stream_comment') |
1118 self.streamCommentAct.setStatusTip(QApplication.translate( |
1127 self.streamCommentAct.setStatusTip(QCoreApplication.translate( |
1119 'ViewManager', |
1128 'ViewManager', |
1120 'Stream Comment Line or Selection')) |
1129 'Stream Comment Line or Selection')) |
1121 self.streamCommentAct.setWhatsThis(QApplication.translate( |
1130 self.streamCommentAct.setWhatsThis(QCoreApplication.translate( |
1122 'ViewManager', |
1131 'ViewManager', |
1123 """<b>Stream Comment</b>""" |
1132 """<b>Stream Comment</b>""" |
1124 """<p>Stream comments the current line or the current""" |
1133 """<p>Stream comments the current line or the current""" |
1125 """ selection.</p>""" |
1134 """ selection.</p>""" |
1126 )) |
1135 )) |
1127 self.streamCommentAct.triggered.connect(self.__editStreamComment) |
1136 self.streamCommentAct.triggered.connect(self.__editStreamComment) |
1128 self.editActions.append(self.streamCommentAct) |
1137 self.editActions.append(self.streamCommentAct) |
1129 |
1138 |
1130 self.boxCommentAct = E5Action( |
1139 self.boxCommentAct = E5Action( |
1131 QApplication.translate('ViewManager', 'Box Comment'), |
1140 QCoreApplication.translate('ViewManager', 'Box Comment'), |
1132 QApplication.translate('ViewManager', 'Box Comment'), |
1141 QCoreApplication.translate('ViewManager', 'Box Comment'), |
1133 0, 0, |
1142 0, 0, |
1134 self.editActGrp, 'vm_edit_box_comment') |
1143 self.editActGrp, 'vm_edit_box_comment') |
1135 self.boxCommentAct.setStatusTip(QApplication.translate( |
1144 self.boxCommentAct.setStatusTip(QCoreApplication.translate( |
1136 'ViewManager', 'Box Comment Line or Selection')) |
1145 'ViewManager', 'Box Comment Line or Selection')) |
1137 self.boxCommentAct.setWhatsThis(QApplication.translate( |
1146 self.boxCommentAct.setWhatsThis(QCoreApplication.translate( |
1138 'ViewManager', |
1147 'ViewManager', |
1139 """<b>Box Comment</b>""" |
1148 """<b>Box Comment</b>""" |
1140 """<p>Box comments the current line or the lines of the""" |
1149 """<p>Box comments the current line or the lines of the""" |
1141 """ current selection.</p>""" |
1150 """ current selection.</p>""" |
1142 )) |
1151 )) |
1143 self.boxCommentAct.triggered.connect(self.__editBoxComment) |
1152 self.boxCommentAct.triggered.connect(self.__editBoxComment) |
1144 self.editActions.append(self.boxCommentAct) |
1153 self.editActions.append(self.boxCommentAct) |
1145 |
1154 |
1146 self.selectBraceAct = E5Action( |
1155 self.selectBraceAct = E5Action( |
1147 QApplication.translate('ViewManager', 'Select to brace'), |
1156 QCoreApplication.translate('ViewManager', 'Select to brace'), |
1148 QApplication.translate('ViewManager', 'Select to &brace'), |
1157 QCoreApplication.translate('ViewManager', 'Select to &brace'), |
1149 QKeySequence(QApplication.translate( |
1158 QKeySequence(QCoreApplication.translate( |
1150 'ViewManager', "Ctrl+E", "Edit|Select to brace")), |
1159 'ViewManager', "Ctrl+E", "Edit|Select to brace")), |
1151 0, |
1160 0, |
1152 self.editActGrp, 'vm_edit_select_to_brace') |
1161 self.editActGrp, 'vm_edit_select_to_brace') |
1153 self.selectBraceAct.setStatusTip(QApplication.translate( |
1162 self.selectBraceAct.setStatusTip(QCoreApplication.translate( |
1154 'ViewManager', 'Select text to the matching brace')) |
1163 'ViewManager', 'Select text to the matching brace')) |
1155 self.selectBraceAct.setWhatsThis(QApplication.translate( |
1164 self.selectBraceAct.setWhatsThis(QCoreApplication.translate( |
1156 'ViewManager', |
1165 'ViewManager', |
1157 """<b>Select to brace</b>""" |
1166 """<b>Select to brace</b>""" |
1158 """<p>Select text of the current editor to the matching""" |
1167 """<p>Select text of the current editor to the matching""" |
1159 """ brace.</p>""" |
1168 """ brace.</p>""" |
1160 )) |
1169 )) |
1161 self.selectBraceAct.triggered.connect(self.__editSelectBrace) |
1170 self.selectBraceAct.triggered.connect(self.__editSelectBrace) |
1162 self.editActions.append(self.selectBraceAct) |
1171 self.editActions.append(self.selectBraceAct) |
1163 |
1172 |
1164 self.selectAllAct = E5Action( |
1173 self.selectAllAct = E5Action( |
1165 QApplication.translate('ViewManager', 'Select all'), |
1174 QCoreApplication.translate('ViewManager', 'Select all'), |
1166 QApplication.translate('ViewManager', '&Select all'), |
1175 QCoreApplication.translate('ViewManager', '&Select all'), |
1167 QKeySequence(QApplication.translate( |
1176 QKeySequence(QCoreApplication.translate( |
1168 'ViewManager', "Ctrl+A", "Edit|Select all")), |
1177 'ViewManager', "Ctrl+A", "Edit|Select all")), |
1169 0, |
1178 0, |
1170 self.editActGrp, 'vm_edit_select_all') |
1179 self.editActGrp, 'vm_edit_select_all') |
1171 self.selectAllAct.setStatusTip(QApplication.translate( |
1180 self.selectAllAct.setStatusTip(QCoreApplication.translate( |
1172 'ViewManager', 'Select all text')) |
1181 'ViewManager', 'Select all text')) |
1173 self.selectAllAct.setWhatsThis(QApplication.translate( |
1182 self.selectAllAct.setWhatsThis(QCoreApplication.translate( |
1174 'ViewManager', |
1183 'ViewManager', |
1175 """<b>Select All</b>""" |
1184 """<b>Select All</b>""" |
1176 """<p>Select all text of the current editor.</p>""" |
1185 """<p>Select all text of the current editor.</p>""" |
1177 )) |
1186 )) |
1178 self.selectAllAct.triggered.connect(self.__editSelectAll) |
1187 self.selectAllAct.triggered.connect(self.__editSelectAll) |
1179 self.editActions.append(self.selectAllAct) |
1188 self.editActions.append(self.selectAllAct) |
1180 |
1189 |
1181 self.deselectAllAct = E5Action( |
1190 self.deselectAllAct = E5Action( |
1182 QApplication.translate('ViewManager', 'Deselect all'), |
1191 QCoreApplication.translate('ViewManager', 'Deselect all'), |
1183 QApplication.translate('ViewManager', '&Deselect all'), |
1192 QCoreApplication.translate('ViewManager', '&Deselect all'), |
1184 QKeySequence(QApplication.translate( |
1193 QKeySequence(QCoreApplication.translate( |
1185 'ViewManager', "Alt+Ctrl+A", "Edit|Deselect all")), |
1194 'ViewManager', "Alt+Ctrl+A", "Edit|Deselect all")), |
1186 0, |
1195 0, |
1187 self.editActGrp, 'vm_edit_deselect_all') |
1196 self.editActGrp, 'vm_edit_deselect_all') |
1188 self.deselectAllAct.setStatusTip(QApplication.translate( |
1197 self.deselectAllAct.setStatusTip(QCoreApplication.translate( |
1189 'ViewManager', 'Deselect all text')) |
1198 'ViewManager', 'Deselect all text')) |
1190 self.deselectAllAct.setWhatsThis(QApplication.translate( |
1199 self.deselectAllAct.setWhatsThis(QCoreApplication.translate( |
1191 'ViewManager', |
1200 'ViewManager', |
1192 """<b>Deselect All</b>""" |
1201 """<b>Deselect All</b>""" |
1193 """<p>Deselect all text of the current editor.</p>""" |
1202 """<p>Deselect all text of the current editor.</p>""" |
1194 )) |
1203 )) |
1195 self.deselectAllAct.triggered.connect(self.__editDeselectAll) |
1204 self.deselectAllAct.triggered.connect(self.__editDeselectAll) |
1196 self.editActions.append(self.deselectAllAct) |
1205 self.editActions.append(self.deselectAllAct) |
1197 |
1206 |
1198 self.convertEOLAct = E5Action( |
1207 self.convertEOLAct = E5Action( |
1199 QApplication.translate( |
1208 QCoreApplication.translate( |
1200 'ViewManager', 'Convert Line End Characters'), |
1209 'ViewManager', 'Convert Line End Characters'), |
1201 QApplication.translate( |
1210 QCoreApplication.translate( |
1202 'ViewManager', 'Convert &Line End Characters'), |
1211 'ViewManager', 'Convert &Line End Characters'), |
1203 0, 0, |
1212 0, 0, |
1204 self.editActGrp, 'vm_edit_convert_eol') |
1213 self.editActGrp, 'vm_edit_convert_eol') |
1205 self.convertEOLAct.setStatusTip(QApplication.translate( |
1214 self.convertEOLAct.setStatusTip(QCoreApplication.translate( |
1206 'ViewManager', 'Convert Line End Characters')) |
1215 'ViewManager', 'Convert Line End Characters')) |
1207 self.convertEOLAct.setWhatsThis(QApplication.translate( |
1216 self.convertEOLAct.setWhatsThis(QCoreApplication.translate( |
1208 'ViewManager', |
1217 'ViewManager', |
1209 """<b>Convert Line End Characters</b>""" |
1218 """<b>Convert Line End Characters</b>""" |
1210 """<p>Convert the line end characters to the currently set""" |
1219 """<p>Convert the line end characters to the currently set""" |
1211 """ type.</p>""" |
1220 """ type.</p>""" |
1212 )) |
1221 )) |
1213 self.convertEOLAct.triggered.connect(self.__convertEOL) |
1222 self.convertEOLAct.triggered.connect(self.__convertEOL) |
1214 self.editActions.append(self.convertEOLAct) |
1223 self.editActions.append(self.convertEOLAct) |
1215 |
1224 |
1216 self.shortenEmptyAct = E5Action( |
1225 self.shortenEmptyAct = E5Action( |
1217 QApplication.translate('ViewManager', 'Shorten empty lines'), |
1226 QCoreApplication.translate('ViewManager', 'Shorten empty lines'), |
1218 QApplication.translate('ViewManager', 'Shorten empty lines'), |
1227 QCoreApplication.translate('ViewManager', 'Shorten empty lines'), |
1219 0, 0, |
1228 0, 0, |
1220 self.editActGrp, 'vm_edit_shorten_empty_lines') |
1229 self.editActGrp, 'vm_edit_shorten_empty_lines') |
1221 self.shortenEmptyAct.setStatusTip(QApplication.translate( |
1230 self.shortenEmptyAct.setStatusTip(QCoreApplication.translate( |
1222 'ViewManager', 'Shorten empty lines')) |
1231 'ViewManager', 'Shorten empty lines')) |
1223 self.shortenEmptyAct.setWhatsThis(QApplication.translate( |
1232 self.shortenEmptyAct.setWhatsThis(QCoreApplication.translate( |
1224 'ViewManager', |
1233 'ViewManager', |
1225 """<b>Shorten empty lines</b>""" |
1234 """<b>Shorten empty lines</b>""" |
1226 """<p>Shorten lines consisting solely of whitespace""" |
1235 """<p>Shorten lines consisting solely of whitespace""" |
1227 """ characters.</p>""" |
1236 """ characters.</p>""" |
1228 )) |
1237 )) |
1229 self.shortenEmptyAct.triggered.connect(self.__shortenEmptyLines) |
1238 self.shortenEmptyAct.triggered.connect(self.__shortenEmptyLines) |
1230 self.editActions.append(self.shortenEmptyAct) |
1239 self.editActions.append(self.shortenEmptyAct) |
1231 |
1240 |
1232 self.autoCompleteAct = E5Action( |
1241 self.autoCompleteAct = E5Action( |
1233 QApplication.translate('ViewManager', 'Autocomplete'), |
1242 QCoreApplication.translate('ViewManager', 'Autocomplete'), |
1234 QApplication.translate('ViewManager', '&Autocomplete'), |
1243 QCoreApplication.translate('ViewManager', '&Autocomplete'), |
1235 QKeySequence(QApplication.translate( |
1244 QKeySequence(QCoreApplication.translate( |
1236 'ViewManager', "Ctrl+Space", "Edit|Autocomplete")), |
1245 'ViewManager', "Ctrl+Space", "Edit|Autocomplete")), |
1237 0, |
1246 0, |
1238 self.editActGrp, 'vm_edit_autocomplete') |
1247 self.editActGrp, 'vm_edit_autocomplete') |
1239 self.autoCompleteAct.setStatusTip(QApplication.translate( |
1248 self.autoCompleteAct.setStatusTip(QCoreApplication.translate( |
1240 'ViewManager', 'Autocomplete current word')) |
1249 'ViewManager', 'Autocomplete current word')) |
1241 self.autoCompleteAct.setWhatsThis(QApplication.translate( |
1250 self.autoCompleteAct.setWhatsThis(QCoreApplication.translate( |
1242 'ViewManager', |
1251 'ViewManager', |
1243 """<b>Autocomplete</b>""" |
1252 """<b>Autocomplete</b>""" |
1244 """<p>Performs an autocompletion of the word containing""" |
1253 """<p>Performs an autocompletion of the word containing""" |
1245 """ the cursor.</p>""" |
1254 """ the cursor.</p>""" |
1246 )) |
1255 )) |
1247 self.autoCompleteAct.triggered.connect(self.__editAutoComplete) |
1256 self.autoCompleteAct.triggered.connect(self.__editAutoComplete) |
1248 self.editActions.append(self.autoCompleteAct) |
1257 self.editActions.append(self.autoCompleteAct) |
1249 |
1258 |
1250 self.autoCompleteFromDocAct = E5Action( |
1259 self.autoCompleteFromDocAct = E5Action( |
1251 QApplication.translate( |
1260 QCoreApplication.translate( |
1252 'ViewManager', 'Autocomplete from Document'), |
1261 'ViewManager', 'Autocomplete from Document'), |
1253 QApplication.translate( |
1262 QCoreApplication.translate( |
1254 'ViewManager', 'Autocomplete from Document'), |
1263 'ViewManager', 'Autocomplete from Document'), |
1255 QKeySequence(QApplication.translate( |
1264 QKeySequence(QCoreApplication.translate( |
1256 'ViewManager', "Ctrl+Shift+Space", |
1265 'ViewManager', "Ctrl+Shift+Space", |
1257 "Edit|Autocomplete from Document")), |
1266 "Edit|Autocomplete from Document")), |
1258 0, |
1267 0, |
1259 self.editActGrp, 'vm_edit_autocomplete_from_document') |
1268 self.editActGrp, 'vm_edit_autocomplete_from_document') |
1260 self.autoCompleteFromDocAct.setStatusTip(QApplication.translate( |
1269 self.autoCompleteFromDocAct.setStatusTip(QCoreApplication.translate( |
1261 'ViewManager', |
1270 'ViewManager', |
1262 'Autocomplete current word from Document')) |
1271 'Autocomplete current word from Document')) |
1263 self.autoCompleteFromDocAct.setWhatsThis(QApplication.translate( |
1272 self.autoCompleteFromDocAct.setWhatsThis(QCoreApplication.translate( |
1264 'ViewManager', |
1273 'ViewManager', |
1265 """<b>Autocomplete from Document</b>""" |
1274 """<b>Autocomplete from Document</b>""" |
1266 """<p>Performs an autocompletion from document of the word""" |
1275 """<p>Performs an autocompletion from document of the word""" |
1267 """ containing the cursor.</p>""" |
1276 """ containing the cursor.</p>""" |
1268 )) |
1277 )) |
1269 self.autoCompleteFromDocAct.triggered.connect( |
1278 self.autoCompleteFromDocAct.triggered.connect( |
1270 self.__editAutoCompleteFromDoc) |
1279 self.__editAutoCompleteFromDoc) |
1271 self.editActions.append(self.autoCompleteFromDocAct) |
1280 self.editActions.append(self.autoCompleteFromDocAct) |
1272 |
1281 |
1273 self.autoCompleteFromAPIsAct = E5Action( |
1282 self.autoCompleteFromAPIsAct = E5Action( |
1274 QApplication.translate('ViewManager', 'Autocomplete from APIs'), |
1283 QCoreApplication.translate('ViewManager', |
1275 QApplication.translate('ViewManager', 'Autocomplete from APIs'), |
1284 'Autocomplete from APIs'), |
1276 QKeySequence(QApplication.translate( |
1285 QCoreApplication.translate('ViewManager', |
|
1286 'Autocomplete from APIs'), |
|
1287 QKeySequence(QCoreApplication.translate( |
1277 'ViewManager', "Ctrl+Alt+Space", |
1288 'ViewManager', "Ctrl+Alt+Space", |
1278 "Edit|Autocomplete from APIs")), |
1289 "Edit|Autocomplete from APIs")), |
1279 0, |
1290 0, |
1280 self.editActGrp, 'vm_edit_autocomplete_from_api') |
1291 self.editActGrp, 'vm_edit_autocomplete_from_api') |
1281 self.autoCompleteFromAPIsAct.setStatusTip(QApplication.translate( |
1292 self.autoCompleteFromAPIsAct.setStatusTip(QCoreApplication.translate( |
1282 'ViewManager', |
1293 'ViewManager', |
1283 'Autocomplete current word from APIs')) |
1294 'Autocomplete current word from APIs')) |
1284 self.autoCompleteFromAPIsAct.setWhatsThis(QApplication.translate( |
1295 self.autoCompleteFromAPIsAct.setWhatsThis(QCoreApplication.translate( |
1285 'ViewManager', |
1296 'ViewManager', |
1286 """<b>Autocomplete from APIs</b>""" |
1297 """<b>Autocomplete from APIs</b>""" |
1287 """<p>Performs an autocompletion from APIs of the word""" |
1298 """<p>Performs an autocompletion from APIs of the word""" |
1288 """ containing the cursor.</p>""" |
1299 """ containing the cursor.</p>""" |
1289 )) |
1300 )) |
1290 self.autoCompleteFromAPIsAct.triggered.connect( |
1301 self.autoCompleteFromAPIsAct.triggered.connect( |
1291 self.__editAutoCompleteFromAPIs) |
1302 self.__editAutoCompleteFromAPIs) |
1292 self.editActions.append(self.autoCompleteFromAPIsAct) |
1303 self.editActions.append(self.autoCompleteFromAPIsAct) |
1293 |
1304 |
1294 self.autoCompleteFromAllAct = E5Action( |
1305 self.autoCompleteFromAllAct = E5Action( |
1295 QApplication.translate( |
1306 QCoreApplication.translate( |
1296 'ViewManager', 'Autocomplete from Document and APIs'), |
1307 'ViewManager', 'Autocomplete from Document and APIs'), |
1297 QApplication.translate( |
1308 QCoreApplication.translate( |
1298 'ViewManager', 'Autocomplete from Document and APIs'), |
1309 'ViewManager', 'Autocomplete from Document and APIs'), |
1299 QKeySequence(QApplication.translate( |
1310 QKeySequence(QCoreApplication.translate( |
1300 'ViewManager', "Alt+Shift+Space", |
1311 'ViewManager', "Alt+Shift+Space", |
1301 "Edit|Autocomplete from Document and APIs")), |
1312 "Edit|Autocomplete from Document and APIs")), |
1302 0, |
1313 0, |
1303 self.editActGrp, 'vm_edit_autocomplete_from_all') |
1314 self.editActGrp, 'vm_edit_autocomplete_from_all') |
1304 self.autoCompleteFromAllAct.setStatusTip(QApplication.translate( |
1315 self.autoCompleteFromAllAct.setStatusTip(QCoreApplication.translate( |
1305 'ViewManager', |
1316 'ViewManager', |
1306 'Autocomplete current word from Document and APIs')) |
1317 'Autocomplete current word from Document and APIs')) |
1307 self.autoCompleteFromAllAct.setWhatsThis(QApplication.translate( |
1318 self.autoCompleteFromAllAct.setWhatsThis(QCoreApplication.translate( |
1308 'ViewManager', |
1319 'ViewManager', |
1309 """<b>Autocomplete from Document and APIs</b>""" |
1320 """<b>Autocomplete from Document and APIs</b>""" |
1310 """<p>Performs an autocompletion from document and APIs""" |
1321 """<p>Performs an autocompletion from document and APIs""" |
1311 """ of the word containing the cursor.</p>""" |
1322 """ of the word containing the cursor.</p>""" |
1312 )) |
1323 )) |
1313 self.autoCompleteFromAllAct.triggered.connect( |
1324 self.autoCompleteFromAllAct.triggered.connect( |
1314 self.__editAutoCompleteFromAll) |
1325 self.__editAutoCompleteFromAll) |
1315 self.editActions.append(self.autoCompleteFromAllAct) |
1326 self.editActions.append(self.autoCompleteFromAllAct) |
1316 |
1327 |
1317 self.calltipsAct = E5Action( |
1328 self.calltipsAct = E5Action( |
1318 QApplication.translate('ViewManager', 'Calltip'), |
1329 QCoreApplication.translate('ViewManager', 'Calltip'), |
1319 QApplication.translate('ViewManager', '&Calltip'), |
1330 QCoreApplication.translate('ViewManager', '&Calltip'), |
1320 QKeySequence(QApplication.translate( |
1331 QKeySequence(QCoreApplication.translate( |
1321 'ViewManager', "Alt+Space", "Edit|Calltip")), |
1332 'ViewManager', "Alt+Space", "Edit|Calltip")), |
1322 0, |
1333 0, |
1323 self.editActGrp, 'vm_edit_calltip') |
1334 self.editActGrp, 'vm_edit_calltip') |
1324 self.calltipsAct.setStatusTip(QApplication.translate( |
1335 self.calltipsAct.setStatusTip(QCoreApplication.translate( |
1325 'ViewManager', 'Show Calltips')) |
1336 'ViewManager', 'Show Calltips')) |
1326 self.calltipsAct.setWhatsThis(QApplication.translate( |
1337 self.calltipsAct.setWhatsThis(QCoreApplication.translate( |
1327 'ViewManager', |
1338 'ViewManager', |
1328 """<b>Calltip</b>""" |
1339 """<b>Calltip</b>""" |
1329 """<p>Show calltips based on the characters immediately to the""" |
1340 """<p>Show calltips based on the characters immediately to the""" |
1330 """ left of the cursor.</p>""" |
1341 """ left of the cursor.</p>""" |
1331 )) |
1342 )) |
1332 self.calltipsAct.triggered.connect(self.__editShowCallTips) |
1343 self.calltipsAct.triggered.connect(self.__editShowCallTips) |
1333 self.editActions.append(self.calltipsAct) |
1344 self.editActions.append(self.calltipsAct) |
1334 |
1345 |
1335 self.sortAct = E5Action( |
1346 self.sortAct = E5Action( |
1336 QApplication.translate('ViewManager', 'Sort'), |
1347 QCoreApplication.translate('ViewManager', 'Sort'), |
1337 QApplication.translate('ViewManager', 'Sort'), |
1348 QCoreApplication.translate('ViewManager', 'Sort'), |
1338 QKeySequence(QApplication.translate( |
1349 QKeySequence(QCoreApplication.translate( |
1339 'ViewManager', "Ctrl+Alt+S", "Edit|Sort")), |
1350 'ViewManager', "Ctrl+Alt+S", "Edit|Sort")), |
1340 0, |
1351 0, |
1341 self.editActGrp, 'vm_edit_sort') |
1352 self.editActGrp, 'vm_edit_sort') |
1342 self.sortAct.setStatusTip(QApplication.translate( |
1353 self.sortAct.setStatusTip(QCoreApplication.translate( |
1343 'ViewManager', |
1354 'ViewManager', |
1344 'Sort the lines containing the rectangular selection')) |
1355 'Sort the lines containing the rectangular selection')) |
1345 self.sortAct.setWhatsThis(QApplication.translate( |
1356 self.sortAct.setWhatsThis(QCoreApplication.translate( |
1346 'ViewManager', |
1357 'ViewManager', |
1347 """<b>Sort</b>""" |
1358 """<b>Sort</b>""" |
1348 """<p>Sort the lines spanned by a rectangular selection based on""" |
1359 """<p>Sort the lines spanned by a rectangular selection based on""" |
1349 """ the selection ignoring leading and trailing whitespace.</p>""" |
1360 """ the selection ignoring leading and trailing whitespace.</p>""" |
1350 )) |
1361 )) |
1362 self.esm.mapped[int].connect(self.__editorCommand) |
1373 self.esm.mapped[int].connect(self.__editorCommand) |
1363 |
1374 |
1364 self.editorActGrp = createActionGroup(self.editActGrp) |
1375 self.editorActGrp = createActionGroup(self.editActGrp) |
1365 |
1376 |
1366 act = E5Action( |
1377 act = E5Action( |
1367 QApplication.translate('ViewManager', 'Move left one character'), |
1378 QCoreApplication.translate('ViewManager', |
1368 QApplication.translate('ViewManager', 'Move left one character'), |
1379 'Move left one character'), |
1369 QKeySequence(QApplication.translate('ViewManager', 'Left')), 0, |
1380 QCoreApplication.translate('ViewManager', |
|
1381 'Move left one character'), |
|
1382 QKeySequence(QCoreApplication.translate('ViewManager', 'Left')), 0, |
1370 self.editorActGrp, 'vm_edit_move_left_char') |
1383 self.editorActGrp, 'vm_edit_move_left_char') |
1371 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFT) |
1384 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFT) |
1372 if isMacPlatform(): |
1385 if isMacPlatform(): |
1373 act.setAlternateShortcut(QKeySequence( |
1386 act.setAlternateShortcut(QKeySequence( |
1374 QApplication.translate('ViewManager', 'Meta+B'))) |
1387 QCoreApplication.translate('ViewManager', 'Meta+B'))) |
1375 act.triggered.connect(self.esm.map) |
1388 act.triggered.connect(self.esm.map) |
1376 self.editActions.append(act) |
1389 self.editActions.append(act) |
1377 |
1390 |
1378 act = E5Action( |
1391 act = E5Action( |
1379 QApplication.translate('ViewManager', 'Move right one character'), |
1392 QCoreApplication.translate('ViewManager', |
1380 QApplication.translate('ViewManager', 'Move right one character'), |
1393 'Move right one character'), |
1381 QKeySequence(QApplication.translate('ViewManager', 'Right')), 0, |
1394 QCoreApplication.translate('ViewManager', |
1382 self.editorActGrp, 'vm_edit_move_right_char') |
1395 'Move right one character'), |
|
1396 QKeySequence(QCoreApplication.translate('ViewManager', 'Right')), |
|
1397 0, self.editorActGrp, 'vm_edit_move_right_char') |
1383 if isMacPlatform(): |
1398 if isMacPlatform(): |
1384 act.setAlternateShortcut(QKeySequence( |
1399 act.setAlternateShortcut(QKeySequence( |
1385 QApplication.translate('ViewManager', 'Meta+F'))) |
1400 QCoreApplication.translate('ViewManager', 'Meta+F'))) |
1386 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHT) |
1401 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHT) |
1387 act.triggered.connect(self.esm.map) |
1402 act.triggered.connect(self.esm.map) |
1388 self.editActions.append(act) |
1403 self.editActions.append(act) |
1389 |
1404 |
1390 act = E5Action( |
1405 act = E5Action( |
1391 QApplication.translate('ViewManager', 'Move up one line'), |
1406 QCoreApplication.translate('ViewManager', 'Move up one line'), |
1392 QApplication.translate('ViewManager', 'Move up one line'), |
1407 QCoreApplication.translate('ViewManager', 'Move up one line'), |
1393 QKeySequence(QApplication.translate('ViewManager', 'Up')), 0, |
1408 QKeySequence(QCoreApplication.translate('ViewManager', 'Up')), 0, |
1394 self.editorActGrp, 'vm_edit_move_up_line') |
1409 self.editorActGrp, 'vm_edit_move_up_line') |
1395 if isMacPlatform(): |
1410 if isMacPlatform(): |
1396 act.setAlternateShortcut(QKeySequence( |
1411 act.setAlternateShortcut(QKeySequence( |
1397 QApplication.translate('ViewManager', 'Meta+P'))) |
1412 QCoreApplication.translate('ViewManager', 'Meta+P'))) |
1398 self.esm.setMapping(act, QsciScintilla.SCI_LINEUP) |
1413 self.esm.setMapping(act, QsciScintilla.SCI_LINEUP) |
1399 act.triggered.connect(self.esm.map) |
1414 act.triggered.connect(self.esm.map) |
1400 self.editActions.append(act) |
1415 self.editActions.append(act) |
1401 |
1416 |
1402 act = E5Action( |
1417 act = E5Action( |
1403 QApplication.translate('ViewManager', 'Move down one line'), |
1418 QCoreApplication.translate('ViewManager', 'Move down one line'), |
1404 QApplication.translate('ViewManager', 'Move down one line'), |
1419 QCoreApplication.translate('ViewManager', 'Move down one line'), |
1405 QKeySequence(QApplication.translate('ViewManager', 'Down')), 0, |
1420 QKeySequence(QCoreApplication.translate('ViewManager', 'Down')), 0, |
1406 self.editorActGrp, 'vm_edit_move_down_line') |
1421 self.editorActGrp, 'vm_edit_move_down_line') |
1407 if isMacPlatform(): |
1422 if isMacPlatform(): |
1408 act.setAlternateShortcut(QKeySequence( |
1423 act.setAlternateShortcut(QKeySequence( |
1409 QApplication.translate('ViewManager', 'Meta+N'))) |
1424 QCoreApplication.translate('ViewManager', 'Meta+N'))) |
1410 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWN) |
1425 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWN) |
1411 act.triggered.connect(self.esm.map) |
1426 act.triggered.connect(self.esm.map) |
1412 self.editActions.append(act) |
1427 self.editActions.append(act) |
1413 |
1428 |
1414 act = E5Action( |
1429 act = E5Action( |
1415 QApplication.translate('ViewManager', 'Move left one word part'), |
1430 QCoreApplication.translate('ViewManager', |
1416 QApplication.translate('ViewManager', 'Move left one word part'), |
1431 'Move left one word part'), |
|
1432 QCoreApplication.translate('ViewManager', |
|
1433 'Move left one word part'), |
1417 0, 0, |
1434 0, 0, |
1418 self.editorActGrp, 'vm_edit_move_left_word_part') |
1435 self.editorActGrp, 'vm_edit_move_left_word_part') |
1419 if not isMacPlatform(): |
1436 if not isMacPlatform(): |
1420 act.setShortcut(QKeySequence( |
1437 act.setShortcut(QKeySequence( |
1421 QApplication.translate('ViewManager', 'Alt+Left'))) |
1438 QCoreApplication.translate('ViewManager', 'Alt+Left'))) |
1422 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFT) |
1439 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFT) |
1423 act.triggered.connect(self.esm.map) |
1440 act.triggered.connect(self.esm.map) |
1424 self.editActions.append(act) |
1441 self.editActions.append(act) |
1425 |
1442 |
1426 act = E5Action( |
1443 act = E5Action( |
1427 QApplication.translate('ViewManager', 'Move right one word part'), |
1444 QCoreApplication.translate('ViewManager', |
1428 QApplication.translate('ViewManager', 'Move right one word part'), |
1445 'Move right one word part'), |
|
1446 QCoreApplication.translate('ViewManager', |
|
1447 'Move right one word part'), |
1429 0, 0, |
1448 0, 0, |
1430 self.editorActGrp, 'vm_edit_move_right_word_part') |
1449 self.editorActGrp, 'vm_edit_move_right_word_part') |
1431 if not isMacPlatform(): |
1450 if not isMacPlatform(): |
1432 act.setShortcut(QKeySequence( |
1451 act.setShortcut(QKeySequence( |
1433 QApplication.translate('ViewManager', 'Alt+Right'))) |
1452 QCoreApplication.translate('ViewManager', 'Alt+Right'))) |
1434 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHT) |
1453 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHT) |
1435 act.triggered.connect(self.esm.map) |
1454 act.triggered.connect(self.esm.map) |
1436 self.editActions.append(act) |
1455 self.editActions.append(act) |
1437 |
1456 |
1438 act = E5Action( |
1457 act = E5Action( |
1439 QApplication.translate('ViewManager', 'Move left one word'), |
1458 QCoreApplication.translate('ViewManager', 'Move left one word'), |
1440 QApplication.translate('ViewManager', 'Move left one word'), |
1459 QCoreApplication.translate('ViewManager', 'Move left one word'), |
1441 0, 0, |
1460 0, 0, |
1442 self.editorActGrp, 'vm_edit_move_left_word') |
1461 self.editorActGrp, 'vm_edit_move_left_word') |
1443 if isMacPlatform(): |
1462 if isMacPlatform(): |
1444 act.setShortcut(QKeySequence( |
1463 act.setShortcut(QKeySequence( |
1445 QApplication.translate('ViewManager', 'Alt+Left'))) |
1464 QCoreApplication.translate('ViewManager', 'Alt+Left'))) |
1446 else: |
1465 else: |
1447 act.setShortcut(QKeySequence( |
1466 act.setShortcut(QKeySequence( |
1448 QApplication.translate('ViewManager', 'Ctrl+Left'))) |
1467 QCoreApplication.translate('ViewManager', 'Ctrl+Left'))) |
1449 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFT) |
1468 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFT) |
1450 act.triggered.connect(self.esm.map) |
1469 act.triggered.connect(self.esm.map) |
1451 self.editActions.append(act) |
1470 self.editActions.append(act) |
1452 |
1471 |
1453 act = E5Action( |
1472 act = E5Action( |
1454 QApplication.translate('ViewManager', 'Move right one word'), |
1473 QCoreApplication.translate('ViewManager', 'Move right one word'), |
1455 QApplication.translate('ViewManager', 'Move right one word'), |
1474 QCoreApplication.translate('ViewManager', 'Move right one word'), |
1456 0, 0, |
1475 0, 0, |
1457 self.editorActGrp, 'vm_edit_move_right_word') |
1476 self.editorActGrp, 'vm_edit_move_right_word') |
1458 if not isMacPlatform(): |
1477 if not isMacPlatform(): |
1459 act.setShortcut(QKeySequence( |
1478 act.setShortcut(QKeySequence( |
1460 QApplication.translate('ViewManager', 'Ctrl+Right'))) |
1479 QCoreApplication.translate('ViewManager', 'Ctrl+Right'))) |
1461 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT) |
1480 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT) |
1462 act.triggered.connect(self.esm.map) |
1481 act.triggered.connect(self.esm.map) |
1463 self.editActions.append(act) |
1482 self.editActions.append(act) |
1464 |
1483 |
1465 act = E5Action( |
1484 act = E5Action( |
1466 QApplication.translate( |
1485 QCoreApplication.translate( |
1467 'ViewManager', |
1486 'ViewManager', |
1468 'Move to first visible character in document line'), |
1487 'Move to first visible character in document line'), |
1469 QApplication.translate( |
1488 QCoreApplication.translate( |
1470 'ViewManager', |
1489 'ViewManager', |
1471 'Move to first visible character in document line'), |
1490 'Move to first visible character in document line'), |
1472 0, 0, |
1491 0, 0, |
1473 self.editorActGrp, 'vm_edit_move_first_visible_char') |
1492 self.editorActGrp, 'vm_edit_move_first_visible_char') |
1474 if not isMacPlatform(): |
1493 if not isMacPlatform(): |
1475 act.setShortcut(QKeySequence( |
1494 act.setShortcut(QKeySequence( |
1476 QApplication.translate('ViewManager', 'Home'))) |
1495 QCoreApplication.translate('ViewManager', 'Home'))) |
1477 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME) |
1496 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME) |
1478 act.triggered.connect(self.esm.map) |
1497 act.triggered.connect(self.esm.map) |
1479 self.editActions.append(act) |
1498 self.editActions.append(act) |
1480 |
1499 |
1481 act = E5Action( |
1500 act = E5Action( |
1482 QApplication.translate( |
1501 QCoreApplication.translate( |
1483 'ViewManager', 'Move to start of display line'), |
1502 'ViewManager', 'Move to start of display line'), |
1484 QApplication.translate( |
1503 QCoreApplication.translate( |
1485 'ViewManager', 'Move to start of display line'), |
1504 'ViewManager', 'Move to start of display line'), |
1486 0, 0, |
1505 0, 0, |
1487 self.editorActGrp, 'vm_edit_move_start_line') |
1506 self.editorActGrp, 'vm_edit_move_start_line') |
1488 if isMacPlatform(): |
1507 if isMacPlatform(): |
1489 act.setShortcut(QKeySequence( |
1508 act.setShortcut(QKeySequence( |
1490 QApplication.translate('ViewManager', 'Ctrl+Left'))) |
1509 QCoreApplication.translate('ViewManager', 'Ctrl+Left'))) |
1491 else: |
1510 else: |
1492 act.setShortcut(QKeySequence( |
1511 act.setShortcut(QKeySequence( |
1493 QApplication.translate('ViewManager', 'Alt+Home'))) |
1512 QCoreApplication.translate('ViewManager', 'Alt+Home'))) |
1494 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAY) |
1513 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAY) |
1495 act.triggered.connect(self.esm.map) |
1514 act.triggered.connect(self.esm.map) |
1496 self.editActions.append(act) |
1515 self.editActions.append(act) |
1497 |
1516 |
1498 act = E5Action( |
1517 act = E5Action( |
1499 QApplication.translate( |
1518 QCoreApplication.translate( |
1500 'ViewManager', 'Move to end of document line'), |
1519 'ViewManager', 'Move to end of document line'), |
1501 QApplication.translate( |
1520 QCoreApplication.translate( |
1502 'ViewManager', 'Move to end of document line'), |
1521 'ViewManager', 'Move to end of document line'), |
1503 0, 0, |
1522 0, 0, |
1504 self.editorActGrp, 'vm_edit_move_end_line') |
1523 self.editorActGrp, 'vm_edit_move_end_line') |
1505 if isMacPlatform(): |
1524 if isMacPlatform(): |
1506 act.setShortcut(QKeySequence( |
1525 act.setShortcut(QKeySequence( |
1507 QApplication.translate('ViewManager', 'Meta+E'))) |
1526 QCoreApplication.translate('ViewManager', 'Meta+E'))) |
1508 else: |
1527 else: |
1509 act.setShortcut(QKeySequence( |
1528 act.setShortcut(QKeySequence( |
1510 QApplication.translate('ViewManager', 'End'))) |
1529 QCoreApplication.translate('ViewManager', 'End'))) |
1511 self.esm.setMapping(act, QsciScintilla.SCI_LINEEND) |
1530 self.esm.setMapping(act, QsciScintilla.SCI_LINEEND) |
1512 act.triggered.connect(self.esm.map) |
1531 act.triggered.connect(self.esm.map) |
1513 self.editActions.append(act) |
1532 self.editActions.append(act) |
1514 |
1533 |
1515 act = E5Action( |
1534 act = E5Action( |
1516 QApplication.translate('ViewManager', 'Scroll view down one line'), |
1535 QCoreApplication.translate('ViewManager', |
1517 QApplication.translate('ViewManager', 'Scroll view down one line'), |
1536 'Scroll view down one line'), |
1518 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Down')), |
1537 QCoreApplication.translate('ViewManager', |
1519 0, |
1538 'Scroll view down one line'), |
1520 self.editorActGrp, 'vm_edit_scroll_down_line') |
1539 QKeySequence(QCoreApplication.translate('ViewManager', |
|
1540 'Ctrl+Down')), |
|
1541 0, self.editorActGrp, 'vm_edit_scroll_down_line') |
1521 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLDOWN) |
1542 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLDOWN) |
1522 act.triggered.connect(self.esm.map) |
1543 act.triggered.connect(self.esm.map) |
1523 self.editActions.append(act) |
1544 self.editActions.append(act) |
1524 |
1545 |
1525 act = E5Action( |
1546 act = E5Action( |
1526 QApplication.translate('ViewManager', 'Scroll view up one line'), |
1547 QCoreApplication.translate('ViewManager', |
1527 QApplication.translate('ViewManager', 'Scroll view up one line'), |
1548 'Scroll view up one line'), |
1528 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Up')), 0, |
1549 QCoreApplication.translate('ViewManager', |
1529 self.editorActGrp, 'vm_edit_scroll_up_line') |
1550 'Scroll view up one line'), |
|
1551 QKeySequence(QCoreApplication.translate('ViewManager', 'Ctrl+Up')), |
|
1552 0, self.editorActGrp, 'vm_edit_scroll_up_line') |
1530 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLUP) |
1553 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLUP) |
1531 act.triggered.connect(self.esm.map) |
1554 act.triggered.connect(self.esm.map) |
1532 self.editActions.append(act) |
1555 self.editActions.append(act) |
1533 |
1556 |
1534 act = E5Action( |
1557 act = E5Action( |
1535 QApplication.translate('ViewManager', 'Move up one paragraph'), |
1558 QCoreApplication.translate('ViewManager', 'Move up one paragraph'), |
1536 QApplication.translate('ViewManager', 'Move up one paragraph'), |
1559 QCoreApplication.translate('ViewManager', 'Move up one paragraph'), |
1537 QKeySequence(QApplication.translate('ViewManager', 'Alt+Up')), 0, |
1560 QKeySequence(QCoreApplication.translate('ViewManager', 'Alt+Up')), |
1538 self.editorActGrp, 'vm_edit_move_up_para') |
1561 0, self.editorActGrp, 'vm_edit_move_up_para') |
1539 self.esm.setMapping(act, QsciScintilla.SCI_PARAUP) |
1562 self.esm.setMapping(act, QsciScintilla.SCI_PARAUP) |
1540 act.triggered.connect(self.esm.map) |
1563 act.triggered.connect(self.esm.map) |
1541 self.editActions.append(act) |
1564 self.editActions.append(act) |
1542 |
1565 |
1543 act = E5Action( |
1566 act = E5Action( |
1544 QApplication.translate('ViewManager', 'Move down one paragraph'), |
1567 QCoreApplication.translate('ViewManager', |
1545 QApplication.translate('ViewManager', 'Move down one paragraph'), |
1568 'Move down one paragraph'), |
1546 QKeySequence(QApplication.translate('ViewManager', 'Alt+Down')), 0, |
1569 QCoreApplication.translate('ViewManager', |
1547 self.editorActGrp, 'vm_edit_move_down_para') |
1570 'Move down one paragraph'), |
|
1571 QKeySequence(QCoreApplication.translate('ViewManager', |
|
1572 'Alt+Down')), |
|
1573 0, self.editorActGrp, 'vm_edit_move_down_para') |
1548 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWN) |
1574 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWN) |
1549 act.triggered.connect(self.esm.map) |
1575 act.triggered.connect(self.esm.map) |
1550 self.editActions.append(act) |
1576 self.editActions.append(act) |
1551 |
1577 |
1552 act = E5Action( |
1578 act = E5Action( |
1553 QApplication.translate('ViewManager', 'Move up one page'), |
1579 QCoreApplication.translate('ViewManager', 'Move up one page'), |
1554 QApplication.translate('ViewManager', 'Move up one page'), |
1580 QCoreApplication.translate('ViewManager', 'Move up one page'), |
1555 QKeySequence(QApplication.translate('ViewManager', 'PgUp')), 0, |
1581 QKeySequence(QCoreApplication.translate('ViewManager', 'PgUp')), 0, |
1556 self.editorActGrp, 'vm_edit_move_up_page') |
1582 self.editorActGrp, 'vm_edit_move_up_page') |
1557 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUP) |
1583 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUP) |
1558 act.triggered.connect(self.esm.map) |
1584 act.triggered.connect(self.esm.map) |
1559 self.editActions.append(act) |
1585 self.editActions.append(act) |
1560 |
1586 |
1561 act = E5Action( |
1587 act = E5Action( |
1562 QApplication.translate('ViewManager', 'Move down one page'), |
1588 QCoreApplication.translate('ViewManager', 'Move down one page'), |
1563 QApplication.translate('ViewManager', 'Move down one page'), |
1589 QCoreApplication.translate('ViewManager', 'Move down one page'), |
1564 QKeySequence(QApplication.translate('ViewManager', 'PgDown')), 0, |
1590 QKeySequence(QCoreApplication.translate('ViewManager', 'PgDown')), |
1565 self.editorActGrp, 'vm_edit_move_down_page') |
1591 0, self.editorActGrp, 'vm_edit_move_down_page') |
1566 if isMacPlatform(): |
1592 if isMacPlatform(): |
1567 act.setAlternateShortcut(QKeySequence( |
1593 act.setAlternateShortcut(QKeySequence( |
1568 QApplication.translate('ViewManager', 'Meta+V'))) |
1594 QCoreApplication.translate('ViewManager', 'Meta+V'))) |
1569 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWN) |
1595 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWN) |
1570 act.triggered.connect(self.esm.map) |
1596 act.triggered.connect(self.esm.map) |
1571 self.editActions.append(act) |
1597 self.editActions.append(act) |
1572 |
1598 |
1573 act = E5Action( |
1599 act = E5Action( |
1574 QApplication.translate('ViewManager', 'Move to start of document'), |
1600 QCoreApplication.translate('ViewManager', |
1575 QApplication.translate('ViewManager', 'Move to start of document'), |
1601 'Move to start of document'), |
|
1602 QCoreApplication.translate('ViewManager', |
|
1603 'Move to start of document'), |
1576 0, 0, |
1604 0, 0, |
1577 self.editorActGrp, 'vm_edit_move_start_text') |
1605 self.editorActGrp, 'vm_edit_move_start_text') |
1578 if isMacPlatform(): |
1606 if isMacPlatform(): |
1579 act.setShortcut(QKeySequence( |
1607 act.setShortcut(QKeySequence( |
1580 QApplication.translate('ViewManager', 'Ctrl+Up'))) |
1608 QCoreApplication.translate('ViewManager', 'Ctrl+Up'))) |
1581 else: |
1609 else: |
1582 act.setShortcut(QKeySequence( |
1610 act.setShortcut(QKeySequence( |
1583 QApplication.translate('ViewManager', 'Ctrl+Home'))) |
1611 QCoreApplication.translate('ViewManager', 'Ctrl+Home'))) |
1584 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTART) |
1612 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTART) |
1585 act.triggered.connect(self.esm.map) |
1613 act.triggered.connect(self.esm.map) |
1586 self.editActions.append(act) |
1614 self.editActions.append(act) |
1587 |
1615 |
1588 act = E5Action( |
1616 act = E5Action( |
1589 QApplication.translate('ViewManager', 'Move to end of document'), |
1617 QCoreApplication.translate('ViewManager', |
1590 QApplication.translate('ViewManager', 'Move to end of document'), |
1618 'Move to end of document'), |
|
1619 QCoreApplication.translate('ViewManager', |
|
1620 'Move to end of document'), |
1591 0, 0, |
1621 0, 0, |
1592 self.editorActGrp, 'vm_edit_move_end_text') |
1622 self.editorActGrp, 'vm_edit_move_end_text') |
1593 if isMacPlatform(): |
1623 if isMacPlatform(): |
1594 act.setShortcut(QKeySequence( |
1624 act.setShortcut(QKeySequence( |
1595 QApplication.translate('ViewManager', 'Ctrl+Down'))) |
1625 QCoreApplication.translate('ViewManager', 'Ctrl+Down'))) |
1596 else: |
1626 else: |
1597 act.setShortcut(QKeySequence( |
1627 act.setShortcut(QKeySequence( |
1598 QApplication.translate('ViewManager', 'Ctrl+End'))) |
1628 QCoreApplication.translate('ViewManager', 'Ctrl+End'))) |
1599 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTEND) |
1629 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTEND) |
1600 act.triggered.connect(self.esm.map) |
1630 act.triggered.connect(self.esm.map) |
1601 self.editActions.append(act) |
1631 self.editActions.append(act) |
1602 |
1632 |
1603 act = E5Action( |
1633 act = E5Action( |
1604 QApplication.translate('ViewManager', 'Indent one level'), |
1634 QCoreApplication.translate('ViewManager', 'Indent one level'), |
1605 QApplication.translate('ViewManager', 'Indent one level'), |
1635 QCoreApplication.translate('ViewManager', 'Indent one level'), |
1606 QKeySequence(QApplication.translate('ViewManager', 'Tab')), 0, |
1636 QKeySequence(QCoreApplication.translate('ViewManager', 'Tab')), 0, |
1607 self.editorActGrp, 'vm_edit_indent_one_level') |
1637 self.editorActGrp, 'vm_edit_indent_one_level') |
1608 self.esm.setMapping(act, QsciScintilla.SCI_TAB) |
1638 self.esm.setMapping(act, QsciScintilla.SCI_TAB) |
1609 act.triggered.connect(self.esm.map) |
1639 act.triggered.connect(self.esm.map) |
1610 self.editActions.append(act) |
1640 self.editActions.append(act) |
1611 |
1641 |
1612 act = E5Action( |
1642 act = E5Action( |
1613 QApplication.translate('ViewManager', 'Unindent one level'), |
1643 QCoreApplication.translate('ViewManager', 'Unindent one level'), |
1614 QApplication.translate('ViewManager', 'Unindent one level'), |
1644 QCoreApplication.translate('ViewManager', 'Unindent one level'), |
1615 QKeySequence(QApplication.translate('ViewManager', 'Shift+Tab')), |
1645 QKeySequence(QCoreApplication.translate('ViewManager', |
1616 0, |
1646 'Shift+Tab')), |
1617 self.editorActGrp, 'vm_edit_unindent_one_level') |
1647 0, self.editorActGrp, 'vm_edit_unindent_one_level') |
1618 self.esm.setMapping(act, QsciScintilla.SCI_BACKTAB) |
1648 self.esm.setMapping(act, QsciScintilla.SCI_BACKTAB) |
1619 act.triggered.connect(self.esm.map) |
1649 act.triggered.connect(self.esm.map) |
1620 self.editActions.append(act) |
1650 self.editActions.append(act) |
1621 |
1651 |
1622 act = E5Action( |
1652 act = E5Action( |
1623 QApplication.translate( |
1653 QCoreApplication.translate( |
1624 'ViewManager', 'Extend selection left one character'), |
1654 'ViewManager', 'Extend selection left one character'), |
1625 QApplication.translate( |
1655 QCoreApplication.translate( |
1626 'ViewManager', 'Extend selection left one character'), |
1656 'ViewManager', 'Extend selection left one character'), |
1627 QKeySequence(QApplication.translate('ViewManager', 'Shift+Left')), |
1657 QKeySequence(QCoreApplication.translate('ViewManager', |
1628 0, |
1658 'Shift+Left')), |
1629 self.editorActGrp, 'vm_edit_extend_selection_left_char') |
1659 0, self.editorActGrp, 'vm_edit_extend_selection_left_char') |
1630 if isMacPlatform(): |
1660 if isMacPlatform(): |
1631 act.setAlternateShortcut(QKeySequence( |
1661 act.setAlternateShortcut(QKeySequence( |
1632 QApplication.translate('ViewManager', 'Meta+Shift+B'))) |
1662 QCoreApplication.translate('ViewManager', 'Meta+Shift+B'))) |
1633 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTEXTEND) |
1663 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTEXTEND) |
1634 act.triggered.connect(self.esm.map) |
1664 act.triggered.connect(self.esm.map) |
1635 self.editActions.append(act) |
1665 self.editActions.append(act) |
1636 |
1666 |
1637 act = E5Action( |
1667 act = E5Action( |
1638 QApplication.translate( |
1668 QCoreApplication.translate( |
1639 'ViewManager', 'Extend selection right one character'), |
1669 'ViewManager', 'Extend selection right one character'), |
1640 QApplication.translate( |
1670 QCoreApplication.translate( |
1641 'ViewManager', 'Extend selection right one character'), |
1671 'ViewManager', 'Extend selection right one character'), |
1642 QKeySequence(QApplication.translate('ViewManager', 'Shift+Right')), |
1672 QKeySequence(QCoreApplication.translate('ViewManager', |
1643 0, |
1673 'Shift+Right')), |
1644 self.editorActGrp, 'vm_edit_extend_selection_right_char') |
1674 0, self.editorActGrp, 'vm_edit_extend_selection_right_char') |
1645 if isMacPlatform(): |
1675 if isMacPlatform(): |
1646 act.setAlternateShortcut(QKeySequence( |
1676 act.setAlternateShortcut(QKeySequence( |
1647 QApplication.translate('ViewManager', 'Meta+Shift+F'))) |
1677 QCoreApplication.translate('ViewManager', 'Meta+Shift+F'))) |
1648 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTEXTEND) |
1678 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTEXTEND) |
1649 act.triggered.connect(self.esm.map) |
1679 act.triggered.connect(self.esm.map) |
1650 self.editActions.append(act) |
1680 self.editActions.append(act) |
1651 |
1681 |
1652 act = E5Action( |
1682 act = E5Action( |
1653 QApplication.translate( |
1683 QCoreApplication.translate( |
1654 'ViewManager', 'Extend selection up one line'), |
1684 'ViewManager', 'Extend selection up one line'), |
1655 QApplication.translate( |
1685 QCoreApplication.translate( |
1656 'ViewManager', 'Extend selection up one line'), |
1686 'ViewManager', 'Extend selection up one line'), |
1657 QKeySequence(QApplication.translate('ViewManager', 'Shift+Up')), 0, |
1687 QKeySequence(QCoreApplication.translate('ViewManager', |
1658 self.editorActGrp, 'vm_edit_extend_selection_up_line') |
1688 'Shift+Up')), |
|
1689 0, self.editorActGrp, 'vm_edit_extend_selection_up_line') |
1659 if isMacPlatform(): |
1690 if isMacPlatform(): |
1660 act.setAlternateShortcut(QKeySequence( |
1691 act.setAlternateShortcut(QKeySequence( |
1661 QApplication.translate('ViewManager', 'Meta+Shift+P'))) |
1692 QCoreApplication.translate('ViewManager', 'Meta+Shift+P'))) |
1662 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPEXTEND) |
1693 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPEXTEND) |
1663 act.triggered.connect(self.esm.map) |
1694 act.triggered.connect(self.esm.map) |
1664 self.editActions.append(act) |
1695 self.editActions.append(act) |
1665 |
1696 |
1666 act = E5Action( |
1697 act = E5Action( |
1667 QApplication.translate( |
1698 QCoreApplication.translate( |
1668 'ViewManager', 'Extend selection down one line'), |
1699 'ViewManager', 'Extend selection down one line'), |
1669 QApplication.translate( |
1700 QCoreApplication.translate( |
1670 'ViewManager', 'Extend selection down one line'), |
1701 'ViewManager', 'Extend selection down one line'), |
1671 QKeySequence(QApplication.translate('ViewManager', 'Shift+Down')), |
1702 QKeySequence(QCoreApplication.translate('ViewManager', |
1672 0, |
1703 'Shift+Down')), |
1673 self.editorActGrp, 'vm_edit_extend_selection_down_line') |
1704 0, self.editorActGrp, 'vm_edit_extend_selection_down_line') |
1674 if isMacPlatform(): |
1705 if isMacPlatform(): |
1675 act.setAlternateShortcut(QKeySequence( |
1706 act.setAlternateShortcut(QKeySequence( |
1676 QApplication.translate('ViewManager', 'Meta+Shift+N'))) |
1707 QCoreApplication.translate('ViewManager', 'Meta+Shift+N'))) |
1677 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNEXTEND) |
1708 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNEXTEND) |
1678 act.triggered.connect(self.esm.map) |
1709 act.triggered.connect(self.esm.map) |
1679 self.editActions.append(act) |
1710 self.editActions.append(act) |
1680 |
1711 |
1681 act = E5Action( |
1712 act = E5Action( |
1682 QApplication.translate( |
1713 QCoreApplication.translate( |
1683 'ViewManager', 'Extend selection left one word part'), |
1714 'ViewManager', 'Extend selection left one word part'), |
1684 QApplication.translate( |
1715 QCoreApplication.translate( |
1685 'ViewManager', 'Extend selection left one word part'), |
1716 'ViewManager', 'Extend selection left one word part'), |
1686 0, 0, |
1717 0, 0, |
1687 self.editorActGrp, 'vm_edit_extend_selection_left_word_part') |
1718 self.editorActGrp, 'vm_edit_extend_selection_left_word_part') |
1688 if not isMacPlatform(): |
1719 if not isMacPlatform(): |
1689 act.setShortcut(QKeySequence( |
1720 act.setShortcut(QKeySequence( |
1690 QApplication.translate('ViewManager', 'Alt+Shift+Left'))) |
1721 QCoreApplication.translate('ViewManager', 'Alt+Shift+Left'))) |
1691 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFTEXTEND) |
1722 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFTEXTEND) |
1692 act.triggered.connect(self.esm.map) |
1723 act.triggered.connect(self.esm.map) |
1693 self.editActions.append(act) |
1724 self.editActions.append(act) |
1694 |
1725 |
1695 act = E5Action( |
1726 act = E5Action( |
1696 QApplication.translate( |
1727 QCoreApplication.translate( |
1697 'ViewManager', 'Extend selection right one word part'), |
1728 'ViewManager', 'Extend selection right one word part'), |
1698 QApplication.translate( |
1729 QCoreApplication.translate( |
1699 'ViewManager', 'Extend selection right one word part'), |
1730 'ViewManager', 'Extend selection right one word part'), |
1700 0, 0, |
1731 0, 0, |
1701 self.editorActGrp, 'vm_edit_extend_selection_right_word_part') |
1732 self.editorActGrp, 'vm_edit_extend_selection_right_word_part') |
1702 if not isMacPlatform(): |
1733 if not isMacPlatform(): |
1703 act.setShortcut(QKeySequence( |
1734 act.setShortcut(QKeySequence( |
1704 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
1735 QCoreApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
1705 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND) |
1736 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND) |
1706 act.triggered.connect(self.esm.map) |
1737 act.triggered.connect(self.esm.map) |
1707 self.editActions.append(act) |
1738 self.editActions.append(act) |
1708 |
1739 |
1709 act = E5Action( |
1740 act = E5Action( |
1710 QApplication.translate( |
1741 QCoreApplication.translate( |
1711 'ViewManager', 'Extend selection left one word'), |
1742 'ViewManager', 'Extend selection left one word'), |
1712 QApplication.translate( |
1743 QCoreApplication.translate( |
1713 'ViewManager', 'Extend selection left one word'), |
1744 'ViewManager', 'Extend selection left one word'), |
1714 0, 0, |
1745 0, 0, |
1715 self.editorActGrp, 'vm_edit_extend_selection_left_word') |
1746 self.editorActGrp, 'vm_edit_extend_selection_left_word') |
1716 if isMacPlatform(): |
1747 if isMacPlatform(): |
1717 act.setShortcut(QKeySequence( |
1748 act.setShortcut(QKeySequence( |
1718 QApplication.translate('ViewManager', 'Alt+Shift+Left'))) |
1749 QCoreApplication.translate('ViewManager', 'Alt+Shift+Left'))) |
1719 else: |
1750 else: |
1720 act.setShortcut(QKeySequence( |
1751 act.setShortcut(QKeySequence( |
1721 QApplication.translate('ViewManager', 'Ctrl+Shift+Left'))) |
1752 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Left'))) |
1722 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEXTEND) |
1753 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEXTEND) |
1723 act.triggered.connect(self.esm.map) |
1754 act.triggered.connect(self.esm.map) |
1724 self.editActions.append(act) |
1755 self.editActions.append(act) |
1725 |
1756 |
1726 act = E5Action( |
1757 act = E5Action( |
1727 QApplication.translate( |
1758 QCoreApplication.translate( |
1728 'ViewManager', 'Extend selection right one word'), |
1759 'ViewManager', 'Extend selection right one word'), |
1729 QApplication.translate( |
1760 QCoreApplication.translate( |
1730 'ViewManager', 'Extend selection right one word'), |
1761 'ViewManager', 'Extend selection right one word'), |
1731 0, 0, |
1762 0, 0, |
1732 self.editorActGrp, 'vm_edit_extend_selection_right_word') |
1763 self.editorActGrp, 'vm_edit_extend_selection_right_word') |
1733 if isMacPlatform(): |
1764 if isMacPlatform(): |
1734 act.setShortcut(QKeySequence( |
1765 act.setShortcut(QKeySequence( |
1735 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
1766 QCoreApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
1736 else: |
1767 else: |
1737 act.setShortcut(QKeySequence( |
1768 act.setShortcut(QKeySequence( |
1738 QApplication.translate('ViewManager', 'Ctrl+Shift+Right'))) |
1769 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Right'))) |
1739 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEXTEND) |
1770 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEXTEND) |
1740 act.triggered.connect(self.esm.map) |
1771 act.triggered.connect(self.esm.map) |
1741 self.editActions.append(act) |
1772 self.editActions.append(act) |
1742 |
1773 |
1743 act = E5Action( |
1774 act = E5Action( |
1744 QApplication.translate( |
1775 QCoreApplication.translate( |
1745 'ViewManager', |
1776 'ViewManager', |
1746 'Extend selection to first visible character in document' |
1777 'Extend selection to first visible character in document' |
1747 ' line'), |
1778 ' line'), |
1748 QApplication.translate( |
1779 QCoreApplication.translate( |
1749 'ViewManager', |
1780 'ViewManager', |
1750 'Extend selection to first visible character in document' |
1781 'Extend selection to first visible character in document' |
1751 ' line'), |
1782 ' line'), |
1752 0, 0, |
1783 0, 0, |
1753 self.editorActGrp, 'vm_edit_extend_selection_first_visible_char') |
1784 self.editorActGrp, 'vm_edit_extend_selection_first_visible_char') |
1754 if not isMacPlatform(): |
1785 if not isMacPlatform(): |
1755 act.setShortcut(QKeySequence( |
1786 act.setShortcut(QKeySequence( |
1756 QApplication.translate('ViewManager', 'Shift+Home'))) |
1787 QCoreApplication.translate('ViewManager', 'Shift+Home'))) |
1757 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEEXTEND) |
1788 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEEXTEND) |
1758 act.triggered.connect(self.esm.map) |
1789 act.triggered.connect(self.esm.map) |
1759 self.editActions.append(act) |
1790 self.editActions.append(act) |
1760 |
1791 |
1761 act = E5Action( |
1792 act = E5Action( |
1762 QApplication.translate( |
1793 QCoreApplication.translate( |
1763 'ViewManager', 'Extend selection to end of document line'), |
1794 'ViewManager', 'Extend selection to end of document line'), |
1764 QApplication.translate( |
1795 QCoreApplication.translate( |
1765 'ViewManager', 'Extend selection to end of document line'), |
1796 'ViewManager', 'Extend selection to end of document line'), |
1766 0, 0, |
1797 0, 0, |
1767 self.editorActGrp, 'vm_edit_extend_selection_end_line') |
1798 self.editorActGrp, 'vm_edit_extend_selection_end_line') |
1768 if isMacPlatform(): |
1799 if isMacPlatform(): |
1769 act.setShortcut(QKeySequence( |
1800 act.setShortcut(QKeySequence( |
1770 QApplication.translate('ViewManager', 'Meta+Shift+E'))) |
1801 QCoreApplication.translate('ViewManager', 'Meta+Shift+E'))) |
1771 else: |
1802 else: |
1772 act.setShortcut(QKeySequence( |
1803 act.setShortcut(QKeySequence( |
1773 QApplication.translate('ViewManager', 'Shift+End'))) |
1804 QCoreApplication.translate('ViewManager', 'Shift+End'))) |
1774 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDEXTEND) |
1805 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDEXTEND) |
1775 act.triggered.connect(self.esm.map) |
1806 act.triggered.connect(self.esm.map) |
1776 self.editActions.append(act) |
1807 self.editActions.append(act) |
1777 |
1808 |
1778 act = E5Action( |
1809 act = E5Action( |
1779 QApplication.translate( |
1810 QCoreApplication.translate( |
1780 'ViewManager', 'Extend selection up one paragraph'), |
1811 'ViewManager', 'Extend selection up one paragraph'), |
1781 QApplication.translate( |
1812 QCoreApplication.translate( |
1782 'ViewManager', 'Extend selection up one paragraph'), |
1813 'ViewManager', 'Extend selection up one paragraph'), |
1783 QKeySequence(QApplication.translate( |
1814 QKeySequence(QCoreApplication.translate( |
1784 'ViewManager', 'Alt+Shift+Up')), |
1815 'ViewManager', 'Alt+Shift+Up')), |
1785 0, |
1816 0, |
1786 self.editorActGrp, 'vm_edit_extend_selection_up_para') |
1817 self.editorActGrp, 'vm_edit_extend_selection_up_para') |
1787 self.esm.setMapping(act, QsciScintilla.SCI_PARAUPEXTEND) |
1818 self.esm.setMapping(act, QsciScintilla.SCI_PARAUPEXTEND) |
1788 act.triggered.connect(self.esm.map) |
1819 act.triggered.connect(self.esm.map) |
1789 self.editActions.append(act) |
1820 self.editActions.append(act) |
1790 |
1821 |
1791 act = E5Action( |
1822 act = E5Action( |
1792 QApplication.translate( |
1823 QCoreApplication.translate( |
1793 'ViewManager', 'Extend selection down one paragraph'), |
1824 'ViewManager', 'Extend selection down one paragraph'), |
1794 QApplication.translate( |
1825 QCoreApplication.translate( |
1795 'ViewManager', 'Extend selection down one paragraph'), |
1826 'ViewManager', 'Extend selection down one paragraph'), |
1796 QKeySequence(QApplication.translate( |
1827 QKeySequence(QCoreApplication.translate( |
1797 'ViewManager', 'Alt+Shift+Down')), |
1828 'ViewManager', 'Alt+Shift+Down')), |
1798 0, |
1829 0, |
1799 self.editorActGrp, 'vm_edit_extend_selection_down_para') |
1830 self.editorActGrp, 'vm_edit_extend_selection_down_para') |
1800 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWNEXTEND) |
1831 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWNEXTEND) |
1801 act.triggered.connect(self.esm.map) |
1832 act.triggered.connect(self.esm.map) |
1802 self.editActions.append(act) |
1833 self.editActions.append(act) |
1803 |
1834 |
1804 act = E5Action( |
1835 act = E5Action( |
1805 QApplication.translate( |
1836 QCoreApplication.translate( |
1806 'ViewManager', 'Extend selection up one page'), |
1837 'ViewManager', 'Extend selection up one page'), |
1807 QApplication.translate( |
1838 QCoreApplication.translate( |
1808 'ViewManager', 'Extend selection up one page'), |
1839 'ViewManager', 'Extend selection up one page'), |
1809 QKeySequence(QApplication.translate('ViewManager', 'Shift+PgUp')), |
1840 QKeySequence(QCoreApplication.translate('ViewManager', |
1810 0, |
1841 'Shift+PgUp')), |
1811 self.editorActGrp, 'vm_edit_extend_selection_up_page') |
1842 0, self.editorActGrp, 'vm_edit_extend_selection_up_page') |
1812 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPEXTEND) |
1843 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPEXTEND) |
1813 act.triggered.connect(self.esm.map) |
1844 act.triggered.connect(self.esm.map) |
1814 self.editActions.append(act) |
1845 self.editActions.append(act) |
1815 |
1846 |
1816 act = E5Action( |
1847 act = E5Action( |
1817 QApplication.translate( |
1848 QCoreApplication.translate( |
1818 'ViewManager', 'Extend selection down one page'), |
1849 'ViewManager', 'Extend selection down one page'), |
1819 QApplication.translate( |
1850 QCoreApplication.translate( |
1820 'ViewManager', 'Extend selection down one page'), |
1851 'ViewManager', 'Extend selection down one page'), |
1821 QKeySequence(QApplication.translate( |
1852 QKeySequence(QCoreApplication.translate( |
1822 'ViewManager', 'Shift+PgDown')), |
1853 'ViewManager', 'Shift+PgDown')), |
1823 0, |
1854 0, |
1824 self.editorActGrp, 'vm_edit_extend_selection_down_page') |
1855 self.editorActGrp, 'vm_edit_extend_selection_down_page') |
1825 if isMacPlatform(): |
1856 if isMacPlatform(): |
1826 act.setAlternateShortcut(QKeySequence( |
1857 act.setAlternateShortcut(QKeySequence( |
1827 QApplication.translate('ViewManager', 'Meta+Shift+V'))) |
1858 QCoreApplication.translate('ViewManager', 'Meta+Shift+V'))) |
1828 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNEXTEND) |
1859 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNEXTEND) |
1829 act.triggered.connect(self.esm.map) |
1860 act.triggered.connect(self.esm.map) |
1830 self.editActions.append(act) |
1861 self.editActions.append(act) |
1831 |
1862 |
1832 act = E5Action( |
1863 act = E5Action( |
1833 QApplication.translate( |
1864 QCoreApplication.translate( |
1834 'ViewManager', 'Extend selection to start of document'), |
1865 'ViewManager', 'Extend selection to start of document'), |
1835 QApplication.translate( |
1866 QCoreApplication.translate( |
1836 'ViewManager', 'Extend selection to start of document'), |
1867 'ViewManager', 'Extend selection to start of document'), |
1837 0, 0, |
1868 0, 0, |
1838 self.editorActGrp, 'vm_edit_extend_selection_start_text') |
1869 self.editorActGrp, 'vm_edit_extend_selection_start_text') |
1839 if isMacPlatform(): |
1870 if isMacPlatform(): |
1840 act.setShortcut(QKeySequence( |
1871 act.setShortcut(QKeySequence( |
1841 QApplication.translate('ViewManager', 'Ctrl+Shift+Up'))) |
1872 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Up'))) |
1842 else: |
1873 else: |
1843 act.setShortcut(QKeySequence( |
1874 act.setShortcut(QKeySequence( |
1844 QApplication.translate('ViewManager', 'Ctrl+Shift+Home'))) |
1875 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Home'))) |
1845 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTARTEXTEND) |
1876 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTARTEXTEND) |
1846 act.triggered.connect(self.esm.map) |
1877 act.triggered.connect(self.esm.map) |
1847 self.editActions.append(act) |
1878 self.editActions.append(act) |
1848 |
1879 |
1849 act = E5Action( |
1880 act = E5Action( |
1850 QApplication.translate( |
1881 QCoreApplication.translate( |
1851 'ViewManager', 'Extend selection to end of document'), |
1882 'ViewManager', 'Extend selection to end of document'), |
1852 QApplication.translate( |
1883 QCoreApplication.translate( |
1853 'ViewManager', 'Extend selection to end of document'), |
1884 'ViewManager', 'Extend selection to end of document'), |
1854 0, 0, |
1885 0, 0, |
1855 self.editorActGrp, 'vm_edit_extend_selection_end_text') |
1886 self.editorActGrp, 'vm_edit_extend_selection_end_text') |
1856 if isMacPlatform(): |
1887 if isMacPlatform(): |
1857 act.setShortcut(QKeySequence( |
1888 act.setShortcut(QKeySequence( |
1858 QApplication.translate('ViewManager', 'Ctrl+Shift+Down'))) |
1889 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Down'))) |
1859 else: |
1890 else: |
1860 act.setShortcut(QKeySequence( |
1891 act.setShortcut(QKeySequence( |
1861 QApplication.translate('ViewManager', 'Ctrl+Shift+End'))) |
1892 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+End'))) |
1862 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTENDEXTEND) |
1893 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTENDEXTEND) |
1863 act.triggered.connect(self.esm.map) |
1894 act.triggered.connect(self.esm.map) |
1864 self.editActions.append(act) |
1895 self.editActions.append(act) |
1865 |
1896 |
1866 act = E5Action( |
1897 act = E5Action( |
1867 QApplication.translate('ViewManager', 'Delete previous character'), |
1898 QCoreApplication.translate('ViewManager', |
1868 QApplication.translate('ViewManager', 'Delete previous character'), |
1899 'Delete previous character'), |
1869 QKeySequence(QApplication.translate('ViewManager', 'Backspace')), |
1900 QCoreApplication.translate('ViewManager', |
1870 0, |
1901 'Delete previous character'), |
1871 self.editorActGrp, 'vm_edit_delete_previous_char') |
1902 QKeySequence(QCoreApplication.translate('ViewManager', |
|
1903 'Backspace')), |
|
1904 0, self.editorActGrp, 'vm_edit_delete_previous_char') |
1872 if isMacPlatform(): |
1905 if isMacPlatform(): |
1873 act.setAlternateShortcut(QKeySequence( |
1906 act.setAlternateShortcut(QKeySequence( |
1874 QApplication.translate('ViewManager', 'Meta+H'))) |
1907 QCoreApplication.translate('ViewManager', 'Meta+H'))) |
1875 else: |
1908 else: |
1876 act.setAlternateShortcut(QKeySequence( |
1909 act.setAlternateShortcut(QKeySequence( |
1877 QApplication.translate('ViewManager', 'Shift+Backspace'))) |
1910 QCoreApplication.translate('ViewManager', 'Shift+Backspace'))) |
1878 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACK) |
1911 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACK) |
1879 act.triggered.connect(self.esm.map) |
1912 act.triggered.connect(self.esm.map) |
1880 self.editActions.append(act) |
1913 self.editActions.append(act) |
1881 |
1914 |
1882 act = E5Action( |
1915 act = E5Action( |
1883 QApplication.translate( |
1916 QCoreApplication.translate( |
1884 'ViewManager', |
1917 'ViewManager', |
1885 'Delete previous character if not at start of line'), |
1918 'Delete previous character if not at start of line'), |
1886 QApplication.translate( |
1919 QCoreApplication.translate( |
1887 'ViewManager', |
1920 'ViewManager', |
1888 'Delete previous character if not at start of line'), |
1921 'Delete previous character if not at start of line'), |
1889 0, 0, |
1922 0, 0, |
1890 self.editorActGrp, 'vm_edit_delet_previous_char_not_line_start') |
1923 self.editorActGrp, 'vm_edit_delet_previous_char_not_line_start') |
1891 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACKNOTLINE) |
1924 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACKNOTLINE) |
1892 act.triggered.connect(self.esm.map) |
1925 act.triggered.connect(self.esm.map) |
1893 self.editActions.append(act) |
1926 self.editActions.append(act) |
1894 |
1927 |
1895 act = E5Action( |
1928 act = E5Action( |
1896 QApplication.translate('ViewManager', 'Delete current character'), |
1929 QCoreApplication.translate('ViewManager', |
1897 QApplication.translate('ViewManager', 'Delete current character'), |
1930 'Delete current character'), |
1898 QKeySequence(QApplication.translate('ViewManager', 'Del')), 0, |
1931 QCoreApplication.translate('ViewManager', |
1899 self.editorActGrp, 'vm_edit_delete_current_char') |
1932 'Delete current character'), |
|
1933 QKeySequence(QCoreApplication.translate('ViewManager', 'Del')), |
|
1934 0, self.editorActGrp, 'vm_edit_delete_current_char') |
1900 if isMacPlatform(): |
1935 if isMacPlatform(): |
1901 act.setAlternateShortcut(QKeySequence( |
1936 act.setAlternateShortcut(QKeySequence( |
1902 QApplication.translate('ViewManager', 'Meta+D'))) |
1937 QCoreApplication.translate('ViewManager', 'Meta+D'))) |
1903 self.esm.setMapping(act, QsciScintilla.SCI_CLEAR) |
1938 self.esm.setMapping(act, QsciScintilla.SCI_CLEAR) |
1904 act.triggered.connect(self.esm.map) |
1939 act.triggered.connect(self.esm.map) |
1905 self.editActions.append(act) |
1940 self.editActions.append(act) |
1906 |
1941 |
1907 act = E5Action( |
1942 act = E5Action( |
1908 QApplication.translate('ViewManager', 'Delete word to left'), |
1943 QCoreApplication.translate('ViewManager', 'Delete word to left'), |
1909 QApplication.translate('ViewManager', 'Delete word to left'), |
1944 QCoreApplication.translate('ViewManager', 'Delete word to left'), |
1910 QKeySequence(QApplication.translate( |
1945 QKeySequence(QCoreApplication.translate( |
1911 'ViewManager', 'Ctrl+Backspace')), |
1946 'ViewManager', 'Ctrl+Backspace')), |
1912 0, |
1947 0, |
1913 self.editorActGrp, 'vm_edit_delete_word_left') |
1948 self.editorActGrp, 'vm_edit_delete_word_left') |
1914 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDLEFT) |
1949 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDLEFT) |
1915 act.triggered.connect(self.esm.map) |
1950 act.triggered.connect(self.esm.map) |
1916 self.editActions.append(act) |
1951 self.editActions.append(act) |
1917 |
1952 |
1918 act = E5Action( |
1953 act = E5Action( |
1919 QApplication.translate('ViewManager', 'Delete word to right'), |
1954 QCoreApplication.translate('ViewManager', 'Delete word to right'), |
1920 QApplication.translate('ViewManager', 'Delete word to right'), |
1955 QCoreApplication.translate('ViewManager', 'Delete word to right'), |
1921 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Del')), 0, |
1956 QKeySequence(QCoreApplication.translate('ViewManager', |
1922 self.editorActGrp, 'vm_edit_delete_word_right') |
1957 'Ctrl+Del')), |
|
1958 0, self.editorActGrp, 'vm_edit_delete_word_right') |
1923 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHT) |
1959 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHT) |
1924 act.triggered.connect(self.esm.map) |
1960 act.triggered.connect(self.esm.map) |
1925 self.editActions.append(act) |
1961 self.editActions.append(act) |
1926 |
1962 |
1927 act = E5Action( |
1963 act = E5Action( |
1928 QApplication.translate('ViewManager', 'Delete line to left'), |
1964 QCoreApplication.translate('ViewManager', 'Delete line to left'), |
1929 QApplication.translate('ViewManager', 'Delete line to left'), |
1965 QCoreApplication.translate('ViewManager', 'Delete line to left'), |
1930 QKeySequence(QApplication.translate( |
1966 QKeySequence(QCoreApplication.translate( |
1931 'ViewManager', 'Ctrl+Shift+Backspace')), |
1967 'ViewManager', 'Ctrl+Shift+Backspace')), |
1932 0, |
1968 0, |
1933 self.editorActGrp, 'vm_edit_delete_line_left') |
1969 self.editorActGrp, 'vm_edit_delete_line_left') |
1934 self.esm.setMapping(act, QsciScintilla.SCI_DELLINELEFT) |
1970 self.esm.setMapping(act, QsciScintilla.SCI_DELLINELEFT) |
1935 act.triggered.connect(self.esm.map) |
1971 act.triggered.connect(self.esm.map) |
1936 self.editActions.append(act) |
1972 self.editActions.append(act) |
1937 |
1973 |
1938 act = E5Action( |
1974 act = E5Action( |
1939 QApplication.translate('ViewManager', 'Delete line to right'), |
1975 QCoreApplication.translate('ViewManager', 'Delete line to right'), |
1940 QApplication.translate('ViewManager', 'Delete line to right'), |
1976 QCoreApplication.translate('ViewManager', 'Delete line to right'), |
1941 0, 0, |
1977 0, 0, |
1942 self.editorActGrp, 'vm_edit_delete_line_right') |
1978 self.editorActGrp, 'vm_edit_delete_line_right') |
1943 if isMacPlatform(): |
1979 if isMacPlatform(): |
1944 act.setShortcut(QKeySequence( |
1980 act.setShortcut(QKeySequence( |
1945 QApplication.translate('ViewManager', 'Meta+K'))) |
1981 QCoreApplication.translate('ViewManager', 'Meta+K'))) |
1946 else: |
1982 else: |
1947 act.setShortcut(QKeySequence( |
1983 act.setShortcut(QKeySequence( |
1948 QApplication.translate('ViewManager', 'Ctrl+Shift+Del'))) |
1984 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Del'))) |
1949 self.esm.setMapping(act, QsciScintilla.SCI_DELLINERIGHT) |
1985 self.esm.setMapping(act, QsciScintilla.SCI_DELLINERIGHT) |
1950 act.triggered.connect(self.esm.map) |
1986 act.triggered.connect(self.esm.map) |
1951 self.editActions.append(act) |
1987 self.editActions.append(act) |
1952 |
1988 |
1953 act = E5Action( |
1989 act = E5Action( |
1954 QApplication.translate('ViewManager', 'Insert new line'), |
1990 QCoreApplication.translate('ViewManager', 'Insert new line'), |
1955 QApplication.translate('ViewManager', 'Insert new line'), |
1991 QCoreApplication.translate('ViewManager', 'Insert new line'), |
1956 QKeySequence(QApplication.translate('ViewManager', 'Return')), |
1992 QKeySequence(QCoreApplication.translate('ViewManager', 'Return')), |
1957 QKeySequence(QApplication.translate('ViewManager', 'Enter')), |
1993 QKeySequence(QCoreApplication.translate('ViewManager', 'Enter')), |
1958 self.editorActGrp, 'vm_edit_insert_line') |
1994 self.editorActGrp, 'vm_edit_insert_line') |
1959 self.esm.setMapping(act, QsciScintilla.SCI_NEWLINE) |
1995 self.esm.setMapping(act, QsciScintilla.SCI_NEWLINE) |
1960 act.triggered.connect(self.esm.map) |
1996 act.triggered.connect(self.esm.map) |
1961 self.editActions.append(act) |
1997 self.editActions.append(act) |
1962 |
1998 |
1963 act = E5Action( |
1999 act = E5Action( |
1964 QApplication.translate( |
2000 QCoreApplication.translate( |
1965 'ViewManager', 'Insert new line below current line'), |
2001 'ViewManager', 'Insert new line below current line'), |
1966 QApplication.translate( |
2002 QCoreApplication.translate( |
1967 'ViewManager', 'Insert new line below current line'), |
2003 'ViewManager', 'Insert new line below current line'), |
1968 QKeySequence(QApplication.translate( |
2004 QKeySequence(QCoreApplication.translate( |
1969 'ViewManager', 'Shift+Return')), |
2005 'ViewManager', 'Shift+Return')), |
1970 QKeySequence(QApplication.translate('ViewManager', 'Shift+Enter')), |
2006 QKeySequence(QCoreApplication.translate('ViewManager', |
|
2007 'Shift+Enter')), |
1971 self.editorActGrp, 'vm_edit_insert_line_below') |
2008 self.editorActGrp, 'vm_edit_insert_line_below') |
1972 act.triggered.connect(self.__newLineBelow) |
2009 act.triggered.connect(self.__newLineBelow) |
1973 self.editActions.append(act) |
2010 self.editActions.append(act) |
1974 |
2011 |
1975 act = E5Action( |
2012 act = E5Action( |
1976 QApplication.translate('ViewManager', 'Delete current line'), |
2013 QCoreApplication.translate('ViewManager', 'Delete current line'), |
1977 QApplication.translate('ViewManager', 'Delete current line'), |
2014 QCoreApplication.translate('ViewManager', 'Delete current line'), |
1978 QKeySequence(QApplication.translate( |
2015 QKeySequence(QCoreApplication.translate( |
1979 'ViewManager', 'Ctrl+Shift+L')), |
2016 'ViewManager', 'Ctrl+Shift+L')), |
1980 0, |
2017 0, |
1981 self.editorActGrp, 'vm_edit_delete_current_line') |
2018 self.editorActGrp, 'vm_edit_delete_current_line') |
1982 self.esm.setMapping(act, QsciScintilla.SCI_LINEDELETE) |
2019 self.esm.setMapping(act, QsciScintilla.SCI_LINEDELETE) |
1983 act.triggered.connect(self.esm.map) |
2020 act.triggered.connect(self.esm.map) |
1984 self.editActions.append(act) |
2021 self.editActions.append(act) |
1985 |
2022 |
1986 act = E5Action( |
2023 act = E5Action( |
1987 QApplication.translate('ViewManager', 'Duplicate current line'), |
2024 QCoreApplication.translate( |
1988 QApplication.translate('ViewManager', 'Duplicate current line'), |
2025 'ViewManager', 'Duplicate current line'), |
1989 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+D')), 0, |
2026 QCoreApplication.translate( |
1990 self.editorActGrp, 'vm_edit_duplicate_current_line') |
2027 'ViewManager', 'Duplicate current line'), |
|
2028 QKeySequence(QCoreApplication.translate('ViewManager', 'Ctrl+D')), |
|
2029 0, self.editorActGrp, 'vm_edit_duplicate_current_line') |
1991 self.esm.setMapping(act, QsciScintilla.SCI_LINEDUPLICATE) |
2030 self.esm.setMapping(act, QsciScintilla.SCI_LINEDUPLICATE) |
1992 act.triggered.connect(self.esm.map) |
2031 act.triggered.connect(self.esm.map) |
1993 self.editActions.append(act) |
2032 self.editActions.append(act) |
1994 |
2033 |
1995 act = E5Action( |
2034 act = E5Action( |
1996 QApplication.translate( |
2035 QCoreApplication.translate( |
1997 'ViewManager', 'Swap current and previous lines'), |
2036 'ViewManager', 'Swap current and previous lines'), |
1998 QApplication.translate( |
2037 QCoreApplication.translate( |
1999 'ViewManager', 'Swap current and previous lines'), |
2038 'ViewManager', 'Swap current and previous lines'), |
2000 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+T')), 0, |
2039 QKeySequence(QCoreApplication.translate('ViewManager', 'Ctrl+T')), |
2001 self.editorActGrp, 'vm_edit_swap_current_previous_line') |
2040 0, self.editorActGrp, 'vm_edit_swap_current_previous_line') |
2002 self.esm.setMapping(act, QsciScintilla.SCI_LINETRANSPOSE) |
2041 self.esm.setMapping(act, QsciScintilla.SCI_LINETRANSPOSE) |
2003 act.triggered.connect(self.esm.map) |
2042 act.triggered.connect(self.esm.map) |
2004 self.editActions.append(act) |
2043 self.editActions.append(act) |
2005 |
2044 |
2006 act = E5Action( |
2045 act = E5Action( |
2007 QApplication.translate('ViewManager', 'Cut current line'), |
2046 QCoreApplication.translate('ViewManager', 'Cut current line'), |
2008 QApplication.translate('ViewManager', 'Cut current line'), |
2047 QCoreApplication.translate('ViewManager', 'Cut current line'), |
2009 QKeySequence(QApplication.translate('ViewManager', 'Alt+Shift+L')), |
2048 QKeySequence(QCoreApplication.translate('ViewManager', |
2010 0, |
2049 'Alt+Shift+L')), |
2011 self.editorActGrp, 'vm_edit_cut_current_line') |
2050 0, self.editorActGrp, 'vm_edit_cut_current_line') |
2012 self.esm.setMapping(act, QsciScintilla.SCI_LINECUT) |
2051 self.esm.setMapping(act, QsciScintilla.SCI_LINECUT) |
2013 act.triggered.connect(self.esm.map) |
2052 act.triggered.connect(self.esm.map) |
2014 self.editActions.append(act) |
2053 self.editActions.append(act) |
2015 |
2054 |
2016 act = E5Action( |
2055 act = E5Action( |
2017 QApplication.translate('ViewManager', 'Copy current line'), |
2056 QCoreApplication.translate('ViewManager', 'Copy current line'), |
2018 QApplication.translate('ViewManager', 'Copy current line'), |
2057 QCoreApplication.translate('ViewManager', 'Copy current line'), |
2019 QKeySequence(QApplication.translate( |
2058 QKeySequence(QCoreApplication.translate( |
2020 'ViewManager', 'Ctrl+Shift+T')), |
2059 'ViewManager', 'Ctrl+Shift+T')), |
2021 0, |
2060 0, |
2022 self.editorActGrp, 'vm_edit_copy_current_line') |
2061 self.editorActGrp, 'vm_edit_copy_current_line') |
2023 self.esm.setMapping(act, QsciScintilla.SCI_LINECOPY) |
2062 self.esm.setMapping(act, QsciScintilla.SCI_LINECOPY) |
2024 act.triggered.connect(self.esm.map) |
2063 act.triggered.connect(self.esm.map) |
2025 self.editActions.append(act) |
2064 self.editActions.append(act) |
2026 |
2065 |
2027 act = E5Action( |
2066 act = E5Action( |
2028 QApplication.translate('ViewManager', 'Toggle insert/overtype'), |
2067 QCoreApplication.translate( |
2029 QApplication.translate('ViewManager', 'Toggle insert/overtype'), |
2068 'ViewManager', 'Toggle insert/overtype'), |
2030 QKeySequence(QApplication.translate('ViewManager', 'Ins')), 0, |
2069 QCoreApplication.translate( |
2031 self.editorActGrp, 'vm_edit_toggle_insert_overtype') |
2070 'ViewManager', 'Toggle insert/overtype'), |
|
2071 QKeySequence(QCoreApplication.translate('ViewManager', 'Ins')), |
|
2072 0, self.editorActGrp, 'vm_edit_toggle_insert_overtype') |
2032 self.esm.setMapping(act, QsciScintilla.SCI_EDITTOGGLEOVERTYPE) |
2073 self.esm.setMapping(act, QsciScintilla.SCI_EDITTOGGLEOVERTYPE) |
2033 act.triggered.connect(self.esm.map) |
2074 act.triggered.connect(self.esm.map) |
2034 self.editActions.append(act) |
2075 self.editActions.append(act) |
2035 |
2076 |
2036 act = E5Action( |
2077 act = E5Action( |
2037 QApplication.translate( |
2078 QCoreApplication.translate( |
2038 'ViewManager', 'Move to end of display line'), |
2079 'ViewManager', 'Move to end of display line'), |
2039 QApplication.translate( |
2080 QCoreApplication.translate( |
2040 'ViewManager', 'Move to end of display line'), |
2081 'ViewManager', 'Move to end of display line'), |
2041 0, 0, |
2082 0, 0, |
2042 self.editorActGrp, 'vm_edit_move_end_displayed_line') |
2083 self.editorActGrp, 'vm_edit_move_end_displayed_line') |
2043 if isMacPlatform(): |
2084 if isMacPlatform(): |
2044 act.setShortcut(QKeySequence( |
2085 act.setShortcut(QKeySequence( |
2045 QApplication.translate('ViewManager', 'Ctrl+Right'))) |
2086 QCoreApplication.translate('ViewManager', 'Ctrl+Right'))) |
2046 else: |
2087 else: |
2047 act.setShortcut(QKeySequence( |
2088 act.setShortcut(QKeySequence( |
2048 QApplication.translate('ViewManager', 'Alt+End'))) |
2089 QCoreApplication.translate('ViewManager', 'Alt+End'))) |
2049 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAY) |
2090 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAY) |
2050 act.triggered.connect(self.esm.map) |
2091 act.triggered.connect(self.esm.map) |
2051 self.editActions.append(act) |
2092 self.editActions.append(act) |
2052 |
2093 |
2053 act = E5Action( |
2094 act = E5Action( |
2054 QApplication.translate( |
2095 QCoreApplication.translate( |
2055 'ViewManager', 'Extend selection to end of display line'), |
2096 'ViewManager', 'Extend selection to end of display line'), |
2056 QApplication.translate( |
2097 QCoreApplication.translate( |
2057 'ViewManager', 'Extend selection to end of display line'), |
2098 'ViewManager', 'Extend selection to end of display line'), |
2058 0, 0, |
2099 0, 0, |
2059 self.editorActGrp, 'vm_edit_extend_selection_end_displayed_line') |
2100 self.editorActGrp, 'vm_edit_extend_selection_end_displayed_line') |
2060 if isMacPlatform(): |
2101 if isMacPlatform(): |
2061 act.setShortcut(QKeySequence( |
2102 act.setShortcut(QKeySequence( |
2062 QApplication.translate('ViewManager', 'Ctrl+Shift+Right'))) |
2103 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Right'))) |
2063 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAYEXTEND) |
2104 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAYEXTEND) |
2064 act.triggered.connect(self.esm.map) |
2105 act.triggered.connect(self.esm.map) |
2065 self.editActions.append(act) |
2106 self.editActions.append(act) |
2066 |
2107 |
2067 act = E5Action( |
2108 act = E5Action( |
2068 QApplication.translate('ViewManager', 'Formfeed'), |
2109 QCoreApplication.translate('ViewManager', 'Formfeed'), |
2069 QApplication.translate('ViewManager', 'Formfeed'), |
2110 QCoreApplication.translate('ViewManager', 'Formfeed'), |
2070 0, 0, |
2111 0, 0, |
2071 self.editorActGrp, 'vm_edit_formfeed') |
2112 self.editorActGrp, 'vm_edit_formfeed') |
2072 self.esm.setMapping(act, QsciScintilla.SCI_FORMFEED) |
2113 self.esm.setMapping(act, QsciScintilla.SCI_FORMFEED) |
2073 act.triggered.connect(self.esm.map) |
2114 act.triggered.connect(self.esm.map) |
2074 self.editActions.append(act) |
2115 self.editActions.append(act) |
2075 |
2116 |
2076 act = E5Action( |
2117 act = E5Action( |
2077 QApplication.translate('ViewManager', 'Escape'), |
2118 QCoreApplication.translate('ViewManager', 'Escape'), |
2078 QApplication.translate('ViewManager', 'Escape'), |
2119 QCoreApplication.translate('ViewManager', 'Escape'), |
2079 QKeySequence(QApplication.translate('ViewManager', 'Esc')), 0, |
2120 QKeySequence(QCoreApplication.translate('ViewManager', 'Esc')), 0, |
2080 self.editorActGrp, 'vm_edit_escape') |
2121 self.editorActGrp, 'vm_edit_escape') |
2081 self.esm.setMapping(act, QsciScintilla.SCI_CANCEL) |
2122 self.esm.setMapping(act, QsciScintilla.SCI_CANCEL) |
2082 act.triggered.connect(self.esm.map) |
2123 act.triggered.connect(self.esm.map) |
2083 self.editActions.append(act) |
2124 self.editActions.append(act) |
2084 |
2125 |
2085 act = E5Action( |
2126 act = E5Action( |
2086 QApplication.translate( |
2127 QCoreApplication.translate( |
2087 'ViewManager', 'Extend rectangular selection down one line'), |
2128 'ViewManager', 'Extend rectangular selection down one line'), |
2088 QApplication.translate( |
2129 QCoreApplication.translate( |
2089 'ViewManager', 'Extend rectangular selection down one line'), |
2130 'ViewManager', 'Extend rectangular selection down one line'), |
2090 QKeySequence(QApplication.translate( |
2131 QKeySequence(QCoreApplication.translate( |
2091 'ViewManager', 'Alt+Ctrl+Down')), |
2132 'ViewManager', 'Alt+Ctrl+Down')), |
2092 0, |
2133 0, |
2093 self.editorActGrp, 'vm_edit_extend_rect_selection_down_line') |
2134 self.editorActGrp, 'vm_edit_extend_rect_selection_down_line') |
2094 if isMacPlatform(): |
2135 if isMacPlatform(): |
2095 act.setAlternateShortcut(QKeySequence( |
2136 act.setAlternateShortcut(QKeySequence( |
2096 QApplication.translate('ViewManager', 'Meta+Alt+Shift+N'))) |
2137 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+N'))) |
2097 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNRECTEXTEND) |
2138 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNRECTEXTEND) |
2098 act.triggered.connect(self.esm.map) |
2139 act.triggered.connect(self.esm.map) |
2099 self.editActions.append(act) |
2140 self.editActions.append(act) |
2100 |
2141 |
2101 act = E5Action( |
2142 act = E5Action( |
2102 QApplication.translate( |
2143 QCoreApplication.translate( |
2103 'ViewManager', 'Extend rectangular selection up one line'), |
2144 'ViewManager', 'Extend rectangular selection up one line'), |
2104 QApplication.translate( |
2145 QCoreApplication.translate( |
2105 'ViewManager', 'Extend rectangular selection up one line'), |
2146 'ViewManager', 'Extend rectangular selection up one line'), |
2106 QKeySequence(QApplication.translate('ViewManager', 'Alt+Ctrl+Up')), |
2147 QKeySequence(QCoreApplication.translate('ViewManager', |
2107 0, |
2148 'Alt+Ctrl+Up')), |
2108 self.editorActGrp, 'vm_edit_extend_rect_selection_up_line') |
2149 0, self.editorActGrp, 'vm_edit_extend_rect_selection_up_line') |
2109 if isMacPlatform(): |
2150 if isMacPlatform(): |
2110 act.setAlternateShortcut(QKeySequence( |
2151 act.setAlternateShortcut(QKeySequence( |
2111 QApplication.translate('ViewManager', 'Meta+Alt+Shift+P'))) |
2152 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+P'))) |
2112 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPRECTEXTEND) |
2153 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPRECTEXTEND) |
2113 act.triggered.connect(self.esm.map) |
2154 act.triggered.connect(self.esm.map) |
2114 self.editActions.append(act) |
2155 self.editActions.append(act) |
2115 |
2156 |
2116 act = E5Action( |
2157 act = E5Action( |
2117 QApplication.translate( |
2158 QCoreApplication.translate( |
2118 'ViewManager', |
2159 'ViewManager', |
2119 'Extend rectangular selection left one character'), |
2160 'Extend rectangular selection left one character'), |
2120 QApplication.translate( |
2161 QCoreApplication.translate( |
2121 'ViewManager', |
2162 'ViewManager', |
2122 'Extend rectangular selection left one character'), |
2163 'Extend rectangular selection left one character'), |
2123 QKeySequence(QApplication.translate( |
2164 QKeySequence(QCoreApplication.translate( |
2124 'ViewManager', 'Alt+Ctrl+Left')), |
2165 'ViewManager', 'Alt+Ctrl+Left')), |
2125 0, |
2166 0, |
2126 self.editorActGrp, 'vm_edit_extend_rect_selection_left_char') |
2167 self.editorActGrp, 'vm_edit_extend_rect_selection_left_char') |
2127 if isMacPlatform(): |
2168 if isMacPlatform(): |
2128 act.setAlternateShortcut(QKeySequence( |
2169 act.setAlternateShortcut(QKeySequence( |
2129 QApplication.translate('ViewManager', 'Meta+Alt+Shift+B'))) |
2170 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+B'))) |
2130 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTRECTEXTEND) |
2171 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTRECTEXTEND) |
2131 act.triggered.connect(self.esm.map) |
2172 act.triggered.connect(self.esm.map) |
2132 self.editActions.append(act) |
2173 self.editActions.append(act) |
2133 |
2174 |
2134 act = E5Action( |
2175 act = E5Action( |
2135 QApplication.translate( |
2176 QCoreApplication.translate( |
2136 'ViewManager', |
2177 'ViewManager', |
2137 'Extend rectangular selection right one character'), |
2178 'Extend rectangular selection right one character'), |
2138 QApplication.translate( |
2179 QCoreApplication.translate( |
2139 'ViewManager', |
2180 'ViewManager', |
2140 'Extend rectangular selection right one character'), |
2181 'Extend rectangular selection right one character'), |
2141 QKeySequence(QApplication.translate( |
2182 QKeySequence(QCoreApplication.translate( |
2142 'ViewManager', 'Alt+Ctrl+Right')), |
2183 'ViewManager', 'Alt+Ctrl+Right')), |
2143 0, |
2184 0, |
2144 self.editorActGrp, 'vm_edit_extend_rect_selection_right_char') |
2185 self.editorActGrp, 'vm_edit_extend_rect_selection_right_char') |
2145 if isMacPlatform(): |
2186 if isMacPlatform(): |
2146 act.setAlternateShortcut(QKeySequence( |
2187 act.setAlternateShortcut(QKeySequence( |
2147 QApplication.translate('ViewManager', 'Meta+Alt+Shift+F'))) |
2188 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+F'))) |
2148 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTRECTEXTEND) |
2189 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTRECTEXTEND) |
2149 act.triggered.connect(self.esm.map) |
2190 act.triggered.connect(self.esm.map) |
2150 self.editActions.append(act) |
2191 self.editActions.append(act) |
2151 |
2192 |
2152 act = E5Action( |
2193 act = E5Action( |
2153 QApplication.translate( |
2194 QCoreApplication.translate( |
2154 'ViewManager', |
2195 'ViewManager', |
2155 'Extend rectangular selection to first visible character in' |
2196 'Extend rectangular selection to first visible character in' |
2156 ' document line'), |
2197 ' document line'), |
2157 QApplication.translate( |
2198 QCoreApplication.translate( |
2158 'ViewManager', |
2199 'ViewManager', |
2159 'Extend rectangular selection to first visible character in' |
2200 'Extend rectangular selection to first visible character in' |
2160 ' document line'), |
2201 ' document line'), |
2161 0, 0, |
2202 0, 0, |
2162 self.editorActGrp, |
2203 self.editorActGrp, |
2163 'vm_edit_extend_rect_selection_first_visible_char') |
2204 'vm_edit_extend_rect_selection_first_visible_char') |
2164 if not isMacPlatform(): |
2205 if not isMacPlatform(): |
2165 act.setShortcut(QKeySequence( |
2206 act.setShortcut(QKeySequence( |
2166 QApplication.translate('ViewManager', 'Alt+Shift+Home'))) |
2207 QCoreApplication.translate('ViewManager', 'Alt+Shift+Home'))) |
2167 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMERECTEXTEND) |
2208 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMERECTEXTEND) |
2168 act.triggered.connect(self.esm.map) |
2209 act.triggered.connect(self.esm.map) |
2169 self.editActions.append(act) |
2210 self.editActions.append(act) |
2170 |
2211 |
2171 act = E5Action( |
2212 act = E5Action( |
2172 QApplication.translate( |
2213 QCoreApplication.translate( |
2173 'ViewManager', |
2214 'ViewManager', |
2174 'Extend rectangular selection to end of document line'), |
2215 'Extend rectangular selection to end of document line'), |
2175 QApplication.translate( |
2216 QCoreApplication.translate( |
2176 'ViewManager', |
2217 'ViewManager', |
2177 'Extend rectangular selection to end of document line'), |
2218 'Extend rectangular selection to end of document line'), |
2178 0, 0, |
2219 0, 0, |
2179 self.editorActGrp, 'vm_edit_extend_rect_selection_end_line') |
2220 self.editorActGrp, 'vm_edit_extend_rect_selection_end_line') |
2180 if isMacPlatform(): |
2221 if isMacPlatform(): |
2181 act.setShortcut(QKeySequence( |
2222 act.setShortcut(QKeySequence( |
2182 QApplication.translate('ViewManager', 'Meta+Alt+Shift+E'))) |
2223 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+E'))) |
2183 else: |
2224 else: |
2184 act.setShortcut(QKeySequence( |
2225 act.setShortcut(QKeySequence( |
2185 QApplication.translate('ViewManager', 'Alt+Shift+End'))) |
2226 QCoreApplication.translate('ViewManager', 'Alt+Shift+End'))) |
2186 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDRECTEXTEND) |
2227 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDRECTEXTEND) |
2187 act.triggered.connect(self.esm.map) |
2228 act.triggered.connect(self.esm.map) |
2188 self.editActions.append(act) |
2229 self.editActions.append(act) |
2189 |
2230 |
2190 act = E5Action( |
2231 act = E5Action( |
2191 QApplication.translate( |
2232 QCoreApplication.translate( |
2192 'ViewManager', |
2233 'ViewManager', |
2193 'Extend rectangular selection up one page'), |
2234 'Extend rectangular selection up one page'), |
2194 QApplication.translate( |
2235 QCoreApplication.translate( |
2195 'ViewManager', |
2236 'ViewManager', |
2196 'Extend rectangular selection up one page'), |
2237 'Extend rectangular selection up one page'), |
2197 QKeySequence(QApplication.translate( |
2238 QKeySequence(QCoreApplication.translate( |
2198 'ViewManager', 'Alt+Shift+PgUp')), |
2239 'ViewManager', 'Alt+Shift+PgUp')), |
2199 0, |
2240 0, |
2200 self.editorActGrp, 'vm_edit_extend_rect_selection_up_page') |
2241 self.editorActGrp, 'vm_edit_extend_rect_selection_up_page') |
2201 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPRECTEXTEND) |
2242 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPRECTEXTEND) |
2202 act.triggered.connect(self.esm.map) |
2243 act.triggered.connect(self.esm.map) |
2203 self.editActions.append(act) |
2244 self.editActions.append(act) |
2204 |
2245 |
2205 act = E5Action( |
2246 act = E5Action( |
2206 QApplication.translate( |
2247 QCoreApplication.translate( |
2207 'ViewManager', |
2248 'ViewManager', |
2208 'Extend rectangular selection down one page'), |
2249 'Extend rectangular selection down one page'), |
2209 QApplication.translate( |
2250 QCoreApplication.translate( |
2210 'ViewManager', |
2251 'ViewManager', |
2211 'Extend rectangular selection down one page'), |
2252 'Extend rectangular selection down one page'), |
2212 QKeySequence(QApplication.translate( |
2253 QKeySequence(QCoreApplication.translate( |
2213 'ViewManager', 'Alt+Shift+PgDown')), |
2254 'ViewManager', 'Alt+Shift+PgDown')), |
2214 0, |
2255 0, |
2215 self.editorActGrp, 'vm_edit_extend_rect_selection_down_page') |
2256 self.editorActGrp, 'vm_edit_extend_rect_selection_down_page') |
2216 if isMacPlatform(): |
2257 if isMacPlatform(): |
2217 act.setAlternateShortcut(QKeySequence( |
2258 act.setAlternateShortcut(QKeySequence( |
2218 QApplication.translate('ViewManager', 'Meta+Alt+Shift+V'))) |
2259 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+V'))) |
2219 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNRECTEXTEND) |
2260 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNRECTEXTEND) |
2220 act.triggered.connect(self.esm.map) |
2261 act.triggered.connect(self.esm.map) |
2221 self.editActions.append(act) |
2262 self.editActions.append(act) |
2222 |
2263 |
2223 act = E5Action( |
2264 act = E5Action( |
2224 QApplication.translate( |
2265 QCoreApplication.translate( |
2225 'ViewManager', 'Duplicate current selection'), |
2266 'ViewManager', 'Duplicate current selection'), |
2226 QApplication.translate( |
2267 QCoreApplication.translate( |
2227 'ViewManager', 'Duplicate current selection'), |
2268 'ViewManager', 'Duplicate current selection'), |
2228 QKeySequence(QApplication.translate( |
2269 QKeySequence(QCoreApplication.translate( |
2229 'ViewManager', 'Ctrl+Shift+D')), |
2270 'ViewManager', 'Ctrl+Shift+D')), |
2230 0, |
2271 0, |
2231 self.editorActGrp, 'vm_edit_duplicate_current_selection') |
2272 self.editorActGrp, 'vm_edit_duplicate_current_selection') |
2232 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE) |
2273 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE) |
2233 act.triggered.connect(self.esm.map) |
2274 act.triggered.connect(self.esm.map) |
2234 self.editActions.append(act) |
2275 self.editActions.append(act) |
2235 |
2276 |
2236 if hasattr(QsciScintilla, "SCI_SCROLLTOSTART"): |
2277 if hasattr(QsciScintilla, "SCI_SCROLLTOSTART"): |
2237 act = E5Action( |
2278 act = E5Action( |
2238 QApplication.translate( |
2279 QCoreApplication.translate( |
2239 'ViewManager', 'Scroll to start of document'), |
2280 'ViewManager', 'Scroll to start of document'), |
2240 QApplication.translate( |
2281 QCoreApplication.translate( |
2241 'ViewManager', 'Scroll to start of document'), |
2282 'ViewManager', 'Scroll to start of document'), |
2242 0, 0, |
2283 0, 0, |
2243 self.editorActGrp, 'vm_edit_scroll_start_text') |
2284 self.editorActGrp, 'vm_edit_scroll_start_text') |
2244 if isMacPlatform(): |
2285 if isMacPlatform(): |
2245 act.setShortcut(QKeySequence( |
2286 act.setShortcut(QKeySequence( |
2246 QApplication.translate('ViewManager', 'Home'))) |
2287 QCoreApplication.translate('ViewManager', 'Home'))) |
2247 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOSTART) |
2288 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOSTART) |
2248 act.triggered.connect(self.esm.map) |
2289 act.triggered.connect(self.esm.map) |
2249 self.editActions.append(act) |
2290 self.editActions.append(act) |
2250 |
2291 |
2251 if hasattr(QsciScintilla, "SCI_SCROLLTOEND"): |
2292 if hasattr(QsciScintilla, "SCI_SCROLLTOEND"): |
2252 act = E5Action( |
2293 act = E5Action( |
2253 QApplication.translate( |
2294 QCoreApplication.translate( |
2254 'ViewManager', 'Scroll to end of document'), |
2295 'ViewManager', 'Scroll to end of document'), |
2255 QApplication.translate( |
2296 QCoreApplication.translate( |
2256 'ViewManager', 'Scroll to end of document'), |
2297 'ViewManager', 'Scroll to end of document'), |
2257 0, 0, |
2298 0, 0, |
2258 self.editorActGrp, 'vm_edit_scroll_end_text') |
2299 self.editorActGrp, 'vm_edit_scroll_end_text') |
2259 if isMacPlatform(): |
2300 if isMacPlatform(): |
2260 act.setShortcut(QKeySequence( |
2301 act.setShortcut(QKeySequence( |
2261 QApplication.translate('ViewManager', 'End'))) |
2302 QCoreApplication.translate('ViewManager', 'End'))) |
2262 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOEND) |
2303 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOEND) |
2263 act.triggered.connect(self.esm.map) |
2304 act.triggered.connect(self.esm.map) |
2264 self.editActions.append(act) |
2305 self.editActions.append(act) |
2265 |
2306 |
2266 if hasattr(QsciScintilla, "SCI_VERTICALCENTRECARET"): |
2307 if hasattr(QsciScintilla, "SCI_VERTICALCENTRECARET"): |
2267 act = E5Action( |
2308 act = E5Action( |
2268 QApplication.translate( |
2309 QCoreApplication.translate( |
2269 'ViewManager', 'Scroll vertically to center current line'), |
2310 'ViewManager', 'Scroll vertically to center current line'), |
2270 QApplication.translate( |
2311 QCoreApplication.translate( |
2271 'ViewManager', 'Scroll vertically to center current line'), |
2312 'ViewManager', 'Scroll vertically to center current line'), |
2272 0, 0, |
2313 0, 0, |
2273 self.editorActGrp, 'vm_edit_scroll_vertically_center') |
2314 self.editorActGrp, 'vm_edit_scroll_vertically_center') |
2274 if isMacPlatform(): |
2315 if isMacPlatform(): |
2275 act.setShortcut(QKeySequence( |
2316 act.setShortcut(QKeySequence( |
2276 QApplication.translate('ViewManager', 'Meta+L'))) |
2317 QCoreApplication.translate('ViewManager', 'Meta+L'))) |
2277 self.esm.setMapping(act, QsciScintilla.SCI_VERTICALCENTRECARET) |
2318 self.esm.setMapping(act, QsciScintilla.SCI_VERTICALCENTRECARET) |
2278 act.triggered.connect(self.esm.map) |
2319 act.triggered.connect(self.esm.map) |
2279 self.editActions.append(act) |
2320 self.editActions.append(act) |
2280 |
2321 |
2281 if hasattr(QsciScintilla, "SCI_WORDRIGHTEND"): |
2322 if hasattr(QsciScintilla, "SCI_WORDRIGHTEND"): |
2282 act = E5Action( |
2323 act = E5Action( |
2283 QApplication.translate( |
2324 QCoreApplication.translate( |
2284 'ViewManager', 'Move to end of next word'), |
2325 'ViewManager', 'Move to end of next word'), |
2285 QApplication.translate( |
2326 QCoreApplication.translate( |
2286 'ViewManager', 'Move to end of next word'), |
2327 'ViewManager', 'Move to end of next word'), |
2287 0, 0, |
2328 0, 0, |
2288 self.editorActGrp, 'vm_edit_move_end_next_word') |
2329 self.editorActGrp, 'vm_edit_move_end_next_word') |
2289 if isMacPlatform(): |
2330 if isMacPlatform(): |
2290 act.setShortcut(QKeySequence( |
2331 act.setShortcut(QKeySequence( |
2291 QApplication.translate('ViewManager', 'Alt+Right'))) |
2332 QCoreApplication.translate('ViewManager', 'Alt+Right'))) |
2292 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEND) |
2333 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEND) |
2293 act.triggered.connect(self.esm.map) |
2334 act.triggered.connect(self.esm.map) |
2294 self.editActions.append(act) |
2335 self.editActions.append(act) |
2295 |
2336 |
2296 if hasattr(QsciScintilla, "SCI_WORDRIGHTENDEXTEND"): |
2337 if hasattr(QsciScintilla, "SCI_WORDRIGHTENDEXTEND"): |
2297 act = E5Action( |
2338 act = E5Action( |
2298 QApplication.translate( |
2339 QCoreApplication.translate( |
2299 'ViewManager', 'Extend selection to end of next word'), |
2340 'ViewManager', 'Extend selection to end of next word'), |
2300 QApplication.translate( |
2341 QCoreApplication.translate( |
2301 'ViewManager', 'Extend selection to end of next word'), |
2342 'ViewManager', 'Extend selection to end of next word'), |
2302 0, 0, |
2343 0, 0, |
2303 self.editorActGrp, 'vm_edit_select_end_next_word') |
2344 self.editorActGrp, 'vm_edit_select_end_next_word') |
2304 if isMacPlatform(): |
2345 if isMacPlatform(): |
2305 act.setShortcut(QKeySequence( |
2346 act.setShortcut(QKeySequence( |
2306 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
2347 QCoreApplication.translate('ViewManager', |
|
2348 'Alt+Shift+Right'))) |
2307 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTENDEXTEND) |
2349 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTENDEXTEND) |
2308 act.triggered.connect(self.esm.map) |
2350 act.triggered.connect(self.esm.map) |
2309 self.editActions.append(act) |
2351 self.editActions.append(act) |
2310 |
2352 |
2311 if hasattr(QsciScintilla, "SCI_WORDLEFTEND"): |
2353 if hasattr(QsciScintilla, "SCI_WORDLEFTEND"): |
2312 act = E5Action( |
2354 act = E5Action( |
2313 QApplication.translate( |
2355 QCoreApplication.translate( |
2314 'ViewManager', 'Move to end of previous word'), |
2356 'ViewManager', 'Move to end of previous word'), |
2315 QApplication.translate( |
2357 QCoreApplication.translate( |
2316 'ViewManager', 'Move to end of previous word'), |
2358 'ViewManager', 'Move to end of previous word'), |
2317 0, 0, |
2359 0, 0, |
2318 self.editorActGrp, 'vm_edit_move_end_previous_word') |
2360 self.editorActGrp, 'vm_edit_move_end_previous_word') |
2319 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEND) |
2361 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEND) |
2320 act.triggered.connect(self.esm.map) |
2362 act.triggered.connect(self.esm.map) |
2321 self.editActions.append(act) |
2363 self.editActions.append(act) |
2322 |
2364 |
2323 if hasattr(QsciScintilla, "SCI_WORDLEFTENDEXTEND"): |
2365 if hasattr(QsciScintilla, "SCI_WORDLEFTENDEXTEND"): |
2324 act = E5Action( |
2366 act = E5Action( |
2325 QApplication.translate( |
2367 QCoreApplication.translate( |
2326 'ViewManager', 'Extend selection to end of previous word'), |
2368 'ViewManager', 'Extend selection to end of previous word'), |
2327 QApplication.translate( |
2369 QCoreApplication.translate( |
2328 'ViewManager', 'Extend selection to end of previous word'), |
2370 'ViewManager', 'Extend selection to end of previous word'), |
2329 0, 0, |
2371 0, 0, |
2330 self.editorActGrp, 'vm_edit_select_end_previous_word') |
2372 self.editorActGrp, 'vm_edit_select_end_previous_word') |
2331 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTENDEXTEND) |
2373 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTENDEXTEND) |
2332 act.triggered.connect(self.esm.map) |
2374 act.triggered.connect(self.esm.map) |
2333 self.editActions.append(act) |
2375 self.editActions.append(act) |
2334 |
2376 |
2335 if hasattr(QsciScintilla, "SCI_HOME"): |
2377 if hasattr(QsciScintilla, "SCI_HOME"): |
2336 act = E5Action( |
2378 act = E5Action( |
2337 QApplication.translate( |
2379 QCoreApplication.translate( |
2338 'ViewManager', 'Move to start of document line'), |
2380 'ViewManager', 'Move to start of document line'), |
2339 QApplication.translate( |
2381 QCoreApplication.translate( |
2340 'ViewManager', 'Move to start of document line'), |
2382 'ViewManager', 'Move to start of document line'), |
2341 0, 0, |
2383 0, 0, |
2342 self.editorActGrp, 'vm_edit_move_start_document_line') |
2384 self.editorActGrp, 'vm_edit_move_start_document_line') |
2343 if isMacPlatform(): |
2385 if isMacPlatform(): |
2344 act.setShortcut(QKeySequence( |
2386 act.setShortcut(QKeySequence( |
2345 QApplication.translate('ViewManager', 'Meta+A'))) |
2387 QCoreApplication.translate('ViewManager', 'Meta+A'))) |
2346 self.esm.setMapping(act, QsciScintilla.SCI_HOME) |
2388 self.esm.setMapping(act, QsciScintilla.SCI_HOME) |
2347 act.triggered.connect(self.esm.map) |
2389 act.triggered.connect(self.esm.map) |
2348 self.editActions.append(act) |
2390 self.editActions.append(act) |
2349 |
2391 |
2350 if hasattr(QsciScintilla, "SCI_HOMEEXTEND"): |
2392 if hasattr(QsciScintilla, "SCI_HOMEEXTEND"): |
2351 act = E5Action( |
2393 act = E5Action( |
2352 QApplication.translate( |
2394 QCoreApplication.translate( |
2353 'ViewManager', |
2395 'ViewManager', |
2354 'Extend selection to start of document line'), |
2396 'Extend selection to start of document line'), |
2355 QApplication.translate( |
2397 QCoreApplication.translate( |
2356 'ViewManager', |
2398 'ViewManager', |
2357 'Extend selection to start of document line'), |
2399 'Extend selection to start of document line'), |
2358 0, 0, |
2400 0, 0, |
2359 self.editorActGrp, |
2401 self.editorActGrp, |
2360 'vm_edit_extend_selection_start_document_line') |
2402 'vm_edit_extend_selection_start_document_line') |
2361 if isMacPlatform(): |
2403 if isMacPlatform(): |
2362 act.setShortcut(QKeySequence( |
2404 act.setShortcut(QKeySequence( |
2363 QApplication.translate('ViewManager', 'Meta+Shift+A'))) |
2405 QCoreApplication.translate('ViewManager', 'Meta+Shift+A'))) |
2364 self.esm.setMapping(act, QsciScintilla.SCI_HOME) |
2406 self.esm.setMapping(act, QsciScintilla.SCI_HOME) |
2365 act.triggered.connect(self.esm.map) |
2407 act.triggered.connect(self.esm.map) |
2366 self.editActions.append(act) |
2408 self.editActions.append(act) |
2367 |
2409 |
2368 if hasattr(QsciScintilla, "SCI_HOMERECTEXTEND"): |
2410 if hasattr(QsciScintilla, "SCI_HOMERECTEXTEND"): |
2369 act = E5Action( |
2411 act = E5Action( |
2370 QApplication.translate( |
2412 QCoreApplication.translate( |
2371 'ViewManager', |
2413 'ViewManager', |
2372 'Extend rectangular selection to start of document line'), |
2414 'Extend rectangular selection to start of document line'), |
2373 QApplication.translate( |
2415 QCoreApplication.translate( |
2374 'ViewManager', |
2416 'ViewManager', |
2375 'Extend rectangular selection to start of document line'), |
2417 'Extend rectangular selection to start of document line'), |
2376 0, 0, |
2418 0, 0, |
2377 self.editorActGrp, 'vm_edit_select_rect_start_line') |
2419 self.editorActGrp, 'vm_edit_select_rect_start_line') |
2378 if isMacPlatform(): |
2420 if isMacPlatform(): |
2379 act.setShortcut(QKeySequence( |
2421 act.setShortcut(QKeySequence( |
2380 QApplication.translate('ViewManager', 'Meta+Alt+Shift+A'))) |
2422 QCoreApplication.translate('ViewManager', |
|
2423 'Meta+Alt+Shift+A'))) |
2381 self.esm.setMapping(act, QsciScintilla.SCI_HOMERECTEXTEND) |
2424 self.esm.setMapping(act, QsciScintilla.SCI_HOMERECTEXTEND) |
2382 act.triggered.connect(self.esm.map) |
2425 act.triggered.connect(self.esm.map) |
2383 self.editActions.append(act) |
2426 self.editActions.append(act) |
2384 |
2427 |
2385 if hasattr(QsciScintilla, "SCI_HOMEDISPLAYEXTEND"): |
2428 if hasattr(QsciScintilla, "SCI_HOMEDISPLAYEXTEND"): |
2386 act = E5Action( |
2429 act = E5Action( |
2387 QApplication.translate( |
2430 QCoreApplication.translate( |
2388 'ViewManager', |
2431 'ViewManager', |
2389 'Extend selection to start of display line'), |
2432 'Extend selection to start of display line'), |
2390 QApplication.translate( |
2433 QCoreApplication.translate( |
2391 'ViewManager', |
2434 'ViewManager', |
2392 'Extend selection to start of display line'), |
2435 'Extend selection to start of display line'), |
2393 0, 0, |
2436 0, 0, |
2394 self.editorActGrp, |
2437 self.editorActGrp, |
2395 'vm_edit_extend_selection_start_display_line') |
2438 'vm_edit_extend_selection_start_display_line') |
2396 if isMacPlatform(): |
2439 if isMacPlatform(): |
2397 act.setShortcut(QKeySequence( |
2440 act.setShortcut(QKeySequence( |
2398 QApplication.translate('ViewManager', 'Ctrl+Shift+Left'))) |
2441 QCoreApplication.translate('ViewManager', |
|
2442 'Ctrl+Shift+Left'))) |
2399 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAYEXTEND) |
2443 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAYEXTEND) |
2400 act.triggered.connect(self.esm.map) |
2444 act.triggered.connect(self.esm.map) |
2401 self.editActions.append(act) |
2445 self.editActions.append(act) |
2402 |
2446 |
2403 if hasattr(QsciScintilla, "SCI_HOMEWRAP"): |
2447 if hasattr(QsciScintilla, "SCI_HOMEWRAP"): |
2404 act = E5Action( |
2448 act = E5Action( |
2405 QApplication.translate( |
2449 QCoreApplication.translate( |
2406 'ViewManager', |
2450 'ViewManager', |
2407 'Move to start of display or document line'), |
2451 'Move to start of display or document line'), |
2408 QApplication.translate( |
2452 QCoreApplication.translate( |
2409 'ViewManager', |
2453 'ViewManager', |
2410 'Move to start of display or document line'), |
2454 'Move to start of display or document line'), |
2411 0, 0, |
2455 0, 0, |
2412 self.editorActGrp, 'vm_edit_move_start_display_document_line') |
2456 self.editorActGrp, 'vm_edit_move_start_display_document_line') |
2413 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAP) |
2457 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAP) |
2414 act.triggered.connect(self.esm.map) |
2458 act.triggered.connect(self.esm.map) |
2415 self.editActions.append(act) |
2459 self.editActions.append(act) |
2416 |
2460 |
2417 if hasattr(QsciScintilla, "SCI_HOMEWRAPEXTEND"): |
2461 if hasattr(QsciScintilla, "SCI_HOMEWRAPEXTEND"): |
2418 act = E5Action( |
2462 act = E5Action( |
2419 QApplication.translate( |
2463 QCoreApplication.translate( |
2420 'ViewManager', |
2464 'ViewManager', |
2421 'Extend selection to start of display or document line'), |
2465 'Extend selection to start of display or document line'), |
2422 QApplication.translate( |
2466 QCoreApplication.translate( |
2423 'ViewManager', |
2467 'ViewManager', |
2424 'Extend selection to start of display or document line'), |
2468 'Extend selection to start of display or document line'), |
2425 0, 0, |
2469 0, 0, |
2426 self.editorActGrp, |
2470 self.editorActGrp, |
2427 'vm_edit_extend_selection_start_display_document_line') |
2471 'vm_edit_extend_selection_start_display_document_line') |
3694 commands. |
3759 commands. |
3695 """ |
3760 """ |
3696 self.bookmarkActGrp = createActionGroup(self) |
3761 self.bookmarkActGrp = createActionGroup(self) |
3697 |
3762 |
3698 self.bookmarkToggleAct = E5Action( |
3763 self.bookmarkToggleAct = E5Action( |
3699 QApplication.translate('ViewManager', 'Toggle Bookmark'), |
3764 QCoreApplication.translate('ViewManager', 'Toggle Bookmark'), |
3700 UI.PixmapCache.getIcon("bookmarkToggle.png"), |
3765 UI.PixmapCache.getIcon("bookmarkToggle.png"), |
3701 QApplication.translate('ViewManager', '&Toggle Bookmark'), |
3766 QCoreApplication.translate('ViewManager', '&Toggle Bookmark'), |
3702 QKeySequence(QApplication.translate( |
3767 QKeySequence(QCoreApplication.translate( |
3703 'ViewManager', "Alt+Ctrl+T", "Bookmark|Toggle")), |
3768 'ViewManager', "Alt+Ctrl+T", "Bookmark|Toggle")), |
3704 0, |
3769 0, |
3705 self.bookmarkActGrp, 'vm_bookmark_toggle') |
3770 self.bookmarkActGrp, 'vm_bookmark_toggle') |
3706 self.bookmarkToggleAct.setStatusTip(QApplication.translate( |
3771 self.bookmarkToggleAct.setStatusTip(QCoreApplication.translate( |
3707 'ViewManager', 'Toggle Bookmark')) |
3772 'ViewManager', 'Toggle Bookmark')) |
3708 self.bookmarkToggleAct.setWhatsThis(QApplication.translate( |
3773 self.bookmarkToggleAct.setWhatsThis(QCoreApplication.translate( |
3709 'ViewManager', |
3774 'ViewManager', |
3710 """<b>Toggle Bookmark</b>""" |
3775 """<b>Toggle Bookmark</b>""" |
3711 """<p>Toggle a bookmark at the current line of the current""" |
3776 """<p>Toggle a bookmark at the current line of the current""" |
3712 """ editor.</p>""" |
3777 """ editor.</p>""" |
3713 )) |
3778 )) |
3714 self.bookmarkToggleAct.triggered.connect(self.__toggleBookmark) |
3779 self.bookmarkToggleAct.triggered.connect(self.__toggleBookmark) |
3715 self.bookmarkActions.append(self.bookmarkToggleAct) |
3780 self.bookmarkActions.append(self.bookmarkToggleAct) |
3716 |
3781 |
3717 self.bookmarkNextAct = E5Action( |
3782 self.bookmarkNextAct = E5Action( |
3718 QApplication.translate('ViewManager', 'Next Bookmark'), |
3783 QCoreApplication.translate('ViewManager', 'Next Bookmark'), |
3719 UI.PixmapCache.getIcon("bookmarkNext.png"), |
3784 UI.PixmapCache.getIcon("bookmarkNext.png"), |
3720 QApplication.translate('ViewManager', '&Next Bookmark'), |
3785 QCoreApplication.translate('ViewManager', '&Next Bookmark'), |
3721 QKeySequence(QApplication.translate( |
3786 QKeySequence(QCoreApplication.translate( |
3722 'ViewManager', "Ctrl+PgDown", "Bookmark|Next")), |
3787 'ViewManager', "Ctrl+PgDown", "Bookmark|Next")), |
3723 0, |
3788 0, |
3724 self.bookmarkActGrp, 'vm_bookmark_next') |
3789 self.bookmarkActGrp, 'vm_bookmark_next') |
3725 self.bookmarkNextAct.setStatusTip(QApplication.translate( |
3790 self.bookmarkNextAct.setStatusTip(QCoreApplication.translate( |
3726 'ViewManager', 'Next Bookmark')) |
3791 'ViewManager', 'Next Bookmark')) |
3727 self.bookmarkNextAct.setWhatsThis(QApplication.translate( |
3792 self.bookmarkNextAct.setWhatsThis(QCoreApplication.translate( |
3728 'ViewManager', |
3793 'ViewManager', |
3729 """<b>Next Bookmark</b>""" |
3794 """<b>Next Bookmark</b>""" |
3730 """<p>Go to next bookmark of the current editor.</p>""" |
3795 """<p>Go to next bookmark of the current editor.</p>""" |
3731 )) |
3796 )) |
3732 self.bookmarkNextAct.triggered.connect(self.__nextBookmark) |
3797 self.bookmarkNextAct.triggered.connect(self.__nextBookmark) |
3733 self.bookmarkActions.append(self.bookmarkNextAct) |
3798 self.bookmarkActions.append(self.bookmarkNextAct) |
3734 |
3799 |
3735 self.bookmarkPreviousAct = E5Action( |
3800 self.bookmarkPreviousAct = E5Action( |
3736 QApplication.translate('ViewManager', 'Previous Bookmark'), |
3801 QCoreApplication.translate('ViewManager', 'Previous Bookmark'), |
3737 UI.PixmapCache.getIcon("bookmarkPrevious.png"), |
3802 UI.PixmapCache.getIcon("bookmarkPrevious.png"), |
3738 QApplication.translate('ViewManager', '&Previous Bookmark'), |
3803 QCoreApplication.translate('ViewManager', '&Previous Bookmark'), |
3739 QKeySequence(QApplication.translate( |
3804 QKeySequence(QCoreApplication.translate( |
3740 'ViewManager', "Ctrl+PgUp", "Bookmark|Previous")), |
3805 'ViewManager', "Ctrl+PgUp", "Bookmark|Previous")), |
3741 0, |
3806 0, |
3742 self.bookmarkActGrp, 'vm_bookmark_previous') |
3807 self.bookmarkActGrp, 'vm_bookmark_previous') |
3743 self.bookmarkPreviousAct.setStatusTip(QApplication.translate( |
3808 self.bookmarkPreviousAct.setStatusTip(QCoreApplication.translate( |
3744 'ViewManager', 'Previous Bookmark')) |
3809 'ViewManager', 'Previous Bookmark')) |
3745 self.bookmarkPreviousAct.setWhatsThis(QApplication.translate( |
3810 self.bookmarkPreviousAct.setWhatsThis(QCoreApplication.translate( |
3746 'ViewManager', |
3811 'ViewManager', |
3747 """<b>Previous Bookmark</b>""" |
3812 """<b>Previous Bookmark</b>""" |
3748 """<p>Go to previous bookmark of the current editor.</p>""" |
3813 """<p>Go to previous bookmark of the current editor.</p>""" |
3749 )) |
3814 )) |
3750 self.bookmarkPreviousAct.triggered.connect(self.__previousBookmark) |
3815 self.bookmarkPreviousAct.triggered.connect(self.__previousBookmark) |
3751 self.bookmarkActions.append(self.bookmarkPreviousAct) |
3816 self.bookmarkActions.append(self.bookmarkPreviousAct) |
3752 |
3817 |
3753 self.bookmarkClearAct = E5Action( |
3818 self.bookmarkClearAct = E5Action( |
3754 QApplication.translate('ViewManager', 'Clear Bookmarks'), |
3819 QCoreApplication.translate('ViewManager', 'Clear Bookmarks'), |
3755 QApplication.translate('ViewManager', '&Clear Bookmarks'), |
3820 QCoreApplication.translate('ViewManager', '&Clear Bookmarks'), |
3756 QKeySequence(QApplication.translate( |
3821 QKeySequence(QCoreApplication.translate( |
3757 'ViewManager', "Alt+Ctrl+C", "Bookmark|Clear")), |
3822 'ViewManager', "Alt+Ctrl+C", "Bookmark|Clear")), |
3758 0, |
3823 0, |
3759 self.bookmarkActGrp, 'vm_bookmark_clear') |
3824 self.bookmarkActGrp, 'vm_bookmark_clear') |
3760 self.bookmarkClearAct.setStatusTip(QApplication.translate( |
3825 self.bookmarkClearAct.setStatusTip(QCoreApplication.translate( |
3761 'ViewManager', 'Clear Bookmarks')) |
3826 'ViewManager', 'Clear Bookmarks')) |
3762 self.bookmarkClearAct.setWhatsThis(QApplication.translate( |
3827 self.bookmarkClearAct.setWhatsThis(QCoreApplication.translate( |
3763 'ViewManager', |
3828 'ViewManager', |
3764 """<b>Clear Bookmarks</b>""" |
3829 """<b>Clear Bookmarks</b>""" |
3765 """<p>Clear bookmarks of all editors.</p>""" |
3830 """<p>Clear bookmarks of all editors.</p>""" |
3766 )) |
3831 )) |
3767 self.bookmarkClearAct.triggered.connect(self.__clearAllBookmarks) |
3832 self.bookmarkClearAct.triggered.connect(self.__clearAllBookmarks) |
3768 self.bookmarkActions.append(self.bookmarkClearAct) |
3833 self.bookmarkActions.append(self.bookmarkClearAct) |
3769 |
3834 |
3770 self.syntaxErrorGotoAct = E5Action( |
3835 self.syntaxErrorGotoAct = E5Action( |
3771 QApplication.translate('ViewManager', 'Goto Syntax Error'), |
3836 QCoreApplication.translate('ViewManager', 'Goto Syntax Error'), |
3772 UI.PixmapCache.getIcon("syntaxErrorGoto.png"), |
3837 UI.PixmapCache.getIcon("syntaxErrorGoto.png"), |
3773 QApplication.translate('ViewManager', '&Goto Syntax Error'), |
3838 QCoreApplication.translate('ViewManager', '&Goto Syntax Error'), |
3774 0, 0, |
3839 0, 0, |
3775 self.bookmarkActGrp, 'vm_syntaxerror_goto') |
3840 self.bookmarkActGrp, 'vm_syntaxerror_goto') |
3776 self.syntaxErrorGotoAct.setStatusTip(QApplication.translate( |
3841 self.syntaxErrorGotoAct.setStatusTip(QCoreApplication.translate( |
3777 'ViewManager', 'Goto Syntax Error')) |
3842 'ViewManager', 'Goto Syntax Error')) |
3778 self.syntaxErrorGotoAct.setWhatsThis(QApplication.translate( |
3843 self.syntaxErrorGotoAct.setWhatsThis(QCoreApplication.translate( |
3779 'ViewManager', |
3844 'ViewManager', |
3780 """<b>Goto Syntax Error</b>""" |
3845 """<b>Goto Syntax Error</b>""" |
3781 """<p>Go to next syntax error of the current editor.</p>""" |
3846 """<p>Go to next syntax error of the current editor.</p>""" |
3782 )) |
3847 )) |
3783 self.syntaxErrorGotoAct.triggered.connect(self.__gotoSyntaxError) |
3848 self.syntaxErrorGotoAct.triggered.connect(self.__gotoSyntaxError) |
3784 self.bookmarkActions.append(self.syntaxErrorGotoAct) |
3849 self.bookmarkActions.append(self.syntaxErrorGotoAct) |
3785 |
3850 |
3786 self.syntaxErrorClearAct = E5Action( |
3851 self.syntaxErrorClearAct = E5Action( |
3787 QApplication.translate('ViewManager', 'Clear Syntax Errors'), |
3852 QCoreApplication.translate('ViewManager', 'Clear Syntax Errors'), |
3788 QApplication.translate('ViewManager', 'Clear &Syntax Errors'), |
3853 QCoreApplication.translate('ViewManager', 'Clear &Syntax Errors'), |
3789 0, 0, |
3854 0, 0, |
3790 self.bookmarkActGrp, 'vm_syntaxerror_clear') |
3855 self.bookmarkActGrp, 'vm_syntaxerror_clear') |
3791 self.syntaxErrorClearAct.setStatusTip(QApplication.translate( |
3856 self.syntaxErrorClearAct.setStatusTip(QCoreApplication.translate( |
3792 'ViewManager', 'Clear Syntax Errors')) |
3857 'ViewManager', 'Clear Syntax Errors')) |
3793 self.syntaxErrorClearAct.setWhatsThis(QApplication.translate( |
3858 self.syntaxErrorClearAct.setWhatsThis(QCoreApplication.translate( |
3794 'ViewManager', |
3859 'ViewManager', |
3795 """<b>Clear Syntax Errors</b>""" |
3860 """<b>Clear Syntax Errors</b>""" |
3796 """<p>Clear syntax errors of all editors.</p>""" |
3861 """<p>Clear syntax errors of all editors.</p>""" |
3797 )) |
3862 )) |
3798 self.syntaxErrorClearAct.triggered.connect( |
3863 self.syntaxErrorClearAct.triggered.connect( |
3799 self.__clearAllSyntaxErrors) |
3864 self.__clearAllSyntaxErrors) |
3800 self.bookmarkActions.append(self.syntaxErrorClearAct) |
3865 self.bookmarkActions.append(self.syntaxErrorClearAct) |
3801 |
3866 |
3802 self.warningsNextAct = E5Action( |
3867 self.warningsNextAct = E5Action( |
3803 QApplication.translate('ViewManager', 'Next warning message'), |
3868 QCoreApplication.translate('ViewManager', 'Next warning message'), |
3804 UI.PixmapCache.getIcon("warningNext.png"), |
3869 UI.PixmapCache.getIcon("warningNext.png"), |
3805 QApplication.translate('ViewManager', '&Next warning message'), |
3870 QCoreApplication.translate('ViewManager', '&Next warning message'), |
3806 0, 0, |
3871 0, 0, |
3807 self.bookmarkActGrp, 'vm_warning_next') |
3872 self.bookmarkActGrp, 'vm_warning_next') |
3808 self.warningsNextAct.setStatusTip(QApplication.translate( |
3873 self.warningsNextAct.setStatusTip(QCoreApplication.translate( |
3809 'ViewManager', 'Next warning message')) |
3874 'ViewManager', 'Next warning message')) |
3810 self.warningsNextAct.setWhatsThis(QApplication.translate( |
3875 self.warningsNextAct.setWhatsThis(QCoreApplication.translate( |
3811 'ViewManager', |
3876 'ViewManager', |
3812 """<b>Next warning message</b>""" |
3877 """<b>Next warning message</b>""" |
3813 """<p>Go to next line of the current editor""" |
3878 """<p>Go to next line of the current editor""" |
3814 """ having a pyflakes warning.</p>""" |
3879 """ having a pyflakes warning.</p>""" |
3815 )) |
3880 )) |
3816 self.warningsNextAct.triggered.connect(self.__nextWarning) |
3881 self.warningsNextAct.triggered.connect(self.__nextWarning) |
3817 self.bookmarkActions.append(self.warningsNextAct) |
3882 self.bookmarkActions.append(self.warningsNextAct) |
3818 |
3883 |
3819 self.warningsPreviousAct = E5Action( |
3884 self.warningsPreviousAct = E5Action( |
3820 QApplication.translate('ViewManager', 'Previous warning message'), |
3885 QCoreApplication.translate( |
|
3886 'ViewManager', 'Previous warning message'), |
3821 UI.PixmapCache.getIcon("warningPrev.png"), |
3887 UI.PixmapCache.getIcon("warningPrev.png"), |
3822 QApplication.translate( |
3888 QCoreApplication.translate( |
3823 'ViewManager', '&Previous warning message'), |
3889 'ViewManager', '&Previous warning message'), |
3824 0, 0, |
3890 0, 0, |
3825 self.bookmarkActGrp, 'vm_warning_previous') |
3891 self.bookmarkActGrp, 'vm_warning_previous') |
3826 self.warningsPreviousAct.setStatusTip(QApplication.translate( |
3892 self.warningsPreviousAct.setStatusTip(QCoreApplication.translate( |
3827 'ViewManager', 'Previous warning message')) |
3893 'ViewManager', 'Previous warning message')) |
3828 self.warningsPreviousAct.setWhatsThis(QApplication.translate( |
3894 self.warningsPreviousAct.setWhatsThis(QCoreApplication.translate( |
3829 'ViewManager', |
3895 'ViewManager', |
3830 """<b>Previous warning message</b>""" |
3896 """<b>Previous warning message</b>""" |
3831 """<p>Go to previous line of the current editor""" |
3897 """<p>Go to previous line of the current editor""" |
3832 """ having a pyflakes warning.</p>""" |
3898 """ having a pyflakes warning.</p>""" |
3833 )) |
3899 )) |
3834 self.warningsPreviousAct.triggered.connect(self.__previousWarning) |
3900 self.warningsPreviousAct.triggered.connect(self.__previousWarning) |
3835 self.bookmarkActions.append(self.warningsPreviousAct) |
3901 self.bookmarkActions.append(self.warningsPreviousAct) |
3836 |
3902 |
3837 self.warningsClearAct = E5Action( |
3903 self.warningsClearAct = E5Action( |
3838 QApplication.translate('ViewManager', 'Clear Warning Messages'), |
3904 QCoreApplication.translate( |
3839 QApplication.translate('ViewManager', 'Clear &Warning Messages'), |
3905 'ViewManager', 'Clear Warning Messages'), |
|
3906 QCoreApplication.translate( |
|
3907 'ViewManager', 'Clear &Warning Messages'), |
3840 0, 0, |
3908 0, 0, |
3841 self.bookmarkActGrp, 'vm_warnings_clear') |
3909 self.bookmarkActGrp, 'vm_warnings_clear') |
3842 self.warningsClearAct.setStatusTip(QApplication.translate( |
3910 self.warningsClearAct.setStatusTip(QCoreApplication.translate( |
3843 'ViewManager', 'Clear Warning Messages')) |
3911 'ViewManager', 'Clear Warning Messages')) |
3844 self.warningsClearAct.setWhatsThis(QApplication.translate( |
3912 self.warningsClearAct.setWhatsThis(QCoreApplication.translate( |
3845 'ViewManager', |
3913 'ViewManager', |
3846 """<b>Clear Warning Messages</b>""" |
3914 """<b>Clear Warning Messages</b>""" |
3847 """<p>Clear pyflakes warning messages of all editors.</p>""" |
3915 """<p>Clear pyflakes warning messages of all editors.</p>""" |
3848 )) |
3916 )) |
3849 self.warningsClearAct.triggered.connect(self.__clearAllWarnings) |
3917 self.warningsClearAct.triggered.connect(self.__clearAllWarnings) |
3850 self.bookmarkActions.append(self.warningsClearAct) |
3918 self.bookmarkActions.append(self.warningsClearAct) |
3851 |
3919 |
3852 self.notcoveredNextAct = E5Action( |
3920 self.notcoveredNextAct = E5Action( |
3853 QApplication.translate('ViewManager', 'Next uncovered line'), |
3921 QCoreApplication.translate('ViewManager', 'Next uncovered line'), |
3854 UI.PixmapCache.getIcon("notcoveredNext.png"), |
3922 UI.PixmapCache.getIcon("notcoveredNext.png"), |
3855 QApplication.translate('ViewManager', '&Next uncovered line'), |
3923 QCoreApplication.translate('ViewManager', '&Next uncovered line'), |
3856 0, 0, |
3924 0, 0, |
3857 self.bookmarkActGrp, 'vm_uncovered_next') |
3925 self.bookmarkActGrp, 'vm_uncovered_next') |
3858 self.notcoveredNextAct.setStatusTip(QApplication.translate( |
3926 self.notcoveredNextAct.setStatusTip(QCoreApplication.translate( |
3859 'ViewManager', 'Next uncovered line')) |
3927 'ViewManager', 'Next uncovered line')) |
3860 self.notcoveredNextAct.setWhatsThis(QApplication.translate( |
3928 self.notcoveredNextAct.setWhatsThis(QCoreApplication.translate( |
3861 'ViewManager', |
3929 'ViewManager', |
3862 """<b>Next uncovered line</b>""" |
3930 """<b>Next uncovered line</b>""" |
3863 """<p>Go to next line of the current editor marked as not""" |
3931 """<p>Go to next line of the current editor marked as not""" |
3864 """ covered.</p>""" |
3932 """ covered.</p>""" |
3865 )) |
3933 )) |
3866 self.notcoveredNextAct.triggered.connect(self.__nextUncovered) |
3934 self.notcoveredNextAct.triggered.connect(self.__nextUncovered) |
3867 self.bookmarkActions.append(self.notcoveredNextAct) |
3935 self.bookmarkActions.append(self.notcoveredNextAct) |
3868 |
3936 |
3869 self.notcoveredPreviousAct = E5Action( |
3937 self.notcoveredPreviousAct = E5Action( |
3870 QApplication.translate('ViewManager', 'Previous uncovered line'), |
3938 QCoreApplication.translate( |
|
3939 'ViewManager', 'Previous uncovered line'), |
3871 UI.PixmapCache.getIcon("notcoveredPrev.png"), |
3940 UI.PixmapCache.getIcon("notcoveredPrev.png"), |
3872 QApplication.translate( |
3941 QCoreApplication.translate( |
3873 'ViewManager', '&Previous uncovered line'), |
3942 'ViewManager', '&Previous uncovered line'), |
3874 0, 0, |
3943 0, 0, |
3875 self.bookmarkActGrp, 'vm_uncovered_previous') |
3944 self.bookmarkActGrp, 'vm_uncovered_previous') |
3876 self.notcoveredPreviousAct.setStatusTip(QApplication.translate( |
3945 self.notcoveredPreviousAct.setStatusTip(QCoreApplication.translate( |
3877 'ViewManager', 'Previous uncovered line')) |
3946 'ViewManager', 'Previous uncovered line')) |
3878 self.notcoveredPreviousAct.setWhatsThis(QApplication.translate( |
3947 self.notcoveredPreviousAct.setWhatsThis(QCoreApplication.translate( |
3879 'ViewManager', |
3948 'ViewManager', |
3880 """<b>Previous uncovered line</b>""" |
3949 """<b>Previous uncovered line</b>""" |
3881 """<p>Go to previous line of the current editor marked""" |
3950 """<p>Go to previous line of the current editor marked""" |
3882 """ as not covered.</p>""" |
3951 """ as not covered.</p>""" |
3883 )) |
3952 )) |
3884 self.notcoveredPreviousAct.triggered.connect( |
3953 self.notcoveredPreviousAct.triggered.connect( |
3885 self.__previousUncovered) |
3954 self.__previousUncovered) |
3886 self.bookmarkActions.append(self.notcoveredPreviousAct) |
3955 self.bookmarkActions.append(self.notcoveredPreviousAct) |
3887 |
3956 |
3888 self.taskNextAct = E5Action( |
3957 self.taskNextAct = E5Action( |
3889 QApplication.translate('ViewManager', 'Next Task'), |
3958 QCoreApplication.translate('ViewManager', 'Next Task'), |
3890 UI.PixmapCache.getIcon("taskNext.png"), |
3959 UI.PixmapCache.getIcon("taskNext.png"), |
3891 QApplication.translate('ViewManager', '&Next Task'), |
3960 QCoreApplication.translate('ViewManager', '&Next Task'), |
3892 0, 0, |
3961 0, 0, |
3893 self.bookmarkActGrp, 'vm_task_next') |
3962 self.bookmarkActGrp, 'vm_task_next') |
3894 self.taskNextAct.setStatusTip(QApplication.translate( |
3963 self.taskNextAct.setStatusTip(QCoreApplication.translate( |
3895 'ViewManager', 'Next Task')) |
3964 'ViewManager', 'Next Task')) |
3896 self.taskNextAct.setWhatsThis(QApplication.translate( |
3965 self.taskNextAct.setWhatsThis(QCoreApplication.translate( |
3897 'ViewManager', |
3966 'ViewManager', |
3898 """<b>Next Task</b>""" |
3967 """<b>Next Task</b>""" |
3899 """<p>Go to next line of the current editor having a task.</p>""" |
3968 """<p>Go to next line of the current editor having a task.</p>""" |
3900 )) |
3969 )) |
3901 self.taskNextAct.triggered.connect(self.__nextTask) |
3970 self.taskNextAct.triggered.connect(self.__nextTask) |
3902 self.bookmarkActions.append(self.taskNextAct) |
3971 self.bookmarkActions.append(self.taskNextAct) |
3903 |
3972 |
3904 self.taskPreviousAct = E5Action( |
3973 self.taskPreviousAct = E5Action( |
3905 QApplication.translate('ViewManager', 'Previous Task'), |
3974 QCoreApplication.translate('ViewManager', 'Previous Task'), |
3906 UI.PixmapCache.getIcon("taskPrev.png"), |
3975 UI.PixmapCache.getIcon("taskPrev.png"), |
3907 QApplication.translate( |
3976 QCoreApplication.translate( |
3908 'ViewManager', '&Previous Task'), |
3977 'ViewManager', '&Previous Task'), |
3909 0, 0, |
3978 0, 0, |
3910 self.bookmarkActGrp, 'vm_task_previous') |
3979 self.bookmarkActGrp, 'vm_task_previous') |
3911 self.taskPreviousAct.setStatusTip(QApplication.translate( |
3980 self.taskPreviousAct.setStatusTip(QCoreApplication.translate( |
3912 'ViewManager', 'Previous Task')) |
3981 'ViewManager', 'Previous Task')) |
3913 self.taskPreviousAct.setWhatsThis(QApplication.translate( |
3982 self.taskPreviousAct.setWhatsThis(QCoreApplication.translate( |
3914 'ViewManager', |
3983 'ViewManager', |
3915 """<b>Previous Task</b>""" |
3984 """<b>Previous Task</b>""" |
3916 """<p>Go to previous line of the current editor having a""" |
3985 """<p>Go to previous line of the current editor having a""" |
3917 """ task.</p>""" |
3986 """ task.</p>""" |
3918 )) |
3987 )) |
3919 self.taskPreviousAct.triggered.connect(self.__previousTask) |
3988 self.taskPreviousAct.triggered.connect(self.__previousTask) |
3920 self.bookmarkActions.append(self.taskPreviousAct) |
3989 self.bookmarkActions.append(self.taskPreviousAct) |
3921 |
3990 |
3922 self.changeNextAct = E5Action( |
3991 self.changeNextAct = E5Action( |
3923 QApplication.translate('ViewManager', 'Next Change'), |
3992 QCoreApplication.translate('ViewManager', 'Next Change'), |
3924 UI.PixmapCache.getIcon("changeNext.png"), |
3993 UI.PixmapCache.getIcon("changeNext.png"), |
3925 QApplication.translate('ViewManager', '&Next Change'), |
3994 QCoreApplication.translate('ViewManager', '&Next Change'), |
3926 0, 0, |
3995 0, 0, |
3927 self.bookmarkActGrp, 'vm_change_next') |
3996 self.bookmarkActGrp, 'vm_change_next') |
3928 self.changeNextAct.setStatusTip(QApplication.translate( |
3997 self.changeNextAct.setStatusTip(QCoreApplication.translate( |
3929 'ViewManager', 'Next Change')) |
3998 'ViewManager', 'Next Change')) |
3930 self.changeNextAct.setWhatsThis(QApplication.translate( |
3999 self.changeNextAct.setWhatsThis(QCoreApplication.translate( |
3931 'ViewManager', |
4000 'ViewManager', |
3932 """<b>Next Change</b>""" |
4001 """<b>Next Change</b>""" |
3933 """<p>Go to next line of the current editor having a change""" |
4002 """<p>Go to next line of the current editor having a change""" |
3934 """ marker.</p>""" |
4003 """ marker.</p>""" |
3935 )) |
4004 )) |
3936 self.changeNextAct.triggered.connect(self.__nextChange) |
4005 self.changeNextAct.triggered.connect(self.__nextChange) |
3937 self.bookmarkActions.append(self.changeNextAct) |
4006 self.bookmarkActions.append(self.changeNextAct) |
3938 |
4007 |
3939 self.changePreviousAct = E5Action( |
4008 self.changePreviousAct = E5Action( |
3940 QApplication.translate('ViewManager', 'Previous Change'), |
4009 QCoreApplication.translate('ViewManager', 'Previous Change'), |
3941 UI.PixmapCache.getIcon("changePrev.png"), |
4010 UI.PixmapCache.getIcon("changePrev.png"), |
3942 QApplication.translate( |
4011 QCoreApplication.translate( |
3943 'ViewManager', '&Previous Change'), |
4012 'ViewManager', '&Previous Change'), |
3944 0, 0, |
4013 0, 0, |
3945 self.bookmarkActGrp, 'vm_change_previous') |
4014 self.bookmarkActGrp, 'vm_change_previous') |
3946 self.changePreviousAct.setStatusTip(QApplication.translate( |
4015 self.changePreviousAct.setStatusTip(QCoreApplication.translate( |
3947 'ViewManager', 'Previous Change')) |
4016 'ViewManager', 'Previous Change')) |
3948 self.changePreviousAct.setWhatsThis(QApplication.translate( |
4017 self.changePreviousAct.setWhatsThis(QCoreApplication.translate( |
3949 'ViewManager', |
4018 'ViewManager', |
3950 """<b>Previous Change</b>""" |
4019 """<b>Previous Change</b>""" |
3951 """<p>Go to previous line of the current editor having""" |
4020 """<p>Go to previous line of the current editor having""" |
3952 """ a change marker.</p>""" |
4021 """ a change marker.</p>""" |
3953 )) |
4022 )) |