src/eric7/WebBrowser/GreaseMonkey/Ui_GreaseMonkeyAddScriptDialog.py

Fri, 07 Jun 2024 10:05:06 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 07 Jun 2024 10:05:06 +0200
branch
eric7
changeset 10743
5d3a5a05114e
child 10745
2921faddeaec
permissions
-rw-r--r--

Changed code structure and install script to include the Ui_*.py files in the code repository and do not compile *.ui files at installation time anymore. This is to cope with a backward incompatible change of Qt 6.7.0.

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric7_default/src/eric7/WebBrowser/GreaseMonkey/GreaseMonkeyAddScriptDialog.ui'
#
# Created by: PyQt6 UI code generator 6.7.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again.  Do not edit this file unless you know what you are doing.


from PyQt6 import QtCore, QtGui, QtWidgets


class Ui_GreaseMonkeyAddScriptDialog(object):
    def setupUi(self, GreaseMonkeyAddScriptDialog):
        GreaseMonkeyAddScriptDialog.setObjectName("GreaseMonkeyAddScriptDialog")
        GreaseMonkeyAddScriptDialog.resize(550, 400)
        GreaseMonkeyAddScriptDialog.setSizeGripEnabled(True)
        self.verticalLayout = QtWidgets.QVBoxLayout(GreaseMonkeyAddScriptDialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.iconLabel = QtWidgets.QLabel(parent=GreaseMonkeyAddScriptDialog)
        self.iconLabel.setMinimumSize(QtCore.QSize(48, 48))
        self.iconLabel.setText("Icon")
        self.iconLabel.setObjectName("iconLabel")
        self.horizontalLayout.addWidget(self.iconLabel)
        self.label_2 = QtWidgets.QLabel(parent=GreaseMonkeyAddScriptDialog)
        self.label_2.setObjectName("label_2")
        self.horizontalLayout.addWidget(self.label_2)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
        self.horizontalLayout.addItem(spacerItem1)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.label_3 = QtWidgets.QLabel(parent=GreaseMonkeyAddScriptDialog)
        self.label_3.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
        self.label_3.setObjectName("label_3")
        self.verticalLayout.addWidget(self.label_3)
        self.scriptInfo = QtWidgets.QTextBrowser(parent=GreaseMonkeyAddScriptDialog)
        self.scriptInfo.setObjectName("scriptInfo")
        self.verticalLayout.addWidget(self.scriptInfo)
        self.label_5 = QtWidgets.QLabel(parent=GreaseMonkeyAddScriptDialog)
        self.label_5.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
        self.label_5.setObjectName("label_5")
        self.verticalLayout.addWidget(self.label_5)
        self.label_4 = QtWidgets.QLabel(parent=GreaseMonkeyAddScriptDialog)
        self.label_4.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
        self.label_4.setObjectName("label_4")
        self.verticalLayout.addWidget(self.label_4)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.showScriptSourceButton = QtWidgets.QPushButton(parent=GreaseMonkeyAddScriptDialog)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.showScriptSourceButton.sizePolicy().hasHeightForWidth())
        self.showScriptSourceButton.setSizePolicy(sizePolicy)
        self.showScriptSourceButton.setObjectName("showScriptSourceButton")
        self.horizontalLayout_2.addWidget(self.showScriptSourceButton)
        self.buttonBox = QtWidgets.QDialogButtonBox(parent=GreaseMonkeyAddScriptDialog)
        self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.No|QtWidgets.QDialogButtonBox.StandardButton.Yes)
        self.buttonBox.setObjectName("buttonBox")
        self.horizontalLayout_2.addWidget(self.buttonBox)
        self.verticalLayout.addLayout(self.horizontalLayout_2)

        self.retranslateUi(GreaseMonkeyAddScriptDialog)
        self.buttonBox.accepted.connect(GreaseMonkeyAddScriptDialog.accept) # type: ignore
        self.buttonBox.rejected.connect(GreaseMonkeyAddScriptDialog.reject) # type: ignore
        QtCore.QMetaObject.connectSlotsByName(GreaseMonkeyAddScriptDialog)

    def retranslateUi(self, GreaseMonkeyAddScriptDialog):
        _translate = QtCore.QCoreApplication.translate
        GreaseMonkeyAddScriptDialog.setWindowTitle(_translate("GreaseMonkeyAddScriptDialog", "GreaseMonkey Script Installation"))
        self.label_2.setText(_translate("GreaseMonkeyAddScriptDialog", "<h2>GreaseMonkey Script Installation</h2>"))
        self.label_3.setText(_translate("GreaseMonkeyAddScriptDialog", "You are about to install this userscript into GreaseMonkey:"))
        self.label_5.setText(_translate("GreaseMonkeyAddScriptDialog", "<b>You should only install scripts from sources you trust!</b>"))
        self.label_4.setText(_translate("GreaseMonkeyAddScriptDialog", "Are you sure you want to install it?"))
        self.showScriptSourceButton.setToolTip(_translate("GreaseMonkeyAddScriptDialog", "Press to open an editor with the script\'s source"))
        self.showScriptSourceButton.setText(_translate("GreaseMonkeyAddScriptDialog", "Show source code of script"))

eric ide

mercurial