508 |
508 |
509 def __initFileActions(self): |
509 def __initFileActions(self): |
510 """ |
510 """ |
511 Private method defining the user interface actions for file handling. |
511 Private method defining the user interface actions for file handling. |
512 """ |
512 """ |
513 self.newAct = E5Action(QApplication.translate('ViewManager', 'New'), |
513 self.newAct = E5Action( |
|
514 QApplication.translate('ViewManager', 'New'), |
514 UI.PixmapCache.getIcon("new.png"), |
515 UI.PixmapCache.getIcon("new.png"), |
515 QApplication.translate('ViewManager', '&New'), |
516 QApplication.translate('ViewManager', '&New'), |
516 QKeySequence( |
517 QKeySequence( |
517 QApplication.translate('ViewManager', "Ctrl+N", "File|New")), |
518 QApplication.translate('ViewManager', "Ctrl+N", "File|New")), |
518 0, self, 'vm_file_new') |
519 0, self, 'vm_file_new') |
519 self.newAct.setStatusTip( |
520 self.newAct.setStatusTip( |
520 QApplication.translate( |
521 QApplication.translate( |
521 'ViewManager', 'Open an empty editor window')) |
522 'ViewManager', 'Open an empty editor window')) |
522 self.newAct.setWhatsThis(QApplication.translate('ViewManager', |
523 self.newAct.setWhatsThis(QApplication.translate( |
|
524 'ViewManager', |
523 """<b>New</b>""" |
525 """<b>New</b>""" |
524 """<p>An empty editor window will be created.</p>""" |
526 """<p>An empty editor window will be created.</p>""" |
525 )) |
527 )) |
526 self.newAct.triggered[()].connect(self.newEditor) |
528 self.newAct.triggered[()].connect(self.newEditor) |
527 self.fileActions.append(self.newAct) |
529 self.fileActions.append(self.newAct) |
528 |
530 |
529 self.openAct = E5Action(QApplication.translate('ViewManager', 'Open'), |
531 self.openAct = E5Action( |
|
532 QApplication.translate('ViewManager', 'Open'), |
530 UI.PixmapCache.getIcon("open.png"), |
533 UI.PixmapCache.getIcon("open.png"), |
531 QApplication.translate('ViewManager', '&Open...'), |
534 QApplication.translate('ViewManager', '&Open...'), |
532 QKeySequence( |
535 QKeySequence( |
533 QApplication.translate('ViewManager', "Ctrl+O", "File|Open")), |
536 QApplication.translate('ViewManager', "Ctrl+O", "File|Open")), |
534 0, self, 'vm_file_open') |
537 0, self, 'vm_file_open') |
585 QKeySequence(QApplication.translate( |
590 QKeySequence(QApplication.translate( |
586 'ViewManager', "Ctrl+S", "File|Save")), |
591 'ViewManager', "Ctrl+S", "File|Save")), |
587 0, self.saveActGrp, 'vm_file_save') |
592 0, self.saveActGrp, 'vm_file_save') |
588 self.saveAct.setStatusTip( |
593 self.saveAct.setStatusTip( |
589 QApplication.translate('ViewManager', 'Save the current file')) |
594 QApplication.translate('ViewManager', 'Save the current file')) |
590 self.saveAct.setWhatsThis(QApplication.translate('ViewManager', |
595 self.saveAct.setWhatsThis(QApplication.translate( |
|
596 'ViewManager', |
591 """<b>Save File</b>""" |
597 """<b>Save File</b>""" |
592 """<p>Save the contents of current editor window.</p>""" |
598 """<p>Save the contents of current editor window.</p>""" |
593 )) |
599 )) |
594 self.saveAct.triggered[()].connect(self.saveCurrentEditor) |
600 self.saveAct.triggered[()].connect(self.saveCurrentEditor) |
595 self.fileActions.append(self.saveAct) |
601 self.fileActions.append(self.saveAct) |
596 |
602 |
597 self.saveAsAct = E5Action( |
603 self.saveAsAct = E5Action( |
598 QApplication.translate('ViewManager', 'Save as'), |
604 QApplication.translate('ViewManager', 'Save as'), |
599 UI.PixmapCache.getIcon("fileSaveAs.png"), |
605 UI.PixmapCache.getIcon("fileSaveAs.png"), |
600 QApplication.translate('ViewManager', 'Save &as...'), |
606 QApplication.translate('ViewManager', 'Save &as...'), |
601 QKeySequence(QApplication.translate('ViewManager', |
607 QKeySequence(QApplication.translate( |
602 "Shift+Ctrl+S", "File|Save As")), |
608 'ViewManager', "Shift+Ctrl+S", "File|Save As")), |
603 0, self.saveActGrp, 'vm_file_save_as') |
609 0, self.saveActGrp, 'vm_file_save_as') |
604 self.saveAsAct.setStatusTip(QApplication.translate('ViewManager', |
610 self.saveAsAct.setStatusTip(QApplication.translate( |
605 'Save the current file to a new one')) |
611 'ViewManager', 'Save the current file to a new one')) |
606 self.saveAsAct.setWhatsThis(QApplication.translate('ViewManager', |
612 self.saveAsAct.setWhatsThis(QApplication.translate( |
|
613 'ViewManager', |
607 """<b>Save File as</b>""" |
614 """<b>Save File as</b>""" |
608 """<p>Save the contents of current editor window to a new file.""" |
615 """<p>Save the contents of current editor window to a new file.""" |
609 """ The file can be entered in a file selection dialog.</p>""" |
616 """ The file can be entered in a file selection dialog.</p>""" |
610 )) |
617 )) |
611 self.saveAsAct.triggered[()].connect(self.saveAsCurrentEditor) |
618 self.saveAsAct.triggered[()].connect(self.saveAsCurrentEditor) |
629 |
637 |
630 self.printAct = E5Action( |
638 self.printAct = E5Action( |
631 QApplication.translate('ViewManager', 'Print'), |
639 QApplication.translate('ViewManager', 'Print'), |
632 UI.PixmapCache.getIcon("print.png"), |
640 UI.PixmapCache.getIcon("print.png"), |
633 QApplication.translate('ViewManager', '&Print'), |
641 QApplication.translate('ViewManager', '&Print'), |
634 QKeySequence(QApplication.translate('ViewManager', |
642 QKeySequence(QApplication.translate( |
635 "Ctrl+P", "File|Print")), |
643 'ViewManager', "Ctrl+P", "File|Print")), |
636 0, self, 'vm_file_print') |
644 0, self, 'vm_file_print') |
637 self.printAct.setStatusTip(QApplication.translate('ViewManager', |
645 self.printAct.setStatusTip(QApplication.translate( |
638 'Print the current file')) |
646 'ViewManager', 'Print the current file')) |
639 self.printAct.setWhatsThis(QApplication.translate('ViewManager', |
647 self.printAct.setWhatsThis(QApplication.translate( |
|
648 'ViewManager', |
640 """<b>Print File</b>""" |
649 """<b>Print File</b>""" |
641 """<p>Print the contents of current editor window.</p>""" |
650 """<p>Print the contents of current editor window.</p>""" |
642 )) |
651 )) |
643 self.printAct.triggered[()].connect(self.printCurrentEditor) |
652 self.printAct.triggered[()].connect(self.printCurrentEditor) |
644 self.printAct.setEnabled(False) |
653 self.printAct.setEnabled(False) |
645 self.fileActions.append(self.printAct) |
654 self.fileActions.append(self.printAct) |
646 |
655 |
647 self.printPreviewAct = \ |
656 self.printPreviewAct = E5Action( |
648 E5Action(QApplication.translate('ViewManager', 'Print Preview'), |
657 QApplication.translate('ViewManager', 'Print Preview'), |
649 UI.PixmapCache.getIcon("printPreview.png"), |
658 UI.PixmapCache.getIcon("printPreview.png"), |
650 QApplication.translate('ViewManager', 'Print Preview'), |
659 QApplication.translate('ViewManager', 'Print Preview'), |
651 0, 0, self, 'vm_file_print_preview') |
660 0, 0, self, 'vm_file_print_preview') |
652 self.printPreviewAct.setStatusTip(QApplication.translate('ViewManager', |
661 self.printPreviewAct.setStatusTip(QApplication.translate( |
653 'Print preview of the current file')) |
662 'ViewManager', 'Print preview of the current file')) |
654 self.printPreviewAct.setWhatsThis(QApplication.translate('ViewManager', |
663 self.printPreviewAct.setWhatsThis(QApplication.translate( |
|
664 'ViewManager', |
655 """<b>Print Preview</b>""" |
665 """<b>Print Preview</b>""" |
656 """<p>Print preview of the current editor window.</p>""" |
666 """<p>Print preview of the current editor window.</p>""" |
657 )) |
667 )) |
658 self.printPreviewAct.triggered[()].connect( |
668 self.printPreviewAct.triggered[()].connect( |
659 self.printPreviewCurrentEditor) |
669 self.printPreviewCurrentEditor) |
660 self.printPreviewAct.setEnabled(False) |
670 self.printPreviewAct.setEnabled(False) |
661 self.fileActions.append(self.printPreviewAct) |
671 self.fileActions.append(self.printPreviewAct) |
662 |
672 |
663 self.findFileNameAct = E5Action(QApplication.translate('ViewManager', |
673 self.findFileNameAct = E5Action( |
664 'Search File'), |
674 QApplication.translate('ViewManager', 'Search File'), |
665 QApplication.translate('ViewManager', 'Search &File...'), |
675 QApplication.translate('ViewManager', 'Search &File...'), |
666 QKeySequence(QApplication.translate('ViewManager', |
676 QKeySequence(QApplication.translate( |
667 "Alt+Ctrl+F", "File|Search File")), |
677 'ViewManager', "Alt+Ctrl+F", "File|Search File")), |
668 0, self, 'vm_file_search_file') |
678 0, self, 'vm_file_search_file') |
669 self.findFileNameAct.setStatusTip(QApplication.translate('ViewManager', |
679 self.findFileNameAct.setStatusTip(QApplication.translate( |
670 'Search for a file')) |
680 'ViewManager', 'Search for a file')) |
671 self.findFileNameAct.setWhatsThis(QApplication.translate('ViewManager', |
681 self.findFileNameAct.setWhatsThis(QApplication.translate( |
|
682 'ViewManager', |
672 """<b>Search File</b>""" |
683 """<b>Search File</b>""" |
673 """<p>Search for a file.</p>""" |
684 """<p>Search for a file.</p>""" |
674 )) |
685 )) |
675 self.findFileNameAct.triggered[()].connect(self.__findFileName) |
686 self.findFileNameAct.triggered[()].connect(self.__findFileName) |
676 self.fileActions.append(self.findFileNameAct) |
687 self.fileActions.append(self.findFileNameAct) |
772 Private method defining the user interface actions for the edit |
785 Private method defining the user interface actions for the edit |
773 commands. |
786 commands. |
774 """ |
787 """ |
775 self.editActGrp = createActionGroup(self) |
788 self.editActGrp = createActionGroup(self) |
776 |
789 |
777 self.undoAct = E5Action(QApplication.translate('ViewManager', 'Undo'), |
790 self.undoAct = E5Action( |
778 UI.PixmapCache.getIcon("editUndo.png"), |
791 QApplication.translate('ViewManager', 'Undo'), |
779 QApplication.translate('ViewManager', '&Undo'), |
792 UI.PixmapCache.getIcon("editUndo.png"), |
780 QKeySequence(QApplication.translate('ViewManager', |
793 QApplication.translate('ViewManager', '&Undo'), |
781 "Ctrl+Z", "Edit|Undo")), |
794 QKeySequence(QApplication.translate( |
782 QKeySequence(QApplication.translate('ViewManager', |
795 'ViewManager', "Ctrl+Z", "Edit|Undo")), |
783 "Alt+Backspace", "Edit|Undo")), |
796 QKeySequence(QApplication.translate( |
784 self.editActGrp, 'vm_edit_undo') |
797 'ViewManager', "Alt+Backspace", "Edit|Undo")), |
785 self.undoAct.setStatusTip(QApplication.translate('ViewManager', |
798 self.editActGrp, 'vm_edit_undo') |
786 'Undo the last change')) |
799 self.undoAct.setStatusTip(QApplication.translate( |
787 self.undoAct.setWhatsThis(QApplication.translate('ViewManager', |
800 'ViewManager', 'Undo the last change')) |
|
801 self.undoAct.setWhatsThis(QApplication.translate( |
|
802 'ViewManager', |
788 """<b>Undo</b>""" |
803 """<b>Undo</b>""" |
789 """<p>Undo the last change done in the current editor.</p>""" |
804 """<p>Undo the last change done in the current editor.</p>""" |
790 )) |
805 )) |
791 self.undoAct.triggered[()].connect(self.__editUndo) |
806 self.undoAct.triggered[()].connect(self.__editUndo) |
792 self.editActions.append(self.undoAct) |
807 self.editActions.append(self.undoAct) |
793 |
808 |
794 self.redoAct = E5Action(QApplication.translate('ViewManager', 'Redo'), |
809 self.redoAct = E5Action( |
795 UI.PixmapCache.getIcon("editRedo.png"), |
810 QApplication.translate('ViewManager', 'Redo'), |
796 QApplication.translate('ViewManager', '&Redo'), |
811 UI.PixmapCache.getIcon("editRedo.png"), |
797 QKeySequence(QApplication.translate('ViewManager', |
812 QApplication.translate('ViewManager', '&Redo'), |
798 "Ctrl+Shift+Z", "Edit|Redo")), |
813 QKeySequence(QApplication.translate( |
799 0, |
814 'ViewManager', "Ctrl+Shift+Z", "Edit|Redo")), |
800 self.editActGrp, 'vm_edit_redo') |
815 0, |
801 self.redoAct.setStatusTip(QApplication.translate('ViewManager', |
816 self.editActGrp, 'vm_edit_redo') |
802 'Redo the last change')) |
817 self.redoAct.setStatusTip(QApplication.translate( |
803 self.redoAct.setWhatsThis(QApplication.translate('ViewManager', |
818 'ViewManager', 'Redo the last change')) |
|
819 self.redoAct.setWhatsThis(QApplication.translate( |
|
820 'ViewManager', |
804 """<b>Redo</b>""" |
821 """<b>Redo</b>""" |
805 """<p>Redo the last change done in the current editor.</p>""" |
822 """<p>Redo the last change done in the current editor.</p>""" |
806 )) |
823 )) |
807 self.redoAct.triggered[()].connect(self.__editRedo) |
824 self.redoAct.triggered[()].connect(self.__editRedo) |
808 self.editActions.append(self.redoAct) |
825 self.editActions.append(self.redoAct) |
809 |
826 |
810 self.revertAct = E5Action(QApplication.translate('ViewManager', |
827 self.revertAct = E5Action( |
811 'Revert to last saved state'), |
828 QApplication.translate( |
812 QApplication.translate( |
829 'ViewManager', 'Revert to last saved state'), |
813 'ViewManager', 'Re&vert to last saved state'), |
830 QApplication.translate( |
814 QKeySequence(QApplication.translate('ViewManager', |
831 'ViewManager', 'Re&vert to last saved state'), |
815 "Ctrl+Y", "Edit|Revert")), |
832 QKeySequence(QApplication.translate( |
816 0, |
833 'ViewManager', "Ctrl+Y", "Edit|Revert")), |
817 self.editActGrp, 'vm_edit_revert') |
834 0, |
818 self.revertAct.setStatusTip(QApplication.translate('ViewManager', |
835 self.editActGrp, 'vm_edit_revert') |
819 'Revert to last saved state')) |
836 self.revertAct.setStatusTip(QApplication.translate( |
820 self.revertAct.setWhatsThis(QApplication.translate('ViewManager', |
837 'ViewManager', 'Revert to last saved state')) |
|
838 self.revertAct.setWhatsThis(QApplication.translate( |
|
839 'ViewManager', |
821 """<b>Revert to last saved state</b>""" |
840 """<b>Revert to last saved state</b>""" |
822 """<p>Undo all changes up to the last saved state""" |
841 """<p>Undo all changes up to the last saved state""" |
823 """ of the current editor.</p>""" |
842 """ of the current editor.</p>""" |
824 )) |
843 )) |
825 self.revertAct.triggered[()].connect(self.__editRevert) |
844 self.revertAct.triggered[()].connect(self.__editRevert) |
826 self.editActions.append(self.revertAct) |
845 self.editActions.append(self.revertAct) |
827 |
846 |
828 self.copyActGrp = createActionGroup(self.editActGrp) |
847 self.copyActGrp = createActionGroup(self.editActGrp) |
829 |
848 |
830 self.cutAct = E5Action(QApplication.translate('ViewManager', 'Cut'), |
849 self.cutAct = E5Action( |
831 UI.PixmapCache.getIcon("editCut.png"), |
850 QApplication.translate('ViewManager', 'Cut'), |
832 QApplication.translate('ViewManager', 'Cu&t'), |
851 UI.PixmapCache.getIcon("editCut.png"), |
833 QKeySequence(QApplication.translate('ViewManager', |
852 QApplication.translate('ViewManager', 'Cu&t'), |
834 "Ctrl+X", "Edit|Cut")), |
853 QKeySequence(QApplication.translate( |
835 QKeySequence(QApplication.translate('ViewManager', |
854 'ViewManager', "Ctrl+X", "Edit|Cut")), |
836 "Shift+Del", "Edit|Cut")), |
855 QKeySequence(QApplication.translate( |
837 self.copyActGrp, 'vm_edit_cut') |
856 'ViewManager', "Shift+Del", "Edit|Cut")), |
838 self.cutAct.setStatusTip(QApplication.translate('ViewManager', |
857 self.copyActGrp, 'vm_edit_cut') |
839 'Cut the selection')) |
858 self.cutAct.setStatusTip(QApplication.translate( |
840 self.cutAct.setWhatsThis(QApplication.translate('ViewManager', |
859 'ViewManager', 'Cut the selection')) |
|
860 self.cutAct.setWhatsThis(QApplication.translate( |
|
861 'ViewManager', |
841 """<b>Cut</b>""" |
862 """<b>Cut</b>""" |
842 """<p>Cut the selected text of the current editor to the""" |
863 """<p>Cut the selected text of the current editor to the""" |
843 """ clipboard.</p>""" |
864 """ clipboard.</p>""" |
844 )) |
865 )) |
845 self.cutAct.triggered[()].connect(self.__editCut) |
866 self.cutAct.triggered[()].connect(self.__editCut) |
846 self.editActions.append(self.cutAct) |
867 self.editActions.append(self.cutAct) |
847 |
868 |
848 self.copyAct = E5Action(QApplication.translate('ViewManager', 'Copy'), |
869 self.copyAct = E5Action( |
849 UI.PixmapCache.getIcon("editCopy.png"), |
870 QApplication.translate('ViewManager', 'Copy'), |
850 QApplication.translate('ViewManager', '&Copy'), |
871 UI.PixmapCache.getIcon("editCopy.png"), |
851 QKeySequence(QApplication.translate('ViewManager', |
872 QApplication.translate('ViewManager', '&Copy'), |
852 "Ctrl+C", "Edit|Copy")), |
873 QKeySequence(QApplication.translate( |
853 QKeySequence(QApplication.translate('ViewManager', |
874 'ViewManager', "Ctrl+C", "Edit|Copy")), |
854 "Ctrl+Ins", "Edit|Copy")), |
875 QKeySequence(QApplication.translate( |
855 self.copyActGrp, 'vm_edit_copy') |
876 'ViewManager', "Ctrl+Ins", "Edit|Copy")), |
856 self.copyAct.setStatusTip(QApplication.translate('ViewManager', |
877 self.copyActGrp, 'vm_edit_copy') |
857 'Copy the selection')) |
878 self.copyAct.setStatusTip(QApplication.translate( |
858 self.copyAct.setWhatsThis(QApplication.translate('ViewManager', |
879 'ViewManager', 'Copy the selection')) |
|
880 self.copyAct.setWhatsThis(QApplication.translate( |
|
881 'ViewManager', |
859 """<b>Copy</b>""" |
882 """<b>Copy</b>""" |
860 """<p>Copy the selected text of the current editor to the""" |
883 """<p>Copy the selected text of the current editor to the""" |
861 """ clipboard.</p>""" |
884 """ clipboard.</p>""" |
862 )) |
885 )) |
863 self.copyAct.triggered[()].connect(self.__editCopy) |
886 self.copyAct.triggered[()].connect(self.__editCopy) |
884 |
908 |
885 self.deleteAct = E5Action( |
909 self.deleteAct = E5Action( |
886 QApplication.translate('ViewManager', 'Clear'), |
910 QApplication.translate('ViewManager', 'Clear'), |
887 UI.PixmapCache.getIcon("editDelete.png"), |
911 UI.PixmapCache.getIcon("editDelete.png"), |
888 QApplication.translate('ViewManager', 'Clear'), |
912 QApplication.translate('ViewManager', 'Clear'), |
889 QKeySequence(QApplication.translate('ViewManager', |
913 QKeySequence(QApplication.translate( |
890 "Alt+Shift+C", "Edit|Clear")), |
914 'ViewManager', "Alt+Shift+C", "Edit|Clear")), |
891 0, |
915 0, |
892 self.copyActGrp, 'vm_edit_clear') |
916 self.copyActGrp, 'vm_edit_clear') |
893 self.deleteAct.setStatusTip(QApplication.translate('ViewManager', |
917 self.deleteAct.setStatusTip(QApplication.translate( |
894 'Clear all text')) |
918 'ViewManager', 'Clear all text')) |
895 self.deleteAct.setWhatsThis(QApplication.translate('ViewManager', |
919 self.deleteAct.setWhatsThis(QApplication.translate( |
|
920 'ViewManager', |
896 """<b>Clear</b>""" |
921 """<b>Clear</b>""" |
897 """<p>Delete all text of the current editor.</p>""" |
922 """<p>Delete all text of the current editor.</p>""" |
898 )) |
923 )) |
899 self.deleteAct.triggered[()].connect(self.__editDelete) |
924 self.deleteAct.triggered[()].connect(self.__editDelete) |
900 self.editActions.append(self.deleteAct) |
925 self.editActions.append(self.deleteAct) |
901 |
926 |
902 self.joinAct = E5Action( |
927 self.joinAct = E5Action( |
903 QApplication.translate('ViewManager', 'Join Lines'), |
928 QApplication.translate('ViewManager', 'Join Lines'), |
904 QApplication.translate('ViewManager', 'Join Lines'), |
929 QApplication.translate('ViewManager', 'Join Lines'), |
905 QKeySequence(QApplication.translate('ViewManager', |
930 QKeySequence(QApplication.translate( |
906 "Ctrl+J", "Edit|Join Lines")), |
931 'ViewManager', "Ctrl+J", "Edit|Join Lines")), |
907 0, |
932 0, |
908 self.copyActGrp, 'vm_edit_join_lines') |
933 self.copyActGrp, 'vm_edit_join_lines') |
909 self.joinAct.setStatusTip(QApplication.translate('ViewManager', |
934 self.joinAct.setStatusTip(QApplication.translate( |
910 'Join Lines')) |
935 'ViewManager', 'Join Lines')) |
911 self.joinAct.setWhatsThis(QApplication.translate('ViewManager', |
936 self.joinAct.setWhatsThis(QApplication.translate( |
|
937 'ViewManager', |
912 """<b>Join Lines</b>""" |
938 """<b>Join Lines</b>""" |
913 """<p>Join the current and the next lines.</p>""" |
939 """<p>Join the current and the next lines.</p>""" |
914 )) |
940 )) |
915 self.joinAct.triggered[()].connect(self.__editJoin) |
941 self.joinAct.triggered[()].connect(self.__editJoin) |
916 self.editActions.append(self.joinAct) |
942 self.editActions.append(self.joinAct) |
917 |
943 |
918 self.indentAct = E5Action( |
944 self.indentAct = E5Action( |
919 QApplication.translate('ViewManager', 'Indent'), |
945 QApplication.translate('ViewManager', 'Indent'), |
920 UI.PixmapCache.getIcon("editIndent.png"), |
946 UI.PixmapCache.getIcon("editIndent.png"), |
921 QApplication.translate('ViewManager', '&Indent'), |
947 QApplication.translate('ViewManager', '&Indent'), |
922 QKeySequence(QApplication.translate('ViewManager', |
948 QKeySequence(QApplication.translate( |
923 "Ctrl+I", "Edit|Indent")), |
949 'ViewManager', "Ctrl+I", "Edit|Indent")), |
924 0, |
950 0, |
925 self.editActGrp, 'vm_edit_indent') |
951 self.editActGrp, 'vm_edit_indent') |
926 self.indentAct.setStatusTip(QApplication.translate('ViewManager', |
952 self.indentAct.setStatusTip(QApplication.translate( |
927 'Indent line')) |
953 'ViewManager', 'Indent line')) |
928 self.indentAct.setWhatsThis(QApplication.translate('ViewManager', |
954 self.indentAct.setWhatsThis(QApplication.translate( |
|
955 'ViewManager', |
929 """<b>Indent</b>""" |
956 """<b>Indent</b>""" |
930 """<p>Indents the current line or the lines of the""" |
957 """<p>Indents the current line or the lines of the""" |
931 """ selection by one level.</p>""" |
958 """ selection by one level.</p>""" |
932 )) |
959 )) |
933 self.indentAct.triggered[()].connect(self.__editIndent) |
960 self.indentAct.triggered[()].connect(self.__editIndent) |
935 |
962 |
936 self.unindentAct = E5Action( |
963 self.unindentAct = E5Action( |
937 QApplication.translate('ViewManager', 'Unindent'), |
964 QApplication.translate('ViewManager', 'Unindent'), |
938 UI.PixmapCache.getIcon("editUnindent.png"), |
965 UI.PixmapCache.getIcon("editUnindent.png"), |
939 QApplication.translate('ViewManager', 'U&nindent'), |
966 QApplication.translate('ViewManager', 'U&nindent'), |
940 QKeySequence(QApplication.translate('ViewManager', |
967 QKeySequence(QApplication.translate( |
941 "Ctrl+Shift+I", "Edit|Unindent")), |
968 'ViewManager', "Ctrl+Shift+I", "Edit|Unindent")), |
942 0, |
969 0, |
943 self.editActGrp, 'vm_edit_unindent') |
970 self.editActGrp, 'vm_edit_unindent') |
944 self.unindentAct.setStatusTip(QApplication.translate('ViewManager', |
971 self.unindentAct.setStatusTip(QApplication.translate( |
945 'Unindent line')) |
972 'ViewManager', 'Unindent line')) |
946 self.unindentAct.setWhatsThis(QApplication.translate('ViewManager', |
973 self.unindentAct.setWhatsThis(QApplication.translate( |
|
974 'ViewManager', |
947 """<b>Unindent</b>""" |
975 """<b>Unindent</b>""" |
948 """<p>Unindents the current line or the lines of the""" |
976 """<p>Unindents the current line or the lines of the""" |
949 """ selection by one level.</p>""" |
977 """ selection by one level.</p>""" |
950 )) |
978 )) |
951 self.unindentAct.triggered[()].connect(self.__editUnindent) |
979 self.unindentAct.triggered[()].connect(self.__editUnindent) |
952 self.editActions.append(self.unindentAct) |
980 self.editActions.append(self.unindentAct) |
953 |
981 |
954 self.smartIndentAct = E5Action(QApplication.translate('ViewManager', |
982 self.smartIndentAct = E5Action( |
955 'Smart indent'), |
983 QApplication.translate('ViewManager', 'Smart indent'), |
956 UI.PixmapCache.getIcon("editSmartIndent.png"), |
984 UI.PixmapCache.getIcon("editSmartIndent.png"), |
957 QApplication.translate('ViewManager', 'Smart indent'), |
985 QApplication.translate('ViewManager', 'Smart indent'), |
958 QKeySequence(QApplication.translate('ViewManager', |
986 QKeySequence(QApplication.translate( |
959 "Ctrl+Alt+I", "Edit|Smart indent")), |
987 'ViewManager', "Ctrl+Alt+I", "Edit|Smart indent")), |
960 0, |
988 0, |
961 self.editActGrp, 'vm_edit_smart_indent') |
989 self.editActGrp, 'vm_edit_smart_indent') |
962 self.smartIndentAct.setStatusTip(QApplication.translate('ViewManager', |
990 self.smartIndentAct.setStatusTip(QApplication.translate( |
963 'Smart indent Line or Selection')) |
991 'ViewManager', 'Smart indent Line or Selection')) |
964 self.smartIndentAct.setWhatsThis(QApplication.translate('ViewManager', |
992 self.smartIndentAct.setWhatsThis(QApplication.translate( |
|
993 'ViewManager', |
965 """<b>Smart indent</b>""" |
994 """<b>Smart indent</b>""" |
966 """<p>Indents the current line or the lines of the""" |
995 """<p>Indents the current line or the lines of the""" |
967 """ current selection smartly.</p>""" |
996 """ current selection smartly.</p>""" |
968 )) |
997 )) |
969 self.smartIndentAct.triggered[()].connect(self.__editSmartIndent) |
998 self.smartIndentAct.triggered[()].connect(self.__editSmartIndent) |
989 |
1019 |
990 self.uncommentAct = E5Action( |
1020 self.uncommentAct = E5Action( |
991 QApplication.translate('ViewManager', 'Uncomment'), |
1021 QApplication.translate('ViewManager', 'Uncomment'), |
992 UI.PixmapCache.getIcon("editUncomment.png"), |
1022 UI.PixmapCache.getIcon("editUncomment.png"), |
993 QApplication.translate('ViewManager', 'Unco&mment'), |
1023 QApplication.translate('ViewManager', 'Unco&mment'), |
994 QKeySequence(QApplication.translate('ViewManager', |
1024 QKeySequence(QApplication.translate( |
995 "Alt+Ctrl+M", "Edit|Uncomment")), |
1025 'ViewManager', "Alt+Ctrl+M", "Edit|Uncomment")), |
996 0, |
1026 0, |
997 self.editActGrp, 'vm_edit_uncomment') |
1027 self.editActGrp, 'vm_edit_uncomment') |
998 self.uncommentAct.setStatusTip(QApplication.translate('ViewManager', |
1028 self.uncommentAct.setStatusTip(QApplication.translate( |
999 'Uncomment Line or Selection')) |
1029 'ViewManager', 'Uncomment Line or Selection')) |
1000 self.uncommentAct.setWhatsThis(QApplication.translate('ViewManager', |
1030 self.uncommentAct.setWhatsThis(QApplication.translate( |
|
1031 'ViewManager', |
1001 """<b>Uncomment</b>""" |
1032 """<b>Uncomment</b>""" |
1002 """<p>Uncomments the current line or the lines of the""" |
1033 """<p>Uncomments the current line or the lines of the""" |
1003 """ current selection.</p>""" |
1034 """ current selection.</p>""" |
1004 )) |
1035 )) |
1005 self.uncommentAct.triggered[()].connect(self.__editUncomment) |
1036 self.uncommentAct.triggered[()].connect(self.__editUncomment) |
1006 self.editActions.append(self.uncommentAct) |
1037 self.editActions.append(self.uncommentAct) |
1007 |
1038 |
1008 self.toggleCommentAct = E5Action( |
1039 self.toggleCommentAct = E5Action( |
1009 QApplication.translate('ViewManager', 'Toggle Comment'), |
1040 QApplication.translate('ViewManager', 'Toggle Comment'), |
1010 UI.PixmapCache.getIcon("editToggleComment.png"), |
1041 UI.PixmapCache.getIcon("editToggleComment.png"), |
1011 QApplication.translate('ViewManager', 'Toggle Comment'), |
1042 QApplication.translate('ViewManager', 'Toggle Comment'), |
1012 QKeySequence(QApplication.translate('ViewManager', |
1043 QKeySequence(QApplication.translate( |
1013 "Ctrl+Shift+M", "Edit|Toggle Comment")), |
1044 'ViewManager', "Ctrl+Shift+M", "Edit|Toggle Comment")), |
1014 0, |
1045 0, |
1015 self.editActGrp, 'vm_edit_toggle_comment') |
1046 self.editActGrp, 'vm_edit_toggle_comment') |
1016 self.toggleCommentAct.setStatusTip(QApplication.translate( |
1047 self.toggleCommentAct.setStatusTip(QApplication.translate( |
1017 'ViewManager', |
1048 'ViewManager', |
1018 'Toggle the comment of the current line, selection or' |
1049 'Toggle the comment of the current line, selection or' |
1019 ' comment block')) |
1050 ' comment block')) |
1020 self.toggleCommentAct.setWhatsThis(QApplication.translate( |
1051 self.toggleCommentAct.setWhatsThis(QApplication.translate( |
1021 'ViewManager', |
1052 'ViewManager', |
1022 """<b>Toggle Comment</b>""" |
1053 """<b>Toggle Comment</b>""" |
1023 """<p>If the current line does not start with a block comment,""" |
1054 """<p>If the current line does not start with a block comment,""" |
1024 """ the current line or selection is commented. If it is already""" |
1055 """ the current line or selection is commented. If it is already""" |
1042 """ selection.</p>""" |
1073 """ selection.</p>""" |
1043 )) |
1074 )) |
1044 self.streamCommentAct.triggered[()].connect(self.__editStreamComment) |
1075 self.streamCommentAct.triggered[()].connect(self.__editStreamComment) |
1045 self.editActions.append(self.streamCommentAct) |
1076 self.editActions.append(self.streamCommentAct) |
1046 |
1077 |
1047 self.boxCommentAct = E5Action(QApplication.translate('ViewManager', |
1078 self.boxCommentAct = E5Action( |
1048 'Box Comment'), |
1079 QApplication.translate('ViewManager', 'Box Comment'), |
1049 QApplication.translate('ViewManager', 'Box Comment'), |
1080 QApplication.translate('ViewManager', 'Box Comment'), |
1050 0, 0, |
1081 0, 0, |
1051 self.editActGrp, 'vm_edit_box_comment') |
1082 self.editActGrp, 'vm_edit_box_comment') |
1052 self.boxCommentAct.setStatusTip(QApplication.translate('ViewManager', |
1083 self.boxCommentAct.setStatusTip(QApplication.translate( |
1053 'Box Comment Line or Selection')) |
1084 'ViewManager', 'Box Comment Line or Selection')) |
1054 self.boxCommentAct.setWhatsThis(QApplication.translate('ViewManager', |
1085 self.boxCommentAct.setWhatsThis(QApplication.translate( |
|
1086 'ViewManager', |
1055 """<b>Box Comment</b>""" |
1087 """<b>Box Comment</b>""" |
1056 """<p>Box comments the current line or the lines of the""" |
1088 """<p>Box comments the current line or the lines of the""" |
1057 """ current selection.</p>""" |
1089 """ current selection.</p>""" |
1058 )) |
1090 )) |
1059 self.boxCommentAct.triggered[()].connect(self.__editBoxComment) |
1091 self.boxCommentAct.triggered[()].connect(self.__editBoxComment) |
1060 self.editActions.append(self.boxCommentAct) |
1092 self.editActions.append(self.boxCommentAct) |
1061 |
1093 |
1062 self.selectBraceAct = E5Action(QApplication.translate('ViewManager', |
1094 self.selectBraceAct = E5Action( |
1063 'Select to brace'), |
1095 QApplication.translate('ViewManager', 'Select to brace'), |
1064 QApplication.translate('ViewManager', 'Select to &brace'), |
1096 QApplication.translate('ViewManager', 'Select to &brace'), |
1065 QKeySequence(QApplication.translate('ViewManager', |
1097 QKeySequence(QApplication.translate( |
1066 "Ctrl+E", "Edit|Select to brace")), |
1098 'ViewManager', "Ctrl+E", "Edit|Select to brace")), |
1067 0, |
1099 0, |
1068 self.editActGrp, 'vm_edit_select_to_brace') |
1100 self.editActGrp, 'vm_edit_select_to_brace') |
1069 self.selectBraceAct.setStatusTip(QApplication.translate('ViewManager', |
1101 self.selectBraceAct.setStatusTip(QApplication.translate( |
1070 'Select text to the matching brace')) |
1102 'ViewManager', 'Select text to the matching brace')) |
1071 self.selectBraceAct.setWhatsThis(QApplication.translate('ViewManager', |
1103 self.selectBraceAct.setWhatsThis(QApplication.translate( |
|
1104 'ViewManager', |
1072 """<b>Select to brace</b>""" |
1105 """<b>Select to brace</b>""" |
1073 """<p>Select text of the current editor to the matching""" |
1106 """<p>Select text of the current editor to the matching""" |
1074 """ brace.</p>""" |
1107 """ brace.</p>""" |
1075 )) |
1108 )) |
1076 self.selectBraceAct.triggered[()].connect(self.__editSelectBrace) |
1109 self.selectBraceAct.triggered[()].connect(self.__editSelectBrace) |
1077 self.editActions.append(self.selectBraceAct) |
1110 self.editActions.append(self.selectBraceAct) |
1078 |
1111 |
1079 self.selectAllAct = E5Action( |
1112 self.selectAllAct = E5Action( |
1080 QApplication.translate('ViewManager', 'Select all'), |
1113 QApplication.translate('ViewManager', 'Select all'), |
1081 QApplication.translate('ViewManager', '&Select all'), |
1114 QApplication.translate('ViewManager', '&Select all'), |
1082 QKeySequence(QApplication.translate('ViewManager', |
1115 QKeySequence(QApplication.translate( |
1083 "Ctrl+A", "Edit|Select all")), |
1116 'ViewManager', "Ctrl+A", "Edit|Select all")), |
1084 0, |
1117 0, |
1085 self.editActGrp, 'vm_edit_select_all') |
1118 self.editActGrp, 'vm_edit_select_all') |
1086 self.selectAllAct.setStatusTip(QApplication.translate('ViewManager', |
1119 self.selectAllAct.setStatusTip(QApplication.translate( |
1087 'Select all text')) |
1120 'ViewManager', 'Select all text')) |
1088 self.selectAllAct.setWhatsThis(QApplication.translate('ViewManager', |
1121 self.selectAllAct.setWhatsThis(QApplication.translate( |
|
1122 'ViewManager', |
1089 """<b>Select All</b>""" |
1123 """<b>Select All</b>""" |
1090 """<p>Select all text of the current editor.</p>""" |
1124 """<p>Select all text of the current editor.</p>""" |
1091 )) |
1125 )) |
1092 self.selectAllAct.triggered[()].connect(self.__editSelectAll) |
1126 self.selectAllAct.triggered[()].connect(self.__editSelectAll) |
1093 self.editActions.append(self.selectAllAct) |
1127 self.editActions.append(self.selectAllAct) |
1094 |
1128 |
1095 self.deselectAllAct = E5Action(QApplication.translate('ViewManager', |
1129 self.deselectAllAct = E5Action( |
1096 'Deselect all'), |
1130 QApplication.translate('ViewManager', 'Deselect all'), |
1097 QApplication.translate('ViewManager', '&Deselect all'), |
1131 QApplication.translate('ViewManager', '&Deselect all'), |
1098 QKeySequence(QApplication.translate('ViewManager', |
1132 QKeySequence(QApplication.translate( |
1099 "Alt+Ctrl+A", "Edit|Deselect all")), |
1133 'ViewManager', "Alt+Ctrl+A", "Edit|Deselect all")), |
1100 0, |
1134 0, |
1101 self.editActGrp, 'vm_edit_deselect_all') |
1135 self.editActGrp, 'vm_edit_deselect_all') |
1102 self.deselectAllAct.setStatusTip(QApplication.translate('ViewManager', |
1136 self.deselectAllAct.setStatusTip(QApplication.translate( |
1103 'Deselect all text')) |
1137 'ViewManager', 'Deselect all text')) |
1104 self.deselectAllAct.setWhatsThis(QApplication.translate('ViewManager', |
1138 self.deselectAllAct.setWhatsThis(QApplication.translate( |
|
1139 'ViewManager', |
1105 """<b>Deselect All</b>""" |
1140 """<b>Deselect All</b>""" |
1106 """<p>Deselect all text of the current editor.</p>""" |
1141 """<p>Deselect all text of the current editor.</p>""" |
1107 )) |
1142 )) |
1108 self.deselectAllAct.triggered[()].connect(self.__editDeselectAll) |
1143 self.deselectAllAct.triggered[()].connect(self.__editDeselectAll) |
1109 self.editActions.append(self.deselectAllAct) |
1144 self.editActions.append(self.deselectAllAct) |
1113 'ViewManager', 'Convert Line End Characters'), |
1148 'ViewManager', 'Convert Line End Characters'), |
1114 QApplication.translate( |
1149 QApplication.translate( |
1115 'ViewManager', 'Convert &Line End Characters'), |
1150 'ViewManager', 'Convert &Line End Characters'), |
1116 0, 0, |
1151 0, 0, |
1117 self.editActGrp, 'vm_edit_convert_eol') |
1152 self.editActGrp, 'vm_edit_convert_eol') |
1118 self.convertEOLAct.setStatusTip(QApplication.translate('ViewManager', |
1153 self.convertEOLAct.setStatusTip(QApplication.translate( |
1119 'Convert Line End Characters')) |
1154 'ViewManager', 'Convert Line End Characters')) |
1120 self.convertEOLAct.setWhatsThis(QApplication.translate('ViewManager', |
1155 self.convertEOLAct.setWhatsThis(QApplication.translate( |
|
1156 'ViewManager', |
1121 """<b>Convert Line End Characters</b>""" |
1157 """<b>Convert Line End Characters</b>""" |
1122 """<p>Convert the line end characters to the currently set""" |
1158 """<p>Convert the line end characters to the currently set""" |
1123 """ type.</p>""" |
1159 """ type.</p>""" |
1124 )) |
1160 )) |
1125 self.convertEOLAct.triggered[()].connect(self.__convertEOL) |
1161 self.convertEOLAct.triggered[()].connect(self.__convertEOL) |
1126 self.editActions.append(self.convertEOLAct) |
1162 self.editActions.append(self.convertEOLAct) |
1127 |
1163 |
1128 self.shortenEmptyAct = E5Action(QApplication.translate('ViewManager', |
1164 self.shortenEmptyAct = E5Action( |
1129 'Shorten empty lines'), |
1165 QApplication.translate('ViewManager', 'Shorten empty lines'), |
1130 QApplication.translate('ViewManager', 'Shorten empty lines'), |
1166 QApplication.translate('ViewManager', 'Shorten empty lines'), |
1131 0, 0, |
1167 0, 0, |
1132 self.editActGrp, 'vm_edit_shorten_empty_lines') |
1168 self.editActGrp, 'vm_edit_shorten_empty_lines') |
1133 self.shortenEmptyAct.setStatusTip(QApplication.translate('ViewManager', |
1169 self.shortenEmptyAct.setStatusTip(QApplication.translate( |
1134 'Shorten empty lines')) |
1170 'ViewManager', 'Shorten empty lines')) |
1135 self.shortenEmptyAct.setWhatsThis(QApplication.translate('ViewManager', |
1171 self.shortenEmptyAct.setWhatsThis(QApplication.translate( |
|
1172 'ViewManager', |
1136 """<b>Shorten empty lines</b>""" |
1173 """<b>Shorten empty lines</b>""" |
1137 """<p>Shorten lines consisting solely of whitespace""" |
1174 """<p>Shorten lines consisting solely of whitespace""" |
1138 """ characters.</p>""" |
1175 """ characters.</p>""" |
1139 )) |
1176 )) |
1140 self.shortenEmptyAct.triggered[()].connect(self.__shortenEmptyLines) |
1177 self.shortenEmptyAct.triggered[()].connect(self.__shortenEmptyLines) |
1141 self.editActions.append(self.shortenEmptyAct) |
1178 self.editActions.append(self.shortenEmptyAct) |
1142 |
1179 |
1143 self.autoCompleteAct = E5Action(QApplication.translate('ViewManager', |
1180 self.autoCompleteAct = E5Action( |
1144 'Autocomplete'), |
1181 QApplication.translate('ViewManager', 'Autocomplete'), |
1145 QApplication.translate('ViewManager', '&Autocomplete'), |
1182 QApplication.translate('ViewManager', '&Autocomplete'), |
1146 QKeySequence(QApplication.translate('ViewManager', |
1183 QKeySequence(QApplication.translate( |
1147 "Ctrl+Space", "Edit|Autocomplete")), |
1184 'ViewManager', "Ctrl+Space", "Edit|Autocomplete")), |
1148 0, |
1185 0, |
1149 self.editActGrp, 'vm_edit_autocomplete') |
1186 self.editActGrp, 'vm_edit_autocomplete') |
1150 self.autoCompleteAct.setStatusTip(QApplication.translate('ViewManager', |
1187 self.autoCompleteAct.setStatusTip(QApplication.translate( |
1151 'Autocomplete current word')) |
1188 'ViewManager', 'Autocomplete current word')) |
1152 self.autoCompleteAct.setWhatsThis(QApplication.translate('ViewManager', |
1189 self.autoCompleteAct.setWhatsThis(QApplication.translate( |
|
1190 'ViewManager', |
1153 """<b>Autocomplete</b>""" |
1191 """<b>Autocomplete</b>""" |
1154 """<p>Performs an autocompletion of the word containing""" |
1192 """<p>Performs an autocompletion of the word containing""" |
1155 """ the cursor.</p>""" |
1193 """ the cursor.</p>""" |
1156 )) |
1194 )) |
1157 self.autoCompleteAct.triggered[()].connect(self.__editAutoComplete) |
1195 self.autoCompleteAct.triggered[()].connect(self.__editAutoComplete) |
1222 )) |
1260 )) |
1223 self.autoCompleteFromAllAct.triggered[()].connect( |
1261 self.autoCompleteFromAllAct.triggered[()].connect( |
1224 self.__editAutoCompleteFromAll) |
1262 self.__editAutoCompleteFromAll) |
1225 self.editActions.append(self.autoCompleteFromAllAct) |
1263 self.editActions.append(self.autoCompleteFromAllAct) |
1226 |
1264 |
1227 self.calltipsAct = E5Action(QApplication.translate('ViewManager', |
1265 self.calltipsAct = E5Action( |
1228 'Calltip'), |
1266 QApplication.translate('ViewManager', 'Calltip'), |
1229 QApplication.translate('ViewManager', '&Calltip'), |
1267 QApplication.translate('ViewManager', '&Calltip'), |
1230 QKeySequence(QApplication.translate('ViewManager', |
1268 QKeySequence(QApplication.translate( |
1231 "Alt+Space", "Edit|Calltip")), |
1269 'ViewManager', "Alt+Space", "Edit|Calltip")), |
1232 0, |
1270 0, |
1233 self.editActGrp, 'vm_edit_calltip') |
1271 self.editActGrp, 'vm_edit_calltip') |
1234 self.calltipsAct.setStatusTip(QApplication.translate('ViewManager', |
1272 self.calltipsAct.setStatusTip(QApplication.translate( |
1235 'Show Calltips')) |
1273 'ViewManager', 'Show Calltips')) |
1236 self.calltipsAct.setWhatsThis(QApplication.translate('ViewManager', |
1274 self.calltipsAct.setWhatsThis(QApplication.translate( |
|
1275 'ViewManager', |
1237 """<b>Calltip</b>""" |
1276 """<b>Calltip</b>""" |
1238 """<p>Show calltips based on the characters immediately to the""" |
1277 """<p>Show calltips based on the characters immediately to the""" |
1239 """ left of the cursor.</p>""" |
1278 """ left of the cursor.</p>""" |
1240 )) |
1279 )) |
1241 self.calltipsAct.triggered[()].connect(self.__editShowCallTips) |
1280 self.calltipsAct.triggered[()].connect(self.__editShowCallTips) |
1242 self.editActions.append(self.calltipsAct) |
1281 self.editActions.append(self.calltipsAct) |
1243 |
1282 |
1244 self.sortAct = E5Action(QApplication.translate('ViewManager', 'Sort'), |
1283 self.sortAct = E5Action( |
1245 QApplication.translate('ViewManager', 'Sort'), |
1284 QApplication.translate('ViewManager', 'Sort'), |
1246 QKeySequence(QApplication.translate('ViewManager', |
1285 QApplication.translate('ViewManager', 'Sort'), |
1247 "Ctrl+Alt+S", "Edit|Sort")), |
1286 QKeySequence(QApplication.translate( |
1248 0, |
1287 'ViewManager', "Ctrl+Alt+S", "Edit|Sort")), |
1249 self.editActGrp, 'vm_edit_sort') |
1288 0, |
1250 self.sortAct.setStatusTip(QApplication.translate('ViewManager', |
1289 self.editActGrp, 'vm_edit_sort') |
|
1290 self.sortAct.setStatusTip(QApplication.translate( |
|
1291 'ViewManager', |
1251 'Sort the lines containing the rectangular selection')) |
1292 'Sort the lines containing the rectangular selection')) |
1252 self.sortAct.setWhatsThis(QApplication.translate('ViewManager', |
1293 self.sortAct.setWhatsThis(QApplication.translate( |
|
1294 'ViewManager', |
1253 """<b>Sort</b>""" |
1295 """<b>Sort</b>""" |
1254 """<p>Sort the lines spanned by a rectangular selection based on""" |
1296 """<p>Sort the lines spanned by a rectangular selection based on""" |
1255 """ the selection ignoring leading and trailing whitespace.</p>""" |
1297 """ the selection ignoring leading and trailing whitespace.</p>""" |
1256 )) |
1298 )) |
1257 self.sortAct.triggered[()].connect(self.__editSortSelectedLines) |
1299 self.sortAct.triggered[()].connect(self.__editSortSelectedLines) |
1366 QApplication.translate('ViewManager', 'Ctrl+Right'))) |
1408 QApplication.translate('ViewManager', 'Ctrl+Right'))) |
1367 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT) |
1409 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT) |
1368 act.triggered[()].connect(self.esm.map) |
1410 act.triggered[()].connect(self.esm.map) |
1369 self.editActions.append(act) |
1411 self.editActions.append(act) |
1370 |
1412 |
1371 act = E5Action(QApplication.translate('ViewManager', |
1413 act = E5Action( |
1372 'Move to first visible character in document line'), |
1414 QApplication.translate( |
1373 QApplication.translate('ViewManager', |
1415 'ViewManager', |
1374 'Move to first visible character in document line'), |
1416 'Move to first visible character in document line'), |
1375 0, 0, |
1417 QApplication.translate( |
1376 self.editorActGrp, 'vm_edit_move_first_visible_char') |
1418 'ViewManager', |
|
1419 'Move to first visible character in document line'), |
|
1420 0, 0, |
|
1421 self.editorActGrp, 'vm_edit_move_first_visible_char') |
1377 if not isMacPlatform(): |
1422 if not isMacPlatform(): |
1378 act.setShortcut(QKeySequence( |
1423 act.setShortcut(QKeySequence( |
1379 QApplication.translate('ViewManager', 'Home'))) |
1424 QApplication.translate('ViewManager', 'Home'))) |
1380 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME) |
1425 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME) |
1381 act.triggered[()].connect(self.esm.map) |
1426 act.triggered[()].connect(self.esm.map) |
1382 self.editActions.append(act) |
1427 self.editActions.append(act) |
1383 |
1428 |
1384 act = E5Action(QApplication.translate('ViewManager', |
1429 act = E5Action( |
1385 'Move to start of display line'), |
1430 QApplication.translate( |
1386 QApplication.translate('ViewManager', |
1431 'ViewManager', 'Move to start of display line'), |
1387 'Move to start of display line'), |
1432 QApplication.translate( |
1388 0, 0, |
1433 'ViewManager', 'Move to start of display line'), |
1389 self.editorActGrp, 'vm_edit_move_start_line') |
1434 0, 0, |
|
1435 self.editorActGrp, 'vm_edit_move_start_line') |
1390 if isMacPlatform(): |
1436 if isMacPlatform(): |
1391 act.setShortcut(QKeySequence( |
1437 act.setShortcut(QKeySequence( |
1392 QApplication.translate('ViewManager', 'Ctrl+Left'))) |
1438 QApplication.translate('ViewManager', 'Ctrl+Left'))) |
1393 else: |
1439 else: |
1394 act.setShortcut(QKeySequence( |
1440 act.setShortcut(QKeySequence( |
1395 QApplication.translate('ViewManager', 'Alt+Home'))) |
1441 QApplication.translate('ViewManager', 'Alt+Home'))) |
1396 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAY) |
1442 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAY) |
1397 act.triggered[()].connect(self.esm.map) |
1443 act.triggered[()].connect(self.esm.map) |
1398 self.editActions.append(act) |
1444 self.editActions.append(act) |
1399 |
1445 |
1400 act = E5Action(QApplication.translate('ViewManager', |
1446 act = E5Action( |
1401 'Move to end of document line'), |
1447 QApplication.translate( |
1402 QApplication.translate('ViewManager', |
1448 'ViewManager', 'Move to end of document line'), |
1403 'Move to end of document line'), |
1449 QApplication.translate( |
1404 0, 0, |
1450 'ViewManager', 'Move to end of document line'), |
1405 self.editorActGrp, 'vm_edit_move_end_line') |
1451 0, 0, |
|
1452 self.editorActGrp, 'vm_edit_move_end_line') |
1406 if isMacPlatform(): |
1453 if isMacPlatform(): |
1407 act.setShortcut(QKeySequence( |
1454 act.setShortcut(QKeySequence( |
1408 QApplication.translate('ViewManager', 'Meta+E'))) |
1455 QApplication.translate('ViewManager', 'Meta+E'))) |
1409 else: |
1456 else: |
1410 act.setShortcut(QKeySequence( |
1457 act.setShortcut(QKeySequence( |
1605 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
1652 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
1606 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND) |
1653 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND) |
1607 act.triggered[()].connect(self.esm.map) |
1654 act.triggered[()].connect(self.esm.map) |
1608 self.editActions.append(act) |
1655 self.editActions.append(act) |
1609 |
1656 |
1610 act = E5Action(QApplication.translate('ViewManager', |
1657 act = E5Action( |
1611 'Extend selection left one word'), |
1658 QApplication.translate( |
1612 QApplication.translate('ViewManager', |
1659 'ViewManager', 'Extend selection left one word'), |
1613 'Extend selection left one word'), |
1660 QApplication.translate( |
1614 0, 0, |
1661 'ViewManager', 'Extend selection left one word'), |
1615 self.editorActGrp, 'vm_edit_extend_selection_left_word') |
1662 0, 0, |
|
1663 self.editorActGrp, 'vm_edit_extend_selection_left_word') |
1616 if isMacPlatform(): |
1664 if isMacPlatform(): |
1617 act.setShortcut(QKeySequence( |
1665 act.setShortcut(QKeySequence( |
1618 QApplication.translate('ViewManager', 'Alt+Shift+Left'))) |
1666 QApplication.translate('ViewManager', 'Alt+Shift+Left'))) |
1619 else: |
1667 else: |
1620 act.setShortcut(QKeySequence( |
1668 act.setShortcut(QKeySequence( |
1621 QApplication.translate('ViewManager', 'Ctrl+Shift+Left'))) |
1669 QApplication.translate('ViewManager', 'Ctrl+Shift+Left'))) |
1622 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEXTEND) |
1670 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEXTEND) |
1623 act.triggered[()].connect(self.esm.map) |
1671 act.triggered[()].connect(self.esm.map) |
1624 self.editActions.append(act) |
1672 self.editActions.append(act) |
1625 |
1673 |
1626 act = E5Action(QApplication.translate('ViewManager', |
1674 act = E5Action( |
1627 'Extend selection right one word'), |
1675 QApplication.translate( |
1628 QApplication.translate('ViewManager', |
1676 'ViewManager', 'Extend selection right one word'), |
1629 'Extend selection right one word'), |
1677 QApplication.translate( |
1630 0, 0, |
1678 'ViewManager', 'Extend selection right one word'), |
1631 self.editorActGrp, 'vm_edit_extend_selection_right_word') |
1679 0, 0, |
|
1680 self.editorActGrp, 'vm_edit_extend_selection_right_word') |
1632 if isMacPlatform(): |
1681 if isMacPlatform(): |
1633 act.setShortcut(QKeySequence( |
1682 act.setShortcut(QKeySequence( |
1634 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
1683 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
1635 else: |
1684 else: |
1636 act.setShortcut(QKeySequence( |
1685 act.setShortcut(QKeySequence( |
1724 QApplication.translate('ViewManager', 'Meta+Shift+V'))) |
1775 QApplication.translate('ViewManager', 'Meta+Shift+V'))) |
1725 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNEXTEND) |
1776 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNEXTEND) |
1726 act.triggered[()].connect(self.esm.map) |
1777 act.triggered[()].connect(self.esm.map) |
1727 self.editActions.append(act) |
1778 self.editActions.append(act) |
1728 |
1779 |
1729 act = E5Action(QApplication.translate('ViewManager', |
1780 act = E5Action( |
1730 'Extend selection to start of document'), |
1781 QApplication.translate( |
1731 QApplication.translate('ViewManager', |
1782 'ViewManager', 'Extend selection to start of document'), |
1732 'Extend selection to start of document'), |
1783 QApplication.translate( |
1733 0, 0, |
1784 'ViewManager', 'Extend selection to start of document'), |
1734 self.editorActGrp, 'vm_edit_extend_selection_start_text') |
1785 0, 0, |
|
1786 self.editorActGrp, 'vm_edit_extend_selection_start_text') |
1735 if isMacPlatform(): |
1787 if isMacPlatform(): |
1736 act.setShortcut(QKeySequence( |
1788 act.setShortcut(QKeySequence( |
1737 QApplication.translate('ViewManager', 'Ctrl+Shift+Up'))) |
1789 QApplication.translate('ViewManager', 'Ctrl+Shift+Up'))) |
1738 else: |
1790 else: |
1739 act.setShortcut(QKeySequence( |
1791 act.setShortcut(QKeySequence( |
1740 QApplication.translate('ViewManager', 'Ctrl+Shift+Home'))) |
1792 QApplication.translate('ViewManager', 'Ctrl+Shift+Home'))) |
1741 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTARTEXTEND) |
1793 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTARTEXTEND) |
1742 act.triggered[()].connect(self.esm.map) |
1794 act.triggered[()].connect(self.esm.map) |
1743 self.editActions.append(act) |
1795 self.editActions.append(act) |
1744 |
1796 |
1745 act = E5Action(QApplication.translate('ViewManager', |
1797 act = E5Action( |
1746 'Extend selection to end of document'), |
1798 QApplication.translate( |
1747 QApplication.translate('ViewManager', |
1799 'ViewManager', 'Extend selection to end of document'), |
1748 'Extend selection to end of document'), |
1800 QApplication.translate( |
1749 0, 0, |
1801 'ViewManager', 'Extend selection to end of document'), |
1750 self.editorActGrp, 'vm_edit_extend_selection_end_text') |
1802 0, 0, |
|
1803 self.editorActGrp, 'vm_edit_extend_selection_end_text') |
1751 if isMacPlatform(): |
1804 if isMacPlatform(): |
1752 act.setShortcut(QKeySequence( |
1805 act.setShortcut(QKeySequence( |
1753 QApplication.translate('ViewManager', 'Ctrl+Shift+Down'))) |
1806 QApplication.translate('ViewManager', 'Ctrl+Shift+Down'))) |
1754 else: |
1807 else: |
1755 act.setShortcut(QKeySequence( |
1808 act.setShortcut(QKeySequence( |
2122 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE) |
2180 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE) |
2123 act.triggered[()].connect(self.esm.map) |
2181 act.triggered[()].connect(self.esm.map) |
2124 self.editActions.append(act) |
2182 self.editActions.append(act) |
2125 |
2183 |
2126 if hasattr(QsciScintilla, "SCI_SCROLLTOSTART"): |
2184 if hasattr(QsciScintilla, "SCI_SCROLLTOSTART"): |
2127 act = E5Action(QApplication.translate('ViewManager', |
2185 act = E5Action( |
2128 'Scroll to start of document'), |
2186 QApplication.translate( |
2129 QApplication.translate('ViewManager', |
2187 'ViewManager', 'Scroll to start of document'), |
2130 'Scroll to start of document'), |
2188 QApplication.translate( |
2131 0, 0, |
2189 'ViewManager', 'Scroll to start of document'), |
2132 self.editorActGrp, 'vm_edit_scroll_start_text') |
2190 0, 0, |
|
2191 self.editorActGrp, 'vm_edit_scroll_start_text') |
2133 if isMacPlatform(): |
2192 if isMacPlatform(): |
2134 act.setShortcut(QKeySequence( |
2193 act.setShortcut(QKeySequence( |
2135 QApplication.translate('ViewManager', 'Home'))) |
2194 QApplication.translate('ViewManager', 'Home'))) |
2136 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOSTART) |
2195 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOSTART) |
2137 act.triggered[()].connect(self.esm.map) |
2196 act.triggered[()].connect(self.esm.map) |
2138 self.editActions.append(act) |
2197 self.editActions.append(act) |
2139 |
2198 |
2140 if hasattr(QsciScintilla, "SCI_SCROLLTOEND"): |
2199 if hasattr(QsciScintilla, "SCI_SCROLLTOEND"): |
2141 act = E5Action(QApplication.translate('ViewManager', |
2200 act = E5Action( |
2142 'Scroll to end of document'), |
2201 QApplication.translate( |
2143 QApplication.translate('ViewManager', |
2202 'ViewManager', 'Scroll to end of document'), |
2144 'Scroll to end of document'), |
2203 QApplication.translate( |
2145 0, 0, |
2204 'ViewManager', 'Scroll to end of document'), |
2146 self.editorActGrp, 'vm_edit_scroll_end_text') |
2205 0, 0, |
|
2206 self.editorActGrp, 'vm_edit_scroll_end_text') |
2147 if isMacPlatform(): |
2207 if isMacPlatform(): |
2148 act.setShortcut(QKeySequence( |
2208 act.setShortcut(QKeySequence( |
2149 QApplication.translate('ViewManager', 'End'))) |
2209 QApplication.translate('ViewManager', 'End'))) |
2150 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOEND) |
2210 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOEND) |
2151 act.triggered[()].connect(self.esm.map) |
2211 act.triggered[()].connect(self.esm.map) |
2152 self.editActions.append(act) |
2212 self.editActions.append(act) |
2153 |
2213 |
2154 if hasattr(QsciScintilla, "SCI_VERTICALCENTRECARET"): |
2214 if hasattr(QsciScintilla, "SCI_VERTICALCENTRECARET"): |
2155 act = E5Action(QApplication.translate('ViewManager', |
2215 act = E5Action( |
2156 'Scroll vertically to center current line'), |
2216 QApplication.translate( |
2157 QApplication.translate('ViewManager', |
2217 'ViewManager', 'Scroll vertically to center current line'), |
2158 'Scroll vertically to center current line'), |
2218 QApplication.translate( |
2159 0, 0, |
2219 'ViewManager', 'Scroll vertically to center current line'), |
2160 self.editorActGrp, 'vm_edit_scroll_vertically_center') |
2220 0, 0, |
|
2221 self.editorActGrp, 'vm_edit_scroll_vertically_center') |
2161 if isMacPlatform(): |
2222 if isMacPlatform(): |
2162 act.setShortcut(QKeySequence( |
2223 act.setShortcut(QKeySequence( |
2163 QApplication.translate('ViewManager', 'Meta+L'))) |
2224 QApplication.translate('ViewManager', 'Meta+L'))) |
2164 self.esm.setMapping(act, QsciScintilla.SCI_VERTICALCENTRECARET) |
2225 self.esm.setMapping(act, QsciScintilla.SCI_VERTICALCENTRECARET) |
2165 act.triggered[()].connect(self.esm.map) |
2226 act.triggered[()].connect(self.esm.map) |
2166 self.editActions.append(act) |
2227 self.editActions.append(act) |
2167 |
2228 |
2168 if hasattr(QsciScintilla, "SCI_WORDRIGHTEND"): |
2229 if hasattr(QsciScintilla, "SCI_WORDRIGHTEND"): |
2169 act = E5Action(QApplication.translate('ViewManager', |
2230 act = E5Action( |
2170 'Move to end of next word'), |
2231 QApplication.translate( |
2171 QApplication.translate('ViewManager', |
2232 'ViewManager', 'Move to end of next word'), |
2172 'Move to end of next word'), |
2233 QApplication.translate( |
2173 0, 0, |
2234 'ViewManager', 'Move to end of next word'), |
2174 self.editorActGrp, 'vm_edit_move_end_next_word') |
2235 0, 0, |
|
2236 self.editorActGrp, 'vm_edit_move_end_next_word') |
2175 if isMacPlatform(): |
2237 if isMacPlatform(): |
2176 act.setShortcut(QKeySequence( |
2238 act.setShortcut(QKeySequence( |
2177 QApplication.translate('ViewManager', 'Alt+Right'))) |
2239 QApplication.translate('ViewManager', 'Alt+Right'))) |
2178 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEND) |
2240 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEND) |
2179 act.triggered[()].connect(self.esm.map) |
2241 act.triggered[()].connect(self.esm.map) |
2180 self.editActions.append(act) |
2242 self.editActions.append(act) |
2181 |
2243 |
2182 if hasattr(QsciScintilla, "SCI_WORDRIGHTENDEXTEND"): |
2244 if hasattr(QsciScintilla, "SCI_WORDRIGHTENDEXTEND"): |
2183 act = E5Action(QApplication.translate('ViewManager', |
2245 act = E5Action( |
2184 'Extend selection to end of next word'), |
2246 QApplication.translate( |
2185 QApplication.translate('ViewManager', |
2247 'ViewManager', 'Extend selection to end of next word'), |
2186 'Extend selection to end of next word'), |
2248 QApplication.translate( |
2187 0, 0, |
2249 'ViewManager', 'Extend selection to end of next word'), |
2188 self.editorActGrp, 'vm_edit_select_end_next_word') |
2250 0, 0, |
|
2251 self.editorActGrp, 'vm_edit_select_end_next_word') |
2189 if isMacPlatform(): |
2252 if isMacPlatform(): |
2190 act.setShortcut(QKeySequence( |
2253 act.setShortcut(QKeySequence( |
2191 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
2254 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) |
2192 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTENDEXTEND) |
2255 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTENDEXTEND) |
2193 act.triggered[()].connect(self.esm.map) |
2256 act.triggered[()].connect(self.esm.map) |
2194 self.editActions.append(act) |
2257 self.editActions.append(act) |
2195 |
2258 |
2196 if hasattr(QsciScintilla, "SCI_WORDLEFTEND"): |
2259 if hasattr(QsciScintilla, "SCI_WORDLEFTEND"): |
2197 act = E5Action(QApplication.translate('ViewManager', |
2260 act = E5Action( |
2198 'Move to end of previous word'), |
2261 QApplication.translate( |
2199 QApplication.translate('ViewManager', |
2262 'ViewManager', 'Move to end of previous word'), |
2200 'Move to end of previous word'), |
2263 QApplication.translate( |
2201 0, 0, |
2264 'ViewManager', 'Move to end of previous word'), |
2202 self.editorActGrp, 'vm_edit_move_end_previous_word') |
2265 0, 0, |
|
2266 self.editorActGrp, 'vm_edit_move_end_previous_word') |
2203 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEND) |
2267 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEND) |
2204 act.triggered[()].connect(self.esm.map) |
2268 act.triggered[()].connect(self.esm.map) |
2205 self.editActions.append(act) |
2269 self.editActions.append(act) |
2206 |
2270 |
2207 if hasattr(QsciScintilla, "SCI_WORDLEFTENDEXTEND"): |
2271 if hasattr(QsciScintilla, "SCI_WORDLEFTENDEXTEND"): |
2208 act = E5Action(QApplication.translate('ViewManager', |
2272 act = E5Action( |
2209 'Extend selection to end of previous word'), |
2273 QApplication.translate( |
2210 QApplication.translate('ViewManager', |
2274 'ViewManager', 'Extend selection to end of previous word'), |
2211 'Extend selection to end of previous word'), |
2275 QApplication.translate( |
2212 0, 0, |
2276 'ViewManager', 'Extend selection to end of previous word'), |
2213 self.editorActGrp, 'vm_edit_select_end_previous_word') |
2277 0, 0, |
|
2278 self.editorActGrp, 'vm_edit_select_end_previous_word') |
2214 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTENDEXTEND) |
2279 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTENDEXTEND) |
2215 act.triggered[()].connect(self.esm.map) |
2280 act.triggered[()].connect(self.esm.map) |
2216 self.editActions.append(act) |
2281 self.editActions.append(act) |
2217 |
2282 |
2218 if hasattr(QsciScintilla, "SCI_HOME"): |
2283 if hasattr(QsciScintilla, "SCI_HOME"): |
2219 act = E5Action(QApplication.translate('ViewManager', |
2284 act = E5Action( |
2220 'Move to start of document line'), |
2285 QApplication.translate( |
2221 QApplication.translate('ViewManager', |
2286 'ViewManager', 'Move to start of document line'), |
2222 'Move to start of document line'), |
2287 QApplication.translate( |
2223 0, 0, |
2288 'ViewManager', 'Move to start of document line'), |
2224 self.editorActGrp, 'vm_edit_move_start_document_line') |
2289 0, 0, |
|
2290 self.editorActGrp, 'vm_edit_move_start_document_line') |
2225 if isMacPlatform(): |
2291 if isMacPlatform(): |
2226 act.setShortcut(QKeySequence( |
2292 act.setShortcut(QKeySequence( |
2227 QApplication.translate('ViewManager', 'Meta+A'))) |
2293 QApplication.translate('ViewManager', 'Meta+A'))) |
2228 self.esm.setMapping(act, QsciScintilla.SCI_HOME) |
2294 self.esm.setMapping(act, QsciScintilla.SCI_HOME) |
2229 act.triggered[()].connect(self.esm.map) |
2295 act.triggered[()].connect(self.esm.map) |
2732 self.searchActions.append(self.searchPrevWordAct) |
2807 self.searchActions.append(self.searchPrevWordAct) |
2733 |
2808 |
2734 self.replaceAct = E5Action( |
2809 self.replaceAct = E5Action( |
2735 QApplication.translate('ViewManager', 'Replace'), |
2810 QApplication.translate('ViewManager', 'Replace'), |
2736 QApplication.translate('ViewManager', '&Replace...'), |
2811 QApplication.translate('ViewManager', '&Replace...'), |
2737 QKeySequence(QApplication.translate('ViewManager', |
2812 QKeySequence(QApplication.translate( |
2738 "Ctrl+R", "Search|Replace")), |
2813 'ViewManager', "Ctrl+R", "Search|Replace")), |
2739 0, |
2814 0, |
2740 self.searchActGrp, 'vm_search_replace') |
2815 self.searchActGrp, 'vm_search_replace') |
2741 self.replaceAct.setStatusTip(QApplication.translate('ViewManager', |
2816 self.replaceAct.setStatusTip(QApplication.translate( |
2742 'Replace some text')) |
2817 'ViewManager', 'Replace some text')) |
2743 self.replaceAct.setWhatsThis(QApplication.translate('ViewManager', |
2818 self.replaceAct.setWhatsThis(QApplication.translate( |
|
2819 'ViewManager', |
2744 """<b>Replace</b>""" |
2820 """<b>Replace</b>""" |
2745 """<p>Search for some text in the current editor and replace it.""" |
2821 """<p>Search for some text in the current editor and replace it.""" |
2746 """ A dialog is shown to enter the searchtext, the replacement""" |
2822 """ A dialog is shown to enter the searchtext, the replacement""" |
2747 """ text and options for the search and replace.</p>""" |
2823 """ text and options for the search and replace.</p>""" |
2748 )) |
2824 )) |
2749 self.replaceAct.triggered[()].connect(self.__replace) |
2825 self.replaceAct.triggered[()].connect(self.__replace) |
2750 self.searchActions.append(self.replaceAct) |
2826 self.searchActions.append(self.replaceAct) |
2751 |
2827 |
2752 self.quickSearchAct = E5Action(QApplication.translate('ViewManager', |
2828 self.quickSearchAct = E5Action( |
2753 'Quicksearch'), |
2829 QApplication.translate('ViewManager', 'Quicksearch'), |
2754 UI.PixmapCache.getIcon("quickFindNext.png"), |
2830 UI.PixmapCache.getIcon("quickFindNext.png"), |
2755 QApplication.translate('ViewManager', '&Quicksearch'), |
2831 QApplication.translate('ViewManager', '&Quicksearch'), |
2756 QKeySequence(QApplication.translate('ViewManager', |
2832 QKeySequence(QApplication.translate( |
2757 "Ctrl+Shift+K", "Search|Quicksearch")), |
2833 'ViewManager', "Ctrl+Shift+K", "Search|Quicksearch")), |
2758 0, |
2834 0, |
2759 self.searchActGrp, 'vm_quicksearch') |
2835 self.searchActGrp, 'vm_quicksearch') |
2760 self.quickSearchAct.setStatusTip(QApplication.translate('ViewManager', |
2836 self.quickSearchAct.setStatusTip(QApplication.translate( |
2761 'Perform a quicksearch')) |
2837 'ViewManager', 'Perform a quicksearch')) |
2762 self.quickSearchAct.setWhatsThis(QApplication.translate('ViewManager', |
2838 self.quickSearchAct.setWhatsThis(QApplication.translate( |
|
2839 'ViewManager', |
2763 """<b>Quicksearch</b>""" |
2840 """<b>Quicksearch</b>""" |
2764 """<p>This activates the quicksearch function of the IDE by""" |
2841 """<p>This activates the quicksearch function of the IDE by""" |
2765 """ giving focus to the quicksearch entry field. If this field""" |
2842 """ giving focus to the quicksearch entry field. If this field""" |
2766 """ is already active and contains text, it searches for the""" |
2843 """ is already active and contains text, it searches for the""" |
2767 """ next occurrence of this text.</p>""" |
2844 """ next occurrence of this text.</p>""" |
2889 self.searchActions.append(self.gotoPreviousDefAct) |
2969 self.searchActions.append(self.gotoPreviousDefAct) |
2890 |
2970 |
2891 self.gotoNextDefAct = E5Action( |
2971 self.gotoNextDefAct = E5Action( |
2892 QApplication.translate('ViewManager', 'Goto Next Method or Class'), |
2972 QApplication.translate('ViewManager', 'Goto Next Method or Class'), |
2893 QApplication.translate('ViewManager', 'Goto Next Method or Class'), |
2973 QApplication.translate('ViewManager', 'Goto Next Method or Class'), |
2894 QKeySequence(QApplication.translate('ViewManager', |
2974 QKeySequence(QApplication.translate( |
|
2975 'ViewManager', |
2895 "Ctrl+Shift+Down", "Search|Goto Next Method or Class")), |
2976 "Ctrl+Shift+Down", "Search|Goto Next Method or Class")), |
2896 0, |
2977 0, |
2897 self.searchActGrp, 'vm_search_goto_next_method_or_class') |
2978 self.searchActGrp, 'vm_search_goto_next_method_or_class') |
2898 self.gotoNextDefAct.setStatusTip(QApplication.translate( |
2979 self.gotoNextDefAct.setStatusTip(QApplication.translate( |
2899 'ViewManager', 'Go to the next method or class definition')) |
2980 'ViewManager', 'Go to the next method or class definition')) |
2900 self.gotoNextDefAct.setWhatsThis(QApplication.translate('ViewManager', |
2981 self.gotoNextDefAct.setWhatsThis(QApplication.translate( |
|
2982 'ViewManager', |
2901 """<b>Goto Next Method or Class</b>""" |
2983 """<b>Goto Next Method or Class</b>""" |
2902 """<p>Goes to the line of the next method or class definition""" |
2984 """<p>Goes to the line of the next method or class definition""" |
2903 """ and highlights the name.</p>""" |
2985 """ and highlights the name.</p>""" |
2904 )) |
2986 )) |
2905 self.gotoNextDefAct.triggered[()].connect(self.__gotoNextMethodClass) |
2987 self.gotoNextDefAct.triggered[()].connect(self.__gotoNextMethodClass) |
2906 self.searchActions.append(self.gotoNextDefAct) |
2988 self.searchActions.append(self.gotoNextDefAct) |
2907 |
2989 |
2908 self.searchActGrp.setEnabled(False) |
2990 self.searchActGrp.setEnabled(False) |
2909 |
2991 |
2910 self.searchFilesAct = E5Action(QApplication.translate('ViewManager', |
2992 self.searchFilesAct = E5Action( |
2911 'Search in Files'), |
2993 QApplication.translate('ViewManager', 'Search in Files'), |
2912 UI.PixmapCache.getIcon("projectFind.png"), |
2994 UI.PixmapCache.getIcon("projectFind.png"), |
2913 QApplication.translate('ViewManager', 'Search in &Files...'), |
2995 QApplication.translate('ViewManager', 'Search in &Files...'), |
2914 QKeySequence(QApplication.translate('ViewManager', |
2996 QKeySequence(QApplication.translate( |
2915 "Shift+Ctrl+F", "Search|Search Files")), |
2997 'ViewManager', "Shift+Ctrl+F", "Search|Search Files")), |
2916 0, |
2998 0, |
2917 self, 'vm_search_in_files') |
2999 self, 'vm_search_in_files') |
2918 self.searchFilesAct.setStatusTip(QApplication.translate('ViewManager', |
3000 self.searchFilesAct.setStatusTip(QApplication.translate( |
2919 'Search for a text in files')) |
3001 'ViewManager', 'Search for a text in files')) |
2920 self.searchFilesAct.setWhatsThis(QApplication.translate('ViewManager', |
3002 self.searchFilesAct.setWhatsThis(QApplication.translate( |
|
3003 'ViewManager', |
2921 """<b>Search in Files</b>""" |
3004 """<b>Search in Files</b>""" |
2922 """<p>Search for some text in the files of a directory tree""" |
3005 """<p>Search for some text in the files of a directory tree""" |
2923 """ or the project. A dialog is shown to enter the searchtext""" |
3006 """ or the project. A dialog is shown to enter the searchtext""" |
2924 """ and options for the search and to display the result.</p>""" |
3007 """ and options for the search and to display the result.</p>""" |
2925 )) |
3008 )) |
2926 self.searchFilesAct.triggered[()].connect(self.__searchFiles) |
3009 self.searchFilesAct.triggered[()].connect(self.__searchFiles) |
2927 self.searchActions.append(self.searchFilesAct) |
3010 self.searchActions.append(self.searchFilesAct) |
2928 |
3011 |
2929 self.replaceFilesAct = E5Action(QApplication.translate('ViewManager', |
3012 self.replaceFilesAct = E5Action( |
2930 'Replace in Files'), |
3013 QApplication.translate('ViewManager', 'Replace in Files'), |
2931 QApplication.translate('ViewManager', 'Replace in F&iles...'), |
3014 QApplication.translate('ViewManager', 'Replace in F&iles...'), |
2932 QKeySequence(QApplication.translate('ViewManager', |
3015 QKeySequence(QApplication.translate( |
2933 "Shift+Ctrl+R", "Search|Replace in Files")), |
3016 'ViewManager', "Shift+Ctrl+R", "Search|Replace in Files")), |
2934 0, |
3017 0, |
2935 self, 'vm_replace_in_files') |
3018 self, 'vm_replace_in_files') |
2936 self.replaceFilesAct.setStatusTip(QApplication.translate('ViewManager', |
3019 self.replaceFilesAct.setStatusTip(QApplication.translate( |
2937 'Search for a text in files and replace it')) |
3020 'ViewManager', 'Search for a text in files and replace it')) |
2938 self.replaceFilesAct.setWhatsThis(QApplication.translate('ViewManager', |
3021 self.replaceFilesAct.setWhatsThis(QApplication.translate( |
|
3022 'ViewManager', |
2939 """<b>Replace in Files</b>""" |
3023 """<b>Replace in Files</b>""" |
2940 """<p>Search for some text in the files of a directory tree""" |
3024 """<p>Search for some text in the files of a directory tree""" |
2941 """ or the project and replace it. A dialog is shown to enter""" |
3025 """ or the project and replace it. A dialog is shown to enter""" |
2942 """ the searchtext, the replacement text and options for the""" |
3026 """ the searchtext, the replacement text and options for the""" |
2943 """ search and to display the result.</p>""" |
3027 """ search and to display the result.</p>""" |
3098 |
3184 |
3099 self.zoomInAct = E5Action( |
3185 self.zoomInAct = E5Action( |
3100 QApplication.translate('ViewManager', 'Zoom in'), |
3186 QApplication.translate('ViewManager', 'Zoom in'), |
3101 UI.PixmapCache.getIcon("zoomIn.png"), |
3187 UI.PixmapCache.getIcon("zoomIn.png"), |
3102 QApplication.translate('ViewManager', 'Zoom &in'), |
3188 QApplication.translate('ViewManager', 'Zoom &in'), |
3103 QKeySequence(QApplication.translate('ViewManager', |
3189 QKeySequence(QApplication.translate( |
3104 "Ctrl++", "View|Zoom in")), |
3190 'ViewManager', "Ctrl++", "View|Zoom in")), |
3105 QKeySequence(QApplication.translate('ViewManager', |
3191 QKeySequence(QApplication.translate( |
3106 "Zoom In", "View|Zoom in")), |
3192 'ViewManager', "Zoom In", "View|Zoom in")), |
3107 self.viewActGrp, 'vm_view_zoom_in') |
3193 self.viewActGrp, 'vm_view_zoom_in') |
3108 self.zoomInAct.setStatusTip(QApplication.translate('ViewManager', |
3194 self.zoomInAct.setStatusTip(QApplication.translate( |
3109 'Zoom in on the text')) |
3195 'ViewManager', 'Zoom in on the text')) |
3110 self.zoomInAct.setWhatsThis(QApplication.translate('ViewManager', |
3196 self.zoomInAct.setWhatsThis(QApplication.translate( |
3111 """<b>Zoom in</b>""" |
3197 'ViewManager', |
3112 """<p>Zoom in on the text. This makes the text bigger.</p>""" |
3198 """<b>Zoom in</b>""" |
3113 )) |
3199 """<p>Zoom in on the text. This makes the text bigger.</p>""" |
|
3200 )) |
3114 self.zoomInAct.triggered[()].connect(self.__zoomIn) |
3201 self.zoomInAct.triggered[()].connect(self.__zoomIn) |
3115 self.viewActions.append(self.zoomInAct) |
3202 self.viewActions.append(self.zoomInAct) |
3116 |
3203 |
3117 self.zoomOutAct = E5Action( |
3204 self.zoomOutAct = E5Action( |
3118 QApplication.translate('ViewManager', 'Zoom out'), |
3205 QApplication.translate('ViewManager', 'Zoom out'), |
3119 UI.PixmapCache.getIcon("zoomOut.png"), |
3206 UI.PixmapCache.getIcon("zoomOut.png"), |
3120 QApplication.translate('ViewManager', 'Zoom &out'), |
3207 QApplication.translate('ViewManager', 'Zoom &out'), |
3121 QKeySequence(QApplication.translate('ViewManager', |
3208 QKeySequence(QApplication.translate( |
3122 "Ctrl+-", "View|Zoom out")), |
3209 'ViewManager', "Ctrl+-", "View|Zoom out")), |
3123 QKeySequence(QApplication.translate('ViewManager', |
3210 QKeySequence(QApplication.translate( |
3124 "Zoom Out", "View|Zoom out")), |
3211 'ViewManager', "Zoom Out", "View|Zoom out")), |
3125 self.viewActGrp, 'vm_view_zoom_out') |
3212 self.viewActGrp, 'vm_view_zoom_out') |
3126 self.zoomOutAct.setStatusTip(QApplication.translate('ViewManager', |
3213 self.zoomOutAct.setStatusTip(QApplication.translate( |
3127 'Zoom out on the text')) |
3214 'ViewManager', 'Zoom out on the text')) |
3128 self.zoomOutAct.setWhatsThis(QApplication.translate('ViewManager', |
3215 self.zoomOutAct.setWhatsThis(QApplication.translate( |
3129 """<b>Zoom out</b>""" |
3216 'ViewManager', |
3130 """<p>Zoom out on the text. This makes the text smaller.</p>""" |
3217 """<b>Zoom out</b>""" |
3131 )) |
3218 """<p>Zoom out on the text. This makes the text smaller.</p>""" |
|
3219 )) |
3132 self.zoomOutAct.triggered[()].connect(self.__zoomOut) |
3220 self.zoomOutAct.triggered[()].connect(self.__zoomOut) |
3133 self.viewActions.append(self.zoomOutAct) |
3221 self.viewActions.append(self.zoomOutAct) |
3134 |
3222 |
3135 self.zoomResetAct = E5Action( |
3223 self.zoomResetAct = E5Action( |
3136 QApplication.translate('ViewManager', 'Zoom reset'), |
3224 QApplication.translate('ViewManager', 'Zoom reset'), |
3137 UI.PixmapCache.getIcon("zoomReset.png"), |
3225 UI.PixmapCache.getIcon("zoomReset.png"), |
3138 QApplication.translate('ViewManager', 'Zoom &reset'), |
3226 QApplication.translate('ViewManager', 'Zoom &reset'), |
3139 QKeySequence(QApplication.translate('ViewManager', |
3227 QKeySequence(QApplication.translate( |
3140 "Ctrl+0", "View|Zoom reset")), |
3228 'ViewManager', "Ctrl+0", "View|Zoom reset")), |
3141 0, |
3229 0, |
3142 self.viewActGrp, 'vm_view_zoom_reset') |
3230 self.viewActGrp, 'vm_view_zoom_reset') |
3143 self.zoomResetAct.setStatusTip(QApplication.translate('ViewManager', |
3231 self.zoomResetAct.setStatusTip(QApplication.translate( |
3144 'Reset the zoom of the text')) |
3232 'ViewManager', 'Reset the zoom of the text')) |
3145 self.zoomResetAct.setWhatsThis(QApplication.translate('ViewManager', |
3233 self.zoomResetAct.setWhatsThis(QApplication.translate( |
3146 """<b>Zoom reset</b>""" |
3234 'ViewManager', |
3147 """<p>Reset the zoom of the text. """ |
3235 """<b>Zoom reset</b>""" |
3148 """This sets the zoom factor to 100%.</p>""" |
3236 """<p>Reset the zoom of the text. """ |
3149 )) |
3237 """This sets the zoom factor to 100%.</p>""" |
|
3238 )) |
3150 self.zoomResetAct.triggered[()].connect(self.__zoomReset) |
3239 self.zoomResetAct.triggered[()].connect(self.__zoomReset) |
3151 self.viewActions.append(self.zoomResetAct) |
3240 self.viewActions.append(self.zoomResetAct) |
3152 |
3241 |
3153 self.zoomToAct = E5Action( |
3242 self.zoomToAct = E5Action( |
3154 QApplication.translate('ViewManager', 'Zoom'), |
3243 QApplication.translate('ViewManager', 'Zoom'), |
3155 UI.PixmapCache.getIcon("zoomTo.png"), |
3244 UI.PixmapCache.getIcon("zoomTo.png"), |
3156 QApplication.translate('ViewManager', '&Zoom'), |
3245 QApplication.translate('ViewManager', '&Zoom'), |
3157 QKeySequence(QApplication.translate('ViewManager', |
3246 QKeySequence(QApplication.translate( |
3158 "Ctrl+#", "View|Zoom")), |
3247 'ViewManager', "Ctrl+#", "View|Zoom")), |
3159 0, |
3248 0, |
3160 self.viewActGrp, 'vm_view_zoom') |
3249 self.viewActGrp, 'vm_view_zoom') |
3161 self.zoomToAct.setStatusTip(QApplication.translate('ViewManager', |
3250 self.zoomToAct.setStatusTip(QApplication.translate( |
3162 'Zoom the text')) |
3251 'ViewManager', 'Zoom the text')) |
3163 self.zoomToAct.setWhatsThis(QApplication.translate('ViewManager', |
3252 self.zoomToAct.setWhatsThis(QApplication.translate( |
3164 """<b>Zoom</b>""" |
3253 'ViewManager', |
3165 """<p>Zoom the text. This opens a dialog where the""" |
3254 """<b>Zoom</b>""" |
3166 """ desired size can be entered.</p>""" |
3255 """<p>Zoom the text. This opens a dialog where the""" |
3167 )) |
3256 """ desired size can be entered.</p>""" |
|
3257 )) |
3168 self.zoomToAct.triggered[()].connect(self.__zoom) |
3258 self.zoomToAct.triggered[()].connect(self.__zoom) |
3169 self.viewActions.append(self.zoomToAct) |
3259 self.viewActions.append(self.zoomToAct) |
3170 |
3260 |
3171 self.toggleAllAct = E5Action( |
3261 self.toggleAllAct = E5Action( |
3172 QApplication.translate('ViewManager', 'Toggle all folds'), |
3262 QApplication.translate('ViewManager', 'Toggle all folds'), |
3173 QApplication.translate('ViewManager', 'Toggle &all folds'), |
3263 QApplication.translate('ViewManager', 'Toggle &all folds'), |
3174 0, 0, self.viewFoldActGrp, 'vm_view_toggle_all_folds') |
3264 0, 0, self.viewFoldActGrp, 'vm_view_toggle_all_folds') |
3175 self.toggleAllAct.setStatusTip(QApplication.translate('ViewManager', |
3265 self.toggleAllAct.setStatusTip(QApplication.translate( |
3176 'Toggle all folds')) |
3266 'ViewManager', 'Toggle all folds')) |
3177 self.toggleAllAct.setWhatsThis(QApplication.translate('ViewManager', |
3267 self.toggleAllAct.setWhatsThis(QApplication.translate( |
3178 """<b>Toggle all folds</b>""" |
3268 'ViewManager', |
3179 """<p>Toggle all folds of the current editor.</p>""" |
3269 """<b>Toggle all folds</b>""" |
3180 )) |
3270 """<p>Toggle all folds of the current editor.</p>""" |
|
3271 )) |
3181 self.toggleAllAct.triggered[()].connect(self.__toggleAll) |
3272 self.toggleAllAct.triggered[()].connect(self.__toggleAll) |
3182 self.viewActions.append(self.toggleAllAct) |
3273 self.viewActions.append(self.toggleAllAct) |
3183 |
3274 |
3184 self.toggleAllChildrenAct = E5Action( |
3275 self.toggleAllChildrenAct = E5Action( |
3185 QApplication.translate( |
3276 QApplication.translate( |
3208 self.toggleCurrentAct.setWhatsThis(QApplication.translate( |
3299 self.toggleCurrentAct.setWhatsThis(QApplication.translate( |
3209 'ViewManager', |
3300 'ViewManager', |
3210 """<b>Toggle current fold</b>""" |
3301 """<b>Toggle current fold</b>""" |
3211 """<p>Toggle the folds of the current line of the current""" |
3302 """<p>Toggle the folds of the current line of the current""" |
3212 """ editor.</p>""" |
3303 """ editor.</p>""" |
3213 )) |
3304 )) |
3214 self.toggleCurrentAct.triggered[()].connect(self.__toggleCurrent) |
3305 self.toggleCurrentAct.triggered[()].connect(self.__toggleCurrent) |
3215 self.viewActions.append(self.toggleCurrentAct) |
3306 self.viewActions.append(self.toggleCurrentAct) |
3216 |
3307 |
3217 self.unhighlightAct = E5Action(QApplication.translate('ViewManager', |
3308 self.unhighlightAct = E5Action( |
3218 'Remove all highlights'), |
3309 QApplication.translate('ViewManager', 'Remove all highlights'), |
3219 UI.PixmapCache.getIcon("unhighlight.png"), |
3310 UI.PixmapCache.getIcon("unhighlight.png"), |
3220 QApplication.translate('ViewManager', |
3311 QApplication.translate('ViewManager', 'Remove all highlights'), |
3221 'Remove all highlights'), |
3312 0, 0, |
3222 0, 0, self, 'vm_view_unhighlight') |
3313 self, 'vm_view_unhighlight') |
3223 self.unhighlightAct.setStatusTip(QApplication.translate('ViewManager', |
3314 self.unhighlightAct.setStatusTip(QApplication.translate( |
3224 'Remove all highlights')) |
3315 'ViewManager', 'Remove all highlights')) |
3225 self.unhighlightAct.setWhatsThis(QApplication.translate('ViewManager', |
3316 self.unhighlightAct.setWhatsThis(QApplication.translate( |
3226 """<b>Remove all highlights</b>""" |
3317 'ViewManager', |
3227 """<p>Remove the highlights of all editors.</p>""" |
3318 """<b>Remove all highlights</b>""" |
3228 )) |
3319 """<p>Remove the highlights of all editors.</p>""" |
|
3320 )) |
3229 self.unhighlightAct.triggered[()].connect(self.unhighlight) |
3321 self.unhighlightAct.triggered[()].connect(self.unhighlight) |
3230 self.viewActions.append(self.unhighlightAct) |
3322 self.viewActions.append(self.unhighlightAct) |
3231 |
3323 |
3232 self.splitViewAct = E5Action( |
3324 self.splitViewAct = E5Action( |
3233 QApplication.translate('ViewManager', 'Split view'), |
3325 QApplication.translate('ViewManager', 'Split view'), |
3234 UI.PixmapCache.getIcon("splitVertical.png"), |
3326 UI.PixmapCache.getIcon("splitVertical.png"), |
3235 QApplication.translate('ViewManager', '&Split view'), |
3327 QApplication.translate('ViewManager', '&Split view'), |
3236 0, 0, self, 'vm_view_split_view') |
3328 0, 0, self, 'vm_view_split_view') |
3237 self.splitViewAct.setStatusTip(QApplication.translate('ViewManager', |
3329 self.splitViewAct.setStatusTip(QApplication.translate( |
3238 'Add a split to the view')) |
3330 'ViewManager', 'Add a split to the view')) |
3239 self.splitViewAct.setWhatsThis(QApplication.translate('ViewManager', |
3331 self.splitViewAct.setWhatsThis(QApplication.translate( |
|
3332 'ViewManager', |
3240 """<b>Split view</b>""" |
3333 """<b>Split view</b>""" |
3241 """<p>Add a split to the view.</p>""" |
3334 """<p>Add a split to the view.</p>""" |
3242 )) |
3335 )) |
3243 self.splitViewAct.triggered[()].connect(self.__splitView) |
3336 self.splitViewAct.triggered[()].connect(self.__splitView) |
3244 self.viewActions.append(self.splitViewAct) |
3337 self.viewActions.append(self.splitViewAct) |
3245 |
3338 |
3246 self.splitOrientationAct = E5Action( |
3339 self.splitOrientationAct = E5Action( |
3247 QApplication.translate('ViewManager', 'Arrange horizontally'), |
3340 QApplication.translate('ViewManager', 'Arrange horizontally'), |
3251 'ViewManager', 'Arrange the splitted views horizontally')) |
3344 'ViewManager', 'Arrange the splitted views horizontally')) |
3252 self.splitOrientationAct.setWhatsThis(QApplication.translate( |
3345 self.splitOrientationAct.setWhatsThis(QApplication.translate( |
3253 'ViewManager', |
3346 'ViewManager', |
3254 """<b>Arrange horizontally</b>""" |
3347 """<b>Arrange horizontally</b>""" |
3255 """<p>Arrange the splitted views horizontally.</p>""" |
3348 """<p>Arrange the splitted views horizontally.</p>""" |
3256 )) |
3349 )) |
3257 self.splitOrientationAct.setChecked(False) |
3350 self.splitOrientationAct.setChecked(False) |
3258 self.splitOrientationAct.toggled[bool].connect(self.__splitOrientation) |
3351 self.splitOrientationAct.toggled[bool].connect(self.__splitOrientation) |
3259 self.viewActions.append(self.splitOrientationAct) |
3352 self.viewActions.append(self.splitOrientationAct) |
3260 |
3353 |
3261 self.splitRemoveAct = E5Action( |
3354 self.splitRemoveAct = E5Action( |
3262 QApplication.translate('ViewManager', 'Remove split'), |
3355 QApplication.translate('ViewManager', 'Remove split'), |
3263 UI.PixmapCache.getIcon("remsplitVertical.png"), |
3356 UI.PixmapCache.getIcon("remsplitVertical.png"), |
3264 QApplication.translate('ViewManager', '&Remove split'), |
3357 QApplication.translate('ViewManager', '&Remove split'), |
3265 0, 0, self, 'vm_view_remove_split') |
3358 0, 0, self, 'vm_view_remove_split') |
3266 self.splitRemoveAct.setStatusTip(QApplication.translate('ViewManager', |
3359 self.splitRemoveAct.setStatusTip(QApplication.translate( |
3267 'Remove the current split')) |
3360 'ViewManager', 'Remove the current split')) |
3268 self.splitRemoveAct.setWhatsThis(QApplication.translate('ViewManager', |
3361 self.splitRemoveAct.setWhatsThis(QApplication.translate( |
3269 """<b>Remove split</b>""" |
3362 'ViewManager', |
3270 """<p>Remove the current split.</p>""" |
3363 """<b>Remove split</b>""" |
3271 )) |
3364 """<p>Remove the current split.</p>""" |
|
3365 )) |
3272 self.splitRemoveAct.triggered[()].connect(self.removeSplit) |
3366 self.splitRemoveAct.triggered[()].connect(self.removeSplit) |
3273 self.viewActions.append(self.splitRemoveAct) |
3367 self.viewActions.append(self.splitRemoveAct) |
3274 |
3368 |
3275 self.nextSplitAct = E5Action( |
3369 self.nextSplitAct = E5Action( |
3276 QApplication.translate('ViewManager', 'Next split'), |
3370 QApplication.translate('ViewManager', 'Next split'), |
3277 QApplication.translate('ViewManager', '&Next split'), |
3371 QApplication.translate('ViewManager', '&Next split'), |
3278 QKeySequence(QApplication.translate('ViewManager', |
3372 QKeySequence(QApplication.translate( |
3279 "Ctrl+Alt+N", "View|Next split")), |
3373 'ViewManager', "Ctrl+Alt+N", "View|Next split")), |
3280 0, |
3374 0, |
3281 self, 'vm_next_split') |
3375 self, 'vm_next_split') |
3282 self.nextSplitAct.setStatusTip(QApplication.translate('ViewManager', |
3376 self.nextSplitAct.setStatusTip(QApplication.translate( |
3283 'Move to the next split')) |
3377 'ViewManager', 'Move to the next split')) |
3284 self.nextSplitAct.setWhatsThis(QApplication.translate('ViewManager', |
3378 self.nextSplitAct.setWhatsThis(QApplication.translate( |
3285 """<b>Next split</b>""" |
3379 'ViewManager', |
3286 """<p>Move to the next split.</p>""" |
3380 """<b>Next split</b>""" |
3287 )) |
3381 """<p>Move to the next split.</p>""" |
|
3382 )) |
3288 self.nextSplitAct.triggered[()].connect(self.nextSplit) |
3383 self.nextSplitAct.triggered[()].connect(self.nextSplit) |
3289 self.viewActions.append(self.nextSplitAct) |
3384 self.viewActions.append(self.nextSplitAct) |
3290 |
3385 |
3291 self.prevSplitAct = E5Action( |
3386 self.prevSplitAct = E5Action( |
3292 QApplication.translate('ViewManager', 'Previous split'), |
3387 QApplication.translate('ViewManager', 'Previous split'), |
3293 QApplication.translate('ViewManager', '&Previous split'), |
3388 QApplication.translate('ViewManager', '&Previous split'), |
3294 QKeySequence(QApplication.translate('ViewManager', |
3389 QKeySequence(QApplication.translate( |
3295 "Ctrl+Alt+P", "View|Previous split")), |
3390 'ViewManager', "Ctrl+Alt+P", "View|Previous split")), |
3296 0, self, 'vm_previous_split') |
3391 0, self, 'vm_previous_split') |
3297 self.prevSplitAct.setStatusTip(QApplication.translate('ViewManager', |
3392 self.prevSplitAct.setStatusTip(QApplication.translate( |
3298 'Move to the previous split')) |
3393 'ViewManager', 'Move to the previous split')) |
3299 self.prevSplitAct.setWhatsThis(QApplication.translate('ViewManager', |
3394 self.prevSplitAct.setWhatsThis(QApplication.translate( |
3300 """<b>Previous split</b>""" |
3395 'ViewManager', |
3301 """<p>Move to the previous split.</p>""" |
3396 """<b>Previous split</b>""" |
3302 )) |
3397 """<p>Move to the previous split.</p>""" |
|
3398 )) |
3303 self.prevSplitAct.triggered[()].connect(self.prevSplit) |
3399 self.prevSplitAct.triggered[()].connect(self.prevSplit) |
3304 self.viewActions.append(self.prevSplitAct) |
3400 self.viewActions.append(self.prevSplitAct) |
3305 |
3401 |
3306 self.previewAct = E5Action(QApplication.translate('ViewManager', |
3402 self.previewAct = E5Action( |
3307 'Preview'), |
3403 QApplication.translate('ViewManager', 'Preview'), |
3308 UI.PixmapCache.getIcon("previewer.png"), |
3404 UI.PixmapCache.getIcon("previewer.png"), |
3309 QApplication.translate('ViewManager', 'Preview'), |
3405 QApplication.translate('ViewManager', 'Preview'), |
3310 0, 0, self, 'vm_preview', True) |
3406 0, 0, self, 'vm_preview', True) |
3311 self.previewAct.setStatusTip(QApplication.translate('ViewManager', |
3407 self.previewAct.setStatusTip(QApplication.translate( |
3312 'Preview the current file in the web browser')) |
3408 'ViewManager', 'Preview the current file in the web browser')) |
3313 self.previewAct.setWhatsThis(QApplication.translate('ViewManager', |
3409 self.previewAct.setWhatsThis(QApplication.translate( |
3314 """<b>Preview</b>""" |
3410 'ViewManager', |
3315 """<p>This opens the web browser with a preview of""" |
3411 """<b>Preview</b>""" |
3316 """ the current file.</p>""" |
3412 """<p>This opens the web browser with a preview of""" |
3317 )) |
3413 """ the current file.</p>""" |
|
3414 )) |
3318 self.previewAct.setChecked(Preferences.getUI("ShowFilePreview")) |
3415 self.previewAct.setChecked(Preferences.getUI("ShowFilePreview")) |
3319 self.previewAct.toggled[bool].connect(self.__previewEditor) |
3416 self.previewAct.toggled[bool].connect(self.__previewEditor) |
3320 self.viewActions.append(self.previewAct) |
3417 self.viewActions.append(self.previewAct) |
3321 |
3418 |
3322 self.viewActGrp.setEnabled(False) |
3419 self.viewActGrp.setEnabled(False) |
3397 'ViewManager', 'Start Macro Recording')) |
3494 'ViewManager', 'Start Macro Recording')) |
3398 self.macroStartRecAct.setWhatsThis(QApplication.translate( |
3495 self.macroStartRecAct.setWhatsThis(QApplication.translate( |
3399 'ViewManager', |
3496 'ViewManager', |
3400 """<b>Start Macro Recording</b>""" |
3497 """<b>Start Macro Recording</b>""" |
3401 """<p>Start recording editor commands into a new macro.</p>""" |
3498 """<p>Start recording editor commands into a new macro.</p>""" |
3402 )) |
3499 )) |
3403 self.macroStartRecAct.triggered[()].connect(self.__macroStartRecording) |
3500 self.macroStartRecAct.triggered[()].connect(self.__macroStartRecording) |
3404 self.macroActions.append(self.macroStartRecAct) |
3501 self.macroActions.append(self.macroStartRecAct) |
3405 |
3502 |
3406 self.macroStopRecAct = E5Action(QApplication.translate('ViewManager', |
3503 self.macroStopRecAct = E5Action( |
3407 'Stop Macro Recording'), |
3504 QApplication.translate('ViewManager', 'Stop Macro Recording'), |
3408 QApplication.translate('ViewManager', |
3505 QApplication.translate('ViewManager', 'Sto&p Macro Recording'), |
3409 'Sto&p Macro Recording'), |
3506 0, 0, self.macroActGrp, 'vm_macro_stop_recording') |
3410 0, 0, self.macroActGrp, 'vm_macro_stop_recording') |
3507 self.macroStopRecAct.setStatusTip(QApplication.translate( |
3411 self.macroStopRecAct.setStatusTip(QApplication.translate('ViewManager', |
3508 'ViewManager', 'Stop Macro Recording')) |
3412 'Stop Macro Recording')) |
3509 self.macroStopRecAct.setWhatsThis(QApplication.translate( |
3413 self.macroStopRecAct.setWhatsThis(QApplication.translate('ViewManager', |
3510 'ViewManager', |
3414 """<b>Stop Macro Recording</b>""" |
3511 """<b>Stop Macro Recording</b>""" |
3415 """<p>Stop recording editor commands into a new macro.</p>""" |
3512 """<p>Stop recording editor commands into a new macro.</p>""" |
3416 )) |
3513 )) |
3417 self.macroStopRecAct.triggered[()].connect(self.__macroStopRecording) |
3514 self.macroStopRecAct.triggered[()].connect(self.__macroStopRecording) |
3418 self.macroActions.append(self.macroStopRecAct) |
3515 self.macroActions.append(self.macroStopRecAct) |
3419 |
3516 |
3420 self.macroRunAct = E5Action( |
3517 self.macroRunAct = E5Action( |
3421 QApplication.translate('ViewManager', 'Run Macro'), |
3518 QApplication.translate('ViewManager', 'Run Macro'), |
3593 'ViewManager', 'Clear Syntax Errors')) |
3692 'ViewManager', 'Clear Syntax Errors')) |
3594 self.syntaxErrorClearAct.setWhatsThis(QApplication.translate( |
3693 self.syntaxErrorClearAct.setWhatsThis(QApplication.translate( |
3595 'ViewManager', |
3694 'ViewManager', |
3596 """<b>Clear Syntax Errors</b>""" |
3695 """<b>Clear Syntax Errors</b>""" |
3597 """<p>Clear syntax errors of all editors.</p>""" |
3696 """<p>Clear syntax errors of all editors.</p>""" |
3598 )) |
3697 )) |
3599 self.syntaxErrorClearAct.triggered[()].connect( |
3698 self.syntaxErrorClearAct.triggered[()].connect( |
3600 self.__clearAllSyntaxErrors) |
3699 self.__clearAllSyntaxErrors) |
3601 self.bookmarkActions.append(self.syntaxErrorClearAct) |
3700 self.bookmarkActions.append(self.syntaxErrorClearAct) |
3602 |
3701 |
3603 self.warningsNextAct = E5Action(QApplication.translate('ViewManager', |
3702 self.warningsNextAct = E5Action( |
3604 'Next warning message'), |
3703 QApplication.translate('ViewManager', 'Next warning message'), |
3605 UI.PixmapCache.getIcon("warningNext.png"), |
3704 UI.PixmapCache.getIcon("warningNext.png"), |
3606 QApplication.translate('ViewManager', |
3705 QApplication.translate('ViewManager', '&Next warning message'), |
3607 '&Next warning message'), |
3706 0, 0, |
3608 0, 0, |
3707 self.bookmarkActGrp, 'vm_warning_next') |
3609 self.bookmarkActGrp, 'vm_warning_next') |
3708 self.warningsNextAct.setStatusTip(QApplication.translate( |
3610 self.warningsNextAct.setStatusTip(QApplication.translate('ViewManager', |
3709 'ViewManager', 'Next warning message')) |
3611 'Next warning message')) |
3710 self.warningsNextAct.setWhatsThis(QApplication.translate( |
3612 self.warningsNextAct.setWhatsThis(QApplication.translate('ViewManager', |
3711 'ViewManager', |
3613 """<b>Next warning message</b>""" |
3712 """<b>Next warning message</b>""" |
3614 """<p>Go to next line of the current editor""" |
3713 """<p>Go to next line of the current editor""" |
3615 """ having a py3flakes warning.</p>""" |
3714 """ having a py3flakes warning.</p>""" |
3616 )) |
3715 )) |
3617 self.warningsNextAct.triggered[()].connect(self.__nextWarning) |
3716 self.warningsNextAct.triggered[()].connect(self.__nextWarning) |
3618 self.bookmarkActions.append(self.warningsNextAct) |
3717 self.bookmarkActions.append(self.warningsNextAct) |
3619 |
3718 |
3620 self.warningsPreviousAct = E5Action( |
3719 self.warningsPreviousAct = E5Action( |
3621 QApplication.translate('ViewManager', 'Previous warning message'), |
3720 QApplication.translate('ViewManager', 'Previous warning message'), |
3622 UI.PixmapCache.getIcon("warningPrev.png"), |
3721 UI.PixmapCache.getIcon("warningPrev.png"), |
3623 QApplication.translate('ViewManager', |
3722 QApplication.translate( |
3624 '&Previous warning message'), |
3723 'ViewManager', '&Previous warning message'), |
3625 0, 0, |
3724 0, 0, |
3626 self.bookmarkActGrp, 'vm_warning_previous') |
3725 self.bookmarkActGrp, 'vm_warning_previous') |
3627 self.warningsPreviousAct.setStatusTip(QApplication.translate( |
3726 self.warningsPreviousAct.setStatusTip(QApplication.translate( |
3628 'ViewManager', 'Previous warning message')) |
3727 'ViewManager', 'Previous warning message')) |
3629 self.warningsPreviousAct.setWhatsThis(QApplication.translate( |
3728 self.warningsPreviousAct.setWhatsThis(QApplication.translate( |
3630 'ViewManager', |
3729 'ViewManager', |
3631 """<b>Previous warning message</b>""" |
3730 """<b>Previous warning message</b>""" |
3632 """<p>Go to previous line of the current editor""" |
3731 """<p>Go to previous line of the current editor""" |
3633 """ having a py3flakes warning.</p>""" |
3732 """ having a py3flakes warning.</p>""" |
3634 )) |
3733 )) |
3635 self.warningsPreviousAct.triggered[()].connect(self.__previousWarning) |
3734 self.warningsPreviousAct.triggered[()].connect(self.__previousWarning) |
3636 self.bookmarkActions.append(self.warningsPreviousAct) |
3735 self.bookmarkActions.append(self.warningsPreviousAct) |
3637 |
3736 |
3638 self.warningsClearAct = E5Action( |
3737 self.warningsClearAct = E5Action( |
3639 QApplication.translate('ViewManager', 'Clear Warning Messages'), |
3738 QApplication.translate('ViewManager', 'Clear Warning Messages'), |
3661 self.notcoveredNextAct.setWhatsThis(QApplication.translate( |
3760 self.notcoveredNextAct.setWhatsThis(QApplication.translate( |
3662 'ViewManager', |
3761 'ViewManager', |
3663 """<b>Next uncovered line</b>""" |
3762 """<b>Next uncovered line</b>""" |
3664 """<p>Go to next line of the current editor marked as not""" |
3763 """<p>Go to next line of the current editor marked as not""" |
3665 """ covered.</p>""" |
3764 """ covered.</p>""" |
3666 )) |
3765 )) |
3667 self.notcoveredNextAct.triggered[()].connect(self.__nextUncovered) |
3766 self.notcoveredNextAct.triggered[()].connect(self.__nextUncovered) |
3668 self.bookmarkActions.append(self.notcoveredNextAct) |
3767 self.bookmarkActions.append(self.notcoveredNextAct) |
3669 |
3768 |
3670 self.notcoveredPreviousAct = E5Action( |
3769 self.notcoveredPreviousAct = E5Action( |
3671 QApplication.translate('ViewManager', 'Previous uncovered line'), |
3770 QApplication.translate('ViewManager', 'Previous uncovered line'), |
3672 UI.PixmapCache.getIcon("notcoveredPrev.png"), |
3771 UI.PixmapCache.getIcon("notcoveredPrev.png"), |
3673 QApplication.translate('ViewManager', |
3772 QApplication.translate( |
3674 '&Previous uncovered line'), |
3773 'ViewManager', '&Previous uncovered line'), |
3675 0, 0, |
3774 0, 0, |
3676 self.bookmarkActGrp, 'vm_uncovered_previous') |
3775 self.bookmarkActGrp, 'vm_uncovered_previous') |
3677 self.notcoveredPreviousAct.setStatusTip(QApplication.translate( |
3776 self.notcoveredPreviousAct.setStatusTip(QApplication.translate( |
3678 'ViewManager', 'Previous uncovered line')) |
3777 'ViewManager', 'Previous uncovered line')) |
3679 self.notcoveredPreviousAct.setWhatsThis(QApplication.translate( |
3778 self.notcoveredPreviousAct.setWhatsThis(QApplication.translate( |
3680 'ViewManager', |
3779 'ViewManager', |
3681 """<b>Previous uncovered line</b>""" |
3780 """<b>Previous uncovered line</b>""" |
3682 """<p>Go to previous line of the current editor marked""" |
3781 """<p>Go to previous line of the current editor marked""" |
3683 """ as not covered.</p>""" |
3782 """ as not covered.</p>""" |
3684 )) |
3783 )) |
3685 self.notcoveredPreviousAct.triggered[()].connect( |
3784 self.notcoveredPreviousAct.triggered[()].connect( |
3686 self.__previousUncovered) |
3785 self.__previousUncovered) |
3687 self.bookmarkActions.append(self.notcoveredPreviousAct) |
3786 self.bookmarkActions.append(self.notcoveredPreviousAct) |
3688 |
3787 |
3689 self.taskNextAct = E5Action( |
3788 self.taskNextAct = E5Action( |
3696 'ViewManager', 'Next Task')) |
3795 'ViewManager', 'Next Task')) |
3697 self.taskNextAct.setWhatsThis(QApplication.translate( |
3796 self.taskNextAct.setWhatsThis(QApplication.translate( |
3698 'ViewManager', |
3797 'ViewManager', |
3699 """<b>Next Task</b>""" |
3798 """<b>Next Task</b>""" |
3700 """<p>Go to next line of the current editor having a task.</p>""" |
3799 """<p>Go to next line of the current editor having a task.</p>""" |
3701 )) |
3800 )) |
3702 self.taskNextAct.triggered[()].connect(self.__nextTask) |
3801 self.taskNextAct.triggered[()].connect(self.__nextTask) |
3703 self.bookmarkActions.append(self.taskNextAct) |
3802 self.bookmarkActions.append(self.taskNextAct) |
3704 |
3803 |
3705 self.taskPreviousAct = E5Action( |
3804 self.taskPreviousAct = E5Action( |
3706 QApplication.translate('ViewManager', 'Previous Task'), |
3805 QApplication.translate('ViewManager', 'Previous Task'), |
3707 UI.PixmapCache.getIcon("taskPrev.png"), |
3806 UI.PixmapCache.getIcon("taskPrev.png"), |
3708 QApplication.translate('ViewManager', |
3807 QApplication.translate( |
3709 '&Previous Task'), |
3808 'ViewManager', '&Previous Task'), |
3710 0, 0, |
3809 0, 0, |
3711 self.bookmarkActGrp, 'vm_task_previous') |
3810 self.bookmarkActGrp, 'vm_task_previous') |
3712 self.taskPreviousAct.setStatusTip(QApplication.translate( |
3811 self.taskPreviousAct.setStatusTip(QApplication.translate( |
3713 'ViewManager', 'Previous Task')) |
3812 'ViewManager', 'Previous Task')) |
3714 self.taskPreviousAct.setWhatsThis(QApplication.translate( |
3813 self.taskPreviousAct.setWhatsThis(QApplication.translate( |
3715 'ViewManager', |
3814 'ViewManager', |
3716 """<b>Previous Task</b>""" |
3815 """<b>Previous Task</b>""" |
3717 """<p>Go to previous line of the current editor having a""" |
3816 """<p>Go to previous line of the current editor having a""" |
3718 """ task.</p>""" |
3817 """ task.</p>""" |
3719 )) |
3818 )) |
3720 self.taskPreviousAct.triggered[()].connect(self.__previousTask) |
3819 self.taskPreviousAct.triggered[()].connect(self.__previousTask) |
3721 self.bookmarkActions.append(self.taskPreviousAct) |
3820 self.bookmarkActions.append(self.taskPreviousAct) |
3722 |
3821 |
3723 self.changeNextAct = E5Action( |
3822 self.changeNextAct = E5Action( |
3724 QApplication.translate('ViewManager', 'Next Change'), |
3823 QApplication.translate('ViewManager', 'Next Change'), |
3731 self.changeNextAct.setWhatsThis(QApplication.translate( |
3830 self.changeNextAct.setWhatsThis(QApplication.translate( |
3732 'ViewManager', |
3831 'ViewManager', |
3733 """<b>Next Change</b>""" |
3832 """<b>Next Change</b>""" |
3734 """<p>Go to next line of the current editor having a change""" |
3833 """<p>Go to next line of the current editor having a change""" |
3735 """ marker.</p>""" |
3834 """ marker.</p>""" |
3736 )) |
3835 )) |
3737 self.changeNextAct.triggered[()].connect(self.__nextChange) |
3836 self.changeNextAct.triggered[()].connect(self.__nextChange) |
3738 self.bookmarkActions.append(self.changeNextAct) |
3837 self.bookmarkActions.append(self.changeNextAct) |
3739 |
3838 |
3740 self.changePreviousAct = E5Action( |
3839 self.changePreviousAct = E5Action( |
3741 QApplication.translate('ViewManager', 'Previous Change'), |
3840 QApplication.translate('ViewManager', 'Previous Change'), |
3742 UI.PixmapCache.getIcon("changePrev.png"), |
3841 UI.PixmapCache.getIcon("changePrev.png"), |
3743 QApplication.translate('ViewManager', |
3842 QApplication.translate( |
3744 '&Previous Change'), |
3843 'ViewManager', '&Previous Change'), |
3745 0, 0, |
3844 0, 0, |
3746 self.bookmarkActGrp, 'vm_change_previous') |
3845 self.bookmarkActGrp, 'vm_change_previous') |
3747 self.changePreviousAct.setStatusTip(QApplication.translate( |
3846 self.changePreviousAct.setStatusTip(QApplication.translate( |
3748 'ViewManager', 'Previous Change')) |
3847 'ViewManager', 'Previous Change')) |
3749 self.changePreviousAct.setWhatsThis(QApplication.translate( |
3848 self.changePreviousAct.setWhatsThis(QApplication.translate( |
3750 'ViewManager', |
3849 'ViewManager', |
3751 """<b>Previous Change</b>""" |
3850 """<b>Previous Change</b>""" |
3752 """<p>Go to previous line of the current editor having""" |
3851 """<p>Go to previous line of the current editor having""" |
3753 """ a change marker.</p>""" |
3852 """ a change marker.</p>""" |
3754 )) |
3853 )) |
3755 self.changePreviousAct.triggered[()].connect(self.__previousChange) |
3854 self.changePreviousAct.triggered[()].connect(self.__previousChange) |
3756 self.bookmarkActions.append(self.changePreviousAct) |
3855 self.bookmarkActions.append(self.changePreviousAct) |
3757 |
3856 |
3758 self.bookmarkActGrp.setEnabled(False) |
3857 self.bookmarkActGrp.setEnabled(False) |
3759 |
3858 |
3845 self.spellingActGrp = createActionGroup(self) |
3944 self.spellingActGrp = createActionGroup(self) |
3846 |
3945 |
3847 self.spellCheckAct = E5Action( |
3946 self.spellCheckAct = E5Action( |
3848 QApplication.translate('ViewManager', 'Check spelling'), |
3947 QApplication.translate('ViewManager', 'Check spelling'), |
3849 UI.PixmapCache.getIcon("spellchecking.png"), |
3948 UI.PixmapCache.getIcon("spellchecking.png"), |
3850 QApplication.translate('ViewManager', |
3949 QApplication.translate( |
3851 'Check &spelling...'), |
3950 'ViewManager', 'Check &spelling...'), |
3852 QKeySequence(QApplication.translate('ViewManager', |
3951 QKeySequence(QApplication.translate( |
3853 "Shift+F7", "Spelling|Spell Check")), |
3952 'ViewManager', "Shift+F7", "Spelling|Spell Check")), |
3854 0, |
3953 0, |
3855 self.spellingActGrp, 'vm_spelling_spellcheck') |
3954 self.spellingActGrp, 'vm_spelling_spellcheck') |
3856 self.spellCheckAct.setStatusTip(QApplication.translate( |
3955 self.spellCheckAct.setStatusTip(QApplication.translate( |
3857 'ViewManager', 'Perform spell check of current editor')) |
3956 'ViewManager', 'Perform spell check of current editor')) |
3858 self.spellCheckAct.setWhatsThis(QApplication.translate( |
3957 self.spellCheckAct.setWhatsThis(QApplication.translate( |
3859 'ViewManager', |
3958 'ViewManager', |
3860 """<b>Check spelling</b>""" |
3959 """<b>Check spelling</b>""" |
3861 """<p>Perform a spell check of the current editor.</p>""" |
3960 """<p>Perform a spell check of the current editor.</p>""" |
3862 )) |
3961 )) |
3863 self.spellCheckAct.triggered[()].connect(self.__spellCheck) |
3962 self.spellCheckAct.triggered[()].connect(self.__spellCheck) |
3864 self.spellingActions.append(self.spellCheckAct) |
3963 self.spellingActions.append(self.spellCheckAct) |
3865 |
3964 |
3866 self.autoSpellCheckAct = E5Action( |
3965 self.autoSpellCheckAct = E5Action( |
3867 QApplication.translate('ViewManager', 'Automatic spell checking'), |
3966 QApplication.translate('ViewManager', 'Automatic spell checking'), |
3868 UI.PixmapCache.getIcon("autospellchecking.png"), |
3967 UI.PixmapCache.getIcon("autospellchecking.png"), |
3869 QApplication.translate('ViewManager', |
3968 QApplication.translate( |
3870 '&Automatic spell checking'), |
3969 'ViewManager', '&Automatic spell checking'), |
3871 0, 0, |
3970 0, 0, |
3872 self.spellingActGrp, 'vm_spelling_autospellcheck', True) |
3971 self.spellingActGrp, 'vm_spelling_autospellcheck', True) |
3873 self.autoSpellCheckAct.setStatusTip(QApplication.translate( |
3972 self.autoSpellCheckAct.setStatusTip(QApplication.translate( |
3874 'ViewManager', '(De-)Activate automatic spell checking')) |
3973 'ViewManager', '(De-)Activate automatic spell checking')) |
3875 self.autoSpellCheckAct.setWhatsThis(QApplication.translate( |
3974 self.autoSpellCheckAct.setWhatsThis(QApplication.translate( |
3876 'ViewManager', |
3975 'ViewManager', |
3877 """<b>Automatic spell checking</b>""" |
3976 """<b>Automatic spell checking</b>""" |
3878 """<p>Activate or deactivate the automatic spell checking""" |
3977 """<p>Activate or deactivate the automatic spell checking""" |
3879 """ function of all editors.</p>""" |
3978 """ function of all editors.</p>""" |
3880 )) |
3979 )) |
3881 self.autoSpellCheckAct.setChecked( |
3980 self.autoSpellCheckAct.setChecked( |
3882 Preferences.getEditor("AutoSpellCheckingEnabled")) |
3981 Preferences.getEditor("AutoSpellCheckingEnabled")) |
3883 self.autoSpellCheckAct.triggered[()].connect( |
3982 self.autoSpellCheckAct.triggered[()].connect( |
3884 self.__setAutoSpellChecking) |
3983 self.__setAutoSpellChecking) |
3885 self.spellingActions.append(self.autoSpellCheckAct) |
3984 self.spellingActions.append(self.autoSpellCheckAct) |