626 """ |
626 """ |
627 Private method defining the user interface actions for file handling. |
627 Private method defining the user interface actions for file handling. |
628 """ |
628 """ |
629 self.newAct = E5Action( |
629 self.newAct = E5Action( |
630 QCoreApplication.translate('ViewManager', 'New'), |
630 QCoreApplication.translate('ViewManager', 'New'), |
631 UI.PixmapCache.getIcon("new.png"), |
631 UI.PixmapCache.getIcon("new"), |
632 QCoreApplication.translate('ViewManager', '&New'), |
632 QCoreApplication.translate('ViewManager', '&New'), |
633 QKeySequence( |
633 QKeySequence( |
634 QCoreApplication.translate('ViewManager', "Ctrl+N", |
634 QCoreApplication.translate('ViewManager', "Ctrl+N", |
635 "File|New")), |
635 "File|New")), |
636 0, self, 'vm_file_new') |
636 0, self, 'vm_file_new') |
645 self.newAct.triggered.connect(self.newEditor) |
645 self.newAct.triggered.connect(self.newEditor) |
646 self.fileActions.append(self.newAct) |
646 self.fileActions.append(self.newAct) |
647 |
647 |
648 self.openAct = E5Action( |
648 self.openAct = E5Action( |
649 QCoreApplication.translate('ViewManager', 'Open'), |
649 QCoreApplication.translate('ViewManager', 'Open'), |
650 UI.PixmapCache.getIcon("open.png"), |
650 UI.PixmapCache.getIcon("open"), |
651 QCoreApplication.translate('ViewManager', '&Open...'), |
651 QCoreApplication.translate('ViewManager', '&Open...'), |
652 QKeySequence( |
652 QKeySequence( |
653 QCoreApplication.translate('ViewManager', "Ctrl+O", |
653 QCoreApplication.translate('ViewManager', "Ctrl+O", |
654 "File|Open")), |
654 "File|Open")), |
655 0, self, 'vm_file_open') |
655 0, self, 'vm_file_open') |
666 |
666 |
667 self.closeActGrp = createActionGroup(self) |
667 self.closeActGrp = createActionGroup(self) |
668 |
668 |
669 self.closeAct = E5Action( |
669 self.closeAct = E5Action( |
670 QCoreApplication.translate('ViewManager', 'Close'), |
670 QCoreApplication.translate('ViewManager', 'Close'), |
671 UI.PixmapCache.getIcon("closeEditor.png"), |
671 UI.PixmapCache.getIcon("closeEditor"), |
672 QCoreApplication.translate('ViewManager', '&Close'), |
672 QCoreApplication.translate('ViewManager', '&Close'), |
673 QKeySequence( |
673 QKeySequence( |
674 QCoreApplication.translate('ViewManager', "Ctrl+W", |
674 QCoreApplication.translate('ViewManager', "Ctrl+W", |
675 "File|Close")), |
675 "File|Close")), |
676 0, self.closeActGrp, 'vm_file_close') |
676 0, self.closeActGrp, 'vm_file_close') |
704 |
704 |
705 self.saveActGrp = createActionGroup(self) |
705 self.saveActGrp = createActionGroup(self) |
706 |
706 |
707 self.saveAct = E5Action( |
707 self.saveAct = E5Action( |
708 QCoreApplication.translate('ViewManager', 'Save'), |
708 QCoreApplication.translate('ViewManager', 'Save'), |
709 UI.PixmapCache.getIcon("fileSave.png"), |
709 UI.PixmapCache.getIcon("fileSave"), |
710 QCoreApplication.translate('ViewManager', '&Save'), |
710 QCoreApplication.translate('ViewManager', '&Save'), |
711 QKeySequence(QCoreApplication.translate( |
711 QKeySequence(QCoreApplication.translate( |
712 'ViewManager', "Ctrl+S", "File|Save")), |
712 'ViewManager', "Ctrl+S", "File|Save")), |
713 0, self.saveActGrp, 'vm_file_save') |
713 0, self.saveActGrp, 'vm_file_save') |
714 self.saveAct.setStatusTip( |
714 self.saveAct.setStatusTip( |
721 self.saveAct.triggered.connect(self.saveCurrentEditor) |
721 self.saveAct.triggered.connect(self.saveCurrentEditor) |
722 self.fileActions.append(self.saveAct) |
722 self.fileActions.append(self.saveAct) |
723 |
723 |
724 self.saveAsAct = E5Action( |
724 self.saveAsAct = E5Action( |
725 QCoreApplication.translate('ViewManager', 'Save as'), |
725 QCoreApplication.translate('ViewManager', 'Save as'), |
726 UI.PixmapCache.getIcon("fileSaveAs.png"), |
726 UI.PixmapCache.getIcon("fileSaveAs"), |
727 QCoreApplication.translate('ViewManager', 'Save &as...'), |
727 QCoreApplication.translate('ViewManager', 'Save &as...'), |
728 QKeySequence(QCoreApplication.translate( |
728 QKeySequence(QCoreApplication.translate( |
729 'ViewManager', "Shift+Ctrl+S", "File|Save As")), |
729 'ViewManager', "Shift+Ctrl+S", "File|Save As")), |
730 0, self.saveActGrp, 'vm_file_save_as') |
730 0, self.saveActGrp, 'vm_file_save_as') |
731 self.saveAsAct.setStatusTip(QCoreApplication.translate( |
731 self.saveAsAct.setStatusTip(QCoreApplication.translate( |
739 self.saveAsAct.triggered.connect(self.saveAsCurrentEditor) |
739 self.saveAsAct.triggered.connect(self.saveAsCurrentEditor) |
740 self.fileActions.append(self.saveAsAct) |
740 self.fileActions.append(self.saveAsAct) |
741 |
741 |
742 self.saveCopyAct = E5Action( |
742 self.saveCopyAct = E5Action( |
743 QCoreApplication.translate('ViewManager', 'Save Copy'), |
743 QCoreApplication.translate('ViewManager', 'Save Copy'), |
744 UI.PixmapCache.getIcon("fileSaveCopy.png"), |
744 UI.PixmapCache.getIcon("fileSaveCopy"), |
745 QCoreApplication.translate('ViewManager', 'Save &Copy...'), |
745 QCoreApplication.translate('ViewManager', 'Save &Copy...'), |
746 0, 0, self.saveActGrp, 'vm_file_save_copy') |
746 0, 0, self.saveActGrp, 'vm_file_save_copy') |
747 self.saveCopyAct.setStatusTip(QCoreApplication.translate( |
747 self.saveCopyAct.setStatusTip(QCoreApplication.translate( |
748 'ViewManager', 'Save a copy of the current file')) |
748 'ViewManager', 'Save a copy of the current file')) |
749 self.saveCopyAct.setWhatsThis(QCoreApplication.translate( |
749 self.saveCopyAct.setWhatsThis(QCoreApplication.translate( |
755 self.saveCopyAct.triggered.connect(self.saveCopyCurrentEditor) |
755 self.saveCopyAct.triggered.connect(self.saveCopyCurrentEditor) |
756 self.fileActions.append(self.saveCopyAct) |
756 self.fileActions.append(self.saveCopyAct) |
757 |
757 |
758 self.saveAllAct = E5Action( |
758 self.saveAllAct = E5Action( |
759 QCoreApplication.translate('ViewManager', 'Save all'), |
759 QCoreApplication.translate('ViewManager', 'Save all'), |
760 UI.PixmapCache.getIcon("fileSaveAll.png"), |
760 UI.PixmapCache.getIcon("fileSaveAll"), |
761 QCoreApplication.translate('ViewManager', 'Save a&ll'), |
761 QCoreApplication.translate('ViewManager', 'Save a&ll'), |
762 0, 0, self.saveActGrp, 'vm_file_save_all') |
762 0, 0, self.saveActGrp, 'vm_file_save_all') |
763 self.saveAllAct.setStatusTip(QCoreApplication.translate( |
763 self.saveAllAct.setStatusTip(QCoreApplication.translate( |
764 'ViewManager', 'Save all files')) |
764 'ViewManager', 'Save all files')) |
765 self.saveAllAct.setWhatsThis(QCoreApplication.translate( |
765 self.saveAllAct.setWhatsThis(QCoreApplication.translate( |
772 |
772 |
773 self.saveActGrp.setEnabled(False) |
773 self.saveActGrp.setEnabled(False) |
774 |
774 |
775 self.printAct = E5Action( |
775 self.printAct = E5Action( |
776 QCoreApplication.translate('ViewManager', 'Print'), |
776 QCoreApplication.translate('ViewManager', 'Print'), |
777 UI.PixmapCache.getIcon("print.png"), |
777 UI.PixmapCache.getIcon("print"), |
778 QCoreApplication.translate('ViewManager', '&Print'), |
778 QCoreApplication.translate('ViewManager', '&Print'), |
779 QKeySequence(QCoreApplication.translate( |
779 QKeySequence(QCoreApplication.translate( |
780 'ViewManager', "Ctrl+P", "File|Print")), |
780 'ViewManager', "Ctrl+P", "File|Print")), |
781 0, self, 'vm_file_print') |
781 0, self, 'vm_file_print') |
782 self.printAct.setStatusTip(QCoreApplication.translate( |
782 self.printAct.setStatusTip(QCoreApplication.translate( |
790 self.printAct.setEnabled(False) |
790 self.printAct.setEnabled(False) |
791 self.fileActions.append(self.printAct) |
791 self.fileActions.append(self.printAct) |
792 |
792 |
793 self.printPreviewAct = E5Action( |
793 self.printPreviewAct = E5Action( |
794 QCoreApplication.translate('ViewManager', 'Print Preview'), |
794 QCoreApplication.translate('ViewManager', 'Print Preview'), |
795 UI.PixmapCache.getIcon("printPreview.png"), |
795 UI.PixmapCache.getIcon("printPreview"), |
796 QCoreApplication.translate('ViewManager', 'Print Preview'), |
796 QCoreApplication.translate('ViewManager', 'Print Preview'), |
797 0, 0, self, 'vm_file_print_preview') |
797 0, 0, self, 'vm_file_print_preview') |
798 self.printPreviewAct.setStatusTip(QCoreApplication.translate( |
798 self.printPreviewAct.setStatusTip(QCoreApplication.translate( |
799 'ViewManager', 'Print preview of the current file')) |
799 'ViewManager', 'Print preview of the current file')) |
800 self.printPreviewAct.setWhatsThis(QCoreApplication.translate( |
800 self.printPreviewAct.setWhatsThis(QCoreApplication.translate( |
929 """ |
929 """ |
930 self.editActGrp = createActionGroup(self) |
930 self.editActGrp = createActionGroup(self) |
931 |
931 |
932 self.undoAct = E5Action( |
932 self.undoAct = E5Action( |
933 QCoreApplication.translate('ViewManager', 'Undo'), |
933 QCoreApplication.translate('ViewManager', 'Undo'), |
934 UI.PixmapCache.getIcon("editUndo.png"), |
934 UI.PixmapCache.getIcon("editUndo"), |
935 QCoreApplication.translate('ViewManager', '&Undo'), |
935 QCoreApplication.translate('ViewManager', '&Undo'), |
936 QKeySequence(QCoreApplication.translate( |
936 QKeySequence(QCoreApplication.translate( |
937 'ViewManager', "Ctrl+Z", "Edit|Undo")), |
937 'ViewManager', "Ctrl+Z", "Edit|Undo")), |
938 QKeySequence(QCoreApplication.translate( |
938 QKeySequence(QCoreApplication.translate( |
939 'ViewManager', "Alt+Backspace", "Edit|Undo")), |
939 'ViewManager', "Alt+Backspace", "Edit|Undo")), |
948 self.undoAct.triggered.connect(self.__editUndo) |
948 self.undoAct.triggered.connect(self.__editUndo) |
949 self.editActions.append(self.undoAct) |
949 self.editActions.append(self.undoAct) |
950 |
950 |
951 self.redoAct = E5Action( |
951 self.redoAct = E5Action( |
952 QCoreApplication.translate('ViewManager', 'Redo'), |
952 QCoreApplication.translate('ViewManager', 'Redo'), |
953 UI.PixmapCache.getIcon("editRedo.png"), |
953 UI.PixmapCache.getIcon("editRedo"), |
954 QCoreApplication.translate('ViewManager', '&Redo'), |
954 QCoreApplication.translate('ViewManager', '&Redo'), |
955 QKeySequence(QCoreApplication.translate( |
955 QKeySequence(QCoreApplication.translate( |
956 'ViewManager', "Ctrl+Shift+Z", "Edit|Redo")), |
956 'ViewManager', "Ctrl+Shift+Z", "Edit|Redo")), |
957 0, |
957 0, |
958 self.editActGrp, 'vm_edit_redo') |
958 self.editActGrp, 'vm_edit_redo') |
988 |
988 |
989 self.copyActGrp = createActionGroup(self.editActGrp) |
989 self.copyActGrp = createActionGroup(self.editActGrp) |
990 |
990 |
991 self.cutAct = E5Action( |
991 self.cutAct = E5Action( |
992 QCoreApplication.translate('ViewManager', 'Cut'), |
992 QCoreApplication.translate('ViewManager', 'Cut'), |
993 UI.PixmapCache.getIcon("editCut.png"), |
993 UI.PixmapCache.getIcon("editCut"), |
994 QCoreApplication.translate('ViewManager', 'Cu&t'), |
994 QCoreApplication.translate('ViewManager', 'Cu&t'), |
995 QKeySequence(QCoreApplication.translate( |
995 QKeySequence(QCoreApplication.translate( |
996 'ViewManager', "Ctrl+X", "Edit|Cut")), |
996 'ViewManager', "Ctrl+X", "Edit|Cut")), |
997 QKeySequence(QCoreApplication.translate( |
997 QKeySequence(QCoreApplication.translate( |
998 'ViewManager', "Shift+Del", "Edit|Cut")), |
998 'ViewManager', "Shift+Del", "Edit|Cut")), |
1008 self.cutAct.triggered.connect(self.__editCut) |
1008 self.cutAct.triggered.connect(self.__editCut) |
1009 self.editActions.append(self.cutAct) |
1009 self.editActions.append(self.cutAct) |
1010 |
1010 |
1011 self.copyAct = E5Action( |
1011 self.copyAct = E5Action( |
1012 QCoreApplication.translate('ViewManager', 'Copy'), |
1012 QCoreApplication.translate('ViewManager', 'Copy'), |
1013 UI.PixmapCache.getIcon("editCopy.png"), |
1013 UI.PixmapCache.getIcon("editCopy"), |
1014 QCoreApplication.translate('ViewManager', '&Copy'), |
1014 QCoreApplication.translate('ViewManager', '&Copy'), |
1015 QKeySequence(QCoreApplication.translate( |
1015 QKeySequence(QCoreApplication.translate( |
1016 'ViewManager', "Ctrl+C", "Edit|Copy")), |
1016 'ViewManager', "Ctrl+C", "Edit|Copy")), |
1017 QKeySequence(QCoreApplication.translate( |
1017 QKeySequence(QCoreApplication.translate( |
1018 'ViewManager', "Ctrl+Ins", "Edit|Copy")), |
1018 'ViewManager', "Ctrl+Ins", "Edit|Copy")), |
1028 self.copyAct.triggered.connect(self.__editCopy) |
1028 self.copyAct.triggered.connect(self.__editCopy) |
1029 self.editActions.append(self.copyAct) |
1029 self.editActions.append(self.copyAct) |
1030 |
1030 |
1031 self.pasteAct = E5Action( |
1031 self.pasteAct = E5Action( |
1032 QCoreApplication.translate('ViewManager', 'Paste'), |
1032 QCoreApplication.translate('ViewManager', 'Paste'), |
1033 UI.PixmapCache.getIcon("editPaste.png"), |
1033 UI.PixmapCache.getIcon("editPaste"), |
1034 QCoreApplication.translate('ViewManager', '&Paste'), |
1034 QCoreApplication.translate('ViewManager', '&Paste'), |
1035 QKeySequence(QCoreApplication.translate( |
1035 QKeySequence(QCoreApplication.translate( |
1036 'ViewManager', "Ctrl+V", "Edit|Paste")), |
1036 'ViewManager', "Ctrl+V", "Edit|Paste")), |
1037 QKeySequence(QCoreApplication.translate( |
1037 QKeySequence(QCoreApplication.translate( |
1038 'ViewManager', "Shift+Ins", "Edit|Paste")), |
1038 'ViewManager', "Shift+Ins", "Edit|Paste")), |
1048 self.pasteAct.triggered.connect(self.__editPaste) |
1048 self.pasteAct.triggered.connect(self.__editPaste) |
1049 self.editActions.append(self.pasteAct) |
1049 self.editActions.append(self.pasteAct) |
1050 |
1050 |
1051 self.deleteAct = E5Action( |
1051 self.deleteAct = E5Action( |
1052 QCoreApplication.translate('ViewManager', 'Clear'), |
1052 QCoreApplication.translate('ViewManager', 'Clear'), |
1053 UI.PixmapCache.getIcon("editDelete.png"), |
1053 UI.PixmapCache.getIcon("editDelete"), |
1054 QCoreApplication.translate('ViewManager', 'Clear'), |
1054 QCoreApplication.translate('ViewManager', 'Clear'), |
1055 QKeySequence(QCoreApplication.translate( |
1055 QKeySequence(QCoreApplication.translate( |
1056 'ViewManager', "Alt+Shift+C", "Edit|Clear")), |
1056 'ViewManager', "Alt+Shift+C", "Edit|Clear")), |
1057 0, |
1057 0, |
1058 self.copyActGrp, 'vm_edit_clear') |
1058 self.copyActGrp, 'vm_edit_clear') |
1083 self.joinAct.triggered.connect(self.__editJoin) |
1083 self.joinAct.triggered.connect(self.__editJoin) |
1084 self.editActions.append(self.joinAct) |
1084 self.editActions.append(self.joinAct) |
1085 |
1085 |
1086 self.indentAct = E5Action( |
1086 self.indentAct = E5Action( |
1087 QCoreApplication.translate('ViewManager', 'Indent'), |
1087 QCoreApplication.translate('ViewManager', 'Indent'), |
1088 UI.PixmapCache.getIcon("editIndent.png"), |
1088 UI.PixmapCache.getIcon("editIndent"), |
1089 QCoreApplication.translate('ViewManager', '&Indent'), |
1089 QCoreApplication.translate('ViewManager', '&Indent'), |
1090 QKeySequence(QCoreApplication.translate( |
1090 QKeySequence(QCoreApplication.translate( |
1091 'ViewManager', "Ctrl+I", "Edit|Indent")), |
1091 'ViewManager', "Ctrl+I", "Edit|Indent")), |
1092 0, |
1092 0, |
1093 self.editActGrp, 'vm_edit_indent') |
1093 self.editActGrp, 'vm_edit_indent') |
1102 self.indentAct.triggered.connect(self.__editIndent) |
1102 self.indentAct.triggered.connect(self.__editIndent) |
1103 self.editActions.append(self.indentAct) |
1103 self.editActions.append(self.indentAct) |
1104 |
1104 |
1105 self.unindentAct = E5Action( |
1105 self.unindentAct = E5Action( |
1106 QCoreApplication.translate('ViewManager', 'Unindent'), |
1106 QCoreApplication.translate('ViewManager', 'Unindent'), |
1107 UI.PixmapCache.getIcon("editUnindent.png"), |
1107 UI.PixmapCache.getIcon("editUnindent"), |
1108 QCoreApplication.translate('ViewManager', 'U&nindent'), |
1108 QCoreApplication.translate('ViewManager', 'U&nindent'), |
1109 QKeySequence(QCoreApplication.translate( |
1109 QKeySequence(QCoreApplication.translate( |
1110 'ViewManager', "Ctrl+Shift+I", "Edit|Unindent")), |
1110 'ViewManager', "Ctrl+Shift+I", "Edit|Unindent")), |
1111 0, |
1111 0, |
1112 self.editActGrp, 'vm_edit_unindent') |
1112 self.editActGrp, 'vm_edit_unindent') |
1121 self.unindentAct.triggered.connect(self.__editUnindent) |
1121 self.unindentAct.triggered.connect(self.__editUnindent) |
1122 self.editActions.append(self.unindentAct) |
1122 self.editActions.append(self.unindentAct) |
1123 |
1123 |
1124 self.smartIndentAct = E5Action( |
1124 self.smartIndentAct = E5Action( |
1125 QCoreApplication.translate('ViewManager', 'Smart indent'), |
1125 QCoreApplication.translate('ViewManager', 'Smart indent'), |
1126 UI.PixmapCache.getIcon("editSmartIndent.png"), |
1126 UI.PixmapCache.getIcon("editSmartIndent"), |
1127 QCoreApplication.translate('ViewManager', 'Smart indent'), |
1127 QCoreApplication.translate('ViewManager', 'Smart indent'), |
1128 0, 0, |
1128 0, 0, |
1129 self.editActGrp, 'vm_edit_smart_indent') |
1129 self.editActGrp, 'vm_edit_smart_indent') |
1130 self.smartIndentAct.setStatusTip(QCoreApplication.translate( |
1130 self.smartIndentAct.setStatusTip(QCoreApplication.translate( |
1131 'ViewManager', 'Smart indent Line or Selection')) |
1131 'ViewManager', 'Smart indent Line or Selection')) |
1138 self.smartIndentAct.triggered.connect(self.__editSmartIndent) |
1138 self.smartIndentAct.triggered.connect(self.__editSmartIndent) |
1139 self.editActions.append(self.smartIndentAct) |
1139 self.editActions.append(self.smartIndentAct) |
1140 |
1140 |
1141 self.commentAct = E5Action( |
1141 self.commentAct = E5Action( |
1142 QCoreApplication.translate('ViewManager', 'Comment'), |
1142 QCoreApplication.translate('ViewManager', 'Comment'), |
1143 UI.PixmapCache.getIcon("editComment.png"), |
1143 UI.PixmapCache.getIcon("editComment"), |
1144 QCoreApplication.translate('ViewManager', 'C&omment'), |
1144 QCoreApplication.translate('ViewManager', 'C&omment'), |
1145 QKeySequence(QCoreApplication.translate( |
1145 QKeySequence(QCoreApplication.translate( |
1146 'ViewManager', "Ctrl+M", "Edit|Comment")), |
1146 'ViewManager', "Ctrl+M", "Edit|Comment")), |
1147 0, |
1147 0, |
1148 self.editActGrp, 'vm_edit_comment') |
1148 self.editActGrp, 'vm_edit_comment') |
1157 self.commentAct.triggered.connect(self.__editComment) |
1157 self.commentAct.triggered.connect(self.__editComment) |
1158 self.editActions.append(self.commentAct) |
1158 self.editActions.append(self.commentAct) |
1159 |
1159 |
1160 self.uncommentAct = E5Action( |
1160 self.uncommentAct = E5Action( |
1161 QCoreApplication.translate('ViewManager', 'Uncomment'), |
1161 QCoreApplication.translate('ViewManager', 'Uncomment'), |
1162 UI.PixmapCache.getIcon("editUncomment.png"), |
1162 UI.PixmapCache.getIcon("editUncomment"), |
1163 QCoreApplication.translate('ViewManager', 'Unco&mment'), |
1163 QCoreApplication.translate('ViewManager', 'Unco&mment'), |
1164 QKeySequence(QCoreApplication.translate( |
1164 QKeySequence(QCoreApplication.translate( |
1165 'ViewManager', "Alt+Ctrl+M", "Edit|Uncomment")), |
1165 'ViewManager', "Alt+Ctrl+M", "Edit|Uncomment")), |
1166 0, |
1166 0, |
1167 self.editActGrp, 'vm_edit_uncomment') |
1167 self.editActGrp, 'vm_edit_uncomment') |
1176 self.uncommentAct.triggered.connect(self.__editUncomment) |
1176 self.uncommentAct.triggered.connect(self.__editUncomment) |
1177 self.editActions.append(self.uncommentAct) |
1177 self.editActions.append(self.uncommentAct) |
1178 |
1178 |
1179 self.toggleCommentAct = E5Action( |
1179 self.toggleCommentAct = E5Action( |
1180 QCoreApplication.translate('ViewManager', 'Toggle Comment'), |
1180 QCoreApplication.translate('ViewManager', 'Toggle Comment'), |
1181 UI.PixmapCache.getIcon("editToggleComment.png"), |
1181 UI.PixmapCache.getIcon("editToggleComment"), |
1182 QCoreApplication.translate('ViewManager', 'Toggle Comment'), |
1182 QCoreApplication.translate('ViewManager', 'Toggle Comment'), |
1183 QKeySequence(QCoreApplication.translate( |
1183 QKeySequence(QCoreApplication.translate( |
1184 'ViewManager', "Ctrl+Shift+M", "Edit|Toggle Comment")), |
1184 'ViewManager', "Ctrl+Shift+M", "Edit|Toggle Comment")), |
1185 0, |
1185 0, |
1186 self.editActGrp, 'vm_edit_toggle_comment') |
1186 self.editActGrp, 'vm_edit_toggle_comment') |
1249 self.selectBraceAct.triggered.connect(self.__editSelectBrace) |
1249 self.selectBraceAct.triggered.connect(self.__editSelectBrace) |
1250 self.editActions.append(self.selectBraceAct) |
1250 self.editActions.append(self.selectBraceAct) |
1251 |
1251 |
1252 self.selectAllAct = E5Action( |
1252 self.selectAllAct = E5Action( |
1253 QCoreApplication.translate('ViewManager', 'Select all'), |
1253 QCoreApplication.translate('ViewManager', 'Select all'), |
1254 UI.PixmapCache.getIcon("editSelectAll.png"), |
1254 UI.PixmapCache.getIcon("editSelectAll"), |
1255 QCoreApplication.translate('ViewManager', '&Select all'), |
1255 QCoreApplication.translate('ViewManager', '&Select all'), |
1256 QKeySequence(QCoreApplication.translate( |
1256 QKeySequence(QCoreApplication.translate( |
1257 'ViewManager', "Ctrl+A", "Edit|Select all")), |
1257 'ViewManager', "Ctrl+A", "Edit|Select all")), |
1258 0, |
1258 0, |
1259 self.editActGrp, 'vm_edit_select_all') |
1259 self.editActGrp, 'vm_edit_select_all') |
1423 self.calltipsAct.triggered.connect(self.__editShowCallTips) |
1423 self.calltipsAct.triggered.connect(self.__editShowCallTips) |
1424 self.editActions.append(self.calltipsAct) |
1424 self.editActions.append(self.calltipsAct) |
1425 |
1425 |
1426 self.codeInfoAct = E5Action( |
1426 self.codeInfoAct = E5Action( |
1427 QCoreApplication.translate('ViewManager', 'Code Info'), |
1427 QCoreApplication.translate('ViewManager', 'Code Info'), |
1428 UI.PixmapCache.getIcon("codeDocuViewer.png"), |
1428 UI.PixmapCache.getIcon("codeDocuViewer"), |
1429 QCoreApplication.translate('ViewManager', 'Code Info'), |
1429 QCoreApplication.translate('ViewManager', 'Code Info'), |
1430 QKeySequence(QCoreApplication.translate( |
1430 QKeySequence(QCoreApplication.translate( |
1431 'ViewManager', "Ctrl+Alt+I", "Edit|Code Info")), |
1431 'ViewManager', "Ctrl+Alt+I", "Edit|Code Info")), |
1432 0, |
1432 0, |
1433 self.editActGrp, 'vm_edit_codeinfo') |
1433 self.editActGrp, 'vm_edit_codeinfo') |
2868 """ |
2868 """ |
2869 self.searchActGrp = createActionGroup(self) |
2869 self.searchActGrp = createActionGroup(self) |
2870 |
2870 |
2871 self.searchAct = E5Action( |
2871 self.searchAct = E5Action( |
2872 QCoreApplication.translate('ViewManager', 'Search'), |
2872 QCoreApplication.translate('ViewManager', 'Search'), |
2873 UI.PixmapCache.getIcon("find.png"), |
2873 UI.PixmapCache.getIcon("find"), |
2874 QCoreApplication.translate('ViewManager', '&Search...'), |
2874 QCoreApplication.translate('ViewManager', '&Search...'), |
2875 QKeySequence(QCoreApplication.translate( |
2875 QKeySequence(QCoreApplication.translate( |
2876 'ViewManager', "Ctrl+F", "Search|Search")), |
2876 'ViewManager', "Ctrl+F", "Search|Search")), |
2877 0, |
2877 0, |
2878 self.searchActGrp, 'vm_search') |
2878 self.searchActGrp, 'vm_search') |
2889 self.searchActions.append(self.searchAct) |
2889 self.searchActions.append(self.searchAct) |
2890 |
2890 |
2891 self.searchNextAct = E5Action( |
2891 self.searchNextAct = E5Action( |
2892 QCoreApplication.translate( |
2892 QCoreApplication.translate( |
2893 'ViewManager', 'Search next'), |
2893 'ViewManager', 'Search next'), |
2894 UI.PixmapCache.getIcon("findNext.png"), |
2894 UI.PixmapCache.getIcon("findNext"), |
2895 QCoreApplication.translate('ViewManager', 'Search &next'), |
2895 QCoreApplication.translate('ViewManager', 'Search &next'), |
2896 QKeySequence(QCoreApplication.translate( |
2896 QKeySequence(QCoreApplication.translate( |
2897 'ViewManager', "F3", "Search|Search next")), |
2897 'ViewManager', "F3", "Search|Search next")), |
2898 0, |
2898 0, |
2899 self.searchActGrp, 'vm_search_next') |
2899 self.searchActGrp, 'vm_search_next') |
2909 self.searchNextAct.triggered.connect(self.__searchNext) |
2909 self.searchNextAct.triggered.connect(self.__searchNext) |
2910 self.searchActions.append(self.searchNextAct) |
2910 self.searchActions.append(self.searchNextAct) |
2911 |
2911 |
2912 self.searchPrevAct = E5Action( |
2912 self.searchPrevAct = E5Action( |
2913 QCoreApplication.translate('ViewManager', 'Search previous'), |
2913 QCoreApplication.translate('ViewManager', 'Search previous'), |
2914 UI.PixmapCache.getIcon("findPrev.png"), |
2914 UI.PixmapCache.getIcon("findPrev"), |
2915 QCoreApplication.translate('ViewManager', 'Search &previous'), |
2915 QCoreApplication.translate('ViewManager', 'Search &previous'), |
2916 QKeySequence(QCoreApplication.translate( |
2916 QKeySequence(QCoreApplication.translate( |
2917 'ViewManager', "Shift+F3", "Search|Search previous")), |
2917 'ViewManager', "Shift+F3", "Search|Search previous")), |
2918 0, |
2918 0, |
2919 self.searchActGrp, 'vm_search_previous') |
2919 self.searchActGrp, 'vm_search_previous') |
2929 self.searchPrevAct.triggered.connect(self.__searchPrev) |
2929 self.searchPrevAct.triggered.connect(self.__searchPrev) |
2930 self.searchActions.append(self.searchPrevAct) |
2930 self.searchActions.append(self.searchPrevAct) |
2931 |
2931 |
2932 self.searchClearMarkersAct = E5Action( |
2932 self.searchClearMarkersAct = E5Action( |
2933 QCoreApplication.translate('ViewManager', 'Clear search markers'), |
2933 QCoreApplication.translate('ViewManager', 'Clear search markers'), |
2934 UI.PixmapCache.getIcon("findClear.png"), |
2934 UI.PixmapCache.getIcon("findClear"), |
2935 QCoreApplication.translate('ViewManager', 'Clear search markers'), |
2935 QCoreApplication.translate('ViewManager', 'Clear search markers'), |
2936 QKeySequence(QCoreApplication.translate( |
2936 QKeySequence(QCoreApplication.translate( |
2937 'ViewManager', "Ctrl+3", "Search|Clear search markers")), |
2937 'ViewManager', "Ctrl+3", "Search|Clear search markers")), |
2938 0, |
2938 0, |
2939 self.searchActGrp, 'vm_clear_search_markers') |
2939 self.searchActGrp, 'vm_clear_search_markers') |
2949 self.searchActions.append(self.searchClearMarkersAct) |
2949 self.searchActions.append(self.searchClearMarkersAct) |
2950 |
2950 |
2951 self.searchNextWordAct = E5Action( |
2951 self.searchNextWordAct = E5Action( |
2952 QCoreApplication.translate( |
2952 QCoreApplication.translate( |
2953 'ViewManager', 'Search current word forward'), |
2953 'ViewManager', 'Search current word forward'), |
2954 UI.PixmapCache.getIcon("findWordNext.png"), |
2954 UI.PixmapCache.getIcon("findWordNext"), |
2955 QCoreApplication.translate( |
2955 QCoreApplication.translate( |
2956 'ViewManager', 'Search current word forward'), |
2956 'ViewManager', 'Search current word forward'), |
2957 QKeySequence(QCoreApplication.translate( |
2957 QKeySequence(QCoreApplication.translate( |
2958 'ViewManager', |
2958 'ViewManager', |
2959 "Ctrl+.", "Search|Search current word forward")), |
2959 "Ctrl+.", "Search|Search current word forward")), |
2972 self.searchActions.append(self.searchNextWordAct) |
2972 self.searchActions.append(self.searchNextWordAct) |
2973 |
2973 |
2974 self.searchPrevWordAct = E5Action( |
2974 self.searchPrevWordAct = E5Action( |
2975 QCoreApplication.translate( |
2975 QCoreApplication.translate( |
2976 'ViewManager', 'Search current word backward'), |
2976 'ViewManager', 'Search current word backward'), |
2977 UI.PixmapCache.getIcon("findWordPrev.png"), |
2977 UI.PixmapCache.getIcon("findWordPrev"), |
2978 QCoreApplication.translate( |
2978 QCoreApplication.translate( |
2979 'ViewManager', 'Search current word backward'), |
2979 'ViewManager', 'Search current word backward'), |
2980 QKeySequence(QCoreApplication.translate( |
2980 QKeySequence(QCoreApplication.translate( |
2981 'ViewManager', |
2981 'ViewManager', |
2982 "Ctrl+,", "Search|Search current word backward")), |
2982 "Ctrl+,", "Search|Search current word backward")), |
3014 self.searchActions.append(self.replaceAct) |
3014 self.searchActions.append(self.replaceAct) |
3015 |
3015 |
3016 self.replaceAndSearchAct = E5Action( |
3016 self.replaceAndSearchAct = E5Action( |
3017 QCoreApplication.translate( |
3017 QCoreApplication.translate( |
3018 'ViewManager', 'Replace and Search'), |
3018 'ViewManager', 'Replace and Search'), |
3019 UI.PixmapCache.getIcon("editReplaceSearch.png"), |
3019 UI.PixmapCache.getIcon("editReplaceSearch"), |
3020 QCoreApplication.translate( |
3020 QCoreApplication.translate( |
3021 'ViewManager', 'Replace and Search'), |
3021 'ViewManager', 'Replace and Search'), |
3022 QKeySequence(QCoreApplication.translate( |
3022 QKeySequence(QCoreApplication.translate( |
3023 'ViewManager', "Meta+R", "Search|Replace and Search")), |
3023 'ViewManager', "Meta+R", "Search|Replace and Search")), |
3024 0, |
3024 0, |
3038 self.searchActions.append(self.replaceAndSearchAct) |
3038 self.searchActions.append(self.replaceAndSearchAct) |
3039 |
3039 |
3040 self.replaceSelectionAct = E5Action( |
3040 self.replaceSelectionAct = E5Action( |
3041 QCoreApplication.translate( |
3041 QCoreApplication.translate( |
3042 'ViewManager', 'Replace Occurrence'), |
3042 'ViewManager', 'Replace Occurrence'), |
3043 UI.PixmapCache.getIcon("editReplace.png"), |
3043 UI.PixmapCache.getIcon("editReplace"), |
3044 QCoreApplication.translate( |
3044 QCoreApplication.translate( |
3045 'ViewManager', 'Replace Occurrence'), |
3045 'ViewManager', 'Replace Occurrence'), |
3046 QKeySequence(QCoreApplication.translate( |
3046 QKeySequence(QCoreApplication.translate( |
3047 'ViewManager', "Ctrl+Meta+R", "Search|Replace Occurrence")), |
3047 'ViewManager', "Ctrl+Meta+R", "Search|Replace Occurrence")), |
3048 0, |
3048 0, |
3060 self.searchActions.append(self.replaceSelectionAct) |
3060 self.searchActions.append(self.replaceSelectionAct) |
3061 |
3061 |
3062 self.replaceAllAct = E5Action( |
3062 self.replaceAllAct = E5Action( |
3063 QCoreApplication.translate( |
3063 QCoreApplication.translate( |
3064 'ViewManager', 'Replace All'), |
3064 'ViewManager', 'Replace All'), |
3065 UI.PixmapCache.getIcon("editReplaceAll.png"), |
3065 UI.PixmapCache.getIcon("editReplaceAll"), |
3066 QCoreApplication.translate( |
3066 QCoreApplication.translate( |
3067 'ViewManager', 'Replace All'), |
3067 'ViewManager', 'Replace All'), |
3068 QKeySequence(QCoreApplication.translate( |
3068 QKeySequence(QCoreApplication.translate( |
3069 'ViewManager', "Shift+Meta+R", "Search|Replace All")), |
3069 'ViewManager', "Shift+Meta+R", "Search|Replace All")), |
3070 0, |
3070 0, |
3081 self.__replaceWidget.replaceAll) |
3081 self.__replaceWidget.replaceAll) |
3082 self.searchActions.append(self.replaceAllAct) |
3082 self.searchActions.append(self.replaceAllAct) |
3083 |
3083 |
3084 self.quickSearchAct = E5Action( |
3084 self.quickSearchAct = E5Action( |
3085 QCoreApplication.translate('ViewManager', 'Quicksearch'), |
3085 QCoreApplication.translate('ViewManager', 'Quicksearch'), |
3086 UI.PixmapCache.getIcon("quickFindNext.png"), |
3086 UI.PixmapCache.getIcon("quickFindNext"), |
3087 QCoreApplication.translate('ViewManager', '&Quicksearch'), |
3087 QCoreApplication.translate('ViewManager', '&Quicksearch'), |
3088 QKeySequence(QCoreApplication.translate( |
3088 QKeySequence(QCoreApplication.translate( |
3089 'ViewManager', "Ctrl+Shift+K", "Search|Quicksearch")), |
3089 'ViewManager', "Ctrl+Shift+K", "Search|Quicksearch")), |
3090 0, |
3090 0, |
3091 self.searchActGrp, 'vm_quicksearch') |
3091 self.searchActGrp, 'vm_quicksearch') |
3103 self.searchActions.append(self.quickSearchAct) |
3103 self.searchActions.append(self.quickSearchAct) |
3104 |
3104 |
3105 self.quickSearchBackAct = E5Action( |
3105 self.quickSearchBackAct = E5Action( |
3106 QCoreApplication.translate( |
3106 QCoreApplication.translate( |
3107 'ViewManager', 'Quicksearch backwards'), |
3107 'ViewManager', 'Quicksearch backwards'), |
3108 UI.PixmapCache.getIcon("quickFindPrev.png"), |
3108 UI.PixmapCache.getIcon("quickFindPrev"), |
3109 QCoreApplication.translate( |
3109 QCoreApplication.translate( |
3110 'ViewManager', 'Quicksearch &backwards'), |
3110 'ViewManager', 'Quicksearch &backwards'), |
3111 QKeySequence(QCoreApplication.translate( |
3111 QKeySequence(QCoreApplication.translate( |
3112 'ViewManager', |
3112 'ViewManager', |
3113 "Ctrl+Shift+J", "Search|Quicksearch backwards")), |
3113 "Ctrl+Shift+J", "Search|Quicksearch backwards")), |
3124 self.quickSearchBackAct.triggered.connect(self.__quickSearchPrev) |
3124 self.quickSearchBackAct.triggered.connect(self.__quickSearchPrev) |
3125 self.searchActions.append(self.quickSearchBackAct) |
3125 self.searchActions.append(self.quickSearchBackAct) |
3126 |
3126 |
3127 self.quickSearchExtendAct = E5Action( |
3127 self.quickSearchExtendAct = E5Action( |
3128 QCoreApplication.translate('ViewManager', 'Quicksearch extend'), |
3128 QCoreApplication.translate('ViewManager', 'Quicksearch extend'), |
3129 UI.PixmapCache.getIcon("quickFindExtend.png"), |
3129 UI.PixmapCache.getIcon("quickFindExtend"), |
3130 QCoreApplication.translate('ViewManager', 'Quicksearch e&xtend'), |
3130 QCoreApplication.translate('ViewManager', 'Quicksearch e&xtend'), |
3131 QKeySequence(QCoreApplication.translate( |
3131 QKeySequence(QCoreApplication.translate( |
3132 'ViewManager', "Ctrl+Shift+H", "Search|Quicksearch extend")), |
3132 'ViewManager', "Ctrl+Shift+H", "Search|Quicksearch extend")), |
3133 0, |
3133 0, |
3134 self.searchActGrp, 'vm_quicksearch_extend') |
3134 self.searchActGrp, 'vm_quicksearch_extend') |
3145 self.__quickSearchExtend) |
3145 self.__quickSearchExtend) |
3146 self.searchActions.append(self.quickSearchExtendAct) |
3146 self.searchActions.append(self.quickSearchExtendAct) |
3147 |
3147 |
3148 self.gotoAct = E5Action( |
3148 self.gotoAct = E5Action( |
3149 QCoreApplication.translate('ViewManager', 'Goto Line'), |
3149 QCoreApplication.translate('ViewManager', 'Goto Line'), |
3150 UI.PixmapCache.getIcon("goto.png"), |
3150 UI.PixmapCache.getIcon("goto"), |
3151 QCoreApplication.translate('ViewManager', '&Goto Line...'), |
3151 QCoreApplication.translate('ViewManager', '&Goto Line...'), |
3152 QKeySequence(QCoreApplication.translate( |
3152 QKeySequence(QCoreApplication.translate( |
3153 'ViewManager', "Ctrl+G", "Search|Goto Line")), |
3153 'ViewManager', "Ctrl+G", "Search|Goto Line")), |
3154 0, |
3154 0, |
3155 self.searchActGrp, 'vm_search_goto_line') |
3155 self.searchActGrp, 'vm_search_goto_line') |
3164 self.gotoAct.triggered.connect(self.__goto) |
3164 self.gotoAct.triggered.connect(self.__goto) |
3165 self.searchActions.append(self.gotoAct) |
3165 self.searchActions.append(self.gotoAct) |
3166 |
3166 |
3167 self.gotoBraceAct = E5Action( |
3167 self.gotoBraceAct = E5Action( |
3168 QCoreApplication.translate('ViewManager', 'Goto Brace'), |
3168 QCoreApplication.translate('ViewManager', 'Goto Brace'), |
3169 UI.PixmapCache.getIcon("gotoBrace.png"), |
3169 UI.PixmapCache.getIcon("gotoBrace"), |
3170 QCoreApplication.translate('ViewManager', 'Goto &Brace'), |
3170 QCoreApplication.translate('ViewManager', 'Goto &Brace'), |
3171 QKeySequence(QCoreApplication.translate( |
3171 QKeySequence(QCoreApplication.translate( |
3172 'ViewManager', "Ctrl+L", "Search|Goto Brace")), |
3172 'ViewManager', "Ctrl+L", "Search|Goto Brace")), |
3173 0, |
3173 0, |
3174 self.searchActGrp, 'vm_search_goto_brace') |
3174 self.searchActGrp, 'vm_search_goto_brace') |
3183 self.searchActions.append(self.gotoBraceAct) |
3183 self.searchActions.append(self.gotoBraceAct) |
3184 |
3184 |
3185 self.gotoLastEditAct = E5Action( |
3185 self.gotoLastEditAct = E5Action( |
3186 QCoreApplication.translate( |
3186 QCoreApplication.translate( |
3187 'ViewManager', 'Goto Last Edit Location'), |
3187 'ViewManager', 'Goto Last Edit Location'), |
3188 UI.PixmapCache.getIcon("gotoLastEditPosition.png"), |
3188 UI.PixmapCache.getIcon("gotoLastEditPosition"), |
3189 QCoreApplication.translate( |
3189 QCoreApplication.translate( |
3190 'ViewManager', 'Goto Last &Edit Location'), |
3190 'ViewManager', 'Goto Last &Edit Location'), |
3191 QKeySequence(QCoreApplication.translate( |
3191 QKeySequence(QCoreApplication.translate( |
3192 'ViewManager', |
3192 'ViewManager', |
3193 "Ctrl+Shift+G", "Search|Goto Last Edit Location")), |
3193 "Ctrl+Shift+G", "Search|Goto Last Edit Location")), |
3252 |
3252 |
3253 self.searchActGrp.setEnabled(False) |
3253 self.searchActGrp.setEnabled(False) |
3254 |
3254 |
3255 self.searchFilesAct = E5Action( |
3255 self.searchFilesAct = E5Action( |
3256 QCoreApplication.translate('ViewManager', 'Search in Files'), |
3256 QCoreApplication.translate('ViewManager', 'Search in Files'), |
3257 UI.PixmapCache.getIcon("projectFind.png"), |
3257 UI.PixmapCache.getIcon("projectFind"), |
3258 QCoreApplication.translate('ViewManager', 'Search in &Files...'), |
3258 QCoreApplication.translate('ViewManager', 'Search in &Files...'), |
3259 QKeySequence(QCoreApplication.translate( |
3259 QKeySequence(QCoreApplication.translate( |
3260 'ViewManager', "Shift+Ctrl+F", "Search|Search Files")), |
3260 'ViewManager', "Shift+Ctrl+F", "Search|Search Files")), |
3261 0, |
3261 0, |
3262 self, 'vm_search_in_files') |
3262 self, 'vm_search_in_files') |
3293 self.searchActions.append(self.replaceFilesAct) |
3293 self.searchActions.append(self.replaceFilesAct) |
3294 |
3294 |
3295 self.searchOpenFilesAct = E5Action( |
3295 self.searchOpenFilesAct = E5Action( |
3296 QCoreApplication.translate( |
3296 QCoreApplication.translate( |
3297 'ViewManager', 'Search in Open Files'), |
3297 'ViewManager', 'Search in Open Files'), |
3298 UI.PixmapCache.getIcon("documentFind.png"), |
3298 UI.PixmapCache.getIcon("documentFind"), |
3299 QCoreApplication.translate( |
3299 QCoreApplication.translate( |
3300 'ViewManager', 'Search in Open Files...'), |
3300 'ViewManager', 'Search in Open Files...'), |
3301 QKeySequence(QCoreApplication.translate( |
3301 QKeySequence(QCoreApplication.translate( |
3302 'ViewManager', |
3302 'ViewManager', |
3303 "Meta+Ctrl+Alt+F", "Search|Search Open Files")), |
3303 "Meta+Ctrl+Alt+F", "Search|Search Open Files")), |
3480 self.viewActGrp = createActionGroup(self) |
3480 self.viewActGrp = createActionGroup(self) |
3481 self.viewFoldActGrp = createActionGroup(self) |
3481 self.viewFoldActGrp = createActionGroup(self) |
3482 |
3482 |
3483 self.zoomInAct = E5Action( |
3483 self.zoomInAct = E5Action( |
3484 QCoreApplication.translate('ViewManager', 'Zoom in'), |
3484 QCoreApplication.translate('ViewManager', 'Zoom in'), |
3485 UI.PixmapCache.getIcon("zoomIn.png"), |
3485 UI.PixmapCache.getIcon("zoomIn"), |
3486 QCoreApplication.translate('ViewManager', 'Zoom &in'), |
3486 QCoreApplication.translate('ViewManager', 'Zoom &in'), |
3487 QKeySequence(QCoreApplication.translate( |
3487 QKeySequence(QCoreApplication.translate( |
3488 'ViewManager', "Ctrl++", "View|Zoom in")), |
3488 'ViewManager', "Ctrl++", "View|Zoom in")), |
3489 QKeySequence(QCoreApplication.translate( |
3489 QKeySequence(QCoreApplication.translate( |
3490 'ViewManager', "Zoom In", "View|Zoom in")), |
3490 'ViewManager', "Zoom In", "View|Zoom in")), |
3499 self.zoomInAct.triggered.connect(self.__zoomIn) |
3499 self.zoomInAct.triggered.connect(self.__zoomIn) |
3500 self.viewActions.append(self.zoomInAct) |
3500 self.viewActions.append(self.zoomInAct) |
3501 |
3501 |
3502 self.zoomOutAct = E5Action( |
3502 self.zoomOutAct = E5Action( |
3503 QCoreApplication.translate('ViewManager', 'Zoom out'), |
3503 QCoreApplication.translate('ViewManager', 'Zoom out'), |
3504 UI.PixmapCache.getIcon("zoomOut.png"), |
3504 UI.PixmapCache.getIcon("zoomOut"), |
3505 QCoreApplication.translate('ViewManager', 'Zoom &out'), |
3505 QCoreApplication.translate('ViewManager', 'Zoom &out'), |
3506 QKeySequence(QCoreApplication.translate( |
3506 QKeySequence(QCoreApplication.translate( |
3507 'ViewManager', "Ctrl+-", "View|Zoom out")), |
3507 'ViewManager', "Ctrl+-", "View|Zoom out")), |
3508 QKeySequence(QCoreApplication.translate( |
3508 QKeySequence(QCoreApplication.translate( |
3509 'ViewManager', "Zoom Out", "View|Zoom out")), |
3509 'ViewManager', "Zoom Out", "View|Zoom out")), |
3518 self.zoomOutAct.triggered.connect(self.__zoomOut) |
3518 self.zoomOutAct.triggered.connect(self.__zoomOut) |
3519 self.viewActions.append(self.zoomOutAct) |
3519 self.viewActions.append(self.zoomOutAct) |
3520 |
3520 |
3521 self.zoomResetAct = E5Action( |
3521 self.zoomResetAct = E5Action( |
3522 QCoreApplication.translate('ViewManager', 'Zoom reset'), |
3522 QCoreApplication.translate('ViewManager', 'Zoom reset'), |
3523 UI.PixmapCache.getIcon("zoomReset.png"), |
3523 UI.PixmapCache.getIcon("zoomReset"), |
3524 QCoreApplication.translate('ViewManager', 'Zoom &reset'), |
3524 QCoreApplication.translate('ViewManager', 'Zoom &reset'), |
3525 QKeySequence(QCoreApplication.translate( |
3525 QKeySequence(QCoreApplication.translate( |
3526 'ViewManager', "Ctrl+0", "View|Zoom reset")), |
3526 'ViewManager', "Ctrl+0", "View|Zoom reset")), |
3527 0, |
3527 0, |
3528 self.viewActGrp, 'vm_view_zoom_reset') |
3528 self.viewActGrp, 'vm_view_zoom_reset') |
3537 self.zoomResetAct.triggered.connect(self.__zoomReset) |
3537 self.zoomResetAct.triggered.connect(self.__zoomReset) |
3538 self.viewActions.append(self.zoomResetAct) |
3538 self.viewActions.append(self.zoomResetAct) |
3539 |
3539 |
3540 self.zoomToAct = E5Action( |
3540 self.zoomToAct = E5Action( |
3541 QCoreApplication.translate('ViewManager', 'Zoom'), |
3541 QCoreApplication.translate('ViewManager', 'Zoom'), |
3542 UI.PixmapCache.getIcon("zoomTo.png"), |
3542 UI.PixmapCache.getIcon("zoomTo"), |
3543 QCoreApplication.translate('ViewManager', '&Zoom'), |
3543 QCoreApplication.translate('ViewManager', '&Zoom'), |
3544 QKeySequence(QCoreApplication.translate( |
3544 QKeySequence(QCoreApplication.translate( |
3545 'ViewManager', "Ctrl+#", "View|Zoom")), |
3545 'ViewManager', "Ctrl+#", "View|Zoom")), |
3546 0, |
3546 0, |
3547 self.viewActGrp, 'vm_view_zoom') |
3547 self.viewActGrp, 'vm_view_zoom') |
3618 self.clearAllFoldsAct.triggered.connect(self.__clearAllFolds) |
3618 self.clearAllFoldsAct.triggered.connect(self.__clearAllFolds) |
3619 self.viewActions.append(self.clearAllFoldsAct) |
3619 self.viewActions.append(self.clearAllFoldsAct) |
3620 |
3620 |
3621 self.unhighlightAct = E5Action( |
3621 self.unhighlightAct = E5Action( |
3622 QCoreApplication.translate('ViewManager', 'Remove all highlights'), |
3622 QCoreApplication.translate('ViewManager', 'Remove all highlights'), |
3623 UI.PixmapCache.getIcon("unhighlight.png"), |
3623 UI.PixmapCache.getIcon("unhighlight"), |
3624 QCoreApplication.translate('ViewManager', 'Remove all highlights'), |
3624 QCoreApplication.translate('ViewManager', 'Remove all highlights'), |
3625 0, 0, |
3625 0, 0, |
3626 self, 'vm_view_unhighlight') |
3626 self, 'vm_view_unhighlight') |
3627 self.unhighlightAct.setStatusTip(QCoreApplication.translate( |
3627 self.unhighlightAct.setStatusTip(QCoreApplication.translate( |
3628 'ViewManager', 'Remove all highlights')) |
3628 'ViewManager', 'Remove all highlights')) |
3634 self.unhighlightAct.triggered.connect(self.__unhighlight) |
3634 self.unhighlightAct.triggered.connect(self.__unhighlight) |
3635 self.viewActions.append(self.unhighlightAct) |
3635 self.viewActions.append(self.unhighlightAct) |
3636 |
3636 |
3637 self.newDocumentViewAct = E5Action( |
3637 self.newDocumentViewAct = E5Action( |
3638 QCoreApplication.translate('ViewManager', 'New Document View'), |
3638 QCoreApplication.translate('ViewManager', 'New Document View'), |
3639 UI.PixmapCache.getIcon("documentNewView.png"), |
3639 UI.PixmapCache.getIcon("documentNewView"), |
3640 QCoreApplication.translate('ViewManager', 'New &Document View'), |
3640 QCoreApplication.translate('ViewManager', 'New &Document View'), |
3641 0, 0, self, 'vm_view_new_document_view') |
3641 0, 0, self, 'vm_view_new_document_view') |
3642 self.newDocumentViewAct.setStatusTip(QCoreApplication.translate( |
3642 self.newDocumentViewAct.setStatusTip(QCoreApplication.translate( |
3643 'ViewManager', 'Open a new view of the current document')) |
3643 'ViewManager', 'Open a new view of the current document')) |
3644 self.newDocumentViewAct.setWhatsThis(QCoreApplication.translate( |
3644 self.newDocumentViewAct.setWhatsThis(QCoreApplication.translate( |
3652 self.viewActions.append(self.newDocumentViewAct) |
3652 self.viewActions.append(self.newDocumentViewAct) |
3653 |
3653 |
3654 self.newDocumentSplitViewAct = E5Action( |
3654 self.newDocumentSplitViewAct = E5Action( |
3655 QCoreApplication.translate( |
3655 QCoreApplication.translate( |
3656 'ViewManager', 'New Document View (with new split)'), |
3656 'ViewManager', 'New Document View (with new split)'), |
3657 UI.PixmapCache.getIcon("splitVertical.png"), |
3657 UI.PixmapCache.getIcon("splitVertical"), |
3658 QCoreApplication.translate( |
3658 QCoreApplication.translate( |
3659 'ViewManager', 'New Document View (with new split)'), |
3659 'ViewManager', 'New Document View (with new split)'), |
3660 0, 0, self, 'vm_view_new_document_split_view') |
3660 0, 0, self, 'vm_view_new_document_split_view') |
3661 self.newDocumentSplitViewAct.setStatusTip(QCoreApplication.translate( |
3661 self.newDocumentSplitViewAct.setStatusTip(QCoreApplication.translate( |
3662 'ViewManager', |
3662 'ViewManager', |
3672 self.__newDocumentSplitView) |
3672 self.__newDocumentSplitView) |
3673 self.viewActions.append(self.newDocumentSplitViewAct) |
3673 self.viewActions.append(self.newDocumentSplitViewAct) |
3674 |
3674 |
3675 self.splitViewAct = E5Action( |
3675 self.splitViewAct = E5Action( |
3676 QCoreApplication.translate('ViewManager', 'Split view'), |
3676 QCoreApplication.translate('ViewManager', 'Split view'), |
3677 UI.PixmapCache.getIcon("splitVertical.png"), |
3677 UI.PixmapCache.getIcon("splitVertical"), |
3678 QCoreApplication.translate('ViewManager', '&Split view'), |
3678 QCoreApplication.translate('ViewManager', '&Split view'), |
3679 0, 0, self, 'vm_view_split_view') |
3679 0, 0, self, 'vm_view_split_view') |
3680 self.splitViewAct.setStatusTip(QCoreApplication.translate( |
3680 self.splitViewAct.setStatusTip(QCoreApplication.translate( |
3681 'ViewManager', 'Add a split to the view')) |
3681 'ViewManager', 'Add a split to the view')) |
3682 self.splitViewAct.setWhatsThis(QCoreApplication.translate( |
3682 self.splitViewAct.setWhatsThis(QCoreApplication.translate( |
3702 self.splitOrientationAct.toggled[bool].connect(self.__splitOrientation) |
3702 self.splitOrientationAct.toggled[bool].connect(self.__splitOrientation) |
3703 self.viewActions.append(self.splitOrientationAct) |
3703 self.viewActions.append(self.splitOrientationAct) |
3704 |
3704 |
3705 self.splitRemoveAct = E5Action( |
3705 self.splitRemoveAct = E5Action( |
3706 QCoreApplication.translate('ViewManager', 'Remove split'), |
3706 QCoreApplication.translate('ViewManager', 'Remove split'), |
3707 UI.PixmapCache.getIcon("remsplitVertical.png"), |
3707 UI.PixmapCache.getIcon("remsplitVertical"), |
3708 QCoreApplication.translate('ViewManager', '&Remove split'), |
3708 QCoreApplication.translate('ViewManager', '&Remove split'), |
3709 0, 0, self, 'vm_view_remove_split') |
3709 0, 0, self, 'vm_view_remove_split') |
3710 self.splitRemoveAct.setStatusTip(QCoreApplication.translate( |
3710 self.splitRemoveAct.setStatusTip(QCoreApplication.translate( |
3711 'ViewManager', 'Remove the current split')) |
3711 'ViewManager', 'Remove the current split')) |
3712 self.splitRemoveAct.setWhatsThis(QCoreApplication.translate( |
3712 self.splitRemoveAct.setWhatsThis(QCoreApplication.translate( |
3750 self.prevSplitAct.triggered.connect(self.prevSplit) |
3750 self.prevSplitAct.triggered.connect(self.prevSplit) |
3751 self.viewActions.append(self.prevSplitAct) |
3751 self.viewActions.append(self.prevSplitAct) |
3752 |
3752 |
3753 self.previewAct = E5Action( |
3753 self.previewAct = E5Action( |
3754 QCoreApplication.translate('ViewManager', 'Preview'), |
3754 QCoreApplication.translate('ViewManager', 'Preview'), |
3755 UI.PixmapCache.getIcon("previewer.png"), |
3755 UI.PixmapCache.getIcon("previewer"), |
3756 QCoreApplication.translate('ViewManager', 'Preview'), |
3756 QCoreApplication.translate('ViewManager', 'Preview'), |
3757 0, 0, self, 'vm_preview', True) |
3757 0, 0, self, 'vm_preview', True) |
3758 self.previewAct.setStatusTip(QCoreApplication.translate( |
3758 self.previewAct.setStatusTip(QCoreApplication.translate( |
3759 'ViewManager', 'Preview the current file in the web browser')) |
3759 'ViewManager', 'Preview the current file in the web browser')) |
3760 self.previewAct.setWhatsThis(QCoreApplication.translate( |
3760 self.previewAct.setWhatsThis(QCoreApplication.translate( |
3983 """ |
3983 """ |
3984 self.bookmarkActGrp = createActionGroup(self) |
3984 self.bookmarkActGrp = createActionGroup(self) |
3985 |
3985 |
3986 self.bookmarkToggleAct = E5Action( |
3986 self.bookmarkToggleAct = E5Action( |
3987 QCoreApplication.translate('ViewManager', 'Toggle Bookmark'), |
3987 QCoreApplication.translate('ViewManager', 'Toggle Bookmark'), |
3988 UI.PixmapCache.getIcon("bookmarkToggle.png"), |
3988 UI.PixmapCache.getIcon("bookmarkToggle"), |
3989 QCoreApplication.translate('ViewManager', '&Toggle Bookmark'), |
3989 QCoreApplication.translate('ViewManager', '&Toggle Bookmark'), |
3990 QKeySequence(QCoreApplication.translate( |
3990 QKeySequence(QCoreApplication.translate( |
3991 'ViewManager', "Alt+Ctrl+T", "Bookmark|Toggle")), |
3991 'ViewManager', "Alt+Ctrl+T", "Bookmark|Toggle")), |
3992 0, |
3992 0, |
3993 self.bookmarkActGrp, 'vm_bookmark_toggle') |
3993 self.bookmarkActGrp, 'vm_bookmark_toggle') |
4002 self.bookmarkToggleAct.triggered.connect(self.__toggleBookmark) |
4002 self.bookmarkToggleAct.triggered.connect(self.__toggleBookmark) |
4003 self.bookmarkActions.append(self.bookmarkToggleAct) |
4003 self.bookmarkActions.append(self.bookmarkToggleAct) |
4004 |
4004 |
4005 self.bookmarkNextAct = E5Action( |
4005 self.bookmarkNextAct = E5Action( |
4006 QCoreApplication.translate('ViewManager', 'Next Bookmark'), |
4006 QCoreApplication.translate('ViewManager', 'Next Bookmark'), |
4007 UI.PixmapCache.getIcon("bookmarkNext.png"), |
4007 UI.PixmapCache.getIcon("bookmarkNext"), |
4008 QCoreApplication.translate('ViewManager', '&Next Bookmark'), |
4008 QCoreApplication.translate('ViewManager', '&Next Bookmark'), |
4009 QKeySequence(QCoreApplication.translate( |
4009 QKeySequence(QCoreApplication.translate( |
4010 'ViewManager', "Ctrl+PgDown", "Bookmark|Next")), |
4010 'ViewManager', "Ctrl+PgDown", "Bookmark|Next")), |
4011 0, |
4011 0, |
4012 self.bookmarkActGrp, 'vm_bookmark_next') |
4012 self.bookmarkActGrp, 'vm_bookmark_next') |
4020 self.bookmarkNextAct.triggered.connect(self.__nextBookmark) |
4020 self.bookmarkNextAct.triggered.connect(self.__nextBookmark) |
4021 self.bookmarkActions.append(self.bookmarkNextAct) |
4021 self.bookmarkActions.append(self.bookmarkNextAct) |
4022 |
4022 |
4023 self.bookmarkPreviousAct = E5Action( |
4023 self.bookmarkPreviousAct = E5Action( |
4024 QCoreApplication.translate('ViewManager', 'Previous Bookmark'), |
4024 QCoreApplication.translate('ViewManager', 'Previous Bookmark'), |
4025 UI.PixmapCache.getIcon("bookmarkPrevious.png"), |
4025 UI.PixmapCache.getIcon("bookmarkPrevious"), |
4026 QCoreApplication.translate('ViewManager', '&Previous Bookmark'), |
4026 QCoreApplication.translate('ViewManager', '&Previous Bookmark'), |
4027 QKeySequence(QCoreApplication.translate( |
4027 QKeySequence(QCoreApplication.translate( |
4028 'ViewManager', "Ctrl+PgUp", "Bookmark|Previous")), |
4028 'ViewManager', "Ctrl+PgUp", "Bookmark|Previous")), |
4029 0, |
4029 0, |
4030 self.bookmarkActGrp, 'vm_bookmark_previous') |
4030 self.bookmarkActGrp, 'vm_bookmark_previous') |
4055 self.bookmarkClearAct.triggered.connect(self.__clearAllBookmarks) |
4055 self.bookmarkClearAct.triggered.connect(self.__clearAllBookmarks) |
4056 self.bookmarkActions.append(self.bookmarkClearAct) |
4056 self.bookmarkActions.append(self.bookmarkClearAct) |
4057 |
4057 |
4058 self.syntaxErrorGotoAct = E5Action( |
4058 self.syntaxErrorGotoAct = E5Action( |
4059 QCoreApplication.translate('ViewManager', 'Goto Syntax Error'), |
4059 QCoreApplication.translate('ViewManager', 'Goto Syntax Error'), |
4060 UI.PixmapCache.getIcon("syntaxErrorGoto.png"), |
4060 UI.PixmapCache.getIcon("syntaxErrorGoto"), |
4061 QCoreApplication.translate('ViewManager', '&Goto Syntax Error'), |
4061 QCoreApplication.translate('ViewManager', '&Goto Syntax Error'), |
4062 0, 0, |
4062 0, 0, |
4063 self.bookmarkActGrp, 'vm_syntaxerror_goto') |
4063 self.bookmarkActGrp, 'vm_syntaxerror_goto') |
4064 self.syntaxErrorGotoAct.setStatusTip(QCoreApplication.translate( |
4064 self.syntaxErrorGotoAct.setStatusTip(QCoreApplication.translate( |
4065 'ViewManager', 'Goto Syntax Error')) |
4065 'ViewManager', 'Goto Syntax Error')) |
4087 self.__clearAllSyntaxErrors) |
4087 self.__clearAllSyntaxErrors) |
4088 self.bookmarkActions.append(self.syntaxErrorClearAct) |
4088 self.bookmarkActions.append(self.syntaxErrorClearAct) |
4089 |
4089 |
4090 self.warningsNextAct = E5Action( |
4090 self.warningsNextAct = E5Action( |
4091 QCoreApplication.translate('ViewManager', 'Next warning message'), |
4091 QCoreApplication.translate('ViewManager', 'Next warning message'), |
4092 UI.PixmapCache.getIcon("warningNext.png"), |
4092 UI.PixmapCache.getIcon("warningNext"), |
4093 QCoreApplication.translate('ViewManager', '&Next warning message'), |
4093 QCoreApplication.translate('ViewManager', '&Next warning message'), |
4094 0, 0, |
4094 0, 0, |
4095 self.bookmarkActGrp, 'vm_warning_next') |
4095 self.bookmarkActGrp, 'vm_warning_next') |
4096 self.warningsNextAct.setStatusTip(QCoreApplication.translate( |
4096 self.warningsNextAct.setStatusTip(QCoreApplication.translate( |
4097 'ViewManager', 'Next warning message')) |
4097 'ViewManager', 'Next warning message')) |
4105 self.bookmarkActions.append(self.warningsNextAct) |
4105 self.bookmarkActions.append(self.warningsNextAct) |
4106 |
4106 |
4107 self.warningsPreviousAct = E5Action( |
4107 self.warningsPreviousAct = E5Action( |
4108 QCoreApplication.translate( |
4108 QCoreApplication.translate( |
4109 'ViewManager', 'Previous warning message'), |
4109 'ViewManager', 'Previous warning message'), |
4110 UI.PixmapCache.getIcon("warningPrev.png"), |
4110 UI.PixmapCache.getIcon("warningPrev"), |
4111 QCoreApplication.translate( |
4111 QCoreApplication.translate( |
4112 'ViewManager', '&Previous warning message'), |
4112 'ViewManager', '&Previous warning message'), |
4113 0, 0, |
4113 0, 0, |
4114 self.bookmarkActGrp, 'vm_warning_previous') |
4114 self.bookmarkActGrp, 'vm_warning_previous') |
4115 self.warningsPreviousAct.setStatusTip(QCoreApplication.translate( |
4115 self.warningsPreviousAct.setStatusTip(QCoreApplication.translate( |
4140 self.warningsClearAct.triggered.connect(self.__clearAllWarnings) |
4140 self.warningsClearAct.triggered.connect(self.__clearAllWarnings) |
4141 self.bookmarkActions.append(self.warningsClearAct) |
4141 self.bookmarkActions.append(self.warningsClearAct) |
4142 |
4142 |
4143 self.notcoveredNextAct = E5Action( |
4143 self.notcoveredNextAct = E5Action( |
4144 QCoreApplication.translate('ViewManager', 'Next uncovered line'), |
4144 QCoreApplication.translate('ViewManager', 'Next uncovered line'), |
4145 UI.PixmapCache.getIcon("notcoveredNext.png"), |
4145 UI.PixmapCache.getIcon("notcoveredNext"), |
4146 QCoreApplication.translate('ViewManager', '&Next uncovered line'), |
4146 QCoreApplication.translate('ViewManager', '&Next uncovered line'), |
4147 0, 0, |
4147 0, 0, |
4148 self.bookmarkActGrp, 'vm_uncovered_next') |
4148 self.bookmarkActGrp, 'vm_uncovered_next') |
4149 self.notcoveredNextAct.setStatusTip(QCoreApplication.translate( |
4149 self.notcoveredNextAct.setStatusTip(QCoreApplication.translate( |
4150 'ViewManager', 'Next uncovered line')) |
4150 'ViewManager', 'Next uncovered line')) |
4158 self.bookmarkActions.append(self.notcoveredNextAct) |
4158 self.bookmarkActions.append(self.notcoveredNextAct) |
4159 |
4159 |
4160 self.notcoveredPreviousAct = E5Action( |
4160 self.notcoveredPreviousAct = E5Action( |
4161 QCoreApplication.translate( |
4161 QCoreApplication.translate( |
4162 'ViewManager', 'Previous uncovered line'), |
4162 'ViewManager', 'Previous uncovered line'), |
4163 UI.PixmapCache.getIcon("notcoveredPrev.png"), |
4163 UI.PixmapCache.getIcon("notcoveredPrev"), |
4164 QCoreApplication.translate( |
4164 QCoreApplication.translate( |
4165 'ViewManager', '&Previous uncovered line'), |
4165 'ViewManager', '&Previous uncovered line'), |
4166 0, 0, |
4166 0, 0, |
4167 self.bookmarkActGrp, 'vm_uncovered_previous') |
4167 self.bookmarkActGrp, 'vm_uncovered_previous') |
4168 self.notcoveredPreviousAct.setStatusTip(QCoreApplication.translate( |
4168 self.notcoveredPreviousAct.setStatusTip(QCoreApplication.translate( |
4177 self.__previousUncovered) |
4177 self.__previousUncovered) |
4178 self.bookmarkActions.append(self.notcoveredPreviousAct) |
4178 self.bookmarkActions.append(self.notcoveredPreviousAct) |
4179 |
4179 |
4180 self.taskNextAct = E5Action( |
4180 self.taskNextAct = E5Action( |
4181 QCoreApplication.translate('ViewManager', 'Next Task'), |
4181 QCoreApplication.translate('ViewManager', 'Next Task'), |
4182 UI.PixmapCache.getIcon("taskNext.png"), |
4182 UI.PixmapCache.getIcon("taskNext"), |
4183 QCoreApplication.translate('ViewManager', '&Next Task'), |
4183 QCoreApplication.translate('ViewManager', '&Next Task'), |
4184 0, 0, |
4184 0, 0, |
4185 self.bookmarkActGrp, 'vm_task_next') |
4185 self.bookmarkActGrp, 'vm_task_next') |
4186 self.taskNextAct.setStatusTip(QCoreApplication.translate( |
4186 self.taskNextAct.setStatusTip(QCoreApplication.translate( |
4187 'ViewManager', 'Next Task')) |
4187 'ViewManager', 'Next Task')) |
4193 self.taskNextAct.triggered.connect(self.__nextTask) |
4193 self.taskNextAct.triggered.connect(self.__nextTask) |
4194 self.bookmarkActions.append(self.taskNextAct) |
4194 self.bookmarkActions.append(self.taskNextAct) |
4195 |
4195 |
4196 self.taskPreviousAct = E5Action( |
4196 self.taskPreviousAct = E5Action( |
4197 QCoreApplication.translate('ViewManager', 'Previous Task'), |
4197 QCoreApplication.translate('ViewManager', 'Previous Task'), |
4198 UI.PixmapCache.getIcon("taskPrev.png"), |
4198 UI.PixmapCache.getIcon("taskPrev"), |
4199 QCoreApplication.translate( |
4199 QCoreApplication.translate( |
4200 'ViewManager', '&Previous Task'), |
4200 'ViewManager', '&Previous Task'), |
4201 0, 0, |
4201 0, 0, |
4202 self.bookmarkActGrp, 'vm_task_previous') |
4202 self.bookmarkActGrp, 'vm_task_previous') |
4203 self.taskPreviousAct.setStatusTip(QCoreApplication.translate( |
4203 self.taskPreviousAct.setStatusTip(QCoreApplication.translate( |
4211 self.taskPreviousAct.triggered.connect(self.__previousTask) |
4211 self.taskPreviousAct.triggered.connect(self.__previousTask) |
4212 self.bookmarkActions.append(self.taskPreviousAct) |
4212 self.bookmarkActions.append(self.taskPreviousAct) |
4213 |
4213 |
4214 self.changeNextAct = E5Action( |
4214 self.changeNextAct = E5Action( |
4215 QCoreApplication.translate('ViewManager', 'Next Change'), |
4215 QCoreApplication.translate('ViewManager', 'Next Change'), |
4216 UI.PixmapCache.getIcon("changeNext.png"), |
4216 UI.PixmapCache.getIcon("changeNext"), |
4217 QCoreApplication.translate('ViewManager', '&Next Change'), |
4217 QCoreApplication.translate('ViewManager', '&Next Change'), |
4218 0, 0, |
4218 0, 0, |
4219 self.bookmarkActGrp, 'vm_change_next') |
4219 self.bookmarkActGrp, 'vm_change_next') |
4220 self.changeNextAct.setStatusTip(QCoreApplication.translate( |
4220 self.changeNextAct.setStatusTip(QCoreApplication.translate( |
4221 'ViewManager', 'Next Change')) |
4221 'ViewManager', 'Next Change')) |
4228 self.changeNextAct.triggered.connect(self.__nextChange) |
4228 self.changeNextAct.triggered.connect(self.__nextChange) |
4229 self.bookmarkActions.append(self.changeNextAct) |
4229 self.bookmarkActions.append(self.changeNextAct) |
4230 |
4230 |
4231 self.changePreviousAct = E5Action( |
4231 self.changePreviousAct = E5Action( |
4232 QCoreApplication.translate('ViewManager', 'Previous Change'), |
4232 QCoreApplication.translate('ViewManager', 'Previous Change'), |
4233 UI.PixmapCache.getIcon("changePrev.png"), |
4233 UI.PixmapCache.getIcon("changePrev"), |
4234 QCoreApplication.translate( |
4234 QCoreApplication.translate( |
4235 'ViewManager', '&Previous Change'), |
4235 'ViewManager', '&Previous Change'), |
4236 0, 0, |
4236 0, 0, |
4237 self.bookmarkActGrp, 'vm_change_previous') |
4237 self.bookmarkActGrp, 'vm_change_previous') |
4238 self.changePreviousAct.setStatusTip(QCoreApplication.translate( |
4238 self.changePreviousAct.setStatusTip(QCoreApplication.translate( |
4335 """ |
4335 """ |
4336 self.spellingActGrp = createActionGroup(self) |
4336 self.spellingActGrp = createActionGroup(self) |
4337 |
4337 |
4338 self.spellCheckAct = E5Action( |
4338 self.spellCheckAct = E5Action( |
4339 QCoreApplication.translate('ViewManager', 'Check spelling'), |
4339 QCoreApplication.translate('ViewManager', 'Check spelling'), |
4340 UI.PixmapCache.getIcon("spellchecking.png"), |
4340 UI.PixmapCache.getIcon("spellchecking"), |
4341 QCoreApplication.translate( |
4341 QCoreApplication.translate( |
4342 'ViewManager', 'Check &spelling...'), |
4342 'ViewManager', 'Check &spelling...'), |
4343 QKeySequence(QCoreApplication.translate( |
4343 QKeySequence(QCoreApplication.translate( |
4344 'ViewManager', "Shift+F7", "Spelling|Spell Check")), |
4344 'ViewManager', "Shift+F7", "Spelling|Spell Check")), |
4345 0, |
4345 0, |
4355 self.spellingActions.append(self.spellCheckAct) |
4355 self.spellingActions.append(self.spellCheckAct) |
4356 |
4356 |
4357 self.autoSpellCheckAct = E5Action( |
4357 self.autoSpellCheckAct = E5Action( |
4358 QCoreApplication.translate( |
4358 QCoreApplication.translate( |
4359 'ViewManager', 'Automatic spell checking'), |
4359 'ViewManager', 'Automatic spell checking'), |
4360 UI.PixmapCache.getIcon("autospellchecking.png"), |
4360 UI.PixmapCache.getIcon("autospellchecking"), |
4361 QCoreApplication.translate( |
4361 QCoreApplication.translate( |
4362 'ViewManager', '&Automatic spell checking'), |
4362 'ViewManager', '&Automatic spell checking'), |
4363 0, 0, |
4363 0, 0, |
4364 self.spellingActGrp, 'vm_spelling_autospellcheck', True) |
4364 self.spellingActGrp, 'vm_spelling_autospellcheck', True) |
4365 self.autoSpellCheckAct.setStatusTip(QCoreApplication.translate( |
4365 self.autoSpellCheckAct.setStatusTip(QCoreApplication.translate( |
4912 self.sbEnc.setText(encoding) |
4912 self.sbEnc.setText(encoding) |
4913 |
4913 |
4914 if language is None: |
4914 if language is None: |
4915 pixmap = QPixmap() |
4915 pixmap = QPixmap() |
4916 elif language == "": |
4916 elif language == "": |
4917 pixmap = UI.PixmapCache.getPixmap("fileText.png") |
4917 pixmap = UI.PixmapCache.getPixmap("fileText") |
4918 else: |
4918 else: |
4919 import QScintilla.Lexers |
4919 import QScintilla.Lexers |
4920 pixmap = QScintilla.Lexers.getLanguageIcon(language, True) |
4920 pixmap = QScintilla.Lexers.getLanguageIcon(language, True) |
4921 self.sbLang.setPixmap(pixmap) |
4921 self.sbLang.setPixmap(pixmap) |
4922 if pixmap.isNull(): |
4922 if pixmap.isNull(): |
4951 |
4951 |
4952 @param eolIndicator eol indicator string (string) |
4952 @param eolIndicator eol indicator string (string) |
4953 @return pixmap for the eol indicator (QPixmap) |
4953 @return pixmap for the eol indicator (QPixmap) |
4954 """ |
4954 """ |
4955 if eolIndicator == "LF": |
4955 if eolIndicator == "LF": |
4956 pixmap = UI.PixmapCache.getPixmap("eolLinux.png") |
4956 pixmap = UI.PixmapCache.getPixmap("eolLinux") |
4957 elif eolIndicator == "CR": |
4957 elif eolIndicator == "CR": |
4958 pixmap = UI.PixmapCache.getPixmap("eolMac.png") |
4958 pixmap = UI.PixmapCache.getPixmap("eolMac") |
4959 elif eolIndicator == "CRLF": |
4959 elif eolIndicator == "CRLF": |
4960 pixmap = UI.PixmapCache.getPixmap("eolWindows.png") |
4960 pixmap = UI.PixmapCache.getPixmap("eolWindows") |
4961 else: |
4961 else: |
4962 pixmap = QPixmap() |
4962 pixmap = QPixmap() |
4963 return pixmap |
4963 return pixmap |
4964 |
4964 |
4965 def __unhighlight(self): |
4965 def __unhighlight(self): |
6177 (boolean). True means splitting horizontally. |
6177 (boolean). True means splitting horizontally. |
6178 """ |
6178 """ |
6179 if checked: |
6179 if checked: |
6180 self.setSplitOrientation(Qt.Horizontal) |
6180 self.setSplitOrientation(Qt.Horizontal) |
6181 self.splitViewAct.setIcon( |
6181 self.splitViewAct.setIcon( |
6182 UI.PixmapCache.getIcon("splitHorizontal.png")) |
6182 UI.PixmapCache.getIcon("splitHorizontal")) |
6183 self.splitRemoveAct.setIcon( |
6183 self.splitRemoveAct.setIcon( |
6184 UI.PixmapCache.getIcon("remsplitHorizontal.png")) |
6184 UI.PixmapCache.getIcon("remsplitHorizontal")) |
6185 self.newDocumentSplitViewAct.setIcon( |
6185 self.newDocumentSplitViewAct.setIcon( |
6186 UI.PixmapCache.getIcon("splitHorizontal.png")) |
6186 UI.PixmapCache.getIcon("splitHorizontal")) |
6187 else: |
6187 else: |
6188 self.setSplitOrientation(Qt.Vertical) |
6188 self.setSplitOrientation(Qt.Vertical) |
6189 self.splitViewAct.setIcon( |
6189 self.splitViewAct.setIcon( |
6190 UI.PixmapCache.getIcon("splitVertical.png")) |
6190 UI.PixmapCache.getIcon("splitVertical")) |
6191 self.splitRemoveAct.setIcon( |
6191 self.splitRemoveAct.setIcon( |
6192 UI.PixmapCache.getIcon("remsplitVertical.png")) |
6192 UI.PixmapCache.getIcon("remsplitVertical")) |
6193 self.newDocumentSplitViewAct.setIcon( |
6193 self.newDocumentSplitViewAct.setIcon( |
6194 UI.PixmapCache.getIcon("splitVertical.png")) |
6194 UI.PixmapCache.getIcon("splitVertical")) |
6195 Preferences.setUI("SplitOrientationVertical", checked) |
6195 Preferences.setUI("SplitOrientationVertical", checked) |
6196 |
6196 |
6197 def __previewEditor(self, checked): |
6197 def __previewEditor(self, checked): |
6198 """ |
6198 """ |
6199 Private slot to handle a change of the preview selection state. |
6199 Private slot to handle a change of the preview selection state. |
6599 dictionaryFile, str(err))) |
6599 dictionaryFile, str(err))) |
6600 return |
6600 return |
6601 |
6601 |
6602 if self.ui.notificationsEnabled(): |
6602 if self.ui.notificationsEnabled(): |
6603 self.ui.showNotification( |
6603 self.ui.showNotification( |
6604 UI.PixmapCache.getPixmap("spellchecking48.png"), |
6604 UI.PixmapCache.getPixmap("spellchecking48"), |
6605 QCoreApplication.translate( |
6605 QCoreApplication.translate( |
6606 'ViewManager', "Edit Spelling Dictionary"), |
6606 'ViewManager', "Edit Spelling Dictionary"), |
6607 QCoreApplication.translate( |
6607 QCoreApplication.translate( |
6608 'ViewManager', |
6608 'ViewManager', |
6609 "The spelling dictionary was saved successfully.")) |
6609 "The spelling dictionary was saved successfully.")) |