src/eric7/UI/UserInterface.py

branch
eric7
changeset 10710
0e06a55c9f2d
parent 10702
b0d4e74b8f55
child 10711
2ef631169541
child 10716
11cdcc824469
equal deleted inserted replaced
10709:eeab76c52195 10710:0e06a55c9f2d
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,
2730 self.tr("""<b>Show Versions</b><p>Display version information.</p>""") 2736 self.tr("""<b>Show Versions</b><p>Display version information.</p>""")
2731 ) 2737 )
2732 self.versionAct.triggered.connect(self.__showVersions) 2738 self.versionAct.triggered.connect(self.__showVersions)
2733 self.actions.append(self.versionAct) 2739 self.actions.append(self.versionAct)
2734 2740
2741 self.copyVersionAct = EricAction(
2742 self.tr("Copy Versions"),
2743 self.tr("&Copy Versions"),
2744 0,
2745 0,
2746 self,
2747 "copy_versions",
2748 )
2749 self.copyVersionAct.setStatusTip(
2750 self.tr("Copy version information to the clipboard")
2751 )
2752 self.copyVersionAct.setWhatsThis(
2753 self.tr(
2754 "<b>Copy Versions</b><p>This generates version information and copies"
2755 " it to the clipboard.</p>"
2756 )
2757 )
2758 self.copyVersionAct.triggered.connect(self.__copyVersions)
2759 self.actions.append(self.copyVersionAct)
2760
2735 self.showErrorLogAct = EricAction( 2761 self.showErrorLogAct = EricAction(
2736 self.tr("Show Error Log"), 2762 self.tr("Show Error Log"),
2737 self.tr("Show Error &Log..."), 2763 self.tr("Show Error &Log..."),
2738 0, 2764 0,
2739 0, 2765 0,
4066 self.__menus["help"].addAction(self.pyside2DocAct) 4092 self.__menus["help"].addAction(self.pyside2DocAct)
4067 if self.pyside6DocAct is not None: 4093 if self.pyside6DocAct is not None:
4068 self.__menus["help"].addAction(self.pyside6DocAct) 4094 self.__menus["help"].addAction(self.pyside6DocAct)
4069 self.__menus["help"].addSeparator() 4095 self.__menus["help"].addSeparator()
4070 self.__menus["help"].addAction(self.versionAct) 4096 self.__menus["help"].addAction(self.versionAct)
4097 self.__menus["help"].addAction(self.copyVersionAct)
4071 self.__menus["help"].addSeparator() 4098 self.__menus["help"].addSeparator()
4072 self.__menus["help"].addAction(self.showInstallInfoAct) 4099 self.__menus["help"].addAction(self.showInstallInfoAct)
4073 self.__menus["help"].addSeparator() 4100 self.__menus["help"].addSeparator()
4074 self.__menus["help"].addAction(self.showErrorLogAct) 4101 self.__menus["help"].addAction(self.showErrorLogAct)
4075 self.__menus["help"].addAction(self.reportBugAct) 4102 self.__menus["help"].addAction(self.reportBugAct)
4592 ) 4619 )
4593 4620
4594 versionText += self.tr("""</table>""") 4621 versionText += self.tr("""</table>""")
4595 4622
4596 VersionsDialog(self, Program, versionText) 4623 VersionsDialog(self, Program, versionText)
4624
4625 def __copyVersions(self):
4626 """
4627 Private method to generated version information and copy that to the clipboard.
4628 """
4629 QGuiApplication.clipboard().setText(
4630 "\n----\n\n{0}\n\n----\n\n{1}\n\n----\n\n{2}".format(
4631 Utilities.generateVersionInfo("\n"),
4632 Utilities.generatePluginsVersionInfo("\n"),
4633 Utilities.generateDistroInfo("\n"),
4634 )
4635 )
4597 4636
4598 def __reportBug(self): 4637 def __reportBug(self):
4599 """ 4638 """
4600 Private slot to handle the Report Bug dialog. 4639 Private slot to handle the Report Bug dialog.
4601 """ 4640 """

eric ide

mercurial