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