src/eric7/UI/UserInterface.py

branch
server
changeset 10711
2ef631169541
parent 10704
27d21e5163b8
parent 10710
0e06a55c9f2d
child 10718
c9252721680b
equal deleted inserted replaced
10708:a6094987c1be 10711:2ef631169541
35 QUuid, 35 QUuid,
36 pyqtSignal, 36 pyqtSignal,
37 pyqtSlot, 37 pyqtSlot,
38 qVersion, 38 qVersion,
39 ) 39 )
40 from PyQt6.QtGui import QAction, QDesktopServices, QKeySequence, QSessionManager 40 from PyQt6.QtGui import (
41 QAction,
42 QDesktopServices,
43 QGuiApplication,
44 QKeySequence,
45 QSessionManager,
46 )
41 from PyQt6.QtNetwork import QNetworkAccessManager, QNetworkProxyFactory 47 from PyQt6.QtNetwork import QNetworkAccessManager, QNetworkProxyFactory
42 from PyQt6.QtWidgets import ( 48 from PyQt6.QtWidgets import (
43 QApplication, 49 QApplication,
44 QDialog, 50 QDialog,
45 QDockWidget, 51 QDockWidget,
2751 self.tr("""<b>Show Versions</b><p>Display version information.</p>""") 2757 self.tr("""<b>Show Versions</b><p>Display version information.</p>""")
2752 ) 2758 )
2753 self.versionAct.triggered.connect(self.__showVersions) 2759 self.versionAct.triggered.connect(self.__showVersions)
2754 self.actions.append(self.versionAct) 2760 self.actions.append(self.versionAct)
2755 2761
2762 self.copyVersionAct = EricAction(
2763 self.tr("Copy Versions"),
2764 self.tr("&Copy Versions"),
2765 0,
2766 0,
2767 self,
2768 "copy_versions",
2769 )
2770 self.copyVersionAct.setStatusTip(
2771 self.tr("Copy version information to the clipboard")
2772 )
2773 self.copyVersionAct.setWhatsThis(
2774 self.tr(
2775 "<b>Copy Versions</b><p>This generates version information and copies"
2776 " it to the clipboard.</p>"
2777 )
2778 )
2779 self.copyVersionAct.triggered.connect(self.__copyVersions)
2780 self.actions.append(self.copyVersionAct)
2781
2756 self.showErrorLogAct = EricAction( 2782 self.showErrorLogAct = EricAction(
2757 self.tr("Show Error Log"), 2783 self.tr("Show Error Log"),
2758 self.tr("Show Error &Log..."), 2784 self.tr("Show Error &Log..."),
2759 0, 2785 0,
2760 0, 2786 0,
4099 self.__menus["help"].addAction(self.pyside2DocAct) 4125 self.__menus["help"].addAction(self.pyside2DocAct)
4100 if self.pyside6DocAct is not None: 4126 if self.pyside6DocAct is not None:
4101 self.__menus["help"].addAction(self.pyside6DocAct) 4127 self.__menus["help"].addAction(self.pyside6DocAct)
4102 self.__menus["help"].addSeparator() 4128 self.__menus["help"].addSeparator()
4103 self.__menus["help"].addAction(self.versionAct) 4129 self.__menus["help"].addAction(self.versionAct)
4130 self.__menus["help"].addAction(self.copyVersionAct)
4104 self.__menus["help"].addSeparator() 4131 self.__menus["help"].addSeparator()
4105 self.__menus["help"].addAction(self.showInstallInfoAct) 4132 self.__menus["help"].addAction(self.showInstallInfoAct)
4106 self.__menus["help"].addSeparator() 4133 self.__menus["help"].addSeparator()
4107 self.__menus["help"].addAction(self.showErrorLogAct) 4134 self.__menus["help"].addAction(self.showErrorLogAct)
4108 self.__menus["help"].addAction(self.reportBugAct) 4135 self.__menus["help"].addAction(self.reportBugAct)
4628 ) 4655 )
4629 4656
4630 versionText += self.tr("""</table>""") 4657 versionText += self.tr("""</table>""")
4631 4658
4632 VersionsDialog(self, Program, versionText) 4659 VersionsDialog(self, Program, versionText)
4660
4661 def __copyVersions(self):
4662 """
4663 Private method to generated version information and copy that to the clipboard.
4664 """
4665 QGuiApplication.clipboard().setText(
4666 "\n----\n\n{0}\n\n----\n\n{1}\n\n----\n\n{2}".format(
4667 Utilities.generateVersionInfo("\n"),
4668 Utilities.generatePluginsVersionInfo("\n"),
4669 Utilities.generateDistroInfo("\n"),
4670 )
4671 )
4633 4672
4634 def __reportBug(self): 4673 def __reportBug(self):
4635 """ 4674 """
4636 Private slot to handle the Report Bug dialog. 4675 Private slot to handle the Report Bug dialog.
4637 """ 4676 """

eric ide

mercurial