815 menu.addAction(self.saveAllAct) |
894 menu.addAction(self.saveAllAct) |
816 self.exportersMenuAct = menu.addMenu(self.exportersMenu) |
895 self.exportersMenuAct = menu.addMenu(self.exportersMenu) |
817 menu.addSeparator() |
896 menu.addSeparator() |
818 menu.addAction(self.printPreviewAct) |
897 menu.addAction(self.printPreviewAct) |
819 menu.addAction(self.printAct) |
898 menu.addAction(self.printAct) |
820 |
899 |
821 self.recentMenu.aboutToShow.connect(self.__showRecentMenu) |
900 self.recentMenu.aboutToShow.connect(self.__showRecentMenu) |
822 self.recentMenu.triggered.connect(self.__openSourceFile) |
901 self.recentMenu.triggered.connect(self.__openSourceFile) |
823 self.bookmarkedMenu.aboutToShow.connect(self.__showBookmarkedMenu) |
902 self.bookmarkedMenu.aboutToShow.connect(self.__showBookmarkedMenu) |
824 self.bookmarkedMenu.triggered.connect(self.__openSourceFile) |
903 self.bookmarkedMenu.triggered.connect(self.__openSourceFile) |
825 menu.aboutToShow.connect(self.__showFileMenu) |
904 menu.aboutToShow.connect(self.__showFileMenu) |
826 |
905 |
827 self.exportersMenuAct.setEnabled(False) |
906 self.exportersMenuAct.setEnabled(False) |
828 |
907 |
829 return menu |
908 return menu |
830 |
909 |
831 def initFileToolbar(self, toolbarManager): |
910 def initFileToolbar(self, toolbarManager): |
832 """ |
911 """ |
833 Public method to create the File toolbar. |
912 Public method to create the File toolbar. |
834 |
913 |
835 @param toolbarManager reference to a toolbar manager object |
914 @param toolbarManager reference to a toolbar manager object |
836 (EricToolBarManager) |
915 (EricToolBarManager) |
837 @return the generated toolbar |
916 @return the generated toolbar |
838 """ |
917 """ |
839 tb = QToolBar(QCoreApplication.translate('ViewManager', 'File'), |
918 tb = QToolBar(QCoreApplication.translate("ViewManager", "File"), self.ui) |
840 self.ui) |
|
841 tb.setIconSize(UI.Config.ToolBarIconSize) |
919 tb.setIconSize(UI.Config.ToolBarIconSize) |
842 tb.setObjectName("FileToolbar") |
920 tb.setObjectName("FileToolbar") |
843 tb.setToolTip(QCoreApplication.translate('ViewManager', 'File')) |
921 tb.setToolTip(QCoreApplication.translate("ViewManager", "File")) |
844 |
922 |
845 tb.addAction(self.newAct) |
923 tb.addAction(self.newAct) |
846 tb.addAction(self.openAct) |
924 tb.addAction(self.openAct) |
847 tb.addAction(self.closeAct) |
925 tb.addAction(self.closeAct) |
848 tb.addSeparator() |
926 tb.addSeparator() |
849 tb.addAction(self.saveAct) |
927 tb.addAction(self.saveAct) |
850 tb.addAction(self.saveAsAct) |
928 tb.addAction(self.saveAsAct) |
851 tb.addAction(self.saveCopyAct) |
929 tb.addAction(self.saveCopyAct) |
852 tb.addAction(self.saveAllAct) |
930 tb.addAction(self.saveAllAct) |
853 |
931 |
854 toolbarManager.addToolBar(tb, tb.windowTitle()) |
932 toolbarManager.addToolBar(tb, tb.windowTitle()) |
855 toolbarManager.addAction(self.printPreviewAct, tb.windowTitle()) |
933 toolbarManager.addAction(self.printPreviewAct, tb.windowTitle()) |
856 toolbarManager.addAction(self.printAct, tb.windowTitle()) |
934 toolbarManager.addAction(self.printAct, tb.windowTitle()) |
857 |
935 |
858 return tb |
936 return tb |
859 |
937 |
860 def __initContextMenuExporters(self): |
938 def __initContextMenuExporters(self): |
861 """ |
939 """ |
862 Private method used to setup the Exporters sub menu. |
940 Private method used to setup the Exporters sub menu. |
863 |
941 |
864 @return reference to the generated menu (QMenu) |
942 @return reference to the generated menu (QMenu) |
865 """ |
943 """ |
866 menu = QMenu(QCoreApplication.translate('ViewManager', "Export as")) |
944 menu = QMenu(QCoreApplication.translate("ViewManager", "Export as")) |
867 |
945 |
868 import QScintilla.Exporters |
946 import QScintilla.Exporters |
|
947 |
869 supportedExporters = QScintilla.Exporters.getSupportedFormats() |
948 supportedExporters = QScintilla.Exporters.getSupportedFormats() |
870 exporters = sorted(supportedExporters.keys()) |
949 exporters = sorted(supportedExporters.keys()) |
871 for exporter in exporters: |
950 for exporter in exporters: |
872 act = menu.addAction(supportedExporters[exporter]) |
951 act = menu.addAction(supportedExporters[exporter]) |
873 act.setData(exporter) |
952 act.setData(exporter) |
874 |
953 |
875 menu.triggered.connect(self.__exportMenuTriggered) |
954 menu.triggered.connect(self.__exportMenuTriggered) |
876 |
955 |
877 return menu |
956 return menu |
878 |
957 |
879 ################################################################## |
958 ################################################################## |
880 ## Initialize the edit related actions, edit menu and toolbar |
959 ## Initialize the edit related actions, edit menu and toolbar |
881 ################################################################## |
960 ################################################################## |
882 |
961 |
883 def __initEditActions(self): |
962 def __initEditActions(self): |
884 """ |
963 """ |
885 Private method defining the user interface actions for the edit |
964 Private method defining the user interface actions for the edit |
886 commands. |
965 commands. |
887 """ |
966 """ |
888 self.editActGrp = createActionGroup(self) |
967 self.editActGrp = createActionGroup(self) |
889 |
968 |
890 self.undoAct = EricAction( |
969 self.undoAct = EricAction( |
891 QCoreApplication.translate('ViewManager', 'Undo'), |
970 QCoreApplication.translate("ViewManager", "Undo"), |
892 UI.PixmapCache.getIcon("editUndo"), |
971 UI.PixmapCache.getIcon("editUndo"), |
893 QCoreApplication.translate('ViewManager', '&Undo'), |
972 QCoreApplication.translate("ViewManager", "&Undo"), |
894 QKeySequence(QCoreApplication.translate( |
973 QKeySequence( |
895 'ViewManager', "Ctrl+Z", "Edit|Undo")), |
974 QCoreApplication.translate("ViewManager", "Ctrl+Z", "Edit|Undo") |
896 QKeySequence(QCoreApplication.translate( |
975 ), |
897 'ViewManager', "Alt+Backspace", "Edit|Undo")), |
976 QKeySequence( |
898 self.editActGrp, 'vm_edit_undo') |
977 QCoreApplication.translate("ViewManager", "Alt+Backspace", "Edit|Undo") |
899 self.undoAct.setStatusTip(QCoreApplication.translate( |
978 ), |
900 'ViewManager', 'Undo the last change')) |
979 self.editActGrp, |
901 self.undoAct.setWhatsThis(QCoreApplication.translate( |
980 "vm_edit_undo", |
902 'ViewManager', |
981 ) |
903 """<b>Undo</b>""" |
982 self.undoAct.setStatusTip( |
904 """<p>Undo the last change done in the current editor.</p>""" |
983 QCoreApplication.translate("ViewManager", "Undo the last change") |
905 )) |
984 ) |
|
985 self.undoAct.setWhatsThis( |
|
986 QCoreApplication.translate( |
|
987 "ViewManager", |
|
988 """<b>Undo</b>""" |
|
989 """<p>Undo the last change done in the current editor.</p>""", |
|
990 ) |
|
991 ) |
906 self.undoAct.triggered.connect(self.__editUndo) |
992 self.undoAct.triggered.connect(self.__editUndo) |
907 self.editActions.append(self.undoAct) |
993 self.editActions.append(self.undoAct) |
908 |
994 |
909 self.redoAct = EricAction( |
995 self.redoAct = EricAction( |
910 QCoreApplication.translate('ViewManager', 'Redo'), |
996 QCoreApplication.translate("ViewManager", "Redo"), |
911 UI.PixmapCache.getIcon("editRedo"), |
997 UI.PixmapCache.getIcon("editRedo"), |
912 QCoreApplication.translate('ViewManager', '&Redo'), |
998 QCoreApplication.translate("ViewManager", "&Redo"), |
913 QKeySequence(QCoreApplication.translate( |
999 QKeySequence( |
914 'ViewManager', "Ctrl+Shift+Z", "Edit|Redo")), |
1000 QCoreApplication.translate("ViewManager", "Ctrl+Shift+Z", "Edit|Redo") |
915 0, |
1001 ), |
916 self.editActGrp, 'vm_edit_redo') |
1002 0, |
917 self.redoAct.setStatusTip(QCoreApplication.translate( |
1003 self.editActGrp, |
918 'ViewManager', 'Redo the last change')) |
1004 "vm_edit_redo", |
919 self.redoAct.setWhatsThis(QCoreApplication.translate( |
1005 ) |
920 'ViewManager', |
1006 self.redoAct.setStatusTip( |
921 """<b>Redo</b>""" |
1007 QCoreApplication.translate("ViewManager", "Redo the last change") |
922 """<p>Redo the last change done in the current editor.</p>""" |
1008 ) |
923 )) |
1009 self.redoAct.setWhatsThis( |
|
1010 QCoreApplication.translate( |
|
1011 "ViewManager", |
|
1012 """<b>Redo</b>""" |
|
1013 """<p>Redo the last change done in the current editor.</p>""", |
|
1014 ) |
|
1015 ) |
924 self.redoAct.triggered.connect(self.__editRedo) |
1016 self.redoAct.triggered.connect(self.__editRedo) |
925 self.editActions.append(self.redoAct) |
1017 self.editActions.append(self.redoAct) |
926 |
1018 |
927 self.revertAct = EricAction( |
1019 self.revertAct = EricAction( |
928 QCoreApplication.translate( |
1020 QCoreApplication.translate("ViewManager", "Revert to last saved state"), |
929 'ViewManager', 'Revert to last saved state'), |
1021 QCoreApplication.translate("ViewManager", "Re&vert to last saved state"), |
930 QCoreApplication.translate( |
1022 QKeySequence( |
931 'ViewManager', 'Re&vert to last saved state'), |
1023 QCoreApplication.translate("ViewManager", "Ctrl+Y", "Edit|Revert") |
932 QKeySequence(QCoreApplication.translate( |
1024 ), |
933 'ViewManager', "Ctrl+Y", "Edit|Revert")), |
1025 0, |
934 0, |
1026 self.editActGrp, |
935 self.editActGrp, 'vm_edit_revert') |
1027 "vm_edit_revert", |
936 self.revertAct.setStatusTip(QCoreApplication.translate( |
1028 ) |
937 'ViewManager', 'Revert to last saved state')) |
1029 self.revertAct.setStatusTip( |
938 self.revertAct.setWhatsThis(QCoreApplication.translate( |
1030 QCoreApplication.translate("ViewManager", "Revert to last saved state") |
939 'ViewManager', |
1031 ) |
940 """<b>Revert to last saved state</b>""" |
1032 self.revertAct.setWhatsThis( |
941 """<p>Undo all changes up to the last saved state""" |
1033 QCoreApplication.translate( |
942 """ of the current editor.</p>""" |
1034 "ViewManager", |
943 )) |
1035 """<b>Revert to last saved state</b>""" |
|
1036 """<p>Undo all changes up to the last saved state""" |
|
1037 """ of the current editor.</p>""", |
|
1038 ) |
|
1039 ) |
944 self.revertAct.triggered.connect(self.__editRevert) |
1040 self.revertAct.triggered.connect(self.__editRevert) |
945 self.editActions.append(self.revertAct) |
1041 self.editActions.append(self.revertAct) |
946 |
1042 |
947 self.copyActGrp = createActionGroup(self.editActGrp) |
1043 self.copyActGrp = createActionGroup(self.editActGrp) |
948 |
1044 |
949 self.cutAct = EricAction( |
1045 self.cutAct = EricAction( |
950 QCoreApplication.translate('ViewManager', 'Cut'), |
1046 QCoreApplication.translate("ViewManager", "Cut"), |
951 UI.PixmapCache.getIcon("editCut"), |
1047 UI.PixmapCache.getIcon("editCut"), |
952 QCoreApplication.translate('ViewManager', 'Cu&t'), |
1048 QCoreApplication.translate("ViewManager", "Cu&t"), |
953 QKeySequence(QCoreApplication.translate( |
1049 QKeySequence( |
954 'ViewManager', "Ctrl+X", "Edit|Cut")), |
1050 QCoreApplication.translate("ViewManager", "Ctrl+X", "Edit|Cut") |
955 QKeySequence(QCoreApplication.translate( |
1051 ), |
956 'ViewManager', "Shift+Del", "Edit|Cut")), |
1052 QKeySequence( |
957 self.copyActGrp, 'vm_edit_cut') |
1053 QCoreApplication.translate("ViewManager", "Shift+Del", "Edit|Cut") |
958 self.cutAct.setStatusTip(QCoreApplication.translate( |
1054 ), |
959 'ViewManager', 'Cut the selection')) |
1055 self.copyActGrp, |
960 self.cutAct.setWhatsThis(QCoreApplication.translate( |
1056 "vm_edit_cut", |
961 'ViewManager', |
1057 ) |
962 """<b>Cut</b>""" |
1058 self.cutAct.setStatusTip( |
963 """<p>Cut the selected text of the current editor to the""" |
1059 QCoreApplication.translate("ViewManager", "Cut the selection") |
964 """ clipboard.</p>""" |
1060 ) |
965 )) |
1061 self.cutAct.setWhatsThis( |
|
1062 QCoreApplication.translate( |
|
1063 "ViewManager", |
|
1064 """<b>Cut</b>""" |
|
1065 """<p>Cut the selected text of the current editor to the""" |
|
1066 """ clipboard.</p>""", |
|
1067 ) |
|
1068 ) |
966 self.cutAct.triggered.connect(self.__editCut) |
1069 self.cutAct.triggered.connect(self.__editCut) |
967 self.editActions.append(self.cutAct) |
1070 self.editActions.append(self.cutAct) |
968 |
1071 |
969 self.copyAct = EricAction( |
1072 self.copyAct = EricAction( |
970 QCoreApplication.translate('ViewManager', 'Copy'), |
1073 QCoreApplication.translate("ViewManager", "Copy"), |
971 UI.PixmapCache.getIcon("editCopy"), |
1074 UI.PixmapCache.getIcon("editCopy"), |
972 QCoreApplication.translate('ViewManager', '&Copy'), |
1075 QCoreApplication.translate("ViewManager", "&Copy"), |
973 QKeySequence(QCoreApplication.translate( |
1076 QKeySequence( |
974 'ViewManager', "Ctrl+C", "Edit|Copy")), |
1077 QCoreApplication.translate("ViewManager", "Ctrl+C", "Edit|Copy") |
975 QKeySequence(QCoreApplication.translate( |
1078 ), |
976 'ViewManager', "Ctrl+Ins", "Edit|Copy")), |
1079 QKeySequence( |
977 self.copyActGrp, 'vm_edit_copy') |
1080 QCoreApplication.translate("ViewManager", "Ctrl+Ins", "Edit|Copy") |
978 self.copyAct.setStatusTip(QCoreApplication.translate( |
1081 ), |
979 'ViewManager', 'Copy the selection')) |
1082 self.copyActGrp, |
980 self.copyAct.setWhatsThis(QCoreApplication.translate( |
1083 "vm_edit_copy", |
981 'ViewManager', |
1084 ) |
982 """<b>Copy</b>""" |
1085 self.copyAct.setStatusTip( |
983 """<p>Copy the selected text of the current editor to the""" |
1086 QCoreApplication.translate("ViewManager", "Copy the selection") |
984 """ clipboard.</p>""" |
1087 ) |
985 )) |
1088 self.copyAct.setWhatsThis( |
|
1089 QCoreApplication.translate( |
|
1090 "ViewManager", |
|
1091 """<b>Copy</b>""" |
|
1092 """<p>Copy the selected text of the current editor to the""" |
|
1093 """ clipboard.</p>""", |
|
1094 ) |
|
1095 ) |
986 self.copyAct.triggered.connect(self.__editCopy) |
1096 self.copyAct.triggered.connect(self.__editCopy) |
987 self.editActions.append(self.copyAct) |
1097 self.editActions.append(self.copyAct) |
988 |
1098 |
989 self.pasteAct = EricAction( |
1099 self.pasteAct = EricAction( |
990 QCoreApplication.translate('ViewManager', 'Paste'), |
1100 QCoreApplication.translate("ViewManager", "Paste"), |
991 UI.PixmapCache.getIcon("editPaste"), |
1101 UI.PixmapCache.getIcon("editPaste"), |
992 QCoreApplication.translate('ViewManager', '&Paste'), |
1102 QCoreApplication.translate("ViewManager", "&Paste"), |
993 QKeySequence(QCoreApplication.translate( |
1103 QKeySequence( |
994 'ViewManager', "Ctrl+V", "Edit|Paste")), |
1104 QCoreApplication.translate("ViewManager", "Ctrl+V", "Edit|Paste") |
995 QKeySequence(QCoreApplication.translate( |
1105 ), |
996 'ViewManager', "Shift+Ins", "Edit|Paste")), |
1106 QKeySequence( |
997 self.copyActGrp, 'vm_edit_paste') |
1107 QCoreApplication.translate("ViewManager", "Shift+Ins", "Edit|Paste") |
998 self.pasteAct.setStatusTip(QCoreApplication.translate( |
1108 ), |
999 'ViewManager', 'Paste the last cut/copied text')) |
1109 self.copyActGrp, |
1000 self.pasteAct.setWhatsThis(QCoreApplication.translate( |
1110 "vm_edit_paste", |
1001 'ViewManager', |
1111 ) |
1002 """<b>Paste</b>""" |
1112 self.pasteAct.setStatusTip( |
1003 """<p>Paste the last cut/copied text from the clipboard to""" |
1113 QCoreApplication.translate("ViewManager", "Paste the last cut/copied text") |
1004 """ the current editor.</p>""" |
1114 ) |
1005 )) |
1115 self.pasteAct.setWhatsThis( |
|
1116 QCoreApplication.translate( |
|
1117 "ViewManager", |
|
1118 """<b>Paste</b>""" |
|
1119 """<p>Paste the last cut/copied text from the clipboard to""" |
|
1120 """ the current editor.</p>""", |
|
1121 ) |
|
1122 ) |
1006 self.pasteAct.triggered.connect(self.__editPaste) |
1123 self.pasteAct.triggered.connect(self.__editPaste) |
1007 self.editActions.append(self.pasteAct) |
1124 self.editActions.append(self.pasteAct) |
1008 |
1125 |
1009 self.deleteAct = EricAction( |
1126 self.deleteAct = EricAction( |
1010 QCoreApplication.translate('ViewManager', 'Clear'), |
1127 QCoreApplication.translate("ViewManager", "Clear"), |
1011 UI.PixmapCache.getIcon("editDelete"), |
1128 UI.PixmapCache.getIcon("editDelete"), |
1012 QCoreApplication.translate('ViewManager', 'Clear'), |
1129 QCoreApplication.translate("ViewManager", "Clear"), |
1013 QKeySequence(QCoreApplication.translate( |
1130 QKeySequence( |
1014 'ViewManager', "Alt+Shift+C", "Edit|Clear")), |
1131 QCoreApplication.translate("ViewManager", "Alt+Shift+C", "Edit|Clear") |
1015 0, |
1132 ), |
1016 self.copyActGrp, 'vm_edit_clear') |
1133 0, |
1017 self.deleteAct.setStatusTip(QCoreApplication.translate( |
1134 self.copyActGrp, |
1018 'ViewManager', 'Clear all text')) |
1135 "vm_edit_clear", |
1019 self.deleteAct.setWhatsThis(QCoreApplication.translate( |
1136 ) |
1020 'ViewManager', |
1137 self.deleteAct.setStatusTip( |
1021 """<b>Clear</b>""" |
1138 QCoreApplication.translate("ViewManager", "Clear all text") |
1022 """<p>Delete all text of the current editor.</p>""" |
1139 ) |
1023 )) |
1140 self.deleteAct.setWhatsThis( |
|
1141 QCoreApplication.translate( |
|
1142 "ViewManager", |
|
1143 """<b>Clear</b>""" """<p>Delete all text of the current editor.</p>""", |
|
1144 ) |
|
1145 ) |
1024 self.deleteAct.triggered.connect(self.__editDelete) |
1146 self.deleteAct.triggered.connect(self.__editDelete) |
1025 self.editActions.append(self.deleteAct) |
1147 self.editActions.append(self.deleteAct) |
1026 |
1148 |
1027 self.joinAct = EricAction( |
1149 self.joinAct = EricAction( |
1028 QCoreApplication.translate('ViewManager', 'Join Lines'), |
1150 QCoreApplication.translate("ViewManager", "Join Lines"), |
1029 QCoreApplication.translate('ViewManager', 'Join Lines'), |
1151 QCoreApplication.translate("ViewManager", "Join Lines"), |
1030 QKeySequence(QCoreApplication.translate( |
1152 QKeySequence( |
1031 'ViewManager', "Ctrl+J", "Edit|Join Lines")), |
1153 QCoreApplication.translate("ViewManager", "Ctrl+J", "Edit|Join Lines") |
1032 0, |
1154 ), |
1033 self.editActGrp, 'vm_edit_join_lines') |
1155 0, |
1034 self.joinAct.setStatusTip(QCoreApplication.translate( |
1156 self.editActGrp, |
1035 'ViewManager', 'Join Lines')) |
1157 "vm_edit_join_lines", |
1036 self.joinAct.setWhatsThis(QCoreApplication.translate( |
1158 ) |
1037 'ViewManager', |
1159 self.joinAct.setStatusTip( |
1038 """<b>Join Lines</b>""" |
1160 QCoreApplication.translate("ViewManager", "Join Lines") |
1039 """<p>Join the current and the next lines.</p>""" |
1161 ) |
1040 )) |
1162 self.joinAct.setWhatsThis( |
|
1163 QCoreApplication.translate( |
|
1164 "ViewManager", |
|
1165 """<b>Join Lines</b>""" |
|
1166 """<p>Join the current and the next lines.</p>""", |
|
1167 ) |
|
1168 ) |
1041 self.joinAct.triggered.connect(self.__editJoin) |
1169 self.joinAct.triggered.connect(self.__editJoin) |
1042 self.editActions.append(self.joinAct) |
1170 self.editActions.append(self.joinAct) |
1043 |
1171 |
1044 self.indentAct = EricAction( |
1172 self.indentAct = EricAction( |
1045 QCoreApplication.translate('ViewManager', 'Indent'), |
1173 QCoreApplication.translate("ViewManager", "Indent"), |
1046 UI.PixmapCache.getIcon("editIndent"), |
1174 UI.PixmapCache.getIcon("editIndent"), |
1047 QCoreApplication.translate('ViewManager', '&Indent'), |
1175 QCoreApplication.translate("ViewManager", "&Indent"), |
1048 QKeySequence(QCoreApplication.translate( |
1176 QKeySequence( |
1049 'ViewManager', "Ctrl+I", "Edit|Indent")), |
1177 QCoreApplication.translate("ViewManager", "Ctrl+I", "Edit|Indent") |
1050 0, |
1178 ), |
1051 self.editActGrp, 'vm_edit_indent') |
1179 0, |
1052 self.indentAct.setStatusTip(QCoreApplication.translate( |
1180 self.editActGrp, |
1053 'ViewManager', 'Indent line')) |
1181 "vm_edit_indent", |
1054 self.indentAct.setWhatsThis(QCoreApplication.translate( |
1182 ) |
1055 'ViewManager', |
1183 self.indentAct.setStatusTip( |
1056 """<b>Indent</b>""" |
1184 QCoreApplication.translate("ViewManager", "Indent line") |
1057 """<p>Indents the current line or the lines of the""" |
1185 ) |
1058 """ selection by one level.</p>""" |
1186 self.indentAct.setWhatsThis( |
1059 )) |
1187 QCoreApplication.translate( |
|
1188 "ViewManager", |
|
1189 """<b>Indent</b>""" |
|
1190 """<p>Indents the current line or the lines of the""" |
|
1191 """ selection by one level.</p>""", |
|
1192 ) |
|
1193 ) |
1060 self.indentAct.triggered.connect(self.__editIndent) |
1194 self.indentAct.triggered.connect(self.__editIndent) |
1061 self.editActions.append(self.indentAct) |
1195 self.editActions.append(self.indentAct) |
1062 |
1196 |
1063 self.unindentAct = EricAction( |
1197 self.unindentAct = EricAction( |
1064 QCoreApplication.translate('ViewManager', 'Unindent'), |
1198 QCoreApplication.translate("ViewManager", "Unindent"), |
1065 UI.PixmapCache.getIcon("editUnindent"), |
1199 UI.PixmapCache.getIcon("editUnindent"), |
1066 QCoreApplication.translate('ViewManager', 'U&nindent'), |
1200 QCoreApplication.translate("ViewManager", "U&nindent"), |
1067 QKeySequence(QCoreApplication.translate( |
1201 QKeySequence( |
1068 'ViewManager', "Ctrl+Shift+I", "Edit|Unindent")), |
1202 QCoreApplication.translate( |
1069 0, |
1203 "ViewManager", "Ctrl+Shift+I", "Edit|Unindent" |
1070 self.editActGrp, 'vm_edit_unindent') |
1204 ) |
1071 self.unindentAct.setStatusTip(QCoreApplication.translate( |
1205 ), |
1072 'ViewManager', 'Unindent line')) |
1206 0, |
1073 self.unindentAct.setWhatsThis(QCoreApplication.translate( |
1207 self.editActGrp, |
1074 'ViewManager', |
1208 "vm_edit_unindent", |
1075 """<b>Unindent</b>""" |
1209 ) |
1076 """<p>Unindents the current line or the lines of the""" |
1210 self.unindentAct.setStatusTip( |
1077 """ selection by one level.</p>""" |
1211 QCoreApplication.translate("ViewManager", "Unindent line") |
1078 )) |
1212 ) |
|
1213 self.unindentAct.setWhatsThis( |
|
1214 QCoreApplication.translate( |
|
1215 "ViewManager", |
|
1216 """<b>Unindent</b>""" |
|
1217 """<p>Unindents the current line or the lines of the""" |
|
1218 """ selection by one level.</p>""", |
|
1219 ) |
|
1220 ) |
1079 self.unindentAct.triggered.connect(self.__editUnindent) |
1221 self.unindentAct.triggered.connect(self.__editUnindent) |
1080 self.editActions.append(self.unindentAct) |
1222 self.editActions.append(self.unindentAct) |
1081 |
1223 |
1082 self.smartIndentAct = EricAction( |
1224 self.smartIndentAct = EricAction( |
1083 QCoreApplication.translate('ViewManager', 'Smart indent'), |
1225 QCoreApplication.translate("ViewManager", "Smart indent"), |
1084 UI.PixmapCache.getIcon("editSmartIndent"), |
1226 UI.PixmapCache.getIcon("editSmartIndent"), |
1085 QCoreApplication.translate('ViewManager', 'Smart indent'), |
1227 QCoreApplication.translate("ViewManager", "Smart indent"), |
1086 0, 0, |
1228 0, |
1087 self.editActGrp, 'vm_edit_smart_indent') |
1229 0, |
1088 self.smartIndentAct.setStatusTip(QCoreApplication.translate( |
1230 self.editActGrp, |
1089 'ViewManager', 'Smart indent Line or Selection')) |
1231 "vm_edit_smart_indent", |
1090 self.smartIndentAct.setWhatsThis(QCoreApplication.translate( |
1232 ) |
1091 'ViewManager', |
1233 self.smartIndentAct.setStatusTip( |
1092 """<b>Smart indent</b>""" |
1234 QCoreApplication.translate("ViewManager", "Smart indent Line or Selection") |
1093 """<p>Indents the current line or the lines of the""" |
1235 ) |
1094 """ current selection smartly.</p>""" |
1236 self.smartIndentAct.setWhatsThis( |
1095 )) |
1237 QCoreApplication.translate( |
|
1238 "ViewManager", |
|
1239 """<b>Smart indent</b>""" |
|
1240 """<p>Indents the current line or the lines of the""" |
|
1241 """ current selection smartly.</p>""", |
|
1242 ) |
|
1243 ) |
1096 self.smartIndentAct.triggered.connect(self.__editSmartIndent) |
1244 self.smartIndentAct.triggered.connect(self.__editSmartIndent) |
1097 self.editActions.append(self.smartIndentAct) |
1245 self.editActions.append(self.smartIndentAct) |
1098 |
1246 |
1099 self.commentAct = EricAction( |
1247 self.commentAct = EricAction( |
1100 QCoreApplication.translate('ViewManager', 'Comment'), |
1248 QCoreApplication.translate("ViewManager", "Comment"), |
1101 UI.PixmapCache.getIcon("editComment"), |
1249 UI.PixmapCache.getIcon("editComment"), |
1102 QCoreApplication.translate('ViewManager', 'C&omment'), |
1250 QCoreApplication.translate("ViewManager", "C&omment"), |
1103 QKeySequence(QCoreApplication.translate( |
1251 QKeySequence( |
1104 'ViewManager', "Ctrl+M", "Edit|Comment")), |
1252 QCoreApplication.translate("ViewManager", "Ctrl+M", "Edit|Comment") |
1105 0, |
1253 ), |
1106 self.editActGrp, 'vm_edit_comment') |
1254 0, |
1107 self.commentAct.setStatusTip(QCoreApplication.translate( |
1255 self.editActGrp, |
1108 'ViewManager', 'Comment Line or Selection')) |
1256 "vm_edit_comment", |
1109 self.commentAct.setWhatsThis(QCoreApplication.translate( |
1257 ) |
1110 'ViewManager', |
1258 self.commentAct.setStatusTip( |
1111 """<b>Comment</b>""" |
1259 QCoreApplication.translate("ViewManager", "Comment Line or Selection") |
1112 """<p>Comments the current line or the lines of the""" |
1260 ) |
1113 """ current selection.</p>""" |
1261 self.commentAct.setWhatsThis( |
1114 )) |
1262 QCoreApplication.translate( |
|
1263 "ViewManager", |
|
1264 """<b>Comment</b>""" |
|
1265 """<p>Comments the current line or the lines of the""" |
|
1266 """ current selection.</p>""", |
|
1267 ) |
|
1268 ) |
1115 self.commentAct.triggered.connect(self.__editComment) |
1269 self.commentAct.triggered.connect(self.__editComment) |
1116 self.editActions.append(self.commentAct) |
1270 self.editActions.append(self.commentAct) |
1117 |
1271 |
1118 self.uncommentAct = EricAction( |
1272 self.uncommentAct = EricAction( |
1119 QCoreApplication.translate('ViewManager', 'Uncomment'), |
1273 QCoreApplication.translate("ViewManager", "Uncomment"), |
1120 UI.PixmapCache.getIcon("editUncomment"), |
1274 UI.PixmapCache.getIcon("editUncomment"), |
1121 QCoreApplication.translate('ViewManager', 'Unco&mment'), |
1275 QCoreApplication.translate("ViewManager", "Unco&mment"), |
1122 QKeySequence(QCoreApplication.translate( |
1276 QKeySequence( |
1123 'ViewManager', "Ctrl+Shift+M", "Edit|Uncomment")), |
1277 QCoreApplication.translate( |
1124 0, |
1278 "ViewManager", "Ctrl+Shift+M", "Edit|Uncomment" |
1125 self.editActGrp, 'vm_edit_uncomment') |
1279 ) |
1126 self.uncommentAct.setStatusTip(QCoreApplication.translate( |
1280 ), |
1127 'ViewManager', 'Uncomment Line or Selection')) |
1281 0, |
1128 self.uncommentAct.setWhatsThis(QCoreApplication.translate( |
1282 self.editActGrp, |
1129 'ViewManager', |
1283 "vm_edit_uncomment", |
1130 """<b>Uncomment</b>""" |
1284 ) |
1131 """<p>Uncomments the current line or the lines of the""" |
1285 self.uncommentAct.setStatusTip( |
1132 """ current selection.</p>""" |
1286 QCoreApplication.translate("ViewManager", "Uncomment Line or Selection") |
1133 )) |
1287 ) |
|
1288 self.uncommentAct.setWhatsThis( |
|
1289 QCoreApplication.translate( |
|
1290 "ViewManager", |
|
1291 """<b>Uncomment</b>""" |
|
1292 """<p>Uncomments the current line or the lines of the""" |
|
1293 """ current selection.</p>""", |
|
1294 ) |
|
1295 ) |
1134 self.uncommentAct.triggered.connect(self.__editUncomment) |
1296 self.uncommentAct.triggered.connect(self.__editUncomment) |
1135 self.editActions.append(self.uncommentAct) |
1297 self.editActions.append(self.uncommentAct) |
1136 |
1298 |
1137 self.toggleCommentAct = EricAction( |
1299 self.toggleCommentAct = EricAction( |
1138 QCoreApplication.translate('ViewManager', 'Toggle Comment'), |
1300 QCoreApplication.translate("ViewManager", "Toggle Comment"), |
1139 UI.PixmapCache.getIcon("editToggleComment"), |
1301 UI.PixmapCache.getIcon("editToggleComment"), |
1140 QCoreApplication.translate('ViewManager', 'Toggle Comment'), |
1302 QCoreApplication.translate("ViewManager", "Toggle Comment"), |
1141 QKeySequence(QCoreApplication.translate( |
1303 QKeySequence( |
1142 'ViewManager', "Ctrl+#", "Edit|Toggle Comment")), |
1304 QCoreApplication.translate( |
1143 0, |
1305 "ViewManager", "Ctrl+#", "Edit|Toggle Comment" |
1144 self.editActGrp, 'vm_edit_toggle_comment') |
1306 ) |
1145 self.toggleCommentAct.setStatusTip(QCoreApplication.translate( |
1307 ), |
1146 'ViewManager', |
1308 0, |
1147 'Toggle the comment of the current line, selection or' |
1309 self.editActGrp, |
1148 ' comment block')) |
1310 "vm_edit_toggle_comment", |
1149 self.toggleCommentAct.setWhatsThis(QCoreApplication.translate( |
1311 ) |
1150 'ViewManager', |
1312 self.toggleCommentAct.setStatusTip( |
1151 """<b>Toggle Comment</b>""" |
1313 QCoreApplication.translate( |
1152 """<p>If the current line does not start with a block comment,""" |
1314 "ViewManager", |
1153 """ the current line or selection is commented. If it is already""" |
1315 "Toggle the comment of the current line, selection or" " comment block", |
1154 """ commented, this comment block is uncommented. </p>""" |
1316 ) |
1155 )) |
1317 ) |
|
1318 self.toggleCommentAct.setWhatsThis( |
|
1319 QCoreApplication.translate( |
|
1320 "ViewManager", |
|
1321 """<b>Toggle Comment</b>""" |
|
1322 """<p>If the current line does not start with a block comment,""" |
|
1323 """ the current line or selection is commented. If it is already""" |
|
1324 """ commented, this comment block is uncommented. </p>""", |
|
1325 ) |
|
1326 ) |
1156 self.toggleCommentAct.triggered.connect(self.__editToggleComment) |
1327 self.toggleCommentAct.triggered.connect(self.__editToggleComment) |
1157 self.editActions.append(self.toggleCommentAct) |
1328 self.editActions.append(self.toggleCommentAct) |
1158 |
1329 |
1159 self.streamCommentAct = EricAction( |
1330 self.streamCommentAct = EricAction( |
1160 QCoreApplication.translate('ViewManager', 'Stream Comment'), |
1331 QCoreApplication.translate("ViewManager", "Stream Comment"), |
1161 QCoreApplication.translate('ViewManager', 'Stream Comment'), |
1332 QCoreApplication.translate("ViewManager", "Stream Comment"), |
1162 0, 0, |
1333 0, |
1163 self.editActGrp, 'vm_edit_stream_comment') |
1334 0, |
1164 self.streamCommentAct.setStatusTip(QCoreApplication.translate( |
1335 self.editActGrp, |
1165 'ViewManager', |
1336 "vm_edit_stream_comment", |
1166 'Stream Comment Line or Selection')) |
1337 ) |
1167 self.streamCommentAct.setWhatsThis(QCoreApplication.translate( |
1338 self.streamCommentAct.setStatusTip( |
1168 'ViewManager', |
1339 QCoreApplication.translate( |
1169 """<b>Stream Comment</b>""" |
1340 "ViewManager", "Stream Comment Line or Selection" |
1170 """<p>Stream comments the current line or the current""" |
1341 ) |
1171 """ selection.</p>""" |
1342 ) |
1172 )) |
1343 self.streamCommentAct.setWhatsThis( |
|
1344 QCoreApplication.translate( |
|
1345 "ViewManager", |
|
1346 """<b>Stream Comment</b>""" |
|
1347 """<p>Stream comments the current line or the current""" |
|
1348 """ selection.</p>""", |
|
1349 ) |
|
1350 ) |
1173 self.streamCommentAct.triggered.connect(self.__editStreamComment) |
1351 self.streamCommentAct.triggered.connect(self.__editStreamComment) |
1174 self.editActions.append(self.streamCommentAct) |
1352 self.editActions.append(self.streamCommentAct) |
1175 |
1353 |
1176 self.boxCommentAct = EricAction( |
1354 self.boxCommentAct = EricAction( |
1177 QCoreApplication.translate('ViewManager', 'Box Comment'), |
1355 QCoreApplication.translate("ViewManager", "Box Comment"), |
1178 QCoreApplication.translate('ViewManager', 'Box Comment'), |
1356 QCoreApplication.translate("ViewManager", "Box Comment"), |
1179 0, 0, |
1357 0, |
1180 self.editActGrp, 'vm_edit_box_comment') |
1358 0, |
1181 self.boxCommentAct.setStatusTip(QCoreApplication.translate( |
1359 self.editActGrp, |
1182 'ViewManager', 'Box Comment Line or Selection')) |
1360 "vm_edit_box_comment", |
1183 self.boxCommentAct.setWhatsThis(QCoreApplication.translate( |
1361 ) |
1184 'ViewManager', |
1362 self.boxCommentAct.setStatusTip( |
1185 """<b>Box Comment</b>""" |
1363 QCoreApplication.translate("ViewManager", "Box Comment Line or Selection") |
1186 """<p>Box comments the current line or the lines of the""" |
1364 ) |
1187 """ current selection.</p>""" |
1365 self.boxCommentAct.setWhatsThis( |
1188 )) |
1366 QCoreApplication.translate( |
|
1367 "ViewManager", |
|
1368 """<b>Box Comment</b>""" |
|
1369 """<p>Box comments the current line or the lines of the""" |
|
1370 """ current selection.</p>""", |
|
1371 ) |
|
1372 ) |
1189 self.boxCommentAct.triggered.connect(self.__editBoxComment) |
1373 self.boxCommentAct.triggered.connect(self.__editBoxComment) |
1190 self.editActions.append(self.boxCommentAct) |
1374 self.editActions.append(self.boxCommentAct) |
1191 |
1375 |
1192 self.selectBraceAct = EricAction( |
1376 self.selectBraceAct = EricAction( |
1193 QCoreApplication.translate('ViewManager', 'Select to brace'), |
1377 QCoreApplication.translate("ViewManager", "Select to brace"), |
1194 QCoreApplication.translate('ViewManager', 'Select to &brace'), |
1378 QCoreApplication.translate("ViewManager", "Select to &brace"), |
1195 QKeySequence(QCoreApplication.translate( |
1379 QKeySequence( |
1196 'ViewManager', "Ctrl+E", "Edit|Select to brace")), |
1380 QCoreApplication.translate( |
1197 0, |
1381 "ViewManager", "Ctrl+E", "Edit|Select to brace" |
1198 self.editActGrp, 'vm_edit_select_to_brace') |
1382 ) |
1199 self.selectBraceAct.setStatusTip(QCoreApplication.translate( |
1383 ), |
1200 'ViewManager', 'Select text to the matching brace')) |
1384 0, |
1201 self.selectBraceAct.setWhatsThis(QCoreApplication.translate( |
1385 self.editActGrp, |
1202 'ViewManager', |
1386 "vm_edit_select_to_brace", |
1203 """<b>Select to brace</b>""" |
1387 ) |
1204 """<p>Select text of the current editor to the matching""" |
1388 self.selectBraceAct.setStatusTip( |
1205 """ brace.</p>""" |
1389 QCoreApplication.translate( |
1206 )) |
1390 "ViewManager", "Select text to the matching brace" |
|
1391 ) |
|
1392 ) |
|
1393 self.selectBraceAct.setWhatsThis( |
|
1394 QCoreApplication.translate( |
|
1395 "ViewManager", |
|
1396 """<b>Select to brace</b>""" |
|
1397 """<p>Select text of the current editor to the matching""" |
|
1398 """ brace.</p>""", |
|
1399 ) |
|
1400 ) |
1207 self.selectBraceAct.triggered.connect(self.__editSelectBrace) |
1401 self.selectBraceAct.triggered.connect(self.__editSelectBrace) |
1208 self.editActions.append(self.selectBraceAct) |
1402 self.editActions.append(self.selectBraceAct) |
1209 |
1403 |
1210 self.selectAllAct = EricAction( |
1404 self.selectAllAct = EricAction( |
1211 QCoreApplication.translate('ViewManager', 'Select all'), |
1405 QCoreApplication.translate("ViewManager", "Select all"), |
1212 UI.PixmapCache.getIcon("editSelectAll"), |
1406 UI.PixmapCache.getIcon("editSelectAll"), |
1213 QCoreApplication.translate('ViewManager', '&Select all'), |
1407 QCoreApplication.translate("ViewManager", "&Select all"), |
1214 QKeySequence(QCoreApplication.translate( |
1408 QKeySequence( |
1215 'ViewManager', "Ctrl+A", "Edit|Select all")), |
1409 QCoreApplication.translate("ViewManager", "Ctrl+A", "Edit|Select all") |
1216 0, |
1410 ), |
1217 self.editActGrp, 'vm_edit_select_all') |
1411 0, |
1218 self.selectAllAct.setStatusTip(QCoreApplication.translate( |
1412 self.editActGrp, |
1219 'ViewManager', 'Select all text')) |
1413 "vm_edit_select_all", |
1220 self.selectAllAct.setWhatsThis(QCoreApplication.translate( |
1414 ) |
1221 'ViewManager', |
1415 self.selectAllAct.setStatusTip( |
1222 """<b>Select All</b>""" |
1416 QCoreApplication.translate("ViewManager", "Select all text") |
1223 """<p>Select all text of the current editor.</p>""" |
1417 ) |
1224 )) |
1418 self.selectAllAct.setWhatsThis( |
|
1419 QCoreApplication.translate( |
|
1420 "ViewManager", |
|
1421 """<b>Select All</b>""" |
|
1422 """<p>Select all text of the current editor.</p>""", |
|
1423 ) |
|
1424 ) |
1225 self.selectAllAct.triggered.connect(self.__editSelectAll) |
1425 self.selectAllAct.triggered.connect(self.__editSelectAll) |
1226 self.editActions.append(self.selectAllAct) |
1426 self.editActions.append(self.selectAllAct) |
1227 |
1427 |
1228 self.deselectAllAct = EricAction( |
1428 self.deselectAllAct = EricAction( |
1229 QCoreApplication.translate('ViewManager', 'Deselect all'), |
1429 QCoreApplication.translate("ViewManager", "Deselect all"), |
1230 QCoreApplication.translate('ViewManager', '&Deselect all'), |
1430 QCoreApplication.translate("ViewManager", "&Deselect all"), |
1231 QKeySequence(QCoreApplication.translate( |
1431 QKeySequence( |
1232 'ViewManager', "Alt+Ctrl+A", "Edit|Deselect all")), |
1432 QCoreApplication.translate( |
1233 0, |
1433 "ViewManager", "Alt+Ctrl+A", "Edit|Deselect all" |
1234 self.editActGrp, 'vm_edit_deselect_all') |
1434 ) |
1235 self.deselectAllAct.setStatusTip(QCoreApplication.translate( |
1435 ), |
1236 'ViewManager', 'Deselect all text')) |
1436 0, |
1237 self.deselectAllAct.setWhatsThis(QCoreApplication.translate( |
1437 self.editActGrp, |
1238 'ViewManager', |
1438 "vm_edit_deselect_all", |
1239 """<b>Deselect All</b>""" |
1439 ) |
1240 """<p>Deselect all text of the current editor.</p>""" |
1440 self.deselectAllAct.setStatusTip( |
1241 )) |
1441 QCoreApplication.translate("ViewManager", "Deselect all text") |
|
1442 ) |
|
1443 self.deselectAllAct.setWhatsThis( |
|
1444 QCoreApplication.translate( |
|
1445 "ViewManager", |
|
1446 """<b>Deselect All</b>""" |
|
1447 """<p>Deselect all text of the current editor.</p>""", |
|
1448 ) |
|
1449 ) |
1242 self.deselectAllAct.triggered.connect(self.__editDeselectAll) |
1450 self.deselectAllAct.triggered.connect(self.__editDeselectAll) |
1243 self.editActions.append(self.deselectAllAct) |
1451 self.editActions.append(self.deselectAllAct) |
1244 |
1452 |
1245 self.convertEOLAct = EricAction( |
1453 self.convertEOLAct = EricAction( |
1246 QCoreApplication.translate( |
1454 QCoreApplication.translate("ViewManager", "Convert Line End Characters"), |
1247 'ViewManager', 'Convert Line End Characters'), |
1455 QCoreApplication.translate("ViewManager", "Convert &Line End Characters"), |
1248 QCoreApplication.translate( |
1456 0, |
1249 'ViewManager', 'Convert &Line End Characters'), |
1457 0, |
1250 0, 0, |
1458 self.editActGrp, |
1251 self.editActGrp, 'vm_edit_convert_eol') |
1459 "vm_edit_convert_eol", |
1252 self.convertEOLAct.setStatusTip(QCoreApplication.translate( |
1460 ) |
1253 'ViewManager', 'Convert Line End Characters')) |
1461 self.convertEOLAct.setStatusTip( |
1254 self.convertEOLAct.setWhatsThis(QCoreApplication.translate( |
1462 QCoreApplication.translate("ViewManager", "Convert Line End Characters") |
1255 'ViewManager', |
1463 ) |
1256 """<b>Convert Line End Characters</b>""" |
1464 self.convertEOLAct.setWhatsThis( |
1257 """<p>Convert the line end characters to the currently set""" |
1465 QCoreApplication.translate( |
1258 """ type.</p>""" |
1466 "ViewManager", |
1259 )) |
1467 """<b>Convert Line End Characters</b>""" |
|
1468 """<p>Convert the line end characters to the currently set""" |
|
1469 """ type.</p>""", |
|
1470 ) |
|
1471 ) |
1260 self.convertEOLAct.triggered.connect(self.__convertEOL) |
1472 self.convertEOLAct.triggered.connect(self.__convertEOL) |
1261 self.editActions.append(self.convertEOLAct) |
1473 self.editActions.append(self.convertEOLAct) |
1262 |
1474 |
1263 self.shortenEmptyAct = EricAction( |
1475 self.shortenEmptyAct = EricAction( |
1264 QCoreApplication.translate('ViewManager', 'Shorten empty lines'), |
1476 QCoreApplication.translate("ViewManager", "Shorten empty lines"), |
1265 QCoreApplication.translate('ViewManager', 'Shorten empty lines'), |
1477 QCoreApplication.translate("ViewManager", "Shorten empty lines"), |
1266 0, 0, |
1478 0, |
1267 self.editActGrp, 'vm_edit_shorten_empty_lines') |
1479 0, |
1268 self.shortenEmptyAct.setStatusTip(QCoreApplication.translate( |
1480 self.editActGrp, |
1269 'ViewManager', 'Shorten empty lines')) |
1481 "vm_edit_shorten_empty_lines", |
1270 self.shortenEmptyAct.setWhatsThis(QCoreApplication.translate( |
1482 ) |
1271 'ViewManager', |
1483 self.shortenEmptyAct.setStatusTip( |
1272 """<b>Shorten empty lines</b>""" |
1484 QCoreApplication.translate("ViewManager", "Shorten empty lines") |
1273 """<p>Shorten lines consisting solely of whitespace""" |
1485 ) |
1274 """ characters.</p>""" |
1486 self.shortenEmptyAct.setWhatsThis( |
1275 )) |
1487 QCoreApplication.translate( |
|
1488 "ViewManager", |
|
1489 """<b>Shorten empty lines</b>""" |
|
1490 """<p>Shorten lines consisting solely of whitespace""" |
|
1491 """ characters.</p>""", |
|
1492 ) |
|
1493 ) |
1276 self.shortenEmptyAct.triggered.connect(self.__shortenEmptyLines) |
1494 self.shortenEmptyAct.triggered.connect(self.__shortenEmptyLines) |
1277 self.editActions.append(self.shortenEmptyAct) |
1495 self.editActions.append(self.shortenEmptyAct) |
1278 |
1496 |
1279 self.autoCompleteAct = EricAction( |
1497 self.autoCompleteAct = EricAction( |
1280 QCoreApplication.translate('ViewManager', 'Complete'), |
1498 QCoreApplication.translate("ViewManager", "Complete"), |
1281 QCoreApplication.translate('ViewManager', '&Complete'), |
1499 QCoreApplication.translate("ViewManager", "&Complete"), |
1282 QKeySequence(QCoreApplication.translate( |
1500 QKeySequence( |
1283 'ViewManager', "Ctrl+Space", "Edit|Complete")), |
1501 QCoreApplication.translate("ViewManager", "Ctrl+Space", "Edit|Complete") |
1284 0, |
1502 ), |
1285 self.editActGrp, 'vm_edit_autocomplete') |
1503 0, |
1286 self.autoCompleteAct.setStatusTip(QCoreApplication.translate( |
1504 self.editActGrp, |
1287 'ViewManager', 'Complete current word')) |
1505 "vm_edit_autocomplete", |
1288 self.autoCompleteAct.setWhatsThis(QCoreApplication.translate( |
1506 ) |
1289 'ViewManager', |
1507 self.autoCompleteAct.setStatusTip( |
1290 """<b>Complete</b>""" |
1508 QCoreApplication.translate("ViewManager", "Complete current word") |
1291 """<p>Performs a completion of the word containing""" |
1509 ) |
1292 """ the cursor.</p>""" |
1510 self.autoCompleteAct.setWhatsThis( |
1293 )) |
1511 QCoreApplication.translate( |
|
1512 "ViewManager", |
|
1513 """<b>Complete</b>""" |
|
1514 """<p>Performs a completion of the word containing""" |
|
1515 """ the cursor.</p>""", |
|
1516 ) |
|
1517 ) |
1294 self.autoCompleteAct.triggered.connect(self.__editAutoComplete) |
1518 self.autoCompleteAct.triggered.connect(self.__editAutoComplete) |
1295 self.editActions.append(self.autoCompleteAct) |
1519 self.editActions.append(self.autoCompleteAct) |
1296 |
1520 |
1297 self.autoCompleteFromDocAct = EricAction( |
1521 self.autoCompleteFromDocAct = EricAction( |
1298 QCoreApplication.translate( |
1522 QCoreApplication.translate("ViewManager", "Complete from Document"), |
1299 'ViewManager', 'Complete from Document'), |
1523 QCoreApplication.translate("ViewManager", "Complete from Document"), |
1300 QCoreApplication.translate( |
1524 QKeySequence( |
1301 'ViewManager', 'Complete from Document'), |
1525 QCoreApplication.translate( |
1302 QKeySequence(QCoreApplication.translate( |
1526 "ViewManager", "Ctrl+Shift+Space", "Edit|Complete from Document" |
1303 'ViewManager', "Ctrl+Shift+Space", |
1527 ) |
1304 "Edit|Complete from Document")), |
1528 ), |
1305 0, |
1529 0, |
1306 self.editActGrp, 'vm_edit_autocomplete_from_document') |
1530 self.editActGrp, |
1307 self.autoCompleteFromDocAct.setStatusTip(QCoreApplication.translate( |
1531 "vm_edit_autocomplete_from_document", |
1308 'ViewManager', |
1532 ) |
1309 'Complete current word from Document')) |
1533 self.autoCompleteFromDocAct.setStatusTip( |
1310 self.autoCompleteFromDocAct.setWhatsThis(QCoreApplication.translate( |
1534 QCoreApplication.translate( |
1311 'ViewManager', |
1535 "ViewManager", "Complete current word from Document" |
1312 """<b>Complete from Document</b>""" |
1536 ) |
1313 """<p>Performs a completion from document of the word""" |
1537 ) |
1314 """ containing the cursor.</p>""" |
1538 self.autoCompleteFromDocAct.setWhatsThis( |
1315 )) |
1539 QCoreApplication.translate( |
1316 self.autoCompleteFromDocAct.triggered.connect( |
1540 "ViewManager", |
1317 self.__editAutoCompleteFromDoc) |
1541 """<b>Complete from Document</b>""" |
|
1542 """<p>Performs a completion from document of the word""" |
|
1543 """ containing the cursor.</p>""", |
|
1544 ) |
|
1545 ) |
|
1546 self.autoCompleteFromDocAct.triggered.connect(self.__editAutoCompleteFromDoc) |
1318 self.editActions.append(self.autoCompleteFromDocAct) |
1547 self.editActions.append(self.autoCompleteFromDocAct) |
1319 |
1548 |
1320 self.autoCompleteFromAPIsAct = EricAction( |
1549 self.autoCompleteFromAPIsAct = EricAction( |
1321 QCoreApplication.translate('ViewManager', |
1550 QCoreApplication.translate("ViewManager", "Complete from APIs"), |
1322 'Complete from APIs'), |
1551 QCoreApplication.translate("ViewManager", "Complete from APIs"), |
1323 QCoreApplication.translate('ViewManager', |
1552 QKeySequence( |
1324 'Complete from APIs'), |
1553 QCoreApplication.translate( |
1325 QKeySequence(QCoreApplication.translate( |
1554 "ViewManager", "Ctrl+Alt+Space", "Edit|Complete from APIs" |
1326 'ViewManager', "Ctrl+Alt+Space", |
1555 ) |
1327 "Edit|Complete from APIs")), |
1556 ), |
1328 0, |
1557 0, |
1329 self.editActGrp, 'vm_edit_autocomplete_from_api') |
1558 self.editActGrp, |
1330 self.autoCompleteFromAPIsAct.setStatusTip(QCoreApplication.translate( |
1559 "vm_edit_autocomplete_from_api", |
1331 'ViewManager', |
1560 ) |
1332 'Complete current word from APIs')) |
1561 self.autoCompleteFromAPIsAct.setStatusTip( |
1333 self.autoCompleteFromAPIsAct.setWhatsThis(QCoreApplication.translate( |
1562 QCoreApplication.translate("ViewManager", "Complete current word from APIs") |
1334 'ViewManager', |
1563 ) |
1335 """<b>Complete from APIs</b>""" |
1564 self.autoCompleteFromAPIsAct.setWhatsThis( |
1336 """<p>Performs a completion from APIs of the word""" |
1565 QCoreApplication.translate( |
1337 """ containing the cursor.</p>""" |
1566 "ViewManager", |
1338 )) |
1567 """<b>Complete from APIs</b>""" |
1339 self.autoCompleteFromAPIsAct.triggered.connect( |
1568 """<p>Performs a completion from APIs of the word""" |
1340 self.__editAutoCompleteFromAPIs) |
1569 """ containing the cursor.</p>""", |
|
1570 ) |
|
1571 ) |
|
1572 self.autoCompleteFromAPIsAct.triggered.connect(self.__editAutoCompleteFromAPIs) |
1341 self.editActions.append(self.autoCompleteFromAPIsAct) |
1573 self.editActions.append(self.autoCompleteFromAPIsAct) |
1342 |
1574 |
1343 self.autoCompleteFromAllAct = EricAction( |
1575 self.autoCompleteFromAllAct = EricAction( |
1344 QCoreApplication.translate( |
1576 QCoreApplication.translate( |
1345 'ViewManager', 'Complete from Document and APIs'), |
1577 "ViewManager", "Complete from Document and APIs" |
1346 QCoreApplication.translate( |
1578 ), |
1347 'ViewManager', 'Complete from Document and APIs'), |
1579 QCoreApplication.translate( |
1348 QKeySequence(QCoreApplication.translate( |
1580 "ViewManager", "Complete from Document and APIs" |
1349 'ViewManager', "Alt+Shift+Space", |
1581 ), |
1350 "Edit|Complete from Document and APIs")), |
1582 QKeySequence( |
1351 0, |
1583 QCoreApplication.translate( |
1352 self.editActGrp, 'vm_edit_autocomplete_from_all') |
1584 "ViewManager", |
1353 self.autoCompleteFromAllAct.setStatusTip(QCoreApplication.translate( |
1585 "Alt+Shift+Space", |
1354 'ViewManager', |
1586 "Edit|Complete from Document and APIs", |
1355 'Complete current word from Document and APIs')) |
1587 ) |
1356 self.autoCompleteFromAllAct.setWhatsThis(QCoreApplication.translate( |
1588 ), |
1357 'ViewManager', |
1589 0, |
1358 """<b>Complete from Document and APIs</b>""" |
1590 self.editActGrp, |
1359 """<p>Performs a completion from document and APIs""" |
1591 "vm_edit_autocomplete_from_all", |
1360 """ of the word containing the cursor.</p>""" |
1592 ) |
1361 )) |
1593 self.autoCompleteFromAllAct.setStatusTip( |
1362 self.autoCompleteFromAllAct.triggered.connect( |
1594 QCoreApplication.translate( |
1363 self.__editAutoCompleteFromAll) |
1595 "ViewManager", "Complete current word from Document and APIs" |
|
1596 ) |
|
1597 ) |
|
1598 self.autoCompleteFromAllAct.setWhatsThis( |
|
1599 QCoreApplication.translate( |
|
1600 "ViewManager", |
|
1601 """<b>Complete from Document and APIs</b>""" |
|
1602 """<p>Performs a completion from document and APIs""" |
|
1603 """ of the word containing the cursor.</p>""", |
|
1604 ) |
|
1605 ) |
|
1606 self.autoCompleteFromAllAct.triggered.connect(self.__editAutoCompleteFromAll) |
1364 self.editActions.append(self.autoCompleteFromAllAct) |
1607 self.editActions.append(self.autoCompleteFromAllAct) |
1365 |
1608 |
1366 self.calltipsAct = EricAction( |
1609 self.calltipsAct = EricAction( |
1367 QCoreApplication.translate('ViewManager', 'Calltip'), |
1610 QCoreApplication.translate("ViewManager", "Calltip"), |
1368 QCoreApplication.translate('ViewManager', '&Calltip'), |
1611 QCoreApplication.translate("ViewManager", "&Calltip"), |
1369 QKeySequence(QCoreApplication.translate( |
1612 QKeySequence( |
1370 'ViewManager', "Meta+Alt+Space", "Edit|Calltip")), |
1613 QCoreApplication.translate( |
1371 0, |
1614 "ViewManager", "Meta+Alt+Space", "Edit|Calltip" |
1372 self.editActGrp, 'vm_edit_calltip') |
1615 ) |
1373 self.calltipsAct.setStatusTip(QCoreApplication.translate( |
1616 ), |
1374 'ViewManager', 'Show Calltips')) |
1617 0, |
1375 self.calltipsAct.setWhatsThis(QCoreApplication.translate( |
1618 self.editActGrp, |
1376 'ViewManager', |
1619 "vm_edit_calltip", |
1377 """<b>Calltip</b>""" |
1620 ) |
1378 """<p>Show calltips based on the characters immediately to the""" |
1621 self.calltipsAct.setStatusTip( |
1379 """ left of the cursor.</p>""" |
1622 QCoreApplication.translate("ViewManager", "Show Calltips") |
1380 )) |
1623 ) |
|
1624 self.calltipsAct.setWhatsThis( |
|
1625 QCoreApplication.translate( |
|
1626 "ViewManager", |
|
1627 """<b>Calltip</b>""" |
|
1628 """<p>Show calltips based on the characters immediately to the""" |
|
1629 """ left of the cursor.</p>""", |
|
1630 ) |
|
1631 ) |
1381 self.calltipsAct.triggered.connect(self.__editShowCallTips) |
1632 self.calltipsAct.triggered.connect(self.__editShowCallTips) |
1382 self.editActions.append(self.calltipsAct) |
1633 self.editActions.append(self.calltipsAct) |
1383 |
1634 |
1384 self.codeInfoAct = EricAction( |
1635 self.codeInfoAct = EricAction( |
1385 QCoreApplication.translate('ViewManager', 'Code Info'), |
1636 QCoreApplication.translate("ViewManager", "Code Info"), |
1386 UI.PixmapCache.getIcon("codeDocuViewer"), |
1637 UI.PixmapCache.getIcon("codeDocuViewer"), |
1387 QCoreApplication.translate('ViewManager', 'Code Info'), |
1638 QCoreApplication.translate("ViewManager", "Code Info"), |
1388 QKeySequence(QCoreApplication.translate( |
1639 QKeySequence( |
1389 'ViewManager', "Ctrl+Alt+I", "Edit|Code Info")), |
1640 QCoreApplication.translate( |
1390 0, |
1641 "ViewManager", "Ctrl+Alt+I", "Edit|Code Info" |
1391 self.editActGrp, 'vm_edit_codeinfo') |
1642 ) |
1392 self.codeInfoAct.setStatusTip(QCoreApplication.translate( |
1643 ), |
1393 'ViewManager', 'Show Code Info')) |
1644 0, |
1394 self.codeInfoAct.setWhatsThis(QCoreApplication.translate( |
1645 self.editActGrp, |
1395 'ViewManager', |
1646 "vm_edit_codeinfo", |
1396 """<b>Code Info</b>""" |
1647 ) |
1397 """<p>Show code information based on the cursor position.</p>""" |
1648 self.codeInfoAct.setStatusTip( |
1398 )) |
1649 QCoreApplication.translate("ViewManager", "Show Code Info") |
|
1650 ) |
|
1651 self.codeInfoAct.setWhatsThis( |
|
1652 QCoreApplication.translate( |
|
1653 "ViewManager", |
|
1654 """<b>Code Info</b>""" |
|
1655 """<p>Show code information based on the cursor position.</p>""", |
|
1656 ) |
|
1657 ) |
1399 self.codeInfoAct.triggered.connect(self.__editShowCodeInfo) |
1658 self.codeInfoAct.triggered.connect(self.__editShowCodeInfo) |
1400 self.editActions.append(self.codeInfoAct) |
1659 self.editActions.append(self.codeInfoAct) |
1401 |
1660 |
1402 self.sortAct = EricAction( |
1661 self.sortAct = EricAction( |
1403 QCoreApplication.translate('ViewManager', 'Sort'), |
1662 QCoreApplication.translate("ViewManager", "Sort"), |
1404 QCoreApplication.translate('ViewManager', 'Sort'), |
1663 QCoreApplication.translate("ViewManager", "Sort"), |
1405 QKeySequence(QCoreApplication.translate( |
1664 QKeySequence( |
1406 'ViewManager', "Ctrl+Alt+S", "Edit|Sort")), |
1665 QCoreApplication.translate("ViewManager", "Ctrl+Alt+S", "Edit|Sort") |
1407 0, |
1666 ), |
1408 self.editActGrp, 'vm_edit_sort') |
1667 0, |
1409 self.sortAct.setStatusTip(QCoreApplication.translate( |
1668 self.editActGrp, |
1410 'ViewManager', |
1669 "vm_edit_sort", |
1411 'Sort the lines containing the rectangular selection')) |
1670 ) |
1412 self.sortAct.setWhatsThis(QCoreApplication.translate( |
1671 self.sortAct.setStatusTip( |
1413 'ViewManager', |
1672 QCoreApplication.translate( |
1414 """<b>Sort</b>""" |
1673 "ViewManager", "Sort the lines containing the rectangular selection" |
1415 """<p>Sort the lines spanned by a rectangular selection based on""" |
1674 ) |
1416 """ the selection ignoring leading and trailing whitespace.</p>""" |
1675 ) |
1417 )) |
1676 self.sortAct.setWhatsThis( |
|
1677 QCoreApplication.translate( |
|
1678 "ViewManager", |
|
1679 """<b>Sort</b>""" |
|
1680 """<p>Sort the lines spanned by a rectangular selection based on""" |
|
1681 """ the selection ignoring leading and trailing whitespace.</p>""", |
|
1682 ) |
|
1683 ) |
1418 self.sortAct.triggered.connect(self.__editSortSelectedLines) |
1684 self.sortAct.triggered.connect(self.__editSortSelectedLines) |
1419 self.editActions.append(self.sortAct) |
1685 self.editActions.append(self.sortAct) |
1420 |
1686 |
1421 self.docstringAct = EricAction( |
1687 self.docstringAct = EricAction( |
1422 QCoreApplication.translate('ViewManager', 'Generate Docstring'), |
1688 QCoreApplication.translate("ViewManager", "Generate Docstring"), |
1423 QCoreApplication.translate('ViewManager', 'Generate Docstring'), |
1689 QCoreApplication.translate("ViewManager", "Generate Docstring"), |
1424 QKeySequence(QCoreApplication.translate( |
1690 QKeySequence( |
1425 'ViewManager', "Ctrl+Alt+D", "Edit|Generate Docstring")), |
1691 QCoreApplication.translate( |
1426 0, |
1692 "ViewManager", "Ctrl+Alt+D", "Edit|Generate Docstring" |
1427 self.editActGrp, 'vm_edit_generate_docstring') |
1693 ) |
1428 self.docstringAct.setStatusTip(QCoreApplication.translate( |
1694 ), |
1429 'ViewManager', |
1695 0, |
1430 'Generate a docstring for the current function/method')) |
1696 self.editActGrp, |
1431 self.docstringAct.setWhatsThis(QCoreApplication.translate( |
1697 "vm_edit_generate_docstring", |
1432 'ViewManager', |
1698 ) |
1433 """<b>Generate Docstring</b>""" |
1699 self.docstringAct.setStatusTip( |
1434 """<p>Generate a docstring for the current function/method if""" |
1700 QCoreApplication.translate( |
1435 """ the cursor is placed on the line starting the function""" |
1701 "ViewManager", "Generate a docstring for the current function/method" |
1436 """ definition or on the line thereafter. The docstring is""" |
1702 ) |
1437 """ inserted at the appropriate position and the cursor is""" |
1703 ) |
1438 """ placed at the end of the description line.</p>""" |
1704 self.docstringAct.setWhatsThis( |
1439 )) |
1705 QCoreApplication.translate( |
|
1706 "ViewManager", |
|
1707 """<b>Generate Docstring</b>""" |
|
1708 """<p>Generate a docstring for the current function/method if""" |
|
1709 """ the cursor is placed on the line starting the function""" |
|
1710 """ definition or on the line thereafter. The docstring is""" |
|
1711 """ inserted at the appropriate position and the cursor is""" |
|
1712 """ placed at the end of the description line.</p>""", |
|
1713 ) |
|
1714 ) |
1440 self.docstringAct.triggered.connect(self.__editInsertDocstring) |
1715 self.docstringAct.triggered.connect(self.__editInsertDocstring) |
1441 self.editActions.append(self.docstringAct) |
1716 self.editActions.append(self.docstringAct) |
1442 |
1717 |
1443 self.editActGrp.setEnabled(False) |
1718 self.editActGrp.setEnabled(False) |
1444 self.copyActGrp.setEnabled(False) |
1719 self.copyActGrp.setEnabled(False) |
1445 |
1720 |
1446 #################################################################### |
1721 #################################################################### |
1447 ## Below follow the actions for QScintilla standard commands. |
1722 ## Below follow the actions for QScintilla standard commands. |
1448 #################################################################### |
1723 #################################################################### |
1449 |
1724 |
1450 self.esm = QSignalMapper(self) |
1725 self.esm = QSignalMapper(self) |
1451 self.esm.mappedInt.connect(self.__editorCommand) |
1726 self.esm.mappedInt.connect(self.__editorCommand) |
1452 |
1727 |
1453 self.editorActGrp = createActionGroup(self.editActGrp) |
1728 self.editorActGrp = createActionGroup(self.editActGrp) |
1454 |
1729 |
1455 act = EricAction( |
1730 act = EricAction( |
1456 QCoreApplication.translate('ViewManager', |
1731 QCoreApplication.translate("ViewManager", "Move left one character"), |
1457 'Move left one character'), |
1732 QCoreApplication.translate("ViewManager", "Move left one character"), |
1458 QCoreApplication.translate('ViewManager', |
1733 QKeySequence(QCoreApplication.translate("ViewManager", "Left")), |
1459 'Move left one character'), |
1734 0, |
1460 QKeySequence(QCoreApplication.translate('ViewManager', 'Left')), 0, |
1735 self.editorActGrp, |
1461 self.editorActGrp, 'vm_edit_move_left_char') |
1736 "vm_edit_move_left_char", |
|
1737 ) |
1462 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFT) |
1738 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFT) |
1463 if isMacPlatform(): |
1739 if isMacPlatform(): |
1464 act.setAlternateShortcut(QKeySequence( |
1740 act.setAlternateShortcut( |
1465 QCoreApplication.translate('ViewManager', 'Meta+B'))) |
1741 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+B")) |
|
1742 ) |
1466 act.triggered.connect(self.esm.map) |
1743 act.triggered.connect(self.esm.map) |
1467 self.editActions.append(act) |
1744 self.editActions.append(act) |
1468 |
1745 |
1469 act = EricAction( |
1746 act = EricAction( |
1470 QCoreApplication.translate('ViewManager', |
1747 QCoreApplication.translate("ViewManager", "Move right one character"), |
1471 'Move right one character'), |
1748 QCoreApplication.translate("ViewManager", "Move right one character"), |
1472 QCoreApplication.translate('ViewManager', |
1749 QKeySequence(QCoreApplication.translate("ViewManager", "Right")), |
1473 'Move right one character'), |
1750 0, |
1474 QKeySequence(QCoreApplication.translate('ViewManager', 'Right')), |
1751 self.editorActGrp, |
1475 0, self.editorActGrp, 'vm_edit_move_right_char') |
1752 "vm_edit_move_right_char", |
|
1753 ) |
1476 if isMacPlatform(): |
1754 if isMacPlatform(): |
1477 act.setAlternateShortcut(QKeySequence( |
1755 act.setAlternateShortcut( |
1478 QCoreApplication.translate('ViewManager', 'Meta+F'))) |
1756 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+F")) |
|
1757 ) |
1479 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHT) |
1758 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHT) |
1480 act.triggered.connect(self.esm.map) |
1759 act.triggered.connect(self.esm.map) |
1481 self.editActions.append(act) |
1760 self.editActions.append(act) |
1482 |
1761 |
1483 act = EricAction( |
1762 act = EricAction( |
1484 QCoreApplication.translate('ViewManager', 'Move up one line'), |
1763 QCoreApplication.translate("ViewManager", "Move up one line"), |
1485 QCoreApplication.translate('ViewManager', 'Move up one line'), |
1764 QCoreApplication.translate("ViewManager", "Move up one line"), |
1486 QKeySequence(QCoreApplication.translate('ViewManager', 'Up')), 0, |
1765 QKeySequence(QCoreApplication.translate("ViewManager", "Up")), |
1487 self.editorActGrp, 'vm_edit_move_up_line') |
1766 0, |
|
1767 self.editorActGrp, |
|
1768 "vm_edit_move_up_line", |
|
1769 ) |
1488 if isMacPlatform(): |
1770 if isMacPlatform(): |
1489 act.setAlternateShortcut(QKeySequence( |
1771 act.setAlternateShortcut( |
1490 QCoreApplication.translate('ViewManager', 'Meta+P'))) |
1772 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+P")) |
|
1773 ) |
1491 self.esm.setMapping(act, QsciScintilla.SCI_LINEUP) |
1774 self.esm.setMapping(act, QsciScintilla.SCI_LINEUP) |
1492 act.triggered.connect(self.esm.map) |
1775 act.triggered.connect(self.esm.map) |
1493 self.editActions.append(act) |
1776 self.editActions.append(act) |
1494 |
1777 |
1495 act = EricAction( |
1778 act = EricAction( |
1496 QCoreApplication.translate('ViewManager', 'Move down one line'), |
1779 QCoreApplication.translate("ViewManager", "Move down one line"), |
1497 QCoreApplication.translate('ViewManager', 'Move down one line'), |
1780 QCoreApplication.translate("ViewManager", "Move down one line"), |
1498 QKeySequence(QCoreApplication.translate('ViewManager', 'Down')), 0, |
1781 QKeySequence(QCoreApplication.translate("ViewManager", "Down")), |
1499 self.editorActGrp, 'vm_edit_move_down_line') |
1782 0, |
|
1783 self.editorActGrp, |
|
1784 "vm_edit_move_down_line", |
|
1785 ) |
1500 if isMacPlatform(): |
1786 if isMacPlatform(): |
1501 act.setAlternateShortcut(QKeySequence( |
1787 act.setAlternateShortcut( |
1502 QCoreApplication.translate('ViewManager', 'Meta+N'))) |
1788 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+N")) |
|
1789 ) |
1503 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWN) |
1790 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWN) |
1504 act.triggered.connect(self.esm.map) |
1791 act.triggered.connect(self.esm.map) |
1505 self.editActions.append(act) |
1792 self.editActions.append(act) |
1506 |
1793 |
1507 act = EricAction( |
1794 act = EricAction( |
1508 QCoreApplication.translate('ViewManager', |
1795 QCoreApplication.translate("ViewManager", "Move left one word part"), |
1509 'Move left one word part'), |
1796 QCoreApplication.translate("ViewManager", "Move left one word part"), |
1510 QCoreApplication.translate('ViewManager', |
1797 0, |
1511 'Move left one word part'), |
1798 0, |
1512 0, 0, |
1799 self.editorActGrp, |
1513 self.editorActGrp, 'vm_edit_move_left_word_part') |
1800 "vm_edit_move_left_word_part", |
|
1801 ) |
1514 if not isMacPlatform(): |
1802 if not isMacPlatform(): |
1515 act.setShortcut(QKeySequence( |
1803 act.setShortcut( |
1516 QCoreApplication.translate('ViewManager', 'Alt+Left'))) |
1804 QKeySequence(QCoreApplication.translate("ViewManager", "Alt+Left")) |
|
1805 ) |
1517 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFT) |
1806 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFT) |
1518 act.triggered.connect(self.esm.map) |
1807 act.triggered.connect(self.esm.map) |
1519 self.editActions.append(act) |
1808 self.editActions.append(act) |
1520 |
1809 |
1521 act = EricAction( |
1810 act = EricAction( |
1522 QCoreApplication.translate('ViewManager', |
1811 QCoreApplication.translate("ViewManager", "Move right one word part"), |
1523 'Move right one word part'), |
1812 QCoreApplication.translate("ViewManager", "Move right one word part"), |
1524 QCoreApplication.translate('ViewManager', |
1813 0, |
1525 'Move right one word part'), |
1814 0, |
1526 0, 0, |
1815 self.editorActGrp, |
1527 self.editorActGrp, 'vm_edit_move_right_word_part') |
1816 "vm_edit_move_right_word_part", |
|
1817 ) |
1528 if not isMacPlatform(): |
1818 if not isMacPlatform(): |
1529 act.setShortcut(QKeySequence( |
1819 act.setShortcut( |
1530 QCoreApplication.translate('ViewManager', 'Alt+Right'))) |
1820 QKeySequence(QCoreApplication.translate("ViewManager", "Alt+Right")) |
|
1821 ) |
1531 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHT) |
1822 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHT) |
1532 act.triggered.connect(self.esm.map) |
1823 act.triggered.connect(self.esm.map) |
1533 self.editActions.append(act) |
1824 self.editActions.append(act) |
1534 |
1825 |
1535 act = EricAction( |
1826 act = EricAction( |
1536 QCoreApplication.translate('ViewManager', 'Move left one word'), |
1827 QCoreApplication.translate("ViewManager", "Move left one word"), |
1537 QCoreApplication.translate('ViewManager', 'Move left one word'), |
1828 QCoreApplication.translate("ViewManager", "Move left one word"), |
1538 0, 0, |
1829 0, |
1539 self.editorActGrp, 'vm_edit_move_left_word') |
1830 0, |
|
1831 self.editorActGrp, |
|
1832 "vm_edit_move_left_word", |
|
1833 ) |
1540 if isMacPlatform(): |
1834 if isMacPlatform(): |
1541 act.setShortcut(QKeySequence( |
1835 act.setShortcut( |
1542 QCoreApplication.translate('ViewManager', 'Alt+Left'))) |
1836 QKeySequence(QCoreApplication.translate("ViewManager", "Alt+Left")) |
|
1837 ) |
1543 else: |
1838 else: |
1544 act.setShortcut(QKeySequence( |
1839 act.setShortcut( |
1545 QCoreApplication.translate('ViewManager', 'Ctrl+Left'))) |
1840 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+Left")) |
|
1841 ) |
1546 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFT) |
1842 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFT) |
1547 act.triggered.connect(self.esm.map) |
1843 act.triggered.connect(self.esm.map) |
1548 self.editActions.append(act) |
1844 self.editActions.append(act) |
1549 |
1845 |
1550 act = EricAction( |
1846 act = EricAction( |
1551 QCoreApplication.translate('ViewManager', 'Move right one word'), |
1847 QCoreApplication.translate("ViewManager", "Move right one word"), |
1552 QCoreApplication.translate('ViewManager', 'Move right one word'), |
1848 QCoreApplication.translate("ViewManager", "Move right one word"), |
1553 0, 0, |
1849 0, |
1554 self.editorActGrp, 'vm_edit_move_right_word') |
1850 0, |
|
1851 self.editorActGrp, |
|
1852 "vm_edit_move_right_word", |
|
1853 ) |
1555 if not isMacPlatform(): |
1854 if not isMacPlatform(): |
1556 act.setShortcut(QKeySequence( |
1855 act.setShortcut( |
1557 QCoreApplication.translate('ViewManager', 'Ctrl+Right'))) |
1856 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+Right")) |
|
1857 ) |
1558 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT) |
1858 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT) |
1559 act.triggered.connect(self.esm.map) |
1859 act.triggered.connect(self.esm.map) |
1560 self.editActions.append(act) |
1860 self.editActions.append(act) |
1561 |
1861 |
1562 act = EricAction( |
1862 act = EricAction( |
1563 QCoreApplication.translate( |
1863 QCoreApplication.translate( |
1564 'ViewManager', |
1864 "ViewManager", "Move to first visible character in document line" |
1565 'Move to first visible character in document line'), |
1865 ), |
1566 QCoreApplication.translate( |
1866 QCoreApplication.translate( |
1567 'ViewManager', |
1867 "ViewManager", "Move to first visible character in document line" |
1568 'Move to first visible character in document line'), |
1868 ), |
1569 0, 0, |
1869 0, |
1570 self.editorActGrp, 'vm_edit_move_first_visible_char') |
1870 0, |
|
1871 self.editorActGrp, |
|
1872 "vm_edit_move_first_visible_char", |
|
1873 ) |
1571 if not isMacPlatform(): |
1874 if not isMacPlatform(): |
1572 act.setShortcut(QKeySequence( |
1875 act.setShortcut( |
1573 QCoreApplication.translate('ViewManager', 'Home'))) |
1876 QKeySequence(QCoreApplication.translate("ViewManager", "Home")) |
|
1877 ) |
1574 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME) |
1878 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME) |
1575 act.triggered.connect(self.esm.map) |
1879 act.triggered.connect(self.esm.map) |
1576 self.editActions.append(act) |
1880 self.editActions.append(act) |
1577 |
1881 |
1578 act = EricAction( |
1882 act = EricAction( |
1579 QCoreApplication.translate( |
1883 QCoreApplication.translate("ViewManager", "Move to start of display line"), |
1580 'ViewManager', 'Move to start of display line'), |
1884 QCoreApplication.translate("ViewManager", "Move to start of display line"), |
1581 QCoreApplication.translate( |
1885 0, |
1582 'ViewManager', 'Move to start of display line'), |
1886 0, |
1583 0, 0, |
1887 self.editorActGrp, |
1584 self.editorActGrp, 'vm_edit_move_start_line') |
1888 "vm_edit_move_start_line", |
|
1889 ) |
1585 if isMacPlatform(): |
1890 if isMacPlatform(): |
1586 act.setShortcut(QKeySequence( |
1891 act.setShortcut( |
1587 QCoreApplication.translate('ViewManager', 'Ctrl+Left'))) |
1892 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+Left")) |
|
1893 ) |
1588 else: |
1894 else: |
1589 act.setShortcut(QKeySequence( |
1895 act.setShortcut( |
1590 QCoreApplication.translate('ViewManager', 'Alt+Home'))) |
1896 QKeySequence(QCoreApplication.translate("ViewManager", "Alt+Home")) |
|
1897 ) |
1591 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAY) |
1898 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAY) |
1592 act.triggered.connect(self.esm.map) |
1899 act.triggered.connect(self.esm.map) |
1593 self.editActions.append(act) |
1900 self.editActions.append(act) |
1594 |
1901 |
1595 act = EricAction( |
1902 act = EricAction( |
1596 QCoreApplication.translate( |
1903 QCoreApplication.translate("ViewManager", "Move to end of document line"), |
1597 'ViewManager', 'Move to end of document line'), |
1904 QCoreApplication.translate("ViewManager", "Move to end of document line"), |
1598 QCoreApplication.translate( |
1905 0, |
1599 'ViewManager', 'Move to end of document line'), |
1906 0, |
1600 0, 0, |
1907 self.editorActGrp, |
1601 self.editorActGrp, 'vm_edit_move_end_line') |
1908 "vm_edit_move_end_line", |
|
1909 ) |
1602 if isMacPlatform(): |
1910 if isMacPlatform(): |
1603 act.setShortcut(QKeySequence( |
1911 act.setShortcut( |
1604 QCoreApplication.translate('ViewManager', 'Meta+E'))) |
1912 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+E")) |
|
1913 ) |
1605 else: |
1914 else: |
1606 act.setShortcut(QKeySequence( |
1915 act.setShortcut( |
1607 QCoreApplication.translate('ViewManager', 'End'))) |
1916 QKeySequence(QCoreApplication.translate("ViewManager", "End")) |
|
1917 ) |
1608 self.esm.setMapping(act, QsciScintilla.SCI_LINEEND) |
1918 self.esm.setMapping(act, QsciScintilla.SCI_LINEEND) |
1609 act.triggered.connect(self.esm.map) |
1919 act.triggered.connect(self.esm.map) |
1610 self.editActions.append(act) |
1920 self.editActions.append(act) |
1611 |
1921 |
1612 act = EricAction( |
1922 act = EricAction( |
1613 QCoreApplication.translate('ViewManager', |
1923 QCoreApplication.translate("ViewManager", "Scroll view down one line"), |
1614 'Scroll view down one line'), |
1924 QCoreApplication.translate("ViewManager", "Scroll view down one line"), |
1615 QCoreApplication.translate('ViewManager', |
1925 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+Down")), |
1616 'Scroll view down one line'), |
1926 0, |
1617 QKeySequence(QCoreApplication.translate('ViewManager', |
1927 self.editorActGrp, |
1618 'Ctrl+Down')), |
1928 "vm_edit_scroll_down_line", |
1619 0, self.editorActGrp, 'vm_edit_scroll_down_line') |
1929 ) |
1620 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLDOWN) |
1930 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLDOWN) |
1621 act.triggered.connect(self.esm.map) |
1931 act.triggered.connect(self.esm.map) |
1622 self.editActions.append(act) |
1932 self.editActions.append(act) |
1623 |
1933 |
1624 act = EricAction( |
1934 act = EricAction( |
1625 QCoreApplication.translate('ViewManager', |
1935 QCoreApplication.translate("ViewManager", "Scroll view up one line"), |
1626 'Scroll view up one line'), |
1936 QCoreApplication.translate("ViewManager", "Scroll view up one line"), |
1627 QCoreApplication.translate('ViewManager', |
1937 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+Up")), |
1628 'Scroll view up one line'), |
1938 0, |
1629 QKeySequence(QCoreApplication.translate('ViewManager', 'Ctrl+Up')), |
1939 self.editorActGrp, |
1630 0, self.editorActGrp, 'vm_edit_scroll_up_line') |
1940 "vm_edit_scroll_up_line", |
|
1941 ) |
1631 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLUP) |
1942 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLUP) |
1632 act.triggered.connect(self.esm.map) |
1943 act.triggered.connect(self.esm.map) |
1633 self.editActions.append(act) |
1944 self.editActions.append(act) |
1634 |
1945 |
1635 act = EricAction( |
1946 act = EricAction( |
1636 QCoreApplication.translate('ViewManager', 'Move up one paragraph'), |
1947 QCoreApplication.translate("ViewManager", "Move up one paragraph"), |
1637 QCoreApplication.translate('ViewManager', 'Move up one paragraph'), |
1948 QCoreApplication.translate("ViewManager", "Move up one paragraph"), |
1638 QKeySequence(QCoreApplication.translate('ViewManager', 'Alt+Up')), |
1949 QKeySequence(QCoreApplication.translate("ViewManager", "Alt+Up")), |
1639 0, self.editorActGrp, 'vm_edit_move_up_para') |
1950 0, |
|
1951 self.editorActGrp, |
|
1952 "vm_edit_move_up_para", |
|
1953 ) |
1640 self.esm.setMapping(act, QsciScintilla.SCI_PARAUP) |
1954 self.esm.setMapping(act, QsciScintilla.SCI_PARAUP) |
1641 act.triggered.connect(self.esm.map) |
1955 act.triggered.connect(self.esm.map) |
1642 self.editActions.append(act) |
1956 self.editActions.append(act) |
1643 |
1957 |
1644 act = EricAction( |
1958 act = EricAction( |
1645 QCoreApplication.translate('ViewManager', |
1959 QCoreApplication.translate("ViewManager", "Move down one paragraph"), |
1646 'Move down one paragraph'), |
1960 QCoreApplication.translate("ViewManager", "Move down one paragraph"), |
1647 QCoreApplication.translate('ViewManager', |
1961 QKeySequence(QCoreApplication.translate("ViewManager", "Alt+Down")), |
1648 'Move down one paragraph'), |
1962 0, |
1649 QKeySequence(QCoreApplication.translate('ViewManager', |
1963 self.editorActGrp, |
1650 'Alt+Down')), |
1964 "vm_edit_move_down_para", |
1651 0, self.editorActGrp, 'vm_edit_move_down_para') |
1965 ) |
1652 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWN) |
1966 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWN) |
1653 act.triggered.connect(self.esm.map) |
1967 act.triggered.connect(self.esm.map) |
1654 self.editActions.append(act) |
1968 self.editActions.append(act) |
1655 |
1969 |
1656 act = EricAction( |
1970 act = EricAction( |
1657 QCoreApplication.translate('ViewManager', 'Move up one page'), |
1971 QCoreApplication.translate("ViewManager", "Move up one page"), |
1658 QCoreApplication.translate('ViewManager', 'Move up one page'), |
1972 QCoreApplication.translate("ViewManager", "Move up one page"), |
1659 QKeySequence(QCoreApplication.translate('ViewManager', 'PgUp')), 0, |
1973 QKeySequence(QCoreApplication.translate("ViewManager", "PgUp")), |
1660 self.editorActGrp, 'vm_edit_move_up_page') |
1974 0, |
|
1975 self.editorActGrp, |
|
1976 "vm_edit_move_up_page", |
|
1977 ) |
1661 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUP) |
1978 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUP) |
1662 act.triggered.connect(self.esm.map) |
1979 act.triggered.connect(self.esm.map) |
1663 self.editActions.append(act) |
1980 self.editActions.append(act) |
1664 |
1981 |
1665 act = EricAction( |
1982 act = EricAction( |
1666 QCoreApplication.translate('ViewManager', 'Move down one page'), |
1983 QCoreApplication.translate("ViewManager", "Move down one page"), |
1667 QCoreApplication.translate('ViewManager', 'Move down one page'), |
1984 QCoreApplication.translate("ViewManager", "Move down one page"), |
1668 QKeySequence(QCoreApplication.translate('ViewManager', 'PgDown')), |
1985 QKeySequence(QCoreApplication.translate("ViewManager", "PgDown")), |
1669 0, self.editorActGrp, 'vm_edit_move_down_page') |
1986 0, |
|
1987 self.editorActGrp, |
|
1988 "vm_edit_move_down_page", |
|
1989 ) |
1670 if isMacPlatform(): |
1990 if isMacPlatform(): |
1671 act.setAlternateShortcut(QKeySequence( |
1991 act.setAlternateShortcut( |
1672 QCoreApplication.translate('ViewManager', 'Meta+V'))) |
1992 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+V")) |
|
1993 ) |
1673 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWN) |
1994 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWN) |
1674 act.triggered.connect(self.esm.map) |
1995 act.triggered.connect(self.esm.map) |
1675 self.editActions.append(act) |
1996 self.editActions.append(act) |
1676 |
1997 |
1677 act = EricAction( |
1998 act = EricAction( |
1678 QCoreApplication.translate('ViewManager', |
1999 QCoreApplication.translate("ViewManager", "Move to start of document"), |
1679 'Move to start of document'), |
2000 QCoreApplication.translate("ViewManager", "Move to start of document"), |
1680 QCoreApplication.translate('ViewManager', |
2001 0, |
1681 'Move to start of document'), |
2002 0, |
1682 0, 0, |
2003 self.editorActGrp, |
1683 self.editorActGrp, 'vm_edit_move_start_text') |
2004 "vm_edit_move_start_text", |
|
2005 ) |
1684 if isMacPlatform(): |
2006 if isMacPlatform(): |
1685 act.setShortcut(QKeySequence( |
2007 act.setShortcut( |
1686 QCoreApplication.translate('ViewManager', 'Ctrl+Up'))) |
2008 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+Up")) |
|
2009 ) |
1687 else: |
2010 else: |
1688 act.setShortcut(QKeySequence( |
2011 act.setShortcut( |
1689 QCoreApplication.translate('ViewManager', 'Ctrl+Home'))) |
2012 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+Home")) |
|
2013 ) |
1690 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTART) |
2014 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTART) |
1691 act.triggered.connect(self.esm.map) |
2015 act.triggered.connect(self.esm.map) |
1692 self.editActions.append(act) |
2016 self.editActions.append(act) |
1693 |
2017 |
1694 act = EricAction( |
2018 act = EricAction( |
1695 QCoreApplication.translate('ViewManager', |
2019 QCoreApplication.translate("ViewManager", "Move to end of document"), |
1696 'Move to end of document'), |
2020 QCoreApplication.translate("ViewManager", "Move to end of document"), |
1697 QCoreApplication.translate('ViewManager', |
2021 0, |
1698 'Move to end of document'), |
2022 0, |
1699 0, 0, |
2023 self.editorActGrp, |
1700 self.editorActGrp, 'vm_edit_move_end_text') |
2024 "vm_edit_move_end_text", |
|
2025 ) |
1701 if isMacPlatform(): |
2026 if isMacPlatform(): |
1702 act.setShortcut(QKeySequence( |
2027 act.setShortcut( |
1703 QCoreApplication.translate('ViewManager', 'Ctrl+Down'))) |
2028 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+Down")) |
|
2029 ) |
1704 else: |
2030 else: |
1705 act.setShortcut(QKeySequence( |
2031 act.setShortcut( |
1706 QCoreApplication.translate('ViewManager', 'Ctrl+End'))) |
2032 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+End")) |
|
2033 ) |
1707 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTEND) |
2034 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTEND) |
1708 act.triggered.connect(self.esm.map) |
2035 act.triggered.connect(self.esm.map) |
1709 self.editActions.append(act) |
2036 self.editActions.append(act) |
1710 |
2037 |
1711 act = EricAction( |
2038 act = EricAction( |
1712 QCoreApplication.translate('ViewManager', 'Indent one level'), |
2039 QCoreApplication.translate("ViewManager", "Indent one level"), |
1713 QCoreApplication.translate('ViewManager', 'Indent one level'), |
2040 QCoreApplication.translate("ViewManager", "Indent one level"), |
1714 QKeySequence(QCoreApplication.translate('ViewManager', 'Tab')), 0, |
2041 QKeySequence(QCoreApplication.translate("ViewManager", "Tab")), |
1715 self.editorActGrp, 'vm_edit_indent_one_level') |
2042 0, |
|
2043 self.editorActGrp, |
|
2044 "vm_edit_indent_one_level", |
|
2045 ) |
1716 self.esm.setMapping(act, QsciScintilla.SCI_TAB) |
2046 self.esm.setMapping(act, QsciScintilla.SCI_TAB) |
1717 act.triggered.connect(self.esm.map) |
2047 act.triggered.connect(self.esm.map) |
1718 self.editActions.append(act) |
2048 self.editActions.append(act) |
1719 |
2049 |
1720 act = EricAction( |
2050 act = EricAction( |
1721 QCoreApplication.translate('ViewManager', 'Unindent one level'), |
2051 QCoreApplication.translate("ViewManager", "Unindent one level"), |
1722 QCoreApplication.translate('ViewManager', 'Unindent one level'), |
2052 QCoreApplication.translate("ViewManager", "Unindent one level"), |
1723 QKeySequence(QCoreApplication.translate('ViewManager', |
2053 QKeySequence(QCoreApplication.translate("ViewManager", "Shift+Tab")), |
1724 'Shift+Tab')), |
2054 0, |
1725 0, self.editorActGrp, 'vm_edit_unindent_one_level') |
2055 self.editorActGrp, |
|
2056 "vm_edit_unindent_one_level", |
|
2057 ) |
1726 self.esm.setMapping(act, QsciScintilla.SCI_BACKTAB) |
2058 self.esm.setMapping(act, QsciScintilla.SCI_BACKTAB) |
1727 act.triggered.connect(self.esm.map) |
2059 act.triggered.connect(self.esm.map) |
1728 self.editActions.append(act) |
2060 self.editActions.append(act) |
1729 |
2061 |
1730 act = EricAction( |
2062 act = EricAction( |
1731 QCoreApplication.translate( |
2063 QCoreApplication.translate( |
1732 'ViewManager', 'Extend selection left one character'), |
2064 "ViewManager", "Extend selection left one character" |
1733 QCoreApplication.translate( |
2065 ), |
1734 'ViewManager', 'Extend selection left one character'), |
2066 QCoreApplication.translate( |
1735 QKeySequence(QCoreApplication.translate('ViewManager', |
2067 "ViewManager", "Extend selection left one character" |
1736 'Shift+Left')), |
2068 ), |
1737 0, self.editorActGrp, 'vm_edit_extend_selection_left_char') |
2069 QKeySequence(QCoreApplication.translate("ViewManager", "Shift+Left")), |
|
2070 0, |
|
2071 self.editorActGrp, |
|
2072 "vm_edit_extend_selection_left_char", |
|
2073 ) |
1738 if isMacPlatform(): |
2074 if isMacPlatform(): |
1739 act.setAlternateShortcut(QKeySequence( |
2075 act.setAlternateShortcut( |
1740 QCoreApplication.translate('ViewManager', 'Meta+Shift+B'))) |
2076 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+Shift+B")) |
|
2077 ) |
1741 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTEXTEND) |
2078 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTEXTEND) |
1742 act.triggered.connect(self.esm.map) |
2079 act.triggered.connect(self.esm.map) |
1743 self.editActions.append(act) |
2080 self.editActions.append(act) |
1744 |
2081 |
1745 act = EricAction( |
2082 act = EricAction( |
1746 QCoreApplication.translate( |
2083 QCoreApplication.translate( |
1747 'ViewManager', 'Extend selection right one character'), |
2084 "ViewManager", "Extend selection right one character" |
1748 QCoreApplication.translate( |
2085 ), |
1749 'ViewManager', 'Extend selection right one character'), |
2086 QCoreApplication.translate( |
1750 QKeySequence(QCoreApplication.translate('ViewManager', |
2087 "ViewManager", "Extend selection right one character" |
1751 'Shift+Right')), |
2088 ), |
1752 0, self.editorActGrp, 'vm_edit_extend_selection_right_char') |
2089 QKeySequence(QCoreApplication.translate("ViewManager", "Shift+Right")), |
|
2090 0, |
|
2091 self.editorActGrp, |
|
2092 "vm_edit_extend_selection_right_char", |
|
2093 ) |
1753 if isMacPlatform(): |
2094 if isMacPlatform(): |
1754 act.setAlternateShortcut(QKeySequence( |
2095 act.setAlternateShortcut( |
1755 QCoreApplication.translate('ViewManager', 'Meta+Shift+F'))) |
2096 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+Shift+F")) |
|
2097 ) |
1756 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTEXTEND) |
2098 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTEXTEND) |
1757 act.triggered.connect(self.esm.map) |
2099 act.triggered.connect(self.esm.map) |
1758 self.editActions.append(act) |
2100 self.editActions.append(act) |
1759 |
2101 |
1760 act = EricAction( |
2102 act = EricAction( |
1761 QCoreApplication.translate( |
2103 QCoreApplication.translate("ViewManager", "Extend selection up one line"), |
1762 'ViewManager', 'Extend selection up one line'), |
2104 QCoreApplication.translate("ViewManager", "Extend selection up one line"), |
1763 QCoreApplication.translate( |
2105 QKeySequence(QCoreApplication.translate("ViewManager", "Shift+Up")), |
1764 'ViewManager', 'Extend selection up one line'), |
2106 0, |
1765 QKeySequence(QCoreApplication.translate('ViewManager', |
2107 self.editorActGrp, |
1766 'Shift+Up')), |
2108 "vm_edit_extend_selection_up_line", |
1767 0, self.editorActGrp, 'vm_edit_extend_selection_up_line') |
2109 ) |
1768 if isMacPlatform(): |
2110 if isMacPlatform(): |
1769 act.setAlternateShortcut(QKeySequence( |
2111 act.setAlternateShortcut( |
1770 QCoreApplication.translate('ViewManager', 'Meta+Shift+P'))) |
2112 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+Shift+P")) |
|
2113 ) |
1771 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPEXTEND) |
2114 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPEXTEND) |
1772 act.triggered.connect(self.esm.map) |
2115 act.triggered.connect(self.esm.map) |
1773 self.editActions.append(act) |
2116 self.editActions.append(act) |
1774 |
2117 |
1775 act = EricAction( |
2118 act = EricAction( |
1776 QCoreApplication.translate( |
2119 QCoreApplication.translate("ViewManager", "Extend selection down one line"), |
1777 'ViewManager', 'Extend selection down one line'), |
2120 QCoreApplication.translate("ViewManager", "Extend selection down one line"), |
1778 QCoreApplication.translate( |
2121 QKeySequence(QCoreApplication.translate("ViewManager", "Shift+Down")), |
1779 'ViewManager', 'Extend selection down one line'), |
2122 0, |
1780 QKeySequence(QCoreApplication.translate('ViewManager', |
2123 self.editorActGrp, |
1781 'Shift+Down')), |
2124 "vm_edit_extend_selection_down_line", |
1782 0, self.editorActGrp, 'vm_edit_extend_selection_down_line') |
2125 ) |
1783 if isMacPlatform(): |
2126 if isMacPlatform(): |
1784 act.setAlternateShortcut(QKeySequence( |
2127 act.setAlternateShortcut( |
1785 QCoreApplication.translate('ViewManager', 'Meta+Shift+N'))) |
2128 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+Shift+N")) |
|
2129 ) |
1786 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNEXTEND) |
2130 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNEXTEND) |
1787 act.triggered.connect(self.esm.map) |
2131 act.triggered.connect(self.esm.map) |
1788 self.editActions.append(act) |
2132 self.editActions.append(act) |
1789 |
2133 |
1790 act = EricAction( |
2134 act = EricAction( |
1791 QCoreApplication.translate( |
2135 QCoreApplication.translate( |
1792 'ViewManager', 'Extend selection left one word part'), |
2136 "ViewManager", "Extend selection left one word part" |
1793 QCoreApplication.translate( |
2137 ), |
1794 'ViewManager', 'Extend selection left one word part'), |
2138 QCoreApplication.translate( |
1795 0, 0, |
2139 "ViewManager", "Extend selection left one word part" |
1796 self.editorActGrp, 'vm_edit_extend_selection_left_word_part') |
2140 ), |
|
2141 0, |
|
2142 0, |
|
2143 self.editorActGrp, |
|
2144 "vm_edit_extend_selection_left_word_part", |
|
2145 ) |
1797 if not isMacPlatform(): |
2146 if not isMacPlatform(): |
1798 act.setShortcut(QKeySequence( |
2147 act.setShortcut( |
1799 QCoreApplication.translate('ViewManager', 'Alt+Shift+Left'))) |
2148 QKeySequence( |
|
2149 QCoreApplication.translate("ViewManager", "Alt+Shift+Left") |
|
2150 ) |
|
2151 ) |
1800 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFTEXTEND) |
2152 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFTEXTEND) |
1801 act.triggered.connect(self.esm.map) |
2153 act.triggered.connect(self.esm.map) |
1802 self.editActions.append(act) |
2154 self.editActions.append(act) |
1803 |
2155 |
1804 act = EricAction( |
2156 act = EricAction( |
1805 QCoreApplication.translate( |
2157 QCoreApplication.translate( |
1806 'ViewManager', 'Extend selection right one word part'), |
2158 "ViewManager", "Extend selection right one word part" |
1807 QCoreApplication.translate( |
2159 ), |
1808 'ViewManager', 'Extend selection right one word part'), |
2160 QCoreApplication.translate( |
1809 0, 0, |
2161 "ViewManager", "Extend selection right one word part" |
1810 self.editorActGrp, 'vm_edit_extend_selection_right_word_part') |
2162 ), |
|
2163 0, |
|
2164 0, |
|
2165 self.editorActGrp, |
|
2166 "vm_edit_extend_selection_right_word_part", |
|
2167 ) |
1811 if not isMacPlatform(): |
2168 if not isMacPlatform(): |
1812 act.setShortcut(QKeySequence( |
2169 act.setShortcut( |
1813 QCoreApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
2170 QKeySequence( |
|
2171 QCoreApplication.translate("ViewManager", "Alt+Shift+Right") |
|
2172 ) |
|
2173 ) |
1814 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND) |
2174 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND) |
1815 act.triggered.connect(self.esm.map) |
2175 act.triggered.connect(self.esm.map) |
1816 self.editActions.append(act) |
2176 self.editActions.append(act) |
1817 |
2177 |
1818 act = EricAction( |
2178 act = EricAction( |
1819 QCoreApplication.translate( |
2179 QCoreApplication.translate("ViewManager", "Extend selection left one word"), |
1820 'ViewManager', 'Extend selection left one word'), |
2180 QCoreApplication.translate("ViewManager", "Extend selection left one word"), |
1821 QCoreApplication.translate( |
2181 0, |
1822 'ViewManager', 'Extend selection left one word'), |
2182 0, |
1823 0, 0, |
2183 self.editorActGrp, |
1824 self.editorActGrp, 'vm_edit_extend_selection_left_word') |
2184 "vm_edit_extend_selection_left_word", |
|
2185 ) |
1825 if isMacPlatform(): |
2186 if isMacPlatform(): |
1826 act.setShortcut(QKeySequence( |
2187 act.setShortcut( |
1827 QCoreApplication.translate('ViewManager', 'Alt+Shift+Left'))) |
2188 QKeySequence( |
|
2189 QCoreApplication.translate("ViewManager", "Alt+Shift+Left") |
|
2190 ) |
|
2191 ) |
1828 else: |
2192 else: |
1829 act.setShortcut(QKeySequence( |
2193 act.setShortcut( |
1830 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Left'))) |
2194 QKeySequence( |
|
2195 QCoreApplication.translate("ViewManager", "Ctrl+Shift+Left") |
|
2196 ) |
|
2197 ) |
1831 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEXTEND) |
2198 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEXTEND) |
1832 act.triggered.connect(self.esm.map) |
2199 act.triggered.connect(self.esm.map) |
1833 self.editActions.append(act) |
2200 self.editActions.append(act) |
1834 |
2201 |
1835 act = EricAction( |
2202 act = EricAction( |
1836 QCoreApplication.translate( |
2203 QCoreApplication.translate( |
1837 'ViewManager', 'Extend selection right one word'), |
2204 "ViewManager", "Extend selection right one word" |
1838 QCoreApplication.translate( |
2205 ), |
1839 'ViewManager', 'Extend selection right one word'), |
2206 QCoreApplication.translate( |
1840 0, 0, |
2207 "ViewManager", "Extend selection right one word" |
1841 self.editorActGrp, 'vm_edit_extend_selection_right_word') |
2208 ), |
|
2209 0, |
|
2210 0, |
|
2211 self.editorActGrp, |
|
2212 "vm_edit_extend_selection_right_word", |
|
2213 ) |
1842 if isMacPlatform(): |
2214 if isMacPlatform(): |
1843 act.setShortcut(QKeySequence( |
2215 act.setShortcut( |
1844 QCoreApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
2216 QKeySequence( |
|
2217 QCoreApplication.translate("ViewManager", "Alt+Shift+Right") |
|
2218 ) |
|
2219 ) |
1845 else: |
2220 else: |
1846 act.setShortcut(QKeySequence( |
2221 act.setShortcut( |
1847 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Right'))) |
2222 QKeySequence( |
|
2223 QCoreApplication.translate("ViewManager", "Ctrl+Shift+Right") |
|
2224 ) |
|
2225 ) |
1848 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEXTEND) |
2226 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEXTEND) |
1849 act.triggered.connect(self.esm.map) |
2227 act.triggered.connect(self.esm.map) |
1850 self.editActions.append(act) |
2228 self.editActions.append(act) |
1851 |
2229 |
1852 act = EricAction( |
2230 act = EricAction( |
1853 QCoreApplication.translate( |
2231 QCoreApplication.translate( |
1854 'ViewManager', |
2232 "ViewManager", |
1855 'Extend selection to first visible character in document' |
2233 "Extend selection to first visible character in document" " line", |
1856 ' line'), |
2234 ), |
1857 QCoreApplication.translate( |
2235 QCoreApplication.translate( |
1858 'ViewManager', |
2236 "ViewManager", |
1859 'Extend selection to first visible character in document' |
2237 "Extend selection to first visible character in document" " line", |
1860 ' line'), |
2238 ), |
1861 0, 0, |
2239 0, |
1862 self.editorActGrp, 'vm_edit_extend_selection_first_visible_char') |
2240 0, |
|
2241 self.editorActGrp, |
|
2242 "vm_edit_extend_selection_first_visible_char", |
|
2243 ) |
1863 if not isMacPlatform(): |
2244 if not isMacPlatform(): |
1864 act.setShortcut(QKeySequence( |
2245 act.setShortcut( |
1865 QCoreApplication.translate('ViewManager', 'Shift+Home'))) |
2246 QKeySequence(QCoreApplication.translate("ViewManager", "Shift+Home")) |
|
2247 ) |
1866 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEEXTEND) |
2248 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEEXTEND) |
1867 act.triggered.connect(self.esm.map) |
2249 act.triggered.connect(self.esm.map) |
1868 self.editActions.append(act) |
2250 self.editActions.append(act) |
1869 |
2251 |
1870 act = EricAction( |
2252 act = EricAction( |
1871 QCoreApplication.translate( |
2253 QCoreApplication.translate( |
1872 'ViewManager', 'Extend selection to end of document line'), |
2254 "ViewManager", "Extend selection to end of document line" |
1873 QCoreApplication.translate( |
2255 ), |
1874 'ViewManager', 'Extend selection to end of document line'), |
2256 QCoreApplication.translate( |
1875 0, 0, |
2257 "ViewManager", "Extend selection to end of document line" |
1876 self.editorActGrp, 'vm_edit_extend_selection_end_line') |
2258 ), |
|
2259 0, |
|
2260 0, |
|
2261 self.editorActGrp, |
|
2262 "vm_edit_extend_selection_end_line", |
|
2263 ) |
1877 if isMacPlatform(): |
2264 if isMacPlatform(): |
1878 act.setShortcut(QKeySequence( |
2265 act.setShortcut( |
1879 QCoreApplication.translate('ViewManager', 'Meta+Shift+E'))) |
2266 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+Shift+E")) |
|
2267 ) |
1880 else: |
2268 else: |
1881 act.setShortcut(QKeySequence( |
2269 act.setShortcut( |
1882 QCoreApplication.translate('ViewManager', 'Shift+End'))) |
2270 QKeySequence(QCoreApplication.translate("ViewManager", "Shift+End")) |
|
2271 ) |
1883 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDEXTEND) |
2272 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDEXTEND) |
1884 act.triggered.connect(self.esm.map) |
2273 act.triggered.connect(self.esm.map) |
1885 self.editActions.append(act) |
2274 self.editActions.append(act) |
1886 |
2275 |
1887 act = EricAction( |
2276 act = EricAction( |
1888 QCoreApplication.translate( |
2277 QCoreApplication.translate( |
1889 'ViewManager', 'Extend selection up one paragraph'), |
2278 "ViewManager", "Extend selection up one paragraph" |
1890 QCoreApplication.translate( |
2279 ), |
1891 'ViewManager', 'Extend selection up one paragraph'), |
2280 QCoreApplication.translate( |
1892 QKeySequence(QCoreApplication.translate( |
2281 "ViewManager", "Extend selection up one paragraph" |
1893 'ViewManager', 'Alt+Shift+Up')), |
2282 ), |
1894 0, |
2283 QKeySequence(QCoreApplication.translate("ViewManager", "Alt+Shift+Up")), |
1895 self.editorActGrp, 'vm_edit_extend_selection_up_para') |
2284 0, |
|
2285 self.editorActGrp, |
|
2286 "vm_edit_extend_selection_up_para", |
|
2287 ) |
1896 self.esm.setMapping(act, QsciScintilla.SCI_PARAUPEXTEND) |
2288 self.esm.setMapping(act, QsciScintilla.SCI_PARAUPEXTEND) |
1897 act.triggered.connect(self.esm.map) |
2289 act.triggered.connect(self.esm.map) |
1898 self.editActions.append(act) |
2290 self.editActions.append(act) |
1899 |
2291 |
1900 act = EricAction( |
2292 act = EricAction( |
1901 QCoreApplication.translate( |
2293 QCoreApplication.translate( |
1902 'ViewManager', 'Extend selection down one paragraph'), |
2294 "ViewManager", "Extend selection down one paragraph" |
1903 QCoreApplication.translate( |
2295 ), |
1904 'ViewManager', 'Extend selection down one paragraph'), |
2296 QCoreApplication.translate( |
1905 QKeySequence(QCoreApplication.translate( |
2297 "ViewManager", "Extend selection down one paragraph" |
1906 'ViewManager', 'Alt+Shift+Down')), |
2298 ), |
1907 0, |
2299 QKeySequence(QCoreApplication.translate("ViewManager", "Alt+Shift+Down")), |
1908 self.editorActGrp, 'vm_edit_extend_selection_down_para') |
2300 0, |
|
2301 self.editorActGrp, |
|
2302 "vm_edit_extend_selection_down_para", |
|
2303 ) |
1909 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWNEXTEND) |
2304 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWNEXTEND) |
1910 act.triggered.connect(self.esm.map) |
2305 act.triggered.connect(self.esm.map) |
1911 self.editActions.append(act) |
2306 self.editActions.append(act) |
1912 |
2307 |
1913 act = EricAction( |
2308 act = EricAction( |
1914 QCoreApplication.translate( |
2309 QCoreApplication.translate("ViewManager", "Extend selection up one page"), |
1915 'ViewManager', 'Extend selection up one page'), |
2310 QCoreApplication.translate("ViewManager", "Extend selection up one page"), |
1916 QCoreApplication.translate( |
2311 QKeySequence(QCoreApplication.translate("ViewManager", "Shift+PgUp")), |
1917 'ViewManager', 'Extend selection up one page'), |
2312 0, |
1918 QKeySequence(QCoreApplication.translate('ViewManager', |
2313 self.editorActGrp, |
1919 'Shift+PgUp')), |
2314 "vm_edit_extend_selection_up_page", |
1920 0, self.editorActGrp, 'vm_edit_extend_selection_up_page') |
2315 ) |
1921 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPEXTEND) |
2316 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPEXTEND) |
1922 act.triggered.connect(self.esm.map) |
2317 act.triggered.connect(self.esm.map) |
1923 self.editActions.append(act) |
2318 self.editActions.append(act) |
1924 |
2319 |
1925 act = EricAction( |
2320 act = EricAction( |
1926 QCoreApplication.translate( |
2321 QCoreApplication.translate("ViewManager", "Extend selection down one page"), |
1927 'ViewManager', 'Extend selection down one page'), |
2322 QCoreApplication.translate("ViewManager", "Extend selection down one page"), |
1928 QCoreApplication.translate( |
2323 QKeySequence(QCoreApplication.translate("ViewManager", "Shift+PgDown")), |
1929 'ViewManager', 'Extend selection down one page'), |
2324 0, |
1930 QKeySequence(QCoreApplication.translate( |
2325 self.editorActGrp, |
1931 'ViewManager', 'Shift+PgDown')), |
2326 "vm_edit_extend_selection_down_page", |
1932 0, |
2327 ) |
1933 self.editorActGrp, 'vm_edit_extend_selection_down_page') |
|
1934 if isMacPlatform(): |
2328 if isMacPlatform(): |
1935 act.setAlternateShortcut(QKeySequence( |
2329 act.setAlternateShortcut( |
1936 QCoreApplication.translate('ViewManager', 'Meta+Shift+V'))) |
2330 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+Shift+V")) |
|
2331 ) |
1937 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNEXTEND) |
2332 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNEXTEND) |
1938 act.triggered.connect(self.esm.map) |
2333 act.triggered.connect(self.esm.map) |
1939 self.editActions.append(act) |
2334 self.editActions.append(act) |
1940 |
2335 |
1941 act = EricAction( |
2336 act = EricAction( |
1942 QCoreApplication.translate( |
2337 QCoreApplication.translate( |
1943 'ViewManager', 'Extend selection to start of document'), |
2338 "ViewManager", "Extend selection to start of document" |
1944 QCoreApplication.translate( |
2339 ), |
1945 'ViewManager', 'Extend selection to start of document'), |
2340 QCoreApplication.translate( |
1946 0, 0, |
2341 "ViewManager", "Extend selection to start of document" |
1947 self.editorActGrp, 'vm_edit_extend_selection_start_text') |
2342 ), |
|
2343 0, |
|
2344 0, |
|
2345 self.editorActGrp, |
|
2346 "vm_edit_extend_selection_start_text", |
|
2347 ) |
1948 if isMacPlatform(): |
2348 if isMacPlatform(): |
1949 act.setShortcut(QKeySequence( |
2349 act.setShortcut( |
1950 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Up'))) |
2350 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+Shift+Up")) |
|
2351 ) |
1951 else: |
2352 else: |
1952 act.setShortcut(QKeySequence( |
2353 act.setShortcut( |
1953 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Home'))) |
2354 QKeySequence( |
|
2355 QCoreApplication.translate("ViewManager", "Ctrl+Shift+Home") |
|
2356 ) |
|
2357 ) |
1954 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTARTEXTEND) |
2358 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTARTEXTEND) |
1955 act.triggered.connect(self.esm.map) |
2359 act.triggered.connect(self.esm.map) |
1956 self.editActions.append(act) |
2360 self.editActions.append(act) |
1957 |
2361 |
1958 act = EricAction( |
2362 act = EricAction( |
1959 QCoreApplication.translate( |
2363 QCoreApplication.translate( |
1960 'ViewManager', 'Extend selection to end of document'), |
2364 "ViewManager", "Extend selection to end of document" |
1961 QCoreApplication.translate( |
2365 ), |
1962 'ViewManager', 'Extend selection to end of document'), |
2366 QCoreApplication.translate( |
1963 0, 0, |
2367 "ViewManager", "Extend selection to end of document" |
1964 self.editorActGrp, 'vm_edit_extend_selection_end_text') |
2368 ), |
|
2369 0, |
|
2370 0, |
|
2371 self.editorActGrp, |
|
2372 "vm_edit_extend_selection_end_text", |
|
2373 ) |
1965 if isMacPlatform(): |
2374 if isMacPlatform(): |
1966 act.setShortcut(QKeySequence( |
2375 act.setShortcut( |
1967 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Down'))) |
2376 QKeySequence( |
|
2377 QCoreApplication.translate("ViewManager", "Ctrl+Shift+Down") |
|
2378 ) |
|
2379 ) |
1968 else: |
2380 else: |
1969 act.setShortcut(QKeySequence( |
2381 act.setShortcut( |
1970 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+End'))) |
2382 QKeySequence( |
|
2383 QCoreApplication.translate("ViewManager", "Ctrl+Shift+End") |
|
2384 ) |
|
2385 ) |
1971 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTENDEXTEND) |
2386 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTENDEXTEND) |
1972 act.triggered.connect(self.esm.map) |
2387 act.triggered.connect(self.esm.map) |
1973 self.editActions.append(act) |
2388 self.editActions.append(act) |
1974 |
2389 |
1975 act = EricAction( |
2390 act = EricAction( |
1976 QCoreApplication.translate('ViewManager', |
2391 QCoreApplication.translate("ViewManager", "Delete previous character"), |
1977 'Delete previous character'), |
2392 QCoreApplication.translate("ViewManager", "Delete previous character"), |
1978 QCoreApplication.translate('ViewManager', |
2393 QKeySequence(QCoreApplication.translate("ViewManager", "Backspace")), |
1979 'Delete previous character'), |
2394 0, |
1980 QKeySequence(QCoreApplication.translate('ViewManager', |
2395 self.editorActGrp, |
1981 'Backspace')), |
2396 "vm_edit_delete_previous_char", |
1982 0, self.editorActGrp, 'vm_edit_delete_previous_char') |
2397 ) |
1983 if isMacPlatform(): |
2398 if isMacPlatform(): |
1984 act.setAlternateShortcut(QKeySequence( |
2399 act.setAlternateShortcut( |
1985 QCoreApplication.translate('ViewManager', 'Meta+H'))) |
2400 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+H")) |
|
2401 ) |
1986 else: |
2402 else: |
1987 act.setAlternateShortcut(QKeySequence( |
2403 act.setAlternateShortcut( |
1988 QCoreApplication.translate('ViewManager', 'Shift+Backspace'))) |
2404 QKeySequence( |
|
2405 QCoreApplication.translate("ViewManager", "Shift+Backspace") |
|
2406 ) |
|
2407 ) |
1989 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACK) |
2408 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACK) |
1990 act.triggered.connect(self.esm.map) |
2409 act.triggered.connect(self.esm.map) |
1991 self.editActions.append(act) |
2410 self.editActions.append(act) |
1992 |
2411 |
1993 act = EricAction( |
2412 act = EricAction( |
1994 QCoreApplication.translate( |
2413 QCoreApplication.translate( |
1995 'ViewManager', |
2414 "ViewManager", "Delete previous character if not at start of line" |
1996 'Delete previous character if not at start of line'), |
2415 ), |
1997 QCoreApplication.translate( |
2416 QCoreApplication.translate( |
1998 'ViewManager', |
2417 "ViewManager", "Delete previous character if not at start of line" |
1999 'Delete previous character if not at start of line'), |
2418 ), |
2000 0, 0, |
2419 0, |
2001 self.editorActGrp, 'vm_edit_delet_previous_char_not_line_start') |
2420 0, |
|
2421 self.editorActGrp, |
|
2422 "vm_edit_delet_previous_char_not_line_start", |
|
2423 ) |
2002 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACKNOTLINE) |
2424 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACKNOTLINE) |
2003 act.triggered.connect(self.esm.map) |
2425 act.triggered.connect(self.esm.map) |
2004 self.editActions.append(act) |
2426 self.editActions.append(act) |
2005 |
2427 |
2006 act = EricAction( |
2428 act = EricAction( |
2007 QCoreApplication.translate('ViewManager', |
2429 QCoreApplication.translate("ViewManager", "Delete current character"), |
2008 'Delete current character'), |
2430 QCoreApplication.translate("ViewManager", "Delete current character"), |
2009 QCoreApplication.translate('ViewManager', |
2431 QKeySequence(QCoreApplication.translate("ViewManager", "Del")), |
2010 'Delete current character'), |
2432 0, |
2011 QKeySequence(QCoreApplication.translate('ViewManager', 'Del')), |
2433 self.editorActGrp, |
2012 0, self.editorActGrp, 'vm_edit_delete_current_char') |
2434 "vm_edit_delete_current_char", |
|
2435 ) |
2013 if isMacPlatform(): |
2436 if isMacPlatform(): |
2014 act.setAlternateShortcut(QKeySequence( |
2437 act.setAlternateShortcut( |
2015 QCoreApplication.translate('ViewManager', 'Meta+D'))) |
2438 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+D")) |
|
2439 ) |
2016 self.esm.setMapping(act, QsciScintilla.SCI_CLEAR) |
2440 self.esm.setMapping(act, QsciScintilla.SCI_CLEAR) |
2017 act.triggered.connect(self.esm.map) |
2441 act.triggered.connect(self.esm.map) |
2018 self.editActions.append(act) |
2442 self.editActions.append(act) |
2019 |
2443 |
2020 act = EricAction( |
2444 act = EricAction( |
2021 QCoreApplication.translate('ViewManager', 'Delete word to left'), |
2445 QCoreApplication.translate("ViewManager", "Delete word to left"), |
2022 QCoreApplication.translate('ViewManager', 'Delete word to left'), |
2446 QCoreApplication.translate("ViewManager", "Delete word to left"), |
2023 QKeySequence(QCoreApplication.translate( |
2447 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+Backspace")), |
2024 'ViewManager', 'Ctrl+Backspace')), |
2448 0, |
2025 0, |
2449 self.editorActGrp, |
2026 self.editorActGrp, 'vm_edit_delete_word_left') |
2450 "vm_edit_delete_word_left", |
|
2451 ) |
2027 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDLEFT) |
2452 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDLEFT) |
2028 act.triggered.connect(self.esm.map) |
2453 act.triggered.connect(self.esm.map) |
2029 self.editActions.append(act) |
2454 self.editActions.append(act) |
2030 |
2455 |
2031 act = EricAction( |
2456 act = EricAction( |
2032 QCoreApplication.translate('ViewManager', 'Delete word to right'), |
2457 QCoreApplication.translate("ViewManager", "Delete word to right"), |
2033 QCoreApplication.translate('ViewManager', 'Delete word to right'), |
2458 QCoreApplication.translate("ViewManager", "Delete word to right"), |
2034 QKeySequence(QCoreApplication.translate('ViewManager', |
2459 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+Del")), |
2035 'Ctrl+Del')), |
2460 0, |
2036 0, self.editorActGrp, 'vm_edit_delete_word_right') |
2461 self.editorActGrp, |
|
2462 "vm_edit_delete_word_right", |
|
2463 ) |
2037 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHT) |
2464 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHT) |
2038 act.triggered.connect(self.esm.map) |
2465 act.triggered.connect(self.esm.map) |
2039 self.editActions.append(act) |
2466 self.editActions.append(act) |
2040 |
2467 |
2041 act = EricAction( |
2468 act = EricAction( |
2042 QCoreApplication.translate('ViewManager', 'Delete line to left'), |
2469 QCoreApplication.translate("ViewManager", "Delete line to left"), |
2043 QCoreApplication.translate('ViewManager', 'Delete line to left'), |
2470 QCoreApplication.translate("ViewManager", "Delete line to left"), |
2044 QKeySequence(QCoreApplication.translate( |
2471 QKeySequence( |
2045 'ViewManager', 'Ctrl+Shift+Backspace')), |
2472 QCoreApplication.translate("ViewManager", "Ctrl+Shift+Backspace") |
2046 0, |
2473 ), |
2047 self.editorActGrp, 'vm_edit_delete_line_left') |
2474 0, |
|
2475 self.editorActGrp, |
|
2476 "vm_edit_delete_line_left", |
|
2477 ) |
2048 self.esm.setMapping(act, QsciScintilla.SCI_DELLINELEFT) |
2478 self.esm.setMapping(act, QsciScintilla.SCI_DELLINELEFT) |
2049 act.triggered.connect(self.esm.map) |
2479 act.triggered.connect(self.esm.map) |
2050 self.editActions.append(act) |
2480 self.editActions.append(act) |
2051 |
2481 |
2052 act = EricAction( |
2482 act = EricAction( |
2053 QCoreApplication.translate('ViewManager', 'Delete line to right'), |
2483 QCoreApplication.translate("ViewManager", "Delete line to right"), |
2054 QCoreApplication.translate('ViewManager', 'Delete line to right'), |
2484 QCoreApplication.translate("ViewManager", "Delete line to right"), |
2055 0, 0, |
2485 0, |
2056 self.editorActGrp, 'vm_edit_delete_line_right') |
2486 0, |
|
2487 self.editorActGrp, |
|
2488 "vm_edit_delete_line_right", |
|
2489 ) |
2057 if isMacPlatform(): |
2490 if isMacPlatform(): |
2058 act.setShortcut(QKeySequence( |
2491 act.setShortcut( |
2059 QCoreApplication.translate('ViewManager', 'Meta+K'))) |
2492 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+K")) |
|
2493 ) |
2060 else: |
2494 else: |
2061 act.setShortcut(QKeySequence( |
2495 act.setShortcut( |
2062 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Del'))) |
2496 QKeySequence( |
|
2497 QCoreApplication.translate("ViewManager", "Ctrl+Shift+Del") |
|
2498 ) |
|
2499 ) |
2063 self.esm.setMapping(act, QsciScintilla.SCI_DELLINERIGHT) |
2500 self.esm.setMapping(act, QsciScintilla.SCI_DELLINERIGHT) |
2064 act.triggered.connect(self.esm.map) |
2501 act.triggered.connect(self.esm.map) |
2065 self.editActions.append(act) |
2502 self.editActions.append(act) |
2066 |
2503 |
2067 act = EricAction( |
2504 act = EricAction( |
2068 QCoreApplication.translate('ViewManager', 'Insert new line'), |
2505 QCoreApplication.translate("ViewManager", "Insert new line"), |
2069 QCoreApplication.translate('ViewManager', 'Insert new line'), |
2506 QCoreApplication.translate("ViewManager", "Insert new line"), |
2070 QKeySequence(QCoreApplication.translate('ViewManager', 'Return')), |
2507 QKeySequence(QCoreApplication.translate("ViewManager", "Return")), |
2071 QKeySequence(QCoreApplication.translate('ViewManager', 'Enter')), |
2508 QKeySequence(QCoreApplication.translate("ViewManager", "Enter")), |
2072 self.editorActGrp, 'vm_edit_insert_line') |
2509 self.editorActGrp, |
|
2510 "vm_edit_insert_line", |
|
2511 ) |
2073 self.esm.setMapping(act, QsciScintilla.SCI_NEWLINE) |
2512 self.esm.setMapping(act, QsciScintilla.SCI_NEWLINE) |
2074 act.triggered.connect(self.esm.map) |
2513 act.triggered.connect(self.esm.map) |
2075 self.editActions.append(act) |
2514 self.editActions.append(act) |
2076 |
2515 |
2077 act = EricAction( |
2516 act = EricAction( |
2078 QCoreApplication.translate( |
2517 QCoreApplication.translate( |
2079 'ViewManager', 'Insert new line below current line'), |
2518 "ViewManager", "Insert new line below current line" |
2080 QCoreApplication.translate( |
2519 ), |
2081 'ViewManager', 'Insert new line below current line'), |
2520 QCoreApplication.translate( |
2082 QKeySequence(QCoreApplication.translate( |
2521 "ViewManager", "Insert new line below current line" |
2083 'ViewManager', 'Shift+Return')), |
2522 ), |
2084 QKeySequence(QCoreApplication.translate('ViewManager', |
2523 QKeySequence(QCoreApplication.translate("ViewManager", "Shift+Return")), |
2085 'Shift+Enter')), |
2524 QKeySequence(QCoreApplication.translate("ViewManager", "Shift+Enter")), |
2086 self.editorActGrp, 'vm_edit_insert_line_below') |
2525 self.editorActGrp, |
|
2526 "vm_edit_insert_line_below", |
|
2527 ) |
2087 act.triggered.connect(self.__newLineBelow) |
2528 act.triggered.connect(self.__newLineBelow) |
2088 self.editActions.append(act) |
2529 self.editActions.append(act) |
2089 |
2530 |
2090 act = EricAction( |
2531 act = EricAction( |
2091 QCoreApplication.translate('ViewManager', 'Delete current line'), |
2532 QCoreApplication.translate("ViewManager", "Delete current line"), |
2092 QCoreApplication.translate('ViewManager', 'Delete current line'), |
2533 QCoreApplication.translate("ViewManager", "Delete current line"), |
2093 QKeySequence(QCoreApplication.translate( |
2534 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+Shift+L")), |
2094 'ViewManager', 'Ctrl+Shift+L')), |
2535 0, |
2095 0, |
2536 self.editorActGrp, |
2096 self.editorActGrp, 'vm_edit_delete_current_line') |
2537 "vm_edit_delete_current_line", |
|
2538 ) |
2097 self.esm.setMapping(act, QsciScintilla.SCI_LINEDELETE) |
2539 self.esm.setMapping(act, QsciScintilla.SCI_LINEDELETE) |
2098 act.triggered.connect(self.esm.map) |
2540 act.triggered.connect(self.esm.map) |
2099 self.editActions.append(act) |
2541 self.editActions.append(act) |
2100 |
2542 |
2101 act = EricAction( |
2543 act = EricAction( |
2102 QCoreApplication.translate( |
2544 QCoreApplication.translate("ViewManager", "Duplicate current line"), |
2103 'ViewManager', 'Duplicate current line'), |
2545 QCoreApplication.translate("ViewManager", "Duplicate current line"), |
2104 QCoreApplication.translate( |
2546 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+D")), |
2105 'ViewManager', 'Duplicate current line'), |
2547 0, |
2106 QKeySequence(QCoreApplication.translate('ViewManager', 'Ctrl+D')), |
2548 self.editorActGrp, |
2107 0, self.editorActGrp, 'vm_edit_duplicate_current_line') |
2549 "vm_edit_duplicate_current_line", |
|
2550 ) |
2108 self.esm.setMapping(act, QsciScintilla.SCI_LINEDUPLICATE) |
2551 self.esm.setMapping(act, QsciScintilla.SCI_LINEDUPLICATE) |
2109 act.triggered.connect(self.esm.map) |
2552 act.triggered.connect(self.esm.map) |
2110 self.editActions.append(act) |
2553 self.editActions.append(act) |
2111 |
2554 |
2112 act = EricAction( |
2555 act = EricAction( |
2113 QCoreApplication.translate( |
2556 QCoreApplication.translate( |
2114 'ViewManager', 'Swap current and previous lines'), |
2557 "ViewManager", "Swap current and previous lines" |
2115 QCoreApplication.translate( |
2558 ), |
2116 'ViewManager', 'Swap current and previous lines'), |
2559 QCoreApplication.translate( |
2117 QKeySequence(QCoreApplication.translate('ViewManager', 'Ctrl+T')), |
2560 "ViewManager", "Swap current and previous lines" |
2118 0, self.editorActGrp, 'vm_edit_swap_current_previous_line') |
2561 ), |
|
2562 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+T")), |
|
2563 0, |
|
2564 self.editorActGrp, |
|
2565 "vm_edit_swap_current_previous_line", |
|
2566 ) |
2119 self.esm.setMapping(act, QsciScintilla.SCI_LINETRANSPOSE) |
2567 self.esm.setMapping(act, QsciScintilla.SCI_LINETRANSPOSE) |
2120 act.triggered.connect(self.esm.map) |
2568 act.triggered.connect(self.esm.map) |
2121 self.editActions.append(act) |
2569 self.editActions.append(act) |
2122 |
2570 |
2123 act = EricAction( |
2571 act = EricAction( |
2124 QCoreApplication.translate('ViewManager', |
2572 QCoreApplication.translate("ViewManager", "Reverse selected lines"), |
2125 'Reverse selected lines'), |
2573 QCoreApplication.translate("ViewManager", "Reverse selected lines"), |
2126 QCoreApplication.translate('ViewManager', |
2574 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+Alt+R")), |
2127 'Reverse selected lines'), |
2575 0, |
2128 QKeySequence(QCoreApplication.translate('ViewManager', |
2576 self.editorActGrp, |
2129 'Meta+Alt+R')), |
2577 "vm_edit_reverse selected_lines", |
2130 0, self.editorActGrp, 'vm_edit_reverse selected_lines') |
2578 ) |
2131 self.esm.setMapping(act, QsciScintilla.SCI_LINEREVERSE) |
2579 self.esm.setMapping(act, QsciScintilla.SCI_LINEREVERSE) |
2132 act.triggered.connect(self.esm.map) |
2580 act.triggered.connect(self.esm.map) |
2133 self.editActions.append(act) |
2581 self.editActions.append(act) |
2134 |
2582 |
2135 act = EricAction( |
2583 act = EricAction( |
2136 QCoreApplication.translate('ViewManager', 'Cut current line'), |
2584 QCoreApplication.translate("ViewManager", "Cut current line"), |
2137 QCoreApplication.translate('ViewManager', 'Cut current line'), |
2585 QCoreApplication.translate("ViewManager", "Cut current line"), |
2138 QKeySequence(QCoreApplication.translate('ViewManager', |
2586 QKeySequence(QCoreApplication.translate("ViewManager", "Alt+Shift+L")), |
2139 'Alt+Shift+L')), |
2587 0, |
2140 0, self.editorActGrp, 'vm_edit_cut_current_line') |
2588 self.editorActGrp, |
|
2589 "vm_edit_cut_current_line", |
|
2590 ) |
2141 self.esm.setMapping(act, QsciScintilla.SCI_LINECUT) |
2591 self.esm.setMapping(act, QsciScintilla.SCI_LINECUT) |
2142 act.triggered.connect(self.esm.map) |
2592 act.triggered.connect(self.esm.map) |
2143 self.editActions.append(act) |
2593 self.editActions.append(act) |
2144 |
2594 |
2145 act = EricAction( |
2595 act = EricAction( |
2146 QCoreApplication.translate('ViewManager', 'Copy current line'), |
2596 QCoreApplication.translate("ViewManager", "Copy current line"), |
2147 QCoreApplication.translate('ViewManager', 'Copy current line'), |
2597 QCoreApplication.translate("ViewManager", "Copy current line"), |
2148 QKeySequence(QCoreApplication.translate( |
2598 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+Shift+T")), |
2149 'ViewManager', 'Ctrl+Shift+T')), |
2599 0, |
2150 0, |
2600 self.editorActGrp, |
2151 self.editorActGrp, 'vm_edit_copy_current_line') |
2601 "vm_edit_copy_current_line", |
|
2602 ) |
2152 self.esm.setMapping(act, QsciScintilla.SCI_LINECOPY) |
2603 self.esm.setMapping(act, QsciScintilla.SCI_LINECOPY) |
2153 act.triggered.connect(self.esm.map) |
2604 act.triggered.connect(self.esm.map) |
2154 self.editActions.append(act) |
2605 self.editActions.append(act) |
2155 |
2606 |
2156 act = EricAction( |
2607 act = EricAction( |
2157 QCoreApplication.translate( |
2608 QCoreApplication.translate("ViewManager", "Toggle insert/overtype"), |
2158 'ViewManager', 'Toggle insert/overtype'), |
2609 QCoreApplication.translate("ViewManager", "Toggle insert/overtype"), |
2159 QCoreApplication.translate( |
2610 QKeySequence(QCoreApplication.translate("ViewManager", "Ins")), |
2160 'ViewManager', 'Toggle insert/overtype'), |
2611 0, |
2161 QKeySequence(QCoreApplication.translate('ViewManager', 'Ins')), |
2612 self.editorActGrp, |
2162 0, self.editorActGrp, 'vm_edit_toggle_insert_overtype') |
2613 "vm_edit_toggle_insert_overtype", |
|
2614 ) |
2163 self.esm.setMapping(act, QsciScintilla.SCI_EDITTOGGLEOVERTYPE) |
2615 self.esm.setMapping(act, QsciScintilla.SCI_EDITTOGGLEOVERTYPE) |
2164 act.triggered.connect(self.esm.map) |
2616 act.triggered.connect(self.esm.map) |
2165 self.editActions.append(act) |
2617 self.editActions.append(act) |
2166 |
2618 |
2167 act = EricAction( |
2619 act = EricAction( |
2168 QCoreApplication.translate( |
2620 QCoreApplication.translate("ViewManager", "Move to end of display line"), |
2169 'ViewManager', 'Move to end of display line'), |
2621 QCoreApplication.translate("ViewManager", "Move to end of display line"), |
2170 QCoreApplication.translate( |
2622 0, |
2171 'ViewManager', 'Move to end of display line'), |
2623 0, |
2172 0, 0, |
2624 self.editorActGrp, |
2173 self.editorActGrp, 'vm_edit_move_end_displayed_line') |
2625 "vm_edit_move_end_displayed_line", |
|
2626 ) |
2174 if isMacPlatform(): |
2627 if isMacPlatform(): |
2175 act.setShortcut(QKeySequence( |
2628 act.setShortcut( |
2176 QCoreApplication.translate('ViewManager', 'Ctrl+Right'))) |
2629 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+Right")) |
|
2630 ) |
2177 else: |
2631 else: |
2178 act.setShortcut(QKeySequence( |
2632 act.setShortcut( |
2179 QCoreApplication.translate('ViewManager', 'Alt+End'))) |
2633 QKeySequence(QCoreApplication.translate("ViewManager", "Alt+End")) |
|
2634 ) |
2180 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAY) |
2635 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAY) |
2181 act.triggered.connect(self.esm.map) |
2636 act.triggered.connect(self.esm.map) |
2182 self.editActions.append(act) |
2637 self.editActions.append(act) |
2183 |
2638 |
2184 act = EricAction( |
2639 act = EricAction( |
2185 QCoreApplication.translate( |
2640 QCoreApplication.translate( |
2186 'ViewManager', 'Extend selection to end of display line'), |
2641 "ViewManager", "Extend selection to end of display line" |
2187 QCoreApplication.translate( |
2642 ), |
2188 'ViewManager', 'Extend selection to end of display line'), |
2643 QCoreApplication.translate( |
2189 0, 0, |
2644 "ViewManager", "Extend selection to end of display line" |
2190 self.editorActGrp, 'vm_edit_extend_selection_end_displayed_line') |
2645 ), |
|
2646 0, |
|
2647 0, |
|
2648 self.editorActGrp, |
|
2649 "vm_edit_extend_selection_end_displayed_line", |
|
2650 ) |
2191 if isMacPlatform(): |
2651 if isMacPlatform(): |
2192 act.setShortcut(QKeySequence( |
2652 act.setShortcut( |
2193 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Right'))) |
2653 QKeySequence( |
|
2654 QCoreApplication.translate("ViewManager", "Ctrl+Shift+Right") |
|
2655 ) |
|
2656 ) |
2194 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAYEXTEND) |
2657 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAYEXTEND) |
2195 act.triggered.connect(self.esm.map) |
2658 act.triggered.connect(self.esm.map) |
2196 self.editActions.append(act) |
2659 self.editActions.append(act) |
2197 |
2660 |
2198 act = EricAction( |
2661 act = EricAction( |
2199 QCoreApplication.translate('ViewManager', 'Formfeed'), |
2662 QCoreApplication.translate("ViewManager", "Formfeed"), |
2200 QCoreApplication.translate('ViewManager', 'Formfeed'), |
2663 QCoreApplication.translate("ViewManager", "Formfeed"), |
2201 0, 0, |
2664 0, |
2202 self.editorActGrp, 'vm_edit_formfeed') |
2665 0, |
|
2666 self.editorActGrp, |
|
2667 "vm_edit_formfeed", |
|
2668 ) |
2203 self.esm.setMapping(act, QsciScintilla.SCI_FORMFEED) |
2669 self.esm.setMapping(act, QsciScintilla.SCI_FORMFEED) |
2204 act.triggered.connect(self.esm.map) |
2670 act.triggered.connect(self.esm.map) |
2205 self.editActions.append(act) |
2671 self.editActions.append(act) |
2206 |
2672 |
2207 act = EricAction( |
2673 act = EricAction( |
2208 QCoreApplication.translate('ViewManager', 'Escape'), |
2674 QCoreApplication.translate("ViewManager", "Escape"), |
2209 QCoreApplication.translate('ViewManager', 'Escape'), |
2675 QCoreApplication.translate("ViewManager", "Escape"), |
2210 QKeySequence(QCoreApplication.translate('ViewManager', 'Esc')), 0, |
2676 QKeySequence(QCoreApplication.translate("ViewManager", "Esc")), |
2211 self.editorActGrp, 'vm_edit_escape') |
2677 0, |
|
2678 self.editorActGrp, |
|
2679 "vm_edit_escape", |
|
2680 ) |
2212 self.esm.setMapping(act, QsciScintilla.SCI_CANCEL) |
2681 self.esm.setMapping(act, QsciScintilla.SCI_CANCEL) |
2213 act.triggered.connect(self.esm.map) |
2682 act.triggered.connect(self.esm.map) |
2214 self.editActions.append(act) |
2683 self.editActions.append(act) |
2215 |
2684 |
2216 act = EricAction( |
2685 act = EricAction( |
2217 QCoreApplication.translate( |
2686 QCoreApplication.translate( |
2218 'ViewManager', 'Extend rectangular selection down one line'), |
2687 "ViewManager", "Extend rectangular selection down one line" |
2219 QCoreApplication.translate( |
2688 ), |
2220 'ViewManager', 'Extend rectangular selection down one line'), |
2689 QCoreApplication.translate( |
2221 QKeySequence(QCoreApplication.translate( |
2690 "ViewManager", "Extend rectangular selection down one line" |
2222 'ViewManager', 'Alt+Ctrl+Down')), |
2691 ), |
2223 0, |
2692 QKeySequence(QCoreApplication.translate("ViewManager", "Alt+Ctrl+Down")), |
2224 self.editorActGrp, 'vm_edit_extend_rect_selection_down_line') |
2693 0, |
|
2694 self.editorActGrp, |
|
2695 "vm_edit_extend_rect_selection_down_line", |
|
2696 ) |
2225 if isMacPlatform(): |
2697 if isMacPlatform(): |
2226 act.setAlternateShortcut(QKeySequence( |
2698 act.setAlternateShortcut( |
2227 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+N'))) |
2699 QKeySequence( |
|
2700 QCoreApplication.translate("ViewManager", "Meta+Alt+Shift+N") |
|
2701 ) |
|
2702 ) |
2228 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNRECTEXTEND) |
2703 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNRECTEXTEND) |
2229 act.triggered.connect(self.esm.map) |
2704 act.triggered.connect(self.esm.map) |
2230 self.editActions.append(act) |
2705 self.editActions.append(act) |
2231 |
2706 |
2232 act = EricAction( |
2707 act = EricAction( |
2233 QCoreApplication.translate( |
2708 QCoreApplication.translate( |
2234 'ViewManager', 'Extend rectangular selection up one line'), |
2709 "ViewManager", "Extend rectangular selection up one line" |
2235 QCoreApplication.translate( |
2710 ), |
2236 'ViewManager', 'Extend rectangular selection up one line'), |
2711 QCoreApplication.translate( |
2237 QKeySequence(QCoreApplication.translate('ViewManager', |
2712 "ViewManager", "Extend rectangular selection up one line" |
2238 'Alt+Ctrl+Up')), |
2713 ), |
2239 0, self.editorActGrp, 'vm_edit_extend_rect_selection_up_line') |
2714 QKeySequence(QCoreApplication.translate("ViewManager", "Alt+Ctrl+Up")), |
|
2715 0, |
|
2716 self.editorActGrp, |
|
2717 "vm_edit_extend_rect_selection_up_line", |
|
2718 ) |
2240 if isMacPlatform(): |
2719 if isMacPlatform(): |
2241 act.setAlternateShortcut(QKeySequence( |
2720 act.setAlternateShortcut( |
2242 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+P'))) |
2721 QKeySequence( |
|
2722 QCoreApplication.translate("ViewManager", "Meta+Alt+Shift+P") |
|
2723 ) |
|
2724 ) |
2243 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPRECTEXTEND) |
2725 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPRECTEXTEND) |
2244 act.triggered.connect(self.esm.map) |
2726 act.triggered.connect(self.esm.map) |
2245 self.editActions.append(act) |
2727 self.editActions.append(act) |
2246 |
2728 |
2247 act = EricAction( |
2729 act = EricAction( |
2248 QCoreApplication.translate( |
2730 QCoreApplication.translate( |
2249 'ViewManager', |
2731 "ViewManager", "Extend rectangular selection left one character" |
2250 'Extend rectangular selection left one character'), |
2732 ), |
2251 QCoreApplication.translate( |
2733 QCoreApplication.translate( |
2252 'ViewManager', |
2734 "ViewManager", "Extend rectangular selection left one character" |
2253 'Extend rectangular selection left one character'), |
2735 ), |
2254 QKeySequence(QCoreApplication.translate( |
2736 QKeySequence(QCoreApplication.translate("ViewManager", "Alt+Ctrl+Left")), |
2255 'ViewManager', 'Alt+Ctrl+Left')), |
2737 0, |
2256 0, |
2738 self.editorActGrp, |
2257 self.editorActGrp, 'vm_edit_extend_rect_selection_left_char') |
2739 "vm_edit_extend_rect_selection_left_char", |
|
2740 ) |
2258 if isMacPlatform(): |
2741 if isMacPlatform(): |
2259 act.setAlternateShortcut(QKeySequence( |
2742 act.setAlternateShortcut( |
2260 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+B'))) |
2743 QKeySequence( |
|
2744 QCoreApplication.translate("ViewManager", "Meta+Alt+Shift+B") |
|
2745 ) |
|
2746 ) |
2261 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTRECTEXTEND) |
2747 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTRECTEXTEND) |
2262 act.triggered.connect(self.esm.map) |
2748 act.triggered.connect(self.esm.map) |
2263 self.editActions.append(act) |
2749 self.editActions.append(act) |
2264 |
2750 |
2265 act = EricAction( |
2751 act = EricAction( |
2266 QCoreApplication.translate( |
2752 QCoreApplication.translate( |
2267 'ViewManager', |
2753 "ViewManager", "Extend rectangular selection right one character" |
2268 'Extend rectangular selection right one character'), |
2754 ), |
2269 QCoreApplication.translate( |
2755 QCoreApplication.translate( |
2270 'ViewManager', |
2756 "ViewManager", "Extend rectangular selection right one character" |
2271 'Extend rectangular selection right one character'), |
2757 ), |
2272 QKeySequence(QCoreApplication.translate( |
2758 QKeySequence(QCoreApplication.translate("ViewManager", "Alt+Ctrl+Right")), |
2273 'ViewManager', 'Alt+Ctrl+Right')), |
2759 0, |
2274 0, |
2760 self.editorActGrp, |
2275 self.editorActGrp, 'vm_edit_extend_rect_selection_right_char') |
2761 "vm_edit_extend_rect_selection_right_char", |
|
2762 ) |
2276 if isMacPlatform(): |
2763 if isMacPlatform(): |
2277 act.setAlternateShortcut(QKeySequence( |
2764 act.setAlternateShortcut( |
2278 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+F'))) |
2765 QKeySequence( |
|
2766 QCoreApplication.translate("ViewManager", "Meta+Alt+Shift+F") |
|
2767 ) |
|
2768 ) |
2279 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTRECTEXTEND) |
2769 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTRECTEXTEND) |
2280 act.triggered.connect(self.esm.map) |
2770 act.triggered.connect(self.esm.map) |
2281 self.editActions.append(act) |
2771 self.editActions.append(act) |
2282 |
2772 |
2283 act = EricAction( |
2773 act = EricAction( |
2284 QCoreApplication.translate( |
2774 QCoreApplication.translate( |
2285 'ViewManager', |
2775 "ViewManager", |
2286 'Extend rectangular selection to first visible character in' |
2776 "Extend rectangular selection to first visible character in" |
2287 ' document line'), |
2777 " document line", |
2288 QCoreApplication.translate( |
2778 ), |
2289 'ViewManager', |
2779 QCoreApplication.translate( |
2290 'Extend rectangular selection to first visible character in' |
2780 "ViewManager", |
2291 ' document line'), |
2781 "Extend rectangular selection to first visible character in" |
2292 0, 0, |
2782 " document line", |
|
2783 ), |
|
2784 0, |
|
2785 0, |
2293 self.editorActGrp, |
2786 self.editorActGrp, |
2294 'vm_edit_extend_rect_selection_first_visible_char') |
2787 "vm_edit_extend_rect_selection_first_visible_char", |
|
2788 ) |
2295 if not isMacPlatform(): |
2789 if not isMacPlatform(): |
2296 act.setShortcut(QKeySequence( |
2790 act.setShortcut( |
2297 QCoreApplication.translate('ViewManager', 'Alt+Shift+Home'))) |
2791 QKeySequence( |
|
2792 QCoreApplication.translate("ViewManager", "Alt+Shift+Home") |
|
2793 ) |
|
2794 ) |
2298 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMERECTEXTEND) |
2795 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMERECTEXTEND) |
2299 act.triggered.connect(self.esm.map) |
2796 act.triggered.connect(self.esm.map) |
2300 self.editActions.append(act) |
2797 self.editActions.append(act) |
2301 |
2798 |
2302 act = EricAction( |
2799 act = EricAction( |
2303 QCoreApplication.translate( |
2800 QCoreApplication.translate( |
2304 'ViewManager', |
2801 "ViewManager", "Extend rectangular selection to end of document line" |
2305 'Extend rectangular selection to end of document line'), |
2802 ), |
2306 QCoreApplication.translate( |
2803 QCoreApplication.translate( |
2307 'ViewManager', |
2804 "ViewManager", "Extend rectangular selection to end of document line" |
2308 'Extend rectangular selection to end of document line'), |
2805 ), |
2309 0, 0, |
2806 0, |
2310 self.editorActGrp, 'vm_edit_extend_rect_selection_end_line') |
2807 0, |
|
2808 self.editorActGrp, |
|
2809 "vm_edit_extend_rect_selection_end_line", |
|
2810 ) |
2311 if isMacPlatform(): |
2811 if isMacPlatform(): |
2312 act.setShortcut(QKeySequence( |
2812 act.setShortcut( |
2313 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+E'))) |
2813 QKeySequence( |
|
2814 QCoreApplication.translate("ViewManager", "Meta+Alt+Shift+E") |
|
2815 ) |
|
2816 ) |
2314 else: |
2817 else: |
2315 act.setShortcut(QKeySequence( |
2818 act.setShortcut( |
2316 QCoreApplication.translate('ViewManager', 'Alt+Shift+End'))) |
2819 QKeySequence(QCoreApplication.translate("ViewManager", "Alt+Shift+End")) |
|
2820 ) |
2317 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDRECTEXTEND) |
2821 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDRECTEXTEND) |
2318 act.triggered.connect(self.esm.map) |
2822 act.triggered.connect(self.esm.map) |
2319 self.editActions.append(act) |
2823 self.editActions.append(act) |
2320 |
2824 |
2321 act = EricAction( |
2825 act = EricAction( |
2322 QCoreApplication.translate( |
2826 QCoreApplication.translate( |
2323 'ViewManager', |
2827 "ViewManager", "Extend rectangular selection up one page" |
2324 'Extend rectangular selection up one page'), |
2828 ), |
2325 QCoreApplication.translate( |
2829 QCoreApplication.translate( |
2326 'ViewManager', |
2830 "ViewManager", "Extend rectangular selection up one page" |
2327 'Extend rectangular selection up one page'), |
2831 ), |
2328 QKeySequence(QCoreApplication.translate( |
2832 QKeySequence(QCoreApplication.translate("ViewManager", "Alt+Shift+PgUp")), |
2329 'ViewManager', 'Alt+Shift+PgUp')), |
2833 0, |
2330 0, |
2834 self.editorActGrp, |
2331 self.editorActGrp, 'vm_edit_extend_rect_selection_up_page') |
2835 "vm_edit_extend_rect_selection_up_page", |
|
2836 ) |
2332 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPRECTEXTEND) |
2837 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPRECTEXTEND) |
2333 act.triggered.connect(self.esm.map) |
2838 act.triggered.connect(self.esm.map) |
2334 self.editActions.append(act) |
2839 self.editActions.append(act) |
2335 |
2840 |
2336 act = EricAction( |
2841 act = EricAction( |
2337 QCoreApplication.translate( |
2842 QCoreApplication.translate( |
2338 'ViewManager', |
2843 "ViewManager", "Extend rectangular selection down one page" |
2339 'Extend rectangular selection down one page'), |
2844 ), |
2340 QCoreApplication.translate( |
2845 QCoreApplication.translate( |
2341 'ViewManager', |
2846 "ViewManager", "Extend rectangular selection down one page" |
2342 'Extend rectangular selection down one page'), |
2847 ), |
2343 QKeySequence(QCoreApplication.translate( |
2848 QKeySequence(QCoreApplication.translate("ViewManager", "Alt+Shift+PgDown")), |
2344 'ViewManager', 'Alt+Shift+PgDown')), |
2849 0, |
2345 0, |
2850 self.editorActGrp, |
2346 self.editorActGrp, 'vm_edit_extend_rect_selection_down_page') |
2851 "vm_edit_extend_rect_selection_down_page", |
|
2852 ) |
2347 if isMacPlatform(): |
2853 if isMacPlatform(): |
2348 act.setAlternateShortcut(QKeySequence( |
2854 act.setAlternateShortcut( |
2349 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+V'))) |
2855 QKeySequence( |
|
2856 QCoreApplication.translate("ViewManager", "Meta+Alt+Shift+V") |
|
2857 ) |
|
2858 ) |
2350 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNRECTEXTEND) |
2859 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNRECTEXTEND) |
2351 act.triggered.connect(self.esm.map) |
2860 act.triggered.connect(self.esm.map) |
2352 self.editActions.append(act) |
2861 self.editActions.append(act) |
2353 |
2862 |
2354 act = EricAction( |
2863 act = EricAction( |
2355 QCoreApplication.translate( |
2864 QCoreApplication.translate("ViewManager", "Duplicate current selection"), |
2356 'ViewManager', 'Duplicate current selection'), |
2865 QCoreApplication.translate("ViewManager", "Duplicate current selection"), |
2357 QCoreApplication.translate( |
2866 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+Shift+D")), |
2358 'ViewManager', 'Duplicate current selection'), |
2867 0, |
2359 QKeySequence(QCoreApplication.translate( |
2868 self.editorActGrp, |
2360 'ViewManager', 'Ctrl+Shift+D')), |
2869 "vm_edit_duplicate_current_selection", |
2361 0, |
2870 ) |
2362 self.editorActGrp, 'vm_edit_duplicate_current_selection') |
|
2363 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE) |
2871 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE) |
2364 act.triggered.connect(self.esm.map) |
2872 act.triggered.connect(self.esm.map) |
2365 self.editActions.append(act) |
2873 self.editActions.append(act) |
2366 |
2874 |
2367 if hasattr(QsciScintilla, "SCI_SCROLLTOSTART"): |
2875 if hasattr(QsciScintilla, "SCI_SCROLLTOSTART"): |
2368 act = EricAction( |
2876 act = EricAction( |
2369 QCoreApplication.translate( |
2877 QCoreApplication.translate( |
2370 'ViewManager', 'Scroll to start of document'), |
2878 "ViewManager", "Scroll to start of document" |
|
2879 ), |
2371 QCoreApplication.translate( |
2880 QCoreApplication.translate( |
2372 'ViewManager', 'Scroll to start of document'), |
2881 "ViewManager", "Scroll to start of document" |
2373 0, 0, |
2882 ), |
2374 self.editorActGrp, 'vm_edit_scroll_start_text') |
2883 0, |
|
2884 0, |
|
2885 self.editorActGrp, |
|
2886 "vm_edit_scroll_start_text", |
|
2887 ) |
2375 if isMacPlatform(): |
2888 if isMacPlatform(): |
2376 act.setShortcut(QKeySequence( |
2889 act.setShortcut( |
2377 QCoreApplication.translate('ViewManager', 'Home'))) |
2890 QKeySequence(QCoreApplication.translate("ViewManager", "Home")) |
|
2891 ) |
2378 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOSTART) |
2892 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOSTART) |
2379 act.triggered.connect(self.esm.map) |
2893 act.triggered.connect(self.esm.map) |
2380 self.editActions.append(act) |
2894 self.editActions.append(act) |
2381 |
2895 |
2382 if hasattr(QsciScintilla, "SCI_SCROLLTOEND"): |
2896 if hasattr(QsciScintilla, "SCI_SCROLLTOEND"): |
2383 act = EricAction( |
2897 act = EricAction( |
2384 QCoreApplication.translate( |
2898 QCoreApplication.translate("ViewManager", "Scroll to end of document"), |
2385 'ViewManager', 'Scroll to end of document'), |
2899 QCoreApplication.translate("ViewManager", "Scroll to end of document"), |
2386 QCoreApplication.translate( |
2900 0, |
2387 'ViewManager', 'Scroll to end of document'), |
2901 0, |
2388 0, 0, |
2902 self.editorActGrp, |
2389 self.editorActGrp, 'vm_edit_scroll_end_text') |
2903 "vm_edit_scroll_end_text", |
|
2904 ) |
2390 if isMacPlatform(): |
2905 if isMacPlatform(): |
2391 act.setShortcut(QKeySequence( |
2906 act.setShortcut( |
2392 QCoreApplication.translate('ViewManager', 'End'))) |
2907 QKeySequence(QCoreApplication.translate("ViewManager", "End")) |
|
2908 ) |
2393 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOEND) |
2909 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOEND) |
2394 act.triggered.connect(self.esm.map) |
2910 act.triggered.connect(self.esm.map) |
2395 self.editActions.append(act) |
2911 self.editActions.append(act) |
2396 |
2912 |
2397 if hasattr(QsciScintilla, "SCI_VERTICALCENTRECARET"): |
2913 if hasattr(QsciScintilla, "SCI_VERTICALCENTRECARET"): |
2398 act = EricAction( |
2914 act = EricAction( |
2399 QCoreApplication.translate( |
2915 QCoreApplication.translate( |
2400 'ViewManager', 'Scroll vertically to center current line'), |
2916 "ViewManager", "Scroll vertically to center current line" |
|
2917 ), |
2401 QCoreApplication.translate( |
2918 QCoreApplication.translate( |
2402 'ViewManager', 'Scroll vertically to center current line'), |
2919 "ViewManager", "Scroll vertically to center current line" |
2403 0, 0, |
2920 ), |
2404 self.editorActGrp, 'vm_edit_scroll_vertically_center') |
2921 0, |
|
2922 0, |
|
2923 self.editorActGrp, |
|
2924 "vm_edit_scroll_vertically_center", |
|
2925 ) |
2405 if isMacPlatform(): |
2926 if isMacPlatform(): |
2406 act.setShortcut(QKeySequence( |
2927 act.setShortcut( |
2407 QCoreApplication.translate('ViewManager', 'Meta+L'))) |
2928 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+L")) |
|
2929 ) |
2408 self.esm.setMapping(act, QsciScintilla.SCI_VERTICALCENTRECARET) |
2930 self.esm.setMapping(act, QsciScintilla.SCI_VERTICALCENTRECARET) |
2409 act.triggered.connect(self.esm.map) |
2931 act.triggered.connect(self.esm.map) |
2410 self.editActions.append(act) |
2932 self.editActions.append(act) |
2411 |
2933 |
2412 if hasattr(QsciScintilla, "SCI_WORDRIGHTEND"): |
2934 if hasattr(QsciScintilla, "SCI_WORDRIGHTEND"): |
2413 act = EricAction( |
2935 act = EricAction( |
2414 QCoreApplication.translate( |
2936 QCoreApplication.translate("ViewManager", "Move to end of next word"), |
2415 'ViewManager', 'Move to end of next word'), |
2937 QCoreApplication.translate("ViewManager", "Move to end of next word"), |
2416 QCoreApplication.translate( |
2938 0, |
2417 'ViewManager', 'Move to end of next word'), |
2939 0, |
2418 0, 0, |
2940 self.editorActGrp, |
2419 self.editorActGrp, 'vm_edit_move_end_next_word') |
2941 "vm_edit_move_end_next_word", |
|
2942 ) |
2420 if isMacPlatform(): |
2943 if isMacPlatform(): |
2421 act.setShortcut(QKeySequence( |
2944 act.setShortcut( |
2422 QCoreApplication.translate('ViewManager', 'Alt+Right'))) |
2945 QKeySequence(QCoreApplication.translate("ViewManager", "Alt+Right")) |
|
2946 ) |
2423 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEND) |
2947 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEND) |
2424 act.triggered.connect(self.esm.map) |
2948 act.triggered.connect(self.esm.map) |
2425 self.editActions.append(act) |
2949 self.editActions.append(act) |
2426 |
2950 |
2427 if hasattr(QsciScintilla, "SCI_WORDRIGHTENDEXTEND"): |
2951 if hasattr(QsciScintilla, "SCI_WORDRIGHTENDEXTEND"): |
2428 act = EricAction( |
2952 act = EricAction( |
2429 QCoreApplication.translate( |
2953 QCoreApplication.translate( |
2430 'ViewManager', 'Extend selection to end of next word'), |
2954 "ViewManager", "Extend selection to end of next word" |
|
2955 ), |
2431 QCoreApplication.translate( |
2956 QCoreApplication.translate( |
2432 'ViewManager', 'Extend selection to end of next word'), |
2957 "ViewManager", "Extend selection to end of next word" |
2433 0, 0, |
2958 ), |
2434 self.editorActGrp, 'vm_edit_select_end_next_word') |
2959 0, |
|
2960 0, |
|
2961 self.editorActGrp, |
|
2962 "vm_edit_select_end_next_word", |
|
2963 ) |
2435 if isMacPlatform(): |
2964 if isMacPlatform(): |
2436 act.setShortcut(QKeySequence( |
2965 act.setShortcut( |
2437 QCoreApplication.translate('ViewManager', |
2966 QKeySequence( |
2438 'Alt+Shift+Right'))) |
2967 QCoreApplication.translate("ViewManager", "Alt+Shift+Right") |
|
2968 ) |
|
2969 ) |
2439 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTENDEXTEND) |
2970 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTENDEXTEND) |
2440 act.triggered.connect(self.esm.map) |
2971 act.triggered.connect(self.esm.map) |
2441 self.editActions.append(act) |
2972 self.editActions.append(act) |
2442 |
2973 |
2443 if hasattr(QsciScintilla, "SCI_WORDLEFTEND"): |
2974 if hasattr(QsciScintilla, "SCI_WORDLEFTEND"): |
2444 act = EricAction( |
2975 act = EricAction( |
2445 QCoreApplication.translate( |
2976 QCoreApplication.translate( |
2446 'ViewManager', 'Move to end of previous word'), |
2977 "ViewManager", "Move to end of previous word" |
|
2978 ), |
2447 QCoreApplication.translate( |
2979 QCoreApplication.translate( |
2448 'ViewManager', 'Move to end of previous word'), |
2980 "ViewManager", "Move to end of previous word" |
2449 0, 0, |
2981 ), |
2450 self.editorActGrp, 'vm_edit_move_end_previous_word') |
2982 0, |
|
2983 0, |
|
2984 self.editorActGrp, |
|
2985 "vm_edit_move_end_previous_word", |
|
2986 ) |
2451 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEND) |
2987 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEND) |
2452 act.triggered.connect(self.esm.map) |
2988 act.triggered.connect(self.esm.map) |
2453 self.editActions.append(act) |
2989 self.editActions.append(act) |
2454 |
2990 |
2455 if hasattr(QsciScintilla, "SCI_WORDLEFTENDEXTEND"): |
2991 if hasattr(QsciScintilla, "SCI_WORDLEFTENDEXTEND"): |
2456 act = EricAction( |
2992 act = EricAction( |
2457 QCoreApplication.translate( |
2993 QCoreApplication.translate( |
2458 'ViewManager', 'Extend selection to end of previous word'), |
2994 "ViewManager", "Extend selection to end of previous word" |
|
2995 ), |
2459 QCoreApplication.translate( |
2996 QCoreApplication.translate( |
2460 'ViewManager', 'Extend selection to end of previous word'), |
2997 "ViewManager", "Extend selection to end of previous word" |
2461 0, 0, |
2998 ), |
2462 self.editorActGrp, 'vm_edit_select_end_previous_word') |
2999 0, |
|
3000 0, |
|
3001 self.editorActGrp, |
|
3002 "vm_edit_select_end_previous_word", |
|
3003 ) |
2463 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTENDEXTEND) |
3004 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTENDEXTEND) |
2464 act.triggered.connect(self.esm.map) |
3005 act.triggered.connect(self.esm.map) |
2465 self.editActions.append(act) |
3006 self.editActions.append(act) |
2466 |
3007 |
2467 if hasattr(QsciScintilla, "SCI_HOME"): |
3008 if hasattr(QsciScintilla, "SCI_HOME"): |
2468 act = EricAction( |
3009 act = EricAction( |
2469 QCoreApplication.translate( |
3010 QCoreApplication.translate( |
2470 'ViewManager', 'Move to start of document line'), |
3011 "ViewManager", "Move to start of document line" |
|
3012 ), |
2471 QCoreApplication.translate( |
3013 QCoreApplication.translate( |
2472 'ViewManager', 'Move to start of document line'), |
3014 "ViewManager", "Move to start of document line" |
2473 0, 0, |
3015 ), |
2474 self.editorActGrp, 'vm_edit_move_start_document_line') |
3016 0, |
|
3017 0, |
|
3018 self.editorActGrp, |
|
3019 "vm_edit_move_start_document_line", |
|
3020 ) |
2475 if isMacPlatform(): |
3021 if isMacPlatform(): |
2476 act.setShortcut(QKeySequence( |
3022 act.setShortcut( |
2477 QCoreApplication.translate('ViewManager', 'Meta+A'))) |
3023 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+A")) |
|
3024 ) |
2478 self.esm.setMapping(act, QsciScintilla.SCI_HOME) |
3025 self.esm.setMapping(act, QsciScintilla.SCI_HOME) |
2479 act.triggered.connect(self.esm.map) |
3026 act.triggered.connect(self.esm.map) |
2480 self.editActions.append(act) |
3027 self.editActions.append(act) |
2481 |
3028 |
2482 if hasattr(QsciScintilla, "SCI_HOMEEXTEND"): |
3029 if hasattr(QsciScintilla, "SCI_HOMEEXTEND"): |
2483 act = EricAction( |
3030 act = EricAction( |
2484 QCoreApplication.translate( |
3031 QCoreApplication.translate( |
2485 'ViewManager', |
3032 "ViewManager", "Extend selection to start of document line" |
2486 'Extend selection to start of document line'), |
3033 ), |
2487 QCoreApplication.translate( |
3034 QCoreApplication.translate( |
2488 'ViewManager', |
3035 "ViewManager", "Extend selection to start of document line" |
2489 'Extend selection to start of document line'), |
3036 ), |
2490 0, 0, |
3037 0, |
|
3038 0, |
2491 self.editorActGrp, |
3039 self.editorActGrp, |
2492 'vm_edit_extend_selection_start_document_line') |
3040 "vm_edit_extend_selection_start_document_line", |
|
3041 ) |
2493 if isMacPlatform(): |
3042 if isMacPlatform(): |
2494 act.setShortcut(QKeySequence( |
3043 act.setShortcut( |
2495 QCoreApplication.translate('ViewManager', 'Meta+Shift+A'))) |
3044 QKeySequence( |
|
3045 QCoreApplication.translate("ViewManager", "Meta+Shift+A") |
|
3046 ) |
|
3047 ) |
2496 self.esm.setMapping(act, QsciScintilla.SCI_HOMEEXTEND) |
3048 self.esm.setMapping(act, QsciScintilla.SCI_HOMEEXTEND) |
2497 act.triggered.connect(self.esm.map) |
3049 act.triggered.connect(self.esm.map) |
2498 self.editActions.append(act) |
3050 self.editActions.append(act) |
2499 |
3051 |
2500 if hasattr(QsciScintilla, "SCI_HOMERECTEXTEND"): |
3052 if hasattr(QsciScintilla, "SCI_HOMERECTEXTEND"): |
2501 act = EricAction( |
3053 act = EricAction( |
2502 QCoreApplication.translate( |
3054 QCoreApplication.translate( |
2503 'ViewManager', |
3055 "ViewManager", |
2504 'Extend rectangular selection to start of document line'), |
3056 "Extend rectangular selection to start of document line", |
|
3057 ), |
2505 QCoreApplication.translate( |
3058 QCoreApplication.translate( |
2506 'ViewManager', |
3059 "ViewManager", |
2507 'Extend rectangular selection to start of document line'), |
3060 "Extend rectangular selection to start of document line", |
2508 0, 0, |
3061 ), |
2509 self.editorActGrp, 'vm_edit_select_rect_start_line') |
3062 0, |
|
3063 0, |
|
3064 self.editorActGrp, |
|
3065 "vm_edit_select_rect_start_line", |
|
3066 ) |
2510 if isMacPlatform(): |
3067 if isMacPlatform(): |
2511 act.setShortcut(QKeySequence( |
3068 act.setShortcut( |
2512 QCoreApplication.translate('ViewManager', |
3069 QKeySequence( |
2513 'Meta+Alt+Shift+A'))) |
3070 QCoreApplication.translate("ViewManager", "Meta+Alt+Shift+A") |
|
3071 ) |
|
3072 ) |
2514 self.esm.setMapping(act, QsciScintilla.SCI_HOMERECTEXTEND) |
3073 self.esm.setMapping(act, QsciScintilla.SCI_HOMERECTEXTEND) |
2515 act.triggered.connect(self.esm.map) |
3074 act.triggered.connect(self.esm.map) |
2516 self.editActions.append(act) |
3075 self.editActions.append(act) |
2517 |
3076 |
2518 if hasattr(QsciScintilla, "SCI_HOMEDISPLAYEXTEND"): |
3077 if hasattr(QsciScintilla, "SCI_HOMEDISPLAYEXTEND"): |
2519 act = EricAction( |
3078 act = EricAction( |
2520 QCoreApplication.translate( |
3079 QCoreApplication.translate( |
2521 'ViewManager', |
3080 "ViewManager", "Extend selection to start of display line" |
2522 'Extend selection to start of display line'), |
3081 ), |
2523 QCoreApplication.translate( |
3082 QCoreApplication.translate( |
2524 'ViewManager', |
3083 "ViewManager", "Extend selection to start of display line" |
2525 'Extend selection to start of display line'), |
3084 ), |
2526 0, 0, |
3085 0, |
|
3086 0, |
2527 self.editorActGrp, |
3087 self.editorActGrp, |
2528 'vm_edit_extend_selection_start_display_line') |
3088 "vm_edit_extend_selection_start_display_line", |
|
3089 ) |
2529 if isMacPlatform(): |
3090 if isMacPlatform(): |
2530 act.setShortcut(QKeySequence( |
3091 act.setShortcut( |
2531 QCoreApplication.translate('ViewManager', |
3092 QKeySequence( |
2532 'Ctrl+Shift+Left'))) |
3093 QCoreApplication.translate("ViewManager", "Ctrl+Shift+Left") |
|
3094 ) |
|
3095 ) |
2533 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAYEXTEND) |
3096 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAYEXTEND) |
2534 act.triggered.connect(self.esm.map) |
3097 act.triggered.connect(self.esm.map) |
2535 self.editActions.append(act) |
3098 self.editActions.append(act) |
2536 |
3099 |
2537 if hasattr(QsciScintilla, "SCI_HOMEWRAP"): |
3100 if hasattr(QsciScintilla, "SCI_HOMEWRAP"): |
2538 act = EricAction( |
3101 act = EricAction( |
2539 QCoreApplication.translate( |
3102 QCoreApplication.translate( |
2540 'ViewManager', |
3103 "ViewManager", "Move to start of display or document line" |
2541 'Move to start of display or document line'), |
3104 ), |
2542 QCoreApplication.translate( |
3105 QCoreApplication.translate( |
2543 'ViewManager', |
3106 "ViewManager", "Move to start of display or document line" |
2544 'Move to start of display or document line'), |
3107 ), |
2545 0, 0, |
3108 0, |
2546 self.editorActGrp, 'vm_edit_move_start_display_document_line') |
3109 0, |
|
3110 self.editorActGrp, |
|
3111 "vm_edit_move_start_display_document_line", |
|
3112 ) |
2547 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAP) |
3113 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAP) |
2548 act.triggered.connect(self.esm.map) |
3114 act.triggered.connect(self.esm.map) |
2549 self.editActions.append(act) |
3115 self.editActions.append(act) |
2550 |
3116 |
2551 if hasattr(QsciScintilla, "SCI_HOMEWRAPEXTEND"): |
3117 if hasattr(QsciScintilla, "SCI_HOMEWRAPEXTEND"): |
2552 act = EricAction( |
3118 act = EricAction( |
2553 QCoreApplication.translate( |
3119 QCoreApplication.translate( |
2554 'ViewManager', |
3120 "ViewManager", |
2555 'Extend selection to start of display or document line'), |
3121 "Extend selection to start of display or document line", |
|
3122 ), |
2556 QCoreApplication.translate( |
3123 QCoreApplication.translate( |
2557 'ViewManager', |
3124 "ViewManager", |
2558 'Extend selection to start of display or document line'), |
3125 "Extend selection to start of display or document line", |
2559 0, 0, |
3126 ), |
|
3127 0, |
|
3128 0, |
2560 self.editorActGrp, |
3129 self.editorActGrp, |
2561 'vm_edit_extend_selection_start_display_document_line') |
3130 "vm_edit_extend_selection_start_display_document_line", |
|
3131 ) |
2562 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAPEXTEND) |
3132 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAPEXTEND) |
2563 act.triggered.connect(self.esm.map) |
3133 act.triggered.connect(self.esm.map) |
2564 self.editActions.append(act) |
3134 self.editActions.append(act) |
2565 |
3135 |
2566 if hasattr(QsciScintilla, "SCI_VCHOMEWRAP"): |
3136 if hasattr(QsciScintilla, "SCI_VCHOMEWRAP"): |
2567 act = EricAction( |
3137 act = EricAction( |
2568 QCoreApplication.translate( |
3138 QCoreApplication.translate( |
2569 'ViewManager', |
3139 "ViewManager", |
2570 'Move to first visible character in display or document' |
3140 "Move to first visible character in display or document" " line", |
2571 ' line'), |
3141 ), |
2572 QCoreApplication.translate( |
3142 QCoreApplication.translate( |
2573 'ViewManager', |
3143 "ViewManager", |
2574 'Move to first visible character in display or document' |
3144 "Move to first visible character in display or document" " line", |
2575 ' line'), |
3145 ), |
2576 0, 0, |
3146 0, |
|
3147 0, |
2577 self.editorActGrp, |
3148 self.editorActGrp, |
2578 'vm_edit_move_first_visible_char_document_line') |
3149 "vm_edit_move_first_visible_char_document_line", |
|
3150 ) |
2579 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEWRAP) |
3151 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEWRAP) |
2580 act.triggered.connect(self.esm.map) |
3152 act.triggered.connect(self.esm.map) |
2581 self.editActions.append(act) |
3153 self.editActions.append(act) |
2582 |
3154 |
2583 if hasattr(QsciScintilla, "SCI_VCHOMEWRAPEXTEND"): |
3155 if hasattr(QsciScintilla, "SCI_VCHOMEWRAPEXTEND"): |
2584 act = EricAction( |
3156 act = EricAction( |
2585 QCoreApplication.translate( |
3157 QCoreApplication.translate( |
2586 'ViewManager', |
3158 "ViewManager", |
2587 'Extend selection to first visible character in' |
3159 "Extend selection to first visible character in" |
2588 ' display or document line'), |
3160 " display or document line", |
|
3161 ), |
2589 QCoreApplication.translate( |
3162 QCoreApplication.translate( |
2590 'ViewManager', |
3163 "ViewManager", |
2591 'Extend selection to first visible character in' |
3164 "Extend selection to first visible character in" |
2592 ' display or document line'), |
3165 " display or document line", |
2593 0, 0, |
3166 ), |
|
3167 0, |
|
3168 0, |
2594 self.editorActGrp, |
3169 self.editorActGrp, |
2595 'vm_edit_extend_selection_first_visible_char_document_line') |
3170 "vm_edit_extend_selection_first_visible_char_document_line", |
|
3171 ) |
2596 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEWRAPEXTEND) |
3172 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEWRAPEXTEND) |
2597 act.triggered.connect(self.esm.map) |
3173 act.triggered.connect(self.esm.map) |
2598 self.editActions.append(act) |
3174 self.editActions.append(act) |
2599 |
3175 |
2600 if hasattr(QsciScintilla, "SCI_LINEENDWRAP"): |
3176 if hasattr(QsciScintilla, "SCI_LINEENDWRAP"): |
2601 act = EricAction( |
3177 act = EricAction( |
2602 QCoreApplication.translate( |
3178 QCoreApplication.translate( |
2603 'ViewManager', |
3179 "ViewManager", "Move to end of display or document line" |
2604 'Move to end of display or document line'), |
3180 ), |
2605 QCoreApplication.translate( |
3181 QCoreApplication.translate( |
2606 'ViewManager', |
3182 "ViewManager", "Move to end of display or document line" |
2607 'Move to end of display or document line'), |
3183 ), |
2608 0, 0, |
3184 0, |
2609 self.editorActGrp, 'vm_edit_end_start_display_document_line') |
3185 0, |
|
3186 self.editorActGrp, |
|
3187 "vm_edit_end_start_display_document_line", |
|
3188 ) |
2610 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDWRAP) |
3189 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDWRAP) |
2611 act.triggered.connect(self.esm.map) |
3190 act.triggered.connect(self.esm.map) |
2612 self.editActions.append(act) |
3191 self.editActions.append(act) |
2613 |
3192 |
2614 if hasattr(QsciScintilla, "SCI_LINEENDWRAPEXTEND"): |
3193 if hasattr(QsciScintilla, "SCI_LINEENDWRAPEXTEND"): |
2615 act = EricAction( |
3194 act = EricAction( |
2616 QCoreApplication.translate( |
3195 QCoreApplication.translate( |
2617 'ViewManager', |
3196 "ViewManager", "Extend selection to end of display or document line" |
2618 'Extend selection to end of display or document line'), |
3197 ), |
2619 QCoreApplication.translate( |
3198 QCoreApplication.translate( |
2620 'ViewManager', |
3199 "ViewManager", "Extend selection to end of display or document line" |
2621 'Extend selection to end of display or document line'), |
3200 ), |
2622 0, 0, |
3201 0, |
|
3202 0, |
2623 self.editorActGrp, |
3203 self.editorActGrp, |
2624 'vm_edit_extend_selection_end_display_document_line') |
3204 "vm_edit_extend_selection_end_display_document_line", |
|
3205 ) |
2625 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDWRAPEXTEND) |
3206 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDWRAPEXTEND) |
2626 act.triggered.connect(self.esm.map) |
3207 act.triggered.connect(self.esm.map) |
2627 self.editActions.append(act) |
3208 self.editActions.append(act) |
2628 |
3209 |
2629 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUP"): |
3210 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUP"): |
2630 act = EricAction( |
3211 act = EricAction( |
2631 QCoreApplication.translate( |
3212 QCoreApplication.translate("ViewManager", "Stuttered move up one page"), |
2632 'ViewManager', 'Stuttered move up one page'), |
3213 QCoreApplication.translate("ViewManager", "Stuttered move up one page"), |
2633 QCoreApplication.translate( |
3214 0, |
2634 'ViewManager', 'Stuttered move up one page'), |
3215 0, |
2635 0, 0, |
3216 self.editorActGrp, |
2636 self.editorActGrp, 'vm_edit_stuttered_move_up_page') |
3217 "vm_edit_stuttered_move_up_page", |
|
3218 ) |
2637 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUP) |
3219 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUP) |
2638 act.triggered.connect(self.esm.map) |
3220 act.triggered.connect(self.esm.map) |
2639 self.editActions.append(act) |
3221 self.editActions.append(act) |
2640 |
3222 |
2641 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUPEXTEND"): |
3223 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUPEXTEND"): |
2642 act = EricAction( |
3224 act = EricAction( |
2643 QCoreApplication.translate( |
3225 QCoreApplication.translate( |
2644 'ViewManager', 'Stuttered extend selection up one page'), |
3226 "ViewManager", "Stuttered extend selection up one page" |
|
3227 ), |
2645 QCoreApplication.translate( |
3228 QCoreApplication.translate( |
2646 'ViewManager', 'Stuttered extend selection up one page'), |
3229 "ViewManager", "Stuttered extend selection up one page" |
2647 0, 0, |
3230 ), |
|
3231 0, |
|
3232 0, |
2648 self.editorActGrp, |
3233 self.editorActGrp, |
2649 'vm_edit_stuttered_extend_selection_up_page') |
3234 "vm_edit_stuttered_extend_selection_up_page", |
|
3235 ) |
2650 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUPEXTEND) |
3236 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUPEXTEND) |
2651 act.triggered.connect(self.esm.map) |
3237 act.triggered.connect(self.esm.map) |
2652 self.editActions.append(act) |
3238 self.editActions.append(act) |
2653 |
3239 |
2654 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWN"): |
3240 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWN"): |
2655 act = EricAction( |
3241 act = EricAction( |
2656 QCoreApplication.translate( |
3242 QCoreApplication.translate( |
2657 'ViewManager', 'Stuttered move down one page'), |
3243 "ViewManager", "Stuttered move down one page" |
|
3244 ), |
2658 QCoreApplication.translate( |
3245 QCoreApplication.translate( |
2659 'ViewManager', 'Stuttered move down one page'), |
3246 "ViewManager", "Stuttered move down one page" |
2660 0, 0, |
3247 ), |
2661 self.editorActGrp, 'vm_edit_stuttered_move_down_page') |
3248 0, |
|
3249 0, |
|
3250 self.editorActGrp, |
|
3251 "vm_edit_stuttered_move_down_page", |
|
3252 ) |
2662 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWN) |
3253 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWN) |
2663 act.triggered.connect(self.esm.map) |
3254 act.triggered.connect(self.esm.map) |
2664 self.editActions.append(act) |
3255 self.editActions.append(act) |
2665 |
3256 |
2666 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWNEXTEND"): |
3257 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWNEXTEND"): |
2667 act = EricAction( |
3258 act = EricAction( |
2668 QCoreApplication.translate( |
3259 QCoreApplication.translate( |
2669 'ViewManager', 'Stuttered extend selection down one page'), |
3260 "ViewManager", "Stuttered extend selection down one page" |
|
3261 ), |
2670 QCoreApplication.translate( |
3262 QCoreApplication.translate( |
2671 'ViewManager', 'Stuttered extend selection down one page'), |
3263 "ViewManager", "Stuttered extend selection down one page" |
2672 0, 0, |
3264 ), |
|
3265 0, |
|
3266 0, |
2673 self.editorActGrp, |
3267 self.editorActGrp, |
2674 'vm_edit_stuttered_extend_selection_down_page') |
3268 "vm_edit_stuttered_extend_selection_down_page", |
|
3269 ) |
2675 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWNEXTEND) |
3270 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWNEXTEND) |
2676 act.triggered.connect(self.esm.map) |
3271 act.triggered.connect(self.esm.map) |
2677 self.editActions.append(act) |
3272 self.editActions.append(act) |
2678 |
3273 |
2679 if hasattr(QsciScintilla, "SCI_DELWORDRIGHTEND"): |
3274 if hasattr(QsciScintilla, "SCI_DELWORDRIGHTEND"): |
2680 act = EricAction( |
3275 act = EricAction( |
2681 QCoreApplication.translate( |
3276 QCoreApplication.translate( |
2682 'ViewManager', 'Delete right to end of next word'), |
3277 "ViewManager", "Delete right to end of next word" |
|
3278 ), |
2683 QCoreApplication.translate( |
3279 QCoreApplication.translate( |
2684 'ViewManager', 'Delete right to end of next word'), |
3280 "ViewManager", "Delete right to end of next word" |
2685 0, 0, |
3281 ), |
2686 self.editorActGrp, 'vm_edit_delete_right_end_next_word') |
3282 0, |
|
3283 0, |
|
3284 self.editorActGrp, |
|
3285 "vm_edit_delete_right_end_next_word", |
|
3286 ) |
2687 if isMacPlatform(): |
3287 if isMacPlatform(): |
2688 act.setShortcut(QKeySequence( |
3288 act.setShortcut( |
2689 QCoreApplication.translate('ViewManager', 'Alt+Del'))) |
3289 QKeySequence(QCoreApplication.translate("ViewManager", "Alt+Del")) |
|
3290 ) |
2690 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHTEND) |
3291 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHTEND) |
2691 act.triggered.connect(self.esm.map) |
3292 act.triggered.connect(self.esm.map) |
2692 self.editActions.append(act) |
3293 self.editActions.append(act) |
2693 |
3294 |
2694 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESUP"): |
3295 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESUP"): |
2695 act = EricAction( |
3296 act = EricAction( |
2696 QCoreApplication.translate( |
3297 QCoreApplication.translate( |
2697 'ViewManager', 'Move selected lines up one line'), |
3298 "ViewManager", "Move selected lines up one line" |
|
3299 ), |
2698 QCoreApplication.translate( |
3300 QCoreApplication.translate( |
2699 'ViewManager', 'Move selected lines up one line'), |
3301 "ViewManager", "Move selected lines up one line" |
2700 0, 0, |
3302 ), |
2701 self.editorActGrp, 'vm_edit_move_selection_up_one_line') |
3303 0, |
|
3304 0, |
|
3305 self.editorActGrp, |
|
3306 "vm_edit_move_selection_up_one_line", |
|
3307 ) |
2702 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESUP) |
3308 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESUP) |
2703 act.triggered.connect(self.esm.map) |
3309 act.triggered.connect(self.esm.map) |
2704 self.editActions.append(act) |
3310 self.editActions.append(act) |
2705 |
3311 |
2706 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESDOWN"): |
3312 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESDOWN"): |
2707 act = EricAction( |
3313 act = EricAction( |
2708 QCoreApplication.translate( |
3314 QCoreApplication.translate( |
2709 'ViewManager', 'Move selected lines down one line'), |
3315 "ViewManager", "Move selected lines down one line" |
|
3316 ), |
2710 QCoreApplication.translate( |
3317 QCoreApplication.translate( |
2711 'ViewManager', 'Move selected lines down one line'), |
3318 "ViewManager", "Move selected lines down one line" |
2712 0, 0, |
3319 ), |
2713 self.editorActGrp, 'vm_edit_move_selection_down_one_line') |
3320 0, |
|
3321 0, |
|
3322 self.editorActGrp, |
|
3323 "vm_edit_move_selection_down_one_line", |
|
3324 ) |
2714 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESDOWN) |
3325 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESDOWN) |
2715 act.triggered.connect(self.esm.map) |
3326 act.triggered.connect(self.esm.map) |
2716 self.editActions.append(act) |
3327 self.editActions.append(act) |
2717 |
3328 |
2718 self.editorActGrp.setEnabled(False) |
3329 self.editorActGrp.setEnabled(False) |
2719 |
3330 |
2720 self.editLowerCaseAct = EricAction( |
3331 self.editLowerCaseAct = EricAction( |
2721 QCoreApplication.translate( |
3332 QCoreApplication.translate( |
2722 'ViewManager', 'Convert selection to lower case'), |
3333 "ViewManager", "Convert selection to lower case" |
2723 QCoreApplication.translate( |
3334 ), |
2724 'ViewManager', 'Convert selection to lower case'), |
3335 QCoreApplication.translate( |
2725 QKeySequence(QCoreApplication.translate('ViewManager', |
3336 "ViewManager", "Convert selection to lower case" |
2726 'Alt+Shift+U')), |
3337 ), |
2727 0, self.editActGrp, 'vm_edit_convert_selection_lower') |
3338 QKeySequence(QCoreApplication.translate("ViewManager", "Alt+Shift+U")), |
|
3339 0, |
|
3340 self.editActGrp, |
|
3341 "vm_edit_convert_selection_lower", |
|
3342 ) |
2728 self.esm.setMapping(self.editLowerCaseAct, QsciScintilla.SCI_LOWERCASE) |
3343 self.esm.setMapping(self.editLowerCaseAct, QsciScintilla.SCI_LOWERCASE) |
2729 self.editLowerCaseAct.triggered.connect(self.esm.map) |
3344 self.editLowerCaseAct.triggered.connect(self.esm.map) |
2730 self.editActions.append(self.editLowerCaseAct) |
3345 self.editActions.append(self.editLowerCaseAct) |
2731 |
3346 |
2732 self.editUpperCaseAct = EricAction( |
3347 self.editUpperCaseAct = EricAction( |
2733 QCoreApplication.translate( |
3348 QCoreApplication.translate( |
2734 'ViewManager', 'Convert selection to upper case'), |
3349 "ViewManager", "Convert selection to upper case" |
2735 QCoreApplication.translate( |
3350 ), |
2736 'ViewManager', 'Convert selection to upper case'), |
3351 QCoreApplication.translate( |
2737 QKeySequence(QCoreApplication.translate( |
3352 "ViewManager", "Convert selection to upper case" |
2738 'ViewManager', 'Ctrl+Shift+U')), |
3353 ), |
2739 0, |
3354 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+Shift+U")), |
2740 self.editActGrp, 'vm_edit_convert_selection_upper') |
3355 0, |
|
3356 self.editActGrp, |
|
3357 "vm_edit_convert_selection_upper", |
|
3358 ) |
2741 self.esm.setMapping(self.editUpperCaseAct, QsciScintilla.SCI_UPPERCASE) |
3359 self.esm.setMapping(self.editUpperCaseAct, QsciScintilla.SCI_UPPERCASE) |
2742 self.editUpperCaseAct.triggered.connect(self.esm.map) |
3360 self.editUpperCaseAct.triggered.connect(self.esm.map) |
2743 self.editActions.append(self.editUpperCaseAct) |
3361 self.editActions.append(self.editUpperCaseAct) |
2744 |
3362 |
2745 def initEditMenu(self): |
3363 def initEditMenu(self): |
2746 """ |
3364 """ |
2747 Public method to create the Edit menu. |
3365 Public method to create the Edit menu. |
2748 |
3366 |
2749 @return the generated menu |
3367 @return the generated menu |
2750 """ |
3368 """ |
2751 autocompletionMenu = QMenu( |
3369 autocompletionMenu = QMenu( |
2752 QCoreApplication.translate('ViewManager', 'Complete'), |
3370 QCoreApplication.translate("ViewManager", "Complete"), self.ui |
2753 self.ui) |
3371 ) |
2754 autocompletionMenu.setTearOffEnabled(True) |
3372 autocompletionMenu.setTearOffEnabled(True) |
2755 autocompletionMenu.addAction(self.autoCompleteAct) |
3373 autocompletionMenu.addAction(self.autoCompleteAct) |
2756 autocompletionMenu.addSeparator() |
3374 autocompletionMenu.addSeparator() |
2757 autocompletionMenu.addAction(self.autoCompleteFromDocAct) |
3375 autocompletionMenu.addAction(self.autoCompleteFromDocAct) |
2758 autocompletionMenu.addAction(self.autoCompleteFromAPIsAct) |
3376 autocompletionMenu.addAction(self.autoCompleteFromAPIsAct) |
2759 autocompletionMenu.addAction(self.autoCompleteFromAllAct) |
3377 autocompletionMenu.addAction(self.autoCompleteFromAllAct) |
2760 |
3378 |
2761 menu = QMenu(QCoreApplication.translate('ViewManager', '&Edit'), |
3379 menu = QMenu(QCoreApplication.translate("ViewManager", "&Edit"), self.ui) |
2762 self.ui) |
|
2763 menu.setTearOffEnabled(True) |
3380 menu.setTearOffEnabled(True) |
2764 menu.addAction(self.undoAct) |
3381 menu.addAction(self.undoAct) |
2765 menu.addAction(self.redoAct) |
3382 menu.addAction(self.redoAct) |
2766 menu.addAction(self.revertAct) |
3383 menu.addAction(self.revertAct) |
2767 menu.addSeparator() |
3384 menu.addSeparator() |
2828 tb.addAction(self.deleteAct) |
3444 tb.addAction(self.deleteAct) |
2829 tb.addSeparator() |
3445 tb.addSeparator() |
2830 tb.addAction(self.commentAct) |
3446 tb.addAction(self.commentAct) |
2831 tb.addAction(self.uncommentAct) |
3447 tb.addAction(self.uncommentAct) |
2832 tb.addAction(self.toggleCommentAct) |
3448 tb.addAction(self.toggleCommentAct) |
2833 |
3449 |
2834 toolbarManager.addToolBar(tb, tb.windowTitle()) |
3450 toolbarManager.addToolBar(tb, tb.windowTitle()) |
2835 toolbarManager.addAction(self.smartIndentAct, tb.windowTitle()) |
3451 toolbarManager.addAction(self.smartIndentAct, tb.windowTitle()) |
2836 toolbarManager.addAction(self.indentAct, tb.windowTitle()) |
3452 toolbarManager.addAction(self.indentAct, tb.windowTitle()) |
2837 toolbarManager.addAction(self.unindentAct, tb.windowTitle()) |
3453 toolbarManager.addAction(self.unindentAct, tb.windowTitle()) |
2838 |
3454 |
2839 return tb |
3455 return tb |
2840 |
3456 |
2841 ################################################################## |
3457 ################################################################## |
2842 ## Initialize the search related actions and the search toolbar |
3458 ## Initialize the search related actions and the search toolbar |
2843 ################################################################## |
3459 ################################################################## |
2844 |
3460 |
2845 def __initSearchActions(self): |
3461 def __initSearchActions(self): |
2846 """ |
3462 """ |
2847 Private method defining the user interface actions for the search |
3463 Private method defining the user interface actions for the search |
2848 commands. |
3464 commands. |
2849 """ |
3465 """ |
2850 self.searchActGrp = createActionGroup(self) |
3466 self.searchActGrp = createActionGroup(self) |
2851 self.searchOpenFilesActGrp = createActionGroup(self) |
3467 self.searchOpenFilesActGrp = createActionGroup(self) |
2852 |
3468 |
2853 self.searchAct = EricAction( |
3469 self.searchAct = EricAction( |
2854 QCoreApplication.translate('ViewManager', 'Search'), |
3470 QCoreApplication.translate("ViewManager", "Search"), |
2855 UI.PixmapCache.getIcon("find"), |
3471 UI.PixmapCache.getIcon("find"), |
2856 QCoreApplication.translate('ViewManager', '&Search...'), |
3472 QCoreApplication.translate("ViewManager", "&Search..."), |
2857 QKeySequence(QCoreApplication.translate( |
3473 QKeySequence( |
2858 'ViewManager', "Ctrl+F", "Search|Search")), |
3474 QCoreApplication.translate("ViewManager", "Ctrl+F", "Search|Search") |
2859 0, |
3475 ), |
2860 self.searchActGrp, 'vm_search') |
3476 0, |
2861 self.searchAct.setStatusTip(QCoreApplication.translate( |
3477 self.searchActGrp, |
2862 'ViewManager', 'Search for a text')) |
3478 "vm_search", |
2863 self.searchAct.setWhatsThis(QCoreApplication.translate( |
3479 ) |
2864 'ViewManager', |
3480 self.searchAct.setStatusTip( |
2865 """<b>Search</b>""" |
3481 QCoreApplication.translate("ViewManager", "Search for a text") |
2866 """<p>Search for some text in the current editor. A""" |
3482 ) |
2867 """ dialog is shown to enter the searchtext and options""" |
3483 self.searchAct.setWhatsThis( |
2868 """ for the search.</p>""" |
3484 QCoreApplication.translate( |
2869 )) |
3485 "ViewManager", |
|
3486 """<b>Search</b>""" |
|
3487 """<p>Search for some text in the current editor. A""" |
|
3488 """ dialog is shown to enter the searchtext and options""" |
|
3489 """ for the search.</p>""", |
|
3490 ) |
|
3491 ) |
2870 self.searchAct.triggered.connect(self.showSearchWidget) |
3492 self.searchAct.triggered.connect(self.showSearchWidget) |
2871 self.searchActions.append(self.searchAct) |
3493 self.searchActions.append(self.searchAct) |
2872 |
3494 |
2873 self.searchNextAct = EricAction( |
3495 self.searchNextAct = EricAction( |
2874 QCoreApplication.translate( |
3496 QCoreApplication.translate("ViewManager", "Search next"), |
2875 'ViewManager', 'Search next'), |
|
2876 UI.PixmapCache.getIcon("findNext"), |
3497 UI.PixmapCache.getIcon("findNext"), |
2877 QCoreApplication.translate('ViewManager', 'Search &next'), |
3498 QCoreApplication.translate("ViewManager", "Search &next"), |
2878 QKeySequence(QCoreApplication.translate( |
3499 QKeySequence( |
2879 'ViewManager', "F3", "Search|Search next")), |
3500 QCoreApplication.translate("ViewManager", "F3", "Search|Search next") |
2880 0, |
3501 ), |
2881 self.searchActGrp, 'vm_search_next') |
3502 0, |
2882 self.searchNextAct.setStatusTip(QCoreApplication.translate( |
3503 self.searchActGrp, |
2883 'ViewManager', 'Search next occurrence of text')) |
3504 "vm_search_next", |
2884 self.searchNextAct.setWhatsThis(QCoreApplication.translate( |
3505 ) |
2885 'ViewManager', |
3506 self.searchNextAct.setStatusTip( |
2886 """<b>Search next</b>""" |
3507 QCoreApplication.translate("ViewManager", "Search next occurrence of text") |
2887 """<p>Search the next occurrence of some text in the current""" |
3508 ) |
2888 """ editor. The previously entered searchtext and options are""" |
3509 self.searchNextAct.setWhatsThis( |
2889 """ reused.</p>""" |
3510 QCoreApplication.translate( |
2890 )) |
3511 "ViewManager", |
|
3512 """<b>Search next</b>""" |
|
3513 """<p>Search the next occurrence of some text in the current""" |
|
3514 """ editor. The previously entered searchtext and options are""" |
|
3515 """ reused.</p>""", |
|
3516 ) |
|
3517 ) |
2891 self.searchNextAct.triggered.connect(self.__searchNext) |
3518 self.searchNextAct.triggered.connect(self.__searchNext) |
2892 self.searchActions.append(self.searchNextAct) |
3519 self.searchActions.append(self.searchNextAct) |
2893 |
3520 |
2894 self.searchPrevAct = EricAction( |
3521 self.searchPrevAct = EricAction( |
2895 QCoreApplication.translate('ViewManager', 'Search previous'), |
3522 QCoreApplication.translate("ViewManager", "Search previous"), |
2896 UI.PixmapCache.getIcon("findPrev"), |
3523 UI.PixmapCache.getIcon("findPrev"), |
2897 QCoreApplication.translate('ViewManager', 'Search &previous'), |
3524 QCoreApplication.translate("ViewManager", "Search &previous"), |
2898 QKeySequence(QCoreApplication.translate( |
3525 QKeySequence( |
2899 'ViewManager', "Shift+F3", "Search|Search previous")), |
3526 QCoreApplication.translate( |
2900 0, |
3527 "ViewManager", "Shift+F3", "Search|Search previous" |
2901 self.searchActGrp, 'vm_search_previous') |
3528 ) |
2902 self.searchPrevAct.setStatusTip(QCoreApplication.translate( |
3529 ), |
2903 'ViewManager', 'Search previous occurrence of text')) |
3530 0, |
2904 self.searchPrevAct.setWhatsThis(QCoreApplication.translate( |
3531 self.searchActGrp, |
2905 'ViewManager', |
3532 "vm_search_previous", |
2906 """<b>Search previous</b>""" |
3533 ) |
2907 """<p>Search the previous occurrence of some text in the current""" |
3534 self.searchPrevAct.setStatusTip( |
2908 """ editor. The previously entered searchtext and options are""" |
3535 QCoreApplication.translate( |
2909 """ reused.</p>""" |
3536 "ViewManager", "Search previous occurrence of text" |
2910 )) |
3537 ) |
|
3538 ) |
|
3539 self.searchPrevAct.setWhatsThis( |
|
3540 QCoreApplication.translate( |
|
3541 "ViewManager", |
|
3542 """<b>Search previous</b>""" |
|
3543 """<p>Search the previous occurrence of some text in the current""" |
|
3544 """ editor. The previously entered searchtext and options are""" |
|
3545 """ reused.</p>""", |
|
3546 ) |
|
3547 ) |
2911 self.searchPrevAct.triggered.connect(self.__searchPrev) |
3548 self.searchPrevAct.triggered.connect(self.__searchPrev) |
2912 self.searchActions.append(self.searchPrevAct) |
3549 self.searchActions.append(self.searchPrevAct) |
2913 |
3550 |
2914 self.searchClearMarkersAct = EricAction( |
3551 self.searchClearMarkersAct = EricAction( |
2915 QCoreApplication.translate('ViewManager', 'Clear search markers'), |
3552 QCoreApplication.translate("ViewManager", "Clear search markers"), |
2916 UI.PixmapCache.getIcon("findClear"), |
3553 UI.PixmapCache.getIcon("findClear"), |
2917 QCoreApplication.translate('ViewManager', 'Clear search markers'), |
3554 QCoreApplication.translate("ViewManager", "Clear search markers"), |
2918 QKeySequence(QCoreApplication.translate( |
3555 QKeySequence( |
2919 'ViewManager', "Ctrl+3", "Search|Clear search markers")), |
3556 QCoreApplication.translate( |
2920 0, |
3557 "ViewManager", "Ctrl+3", "Search|Clear search markers" |
2921 self.searchActGrp, 'vm_clear_search_markers') |
3558 ) |
2922 self.searchClearMarkersAct.setStatusTip(QCoreApplication.translate( |
3559 ), |
2923 'ViewManager', 'Clear all displayed search markers')) |
3560 0, |
2924 self.searchClearMarkersAct.setWhatsThis(QCoreApplication.translate( |
3561 self.searchActGrp, |
2925 'ViewManager', |
3562 "vm_clear_search_markers", |
2926 """<b>Clear search markers</b>""" |
3563 ) |
2927 """<p>Clear all displayed search markers.</p>""" |
3564 self.searchClearMarkersAct.setStatusTip( |
2928 )) |
3565 QCoreApplication.translate( |
2929 self.searchClearMarkersAct.triggered.connect( |
3566 "ViewManager", "Clear all displayed search markers" |
2930 self.__searchClearMarkers) |
3567 ) |
|
3568 ) |
|
3569 self.searchClearMarkersAct.setWhatsThis( |
|
3570 QCoreApplication.translate( |
|
3571 "ViewManager", |
|
3572 """<b>Clear search markers</b>""" |
|
3573 """<p>Clear all displayed search markers.</p>""", |
|
3574 ) |
|
3575 ) |
|
3576 self.searchClearMarkersAct.triggered.connect(self.__searchClearMarkers) |
2931 self.searchActions.append(self.searchClearMarkersAct) |
3577 self.searchActions.append(self.searchClearMarkersAct) |
2932 |
3578 |
2933 self.searchNextWordAct = EricAction( |
3579 self.searchNextWordAct = EricAction( |
2934 QCoreApplication.translate( |
3580 QCoreApplication.translate("ViewManager", "Search current word forward"), |
2935 'ViewManager', 'Search current word forward'), |
|
2936 UI.PixmapCache.getIcon("findWordNext"), |
3581 UI.PixmapCache.getIcon("findWordNext"), |
2937 QCoreApplication.translate( |
3582 QCoreApplication.translate("ViewManager", "Search current word forward"), |
2938 'ViewManager', 'Search current word forward'), |
3583 QKeySequence( |
2939 QKeySequence(QCoreApplication.translate( |
3584 QCoreApplication.translate( |
2940 'ViewManager', |
3585 "ViewManager", "Ctrl+.", "Search|Search current word forward" |
2941 "Ctrl+.", "Search|Search current word forward")), |
3586 ) |
2942 0, |
3587 ), |
2943 self.searchActGrp, 'vm_search_word_next') |
3588 0, |
2944 self.searchNextWordAct.setStatusTip(QCoreApplication.translate( |
3589 self.searchActGrp, |
2945 'ViewManager', |
3590 "vm_search_word_next", |
2946 'Search next occurrence of the current word')) |
3591 ) |
2947 self.searchNextWordAct.setWhatsThis(QCoreApplication.translate( |
3592 self.searchNextWordAct.setStatusTip( |
2948 'ViewManager', |
3593 QCoreApplication.translate( |
2949 """<b>Search current word forward</b>""" |
3594 "ViewManager", "Search next occurrence of the current word" |
2950 """<p>Search the next occurrence of the current word of the""" |
3595 ) |
2951 """ current editor.</p>""" |
3596 ) |
2952 )) |
3597 self.searchNextWordAct.setWhatsThis( |
|
3598 QCoreApplication.translate( |
|
3599 "ViewManager", |
|
3600 """<b>Search current word forward</b>""" |
|
3601 """<p>Search the next occurrence of the current word of the""" |
|
3602 """ current editor.</p>""", |
|
3603 ) |
|
3604 ) |
2953 self.searchNextWordAct.triggered.connect(self.__findNextWord) |
3605 self.searchNextWordAct.triggered.connect(self.__findNextWord) |
2954 self.searchActions.append(self.searchNextWordAct) |
3606 self.searchActions.append(self.searchNextWordAct) |
2955 |
3607 |
2956 self.searchPrevWordAct = EricAction( |
3608 self.searchPrevWordAct = EricAction( |
2957 QCoreApplication.translate( |
3609 QCoreApplication.translate("ViewManager", "Search current word backward"), |
2958 'ViewManager', 'Search current word backward'), |
|
2959 UI.PixmapCache.getIcon("findWordPrev"), |
3610 UI.PixmapCache.getIcon("findWordPrev"), |
2960 QCoreApplication.translate( |
3611 QCoreApplication.translate("ViewManager", "Search current word backward"), |
2961 'ViewManager', 'Search current word backward'), |
3612 QKeySequence( |
2962 QKeySequence(QCoreApplication.translate( |
3613 QCoreApplication.translate( |
2963 'ViewManager', |
3614 "ViewManager", "Ctrl+,", "Search|Search current word backward" |
2964 "Ctrl+,", "Search|Search current word backward")), |
3615 ) |
2965 0, |
3616 ), |
2966 self.searchActGrp, 'vm_search_word_previous') |
3617 0, |
2967 self.searchPrevWordAct.setStatusTip(QCoreApplication.translate( |
3618 self.searchActGrp, |
2968 'ViewManager', |
3619 "vm_search_word_previous", |
2969 'Search previous occurrence of the current word')) |
3620 ) |
2970 self.searchPrevWordAct.setWhatsThis(QCoreApplication.translate( |
3621 self.searchPrevWordAct.setStatusTip( |
2971 'ViewManager', |
3622 QCoreApplication.translate( |
2972 """<b>Search current word backward</b>""" |
3623 "ViewManager", "Search previous occurrence of the current word" |
2973 """<p>Search the previous occurrence of the current word of the""" |
3624 ) |
2974 """ current editor.</p>""" |
3625 ) |
2975 )) |
3626 self.searchPrevWordAct.setWhatsThis( |
|
3627 QCoreApplication.translate( |
|
3628 "ViewManager", |
|
3629 """<b>Search current word backward</b>""" |
|
3630 """<p>Search the previous occurrence of the current word of the""" |
|
3631 """ current editor.</p>""", |
|
3632 ) |
|
3633 ) |
2976 self.searchPrevWordAct.triggered.connect(self.__findPrevWord) |
3634 self.searchPrevWordAct.triggered.connect(self.__findPrevWord) |
2977 self.searchActions.append(self.searchPrevWordAct) |
3635 self.searchActions.append(self.searchPrevWordAct) |
2978 |
3636 |
2979 self.replaceAct = EricAction( |
3637 self.replaceAct = EricAction( |
2980 QCoreApplication.translate('ViewManager', 'Replace'), |
3638 QCoreApplication.translate("ViewManager", "Replace"), |
2981 QCoreApplication.translate('ViewManager', '&Replace...'), |
3639 QCoreApplication.translate("ViewManager", "&Replace..."), |
2982 QKeySequence(QCoreApplication.translate( |
3640 QKeySequence( |
2983 'ViewManager', "Ctrl+R", "Search|Replace")), |
3641 QCoreApplication.translate("ViewManager", "Ctrl+R", "Search|Replace") |
2984 0, |
3642 ), |
2985 self.searchActGrp, 'vm_search_replace') |
3643 0, |
2986 self.replaceAct.setStatusTip(QCoreApplication.translate( |
3644 self.searchActGrp, |
2987 'ViewManager', 'Replace some text')) |
3645 "vm_search_replace", |
2988 self.replaceAct.setWhatsThis(QCoreApplication.translate( |
3646 ) |
2989 'ViewManager', |
3647 self.replaceAct.setStatusTip( |
2990 """<b>Replace</b>""" |
3648 QCoreApplication.translate("ViewManager", "Replace some text") |
2991 """<p>Search for some text in the current editor and replace it.""" |
3649 ) |
2992 """ A dialog is shown to enter the searchtext, the replacement""" |
3650 self.replaceAct.setWhatsThis( |
2993 """ text and options for the search and replace.</p>""" |
3651 QCoreApplication.translate( |
2994 )) |
3652 "ViewManager", |
|
3653 """<b>Replace</b>""" |
|
3654 """<p>Search for some text in the current editor and replace it.""" |
|
3655 """ A dialog is shown to enter the searchtext, the replacement""" |
|
3656 """ text and options for the search and replace.</p>""", |
|
3657 ) |
|
3658 ) |
2995 self.replaceAct.triggered.connect(self.showReplaceWidget) |
3659 self.replaceAct.triggered.connect(self.showReplaceWidget) |
2996 self.searchActions.append(self.replaceAct) |
3660 self.searchActions.append(self.replaceAct) |
2997 |
3661 |
2998 self.replaceAndSearchAct = EricAction( |
3662 self.replaceAndSearchAct = EricAction( |
2999 QCoreApplication.translate( |
3663 QCoreApplication.translate("ViewManager", "Replace and Search"), |
3000 'ViewManager', 'Replace and Search'), |
|
3001 UI.PixmapCache.getIcon("editReplaceSearch"), |
3664 UI.PixmapCache.getIcon("editReplaceSearch"), |
3002 QCoreApplication.translate( |
3665 QCoreApplication.translate("ViewManager", "Replace and Search"), |
3003 'ViewManager', 'Replace and Search'), |
3666 QKeySequence( |
3004 QKeySequence(QCoreApplication.translate( |
3667 QCoreApplication.translate( |
3005 'ViewManager', "Meta+R", "Search|Replace and Search")), |
3668 "ViewManager", "Meta+R", "Search|Replace and Search" |
3006 0, |
3669 ) |
3007 self.searchActGrp, 'vm_replace_search') |
3670 ), |
3008 self.replaceAndSearchAct.setStatusTip(QCoreApplication.translate( |
3671 0, |
3009 'ViewManager', |
3672 self.searchActGrp, |
3010 'Replace the found text and search the next occurrence')) |
3673 "vm_replace_search", |
3011 self.replaceAndSearchAct.setWhatsThis(QCoreApplication.translate( |
3674 ) |
3012 'ViewManager', |
3675 self.replaceAndSearchAct.setStatusTip( |
3013 """<b>Replace and Search</b>""" |
3676 QCoreApplication.translate( |
3014 """<p>Replace the found occurrence of text in the current""" |
3677 "ViewManager", "Replace the found text and search the next occurrence" |
3015 """ editor and search for the next one. The previously entered""" |
3678 ) |
3016 """ search text and options are reused.</p>""" |
3679 ) |
3017 )) |
3680 self.replaceAndSearchAct.setWhatsThis( |
3018 self.replaceAndSearchAct.triggered.connect( |
3681 QCoreApplication.translate( |
3019 self.__replaceWidget.replaceSearch) |
3682 "ViewManager", |
|
3683 """<b>Replace and Search</b>""" |
|
3684 """<p>Replace the found occurrence of text in the current""" |
|
3685 """ editor and search for the next one. The previously entered""" |
|
3686 """ search text and options are reused.</p>""", |
|
3687 ) |
|
3688 ) |
|
3689 self.replaceAndSearchAct.triggered.connect(self.__replaceWidget.replaceSearch) |
3020 self.searchActions.append(self.replaceAndSearchAct) |
3690 self.searchActions.append(self.replaceAndSearchAct) |
3021 |
3691 |
3022 self.replaceSelectionAct = EricAction( |
3692 self.replaceSelectionAct = EricAction( |
3023 QCoreApplication.translate( |
3693 QCoreApplication.translate("ViewManager", "Replace Occurrence"), |
3024 'ViewManager', 'Replace Occurrence'), |
|
3025 UI.PixmapCache.getIcon("editReplace"), |
3694 UI.PixmapCache.getIcon("editReplace"), |
3026 QCoreApplication.translate( |
3695 QCoreApplication.translate("ViewManager", "Replace Occurrence"), |
3027 'ViewManager', 'Replace Occurrence'), |
3696 QKeySequence( |
3028 QKeySequence(QCoreApplication.translate( |
3697 QCoreApplication.translate( |
3029 'ViewManager', "Ctrl+Meta+R", "Search|Replace Occurrence")), |
3698 "ViewManager", "Ctrl+Meta+R", "Search|Replace Occurrence" |
3030 0, |
3699 ) |
3031 self.searchActGrp, 'vm_replace_occurrence') |
3700 ), |
3032 self.replaceSelectionAct.setStatusTip(QCoreApplication.translate( |
3701 0, |
3033 'ViewManager', 'Replace the found text')) |
3702 self.searchActGrp, |
3034 self.replaceSelectionAct.setWhatsThis(QCoreApplication.translate( |
3703 "vm_replace_occurrence", |
3035 'ViewManager', |
3704 ) |
3036 """<b>Replace Occurrence</b>""" |
3705 self.replaceSelectionAct.setStatusTip( |
3037 """<p>Replace the found occurrence of the search text in the""" |
3706 QCoreApplication.translate("ViewManager", "Replace the found text") |
3038 """ current editor.</p>""" |
3707 ) |
3039 )) |
3708 self.replaceSelectionAct.setWhatsThis( |
3040 self.replaceSelectionAct.triggered.connect( |
3709 QCoreApplication.translate( |
3041 self.__replaceWidget.replace) |
3710 "ViewManager", |
|
3711 """<b>Replace Occurrence</b>""" |
|
3712 """<p>Replace the found occurrence of the search text in the""" |
|
3713 """ current editor.</p>""", |
|
3714 ) |
|
3715 ) |
|
3716 self.replaceSelectionAct.triggered.connect(self.__replaceWidget.replace) |
3042 self.searchActions.append(self.replaceSelectionAct) |
3717 self.searchActions.append(self.replaceSelectionAct) |
3043 |
3718 |
3044 self.replaceAllAct = EricAction( |
3719 self.replaceAllAct = EricAction( |
3045 QCoreApplication.translate( |
3720 QCoreApplication.translate("ViewManager", "Replace All"), |
3046 'ViewManager', 'Replace All'), |
|
3047 UI.PixmapCache.getIcon("editReplaceAll"), |
3721 UI.PixmapCache.getIcon("editReplaceAll"), |
3048 QCoreApplication.translate( |
3722 QCoreApplication.translate("ViewManager", "Replace All"), |
3049 'ViewManager', 'Replace All'), |
3723 QKeySequence( |
3050 QKeySequence(QCoreApplication.translate( |
3724 QCoreApplication.translate( |
3051 'ViewManager', "Shift+Meta+R", "Search|Replace All")), |
3725 "ViewManager", "Shift+Meta+R", "Search|Replace All" |
3052 0, |
3726 ) |
3053 self.searchActGrp, 'vm_replace_all') |
3727 ), |
3054 self.replaceAllAct.setStatusTip(QCoreApplication.translate( |
3728 0, |
3055 'ViewManager', 'Replace search text occurrences')) |
3729 self.searchActGrp, |
3056 self.replaceAllAct.setWhatsThis(QCoreApplication.translate( |
3730 "vm_replace_all", |
3057 'ViewManager', |
3731 ) |
3058 """<b>Replace All</b>""" |
3732 self.replaceAllAct.setStatusTip( |
3059 """<p>Replace all occurrences of the search text in the current""" |
3733 QCoreApplication.translate("ViewManager", "Replace search text occurrences") |
3060 """ editor.</p>""" |
3734 ) |
3061 )) |
3735 self.replaceAllAct.setWhatsThis( |
3062 self.replaceAllAct.triggered.connect( |
3736 QCoreApplication.translate( |
3063 self.__replaceWidget.replaceAll) |
3737 "ViewManager", |
|
3738 """<b>Replace All</b>""" |
|
3739 """<p>Replace all occurrences of the search text in the current""" |
|
3740 """ editor.</p>""", |
|
3741 ) |
|
3742 ) |
|
3743 self.replaceAllAct.triggered.connect(self.__replaceWidget.replaceAll) |
3064 self.searchActions.append(self.replaceAllAct) |
3744 self.searchActions.append(self.replaceAllAct) |
3065 |
3745 |
3066 self.gotoAct = EricAction( |
3746 self.gotoAct = EricAction( |
3067 QCoreApplication.translate('ViewManager', 'Goto Line'), |
3747 QCoreApplication.translate("ViewManager", "Goto Line"), |
3068 UI.PixmapCache.getIcon("goto"), |
3748 UI.PixmapCache.getIcon("goto"), |
3069 QCoreApplication.translate('ViewManager', '&Goto Line...'), |
3749 QCoreApplication.translate("ViewManager", "&Goto Line..."), |
3070 QKeySequence(QCoreApplication.translate( |
3750 QKeySequence( |
3071 'ViewManager', "Ctrl+G", "Search|Goto Line")), |
3751 QCoreApplication.translate("ViewManager", "Ctrl+G", "Search|Goto Line") |
3072 0, |
3752 ), |
3073 self.searchActGrp, 'vm_search_goto_line') |
3753 0, |
3074 self.gotoAct.setStatusTip(QCoreApplication.translate( |
3754 self.searchActGrp, |
3075 'ViewManager', 'Goto Line')) |
3755 "vm_search_goto_line", |
3076 self.gotoAct.setWhatsThis(QCoreApplication.translate( |
3756 ) |
3077 'ViewManager', |
3757 self.gotoAct.setStatusTip( |
3078 """<b>Goto Line</b>""" |
3758 QCoreApplication.translate("ViewManager", "Goto Line") |
3079 """<p>Go to a specific line of text in the current editor.""" |
3759 ) |
3080 """ A dialog is shown to enter the linenumber.</p>""" |
3760 self.gotoAct.setWhatsThis( |
3081 )) |
3761 QCoreApplication.translate( |
|
3762 "ViewManager", |
|
3763 """<b>Goto Line</b>""" |
|
3764 """<p>Go to a specific line of text in the current editor.""" |
|
3765 """ A dialog is shown to enter the linenumber.</p>""", |
|
3766 ) |
|
3767 ) |
3082 self.gotoAct.triggered.connect(self.__goto) |
3768 self.gotoAct.triggered.connect(self.__goto) |
3083 self.searchActions.append(self.gotoAct) |
3769 self.searchActions.append(self.gotoAct) |
3084 |
3770 |
3085 self.gotoBraceAct = EricAction( |
3771 self.gotoBraceAct = EricAction( |
3086 QCoreApplication.translate('ViewManager', 'Goto Brace'), |
3772 QCoreApplication.translate("ViewManager", "Goto Brace"), |
3087 UI.PixmapCache.getIcon("gotoBrace"), |
3773 UI.PixmapCache.getIcon("gotoBrace"), |
3088 QCoreApplication.translate('ViewManager', 'Goto &Brace'), |
3774 QCoreApplication.translate("ViewManager", "Goto &Brace"), |
3089 QKeySequence(QCoreApplication.translate( |
3775 QKeySequence( |
3090 'ViewManager', "Ctrl+L", "Search|Goto Brace")), |
3776 QCoreApplication.translate("ViewManager", "Ctrl+L", "Search|Goto Brace") |
3091 0, |
3777 ), |
3092 self.searchActGrp, 'vm_search_goto_brace') |
3778 0, |
3093 self.gotoBraceAct.setStatusTip(QCoreApplication.translate( |
3779 self.searchActGrp, |
3094 'ViewManager', 'Goto Brace')) |
3780 "vm_search_goto_brace", |
3095 self.gotoBraceAct.setWhatsThis(QCoreApplication.translate( |
3781 ) |
3096 'ViewManager', |
3782 self.gotoBraceAct.setStatusTip( |
3097 """<b>Goto Brace</b>""" |
3783 QCoreApplication.translate("ViewManager", "Goto Brace") |
3098 """<p>Go to the matching brace in the current editor.</p>""" |
3784 ) |
3099 )) |
3785 self.gotoBraceAct.setWhatsThis( |
|
3786 QCoreApplication.translate( |
|
3787 "ViewManager", |
|
3788 """<b>Goto Brace</b>""" |
|
3789 """<p>Go to the matching brace in the current editor.</p>""", |
|
3790 ) |
|
3791 ) |
3100 self.gotoBraceAct.triggered.connect(self.__gotoBrace) |
3792 self.gotoBraceAct.triggered.connect(self.__gotoBrace) |
3101 self.searchActions.append(self.gotoBraceAct) |
3793 self.searchActions.append(self.gotoBraceAct) |
3102 |
3794 |
3103 self.gotoLastEditAct = EricAction( |
3795 self.gotoLastEditAct = EricAction( |
3104 QCoreApplication.translate( |
3796 QCoreApplication.translate("ViewManager", "Goto Last Edit Location"), |
3105 'ViewManager', 'Goto Last Edit Location'), |
|
3106 UI.PixmapCache.getIcon("gotoLastEditPosition"), |
3797 UI.PixmapCache.getIcon("gotoLastEditPosition"), |
3107 QCoreApplication.translate( |
3798 QCoreApplication.translate("ViewManager", "Goto Last &Edit Location"), |
3108 'ViewManager', 'Goto Last &Edit Location'), |
3799 QKeySequence( |
3109 QKeySequence(QCoreApplication.translate( |
3800 QCoreApplication.translate( |
3110 'ViewManager', |
3801 "ViewManager", "Ctrl+Shift+G", "Search|Goto Last Edit Location" |
3111 "Ctrl+Shift+G", "Search|Goto Last Edit Location")), |
3802 ) |
3112 0, |
3803 ), |
3113 self.searchActGrp, 'vm_search_goto_last_edit_location') |
3804 0, |
|
3805 self.searchActGrp, |
|
3806 "vm_search_goto_last_edit_location", |
|
3807 ) |
3114 self.gotoLastEditAct.setStatusTip( |
3808 self.gotoLastEditAct.setStatusTip( |
3115 QCoreApplication.translate( |
3809 QCoreApplication.translate("ViewManager", "Goto Last Edit Location") |
3116 'ViewManager', 'Goto Last Edit Location')) |
3810 ) |
3117 self.gotoLastEditAct.setWhatsThis(QCoreApplication.translate( |
3811 self.gotoLastEditAct.setWhatsThis( |
3118 'ViewManager', |
3812 QCoreApplication.translate( |
3119 """<b>Goto Last Edit Location</b>""" |
3813 "ViewManager", |
3120 """<p>Go to the location of the last edit in the current""" |
3814 """<b>Goto Last Edit Location</b>""" |
3121 """ editor.</p>""" |
3815 """<p>Go to the location of the last edit in the current""" |
3122 )) |
3816 """ editor.</p>""", |
|
3817 ) |
|
3818 ) |
3123 self.gotoLastEditAct.triggered.connect(self.__gotoLastEditPosition) |
3819 self.gotoLastEditAct.triggered.connect(self.__gotoLastEditPosition) |
3124 self.searchActions.append(self.gotoLastEditAct) |
3820 self.searchActions.append(self.gotoLastEditAct) |
3125 |
3821 |
3126 self.gotoPreviousDefAct = EricAction( |
3822 self.gotoPreviousDefAct = EricAction( |
3127 QCoreApplication.translate( |
3823 QCoreApplication.translate("ViewManager", "Goto Previous Method or Class"), |
3128 'ViewManager', 'Goto Previous Method or Class'), |
3824 QCoreApplication.translate("ViewManager", "Goto Previous Method or Class"), |
3129 QCoreApplication.translate( |
3825 QKeySequence( |
3130 'ViewManager', 'Goto Previous Method or Class'), |
3826 QCoreApplication.translate( |
3131 QKeySequence(QCoreApplication.translate( |
3827 "ViewManager", |
3132 'ViewManager', |
3828 "Ctrl+Shift+Up", |
3133 "Ctrl+Shift+Up", "Search|Goto Previous Method or Class")), |
3829 "Search|Goto Previous Method or Class", |
3134 0, |
3830 ) |
3135 self.searchActGrp, 'vm_search_goto_previous_method_or_class') |
3831 ), |
|
3832 0, |
|
3833 self.searchActGrp, |
|
3834 "vm_search_goto_previous_method_or_class", |
|
3835 ) |
3136 self.gotoPreviousDefAct.setStatusTip( |
3836 self.gotoPreviousDefAct.setStatusTip( |
3137 QCoreApplication.translate( |
3837 QCoreApplication.translate( |
3138 'ViewManager', |
3838 "ViewManager", "Go to the previous method or class definition" |
3139 'Go to the previous method or class definition')) |
3839 ) |
3140 self.gotoPreviousDefAct.setWhatsThis(QCoreApplication.translate( |
3840 ) |
3141 'ViewManager', |
3841 self.gotoPreviousDefAct.setWhatsThis( |
3142 """<b>Goto Previous Method or Class</b>""" |
3842 QCoreApplication.translate( |
3143 """<p>Goes to the line of the previous method or class""" |
3843 "ViewManager", |
3144 """ definition and highlights the name.</p>""" |
3844 """<b>Goto Previous Method or Class</b>""" |
3145 )) |
3845 """<p>Goes to the line of the previous method or class""" |
3146 self.gotoPreviousDefAct.triggered.connect( |
3846 """ definition and highlights the name.</p>""", |
3147 self.__gotoPreviousMethodClass) |
3847 ) |
|
3848 ) |
|
3849 self.gotoPreviousDefAct.triggered.connect(self.__gotoPreviousMethodClass) |
3148 self.searchActions.append(self.gotoPreviousDefAct) |
3850 self.searchActions.append(self.gotoPreviousDefAct) |
3149 |
3851 |
3150 self.gotoNextDefAct = EricAction( |
3852 self.gotoNextDefAct = EricAction( |
3151 QCoreApplication.translate( |
3853 QCoreApplication.translate("ViewManager", "Goto Next Method or Class"), |
3152 'ViewManager', 'Goto Next Method or Class'), |
3854 QCoreApplication.translate("ViewManager", "Goto Next Method or Class"), |
3153 QCoreApplication.translate( |
3855 QKeySequence( |
3154 'ViewManager', 'Goto Next Method or Class'), |
3856 QCoreApplication.translate( |
3155 QKeySequence(QCoreApplication.translate( |
3857 "ViewManager", "Ctrl+Shift+Down", "Search|Goto Next Method or Class" |
3156 'ViewManager', |
3858 ) |
3157 "Ctrl+Shift+Down", "Search|Goto Next Method or Class")), |
3859 ), |
3158 0, |
3860 0, |
3159 self.searchActGrp, 'vm_search_goto_next_method_or_class') |
3861 self.searchActGrp, |
3160 self.gotoNextDefAct.setStatusTip(QCoreApplication.translate( |
3862 "vm_search_goto_next_method_or_class", |
3161 'ViewManager', 'Go to the next method or class definition')) |
3863 ) |
3162 self.gotoNextDefAct.setWhatsThis(QCoreApplication.translate( |
3864 self.gotoNextDefAct.setStatusTip( |
3163 'ViewManager', |
3865 QCoreApplication.translate( |
3164 """<b>Goto Next Method or Class</b>""" |
3866 "ViewManager", "Go to the next method or class definition" |
3165 """<p>Goes to the line of the next method or class definition""" |
3867 ) |
3166 """ and highlights the name.</p>""" |
3868 ) |
3167 )) |
3869 self.gotoNextDefAct.setWhatsThis( |
|
3870 QCoreApplication.translate( |
|
3871 "ViewManager", |
|
3872 """<b>Goto Next Method or Class</b>""" |
|
3873 """<p>Goes to the line of the next method or class definition""" |
|
3874 """ and highlights the name.</p>""", |
|
3875 ) |
|
3876 ) |
3168 self.gotoNextDefAct.triggered.connect(self.__gotoNextMethodClass) |
3877 self.gotoNextDefAct.triggered.connect(self.__gotoNextMethodClass) |
3169 self.searchActions.append(self.gotoNextDefAct) |
3878 self.searchActions.append(self.gotoNextDefAct) |
3170 |
3879 |
3171 self.searchActGrp.setEnabled(False) |
3880 self.searchActGrp.setEnabled(False) |
3172 |
3881 |
3173 self.searchFilesAct = EricAction( |
3882 self.searchFilesAct = EricAction( |
3174 QCoreApplication.translate('ViewManager', 'Search in Files'), |
3883 QCoreApplication.translate("ViewManager", "Search in Files"), |
3175 UI.PixmapCache.getIcon("projectFind"), |
3884 UI.PixmapCache.getIcon("projectFind"), |
3176 QCoreApplication.translate('ViewManager', 'Search in &Files...'), |
3885 QCoreApplication.translate("ViewManager", "Search in &Files..."), |
3177 QKeySequence(QCoreApplication.translate( |
3886 QKeySequence( |
3178 'ViewManager', "Shift+Ctrl+F", "Search|Search Files")), |
3887 QCoreApplication.translate( |
3179 0, |
3888 "ViewManager", "Shift+Ctrl+F", "Search|Search Files" |
3180 self, 'vm_search_in_files') |
3889 ) |
3181 self.searchFilesAct.setStatusTip(QCoreApplication.translate( |
3890 ), |
3182 'ViewManager', 'Search for a text in files')) |
3891 0, |
3183 self.searchFilesAct.setWhatsThis(QCoreApplication.translate( |
3892 self, |
3184 'ViewManager', |
3893 "vm_search_in_files", |
3185 """<b>Search in Files</b>""" |
3894 ) |
3186 """<p>Search for some text in the files of a directory tree""" |
3895 self.searchFilesAct.setStatusTip( |
3187 """ or the project. A window is shown to enter the searchtext""" |
3896 QCoreApplication.translate("ViewManager", "Search for a text in files") |
3188 """ and options for the search and to display the result.</p>""" |
3897 ) |
3189 )) |
3898 self.searchFilesAct.setWhatsThis( |
|
3899 QCoreApplication.translate( |
|
3900 "ViewManager", |
|
3901 """<b>Search in Files</b>""" |
|
3902 """<p>Search for some text in the files of a directory tree""" |
|
3903 """ or the project. A window is shown to enter the searchtext""" |
|
3904 """ and options for the search and to display the result.</p>""", |
|
3905 ) |
|
3906 ) |
3190 self.searchFilesAct.triggered.connect(self.__searchFiles) |
3907 self.searchFilesAct.triggered.connect(self.__searchFiles) |
3191 self.searchActions.append(self.searchFilesAct) |
3908 self.searchActions.append(self.searchFilesAct) |
3192 |
3909 |
3193 self.replaceFilesAct = EricAction( |
3910 self.replaceFilesAct = EricAction( |
3194 QCoreApplication.translate('ViewManager', 'Replace in Files'), |
3911 QCoreApplication.translate("ViewManager", "Replace in Files"), |
3195 QCoreApplication.translate('ViewManager', 'Replace in F&iles...'), |
3912 QCoreApplication.translate("ViewManager", "Replace in F&iles..."), |
3196 QKeySequence(QCoreApplication.translate( |
3913 QKeySequence( |
3197 'ViewManager', "Shift+Ctrl+R", "Search|Replace in Files")), |
3914 QCoreApplication.translate( |
3198 0, |
3915 "ViewManager", "Shift+Ctrl+R", "Search|Replace in Files" |
3199 self, 'vm_replace_in_files') |
3916 ) |
3200 self.replaceFilesAct.setStatusTip(QCoreApplication.translate( |
3917 ), |
3201 'ViewManager', 'Search for a text in files and replace it')) |
3918 0, |
3202 self.replaceFilesAct.setWhatsThis(QCoreApplication.translate( |
3919 self, |
3203 'ViewManager', |
3920 "vm_replace_in_files", |
3204 """<b>Replace in Files</b>""" |
3921 ) |
3205 """<p>Search for some text in the files of a directory tree""" |
3922 self.replaceFilesAct.setStatusTip( |
3206 """ or the project and replace it. A window is shown to enter""" |
3923 QCoreApplication.translate( |
3207 """ the searchtext, the replacement text and options for the""" |
3924 "ViewManager", "Search for a text in files and replace it" |
3208 """ search and to display the result.</p>""" |
3925 ) |
3209 )) |
3926 ) |
|
3927 self.replaceFilesAct.setWhatsThis( |
|
3928 QCoreApplication.translate( |
|
3929 "ViewManager", |
|
3930 """<b>Replace in Files</b>""" |
|
3931 """<p>Search for some text in the files of a directory tree""" |
|
3932 """ or the project and replace it. A window is shown to enter""" |
|
3933 """ the searchtext, the replacement text and options for the""" |
|
3934 """ search and to display the result.</p>""", |
|
3935 ) |
|
3936 ) |
3210 self.replaceFilesAct.triggered.connect(self.__replaceFiles) |
3937 self.replaceFilesAct.triggered.connect(self.__replaceFiles) |
3211 self.searchActions.append(self.replaceFilesAct) |
3938 self.searchActions.append(self.replaceFilesAct) |
3212 |
3939 |
3213 self.searchOpenFilesAct = EricAction( |
3940 self.searchOpenFilesAct = EricAction( |
3214 QCoreApplication.translate( |
3941 QCoreApplication.translate("ViewManager", "Search in Open Files"), |
3215 'ViewManager', 'Search in Open Files'), |
|
3216 UI.PixmapCache.getIcon("documentFind"), |
3942 UI.PixmapCache.getIcon("documentFind"), |
3217 QCoreApplication.translate( |
3943 QCoreApplication.translate("ViewManager", "Search in Open Files..."), |
3218 'ViewManager', 'Search in Open Files...'), |
3944 QKeySequence( |
3219 QKeySequence(QCoreApplication.translate( |
3945 QCoreApplication.translate( |
3220 'ViewManager', |
3946 "ViewManager", "Meta+Ctrl+Alt+F", "Search|Search Open Files" |
3221 "Meta+Ctrl+Alt+F", "Search|Search Open Files")), |
3947 ) |
3222 0, |
3948 ), |
3223 self.searchOpenFilesActGrp, 'vm_search_in_open_files') |
3949 0, |
3224 self.searchOpenFilesAct.setStatusTip(QCoreApplication.translate( |
3950 self.searchOpenFilesActGrp, |
3225 'ViewManager', 'Search for a text in open files')) |
3951 "vm_search_in_open_files", |
3226 self.searchOpenFilesAct.setWhatsThis(QCoreApplication.translate( |
3952 ) |
3227 'ViewManager', |
3953 self.searchOpenFilesAct.setStatusTip( |
3228 """<b>Search in Open Files</b>""" |
3954 QCoreApplication.translate("ViewManager", "Search for a text in open files") |
3229 """<p>Search for some text in the currently opened files.""" |
3955 ) |
3230 """ A window is shown to enter the search text""" |
3956 self.searchOpenFilesAct.setWhatsThis( |
3231 """ and options for the search and to display the result.</p>""" |
3957 QCoreApplication.translate( |
3232 )) |
3958 "ViewManager", |
|
3959 """<b>Search in Open Files</b>""" |
|
3960 """<p>Search for some text in the currently opened files.""" |
|
3961 """ A window is shown to enter the search text""" |
|
3962 """ and options for the search and to display the result.</p>""", |
|
3963 ) |
|
3964 ) |
3233 self.searchOpenFilesAct.triggered.connect(self.__searchOpenFiles) |
3965 self.searchOpenFilesAct.triggered.connect(self.__searchOpenFiles) |
3234 self.searchActions.append(self.searchOpenFilesAct) |
3966 self.searchActions.append(self.searchOpenFilesAct) |
3235 |
3967 |
3236 self.replaceOpenFilesAct = EricAction( |
3968 self.replaceOpenFilesAct = EricAction( |
3237 QCoreApplication.translate( |
3969 QCoreApplication.translate("ViewManager", "Replace in Open Files"), |
3238 'ViewManager', 'Replace in Open Files'), |
3970 QCoreApplication.translate("ViewManager", "Replace in Open Files..."), |
3239 QCoreApplication.translate( |
3971 QKeySequence( |
3240 'ViewManager', 'Replace in Open Files...'), |
3972 QCoreApplication.translate( |
3241 QKeySequence(QCoreApplication.translate( |
3973 "ViewManager", "Meta+Ctrl+Alt+R", "Search|Replace in Open Files" |
3242 'ViewManager', |
3974 ) |
3243 "Meta+Ctrl+Alt+R", "Search|Replace in Open Files")), |
3975 ), |
3244 0, |
3976 0, |
3245 self.searchOpenFilesActGrp, 'vm_replace_in_open_files') |
3977 self.searchOpenFilesActGrp, |
3246 self.replaceOpenFilesAct.setStatusTip(QCoreApplication.translate( |
3978 "vm_replace_in_open_files", |
3247 'ViewManager', 'Search for a text in open files and replace it')) |
3979 ) |
3248 self.replaceOpenFilesAct.setWhatsThis(QCoreApplication.translate( |
3980 self.replaceOpenFilesAct.setStatusTip( |
3249 'ViewManager', |
3981 QCoreApplication.translate( |
3250 """<b>Replace in Open Files</b>""" |
3982 "ViewManager", "Search for a text in open files and replace it" |
3251 """<p>Search for some text in the currently opened files""" |
3983 ) |
3252 """ and replace it. A window is shown to enter""" |
3984 ) |
3253 """ the search text, the replacement text and options for the""" |
3985 self.replaceOpenFilesAct.setWhatsThis( |
3254 """ search and to display the result.</p>""" |
3986 QCoreApplication.translate( |
3255 )) |
3987 "ViewManager", |
|
3988 """<b>Replace in Open Files</b>""" |
|
3989 """<p>Search for some text in the currently opened files""" |
|
3990 """ and replace it. A window is shown to enter""" |
|
3991 """ the search text, the replacement text and options for the""" |
|
3992 """ search and to display the result.</p>""", |
|
3993 ) |
|
3994 ) |
3256 self.replaceOpenFilesAct.triggered.connect(self.__replaceOpenFiles) |
3995 self.replaceOpenFilesAct.triggered.connect(self.__replaceOpenFiles) |
3257 self.searchActions.append(self.replaceOpenFilesAct) |
3996 self.searchActions.append(self.replaceOpenFilesAct) |
3258 |
3997 |
3259 self.searchOpenFilesActGrp.setEnabled(False) |
3998 self.searchOpenFilesActGrp.setEnabled(False) |
3260 |
3999 |
3261 def initSearchMenu(self): |
4000 def initSearchMenu(self): |
3262 """ |
4001 """ |
3263 Public method to create the Search menu. |
4002 Public method to create the Search menu. |
3264 |
4003 |
3265 @return the generated menu |
4004 @return the generated menu |
3266 @rtype QMenu |
4005 @rtype QMenu |
3267 """ |
4006 """ |
3268 menu = QMenu( |
4007 menu = QMenu(QCoreApplication.translate("ViewManager", "&Search"), self.ui) |
3269 QCoreApplication.translate('ViewManager', '&Search'), |
|
3270 self.ui) |
|
3271 menu.setTearOffEnabled(True) |
4008 menu.setTearOffEnabled(True) |
3272 menu.addAction(self.searchAct) |
4009 menu.addAction(self.searchAct) |
3273 menu.addAction(self.searchNextAct) |
4010 menu.addAction(self.searchNextAct) |
3274 menu.addAction(self.searchPrevAct) |
4011 menu.addAction(self.searchPrevAct) |
3275 menu.addAction(self.searchNextWordAct) |
4012 menu.addAction(self.searchNextWordAct) |
3311 tb.addSeparator() |
4047 tb.addSeparator() |
3312 tb.addAction(self.searchFilesAct) |
4048 tb.addAction(self.searchFilesAct) |
3313 tb.addAction(self.searchOpenFilesAct) |
4049 tb.addAction(self.searchOpenFilesAct) |
3314 tb.addSeparator() |
4050 tb.addSeparator() |
3315 tb.addAction(self.gotoLastEditAct) |
4051 tb.addAction(self.gotoLastEditAct) |
3316 |
4052 |
3317 tb.setAllowedAreas( |
4053 tb.setAllowedAreas( |
3318 Qt.ToolBarArea.TopToolBarArea | |
4054 Qt.ToolBarArea.TopToolBarArea | Qt.ToolBarArea.BottomToolBarArea |
3319 Qt.ToolBarArea.BottomToolBarArea |
4055 ) |
3320 ) |
4056 |
3321 |
|
3322 toolbarManager.addToolBar(tb, tb.windowTitle()) |
4057 toolbarManager.addToolBar(tb, tb.windowTitle()) |
3323 toolbarManager.addAction(self.gotoAct, tb.windowTitle()) |
4058 toolbarManager.addAction(self.gotoAct, tb.windowTitle()) |
3324 toolbarManager.addAction(self.gotoBraceAct, tb.windowTitle()) |
4059 toolbarManager.addAction(self.gotoBraceAct, tb.windowTitle()) |
3325 toolbarManager.addAction(self.replaceSelectionAct, tb.windowTitle()) |
4060 toolbarManager.addAction(self.replaceSelectionAct, tb.windowTitle()) |
3326 toolbarManager.addAction(self.replaceAllAct, tb.windowTitle()) |
4061 toolbarManager.addAction(self.replaceAllAct, tb.windowTitle()) |
3327 toolbarManager.addAction(self.replaceAndSearchAct, tb.windowTitle()) |
4062 toolbarManager.addAction(self.replaceAndSearchAct, tb.windowTitle()) |
3328 |
4063 |
3329 return tb |
4064 return tb |
3330 |
4065 |
3331 ################################################################## |
4066 ################################################################## |
3332 ## Initialize the view related actions, view menu and toolbar |
4067 ## Initialize the view related actions, view menu and toolbar |
3333 ################################################################## |
4068 ################################################################## |
3334 |
4069 |
3335 def __initViewActions(self): |
4070 def __initViewActions(self): |
3336 """ |
4071 """ |
3337 Private method defining the user interface actions for the view |
4072 Private method defining the user interface actions for the view |
3338 commands. |
4073 commands. |
3339 """ |
4074 """ |
3340 self.viewActGrp = createActionGroup(self) |
4075 self.viewActGrp = createActionGroup(self) |
3341 self.viewFoldActGrp = createActionGroup(self) |
4076 self.viewFoldActGrp = createActionGroup(self) |
3342 |
4077 |
3343 self.zoomInAct = EricAction( |
4078 self.zoomInAct = EricAction( |
3344 QCoreApplication.translate('ViewManager', 'Zoom in'), |
4079 QCoreApplication.translate("ViewManager", "Zoom in"), |
3345 UI.PixmapCache.getIcon("zoomIn"), |
4080 UI.PixmapCache.getIcon("zoomIn"), |
3346 QCoreApplication.translate('ViewManager', 'Zoom &in'), |
4081 QCoreApplication.translate("ViewManager", "Zoom &in"), |
3347 QKeySequence(QCoreApplication.translate( |
4082 QKeySequence( |
3348 'ViewManager', "Ctrl++", "View|Zoom in")), |
4083 QCoreApplication.translate("ViewManager", "Ctrl++", "View|Zoom in") |
3349 QKeySequence(QCoreApplication.translate( |
4084 ), |
3350 'ViewManager', "Zoom In", "View|Zoom in")), |
4085 QKeySequence( |
3351 self.viewActGrp, 'vm_view_zoom_in') |
4086 QCoreApplication.translate("ViewManager", "Zoom In", "View|Zoom in") |
3352 self.zoomInAct.setStatusTip(QCoreApplication.translate( |
4087 ), |
3353 'ViewManager', 'Zoom in on the text')) |
4088 self.viewActGrp, |
3354 self.zoomInAct.setWhatsThis(QCoreApplication.translate( |
4089 "vm_view_zoom_in", |
3355 'ViewManager', |
4090 ) |
3356 """<b>Zoom in</b>""" |
4091 self.zoomInAct.setStatusTip( |
3357 """<p>Zoom in on the text. This makes the text bigger.</p>""" |
4092 QCoreApplication.translate("ViewManager", "Zoom in on the text") |
3358 )) |
4093 ) |
|
4094 self.zoomInAct.setWhatsThis( |
|
4095 QCoreApplication.translate( |
|
4096 "ViewManager", |
|
4097 """<b>Zoom in</b>""" |
|
4098 """<p>Zoom in on the text. This makes the text bigger.</p>""", |
|
4099 ) |
|
4100 ) |
3359 self.zoomInAct.triggered.connect(self.__zoomIn) |
4101 self.zoomInAct.triggered.connect(self.__zoomIn) |
3360 self.viewActions.append(self.zoomInAct) |
4102 self.viewActions.append(self.zoomInAct) |
3361 |
4103 |
3362 self.zoomOutAct = EricAction( |
4104 self.zoomOutAct = EricAction( |
3363 QCoreApplication.translate('ViewManager', 'Zoom out'), |
4105 QCoreApplication.translate("ViewManager", "Zoom out"), |
3364 UI.PixmapCache.getIcon("zoomOut"), |
4106 UI.PixmapCache.getIcon("zoomOut"), |
3365 QCoreApplication.translate('ViewManager', 'Zoom &out'), |
4107 QCoreApplication.translate("ViewManager", "Zoom &out"), |
3366 QKeySequence(QCoreApplication.translate( |
4108 QKeySequence( |
3367 'ViewManager', "Ctrl+-", "View|Zoom out")), |
4109 QCoreApplication.translate("ViewManager", "Ctrl+-", "View|Zoom out") |
3368 QKeySequence(QCoreApplication.translate( |
4110 ), |
3369 'ViewManager', "Zoom Out", "View|Zoom out")), |
4111 QKeySequence( |
3370 self.viewActGrp, 'vm_view_zoom_out') |
4112 QCoreApplication.translate("ViewManager", "Zoom Out", "View|Zoom out") |
3371 self.zoomOutAct.setStatusTip(QCoreApplication.translate( |
4113 ), |
3372 'ViewManager', 'Zoom out on the text')) |
4114 self.viewActGrp, |
3373 self.zoomOutAct.setWhatsThis(QCoreApplication.translate( |
4115 "vm_view_zoom_out", |
3374 'ViewManager', |
4116 ) |
3375 """<b>Zoom out</b>""" |
4117 self.zoomOutAct.setStatusTip( |
3376 """<p>Zoom out on the text. This makes the text smaller.</p>""" |
4118 QCoreApplication.translate("ViewManager", "Zoom out on the text") |
3377 )) |
4119 ) |
|
4120 self.zoomOutAct.setWhatsThis( |
|
4121 QCoreApplication.translate( |
|
4122 "ViewManager", |
|
4123 """<b>Zoom out</b>""" |
|
4124 """<p>Zoom out on the text. This makes the text smaller.</p>""", |
|
4125 ) |
|
4126 ) |
3378 self.zoomOutAct.triggered.connect(self.__zoomOut) |
4127 self.zoomOutAct.triggered.connect(self.__zoomOut) |
3379 self.viewActions.append(self.zoomOutAct) |
4128 self.viewActions.append(self.zoomOutAct) |
3380 |
4129 |
3381 self.zoomResetAct = EricAction( |
4130 self.zoomResetAct = EricAction( |
3382 QCoreApplication.translate('ViewManager', 'Zoom reset'), |
4131 QCoreApplication.translate("ViewManager", "Zoom reset"), |
3383 UI.PixmapCache.getIcon("zoomReset"), |
4132 UI.PixmapCache.getIcon("zoomReset"), |
3384 QCoreApplication.translate('ViewManager', 'Zoom &reset'), |
4133 QCoreApplication.translate("ViewManager", "Zoom &reset"), |
3385 QKeySequence(QCoreApplication.translate( |
4134 QKeySequence( |
3386 'ViewManager', "Ctrl+0", "View|Zoom reset")), |
4135 QCoreApplication.translate("ViewManager", "Ctrl+0", "View|Zoom reset") |
3387 0, |
4136 ), |
3388 self.viewActGrp, 'vm_view_zoom_reset') |
4137 0, |
3389 self.zoomResetAct.setStatusTip(QCoreApplication.translate( |
4138 self.viewActGrp, |
3390 'ViewManager', 'Reset the zoom of the text')) |
4139 "vm_view_zoom_reset", |
3391 self.zoomResetAct.setWhatsThis(QCoreApplication.translate( |
4140 ) |
3392 'ViewManager', |
4141 self.zoomResetAct.setStatusTip( |
3393 """<b>Zoom reset</b>""" |
4142 QCoreApplication.translate("ViewManager", "Reset the zoom of the text") |
3394 """<p>Reset the zoom of the text. """ |
4143 ) |
3395 """This sets the zoom factor to 100%.</p>""" |
4144 self.zoomResetAct.setWhatsThis( |
3396 )) |
4145 QCoreApplication.translate( |
|
4146 "ViewManager", |
|
4147 """<b>Zoom reset</b>""" |
|
4148 """<p>Reset the zoom of the text. """ |
|
4149 """This sets the zoom factor to 100%.</p>""", |
|
4150 ) |
|
4151 ) |
3397 self.zoomResetAct.triggered.connect(self.__zoomReset) |
4152 self.zoomResetAct.triggered.connect(self.__zoomReset) |
3398 self.viewActions.append(self.zoomResetAct) |
4153 self.viewActions.append(self.zoomResetAct) |
3399 |
4154 |
3400 self.zoomToAct = EricAction( |
4155 self.zoomToAct = EricAction( |
3401 QCoreApplication.translate('ViewManager', 'Zoom'), |
4156 QCoreApplication.translate("ViewManager", "Zoom"), |
3402 UI.PixmapCache.getIcon("zoomTo"), |
4157 UI.PixmapCache.getIcon("zoomTo"), |
3403 QCoreApplication.translate('ViewManager', '&Zoom'), |
4158 QCoreApplication.translate("ViewManager", "&Zoom"), |
3404 0, 0, |
4159 0, |
3405 self.viewActGrp, 'vm_view_zoom') |
4160 0, |
3406 self.zoomToAct.setStatusTip(QCoreApplication.translate( |
4161 self.viewActGrp, |
3407 'ViewManager', 'Zoom the text')) |
4162 "vm_view_zoom", |
3408 self.zoomToAct.setWhatsThis(QCoreApplication.translate( |
4163 ) |
3409 'ViewManager', |
4164 self.zoomToAct.setStatusTip( |
3410 """<b>Zoom</b>""" |
4165 QCoreApplication.translate("ViewManager", "Zoom the text") |
3411 """<p>Zoom the text. This opens a dialog where the""" |
4166 ) |
3412 """ desired size can be entered.</p>""" |
4167 self.zoomToAct.setWhatsThis( |
3413 )) |
4168 QCoreApplication.translate( |
|
4169 "ViewManager", |
|
4170 """<b>Zoom</b>""" |
|
4171 """<p>Zoom the text. This opens a dialog where the""" |
|
4172 """ desired size can be entered.</p>""", |
|
4173 ) |
|
4174 ) |
3414 self.zoomToAct.triggered.connect(self.__zoom) |
4175 self.zoomToAct.triggered.connect(self.__zoom) |
3415 self.viewActions.append(self.zoomToAct) |
4176 self.viewActions.append(self.zoomToAct) |
3416 |
4177 |
3417 self.toggleAllAct = EricAction( |
4178 self.toggleAllAct = EricAction( |
3418 QCoreApplication.translate('ViewManager', 'Toggle all folds'), |
4179 QCoreApplication.translate("ViewManager", "Toggle all folds"), |
3419 QCoreApplication.translate('ViewManager', '&Toggle all folds'), |
4180 QCoreApplication.translate("ViewManager", "&Toggle all folds"), |
3420 0, 0, self.viewFoldActGrp, 'vm_view_toggle_all_folds') |
4181 0, |
3421 self.toggleAllAct.setStatusTip(QCoreApplication.translate( |
4182 0, |
3422 'ViewManager', 'Toggle all folds')) |
4183 self.viewFoldActGrp, |
3423 self.toggleAllAct.setWhatsThis(QCoreApplication.translate( |
4184 "vm_view_toggle_all_folds", |
3424 'ViewManager', |
4185 ) |
3425 """<b>Toggle all folds</b>""" |
4186 self.toggleAllAct.setStatusTip( |
3426 """<p>Toggle all folds of the current editor.</p>""" |
4187 QCoreApplication.translate("ViewManager", "Toggle all folds") |
3427 )) |
4188 ) |
|
4189 self.toggleAllAct.setWhatsThis( |
|
4190 QCoreApplication.translate( |
|
4191 "ViewManager", |
|
4192 """<b>Toggle all folds</b>""" |
|
4193 """<p>Toggle all folds of the current editor.</p>""", |
|
4194 ) |
|
4195 ) |
3428 self.toggleAllAct.triggered.connect(self.__toggleAll) |
4196 self.toggleAllAct.triggered.connect(self.__toggleAll) |
3429 self.viewActions.append(self.toggleAllAct) |
4197 self.viewActions.append(self.toggleAllAct) |
3430 |
4198 |
3431 self.toggleAllChildrenAct = EricAction( |
4199 self.toggleAllChildrenAct = EricAction( |
3432 QCoreApplication.translate( |
4200 QCoreApplication.translate( |
3433 'ViewManager', 'Toggle all folds (including children)'), |
4201 "ViewManager", "Toggle all folds (including children)" |
3434 QCoreApplication.translate( |
4202 ), |
3435 'ViewManager', 'Toggle all &folds (including children)'), |
4203 QCoreApplication.translate( |
3436 0, 0, self.viewFoldActGrp, 'vm_view_toggle_all_folds_children') |
4204 "ViewManager", "Toggle all &folds (including children)" |
3437 self.toggleAllChildrenAct.setStatusTip(QCoreApplication.translate( |
4205 ), |
3438 'ViewManager', 'Toggle all folds (including children)')) |
4206 0, |
3439 self.toggleAllChildrenAct.setWhatsThis(QCoreApplication.translate( |
4207 0, |
3440 'ViewManager', |
4208 self.viewFoldActGrp, |
3441 """<b>Toggle all folds (including children)</b>""" |
4209 "vm_view_toggle_all_folds_children", |
3442 """<p>Toggle all folds of the current editor including""" |
4210 ) |
3443 """ all children.</p>""" |
4211 self.toggleAllChildrenAct.setStatusTip( |
3444 )) |
4212 QCoreApplication.translate( |
3445 self.toggleAllChildrenAct.triggered.connect( |
4213 "ViewManager", "Toggle all folds (including children)" |
3446 self.__toggleAllChildren) |
4214 ) |
|
4215 ) |
|
4216 self.toggleAllChildrenAct.setWhatsThis( |
|
4217 QCoreApplication.translate( |
|
4218 "ViewManager", |
|
4219 """<b>Toggle all folds (including children)</b>""" |
|
4220 """<p>Toggle all folds of the current editor including""" |
|
4221 """ all children.</p>""", |
|
4222 ) |
|
4223 ) |
|
4224 self.toggleAllChildrenAct.triggered.connect(self.__toggleAllChildren) |
3447 self.viewActions.append(self.toggleAllChildrenAct) |
4225 self.viewActions.append(self.toggleAllChildrenAct) |
3448 |
4226 |
3449 self.toggleCurrentAct = EricAction( |
4227 self.toggleCurrentAct = EricAction( |
3450 QCoreApplication.translate('ViewManager', 'Toggle current fold'), |
4228 QCoreApplication.translate("ViewManager", "Toggle current fold"), |
3451 QCoreApplication.translate('ViewManager', 'Toggle ¤t fold'), |
4229 QCoreApplication.translate("ViewManager", "Toggle ¤t fold"), |
3452 0, 0, self.viewFoldActGrp, 'vm_view_toggle_current_fold') |
4230 0, |
3453 self.toggleCurrentAct.setStatusTip(QCoreApplication.translate( |
4231 0, |
3454 'ViewManager', 'Toggle current fold')) |
4232 self.viewFoldActGrp, |
3455 self.toggleCurrentAct.setWhatsThis(QCoreApplication.translate( |
4233 "vm_view_toggle_current_fold", |
3456 'ViewManager', |
4234 ) |
3457 """<b>Toggle current fold</b>""" |
4235 self.toggleCurrentAct.setStatusTip( |
3458 """<p>Toggle the folds of the current line of the current""" |
4236 QCoreApplication.translate("ViewManager", "Toggle current fold") |
3459 """ editor.</p>""" |
4237 ) |
3460 )) |
4238 self.toggleCurrentAct.setWhatsThis( |
|
4239 QCoreApplication.translate( |
|
4240 "ViewManager", |
|
4241 """<b>Toggle current fold</b>""" |
|
4242 """<p>Toggle the folds of the current line of the current""" |
|
4243 """ editor.</p>""", |
|
4244 ) |
|
4245 ) |
3461 self.toggleCurrentAct.triggered.connect(self.__toggleCurrent) |
4246 self.toggleCurrentAct.triggered.connect(self.__toggleCurrent) |
3462 self.viewActions.append(self.toggleCurrentAct) |
4247 self.viewActions.append(self.toggleCurrentAct) |
3463 |
4248 |
3464 self.clearAllFoldsAct = EricAction( |
4249 self.clearAllFoldsAct = EricAction( |
3465 QCoreApplication.translate('ViewManager', 'Clear all folds'), |
4250 QCoreApplication.translate("ViewManager", "Clear all folds"), |
3466 QCoreApplication.translate('ViewManager', 'Clear &all folds'), |
4251 QCoreApplication.translate("ViewManager", "Clear &all folds"), |
3467 0, 0, self.viewFoldActGrp, 'vm_view_clear_all_folds') |
4252 0, |
3468 self.clearAllFoldsAct.setStatusTip(QCoreApplication.translate( |
4253 0, |
3469 'ViewManager', 'Clear all folds')) |
4254 self.viewFoldActGrp, |
3470 self.clearAllFoldsAct.setWhatsThis(QCoreApplication.translate( |
4255 "vm_view_clear_all_folds", |
3471 'ViewManager', |
4256 ) |
3472 """<b>Clear all folds</b>""" |
4257 self.clearAllFoldsAct.setStatusTip( |
3473 """<p>Clear all folds of the current editor, i.e. ensure that""" |
4258 QCoreApplication.translate("ViewManager", "Clear all folds") |
3474 """ all lines are displayed unfolded.</p>""" |
4259 ) |
3475 )) |
4260 self.clearAllFoldsAct.setWhatsThis( |
|
4261 QCoreApplication.translate( |
|
4262 "ViewManager", |
|
4263 """<b>Clear all folds</b>""" |
|
4264 """<p>Clear all folds of the current editor, i.e. ensure that""" |
|
4265 """ all lines are displayed unfolded.</p>""", |
|
4266 ) |
|
4267 ) |
3476 self.clearAllFoldsAct.triggered.connect(self.__clearAllFolds) |
4268 self.clearAllFoldsAct.triggered.connect(self.__clearAllFolds) |
3477 self.viewActions.append(self.clearAllFoldsAct) |
4269 self.viewActions.append(self.clearAllFoldsAct) |
3478 |
4270 |
3479 self.unhighlightAct = EricAction( |
4271 self.unhighlightAct = EricAction( |
3480 QCoreApplication.translate('ViewManager', 'Remove all highlights'), |
4272 QCoreApplication.translate("ViewManager", "Remove all highlights"), |
3481 UI.PixmapCache.getIcon("unhighlight"), |
4273 UI.PixmapCache.getIcon("unhighlight"), |
3482 QCoreApplication.translate('ViewManager', 'Remove all highlights'), |
4274 QCoreApplication.translate("ViewManager", "Remove all highlights"), |
3483 0, 0, |
4275 0, |
3484 self, 'vm_view_unhighlight') |
4276 0, |
3485 self.unhighlightAct.setStatusTip(QCoreApplication.translate( |
4277 self, |
3486 'ViewManager', 'Remove all highlights')) |
4278 "vm_view_unhighlight", |
3487 self.unhighlightAct.setWhatsThis(QCoreApplication.translate( |
4279 ) |
3488 'ViewManager', |
4280 self.unhighlightAct.setStatusTip( |
3489 """<b>Remove all highlights</b>""" |
4281 QCoreApplication.translate("ViewManager", "Remove all highlights") |
3490 """<p>Remove the highlights of all editors.</p>""" |
4282 ) |
3491 )) |
4283 self.unhighlightAct.setWhatsThis( |
|
4284 QCoreApplication.translate( |
|
4285 "ViewManager", |
|
4286 """<b>Remove all highlights</b>""" |
|
4287 """<p>Remove the highlights of all editors.</p>""", |
|
4288 ) |
|
4289 ) |
3492 self.unhighlightAct.triggered.connect(self.__unhighlight) |
4290 self.unhighlightAct.triggered.connect(self.__unhighlight) |
3493 self.viewActions.append(self.unhighlightAct) |
4291 self.viewActions.append(self.unhighlightAct) |
3494 |
4292 |
3495 self.newDocumentViewAct = EricAction( |
4293 self.newDocumentViewAct = EricAction( |
3496 QCoreApplication.translate('ViewManager', 'New Document View'), |
4294 QCoreApplication.translate("ViewManager", "New Document View"), |
3497 UI.PixmapCache.getIcon("documentNewView"), |
4295 UI.PixmapCache.getIcon("documentNewView"), |
3498 QCoreApplication.translate('ViewManager', 'New &Document View'), |
4296 QCoreApplication.translate("ViewManager", "New &Document View"), |
3499 0, 0, self, 'vm_view_new_document_view') |
4297 0, |
3500 self.newDocumentViewAct.setStatusTip(QCoreApplication.translate( |
4298 0, |
3501 'ViewManager', 'Open a new view of the current document')) |
4299 self, |
3502 self.newDocumentViewAct.setWhatsThis(QCoreApplication.translate( |
4300 "vm_view_new_document_view", |
3503 'ViewManager', |
4301 ) |
3504 """<b>New Document View</b>""" |
4302 self.newDocumentViewAct.setStatusTip( |
3505 """<p>Opens a new view of the current document. Both views show""" |
4303 QCoreApplication.translate( |
3506 """ the same document. However, the cursors may be positioned""" |
4304 "ViewManager", "Open a new view of the current document" |
3507 """ independently.</p>""" |
4305 ) |
3508 )) |
4306 ) |
|
4307 self.newDocumentViewAct.setWhatsThis( |
|
4308 QCoreApplication.translate( |
|
4309 "ViewManager", |
|
4310 """<b>New Document View</b>""" |
|
4311 """<p>Opens a new view of the current document. Both views show""" |
|
4312 """ the same document. However, the cursors may be positioned""" |
|
4313 """ independently.</p>""", |
|
4314 ) |
|
4315 ) |
3509 self.newDocumentViewAct.triggered.connect(self.__newDocumentView) |
4316 self.newDocumentViewAct.triggered.connect(self.__newDocumentView) |
3510 self.viewActions.append(self.newDocumentViewAct) |
4317 self.viewActions.append(self.newDocumentViewAct) |
3511 |
4318 |
3512 self.newDocumentSplitViewAct = EricAction( |
4319 self.newDocumentSplitViewAct = EricAction( |
3513 QCoreApplication.translate( |
4320 QCoreApplication.translate( |
3514 'ViewManager', 'New Document View (with new split)'), |
4321 "ViewManager", "New Document View (with new split)" |
|
4322 ), |
3515 UI.PixmapCache.getIcon("splitVertical"), |
4323 UI.PixmapCache.getIcon("splitVertical"), |
3516 QCoreApplication.translate( |
4324 QCoreApplication.translate( |
3517 'ViewManager', 'New Document View (with new split)'), |
4325 "ViewManager", "New Document View (with new split)" |
3518 0, 0, self, 'vm_view_new_document_split_view') |
4326 ), |
3519 self.newDocumentSplitViewAct.setStatusTip(QCoreApplication.translate( |
4327 0, |
3520 'ViewManager', |
4328 0, |
3521 'Open a new view of the current document in a new split')) |
4329 self, |
3522 self.newDocumentSplitViewAct.setWhatsThis(QCoreApplication.translate( |
4330 "vm_view_new_document_split_view", |
3523 'ViewManager', |
4331 ) |
3524 """<b>New Document View</b>""" |
4332 self.newDocumentSplitViewAct.setStatusTip( |
3525 """<p>Opens a new view of the current document in a new split.""" |
4333 QCoreApplication.translate( |
3526 """ Both views show the same document. However, the cursors may""" |
4334 "ViewManager", "Open a new view of the current document in a new split" |
3527 """ be positioned independently.</p>""" |
4335 ) |
3528 )) |
4336 ) |
3529 self.newDocumentSplitViewAct.triggered.connect( |
4337 self.newDocumentSplitViewAct.setWhatsThis( |
3530 self.__newDocumentSplitView) |
4338 QCoreApplication.translate( |
|
4339 "ViewManager", |
|
4340 """<b>New Document View</b>""" |
|
4341 """<p>Opens a new view of the current document in a new split.""" |
|
4342 """ Both views show the same document. However, the cursors may""" |
|
4343 """ be positioned independently.</p>""", |
|
4344 ) |
|
4345 ) |
|
4346 self.newDocumentSplitViewAct.triggered.connect(self.__newDocumentSplitView) |
3531 self.viewActions.append(self.newDocumentSplitViewAct) |
4347 self.viewActions.append(self.newDocumentSplitViewAct) |
3532 |
4348 |
3533 self.splitViewAct = EricAction( |
4349 self.splitViewAct = EricAction( |
3534 QCoreApplication.translate('ViewManager', 'Split view'), |
4350 QCoreApplication.translate("ViewManager", "Split view"), |
3535 UI.PixmapCache.getIcon("splitVertical"), |
4351 UI.PixmapCache.getIcon("splitVertical"), |
3536 QCoreApplication.translate('ViewManager', '&Split view'), |
4352 QCoreApplication.translate("ViewManager", "&Split view"), |
3537 0, 0, self, 'vm_view_split_view') |
4353 0, |
3538 self.splitViewAct.setStatusTip(QCoreApplication.translate( |
4354 0, |
3539 'ViewManager', 'Add a split to the view')) |
4355 self, |
3540 self.splitViewAct.setWhatsThis(QCoreApplication.translate( |
4356 "vm_view_split_view", |
3541 'ViewManager', |
4357 ) |
3542 """<b>Split view</b>""" |
4358 self.splitViewAct.setStatusTip( |
3543 """<p>Add a split to the view.</p>""" |
4359 QCoreApplication.translate("ViewManager", "Add a split to the view") |
3544 )) |
4360 ) |
|
4361 self.splitViewAct.setWhatsThis( |
|
4362 QCoreApplication.translate( |
|
4363 "ViewManager", |
|
4364 """<b>Split view</b>""" """<p>Add a split to the view.</p>""", |
|
4365 ) |
|
4366 ) |
3545 self.splitViewAct.triggered.connect(self.__splitView) |
4367 self.splitViewAct.triggered.connect(self.__splitView) |
3546 self.viewActions.append(self.splitViewAct) |
4368 self.viewActions.append(self.splitViewAct) |
3547 |
4369 |
3548 self.splitOrientationAct = EricAction( |
4370 self.splitOrientationAct = EricAction( |
3549 QCoreApplication.translate('ViewManager', 'Arrange horizontally'), |
4371 QCoreApplication.translate("ViewManager", "Arrange horizontally"), |
3550 QCoreApplication.translate('ViewManager', 'Arrange &horizontally'), |
4372 QCoreApplication.translate("ViewManager", "Arrange &horizontally"), |
3551 0, 0, self, 'vm_view_arrange_horizontally', True) |
4373 0, |
3552 self.splitOrientationAct.setStatusTip(QCoreApplication.translate( |
4374 0, |
3553 'ViewManager', 'Arrange the splitted views horizontally')) |
4375 self, |
3554 self.splitOrientationAct.setWhatsThis(QCoreApplication.translate( |
4376 "vm_view_arrange_horizontally", |
3555 'ViewManager', |
4377 True, |
3556 """<b>Arrange horizontally</b>""" |
4378 ) |
3557 """<p>Arrange the splitted views horizontally.</p>""" |
4379 self.splitOrientationAct.setStatusTip( |
3558 )) |
4380 QCoreApplication.translate( |
|
4381 "ViewManager", "Arrange the splitted views horizontally" |
|
4382 ) |
|
4383 ) |
|
4384 self.splitOrientationAct.setWhatsThis( |
|
4385 QCoreApplication.translate( |
|
4386 "ViewManager", |
|
4387 """<b>Arrange horizontally</b>""" |
|
4388 """<p>Arrange the splitted views horizontally.</p>""", |
|
4389 ) |
|
4390 ) |
3559 self.splitOrientationAct.setChecked(False) |
4391 self.splitOrientationAct.setChecked(False) |
3560 self.splitOrientationAct.toggled[bool].connect(self.__splitOrientation) |
4392 self.splitOrientationAct.toggled[bool].connect(self.__splitOrientation) |
3561 self.viewActions.append(self.splitOrientationAct) |
4393 self.viewActions.append(self.splitOrientationAct) |
3562 |
4394 |
3563 self.splitRemoveAct = EricAction( |
4395 self.splitRemoveAct = EricAction( |
3564 QCoreApplication.translate('ViewManager', 'Remove split'), |
4396 QCoreApplication.translate("ViewManager", "Remove split"), |
3565 UI.PixmapCache.getIcon("remsplitVertical"), |
4397 UI.PixmapCache.getIcon("remsplitVertical"), |
3566 QCoreApplication.translate('ViewManager', '&Remove split'), |
4398 QCoreApplication.translate("ViewManager", "&Remove split"), |
3567 0, 0, self, 'vm_view_remove_split') |
4399 0, |
3568 self.splitRemoveAct.setStatusTip(QCoreApplication.translate( |
4400 0, |
3569 'ViewManager', 'Remove the current split')) |
4401 self, |
3570 self.splitRemoveAct.setWhatsThis(QCoreApplication.translate( |
4402 "vm_view_remove_split", |
3571 'ViewManager', |
4403 ) |
3572 """<b>Remove split</b>""" |
4404 self.splitRemoveAct.setStatusTip( |
3573 """<p>Remove the current split.</p>""" |
4405 QCoreApplication.translate("ViewManager", "Remove the current split") |
3574 )) |
4406 ) |
|
4407 self.splitRemoveAct.setWhatsThis( |
|
4408 QCoreApplication.translate( |
|
4409 "ViewManager", |
|
4410 """<b>Remove split</b>""" """<p>Remove the current split.</p>""", |
|
4411 ) |
|
4412 ) |
3575 self.splitRemoveAct.triggered.connect(self.removeSplit) |
4413 self.splitRemoveAct.triggered.connect(self.removeSplit) |
3576 self.viewActions.append(self.splitRemoveAct) |
4414 self.viewActions.append(self.splitRemoveAct) |
3577 |
4415 |
3578 self.nextSplitAct = EricAction( |
4416 self.nextSplitAct = EricAction( |
3579 QCoreApplication.translate('ViewManager', 'Next split'), |
4417 QCoreApplication.translate("ViewManager", "Next split"), |
3580 QCoreApplication.translate('ViewManager', '&Next split'), |
4418 QCoreApplication.translate("ViewManager", "&Next split"), |
3581 QKeySequence(QCoreApplication.translate( |
4419 QKeySequence( |
3582 'ViewManager', "Ctrl+Alt+N", "View|Next split")), |
4420 QCoreApplication.translate( |
3583 0, |
4421 "ViewManager", "Ctrl+Alt+N", "View|Next split" |
3584 self, 'vm_next_split') |
4422 ) |
3585 self.nextSplitAct.setStatusTip(QCoreApplication.translate( |
4423 ), |
3586 'ViewManager', 'Move to the next split')) |
4424 0, |
3587 self.nextSplitAct.setWhatsThis(QCoreApplication.translate( |
4425 self, |
3588 'ViewManager', |
4426 "vm_next_split", |
3589 """<b>Next split</b>""" |
4427 ) |
3590 """<p>Move to the next split.</p>""" |
4428 self.nextSplitAct.setStatusTip( |
3591 )) |
4429 QCoreApplication.translate("ViewManager", "Move to the next split") |
|
4430 ) |
|
4431 self.nextSplitAct.setWhatsThis( |
|
4432 QCoreApplication.translate( |
|
4433 "ViewManager", |
|
4434 """<b>Next split</b>""" """<p>Move to the next split.</p>""", |
|
4435 ) |
|
4436 ) |
3592 self.nextSplitAct.triggered.connect(self.nextSplit) |
4437 self.nextSplitAct.triggered.connect(self.nextSplit) |
3593 self.viewActions.append(self.nextSplitAct) |
4438 self.viewActions.append(self.nextSplitAct) |
3594 |
4439 |
3595 self.prevSplitAct = EricAction( |
4440 self.prevSplitAct = EricAction( |
3596 QCoreApplication.translate('ViewManager', 'Previous split'), |
4441 QCoreApplication.translate("ViewManager", "Previous split"), |
3597 QCoreApplication.translate('ViewManager', '&Previous split'), |
4442 QCoreApplication.translate("ViewManager", "&Previous split"), |
3598 QKeySequence(QCoreApplication.translate( |
4443 QKeySequence( |
3599 'ViewManager', "Ctrl+Alt+P", "View|Previous split")), |
4444 QCoreApplication.translate( |
3600 0, self, 'vm_previous_split') |
4445 "ViewManager", "Ctrl+Alt+P", "View|Previous split" |
3601 self.prevSplitAct.setStatusTip(QCoreApplication.translate( |
4446 ) |
3602 'ViewManager', 'Move to the previous split')) |
4447 ), |
3603 self.prevSplitAct.setWhatsThis(QCoreApplication.translate( |
4448 0, |
3604 'ViewManager', |
4449 self, |
3605 """<b>Previous split</b>""" |
4450 "vm_previous_split", |
3606 """<p>Move to the previous split.</p>""" |
4451 ) |
3607 )) |
4452 self.prevSplitAct.setStatusTip( |
|
4453 QCoreApplication.translate("ViewManager", "Move to the previous split") |
|
4454 ) |
|
4455 self.prevSplitAct.setWhatsThis( |
|
4456 QCoreApplication.translate( |
|
4457 "ViewManager", |
|
4458 """<b>Previous split</b>""" """<p>Move to the previous split.</p>""", |
|
4459 ) |
|
4460 ) |
3608 self.prevSplitAct.triggered.connect(self.prevSplit) |
4461 self.prevSplitAct.triggered.connect(self.prevSplit) |
3609 self.viewActions.append(self.prevSplitAct) |
4462 self.viewActions.append(self.prevSplitAct) |
3610 |
4463 |
3611 self.previewAct = EricAction( |
4464 self.previewAct = EricAction( |
3612 QCoreApplication.translate('ViewManager', 'Preview'), |
4465 QCoreApplication.translate("ViewManager", "Preview"), |
3613 UI.PixmapCache.getIcon("previewer"), |
4466 UI.PixmapCache.getIcon("previewer"), |
3614 QCoreApplication.translate('ViewManager', 'Preview'), |
4467 QCoreApplication.translate("ViewManager", "Preview"), |
3615 0, 0, self, 'vm_preview', True) |
4468 0, |
3616 self.previewAct.setStatusTip(QCoreApplication.translate( |
4469 0, |
3617 'ViewManager', 'Preview the current file in the web browser')) |
4470 self, |
3618 self.previewAct.setWhatsThis(QCoreApplication.translate( |
4471 "vm_preview", |
3619 'ViewManager', |
4472 True, |
3620 """<b>Preview</b>""" |
4473 ) |
3621 """<p>This opens the web browser with a preview of""" |
4474 self.previewAct.setStatusTip( |
3622 """ the current file.</p>""" |
4475 QCoreApplication.translate( |
3623 )) |
4476 "ViewManager", "Preview the current file in the web browser" |
|
4477 ) |
|
4478 ) |
|
4479 self.previewAct.setWhatsThis( |
|
4480 QCoreApplication.translate( |
|
4481 "ViewManager", |
|
4482 """<b>Preview</b>""" |
|
4483 """<p>This opens the web browser with a preview of""" |
|
4484 """ the current file.</p>""", |
|
4485 ) |
|
4486 ) |
3624 self.previewAct.setChecked(Preferences.getUI("ShowFilePreview")) |
4487 self.previewAct.setChecked(Preferences.getUI("ShowFilePreview")) |
3625 self.previewAct.toggled[bool].connect(self.__previewEditor) |
4488 self.previewAct.toggled[bool].connect(self.__previewEditor) |
3626 self.viewActions.append(self.previewAct) |
4489 self.viewActions.append(self.previewAct) |
3627 |
4490 |
3628 self.astViewerAct = EricAction( |
4491 self.astViewerAct = EricAction( |
3629 QCoreApplication.translate('ViewManager', 'Python AST Viewer'), |
4492 QCoreApplication.translate("ViewManager", "Python AST Viewer"), |
3630 UI.PixmapCache.getIcon("astTree"), |
4493 UI.PixmapCache.getIcon("astTree"), |
3631 QCoreApplication.translate('ViewManager', 'Python AST Viewer'), |
4494 QCoreApplication.translate("ViewManager", "Python AST Viewer"), |
3632 0, 0, self, 'vm_python_ast_viewer', True) |
4495 0, |
3633 self.astViewerAct.setStatusTip(QCoreApplication.translate( |
4496 0, |
3634 'ViewManager', 'Show the AST for the current Python file')) |
4497 self, |
3635 self.astViewerAct.setWhatsThis(QCoreApplication.translate( |
4498 "vm_python_ast_viewer", |
3636 'ViewManager', |
4499 True, |
3637 """<b>Python AST Viewer</b>""" |
4500 ) |
3638 """<p>This opens the a tree view of the AST of the current""" |
4501 self.astViewerAct.setStatusTip( |
3639 """ Python source file.</p>""" |
4502 QCoreApplication.translate( |
3640 )) |
4503 "ViewManager", "Show the AST for the current Python file" |
|
4504 ) |
|
4505 ) |
|
4506 self.astViewerAct.setWhatsThis( |
|
4507 QCoreApplication.translate( |
|
4508 "ViewManager", |
|
4509 """<b>Python AST Viewer</b>""" |
|
4510 """<p>This opens the a tree view of the AST of the current""" |
|
4511 """ Python source file.</p>""", |
|
4512 ) |
|
4513 ) |
3641 self.astViewerAct.setChecked(False) |
4514 self.astViewerAct.setChecked(False) |
3642 self.astViewerAct.toggled[bool].connect(self.__astViewer) |
4515 self.astViewerAct.toggled[bool].connect(self.__astViewer) |
3643 self.viewActions.append(self.astViewerAct) |
4516 self.viewActions.append(self.astViewerAct) |
3644 |
4517 |
3645 self.disViewerAct = EricAction( |
4518 self.disViewerAct = EricAction( |
3646 QCoreApplication.translate( |
4519 QCoreApplication.translate("ViewManager", "Python Disassembly Viewer"), |
3647 'ViewManager', 'Python Disassembly Viewer'), |
|
3648 UI.PixmapCache.getIcon("disassembly"), |
4520 UI.PixmapCache.getIcon("disassembly"), |
3649 QCoreApplication.translate( |
4521 QCoreApplication.translate("ViewManager", "Python Disassembly Viewer"), |
3650 'ViewManager', 'Python Disassembly Viewer'), |
4522 0, |
3651 0, 0, self, 'vm_python_dis_viewer', True) |
4523 0, |
3652 self.disViewerAct.setStatusTip(QCoreApplication.translate( |
4524 self, |
3653 'ViewManager', 'Show the Disassembly for the current Python file')) |
4525 "vm_python_dis_viewer", |
3654 self.disViewerAct.setWhatsThis(QCoreApplication.translate( |
4526 True, |
3655 'ViewManager', |
4527 ) |
3656 """<b>Python Disassembly Viewer</b>""" |
4528 self.disViewerAct.setStatusTip( |
3657 """<p>This opens the a tree view of the Disassembly of the""" |
4529 QCoreApplication.translate( |
3658 """ current Python source file.</p>""" |
4530 "ViewManager", "Show the Disassembly for the current Python file" |
3659 )) |
4531 ) |
|
4532 ) |
|
4533 self.disViewerAct.setWhatsThis( |
|
4534 QCoreApplication.translate( |
|
4535 "ViewManager", |
|
4536 """<b>Python Disassembly Viewer</b>""" |
|
4537 """<p>This opens the a tree view of the Disassembly of the""" |
|
4538 """ current Python source file.</p>""", |
|
4539 ) |
|
4540 ) |
3660 self.disViewerAct.setChecked(False) |
4541 self.disViewerAct.setChecked(False) |
3661 self.disViewerAct.toggled[bool].connect(self.__disViewer) |
4542 self.disViewerAct.toggled[bool].connect(self.__disViewer) |
3662 self.viewActions.append(self.disViewerAct) |
4543 self.viewActions.append(self.disViewerAct) |
3663 |
4544 |
3664 self.viewActGrp.setEnabled(False) |
4545 self.viewActGrp.setEnabled(False) |
3665 self.viewFoldActGrp.setEnabled(False) |
4546 self.viewFoldActGrp.setEnabled(False) |
3666 self.unhighlightAct.setEnabled(False) |
4547 self.unhighlightAct.setEnabled(False) |
3667 self.splitViewAct.setEnabled(False) |
4548 self.splitViewAct.setEnabled(False) |
3668 self.splitOrientationAct.setEnabled(False) |
4549 self.splitOrientationAct.setEnabled(False) |
3704 menu.addAction(self.splitViewAct) |
4585 menu.addAction(self.splitViewAct) |
3705 menu.addAction(self.splitOrientationAct) |
4586 menu.addAction(self.splitOrientationAct) |
3706 menu.addAction(self.splitRemoveAct) |
4587 menu.addAction(self.splitRemoveAct) |
3707 menu.addAction(self.nextSplitAct) |
4588 menu.addAction(self.nextSplitAct) |
3708 menu.addAction(self.prevSplitAct) |
4589 menu.addAction(self.prevSplitAct) |
3709 |
4590 |
3710 return menu |
4591 return menu |
3711 |
4592 |
3712 def initViewToolbar(self, toolbarManager): |
4593 def initViewToolbar(self, toolbarManager): |
3713 """ |
4594 """ |
3714 Public method to create the View toolbar. |
4595 Public method to create the View toolbar. |
3715 |
4596 |
3716 @param toolbarManager reference to a toolbar manager object |
4597 @param toolbarManager reference to a toolbar manager object |
3717 (EricToolBarManager) |
4598 (EricToolBarManager) |
3718 @return the generated toolbar |
4599 @return the generated toolbar |
3719 """ |
4600 """ |
3720 tb = QToolBar(QCoreApplication.translate('ViewManager', 'View'), |
4601 tb = QToolBar(QCoreApplication.translate("ViewManager", "View"), self.ui) |
3721 self.ui) |
|
3722 tb.setIconSize(UI.Config.ToolBarIconSize) |
4602 tb.setIconSize(UI.Config.ToolBarIconSize) |
3723 tb.setObjectName("ViewToolbar") |
4603 tb.setObjectName("ViewToolbar") |
3724 tb.setToolTip(QCoreApplication.translate('ViewManager', 'View')) |
4604 tb.setToolTip(QCoreApplication.translate("ViewManager", "View")) |
3725 |
4605 |
3726 tb.addActions(self.viewActGrp.actions()) |
4606 tb.addActions(self.viewActGrp.actions()) |
3727 tb.addSeparator() |
4607 tb.addSeparator() |
3728 tb.addAction(self.previewAct) |
4608 tb.addAction(self.previewAct) |
3729 tb.addAction(self.astViewerAct) |
4609 tb.addAction(self.astViewerAct) |
3730 tb.addAction(self.disViewerAct) |
4610 tb.addAction(self.disViewerAct) |
3731 tb.addSeparator() |
4611 tb.addSeparator() |
3732 tb.addAction(self.newDocumentViewAct) |
4612 tb.addAction(self.newDocumentViewAct) |
3733 if self.canSplit(): |
4613 if self.canSplit(): |
3734 tb.addAction(self.newDocumentSplitViewAct) |
4614 tb.addAction(self.newDocumentSplitViewAct) |
3735 |
4615 |
3736 toolbarManager.addToolBar(tb, tb.windowTitle()) |
4616 toolbarManager.addToolBar(tb, tb.windowTitle()) |
3737 toolbarManager.addAction(self.unhighlightAct, tb.windowTitle()) |
4617 toolbarManager.addAction(self.unhighlightAct, tb.windowTitle()) |
3738 toolbarManager.addAction(self.splitViewAct, tb.windowTitle()) |
4618 toolbarManager.addAction(self.splitViewAct, tb.windowTitle()) |
3739 toolbarManager.addAction(self.splitRemoveAct, tb.windowTitle()) |
4619 toolbarManager.addAction(self.splitRemoveAct, tb.windowTitle()) |
3740 |
4620 |
3741 return tb |
4621 return tb |
3742 |
4622 |
3743 ################################################################## |
4623 ################################################################## |
3744 ## Initialize the macro related actions and macro menu |
4624 ## Initialize the macro related actions and macro menu |
3745 ################################################################## |
4625 ################################################################## |
3746 |
4626 |
3747 def __initMacroActions(self): |
4627 def __initMacroActions(self): |
3748 """ |
4628 """ |
3749 Private method defining the user interface actions for the macro |
4629 Private method defining the user interface actions for the macro |
3750 commands. |
4630 commands. |
3751 """ |
4631 """ |
3752 self.macroActGrp = createActionGroup(self) |
4632 self.macroActGrp = createActionGroup(self) |
3753 |
4633 |
3754 self.macroStartRecAct = EricAction( |
4634 self.macroStartRecAct = EricAction( |
3755 QCoreApplication.translate( |
4635 QCoreApplication.translate("ViewManager", "Start Macro Recording"), |
3756 'ViewManager', 'Start Macro Recording'), |
4636 QCoreApplication.translate("ViewManager", "S&tart Macro Recording"), |
3757 QCoreApplication.translate( |
4637 0, |
3758 'ViewManager', 'S&tart Macro Recording'), |
4638 0, |
3759 0, 0, self.macroActGrp, 'vm_macro_start_recording') |
4639 self.macroActGrp, |
3760 self.macroStartRecAct.setStatusTip(QCoreApplication.translate( |
4640 "vm_macro_start_recording", |
3761 'ViewManager', 'Start Macro Recording')) |
4641 ) |
3762 self.macroStartRecAct.setWhatsThis(QCoreApplication.translate( |
4642 self.macroStartRecAct.setStatusTip( |
3763 'ViewManager', |
4643 QCoreApplication.translate("ViewManager", "Start Macro Recording") |
3764 """<b>Start Macro Recording</b>""" |
4644 ) |
3765 """<p>Start recording editor commands into a new macro.</p>""" |
4645 self.macroStartRecAct.setWhatsThis( |
3766 )) |
4646 QCoreApplication.translate( |
|
4647 "ViewManager", |
|
4648 """<b>Start Macro Recording</b>""" |
|
4649 """<p>Start recording editor commands into a new macro.</p>""", |
|
4650 ) |
|
4651 ) |
3767 self.macroStartRecAct.triggered.connect(self.__macroStartRecording) |
4652 self.macroStartRecAct.triggered.connect(self.__macroStartRecording) |
3768 self.macroActions.append(self.macroStartRecAct) |
4653 self.macroActions.append(self.macroStartRecAct) |
3769 |
4654 |
3770 self.macroStopRecAct = EricAction( |
4655 self.macroStopRecAct = EricAction( |
3771 QCoreApplication.translate('ViewManager', 'Stop Macro Recording'), |
4656 QCoreApplication.translate("ViewManager", "Stop Macro Recording"), |
3772 QCoreApplication.translate('ViewManager', 'Sto&p Macro Recording'), |
4657 QCoreApplication.translate("ViewManager", "Sto&p Macro Recording"), |
3773 0, 0, self.macroActGrp, 'vm_macro_stop_recording') |
4658 0, |
3774 self.macroStopRecAct.setStatusTip(QCoreApplication.translate( |
4659 0, |
3775 'ViewManager', 'Stop Macro Recording')) |
4660 self.macroActGrp, |
3776 self.macroStopRecAct.setWhatsThis(QCoreApplication.translate( |
4661 "vm_macro_stop_recording", |
3777 'ViewManager', |
4662 ) |
3778 """<b>Stop Macro Recording</b>""" |
4663 self.macroStopRecAct.setStatusTip( |
3779 """<p>Stop recording editor commands into a new macro.</p>""" |
4664 QCoreApplication.translate("ViewManager", "Stop Macro Recording") |
3780 )) |
4665 ) |
|
4666 self.macroStopRecAct.setWhatsThis( |
|
4667 QCoreApplication.translate( |
|
4668 "ViewManager", |
|
4669 """<b>Stop Macro Recording</b>""" |
|
4670 """<p>Stop recording editor commands into a new macro.</p>""", |
|
4671 ) |
|
4672 ) |
3781 self.macroStopRecAct.triggered.connect(self.__macroStopRecording) |
4673 self.macroStopRecAct.triggered.connect(self.__macroStopRecording) |
3782 self.macroActions.append(self.macroStopRecAct) |
4674 self.macroActions.append(self.macroStopRecAct) |
3783 |
4675 |
3784 self.macroRunAct = EricAction( |
4676 self.macroRunAct = EricAction( |
3785 QCoreApplication.translate('ViewManager', 'Run Macro'), |
4677 QCoreApplication.translate("ViewManager", "Run Macro"), |
3786 QCoreApplication.translate('ViewManager', '&Run Macro'), |
4678 QCoreApplication.translate("ViewManager", "&Run Macro"), |
3787 0, 0, self.macroActGrp, 'vm_macro_run') |
4679 0, |
3788 self.macroRunAct.setStatusTip(QCoreApplication.translate( |
4680 0, |
3789 'ViewManager', 'Run Macro')) |
4681 self.macroActGrp, |
3790 self.macroRunAct.setWhatsThis(QCoreApplication.translate( |
4682 "vm_macro_run", |
3791 'ViewManager', |
4683 ) |
3792 """<b>Run Macro</b>""" |
4684 self.macroRunAct.setStatusTip( |
3793 """<p>Run a previously recorded editor macro.</p>""" |
4685 QCoreApplication.translate("ViewManager", "Run Macro") |
3794 )) |
4686 ) |
|
4687 self.macroRunAct.setWhatsThis( |
|
4688 QCoreApplication.translate( |
|
4689 "ViewManager", |
|
4690 """<b>Run Macro</b>""" |
|
4691 """<p>Run a previously recorded editor macro.</p>""", |
|
4692 ) |
|
4693 ) |
3795 self.macroRunAct.triggered.connect(self.__macroRun) |
4694 self.macroRunAct.triggered.connect(self.__macroRun) |
3796 self.macroActions.append(self.macroRunAct) |
4695 self.macroActions.append(self.macroRunAct) |
3797 |
4696 |
3798 self.macroDeleteAct = EricAction( |
4697 self.macroDeleteAct = EricAction( |
3799 QCoreApplication.translate('ViewManager', 'Delete Macro'), |
4698 QCoreApplication.translate("ViewManager", "Delete Macro"), |
3800 QCoreApplication.translate('ViewManager', '&Delete Macro'), |
4699 QCoreApplication.translate("ViewManager", "&Delete Macro"), |
3801 0, 0, self.macroActGrp, 'vm_macro_delete') |
4700 0, |
3802 self.macroDeleteAct.setStatusTip(QCoreApplication.translate( |
4701 0, |
3803 'ViewManager', 'Delete Macro')) |
4702 self.macroActGrp, |
3804 self.macroDeleteAct.setWhatsThis(QCoreApplication.translate( |
4703 "vm_macro_delete", |
3805 'ViewManager', |
4704 ) |
3806 """<b>Delete Macro</b>""" |
4705 self.macroDeleteAct.setStatusTip( |
3807 """<p>Delete a previously recorded editor macro.</p>""" |
4706 QCoreApplication.translate("ViewManager", "Delete Macro") |
3808 )) |
4707 ) |
|
4708 self.macroDeleteAct.setWhatsThis( |
|
4709 QCoreApplication.translate( |
|
4710 "ViewManager", |
|
4711 """<b>Delete Macro</b>""" |
|
4712 """<p>Delete a previously recorded editor macro.</p>""", |
|
4713 ) |
|
4714 ) |
3809 self.macroDeleteAct.triggered.connect(self.__macroDelete) |
4715 self.macroDeleteAct.triggered.connect(self.__macroDelete) |
3810 self.macroActions.append(self.macroDeleteAct) |
4716 self.macroActions.append(self.macroDeleteAct) |
3811 |
4717 |
3812 self.macroLoadAct = EricAction( |
4718 self.macroLoadAct = EricAction( |
3813 QCoreApplication.translate('ViewManager', 'Load Macro'), |
4719 QCoreApplication.translate("ViewManager", "Load Macro"), |
3814 QCoreApplication.translate('ViewManager', '&Load Macro'), |
4720 QCoreApplication.translate("ViewManager", "&Load Macro"), |
3815 0, 0, self.macroActGrp, 'vm_macro_load') |
4721 0, |
3816 self.macroLoadAct.setStatusTip(QCoreApplication.translate( |
4722 0, |
3817 'ViewManager', 'Load Macro')) |
4723 self.macroActGrp, |
3818 self.macroLoadAct.setWhatsThis(QCoreApplication.translate( |
4724 "vm_macro_load", |
3819 'ViewManager', |
4725 ) |
3820 """<b>Load Macro</b>""" |
4726 self.macroLoadAct.setStatusTip( |
3821 """<p>Load an editor macro from a file.</p>""" |
4727 QCoreApplication.translate("ViewManager", "Load Macro") |
3822 )) |
4728 ) |
|
4729 self.macroLoadAct.setWhatsThis( |
|
4730 QCoreApplication.translate( |
|
4731 "ViewManager", |
|
4732 """<b>Load Macro</b>""" """<p>Load an editor macro from a file.</p>""", |
|
4733 ) |
|
4734 ) |
3823 self.macroLoadAct.triggered.connect(self.__macroLoad) |
4735 self.macroLoadAct.triggered.connect(self.__macroLoad) |
3824 self.macroActions.append(self.macroLoadAct) |
4736 self.macroActions.append(self.macroLoadAct) |
3825 |
4737 |
3826 self.macroSaveAct = EricAction( |
4738 self.macroSaveAct = EricAction( |
3827 QCoreApplication.translate('ViewManager', 'Save Macro'), |
4739 QCoreApplication.translate("ViewManager", "Save Macro"), |
3828 QCoreApplication.translate('ViewManager', '&Save Macro'), |
4740 QCoreApplication.translate("ViewManager", "&Save Macro"), |
3829 0, 0, self.macroActGrp, 'vm_macro_save') |
4741 0, |
3830 self.macroSaveAct.setStatusTip(QCoreApplication.translate( |
4742 0, |
3831 'ViewManager', 'Save Macro')) |
4743 self.macroActGrp, |
3832 self.macroSaveAct.setWhatsThis(QCoreApplication.translate( |
4744 "vm_macro_save", |
3833 'ViewManager', |
4745 ) |
3834 """<b>Save Macro</b>""" |
4746 self.macroSaveAct.setStatusTip( |
3835 """<p>Save a previously recorded editor macro to a file.</p>""" |
4747 QCoreApplication.translate("ViewManager", "Save Macro") |
3836 )) |
4748 ) |
|
4749 self.macroSaveAct.setWhatsThis( |
|
4750 QCoreApplication.translate( |
|
4751 "ViewManager", |
|
4752 """<b>Save Macro</b>""" |
|
4753 """<p>Save a previously recorded editor macro to a file.</p>""", |
|
4754 ) |
|
4755 ) |
3837 self.macroSaveAct.triggered.connect(self.__macroSave) |
4756 self.macroSaveAct.triggered.connect(self.__macroSave) |
3838 self.macroActions.append(self.macroSaveAct) |
4757 self.macroActions.append(self.macroSaveAct) |
3839 |
4758 |
3840 self.macroActGrp.setEnabled(False) |
4759 self.macroActGrp.setEnabled(False) |
3841 |
4760 |
3842 def initMacroMenu(self): |
4761 def initMacroMenu(self): |
3843 """ |
4762 """ |
3844 Public method to create the Macro menu. |
4763 Public method to create the Macro menu. |
3845 |
4764 |
3846 @return the generated menu |
4765 @return the generated menu |
3847 """ |
4766 """ |
3848 menu = QMenu(QCoreApplication.translate('ViewManager', "&Macros"), |
4767 menu = QMenu(QCoreApplication.translate("ViewManager", "&Macros"), self.ui) |
3849 self.ui) |
|
3850 menu.setTearOffEnabled(True) |
4768 menu.setTearOffEnabled(True) |
3851 menu.addActions(self.macroActGrp.actions()) |
4769 menu.addActions(self.macroActGrp.actions()) |
3852 |
4770 |
3853 return menu |
4771 return menu |
3854 |
4772 |
3855 ##################################################################### |
4773 ##################################################################### |
3856 ## Initialize the bookmark related actions, bookmark menu and toolbar |
4774 ## Initialize the bookmark related actions, bookmark menu and toolbar |
3857 ##################################################################### |
4775 ##################################################################### |
3858 |
4776 |
3859 def __initBookmarkActions(self): |
4777 def __initBookmarkActions(self): |
3860 """ |
4778 """ |
3861 Private method defining the user interface actions for the bookmarks |
4779 Private method defining the user interface actions for the bookmarks |
3862 commands. |
4780 commands. |
3863 """ |
4781 """ |
3864 self.bookmarkActGrp = createActionGroup(self) |
4782 self.bookmarkActGrp = createActionGroup(self) |
3865 |
4783 |
3866 self.bookmarkToggleAct = EricAction( |
4784 self.bookmarkToggleAct = EricAction( |
3867 QCoreApplication.translate('ViewManager', 'Toggle Bookmark'), |
4785 QCoreApplication.translate("ViewManager", "Toggle Bookmark"), |
3868 UI.PixmapCache.getIcon("bookmarkToggle"), |
4786 UI.PixmapCache.getIcon("bookmarkToggle"), |
3869 QCoreApplication.translate('ViewManager', '&Toggle Bookmark'), |
4787 QCoreApplication.translate("ViewManager", "&Toggle Bookmark"), |
3870 QKeySequence(QCoreApplication.translate( |
4788 QKeySequence( |
3871 'ViewManager', "Alt+Ctrl+T", "Bookmark|Toggle")), |
4789 QCoreApplication.translate( |
3872 0, |
4790 "ViewManager", "Alt+Ctrl+T", "Bookmark|Toggle" |
3873 self.bookmarkActGrp, 'vm_bookmark_toggle') |
4791 ) |
3874 self.bookmarkToggleAct.setStatusTip(QCoreApplication.translate( |
4792 ), |
3875 'ViewManager', 'Toggle Bookmark')) |
4793 0, |
3876 self.bookmarkToggleAct.setWhatsThis(QCoreApplication.translate( |
4794 self.bookmarkActGrp, |
3877 'ViewManager', |
4795 "vm_bookmark_toggle", |
3878 """<b>Toggle Bookmark</b>""" |
4796 ) |
3879 """<p>Toggle a bookmark at the current line of the current""" |
4797 self.bookmarkToggleAct.setStatusTip( |
3880 """ editor.</p>""" |
4798 QCoreApplication.translate("ViewManager", "Toggle Bookmark") |
3881 )) |
4799 ) |
|
4800 self.bookmarkToggleAct.setWhatsThis( |
|
4801 QCoreApplication.translate( |
|
4802 "ViewManager", |
|
4803 """<b>Toggle Bookmark</b>""" |
|
4804 """<p>Toggle a bookmark at the current line of the current""" |
|
4805 """ editor.</p>""", |
|
4806 ) |
|
4807 ) |
3882 self.bookmarkToggleAct.triggered.connect(self.__toggleBookmark) |
4808 self.bookmarkToggleAct.triggered.connect(self.__toggleBookmark) |
3883 self.bookmarkActions.append(self.bookmarkToggleAct) |
4809 self.bookmarkActions.append(self.bookmarkToggleAct) |
3884 |
4810 |
3885 self.bookmarkNextAct = EricAction( |
4811 self.bookmarkNextAct = EricAction( |
3886 QCoreApplication.translate('ViewManager', 'Next Bookmark'), |
4812 QCoreApplication.translate("ViewManager", "Next Bookmark"), |
3887 UI.PixmapCache.getIcon("bookmarkNext"), |
4813 UI.PixmapCache.getIcon("bookmarkNext"), |
3888 QCoreApplication.translate('ViewManager', '&Next Bookmark'), |
4814 QCoreApplication.translate("ViewManager", "&Next Bookmark"), |
3889 QKeySequence(QCoreApplication.translate( |
4815 QKeySequence( |
3890 'ViewManager', "Ctrl+PgDown", "Bookmark|Next")), |
4816 QCoreApplication.translate( |
3891 0, |
4817 "ViewManager", "Ctrl+PgDown", "Bookmark|Next" |
3892 self.bookmarkActGrp, 'vm_bookmark_next') |
4818 ) |
3893 self.bookmarkNextAct.setStatusTip(QCoreApplication.translate( |
4819 ), |
3894 'ViewManager', 'Next Bookmark')) |
4820 0, |
3895 self.bookmarkNextAct.setWhatsThis(QCoreApplication.translate( |
4821 self.bookmarkActGrp, |
3896 'ViewManager', |
4822 "vm_bookmark_next", |
3897 """<b>Next Bookmark</b>""" |
4823 ) |
3898 """<p>Go to next bookmark of the current editor.</p>""" |
4824 self.bookmarkNextAct.setStatusTip( |
3899 )) |
4825 QCoreApplication.translate("ViewManager", "Next Bookmark") |
|
4826 ) |
|
4827 self.bookmarkNextAct.setWhatsThis( |
|
4828 QCoreApplication.translate( |
|
4829 "ViewManager", |
|
4830 """<b>Next Bookmark</b>""" |
|
4831 """<p>Go to next bookmark of the current editor.</p>""", |
|
4832 ) |
|
4833 ) |
3900 self.bookmarkNextAct.triggered.connect(self.__nextBookmark) |
4834 self.bookmarkNextAct.triggered.connect(self.__nextBookmark) |
3901 self.bookmarkActions.append(self.bookmarkNextAct) |
4835 self.bookmarkActions.append(self.bookmarkNextAct) |
3902 |
4836 |
3903 self.bookmarkPreviousAct = EricAction( |
4837 self.bookmarkPreviousAct = EricAction( |
3904 QCoreApplication.translate('ViewManager', 'Previous Bookmark'), |
4838 QCoreApplication.translate("ViewManager", "Previous Bookmark"), |
3905 UI.PixmapCache.getIcon("bookmarkPrevious"), |
4839 UI.PixmapCache.getIcon("bookmarkPrevious"), |
3906 QCoreApplication.translate('ViewManager', '&Previous Bookmark'), |
4840 QCoreApplication.translate("ViewManager", "&Previous Bookmark"), |
3907 QKeySequence(QCoreApplication.translate( |
4841 QKeySequence( |
3908 'ViewManager', "Ctrl+PgUp", "Bookmark|Previous")), |
4842 QCoreApplication.translate( |
3909 0, |
4843 "ViewManager", "Ctrl+PgUp", "Bookmark|Previous" |
3910 self.bookmarkActGrp, 'vm_bookmark_previous') |
4844 ) |
3911 self.bookmarkPreviousAct.setStatusTip(QCoreApplication.translate( |
4845 ), |
3912 'ViewManager', 'Previous Bookmark')) |
4846 0, |
3913 self.bookmarkPreviousAct.setWhatsThis(QCoreApplication.translate( |
4847 self.bookmarkActGrp, |
3914 'ViewManager', |
4848 "vm_bookmark_previous", |
3915 """<b>Previous Bookmark</b>""" |
4849 ) |
3916 """<p>Go to previous bookmark of the current editor.</p>""" |
4850 self.bookmarkPreviousAct.setStatusTip( |
3917 )) |
4851 QCoreApplication.translate("ViewManager", "Previous Bookmark") |
|
4852 ) |
|
4853 self.bookmarkPreviousAct.setWhatsThis( |
|
4854 QCoreApplication.translate( |
|
4855 "ViewManager", |
|
4856 """<b>Previous Bookmark</b>""" |
|
4857 """<p>Go to previous bookmark of the current editor.</p>""", |
|
4858 ) |
|
4859 ) |
3918 self.bookmarkPreviousAct.triggered.connect(self.__previousBookmark) |
4860 self.bookmarkPreviousAct.triggered.connect(self.__previousBookmark) |
3919 self.bookmarkActions.append(self.bookmarkPreviousAct) |
4861 self.bookmarkActions.append(self.bookmarkPreviousAct) |
3920 |
4862 |
3921 self.bookmarkClearAct = EricAction( |
4863 self.bookmarkClearAct = EricAction( |
3922 QCoreApplication.translate('ViewManager', 'Clear Bookmarks'), |
4864 QCoreApplication.translate("ViewManager", "Clear Bookmarks"), |
3923 QCoreApplication.translate('ViewManager', '&Clear Bookmarks'), |
4865 QCoreApplication.translate("ViewManager", "&Clear Bookmarks"), |
3924 QKeySequence(QCoreApplication.translate( |
4866 QKeySequence( |
3925 'ViewManager', "Alt+Ctrl+C", "Bookmark|Clear")), |
4867 QCoreApplication.translate( |
3926 0, |
4868 "ViewManager", "Alt+Ctrl+C", "Bookmark|Clear" |
3927 self.bookmarkActGrp, 'vm_bookmark_clear') |
4869 ) |
3928 self.bookmarkClearAct.setStatusTip(QCoreApplication.translate( |
4870 ), |
3929 'ViewManager', 'Clear Bookmarks')) |
4871 0, |
3930 self.bookmarkClearAct.setWhatsThis(QCoreApplication.translate( |
4872 self.bookmarkActGrp, |
3931 'ViewManager', |
4873 "vm_bookmark_clear", |
3932 """<b>Clear Bookmarks</b>""" |
4874 ) |
3933 """<p>Clear bookmarks of all editors.</p>""" |
4875 self.bookmarkClearAct.setStatusTip( |
3934 )) |
4876 QCoreApplication.translate("ViewManager", "Clear Bookmarks") |
|
4877 ) |
|
4878 self.bookmarkClearAct.setWhatsThis( |
|
4879 QCoreApplication.translate( |
|
4880 "ViewManager", |
|
4881 """<b>Clear Bookmarks</b>""" |
|
4882 """<p>Clear bookmarks of all editors.</p>""", |
|
4883 ) |
|
4884 ) |
3935 self.bookmarkClearAct.triggered.connect(self.__clearAllBookmarks) |
4885 self.bookmarkClearAct.triggered.connect(self.__clearAllBookmarks) |
3936 self.bookmarkActions.append(self.bookmarkClearAct) |
4886 self.bookmarkActions.append(self.bookmarkClearAct) |
3937 |
4887 |
3938 self.syntaxErrorGotoAct = EricAction( |
4888 self.syntaxErrorGotoAct = EricAction( |
3939 QCoreApplication.translate('ViewManager', 'Goto Syntax Error'), |
4889 QCoreApplication.translate("ViewManager", "Goto Syntax Error"), |
3940 UI.PixmapCache.getIcon("syntaxErrorGoto"), |
4890 UI.PixmapCache.getIcon("syntaxErrorGoto"), |
3941 QCoreApplication.translate('ViewManager', '&Goto Syntax Error'), |
4891 QCoreApplication.translate("ViewManager", "&Goto Syntax Error"), |
3942 0, 0, |
4892 0, |
3943 self.bookmarkActGrp, 'vm_syntaxerror_goto') |
4893 0, |
3944 self.syntaxErrorGotoAct.setStatusTip(QCoreApplication.translate( |
4894 self.bookmarkActGrp, |
3945 'ViewManager', 'Goto Syntax Error')) |
4895 "vm_syntaxerror_goto", |
3946 self.syntaxErrorGotoAct.setWhatsThis(QCoreApplication.translate( |
4896 ) |
3947 'ViewManager', |
4897 self.syntaxErrorGotoAct.setStatusTip( |
3948 """<b>Goto Syntax Error</b>""" |
4898 QCoreApplication.translate("ViewManager", "Goto Syntax Error") |
3949 """<p>Go to next syntax error of the current editor.</p>""" |
4899 ) |
3950 )) |
4900 self.syntaxErrorGotoAct.setWhatsThis( |
|
4901 QCoreApplication.translate( |
|
4902 "ViewManager", |
|
4903 """<b>Goto Syntax Error</b>""" |
|
4904 """<p>Go to next syntax error of the current editor.</p>""", |
|
4905 ) |
|
4906 ) |
3951 self.syntaxErrorGotoAct.triggered.connect(self.__gotoSyntaxError) |
4907 self.syntaxErrorGotoAct.triggered.connect(self.__gotoSyntaxError) |
3952 self.bookmarkActions.append(self.syntaxErrorGotoAct) |
4908 self.bookmarkActions.append(self.syntaxErrorGotoAct) |
3953 |
4909 |
3954 self.syntaxErrorClearAct = EricAction( |
4910 self.syntaxErrorClearAct = EricAction( |
3955 QCoreApplication.translate('ViewManager', 'Clear Syntax Errors'), |
4911 QCoreApplication.translate("ViewManager", "Clear Syntax Errors"), |
3956 QCoreApplication.translate('ViewManager', 'Clear &Syntax Errors'), |
4912 QCoreApplication.translate("ViewManager", "Clear &Syntax Errors"), |
3957 0, 0, |
4913 0, |
3958 self.bookmarkActGrp, 'vm_syntaxerror_clear') |
4914 0, |
3959 self.syntaxErrorClearAct.setStatusTip(QCoreApplication.translate( |
4915 self.bookmarkActGrp, |
3960 'ViewManager', 'Clear Syntax Errors')) |
4916 "vm_syntaxerror_clear", |
3961 self.syntaxErrorClearAct.setWhatsThis(QCoreApplication.translate( |
4917 ) |
3962 'ViewManager', |
4918 self.syntaxErrorClearAct.setStatusTip( |
3963 """<b>Clear Syntax Errors</b>""" |
4919 QCoreApplication.translate("ViewManager", "Clear Syntax Errors") |
3964 """<p>Clear syntax errors of all editors.</p>""" |
4920 ) |
3965 )) |
4921 self.syntaxErrorClearAct.setWhatsThis( |
3966 self.syntaxErrorClearAct.triggered.connect( |
4922 QCoreApplication.translate( |
3967 self.__clearAllSyntaxErrors) |
4923 "ViewManager", |
|
4924 """<b>Clear Syntax Errors</b>""" |
|
4925 """<p>Clear syntax errors of all editors.</p>""", |
|
4926 ) |
|
4927 ) |
|
4928 self.syntaxErrorClearAct.triggered.connect(self.__clearAllSyntaxErrors) |
3968 self.bookmarkActions.append(self.syntaxErrorClearAct) |
4929 self.bookmarkActions.append(self.syntaxErrorClearAct) |
3969 |
4930 |
3970 self.warningsNextAct = EricAction( |
4931 self.warningsNextAct = EricAction( |
3971 QCoreApplication.translate('ViewManager', 'Next warning message'), |
4932 QCoreApplication.translate("ViewManager", "Next warning message"), |
3972 UI.PixmapCache.getIcon("warningNext"), |
4933 UI.PixmapCache.getIcon("warningNext"), |
3973 QCoreApplication.translate('ViewManager', '&Next warning message'), |
4934 QCoreApplication.translate("ViewManager", "&Next warning message"), |
3974 0, 0, |
4935 0, |
3975 self.bookmarkActGrp, 'vm_warning_next') |
4936 0, |
3976 self.warningsNextAct.setStatusTip(QCoreApplication.translate( |
4937 self.bookmarkActGrp, |
3977 'ViewManager', 'Next warning message')) |
4938 "vm_warning_next", |
3978 self.warningsNextAct.setWhatsThis(QCoreApplication.translate( |
4939 ) |
3979 'ViewManager', |
4940 self.warningsNextAct.setStatusTip( |
3980 """<b>Next warning message</b>""" |
4941 QCoreApplication.translate("ViewManager", "Next warning message") |
3981 """<p>Go to next line of the current editor""" |
4942 ) |
3982 """ having a pyflakes warning.</p>""" |
4943 self.warningsNextAct.setWhatsThis( |
3983 )) |
4944 QCoreApplication.translate( |
|
4945 "ViewManager", |
|
4946 """<b>Next warning message</b>""" |
|
4947 """<p>Go to next line of the current editor""" |
|
4948 """ having a pyflakes warning.</p>""", |
|
4949 ) |
|
4950 ) |
3984 self.warningsNextAct.triggered.connect(self.__nextWarning) |
4951 self.warningsNextAct.triggered.connect(self.__nextWarning) |
3985 self.bookmarkActions.append(self.warningsNextAct) |
4952 self.bookmarkActions.append(self.warningsNextAct) |
3986 |
4953 |
3987 self.warningsPreviousAct = EricAction( |
4954 self.warningsPreviousAct = EricAction( |
3988 QCoreApplication.translate( |
4955 QCoreApplication.translate("ViewManager", "Previous warning message"), |
3989 'ViewManager', 'Previous warning message'), |
|
3990 UI.PixmapCache.getIcon("warningPrev"), |
4956 UI.PixmapCache.getIcon("warningPrev"), |
3991 QCoreApplication.translate( |
4957 QCoreApplication.translate("ViewManager", "&Previous warning message"), |
3992 'ViewManager', '&Previous warning message'), |
4958 0, |
3993 0, 0, |
4959 0, |
3994 self.bookmarkActGrp, 'vm_warning_previous') |
4960 self.bookmarkActGrp, |
3995 self.warningsPreviousAct.setStatusTip(QCoreApplication.translate( |
4961 "vm_warning_previous", |
3996 'ViewManager', 'Previous warning message')) |
4962 ) |
3997 self.warningsPreviousAct.setWhatsThis(QCoreApplication.translate( |
4963 self.warningsPreviousAct.setStatusTip( |
3998 'ViewManager', |
4964 QCoreApplication.translate("ViewManager", "Previous warning message") |
3999 """<b>Previous warning message</b>""" |
4965 ) |
4000 """<p>Go to previous line of the current editor""" |
4966 self.warningsPreviousAct.setWhatsThis( |
4001 """ having a pyflakes warning.</p>""" |
4967 QCoreApplication.translate( |
4002 )) |
4968 "ViewManager", |
|
4969 """<b>Previous warning message</b>""" |
|
4970 """<p>Go to previous line of the current editor""" |
|
4971 """ having a pyflakes warning.</p>""", |
|
4972 ) |
|
4973 ) |
4003 self.warningsPreviousAct.triggered.connect(self.__previousWarning) |
4974 self.warningsPreviousAct.triggered.connect(self.__previousWarning) |
4004 self.bookmarkActions.append(self.warningsPreviousAct) |
4975 self.bookmarkActions.append(self.warningsPreviousAct) |
4005 |
4976 |
4006 self.warningsClearAct = EricAction( |
4977 self.warningsClearAct = EricAction( |
4007 QCoreApplication.translate( |
4978 QCoreApplication.translate("ViewManager", "Clear Warning Messages"), |
4008 'ViewManager', 'Clear Warning Messages'), |
4979 QCoreApplication.translate("ViewManager", "Clear &Warning Messages"), |
4009 QCoreApplication.translate( |
4980 0, |
4010 'ViewManager', 'Clear &Warning Messages'), |
4981 0, |
4011 0, 0, |
4982 self.bookmarkActGrp, |
4012 self.bookmarkActGrp, 'vm_warnings_clear') |
4983 "vm_warnings_clear", |
4013 self.warningsClearAct.setStatusTip(QCoreApplication.translate( |
4984 ) |
4014 'ViewManager', 'Clear Warning Messages')) |
4985 self.warningsClearAct.setStatusTip( |
4015 self.warningsClearAct.setWhatsThis(QCoreApplication.translate( |
4986 QCoreApplication.translate("ViewManager", "Clear Warning Messages") |
4016 'ViewManager', |
4987 ) |
4017 """<b>Clear Warning Messages</b>""" |
4988 self.warningsClearAct.setWhatsThis( |
4018 """<p>Clear pyflakes warning messages of all editors.</p>""" |
4989 QCoreApplication.translate( |
4019 )) |
4990 "ViewManager", |
|
4991 """<b>Clear Warning Messages</b>""" |
|
4992 """<p>Clear pyflakes warning messages of all editors.</p>""", |
|
4993 ) |
|
4994 ) |
4020 self.warningsClearAct.triggered.connect(self.__clearAllWarnings) |
4995 self.warningsClearAct.triggered.connect(self.__clearAllWarnings) |
4021 self.bookmarkActions.append(self.warningsClearAct) |
4996 self.bookmarkActions.append(self.warningsClearAct) |
4022 |
4997 |
4023 self.notcoveredNextAct = EricAction( |
4998 self.notcoveredNextAct = EricAction( |
4024 QCoreApplication.translate('ViewManager', 'Next uncovered line'), |
4999 QCoreApplication.translate("ViewManager", "Next uncovered line"), |
4025 UI.PixmapCache.getIcon("notcoveredNext"), |
5000 UI.PixmapCache.getIcon("notcoveredNext"), |
4026 QCoreApplication.translate('ViewManager', '&Next uncovered line'), |
5001 QCoreApplication.translate("ViewManager", "&Next uncovered line"), |
4027 0, 0, |
5002 0, |
4028 self.bookmarkActGrp, 'vm_uncovered_next') |
5003 0, |
4029 self.notcoveredNextAct.setStatusTip(QCoreApplication.translate( |
5004 self.bookmarkActGrp, |
4030 'ViewManager', 'Next uncovered line')) |
5005 "vm_uncovered_next", |
4031 self.notcoveredNextAct.setWhatsThis(QCoreApplication.translate( |
5006 ) |
4032 'ViewManager', |
5007 self.notcoveredNextAct.setStatusTip( |
4033 """<b>Next uncovered line</b>""" |
5008 QCoreApplication.translate("ViewManager", "Next uncovered line") |
4034 """<p>Go to next line of the current editor marked as not""" |
5009 ) |
4035 """ covered.</p>""" |
5010 self.notcoveredNextAct.setWhatsThis( |
4036 )) |
5011 QCoreApplication.translate( |
|
5012 "ViewManager", |
|
5013 """<b>Next uncovered line</b>""" |
|
5014 """<p>Go to next line of the current editor marked as not""" |
|
5015 """ covered.</p>""", |
|
5016 ) |
|
5017 ) |
4037 self.notcoveredNextAct.triggered.connect(self.__nextUncovered) |
5018 self.notcoveredNextAct.triggered.connect(self.__nextUncovered) |
4038 self.bookmarkActions.append(self.notcoveredNextAct) |
5019 self.bookmarkActions.append(self.notcoveredNextAct) |
4039 |
5020 |
4040 self.notcoveredPreviousAct = EricAction( |
5021 self.notcoveredPreviousAct = EricAction( |
4041 QCoreApplication.translate( |
5022 QCoreApplication.translate("ViewManager", "Previous uncovered line"), |
4042 'ViewManager', 'Previous uncovered line'), |
|
4043 UI.PixmapCache.getIcon("notcoveredPrev"), |
5023 UI.PixmapCache.getIcon("notcoveredPrev"), |
4044 QCoreApplication.translate( |
5024 QCoreApplication.translate("ViewManager", "&Previous uncovered line"), |
4045 'ViewManager', '&Previous uncovered line'), |
5025 0, |
4046 0, 0, |
5026 0, |
4047 self.bookmarkActGrp, 'vm_uncovered_previous') |
5027 self.bookmarkActGrp, |
4048 self.notcoveredPreviousAct.setStatusTip(QCoreApplication.translate( |
5028 "vm_uncovered_previous", |
4049 'ViewManager', 'Previous uncovered line')) |
5029 ) |
4050 self.notcoveredPreviousAct.setWhatsThis(QCoreApplication.translate( |
5030 self.notcoveredPreviousAct.setStatusTip( |
4051 'ViewManager', |
5031 QCoreApplication.translate("ViewManager", "Previous uncovered line") |
4052 """<b>Previous uncovered line</b>""" |
5032 ) |
4053 """<p>Go to previous line of the current editor marked""" |
5033 self.notcoveredPreviousAct.setWhatsThis( |
4054 """ as not covered.</p>""" |
5034 QCoreApplication.translate( |
4055 )) |
5035 "ViewManager", |
4056 self.notcoveredPreviousAct.triggered.connect( |
5036 """<b>Previous uncovered line</b>""" |
4057 self.__previousUncovered) |
5037 """<p>Go to previous line of the current editor marked""" |
|
5038 """ as not covered.</p>""", |
|
5039 ) |
|
5040 ) |
|
5041 self.notcoveredPreviousAct.triggered.connect(self.__previousUncovered) |
4058 self.bookmarkActions.append(self.notcoveredPreviousAct) |
5042 self.bookmarkActions.append(self.notcoveredPreviousAct) |
4059 |
5043 |
4060 self.taskNextAct = EricAction( |
5044 self.taskNextAct = EricAction( |
4061 QCoreApplication.translate('ViewManager', 'Next Task'), |
5045 QCoreApplication.translate("ViewManager", "Next Task"), |
4062 UI.PixmapCache.getIcon("taskNext"), |
5046 UI.PixmapCache.getIcon("taskNext"), |
4063 QCoreApplication.translate('ViewManager', '&Next Task'), |
5047 QCoreApplication.translate("ViewManager", "&Next Task"), |
4064 0, 0, |
5048 0, |
4065 self.bookmarkActGrp, 'vm_task_next') |
5049 0, |
4066 self.taskNextAct.setStatusTip(QCoreApplication.translate( |
5050 self.bookmarkActGrp, |
4067 'ViewManager', 'Next Task')) |
5051 "vm_task_next", |
4068 self.taskNextAct.setWhatsThis(QCoreApplication.translate( |
5052 ) |
4069 'ViewManager', |
5053 self.taskNextAct.setStatusTip( |
4070 """<b>Next Task</b>""" |
5054 QCoreApplication.translate("ViewManager", "Next Task") |
4071 """<p>Go to next line of the current editor having a task.</p>""" |
5055 ) |
4072 )) |
5056 self.taskNextAct.setWhatsThis( |
|
5057 QCoreApplication.translate( |
|
5058 "ViewManager", |
|
5059 """<b>Next Task</b>""" |
|
5060 """<p>Go to next line of the current editor having a task.</p>""", |
|
5061 ) |
|
5062 ) |
4073 self.taskNextAct.triggered.connect(self.__nextTask) |
5063 self.taskNextAct.triggered.connect(self.__nextTask) |
4074 self.bookmarkActions.append(self.taskNextAct) |
5064 self.bookmarkActions.append(self.taskNextAct) |
4075 |
5065 |
4076 self.taskPreviousAct = EricAction( |
5066 self.taskPreviousAct = EricAction( |
4077 QCoreApplication.translate('ViewManager', 'Previous Task'), |
5067 QCoreApplication.translate("ViewManager", "Previous Task"), |
4078 UI.PixmapCache.getIcon("taskPrev"), |
5068 UI.PixmapCache.getIcon("taskPrev"), |
4079 QCoreApplication.translate( |
5069 QCoreApplication.translate("ViewManager", "&Previous Task"), |
4080 'ViewManager', '&Previous Task'), |
5070 0, |
4081 0, 0, |
5071 0, |
4082 self.bookmarkActGrp, 'vm_task_previous') |
5072 self.bookmarkActGrp, |
4083 self.taskPreviousAct.setStatusTip(QCoreApplication.translate( |
5073 "vm_task_previous", |
4084 'ViewManager', 'Previous Task')) |
5074 ) |
4085 self.taskPreviousAct.setWhatsThis(QCoreApplication.translate( |
5075 self.taskPreviousAct.setStatusTip( |
4086 'ViewManager', |
5076 QCoreApplication.translate("ViewManager", "Previous Task") |
4087 """<b>Previous Task</b>""" |
5077 ) |
4088 """<p>Go to previous line of the current editor having a""" |
5078 self.taskPreviousAct.setWhatsThis( |
4089 """ task.</p>""" |
5079 QCoreApplication.translate( |
4090 )) |
5080 "ViewManager", |
|
5081 """<b>Previous Task</b>""" |
|
5082 """<p>Go to previous line of the current editor having a""" |
|
5083 """ task.</p>""", |
|
5084 ) |
|
5085 ) |
4091 self.taskPreviousAct.triggered.connect(self.__previousTask) |
5086 self.taskPreviousAct.triggered.connect(self.__previousTask) |
4092 self.bookmarkActions.append(self.taskPreviousAct) |
5087 self.bookmarkActions.append(self.taskPreviousAct) |
4093 |
5088 |
4094 self.changeNextAct = EricAction( |
5089 self.changeNextAct = EricAction( |
4095 QCoreApplication.translate('ViewManager', 'Next Change'), |
5090 QCoreApplication.translate("ViewManager", "Next Change"), |
4096 UI.PixmapCache.getIcon("changeNext"), |
5091 UI.PixmapCache.getIcon("changeNext"), |
4097 QCoreApplication.translate('ViewManager', '&Next Change'), |
5092 QCoreApplication.translate("ViewManager", "&Next Change"), |
4098 0, 0, |
5093 0, |
4099 self.bookmarkActGrp, 'vm_change_next') |
5094 0, |
4100 self.changeNextAct.setStatusTip(QCoreApplication.translate( |
5095 self.bookmarkActGrp, |
4101 'ViewManager', 'Next Change')) |
5096 "vm_change_next", |
4102 self.changeNextAct.setWhatsThis(QCoreApplication.translate( |
5097 ) |
4103 'ViewManager', |
5098 self.changeNextAct.setStatusTip( |
4104 """<b>Next Change</b>""" |
5099 QCoreApplication.translate("ViewManager", "Next Change") |
4105 """<p>Go to next line of the current editor having a change""" |
5100 ) |
4106 """ marker.</p>""" |
5101 self.changeNextAct.setWhatsThis( |
4107 )) |
5102 QCoreApplication.translate( |
|
5103 "ViewManager", |
|
5104 """<b>Next Change</b>""" |
|
5105 """<p>Go to next line of the current editor having a change""" |
|
5106 """ marker.</p>""", |
|
5107 ) |
|
5108 ) |
4108 self.changeNextAct.triggered.connect(self.__nextChange) |
5109 self.changeNextAct.triggered.connect(self.__nextChange) |
4109 self.bookmarkActions.append(self.changeNextAct) |
5110 self.bookmarkActions.append(self.changeNextAct) |
4110 |
5111 |
4111 self.changePreviousAct = EricAction( |
5112 self.changePreviousAct = EricAction( |
4112 QCoreApplication.translate('ViewManager', 'Previous Change'), |
5113 QCoreApplication.translate("ViewManager", "Previous Change"), |
4113 UI.PixmapCache.getIcon("changePrev"), |
5114 UI.PixmapCache.getIcon("changePrev"), |
4114 QCoreApplication.translate( |
5115 QCoreApplication.translate("ViewManager", "&Previous Change"), |
4115 'ViewManager', '&Previous Change'), |
5116 0, |
4116 0, 0, |
5117 0, |
4117 self.bookmarkActGrp, 'vm_change_previous') |
5118 self.bookmarkActGrp, |
4118 self.changePreviousAct.setStatusTip(QCoreApplication.translate( |
5119 "vm_change_previous", |
4119 'ViewManager', 'Previous Change')) |
5120 ) |
4120 self.changePreviousAct.setWhatsThis(QCoreApplication.translate( |
5121 self.changePreviousAct.setStatusTip( |
4121 'ViewManager', |
5122 QCoreApplication.translate("ViewManager", "Previous Change") |
4122 """<b>Previous Change</b>""" |
5123 ) |
4123 """<p>Go to previous line of the current editor having""" |
5124 self.changePreviousAct.setWhatsThis( |
4124 """ a change marker.</p>""" |
5125 QCoreApplication.translate( |
4125 )) |
5126 "ViewManager", |
|
5127 """<b>Previous Change</b>""" |
|
5128 """<p>Go to previous line of the current editor having""" |
|
5129 """ a change marker.</p>""", |
|
5130 ) |
|
5131 ) |
4126 self.changePreviousAct.triggered.connect(self.__previousChange) |
5132 self.changePreviousAct.triggered.connect(self.__previousChange) |
4127 self.bookmarkActions.append(self.changePreviousAct) |
5133 self.bookmarkActions.append(self.changePreviousAct) |
4128 |
5134 |
4129 self.bookmarkActGrp.setEnabled(False) |
5135 self.bookmarkActGrp.setEnabled(False) |
4130 |
5136 |
4131 def initBookmarkMenu(self): |
5137 def initBookmarkMenu(self): |
4132 """ |
5138 """ |
4133 Public method to create the Bookmark menu. |
5139 Public method to create the Bookmark menu. |
4134 |
5140 |
4135 @return the generated menu |
5141 @return the generated menu |
4136 """ |
5142 """ |
4137 menu = QMenu(QCoreApplication.translate('ViewManager', '&Bookmarks'), |
5143 menu = QMenu(QCoreApplication.translate("ViewManager", "&Bookmarks"), self.ui) |
4138 self.ui) |
|
4139 self.bookmarksMenu = QMenu( |
5144 self.bookmarksMenu = QMenu( |
4140 QCoreApplication.translate('ViewManager', '&Bookmarks'), |
5145 QCoreApplication.translate("ViewManager", "&Bookmarks"), menu |
4141 menu) |
5146 ) |
4142 menu.setTearOffEnabled(True) |
5147 menu.setTearOffEnabled(True) |
4143 |
5148 |
4144 menu.addAction(self.bookmarkToggleAct) |
5149 menu.addAction(self.bookmarkToggleAct) |
4145 menu.addAction(self.bookmarkNextAct) |
5150 menu.addAction(self.bookmarkNextAct) |
4146 menu.addAction(self.bookmarkPreviousAct) |
5151 menu.addAction(self.bookmarkPreviousAct) |
4147 menu.addAction(self.bookmarkClearAct) |
5152 menu.addAction(self.bookmarkClearAct) |
4148 menu.addSeparator() |
5153 menu.addSeparator() |