3646 |
3646 |
3647 def __initQtDocActions(self): |
3647 def __initQtDocActions(self): |
3648 """ |
3648 """ |
3649 Private slot to initialize the action to show the Qt documentation. |
3649 Private slot to initialize the action to show the Qt documentation. |
3650 """ |
3650 """ |
3651 self.qt5DocAct = EricAction( |
|
3652 self.tr("Qt5 Documentation"), |
|
3653 self.tr("Qt5 Documentation"), |
|
3654 0, |
|
3655 0, |
|
3656 self, |
|
3657 "qt5_documentation", |
|
3658 ) |
|
3659 self.qt5DocAct.setStatusTip(self.tr("Open Qt5 Documentation")) |
|
3660 self.qt5DocAct.setWhatsThis( |
|
3661 self.tr( |
|
3662 """<b>Qt5 Documentation</b>""" |
|
3663 """<p>Display the Qt5 Documentation. Dependent upon your""" |
|
3664 """ settings, this will either show the help in Eric's internal""" |
|
3665 """ help viewer/web browser, or execute a web browser or Qt""" |
|
3666 """ Assistant. </p>""" |
|
3667 ) |
|
3668 ) |
|
3669 self.qt5DocAct.triggered.connect(lambda: self.__showQtDoc(5)) |
|
3670 self.actions.append(self.qt5DocAct) |
|
3671 |
|
3672 self.qt6DocAct = EricAction( |
3651 self.qt6DocAct = EricAction( |
3673 self.tr("Qt6 Documentation"), |
3652 self.tr("Qt6 Documentation"), |
3674 self.tr("Qt6 Documentation"), |
3653 self.tr("Qt6 Documentation"), |
3675 0, |
3654 0, |
3676 0, |
3655 0, |
3687 """ Assistant. </p>""" |
3666 """ Assistant. </p>""" |
3688 ) |
3667 ) |
3689 ) |
3668 ) |
3690 self.qt6DocAct.triggered.connect(lambda: self.__showQtDoc(6)) |
3669 self.qt6DocAct.triggered.connect(lambda: self.__showQtDoc(6)) |
3691 self.actions.append(self.qt6DocAct) |
3670 self.actions.append(self.qt6DocAct) |
3692 |
|
3693 self.pyqt5DocAct = EricAction( |
|
3694 self.tr("PyQt5 Documentation"), |
|
3695 self.tr("PyQt5 Documentation"), |
|
3696 0, |
|
3697 0, |
|
3698 self, |
|
3699 "pyqt5_documentation", |
|
3700 ) |
|
3701 self.pyqt5DocAct.setStatusTip(self.tr("Open PyQt5 Documentation")) |
|
3702 self.pyqt5DocAct.setWhatsThis( |
|
3703 self.tr( |
|
3704 """<b>PyQt5 Documentation</b>""" |
|
3705 """<p>Display the PyQt5 Documentation. Dependent upon your""" |
|
3706 """ settings, this will either show the help in Eric's""" |
|
3707 """ internal help viewer/web browser, or execute a web""" |
|
3708 """ browser or Qt Assistant. </p>""" |
|
3709 ) |
|
3710 ) |
|
3711 self.pyqt5DocAct.triggered.connect(lambda: self.__showPyQtDoc(variant=5)) |
|
3712 self.actions.append(self.pyqt5DocAct) |
|
3713 |
3671 |
3714 self.pyqt6DocAct = EricAction( |
3672 self.pyqt6DocAct = EricAction( |
3715 self.tr("PyQt6 Documentation"), |
3673 self.tr("PyQt6 Documentation"), |
3716 self.tr("PyQt6 Documentation"), |
3674 self.tr("PyQt6 Documentation"), |
3717 0, |
3675 0, |
4112 if self.helpviewerAct: |
4070 if self.helpviewerAct: |
4113 self.__menus["help"].addAction(self.helpviewerAct) |
4071 self.__menus["help"].addAction(self.helpviewerAct) |
4114 self.__menus["help"].addSeparator() |
4072 self.__menus["help"].addSeparator() |
4115 self.__menus["help"].addAction(self.ericDocAct) |
4073 self.__menus["help"].addAction(self.ericDocAct) |
4116 self.__menus["help"].addAction(self.pythonDocAct) |
4074 self.__menus["help"].addAction(self.pythonDocAct) |
4117 self.__menus["help"].addAction(self.qt5DocAct) |
|
4118 self.__menus["help"].addAction(self.qt6DocAct) |
4075 self.__menus["help"].addAction(self.qt6DocAct) |
4119 self.__menus["help"].addAction(self.pyqt5DocAct) |
|
4120 self.__menus["help"].addAction(self.pyqt6DocAct) |
4076 self.__menus["help"].addAction(self.pyqt6DocAct) |
4121 if self.pyside6DocAct is not None: |
4077 if self.pyside6DocAct is not None: |
4122 self.__menus["help"].addAction(self.pyside6DocAct) |
4078 self.__menus["help"].addAction(self.pyside6DocAct) |
4123 self.__menus["help"].addSeparator() |
4079 self.__menus["help"].addSeparator() |
4124 self.__menus["help"].addAction(self.versionAct) |
4080 self.__menus["help"].addAction(self.versionAct) |
6925 elif hvType == 3: |
6881 elif hvType == 3: |
6926 self.__webBrowser(home) |
6882 self.__webBrowser(home) |
6927 else: |
6883 else: |
6928 self.__customViewer(home) |
6884 self.__customViewer(home) |
6929 |
6885 |
6930 def __showPyQtDoc(self, variant=5): |
6886 def __showPyQtDoc(self, variant=6): |
6931 """ |
6887 """ |
6932 Private slot to show the PyQt5/6 documentation. |
6888 Private slot to show the PyQt documentation. |
6933 |
6889 |
6934 @param variant PyQt variant to show documentation for (5 or 6) |
6890 @param variant PyQt variant to show documentation for |
6935 @type int or str |
6891 @type int or str |
6936 """ |
6892 """ |
6937 pyqtDocDir = Preferences.getHelp("PyQt{0}DocDir".format(variant)) |
6893 pyqtDocDir = Preferences.getHelp("PyQt{0}DocDir".format(variant)) |
6938 if not pyqtDocDir: |
6894 if not pyqtDocDir: |
6939 pyqtDocDir = OSUtilities.getEnvironmentEntry( |
6895 pyqtDocDir = OSUtilities.getEnvironmentEntry( |
8681 return [p.x(), p.y(), s.width(), s.height(), not w.isHidden()] |
8637 return [p.x(), p.y(), s.width(), s.height(), not w.isHidden()] |
8682 |
8638 |
8683 def getOriginalPathString(self): |
8639 def getOriginalPathString(self): |
8684 """ |
8640 """ |
8685 Public method to get the original PATH environment variable |
8641 Public method to get the original PATH environment variable |
8686 (i.e. before modifications by eric and PyQt5). |
8642 (i.e. before modifications by eric). |
8687 |
8643 |
8688 @return original PATH environment variable |
8644 @return original PATH environment variable |
8689 @rtype str |
8645 @rtype str |
8690 """ |
8646 """ |
8691 return self.__originalPathString |
8647 return self.__originalPathString |