コード例 #1
0
class PrePickerDialog(QDialog):
    def __init__(self):
        super(PrePickerDialog, self).__init__()
        self.resize(250, 150)

        # Label
        self.label = QLabel(self)
        self.label.setObjectName(u"label")
        self.label.setLineWidth(1)
        self.label.setTextFormat(Qt.RichText)

        # Radio Buttons
        self.radioButton = QRadioButton(self)
        self.radioButton.setObjectName(u"radioButton")
        self.radioButton.toggle()
        self.radioButton_2 = QRadioButton(self)
        self.radioButton_2.setObjectName(u"radioButton_2")

        # Buttons
        buttons = QDialogButtonBox.Ok | QDialogButtonBox.Cancel
        self.buttonBox = QDialogButtonBox(buttons)
        self.buttonBox.accepted.connect(self.accept)
        self.buttonBox.rejected.connect(self.reject)

        # HBoxes
        self.horizontalLayout_2 = QHBoxLayout()
        self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
        self.horizontalLayout_2.addWidget(self.radioButton)
        self.horizontalLayout_2.addWidget(self.radioButton_2)
        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.setObjectName(u"horizontalLayout")
        self.horizontalLayout.addWidget(self.buttonBox)

        # VBox for whole content
        self.verticalLayout = QVBoxLayout(self)
        self.verticalLayout.setObjectName(u"verticalLayout")
        self.verticalLayout.addWidget(self.label)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.verticalLayout.addLayout(self.horizontalLayout)

        # Texts
        self.text_ui()

    def text_ui(self):
        self.setWindowTitle("Choose option")
        self.label.setText(
            "<h2 align=\"center\" style=\" margin-top:18px; margin-bottom:12px; "
            "margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">"
            "<span style=\" font-size:7pt; font-weight:700;\">Choose color for:</span></h2>"
        )
        self.radioButton.setText("Line")
        self.radioButton_2.setText("Brush")
コード例 #2
0
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        if not MainWindow.objectName():
            MainWindow.setObjectName(u"MainWindow")
        MainWindow.setWindowModality(Qt.ApplicationModal)
        MainWindow.resize(1492, 1852)
        sizePolicy = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
        MainWindow.setSizePolicy(sizePolicy)
        MainWindow.setMinimumSize(QSize(700, 700))
        MainWindow.setMaximumSize(QSize(16777215, 16777215))
        MainWindow.setBaseSize(QSize(600, 600))
        font = QFont()
        font.setPointSize(12)
        font.setKerning(True)
        MainWindow.setFont(font)
        MainWindow.setAutoFillBackground(False)
        MainWindow.setStyleSheet(u"")
        MainWindow.setDocumentMode(False)
        MainWindow.setTabShape(QTabWidget.Rounded)
        MainWindow.setDockOptions(QMainWindow.AllowTabbedDocks|QMainWindow.AnimatedDocks)
        MainWindow.setUnifiedTitleAndToolBarOnMac(False)
        self.action_Quit = QAction(MainWindow)
        self.action_Quit.setObjectName(u"action_Quit")
        self.main_widget = QWidget(MainWindow)
        self.main_widget.setObjectName(u"main_widget")
        self.main_widget.setEnabled(True)
        self.main_widget.setMinimumSize(QSize(650, 650))
        self.main_widget.setContextMenuPolicy(Qt.DefaultContextMenu)
        self.main_widget.setAutoFillBackground(False)
        self.main_widget.setStyleSheet(u"")
        self.main_layout = QGridLayout(self.main_widget)
        self.main_layout.setObjectName(u"main_layout")
        self.horizontalLayout_2 = QHBoxLayout()
        self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
        self.log_button = QPushButton(self.main_widget)
        self.log_button.setObjectName(u"log_button")
        sizePolicy1 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy1.setHorizontalStretch(0)
        sizePolicy1.setVerticalStretch(0)
        sizePolicy1.setHeightForWidth(self.log_button.sizePolicy().hasHeightForWidth())
        self.log_button.setSizePolicy(sizePolicy1)
        self.log_button.setMinimumSize(QSize(24, 24))
        font1 = QFont()
        font1.setPointSize(9)
        font1.setBold(True)
        font1.setKerning(True)
        self.log_button.setFont(font1)
        self.log_button.setCursor(QCursor(Qt.PointingHandCursor))
        self.log_button.setCheckable(False)
        self.log_button.setFlat(True)

        self.horizontalLayout_2.addWidget(self.log_button)


        self.main_layout.addLayout(self.horizontalLayout_2, 5, 2, 1, 1)

        self.shuttle_widget = QWidget(self.main_widget)
        self.shuttle_widget.setObjectName(u"shuttle_widget")
        self.shuttle_widget.setMinimumSize(QSize(600, 600))
        self.shuttle_widget.setMaximumSize(QSize(600, 600))
        self.shuttle_widget.setAutoFillBackground(False)
        self.shuttle_widget.setStyleSheet(u"QWidget#shuttle_widget {background: url(images/ShuttleXpress_Black.png);\n"
"        background-repeat:no-repeat;}\n"
"       ")
        self.button_1 = QCheckBox(self.shuttle_widget)
        self.button_1.setObjectName(u"button_1")
        self.button_1.setGeometry(QRect(80, 266, 24, 24))
        sizePolicy1.setHeightForWidth(self.button_1.sizePolicy().hasHeightForWidth())
        self.button_1.setSizePolicy(sizePolicy1)
        self.button_1.setMinimumSize(QSize(24, 24))
        self.button_1.setFont(font)
        self.button_1.setStyleSheet(u"background: #000000ff;\n"
"         color: white;\n"
"        ")
        self.usb_status = QPushButton(self.shuttle_widget)
        self.usb_status.setObjectName(u"usb_status")
        self.usb_status.setEnabled(False)
        self.usb_status.setGeometry(QRect(288, 10, 24, 24))
        sizePolicy1.setHeightForWidth(self.usb_status.sizePolicy().hasHeightForWidth())
        self.usb_status.setSizePolicy(sizePolicy1)
        self.usb_status.setMinimumSize(QSize(24, 24))
        self.usb_status.setFont(font1)
        self.usb_status.setCursor(QCursor(Qt.ArrowCursor))
        self.usb_status.setAutoFillBackground(False)
        self.usb_status.setText(u"")
        icon = QIcon()
        icon.addFile(u"images/usb_black_24.png", QSize(), QIcon.Disabled, QIcon.Off)
        icon.addFile(u"images/usb_white_24.png", QSize(), QIcon.Disabled, QIcon.On)
        self.usb_status.setIcon(icon)
        self.usb_status.setIconSize(QSize(24, 24))
        self.usb_status.setCheckable(True)
        self.usb_status.setChecked(False)
        self.usb_status.setFlat(True)
        self.button_5 = QCheckBox(self.shuttle_widget)
        self.button_5.setObjectName(u"button_5")
        self.button_5.setGeometry(QRect(498, 266, 24, 24))
        sizePolicy1.setHeightForWidth(self.button_5.sizePolicy().hasHeightForWidth())
        self.button_5.setSizePolicy(sizePolicy1)
        self.button_5.setMinimumSize(QSize(24, 24))
        self.button_5.setFont(font)
        self.button_5.setLayoutDirection(Qt.RightToLeft)
        self.button_5.setStyleSheet(u"background: #000000ff;\n"
"         color: white;\n"
"        ")
        self.wheel_pos4 = QRadioButton(self.shuttle_widget)
        self.wheel_pos4.setObjectName(u"wheel_pos4")
        self.wheel_pos4.setGeometry(QRect(382, 164, 24, 24))
        sizePolicy1.setHeightForWidth(self.wheel_pos4.sizePolicy().hasHeightForWidth())
        self.wheel_pos4.setSizePolicy(sizePolicy1)
        self.wheel_pos4.setMinimumSize(QSize(24, 24))
        self.wheel_pos4.setStyleSheet(u"background: #000000ff;\n"
"         color: white;\n"
"        ")
        self.wheel_cent0 = QRadioButton(self.shuttle_widget)
        self.wheel_cent0.setObjectName(u"wheel_cent0")
        self.wheel_cent0.setGeometry(QRect(289, 130, 24, 24))
        sizePolicy1.setHeightForWidth(self.wheel_cent0.sizePolicy().hasHeightForWidth())
        self.wheel_cent0.setSizePolicy(sizePolicy1)
        self.wheel_cent0.setMinimumSize(QSize(24, 24))
        self.wheel_cent0.setStyleSheet(u"background: #000000ff;\n"
"         color: white;\n"
"        ")
        self.wheel_cent0.setChecked(True)
        self.wheel_pos1 = QRadioButton(self.shuttle_widget)
        self.wheel_pos1.setObjectName(u"wheel_pos1")
        self.wheel_pos1.setGeometry(QRect(314, 133, 24, 24))
        sizePolicy1.setHeightForWidth(self.wheel_pos1.sizePolicy().hasHeightForWidth())
        self.wheel_pos1.setSizePolicy(sizePolicy1)
        self.wheel_pos1.setMinimumSize(QSize(24, 24))
        self.wheel_pos1.setStyleSheet(u"color: white;")
        self.wheel_pos2 = QRadioButton(self.shuttle_widget)
        self.wheel_pos2.setObjectName(u"wheel_pos2")
        self.wheel_pos2.setGeometry(QRect(338, 139, 24, 24))
        sizePolicy1.setHeightForWidth(self.wheel_pos2.sizePolicy().hasHeightForWidth())
        self.wheel_pos2.setSizePolicy(sizePolicy1)
        self.wheel_pos2.setMinimumSize(QSize(24, 24))
        self.wheel_pos2.setStyleSheet(u"background: #000000ff;\n"
"         color: white;\n"
"        ")
        self.dial = QDial(self.shuttle_widget)
        self.dial.setObjectName(u"dial")
        self.dial.setGeometry(QRect(197, 178, 216, 216))
        sizePolicy2 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Preferred)
        sizePolicy2.setHorizontalStretch(0)
        sizePolicy2.setVerticalStretch(0)
        sizePolicy2.setHeightForWidth(self.dial.sizePolicy().hasHeightForWidth())
        self.dial.setSizePolicy(sizePolicy2)
        self.dial.setMinimumSize(QSize(24, 24))
        self.dial.setAutoFillBackground(False)
        self.dial.setStyleSheet(u"background-color: black;")
        self.dial.setMinimum(0)
        self.dial.setMaximum(10)
        self.dial.setPageStep(1)
        self.dial.setValue(5)
        self.dial.setSliderPosition(5)
        self.dial.setInvertedAppearance(False)
        self.dial.setInvertedControls(False)
        self.dial.setWrapping(True)
        self.dial.setNotchTarget(3.700000000000000)
        self.dial.setNotchesVisible(False)
        self.wheel_neg6 = QRadioButton(self.shuttle_widget)
        self.wheel_neg6.setObjectName(u"wheel_neg6")
        self.wheel_neg6.setGeometry(QRect(162, 204, 24, 24))
        sizePolicy1.setHeightForWidth(self.wheel_neg6.sizePolicy().hasHeightForWidth())
        self.wheel_neg6.setSizePolicy(sizePolicy1)
        self.wheel_neg6.setMinimumSize(QSize(24, 24))
        self.wheel_neg6.setStyleSheet(u"color: white;")
        self.wheel_pos5 = QRadioButton(self.shuttle_widget)
        self.wheel_pos5.setObjectName(u"wheel_pos5")
        self.wheel_pos5.setGeometry(QRect(400, 182, 24, 24))
        sizePolicy1.setHeightForWidth(self.wheel_pos5.sizePolicy().hasHeightForWidth())
        self.wheel_pos5.setSizePolicy(sizePolicy1)
        self.wheel_pos5.setMinimumSize(QSize(24, 24))
        self.wheel_pos5.setStyleSheet(u"background: #000000ff;\n"
"         color: white;\n"
"        ")
        self.button_2 = QCheckBox(self.shuttle_widget)
        self.button_2.setObjectName(u"button_2")
        self.button_2.setGeometry(QRect(156, 122, 24, 24))
        sizePolicy1.setHeightForWidth(self.button_2.sizePolicy().hasHeightForWidth())
        self.button_2.setSizePolicy(sizePolicy1)
        self.button_2.setMinimumSize(QSize(24, 24))
        self.button_2.setFont(font)
        self.button_2.setStyleSheet(u"background: #000000ff;\n"
"         color: white;\n"
"        ")
        self.wheel_neg5 = QRadioButton(self.shuttle_widget)
        self.wheel_neg5.setObjectName(u"wheel_neg5")
        self.wheel_neg5.setGeometry(QRect(178, 182, 24, 24))
        sizePolicy1.setHeightForWidth(self.wheel_neg5.sizePolicy().hasHeightForWidth())
        self.wheel_neg5.setSizePolicy(sizePolicy1)
        self.wheel_neg5.setMinimumSize(QSize(24, 24))
        self.wheel_neg5.setStyleSheet(u"color: white;")
        self.wheel_pos6 = QRadioButton(self.shuttle_widget)
        self.wheel_pos6.setObjectName(u"wheel_pos6")
        self.wheel_pos6.setGeometry(QRect(416, 204, 24, 24))
        sizePolicy1.setHeightForWidth(self.wheel_pos6.sizePolicy().hasHeightForWidth())
        self.wheel_pos6.setSizePolicy(sizePolicy1)
        self.wheel_pos6.setMinimumSize(QSize(24, 24))
        self.wheel_pos6.setStyleSheet(u"background: #000000ff;\n"
"         color: white;\n"
"        ")
        self.wheel_neg1 = QRadioButton(self.shuttle_widget)
        self.wheel_neg1.setObjectName(u"wheel_neg1")
        self.wheel_neg1.setGeometry(QRect(264, 133, 24, 24))
        sizePolicy1.setHeightForWidth(self.wheel_neg1.sizePolicy().hasHeightForWidth())
        self.wheel_neg1.setSizePolicy(sizePolicy1)
        self.wheel_neg1.setMinimumSize(QSize(24, 24))
        self.wheel_neg1.setStyleSheet(u"background: #000000ff;\n"
"         color: white;\n"
"        ")
        self.button_4 = QCheckBox(self.shuttle_widget)
        self.button_4.setObjectName(u"button_4")
        self.button_4.setGeometry(QRect(430, 122, 24, 24))
        sizePolicy1.setHeightForWidth(self.button_4.sizePolicy().hasHeightForWidth())
        self.button_4.setSizePolicy(sizePolicy1)
        self.button_4.setMinimumSize(QSize(24, 24))
        self.button_4.setFont(font)
        self.button_4.setLayoutDirection(Qt.RightToLeft)
        self.button_4.setAutoFillBackground(False)
        self.button_4.setStyleSheet(u"background: #000000ff;\n"
"         color: white;\n"
"        ")
        self.wheel_pos7 = QRadioButton(self.shuttle_widget)
        self.wheel_pos7.setObjectName(u"wheel_pos7")
        self.wheel_pos7.setGeometry(QRect(427, 229, 24, 24))
        sizePolicy1.setHeightForWidth(self.wheel_pos7.sizePolicy().hasHeightForWidth())
        self.wheel_pos7.setSizePolicy(sizePolicy1)
        self.wheel_pos7.setMinimumSize(QSize(24, 24))
        self.wheel_pos7.setStyleSheet(u"background: #000000ff;\n"
"         color: white;\n"
"        ")
        self.button_3 = QCheckBox(self.shuttle_widget)
        self.button_3.setObjectName(u"button_3")
        self.button_3.setGeometry(QRect(290, 72, 24, 24))
        sizePolicy1.setHeightForWidth(self.button_3.sizePolicy().hasHeightForWidth())
        self.button_3.setSizePolicy(sizePolicy1)
        self.button_3.setMinimumSize(QSize(24, 24))
        self.button_3.setFont(font)
        self.button_3.setStyleSheet(u"background: #000000ff;\n"
"         color: white;\n"
"        ")
        self.button_3.setTristate(False)
        self.wheel_neg2 = QRadioButton(self.shuttle_widget)
        self.wheel_neg2.setObjectName(u"wheel_neg2")
        self.wheel_neg2.setGeometry(QRect(240, 139, 24, 24))
        sizePolicy1.setHeightForWidth(self.wheel_neg2.sizePolicy().hasHeightForWidth())
        self.wheel_neg2.setSizePolicy(sizePolicy1)
        self.wheel_neg2.setMinimumSize(QSize(24, 24))
        self.wheel_neg2.setStyleSheet(u"background: #000000ff;\n"
"         color: white;\n"
"        ")
        self.wheel_pos3 = QRadioButton(self.shuttle_widget)
        self.wheel_pos3.setObjectName(u"wheel_pos3")
        self.wheel_pos3.setGeometry(QRect(361, 149, 24, 24))
        sizePolicy1.setHeightForWidth(self.wheel_pos3.sizePolicy().hasHeightForWidth())
        self.wheel_pos3.setSizePolicy(sizePolicy1)
        self.wheel_pos3.setMinimumSize(QSize(24, 24))
        self.wheel_pos3.setStyleSheet(u"background: #000000ff;\n"
"         color: white;\n"
"        ")
        self.wheel_neg3 = QRadioButton(self.shuttle_widget)
        self.wheel_neg3.setObjectName(u"wheel_neg3")
        self.wheel_neg3.setGeometry(QRect(217, 149, 24, 24))
        sizePolicy1.setHeightForWidth(self.wheel_neg3.sizePolicy().hasHeightForWidth())
        self.wheel_neg3.setSizePolicy(sizePolicy1)
        self.wheel_neg3.setMinimumSize(QSize(24, 24))
        self.wheel_neg3.setStyleSheet(u"color: white;")
        self.wheel_neg4 = QRadioButton(self.shuttle_widget)
        self.wheel_neg4.setObjectName(u"wheel_neg4")
        self.wheel_neg4.setGeometry(QRect(196, 164, 24, 24))
        sizePolicy1.setHeightForWidth(self.wheel_neg4.sizePolicy().hasHeightForWidth())
        self.wheel_neg4.setSizePolicy(sizePolicy1)
        self.wheel_neg4.setMinimumSize(QSize(24, 24))
        self.wheel_neg4.setStyleSheet(u"background: #000000ff;\n"
"         color: white;\n"
"        ")
        self.wheel_neg7 = QRadioButton(self.shuttle_widget)
        self.wheel_neg7.setObjectName(u"wheel_neg7")
        self.wheel_neg7.setGeometry(QRect(151, 229, 24, 24))
        sizePolicy1.setHeightForWidth(self.wheel_neg7.sizePolicy().hasHeightForWidth())
        self.wheel_neg7.setSizePolicy(sizePolicy1)
        self.wheel_neg7.setMinimumSize(QSize(24, 24))
        self.wheel_neg7.setStyleSheet(u"color: white;")
        self.dial.raise_()
        self.button_1.raise_()
        self.usb_status.raise_()
        self.button_5.raise_()
        self.wheel_pos4.raise_()
        self.wheel_cent0.raise_()
        self.wheel_pos1.raise_()
        self.wheel_pos2.raise_()
        self.wheel_neg6.raise_()
        self.wheel_pos5.raise_()
        self.button_2.raise_()
        self.wheel_neg5.raise_()
        self.wheel_pos6.raise_()
        self.wheel_neg1.raise_()
        self.button_4.raise_()
        self.wheel_pos7.raise_()
        self.button_3.raise_()
        self.wheel_neg2.raise_()
        self.wheel_pos3.raise_()
        self.wheel_neg3.raise_()
        self.wheel_neg4.raise_()
        self.wheel_neg7.raise_()

        self.main_layout.addWidget(self.shuttle_widget, 3, 2, 1, 1)

        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.setObjectName(u"horizontalLayout")
        self.about_button = QPushButton(self.main_widget)
        self.about_button.setObjectName(u"about_button")
        sizePolicy1.setHeightForWidth(self.about_button.sizePolicy().hasHeightForWidth())
        self.about_button.setSizePolicy(sizePolicy1)
        self.about_button.setMinimumSize(QSize(24, 24))
        self.about_button.setFont(font1)
        self.about_button.setCursor(QCursor(Qt.WhatsThisCursor))
        self.about_button.setCheckable(False)
        self.about_button.setFlat(True)

        self.horizontalLayout.addWidget(self.about_button)


        self.main_layout.addLayout(self.horizontalLayout, 1, 2, 1, 1)

        self.horizontalLayout_3 = QHBoxLayout()
        self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
        self.plug_button = QPushButton(self.main_widget)
        self.plug_button.setObjectName(u"plug_button")
        sizePolicy1.setHeightForWidth(self.plug_button.sizePolicy().hasHeightForWidth())
        self.plug_button.setSizePolicy(sizePolicy1)
        self.plug_button.setMinimumSize(QSize(24, 24))
        self.plug_button.setFont(font1)
        self.plug_button.setCursor(QCursor(Qt.PointingHandCursor))
        self.plug_button.setCheckable(False)
        self.plug_button.setFlat(True)

        self.horizontalLayout_3.addWidget(self.plug_button)


        self.main_layout.addLayout(self.horizontalLayout_3, 3, 1, 1, 1)

        self.verticalLayout = QVBoxLayout()
        self.verticalLayout.setObjectName(u"verticalLayout")
        self.conf_button = QPushButton(self.main_widget)
        self.conf_button.setObjectName(u"conf_button")
        sizePolicy1.setHeightForWidth(self.conf_button.sizePolicy().hasHeightForWidth())
        self.conf_button.setSizePolicy(sizePolicy1)
        self.conf_button.setMinimumSize(QSize(24, 24))
        self.conf_button.setFont(font1)
        self.conf_button.setCursor(QCursor(Qt.PointingHandCursor))
        self.conf_button.setCheckable(False)
        self.conf_button.setFlat(True)

        self.verticalLayout.addWidget(self.conf_button)


        self.main_layout.addLayout(self.verticalLayout, 3, 4, 1, 1)

        MainWindow.setCentralWidget(self.main_widget)
        self.statusbar = QStatusBar(MainWindow)
        self.statusbar.setObjectName(u"statusbar")
        self.statusbar.setMinimumSize(QSize(600, 0))
        MainWindow.setStatusBar(self.statusbar)
        self.about_widget = QDockWidget(MainWindow)
        self.about_widget.setObjectName(u"about_widget")
        self.about_widget.setEnabled(True)
        sizePolicy3 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
        sizePolicy3.setHorizontalStretch(0)
        sizePolicy3.setVerticalStretch(0)
        sizePolicy3.setHeightForWidth(self.about_widget.sizePolicy().hasHeightForWidth())
        self.about_widget.setSizePolicy(sizePolicy3)
        self.about_widget.setMinimumSize(QSize(600, 600))
        self.about_widget.setVisible(True)
        self.about_widget.setFloating(False)
        self.about_widget.setFeatures(QDockWidget.DockWidgetClosable|QDockWidget.DockWidgetMovable)
        self.about_widget.setAllowedAreas(Qt.TopDockWidgetArea)
        self.about_layout = QWidget()
        self.about_layout.setObjectName(u"about_layout")
        sizePolicy3.setHeightForWidth(self.about_layout.sizePolicy().hasHeightForWidth())
        self.about_layout.setSizePolicy(sizePolicy3)
        self.about_layout.setAutoFillBackground(False)
        self.gridLayout_3 = QGridLayout(self.about_layout)
        self.gridLayout_3.setObjectName(u"gridLayout_3")
        self.about_text = QTextEdit(self.about_layout)
        self.about_text.setObjectName(u"about_text")
        self.about_text.setFocusPolicy(Qt.WheelFocus)
        self.about_text.setAcceptDrops(False)
        self.about_text.setStyleSheet(u"color: white;")
        self.about_text.setFrameShape(QFrame.StyledPanel)
        self.about_text.setFrameShadow(QFrame.Sunken)
        self.about_text.setUndoRedoEnabled(False)
        self.about_text.setReadOnly(True)
        self.about_text.setAcceptRichText(True)

        self.gridLayout_3.addWidget(self.about_text, 0, 0, 1, 1)

        self.about_widget.setWidget(self.about_layout)
        MainWindow.addDockWidget(Qt.TopDockWidgetArea, self.about_widget)
        self.log_widget = QDockWidget(MainWindow)
        self.log_widget.setObjectName(u"log_widget")
        self.log_widget.setEnabled(True)
        self.log_widget.setMinimumSize(QSize(550, 158))
        self.log_widget.setFont(font)
        self.log_widget.setVisible(True)
        self.log_widget.setFloating(False)
        self.log_widget.setFeatures(QDockWidget.DockWidgetClosable|QDockWidget.DockWidgetFloatable|QDockWidget.DockWidgetMovable)
        self.log_widget.setAllowedAreas(Qt.BottomDockWidgetArea)
        self.log_layout = QWidget()
        self.log_layout.setObjectName(u"log_layout")
        sizePolicy4 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
        sizePolicy4.setHorizontalStretch(0)
        sizePolicy4.setVerticalStretch(0)
        sizePolicy4.setHeightForWidth(self.log_layout.sizePolicy().hasHeightForWidth())
        self.log_layout.setSizePolicy(sizePolicy4)
        self.gridLayout_2 = QGridLayout(self.log_layout)
        self.gridLayout_2.setObjectName(u"gridLayout_2")
        self.log_content_layout = QVBoxLayout()
        self.log_content_layout.setObjectName(u"log_content_layout")
        self.log_content_layout.setSizeConstraint(QLayout.SetDefaultConstraint)
        self.log_text = QPlainTextEdit(self.log_layout)
        self.log_text.setObjectName(u"log_text")
        sizePolicy4.setHeightForWidth(self.log_text.sizePolicy().hasHeightForWidth())
        self.log_text.setSizePolicy(sizePolicy4)
        self.log_text.setMinimumSize(QSize(0, 0))
        self.log_text.setAcceptDrops(False)
        self.log_text.setFrameShape(QFrame.StyledPanel)
        self.log_text.setFrameShadow(QFrame.Sunken)
        self.log_text.setUndoRedoEnabled(False)
        self.log_text.setReadOnly(True)

        self.log_content_layout.addWidget(self.log_text)

        self.buttons_layout = QHBoxLayout()
        self.buttons_layout.setObjectName(u"buttons_layout")
        self.buttons_layout.setSizeConstraint(QLayout.SetDefaultConstraint)
        self.log_clear_button = QToolButton(self.log_layout)
        self.log_clear_button.setObjectName(u"log_clear_button")
        icon1 = QIcon()
        icon1.addFile(u"images/delete-sweep_24.png", QSize(), QIcon.Normal, QIcon.Off)
        self.log_clear_button.setIcon(icon1)
        self.log_clear_button.setIconSize(QSize(24, 24))

        self.buttons_layout.addWidget(self.log_clear_button)


        self.log_content_layout.addLayout(self.buttons_layout)


        self.gridLayout_2.addLayout(self.log_content_layout, 0, 0, 1, 1)

        self.log_widget.setWidget(self.log_layout)
        MainWindow.addDockWidget(Qt.BottomDockWidgetArea, self.log_widget)
        self.config_widget = QDockWidget(MainWindow)
        self.config_widget.setObjectName(u"config_widget")
        self.config_widget.setEnabled(True)
        self.config_widget.setMinimumSize(QSize(250, 600))
        self.config_widget.setFloating(False)
        self.config_widget.setFeatures(QDockWidget.DockWidgetClosable|QDockWidget.DockWidgetFloatable|QDockWidget.DockWidgetMovable)
        self.config_widget.setAllowedAreas(Qt.RightDockWidgetArea)
        self.config_layout = QWidget()
        self.config_layout.setObjectName(u"config_layout")
        self.gridLayout = QGridLayout(self.config_layout)
        self.gridLayout.setObjectName(u"gridLayout")
        self.config_content_layout = QFormLayout()
        self.config_content_layout.setObjectName(u"config_content_layout")

        self.gridLayout.addLayout(self.config_content_layout, 0, 0, 1, 1)

        self.config_widget.setWidget(self.config_layout)
        MainWindow.addDockWidget(Qt.RightDockWidgetArea, self.config_widget)
        self.plugins_widget = QDockWidget(MainWindow)
        self.plugins_widget.setObjectName(u"plugins_widget")
        self.plugins_widget.setMinimumSize(QSize(250, 600))
        self.plugins_widget.setAllowedAreas(Qt.LeftDockWidgetArea)
        self.dockWidgetContents = QWidget()
        self.dockWidgetContents.setObjectName(u"dockWidgetContents")
        self.plugins_widget.setWidget(self.dockWidgetContents)
        MainWindow.addDockWidget(Qt.LeftDockWidgetArea, self.plugins_widget)
        self.about_widget.raise_()
        self.log_widget.raise_()

        self.retranslateUi(MainWindow)

        self.usb_status.setDefault(False)


        QMetaObject.connectSlotsByName(MainWindow)
    # setupUi

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"Contour ShuttleXpress", None))
        self.action_Quit.setText(QCoreApplication.translate("MainWindow", u"&Quit", None))
#if QT_CONFIG(tooltip)
        self.log_button.setToolTip("")
#endif // QT_CONFIG(tooltip)
#if QT_CONFIG(statustip)
        self.log_button.setStatusTip(QCoreApplication.translate("MainWindow", u"Log", None))
#endif // QT_CONFIG(statustip)
        self.log_button.setText(QCoreApplication.translate("MainWindow", u"//", None))
#if QT_CONFIG(statustip)
        self.button_1.setStatusTip(QCoreApplication.translate("MainWindow", u"Button 1", None))
#endif // QT_CONFIG(statustip)
        self.button_1.setText("")
#if QT_CONFIG(tooltip)
        self.usb_status.setToolTip("")
#endif // QT_CONFIG(tooltip)
#if QT_CONFIG(statustip)
        self.usb_status.setStatusTip(QCoreApplication.translate("MainWindow", u"USB connection status", None))
#endif // QT_CONFIG(statustip)
#if QT_CONFIG(whatsthis)
        self.usb_status.setWhatsThis(QCoreApplication.translate("MainWindow", u"USB Status", None))
#endif // QT_CONFIG(whatsthis)
#if QT_CONFIG(statustip)
        self.button_5.setStatusTip(QCoreApplication.translate("MainWindow", u"Button 5", None))
#endif // QT_CONFIG(statustip)
        self.button_5.setText("")
#if QT_CONFIG(statustip)
        self.wheel_pos4.setStatusTip(QCoreApplication.translate("MainWindow", u"Wheel position: right 4", None))
#endif // QT_CONFIG(statustip)
        self.wheel_pos4.setText("")
#if QT_CONFIG(statustip)
        self.wheel_cent0.setStatusTip(QCoreApplication.translate("MainWindow", u"Wheel position: center", None))
#endif // QT_CONFIG(statustip)
        self.wheel_cent0.setText("")
#if QT_CONFIG(statustip)
        self.wheel_pos1.setStatusTip(QCoreApplication.translate("MainWindow", u"Wheel position: right 1", None))
#endif // QT_CONFIG(statustip)
        self.wheel_pos1.setText("")
#if QT_CONFIG(statustip)
        self.wheel_pos2.setStatusTip(QCoreApplication.translate("MainWindow", u"Wheel position: right 2", None))
#endif // QT_CONFIG(statustip)
        self.wheel_pos2.setText("")
#if QT_CONFIG(statustip)
        self.dial.setStatusTip(QCoreApplication.translate("MainWindow", u"Dial", None))
#endif // QT_CONFIG(statustip)
#if QT_CONFIG(statustip)
        self.wheel_neg6.setStatusTip(QCoreApplication.translate("MainWindow", u"Wheel position: left 6", None))
#endif // QT_CONFIG(statustip)
        self.wheel_neg6.setText("")
#if QT_CONFIG(statustip)
        self.wheel_pos5.setStatusTip(QCoreApplication.translate("MainWindow", u"Wheel position: right 5", None))
#endif // QT_CONFIG(statustip)
        self.wheel_pos5.setText("")
#if QT_CONFIG(statustip)
        self.button_2.setStatusTip(QCoreApplication.translate("MainWindow", u"Button 2", None))
#endif // QT_CONFIG(statustip)
        self.button_2.setText("")
#if QT_CONFIG(statustip)
        self.wheel_neg5.setStatusTip(QCoreApplication.translate("MainWindow", u"Wheel position: left 5", None))
#endif // QT_CONFIG(statustip)
        self.wheel_neg5.setText("")
#if QT_CONFIG(statustip)
        self.wheel_pos6.setStatusTip(QCoreApplication.translate("MainWindow", u"Wheel position: right 6", None))
#endif // QT_CONFIG(statustip)
        self.wheel_pos6.setText("")
#if QT_CONFIG(statustip)
        self.wheel_neg1.setStatusTip(QCoreApplication.translate("MainWindow", u"Wheel position: left 1", None))
#endif // QT_CONFIG(statustip)
        self.wheel_neg1.setText("")
#if QT_CONFIG(statustip)
        self.button_4.setStatusTip(QCoreApplication.translate("MainWindow", u"Button 4", None))
#endif // QT_CONFIG(statustip)
        self.button_4.setText("")
#if QT_CONFIG(statustip)
        self.wheel_pos7.setStatusTip(QCoreApplication.translate("MainWindow", u"Wheel position: right 7", None))
#endif // QT_CONFIG(statustip)
        self.wheel_pos7.setText("")
#if QT_CONFIG(statustip)
        self.button_3.setStatusTip(QCoreApplication.translate("MainWindow", u"Button 3", None))
#endif // QT_CONFIG(statustip)
        self.button_3.setText("")
#if QT_CONFIG(statustip)
        self.wheel_neg2.setStatusTip(QCoreApplication.translate("MainWindow", u"Wheel position: left 2", None))
#endif // QT_CONFIG(statustip)
        self.wheel_neg2.setText("")
#if QT_CONFIG(statustip)
        self.wheel_pos3.setStatusTip(QCoreApplication.translate("MainWindow", u"Wheel position: right 3", None))
#endif // QT_CONFIG(statustip)
        self.wheel_pos3.setText("")
#if QT_CONFIG(statustip)
        self.wheel_neg3.setStatusTip(QCoreApplication.translate("MainWindow", u"Wheel position: left 3", None))
#endif // QT_CONFIG(statustip)
        self.wheel_neg3.setText("")
#if QT_CONFIG(statustip)
        self.wheel_neg4.setStatusTip(QCoreApplication.translate("MainWindow", u"Wheel position: left 4", None))
#endif // QT_CONFIG(statustip)
        self.wheel_neg4.setText(QCoreApplication.translate("MainWindow", u"-", None))
#if QT_CONFIG(statustip)
        self.wheel_neg7.setStatusTip(QCoreApplication.translate("MainWindow", u"Wheel position: left 7", None))
#endif // QT_CONFIG(statustip)
        self.wheel_neg7.setText("")
#if QT_CONFIG(tooltip)
        self.about_button.setToolTip("")
#endif // QT_CONFIG(tooltip)
#if QT_CONFIG(statustip)
        self.about_button.setStatusTip(QCoreApplication.translate("MainWindow", u"About", None))
#endif // QT_CONFIG(statustip)
        self.about_button.setText(QCoreApplication.translate("MainWindow", u"?", None))
#if QT_CONFIG(tooltip)
        self.plug_button.setToolTip("")
#endif // QT_CONFIG(tooltip)
#if QT_CONFIG(statustip)
        self.plug_button.setStatusTip(QCoreApplication.translate("MainWindow", u"Configuration", None))
#endif // QT_CONFIG(statustip)
        self.plug_button.setText(QCoreApplication.translate("MainWindow", u"#", None))
#if QT_CONFIG(tooltip)
        self.conf_button.setToolTip("")
#endif // QT_CONFIG(tooltip)
#if QT_CONFIG(statustip)
        self.conf_button.setStatusTip(QCoreApplication.translate("MainWindow", u"Configuration", None))
#endif // QT_CONFIG(statustip)
        self.conf_button.setText(QCoreApplication.translate("MainWindow", u"=", None))
        self.about_widget.setWindowTitle(QCoreApplication.translate("MainWindow", u"About", None))
        self.about_text.setDocumentTitle("")
        self.log_widget.setWindowTitle(QCoreApplication.translate("MainWindow", u"Log", None))
        self.log_clear_button.setText(QCoreApplication.translate("MainWindow", u"Clear", None))
        self.config_widget.setWindowTitle(QCoreApplication.translate("MainWindow", u"Configuration", None))
        self.plugins_widget.setWindowTitle(QCoreApplication.translate("MainWindow", u"Plugins", None))
コード例 #3
0
class Ui_SlideshowClip_UI(object):
    def setupUi(self, SlideshowClip_UI):
        if not SlideshowClip_UI.objectName():
            SlideshowClip_UI.setObjectName(u"SlideshowClip_UI")
        SlideshowClip_UI.resize(354, 631)
        self.gridLayout_4 = QGridLayout(SlideshowClip_UI)
        self.gridLayout_4.setObjectName(u"gridLayout_4")
        self.gridLayout_4.setVerticalSpacing(6)
        self.icon_list = QListWidget(SlideshowClip_UI)
        self.icon_list.setObjectName(u"icon_list")

        self.gridLayout_4.addWidget(self.icon_list, 12, 0, 1, 4)

        self.animation = KComboBox(SlideshowClip_UI)
        self.animation.setObjectName(u"animation")
        sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.animation.sizePolicy().hasHeightForWidth())
        self.animation.setSizePolicy(sizePolicy)

        self.gridLayout_4.addWidget(self.animation, 10, 2, 1, 2)

        self.slide_crop = QCheckBox(SlideshowClip_UI)
        self.slide_crop.setObjectName(u"slide_crop")

        self.gridLayout_4.addWidget(self.slide_crop, 4, 0, 1, 2)

        self.label_3 = QLabel(SlideshowClip_UI)
        self.label_3.setObjectName(u"label_3")

        self.gridLayout_4.addWidget(self.label_3, 0, 0, 1, 1)

        self.label_2 = QLabel(SlideshowClip_UI)
        self.label_2.setObjectName(u"label_2")

        self.gridLayout_4.addWidget(self.label_2, 2, 0, 1, 2)

        self.horizontalLayout_2 = QHBoxLayout()
        self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
        self.clip_duration = QLineEdit(SlideshowClip_UI)
        self.clip_duration.setObjectName(u"clip_duration")

        self.horizontalLayout_2.addWidget(self.clip_duration)

        self.clip_duration_frames = QSpinBox(SlideshowClip_UI)
        self.clip_duration_frames.setObjectName(u"clip_duration_frames")
        sizePolicy1 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
        sizePolicy1.setHorizontalStretch(0)
        sizePolicy1.setVerticalStretch(0)
        sizePolicy1.setHeightForWidth(
            self.clip_duration_frames.sizePolicy().hasHeightForWidth())
        self.clip_duration_frames.setSizePolicy(sizePolicy1)
        self.clip_duration_frames.setMinimum(1)
        self.clip_duration_frames.setMaximum(256000)

        self.horizontalLayout_2.addWidget(self.clip_duration_frames)

        self.gridLayout_4.addLayout(self.horizontalLayout_2, 2, 2, 1, 1)

        self.luma_softness = QSlider(SlideshowClip_UI)
        self.luma_softness.setObjectName(u"luma_softness")
        self.luma_softness.setEnabled(False)
        self.luma_softness.setMaximum(100)
        self.luma_softness.setOrientation(Qt.Horizontal)

        self.gridLayout_4.addWidget(self.luma_softness, 8, 2, 1, 2)

        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.setObjectName(u"horizontalLayout")
        self.luma_duration = QLineEdit(SlideshowClip_UI)
        self.luma_duration.setObjectName(u"luma_duration")

        self.horizontalLayout.addWidget(self.luma_duration)

        self.luma_duration_frames = QSpinBox(SlideshowClip_UI)
        self.luma_duration_frames.setObjectName(u"luma_duration_frames")
        self.luma_duration_frames.setEnabled(False)
        sizePolicy1.setHeightForWidth(
            self.luma_duration_frames.sizePolicy().hasHeightForWidth())
        self.luma_duration_frames.setSizePolicy(sizePolicy1)
        self.luma_duration_frames.setMinimum(1)
        self.luma_duration_frames.setMaximum(256000)

        self.horizontalLayout.addWidget(self.luma_duration_frames)

        self.gridLayout_4.addLayout(self.horizontalLayout, 5, 2, 1, 2)

        self.luma_fade = QCheckBox(SlideshowClip_UI)
        self.luma_fade.setObjectName(u"luma_fade")
        self.luma_fade.setEnabled(False)

        self.gridLayout_4.addWidget(self.luma_fade, 7, 0, 1, 1)

        self.slide_fade = QCheckBox(SlideshowClip_UI)
        self.slide_fade.setObjectName(u"slide_fade")

        self.gridLayout_4.addWidget(self.slide_fade, 5, 0, 1, 1)

        self.luma_file = KComboBox(SlideshowClip_UI)
        self.luma_file.setObjectName(u"luma_file")
        self.luma_file.setEnabled(False)

        self.gridLayout_4.addWidget(self.luma_file, 7, 2, 1, 2)

        self.label_softness = QLabel(SlideshowClip_UI)
        self.label_softness.setObjectName(u"label_softness")
        self.label_softness.setEnabled(False)

        self.gridLayout_4.addWidget(self.label_softness, 8, 0, 1, 1)

        self.groupBox = QGroupBox(SlideshowClip_UI)
        self.groupBox.setObjectName(u"groupBox")
        self.gridLayout = QGridLayout(self.groupBox)
        self.gridLayout.setObjectName(u"gridLayout")
        self.gridLayout.setVerticalSpacing(0)
        self.method_mime = QRadioButton(self.groupBox)
        self.method_mime.setObjectName(u"method_mime")
        self.method_mime.setChecked(True)

        self.gridLayout.addWidget(self.method_mime, 0, 0, 1, 1)

        self.method_pattern = QRadioButton(self.groupBox)
        self.method_pattern.setObjectName(u"method_pattern")

        self.gridLayout.addWidget(self.method_pattern, 0, 1, 1, 1)

        self.stackedWidget = QStackedWidget(self.groupBox)
        self.stackedWidget.setObjectName(u"stackedWidget")
        self.page = QWidget()
        self.page.setObjectName(u"page")
        self.gridLayout_2 = QGridLayout(self.page)
        self.gridLayout_2.setObjectName(u"gridLayout_2")
        self.label = QLabel(self.page)
        self.label.setObjectName(u"label")

        self.gridLayout_2.addWidget(self.label, 0, 0, 1, 1)

        self.verticalSpacer_2 = QSpacerItem(20, 40, QSizePolicy.Minimum,
                                            QSizePolicy.Expanding)

        self.gridLayout_2.addItem(self.verticalSpacer_2, 2, 2, 1, 1)

        self.label_4 = QLabel(self.page)
        self.label_4.setObjectName(u"label_4")

        self.gridLayout_2.addWidget(self.label_4, 1, 0, 1, 1)

        self.folder_url = KUrlRequester(self.page)
        self.folder_url.setObjectName(u"folder_url")

        self.gridLayout_2.addWidget(self.folder_url, 0, 1, 1, 2)

        self.image_type = KComboBox(self.page)
        self.image_type.setObjectName(u"image_type")

        self.gridLayout_2.addWidget(self.image_type, 1, 1, 1, 2)

        self.stackedWidget.addWidget(self.page)
        self.page_2 = QWidget()
        self.page_2.setObjectName(u"page_2")
        self.gridLayout_3 = QGridLayout(self.page_2)
        self.gridLayout_3.setObjectName(u"gridLayout_3")
        self.label_5 = QLabel(self.page_2)
        self.label_5.setObjectName(u"label_5")

        self.gridLayout_3.addWidget(self.label_5, 0, 0, 1, 1)

        self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum,
                                          QSizePolicy.Expanding)

        self.gridLayout_3.addItem(self.verticalSpacer, 1, 2, 1, 1)

        self.pattern_url = KUrlRequester(self.page_2)
        self.pattern_url.setObjectName(u"pattern_url")

        self.gridLayout_3.addWidget(self.pattern_url, 0, 1, 1, 2)

        self.stackedWidget.addWidget(self.page_2)

        self.gridLayout.addWidget(self.stackedWidget, 1, 0, 1, 2)

        self.gridLayout_4.addWidget(self.groupBox, 1, 0, 1, 4)

        self.buttonBox = QDialogButtonBox(SlideshowClip_UI)
        self.buttonBox.setObjectName(u"buttonBox")
        self.buttonBox.setOrientation(Qt.Horizontal)
        self.buttonBox.setStandardButtons(QDialogButtonBox.Cancel
                                          | QDialogButtonBox.Ok)

        self.gridLayout_4.addWidget(self.buttonBox, 14, 2, 1, 2)

        self.slide_loop = QCheckBox(SlideshowClip_UI)
        self.slide_loop.setObjectName(u"slide_loop")

        self.gridLayout_4.addWidget(self.slide_loop, 3, 0, 1, 1)

        self.clip_name = QLineEdit(SlideshowClip_UI)
        self.clip_name.setObjectName(u"clip_name")

        self.gridLayout_4.addWidget(self.clip_name, 0, 1, 1, 3)

        self.horizontalLayout_3 = QHBoxLayout()
        self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
        self.show_thumbs = QCheckBox(SlideshowClip_UI)
        self.show_thumbs.setObjectName(u"show_thumbs")

        self.horizontalLayout_3.addWidget(self.show_thumbs)

        self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                            QSizePolicy.Minimum)

        self.horizontalLayout_3.addItem(self.horizontalSpacer)

        self.label_info = QLabel(SlideshowClip_UI)
        self.label_info.setObjectName(u"label_info")

        self.horizontalLayout_3.addWidget(self.label_info)

        self.gridLayout_4.addLayout(self.horizontalLayout_3, 13, 0, 1, 4)

        self.clip_duration_format = KComboBox(SlideshowClip_UI)
        self.clip_duration_format.setObjectName(u"clip_duration_format")

        self.gridLayout_4.addWidget(self.clip_duration_format, 2, 3, 1, 1)

        self.label_6 = QLabel(SlideshowClip_UI)
        self.label_6.setObjectName(u"label_6")

        self.gridLayout_4.addWidget(self.label_6, 10, 0, 1, 1)

        self.low_pass = QCheckBox(SlideshowClip_UI)
        self.low_pass.setObjectName(u"low_pass")
        self.low_pass.setEnabled(False)

        self.gridLayout_4.addWidget(self.low_pass, 11, 0, 1, 4)

        self.retranslateUi(SlideshowClip_UI)
        self.buttonBox.accepted.connect(SlideshowClip_UI.accept)
        self.buttonBox.rejected.connect(SlideshowClip_UI.reject)

        self.stackedWidget.setCurrentIndex(0)

        QMetaObject.connectSlotsByName(SlideshowClip_UI)

    # setupUi

    def retranslateUi(self, SlideshowClip_UI):
        SlideshowClip_UI.setWindowTitle(
            QCoreApplication.translate("SlideshowClip_UI", u"Slideshow Clip",
                                       None))
        self.slide_crop.setText(
            QCoreApplication.translate("SlideshowClip_UI", u"Center crop",
                                       None))
        self.label_3.setText(
            QCoreApplication.translate("SlideshowClip_UI", u"Name:", None))
        self.label_2.setText(
            QCoreApplication.translate("SlideshowClip_UI", u"Frame duration:",
                                       None))
        self.luma_fade.setText(
            QCoreApplication.translate("SlideshowClip_UI", u"Wipe:", None))
        self.slide_fade.setText(
            QCoreApplication.translate("SlideshowClip_UI", u"Dissolve:", None))
        self.label_softness.setText(
            QCoreApplication.translate("SlideshowClip_UI", u"Softness:", None))
        self.groupBox.setTitle(
            QCoreApplication.translate("SlideshowClip_UI",
                                       u"Image Selection Method", None))
        self.method_mime.setText(
            QCoreApplication.translate("SlideshowClip_UI", u"&MIME type",
                                       None))
        self.method_pattern.setText(
            QCoreApplication.translate("SlideshowClip_UI",
                                       u"Fi&lename pattern", None))
        self.label.setText(
            QCoreApplication.translate("SlideshowClip_UI", u"Folder:", None))
        self.label_4.setText(
            QCoreApplication.translate("SlideshowClip_UI", u"Image type:",
                                       None))
        self.label_5.setText(
            QCoreApplication.translate("SlideshowClip_UI", u"First frame",
                                       None))
        self.slide_loop.setText(
            QCoreApplication.translate("SlideshowClip_UI", u"Loop", None))
        self.show_thumbs.setText(
            QCoreApplication.translate("SlideshowClip_UI", u"Show thumbnails",
                                       None))
        self.label_info.setText(
            QCoreApplication.translate("SlideshowClip_UI", u"No image found",
                                       None))
        self.label_6.setText(
            QCoreApplication.translate("SlideshowClip_UI", u"Animation:",
                                       None))
        self.low_pass.setText(
            QCoreApplication.translate("SlideshowClip_UI", u"Low pass", None))
コード例 #4
0
ファイル: config.ui.py プロジェクト: qiangzai00001/qtbase
class Ui_Config(object):
    def setupUi(self, Config):
        if not Config.objectName():
            Config.setObjectName(u"Config")
        Config.resize(600, 650)
        Config.setSizeGripEnabled(True)
        self.vboxLayout = QVBoxLayout(Config)
        self.vboxLayout.setSpacing(6)
        self.vboxLayout.setContentsMargins(11, 11, 11, 11)
        self.vboxLayout.setObjectName(u"vboxLayout")
        self.vboxLayout.setContentsMargins(8, 8, 8, 8)
        self.hboxLayout = QHBoxLayout()
        self.hboxLayout.setSpacing(6)
        self.hboxLayout.setObjectName(u"hboxLayout")
        self.hboxLayout.setContentsMargins(0, 0, 0, 0)
        self.ButtonGroup1 = QGroupBox(Config)
        self.ButtonGroup1.setObjectName(u"ButtonGroup1")
        sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.ButtonGroup1.sizePolicy().hasHeightForWidth())
        self.ButtonGroup1.setSizePolicy(sizePolicy)
        self.vboxLayout1 = QVBoxLayout(self.ButtonGroup1)
        self.vboxLayout1.setSpacing(6)
        self.vboxLayout1.setContentsMargins(11, 11, 11, 11)
        self.vboxLayout1.setObjectName(u"vboxLayout1")
        self.vboxLayout1.setContentsMargins(11, 11, 11, 11)
        self.size_176_220 = QRadioButton(self.ButtonGroup1)
        self.size_176_220.setObjectName(u"size_176_220")

        self.vboxLayout1.addWidget(self.size_176_220)

        self.size_240_320 = QRadioButton(self.ButtonGroup1)
        self.size_240_320.setObjectName(u"size_240_320")

        self.vboxLayout1.addWidget(self.size_240_320)

        self.size_320_240 = QRadioButton(self.ButtonGroup1)
        self.size_320_240.setObjectName(u"size_320_240")

        self.vboxLayout1.addWidget(self.size_320_240)

        self.size_640_480 = QRadioButton(self.ButtonGroup1)
        self.size_640_480.setObjectName(u"size_640_480")

        self.vboxLayout1.addWidget(self.size_640_480)

        self.size_800_600 = QRadioButton(self.ButtonGroup1)
        self.size_800_600.setObjectName(u"size_800_600")

        self.vboxLayout1.addWidget(self.size_800_600)

        self.size_1024_768 = QRadioButton(self.ButtonGroup1)
        self.size_1024_768.setObjectName(u"size_1024_768")

        self.vboxLayout1.addWidget(self.size_1024_768)

        self.hboxLayout1 = QHBoxLayout()
        self.hboxLayout1.setSpacing(6)
        self.hboxLayout1.setObjectName(u"hboxLayout1")
        self.hboxLayout1.setContentsMargins(0, 0, 0, 0)
        self.size_custom = QRadioButton(self.ButtonGroup1)
        self.size_custom.setObjectName(u"size_custom")
        sizePolicy1 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy1.setHorizontalStretch(0)
        sizePolicy1.setVerticalStretch(0)
        sizePolicy1.setHeightForWidth(
            self.size_custom.sizePolicy().hasHeightForWidth())
        self.size_custom.setSizePolicy(sizePolicy1)

        self.hboxLayout1.addWidget(self.size_custom)

        self.size_width = QSpinBox(self.ButtonGroup1)
        self.size_width.setObjectName(u"size_width")
        self.size_width.setMinimum(1)
        self.size_width.setMaximum(1280)
        self.size_width.setSingleStep(16)
        self.size_width.setValue(400)

        self.hboxLayout1.addWidget(self.size_width)

        self.size_height = QSpinBox(self.ButtonGroup1)
        self.size_height.setObjectName(u"size_height")
        self.size_height.setMinimum(1)
        self.size_height.setMaximum(1024)
        self.size_height.setSingleStep(16)
        self.size_height.setValue(300)

        self.hboxLayout1.addWidget(self.size_height)

        self.vboxLayout1.addLayout(self.hboxLayout1)

        self.hboxLayout.addWidget(self.ButtonGroup1)

        self.ButtonGroup2 = QGroupBox(Config)
        self.ButtonGroup2.setObjectName(u"ButtonGroup2")
        self.vboxLayout2 = QVBoxLayout(self.ButtonGroup2)
        self.vboxLayout2.setSpacing(6)
        self.vboxLayout2.setContentsMargins(11, 11, 11, 11)
        self.vboxLayout2.setObjectName(u"vboxLayout2")
        self.vboxLayout2.setContentsMargins(11, 11, 11, 11)
        self.depth_1 = QRadioButton(self.ButtonGroup2)
        self.depth_1.setObjectName(u"depth_1")

        self.vboxLayout2.addWidget(self.depth_1)

        self.depth_4gray = QRadioButton(self.ButtonGroup2)
        self.depth_4gray.setObjectName(u"depth_4gray")

        self.vboxLayout2.addWidget(self.depth_4gray)

        self.depth_8 = QRadioButton(self.ButtonGroup2)
        self.depth_8.setObjectName(u"depth_8")

        self.vboxLayout2.addWidget(self.depth_8)

        self.depth_12 = QRadioButton(self.ButtonGroup2)
        self.depth_12.setObjectName(u"depth_12")

        self.vboxLayout2.addWidget(self.depth_12)

        self.depth_15 = QRadioButton(self.ButtonGroup2)
        self.depth_15.setObjectName(u"depth_15")

        self.vboxLayout2.addWidget(self.depth_15)

        self.depth_16 = QRadioButton(self.ButtonGroup2)
        self.depth_16.setObjectName(u"depth_16")

        self.vboxLayout2.addWidget(self.depth_16)

        self.depth_18 = QRadioButton(self.ButtonGroup2)
        self.depth_18.setObjectName(u"depth_18")

        self.vboxLayout2.addWidget(self.depth_18)

        self.depth_24 = QRadioButton(self.ButtonGroup2)
        self.depth_24.setObjectName(u"depth_24")

        self.vboxLayout2.addWidget(self.depth_24)

        self.depth_32 = QRadioButton(self.ButtonGroup2)
        self.depth_32.setObjectName(u"depth_32")

        self.vboxLayout2.addWidget(self.depth_32)

        self.depth_32_argb = QRadioButton(self.ButtonGroup2)
        self.depth_32_argb.setObjectName(u"depth_32_argb")

        self.vboxLayout2.addWidget(self.depth_32_argb)

        self.hboxLayout.addWidget(self.ButtonGroup2)

        self.vboxLayout.addLayout(self.hboxLayout)

        self.hboxLayout2 = QHBoxLayout()
        self.hboxLayout2.setSpacing(6)
        self.hboxLayout2.setObjectName(u"hboxLayout2")
        self.hboxLayout2.setContentsMargins(0, 0, 0, 0)
        self.TextLabel1_3 = QLabel(Config)
        self.TextLabel1_3.setObjectName(u"TextLabel1_3")

        self.hboxLayout2.addWidget(self.TextLabel1_3)

        self.skin = QComboBox(Config)
        self.skin.addItem("")
        self.skin.setObjectName(u"skin")
        sizePolicy2 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
        sizePolicy2.setHorizontalStretch(0)
        sizePolicy2.setVerticalStretch(0)
        sizePolicy2.setHeightForWidth(
            self.skin.sizePolicy().hasHeightForWidth())
        self.skin.setSizePolicy(sizePolicy2)

        self.hboxLayout2.addWidget(self.skin)

        self.vboxLayout.addLayout(self.hboxLayout2)

        self.touchScreen = QCheckBox(Config)
        self.touchScreen.setObjectName(u"touchScreen")

        self.vboxLayout.addWidget(self.touchScreen)

        self.lcdScreen = QCheckBox(Config)
        self.lcdScreen.setObjectName(u"lcdScreen")

        self.vboxLayout.addWidget(self.lcdScreen)

        self.spacerItem = QSpacerItem(20, 10, QSizePolicy.Minimum,
                                      QSizePolicy.Expanding)

        self.vboxLayout.addItem(self.spacerItem)

        self.TextLabel1 = QLabel(Config)
        self.TextLabel1.setObjectName(u"TextLabel1")
        sizePolicy.setHeightForWidth(
            self.TextLabel1.sizePolicy().hasHeightForWidth())
        self.TextLabel1.setSizePolicy(sizePolicy)
        self.TextLabel1.setWordWrap(True)

        self.vboxLayout.addWidget(self.TextLabel1)

        self.GroupBox1 = QGroupBox(Config)
        self.GroupBox1.setObjectName(u"GroupBox1")
        self.gridLayout = QGridLayout(self.GroupBox1)
        self.gridLayout.setSpacing(6)
        self.gridLayout.setContentsMargins(11, 11, 11, 11)
        self.gridLayout.setObjectName(u"gridLayout")
        self.gridLayout.setHorizontalSpacing(6)
        self.gridLayout.setVerticalSpacing(6)
        self.gridLayout.setContentsMargins(11, 11, 11, 11)
        self.TextLabel3 = QLabel(self.GroupBox1)
        self.TextLabel3.setObjectName(u"TextLabel3")

        self.gridLayout.addWidget(self.TextLabel3, 6, 0, 1, 1)

        self.bslider = QSlider(self.GroupBox1)
        self.bslider.setObjectName(u"bslider")
        palette = QPalette()
        brush = QBrush(QColor(128, 128, 128, 255))
        brush.setStyle(Qt.SolidPattern)
        palette.setBrush(QPalette.Active, QPalette.WindowText, brush)
        brush1 = QBrush(QColor(0, 0, 255, 255))
        brush1.setStyle(Qt.SolidPattern)
        palette.setBrush(QPalette.Active, QPalette.Button, brush1)
        brush2 = QBrush(QColor(127, 127, 255, 255))
        brush2.setStyle(Qt.SolidPattern)
        palette.setBrush(QPalette.Active, QPalette.Light, brush2)
        brush3 = QBrush(QColor(38, 38, 255, 255))
        brush3.setStyle(Qt.SolidPattern)
        palette.setBrush(QPalette.Active, QPalette.Midlight, brush3)
        brush4 = QBrush(QColor(0, 0, 127, 255))
        brush4.setStyle(Qt.SolidPattern)
        palette.setBrush(QPalette.Active, QPalette.Dark, brush4)
        brush5 = QBrush(QColor(0, 0, 170, 255))
        brush5.setStyle(Qt.SolidPattern)
        palette.setBrush(QPalette.Active, QPalette.Mid, brush5)
        brush6 = QBrush(QColor(0, 0, 0, 255))
        brush6.setStyle(Qt.SolidPattern)
        palette.setBrush(QPalette.Active, QPalette.Text, brush6)
        brush7 = QBrush(QColor(255, 255, 255, 255))
        brush7.setStyle(Qt.SolidPattern)
        palette.setBrush(QPalette.Active, QPalette.BrightText, brush7)
        palette.setBrush(QPalette.Active, QPalette.ButtonText, brush)
        palette.setBrush(QPalette.Active, QPalette.Base, brush7)
        brush8 = QBrush(QColor(220, 220, 220, 255))
        brush8.setStyle(Qt.SolidPattern)
        palette.setBrush(QPalette.Active, QPalette.Window, brush8)
        palette.setBrush(QPalette.Active, QPalette.Shadow, brush6)
        brush9 = QBrush(QColor(10, 95, 137, 255))
        brush9.setStyle(Qt.SolidPattern)
        palette.setBrush(QPalette.Active, QPalette.Highlight, brush9)
        palette.setBrush(QPalette.Active, QPalette.HighlightedText, brush7)
        palette.setBrush(QPalette.Active, QPalette.Link, brush6)
        palette.setBrush(QPalette.Active, QPalette.LinkVisited, brush6)
        brush10 = QBrush(QColor(232, 232, 232, 255))
        brush10.setStyle(Qt.SolidPattern)
        palette.setBrush(QPalette.Active, QPalette.AlternateBase, brush10)
        palette.setBrush(QPalette.Inactive, QPalette.WindowText, brush)
        palette.setBrush(QPalette.Inactive, QPalette.Button, brush1)
        palette.setBrush(QPalette.Inactive, QPalette.Light, brush2)
        palette.setBrush(QPalette.Inactive, QPalette.Midlight, brush3)
        palette.setBrush(QPalette.Inactive, QPalette.Dark, brush4)
        palette.setBrush(QPalette.Inactive, QPalette.Mid, brush5)
        palette.setBrush(QPalette.Inactive, QPalette.Text, brush6)
        palette.setBrush(QPalette.Inactive, QPalette.BrightText, brush7)
        palette.setBrush(QPalette.Inactive, QPalette.ButtonText, brush)
        palette.setBrush(QPalette.Inactive, QPalette.Base, brush7)
        palette.setBrush(QPalette.Inactive, QPalette.Window, brush8)
        palette.setBrush(QPalette.Inactive, QPalette.Shadow, brush6)
        palette.setBrush(QPalette.Inactive, QPalette.Highlight, brush9)
        palette.setBrush(QPalette.Inactive, QPalette.HighlightedText, brush7)
        palette.setBrush(QPalette.Inactive, QPalette.Link, brush6)
        palette.setBrush(QPalette.Inactive, QPalette.LinkVisited, brush6)
        palette.setBrush(QPalette.Inactive, QPalette.AlternateBase, brush10)
        palette.setBrush(QPalette.Disabled, QPalette.WindowText, brush)
        palette.setBrush(QPalette.Disabled, QPalette.Button, brush1)
        palette.setBrush(QPalette.Disabled, QPalette.Light, brush2)
        palette.setBrush(QPalette.Disabled, QPalette.Midlight, brush3)
        palette.setBrush(QPalette.Disabled, QPalette.Dark, brush4)
        palette.setBrush(QPalette.Disabled, QPalette.Mid, brush5)
        palette.setBrush(QPalette.Disabled, QPalette.Text, brush6)
        palette.setBrush(QPalette.Disabled, QPalette.BrightText, brush7)
        palette.setBrush(QPalette.Disabled, QPalette.ButtonText, brush)
        palette.setBrush(QPalette.Disabled, QPalette.Base, brush7)
        palette.setBrush(QPalette.Disabled, QPalette.Window, brush8)
        palette.setBrush(QPalette.Disabled, QPalette.Shadow, brush6)
        palette.setBrush(QPalette.Disabled, QPalette.Highlight, brush9)
        palette.setBrush(QPalette.Disabled, QPalette.HighlightedText, brush7)
        palette.setBrush(QPalette.Disabled, QPalette.Link, brush6)
        palette.setBrush(QPalette.Disabled, QPalette.LinkVisited, brush6)
        palette.setBrush(QPalette.Disabled, QPalette.AlternateBase, brush10)
        self.bslider.setPalette(palette)
        self.bslider.setMaximum(400)
        self.bslider.setValue(100)
        self.bslider.setOrientation(Qt.Horizontal)

        self.gridLayout.addWidget(self.bslider, 6, 1, 1, 1)

        self.blabel = QLabel(self.GroupBox1)
        self.blabel.setObjectName(u"blabel")

        self.gridLayout.addWidget(self.blabel, 6, 2, 1, 1)

        self.TextLabel2 = QLabel(self.GroupBox1)
        self.TextLabel2.setObjectName(u"TextLabel2")

        self.gridLayout.addWidget(self.TextLabel2, 4, 0, 1, 1)

        self.gslider = QSlider(self.GroupBox1)
        self.gslider.setObjectName(u"gslider")
        palette1 = QPalette()
        palette1.setBrush(QPalette.Active, QPalette.WindowText, brush)
        brush11 = QBrush(QColor(0, 255, 0, 255))
        brush11.setStyle(Qt.SolidPattern)
        palette1.setBrush(QPalette.Active, QPalette.Button, brush11)
        brush12 = QBrush(QColor(127, 255, 127, 255))
        brush12.setStyle(Qt.SolidPattern)
        palette1.setBrush(QPalette.Active, QPalette.Light, brush12)
        brush13 = QBrush(QColor(38, 255, 38, 255))
        brush13.setStyle(Qt.SolidPattern)
        palette1.setBrush(QPalette.Active, QPalette.Midlight, brush13)
        brush14 = QBrush(QColor(0, 127, 0, 255))
        brush14.setStyle(Qt.SolidPattern)
        palette1.setBrush(QPalette.Active, QPalette.Dark, brush14)
        brush15 = QBrush(QColor(0, 170, 0, 255))
        brush15.setStyle(Qt.SolidPattern)
        palette1.setBrush(QPalette.Active, QPalette.Mid, brush15)
        palette1.setBrush(QPalette.Active, QPalette.Text, brush6)
        palette1.setBrush(QPalette.Active, QPalette.BrightText, brush7)
        palette1.setBrush(QPalette.Active, QPalette.ButtonText, brush)
        palette1.setBrush(QPalette.Active, QPalette.Base, brush7)
        palette1.setBrush(QPalette.Active, QPalette.Window, brush8)
        palette1.setBrush(QPalette.Active, QPalette.Shadow, brush6)
        palette1.setBrush(QPalette.Active, QPalette.Highlight, brush9)
        palette1.setBrush(QPalette.Active, QPalette.HighlightedText, brush7)
        palette1.setBrush(QPalette.Active, QPalette.Link, brush6)
        palette1.setBrush(QPalette.Active, QPalette.LinkVisited, brush6)
        palette1.setBrush(QPalette.Active, QPalette.AlternateBase, brush10)
        palette1.setBrush(QPalette.Inactive, QPalette.WindowText, brush)
        palette1.setBrush(QPalette.Inactive, QPalette.Button, brush11)
        palette1.setBrush(QPalette.Inactive, QPalette.Light, brush12)
        palette1.setBrush(QPalette.Inactive, QPalette.Midlight, brush13)
        palette1.setBrush(QPalette.Inactive, QPalette.Dark, brush14)
        palette1.setBrush(QPalette.Inactive, QPalette.Mid, brush15)
        palette1.setBrush(QPalette.Inactive, QPalette.Text, brush6)
        palette1.setBrush(QPalette.Inactive, QPalette.BrightText, brush7)
        palette1.setBrush(QPalette.Inactive, QPalette.ButtonText, brush)
        palette1.setBrush(QPalette.Inactive, QPalette.Base, brush7)
        palette1.setBrush(QPalette.Inactive, QPalette.Window, brush8)
        palette1.setBrush(QPalette.Inactive, QPalette.Shadow, brush6)
        palette1.setBrush(QPalette.Inactive, QPalette.Highlight, brush9)
        palette1.setBrush(QPalette.Inactive, QPalette.HighlightedText, brush7)
        palette1.setBrush(QPalette.Inactive, QPalette.Link, brush6)
        palette1.setBrush(QPalette.Inactive, QPalette.LinkVisited, brush6)
        palette1.setBrush(QPalette.Inactive, QPalette.AlternateBase, brush10)
        palette1.setBrush(QPalette.Disabled, QPalette.WindowText, brush)
        palette1.setBrush(QPalette.Disabled, QPalette.Button, brush11)
        palette1.setBrush(QPalette.Disabled, QPalette.Light, brush12)
        palette1.setBrush(QPalette.Disabled, QPalette.Midlight, brush13)
        palette1.setBrush(QPalette.Disabled, QPalette.Dark, brush14)
        palette1.setBrush(QPalette.Disabled, QPalette.Mid, brush15)
        palette1.setBrush(QPalette.Disabled, QPalette.Text, brush6)
        palette1.setBrush(QPalette.Disabled, QPalette.BrightText, brush7)
        palette1.setBrush(QPalette.Disabled, QPalette.ButtonText, brush)
        palette1.setBrush(QPalette.Disabled, QPalette.Base, brush7)
        palette1.setBrush(QPalette.Disabled, QPalette.Window, brush8)
        palette1.setBrush(QPalette.Disabled, QPalette.Shadow, brush6)
        palette1.setBrush(QPalette.Disabled, QPalette.Highlight, brush9)
        palette1.setBrush(QPalette.Disabled, QPalette.HighlightedText, brush7)
        palette1.setBrush(QPalette.Disabled, QPalette.Link, brush6)
        palette1.setBrush(QPalette.Disabled, QPalette.LinkVisited, brush6)
        palette1.setBrush(QPalette.Disabled, QPalette.AlternateBase, brush10)
        self.gslider.setPalette(palette1)
        self.gslider.setMaximum(400)
        self.gslider.setValue(100)
        self.gslider.setOrientation(Qt.Horizontal)

        self.gridLayout.addWidget(self.gslider, 4, 1, 1, 1)

        self.glabel = QLabel(self.GroupBox1)
        self.glabel.setObjectName(u"glabel")

        self.gridLayout.addWidget(self.glabel, 4, 2, 1, 1)

        self.TextLabel7 = QLabel(self.GroupBox1)
        self.TextLabel7.setObjectName(u"TextLabel7")

        self.gridLayout.addWidget(self.TextLabel7, 0, 0, 1, 1)

        self.TextLabel8 = QLabel(self.GroupBox1)
        self.TextLabel8.setObjectName(u"TextLabel8")

        self.gridLayout.addWidget(self.TextLabel8, 0, 2, 1, 1)

        self.gammaslider = QSlider(self.GroupBox1)
        self.gammaslider.setObjectName(u"gammaslider")
        palette2 = QPalette()
        palette2.setBrush(QPalette.Active, QPalette.WindowText, brush)
        palette2.setBrush(QPalette.Active, QPalette.Button, brush7)
        palette2.setBrush(QPalette.Active, QPalette.Light, brush7)
        palette2.setBrush(QPalette.Active, QPalette.Midlight, brush7)
        brush16 = QBrush(QColor(127, 127, 127, 255))
        brush16.setStyle(Qt.SolidPattern)
        palette2.setBrush(QPalette.Active, QPalette.Dark, brush16)
        brush17 = QBrush(QColor(170, 170, 170, 255))
        brush17.setStyle(Qt.SolidPattern)
        palette2.setBrush(QPalette.Active, QPalette.Mid, brush17)
        palette2.setBrush(QPalette.Active, QPalette.Text, brush6)
        palette2.setBrush(QPalette.Active, QPalette.BrightText, brush7)
        palette2.setBrush(QPalette.Active, QPalette.ButtonText, brush)
        palette2.setBrush(QPalette.Active, QPalette.Base, brush7)
        palette2.setBrush(QPalette.Active, QPalette.Window, brush8)
        palette2.setBrush(QPalette.Active, QPalette.Shadow, brush6)
        palette2.setBrush(QPalette.Active, QPalette.Highlight, brush9)
        palette2.setBrush(QPalette.Active, QPalette.HighlightedText, brush7)
        palette2.setBrush(QPalette.Active, QPalette.Link, brush6)
        palette2.setBrush(QPalette.Active, QPalette.LinkVisited, brush6)
        palette2.setBrush(QPalette.Active, QPalette.AlternateBase, brush10)
        palette2.setBrush(QPalette.Inactive, QPalette.WindowText, brush)
        palette2.setBrush(QPalette.Inactive, QPalette.Button, brush7)
        palette2.setBrush(QPalette.Inactive, QPalette.Light, brush7)
        palette2.setBrush(QPalette.Inactive, QPalette.Midlight, brush7)
        palette2.setBrush(QPalette.Inactive, QPalette.Dark, brush16)
        palette2.setBrush(QPalette.Inactive, QPalette.Mid, brush17)
        palette2.setBrush(QPalette.Inactive, QPalette.Text, brush6)
        palette2.setBrush(QPalette.Inactive, QPalette.BrightText, brush7)
        palette2.setBrush(QPalette.Inactive, QPalette.ButtonText, brush)
        palette2.setBrush(QPalette.Inactive, QPalette.Base, brush7)
        palette2.setBrush(QPalette.Inactive, QPalette.Window, brush8)
        palette2.setBrush(QPalette.Inactive, QPalette.Shadow, brush6)
        palette2.setBrush(QPalette.Inactive, QPalette.Highlight, brush9)
        palette2.setBrush(QPalette.Inactive, QPalette.HighlightedText, brush7)
        palette2.setBrush(QPalette.Inactive, QPalette.Link, brush6)
        palette2.setBrush(QPalette.Inactive, QPalette.LinkVisited, brush6)
        palette2.setBrush(QPalette.Inactive, QPalette.AlternateBase, brush10)
        palette2.setBrush(QPalette.Disabled, QPalette.WindowText, brush)
        palette2.setBrush(QPalette.Disabled, QPalette.Button, brush7)
        palette2.setBrush(QPalette.Disabled, QPalette.Light, brush7)
        palette2.setBrush(QPalette.Disabled, QPalette.Midlight, brush7)
        palette2.setBrush(QPalette.Disabled, QPalette.Dark, brush16)
        palette2.setBrush(QPalette.Disabled, QPalette.Mid, brush17)
        palette2.setBrush(QPalette.Disabled, QPalette.Text, brush6)
        palette2.setBrush(QPalette.Disabled, QPalette.BrightText, brush7)
        palette2.setBrush(QPalette.Disabled, QPalette.ButtonText, brush)
        palette2.setBrush(QPalette.Disabled, QPalette.Base, brush7)
        palette2.setBrush(QPalette.Disabled, QPalette.Window, brush8)
        palette2.setBrush(QPalette.Disabled, QPalette.Shadow, brush6)
        palette2.setBrush(QPalette.Disabled, QPalette.Highlight, brush9)
        palette2.setBrush(QPalette.Disabled, QPalette.HighlightedText, brush7)
        palette2.setBrush(QPalette.Disabled, QPalette.Link, brush6)
        palette2.setBrush(QPalette.Disabled, QPalette.LinkVisited, brush6)
        palette2.setBrush(QPalette.Disabled, QPalette.AlternateBase, brush10)
        self.gammaslider.setPalette(palette2)
        self.gammaslider.setMaximum(400)
        self.gammaslider.setValue(100)
        self.gammaslider.setOrientation(Qt.Horizontal)

        self.gridLayout.addWidget(self.gammaslider, 0, 1, 1, 1)

        self.TextLabel1_2 = QLabel(self.GroupBox1)
        self.TextLabel1_2.setObjectName(u"TextLabel1_2")

        self.gridLayout.addWidget(self.TextLabel1_2, 2, 0, 1, 1)

        self.rlabel = QLabel(self.GroupBox1)
        self.rlabel.setObjectName(u"rlabel")

        self.gridLayout.addWidget(self.rlabel, 2, 2, 1, 1)

        self.rslider = QSlider(self.GroupBox1)
        self.rslider.setObjectName(u"rslider")
        palette3 = QPalette()
        palette3.setBrush(QPalette.Active, QPalette.WindowText, brush)
        brush18 = QBrush(QColor(255, 0, 0, 255))
        brush18.setStyle(Qt.SolidPattern)
        palette3.setBrush(QPalette.Active, QPalette.Button, brush18)
        brush19 = QBrush(QColor(255, 127, 127, 255))
        brush19.setStyle(Qt.SolidPattern)
        palette3.setBrush(QPalette.Active, QPalette.Light, brush19)
        brush20 = QBrush(QColor(255, 38, 38, 255))
        brush20.setStyle(Qt.SolidPattern)
        palette3.setBrush(QPalette.Active, QPalette.Midlight, brush20)
        brush21 = QBrush(QColor(127, 0, 0, 255))
        brush21.setStyle(Qt.SolidPattern)
        palette3.setBrush(QPalette.Active, QPalette.Dark, brush21)
        brush22 = QBrush(QColor(170, 0, 0, 255))
        brush22.setStyle(Qt.SolidPattern)
        palette3.setBrush(QPalette.Active, QPalette.Mid, brush22)
        palette3.setBrush(QPalette.Active, QPalette.Text, brush6)
        palette3.setBrush(QPalette.Active, QPalette.BrightText, brush7)
        palette3.setBrush(QPalette.Active, QPalette.ButtonText, brush)
        palette3.setBrush(QPalette.Active, QPalette.Base, brush7)
        palette3.setBrush(QPalette.Active, QPalette.Window, brush8)
        palette3.setBrush(QPalette.Active, QPalette.Shadow, brush6)
        palette3.setBrush(QPalette.Active, QPalette.Highlight, brush9)
        palette3.setBrush(QPalette.Active, QPalette.HighlightedText, brush7)
        palette3.setBrush(QPalette.Active, QPalette.Link, brush6)
        palette3.setBrush(QPalette.Active, QPalette.LinkVisited, brush6)
        palette3.setBrush(QPalette.Active, QPalette.AlternateBase, brush10)
        palette3.setBrush(QPalette.Inactive, QPalette.WindowText, brush)
        palette3.setBrush(QPalette.Inactive, QPalette.Button, brush18)
        palette3.setBrush(QPalette.Inactive, QPalette.Light, brush19)
        palette3.setBrush(QPalette.Inactive, QPalette.Midlight, brush20)
        palette3.setBrush(QPalette.Inactive, QPalette.Dark, brush21)
        palette3.setBrush(QPalette.Inactive, QPalette.Mid, brush22)
        palette3.setBrush(QPalette.Inactive, QPalette.Text, brush6)
        palette3.setBrush(QPalette.Inactive, QPalette.BrightText, brush7)
        palette3.setBrush(QPalette.Inactive, QPalette.ButtonText, brush)
        palette3.setBrush(QPalette.Inactive, QPalette.Base, brush7)
        palette3.setBrush(QPalette.Inactive, QPalette.Window, brush8)
        palette3.setBrush(QPalette.Inactive, QPalette.Shadow, brush6)
        palette3.setBrush(QPalette.Inactive, QPalette.Highlight, brush9)
        palette3.setBrush(QPalette.Inactive, QPalette.HighlightedText, brush7)
        palette3.setBrush(QPalette.Inactive, QPalette.Link, brush6)
        palette3.setBrush(QPalette.Inactive, QPalette.LinkVisited, brush6)
        palette3.setBrush(QPalette.Inactive, QPalette.AlternateBase, brush10)
        palette3.setBrush(QPalette.Disabled, QPalette.WindowText, brush)
        palette3.setBrush(QPalette.Disabled, QPalette.Button, brush18)
        palette3.setBrush(QPalette.Disabled, QPalette.Light, brush19)
        palette3.setBrush(QPalette.Disabled, QPalette.Midlight, brush20)
        palette3.setBrush(QPalette.Disabled, QPalette.Dark, brush21)
        palette3.setBrush(QPalette.Disabled, QPalette.Mid, brush22)
        palette3.setBrush(QPalette.Disabled, QPalette.Text, brush6)
        palette3.setBrush(QPalette.Disabled, QPalette.BrightText, brush7)
        palette3.setBrush(QPalette.Disabled, QPalette.ButtonText, brush)
        palette3.setBrush(QPalette.Disabled, QPalette.Base, brush7)
        palette3.setBrush(QPalette.Disabled, QPalette.Window, brush8)
        palette3.setBrush(QPalette.Disabled, QPalette.Shadow, brush6)
        palette3.setBrush(QPalette.Disabled, QPalette.Highlight, brush9)
        palette3.setBrush(QPalette.Disabled, QPalette.HighlightedText, brush7)
        palette3.setBrush(QPalette.Disabled, QPalette.Link, brush6)
        palette3.setBrush(QPalette.Disabled, QPalette.LinkVisited, brush6)
        palette3.setBrush(QPalette.Disabled, QPalette.AlternateBase, brush10)
        self.rslider.setPalette(palette3)
        self.rslider.setMaximum(400)
        self.rslider.setValue(100)
        self.rslider.setOrientation(Qt.Horizontal)

        self.gridLayout.addWidget(self.rslider, 2, 1, 1, 1)

        self.PushButton3 = QPushButton(self.GroupBox1)
        self.PushButton3.setObjectName(u"PushButton3")

        self.gridLayout.addWidget(self.PushButton3, 8, 0, 1, 3)

        self.MyCustomWidget1 = GammaView(self.GroupBox1)
        self.MyCustomWidget1.setObjectName(u"MyCustomWidget1")

        self.gridLayout.addWidget(self.MyCustomWidget1, 0, 3, 9, 1)

        self.vboxLayout.addWidget(self.GroupBox1)

        self.hboxLayout3 = QHBoxLayout()
        self.hboxLayout3.setSpacing(6)
        self.hboxLayout3.setObjectName(u"hboxLayout3")
        self.hboxLayout3.setContentsMargins(0, 0, 0, 0)
        self.spacerItem1 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                       QSizePolicy.Minimum)

        self.hboxLayout3.addItem(self.spacerItem1)

        self.buttonOk = QPushButton(Config)
        self.buttonOk.setObjectName(u"buttonOk")
        self.buttonOk.setAutoDefault(True)

        self.hboxLayout3.addWidget(self.buttonOk)

        self.buttonCancel = QPushButton(Config)
        self.buttonCancel.setObjectName(u"buttonCancel")
        self.buttonCancel.setAutoDefault(True)

        self.hboxLayout3.addWidget(self.buttonCancel)

        self.vboxLayout.addLayout(self.hboxLayout3)

        self.retranslateUi(Config)
        self.size_width.valueChanged.connect(self.size_custom.click)
        self.size_height.valueChanged.connect(self.size_custom.click)

        self.buttonOk.setDefault(True)

        QMetaObject.connectSlotsByName(Config)

    # setupUi

    def retranslateUi(self, Config):
        Config.setWindowTitle(
            QCoreApplication.translate("Config", u"Configure", None))
        self.ButtonGroup1.setTitle(
            QCoreApplication.translate("Config", u"Size", None))
        self.size_176_220.setText(
            QCoreApplication.translate("Config", u"176x220 \"SmartPhone\"",
                                       None))
        self.size_240_320.setText(
            QCoreApplication.translate("Config", u"240x320 \"PDA\"", None))
        self.size_320_240.setText(
            QCoreApplication.translate("Config", u"320x240 \"TV\" / \"QVGA\"",
                                       None))
        self.size_640_480.setText(
            QCoreApplication.translate("Config", u"640x480 \"VGA\"", None))
        self.size_800_600.setText(
            QCoreApplication.translate("Config", u"800x600", None))
        self.size_1024_768.setText(
            QCoreApplication.translate("Config", u"1024x768", None))
        self.size_custom.setText(
            QCoreApplication.translate("Config", u"Custom", None))
        self.ButtonGroup2.setTitle(
            QCoreApplication.translate("Config", u"Depth", None))
        self.depth_1.setText(
            QCoreApplication.translate("Config", u"1 bit monochrome", None))
        self.depth_4gray.setText(
            QCoreApplication.translate("Config", u"4 bit grayscale", None))
        self.depth_8.setText(
            QCoreApplication.translate("Config", u"8 bit", None))
        self.depth_12.setText(
            QCoreApplication.translate("Config", u"12 (16) bit", None))
        self.depth_15.setText(
            QCoreApplication.translate("Config", u"15 bit", None))
        self.depth_16.setText(
            QCoreApplication.translate("Config", u"16 bit", None))
        self.depth_18.setText(
            QCoreApplication.translate("Config", u"18 bit", None))
        self.depth_24.setText(
            QCoreApplication.translate("Config", u"24 bit", None))
        self.depth_32.setText(
            QCoreApplication.translate("Config", u"32 bit", None))
        self.depth_32_argb.setText(
            QCoreApplication.translate("Config", u"32 bit ARGB", None))
        self.TextLabel1_3.setText(
            QCoreApplication.translate("Config", u"Skin", None))
        self.skin.setItemText(
            0, QCoreApplication.translate("Config", u"None", None))

        self.touchScreen.setText(
            QCoreApplication.translate(
                "Config", u"Emulate touch screen (no mouse move)", None))
        self.lcdScreen.setText(
            QCoreApplication.translate(
                "Config",
                u"Emulate LCD screen (Only with fixed zoom of 3.0 times magnification)",
                None))
        self.TextLabel1.setText(
            QCoreApplication.translate(
                "Config",
                u"<p>Note that any applications using the virtual framebuffer will be terminated if you change the Size or Depth <i>above</i>. You may freely modify the Gamma <i>below</i>.",
                None))
        self.GroupBox1.setTitle(
            QCoreApplication.translate("Config", u"Gamma", None))
        self.TextLabel3.setText(
            QCoreApplication.translate("Config", u"Blue", None))
        self.blabel.setText(QCoreApplication.translate("Config", u"1.0", None))
        self.TextLabel2.setText(
            QCoreApplication.translate("Config", u"Green", None))
        self.glabel.setText(QCoreApplication.translate("Config", u"1.0", None))
        self.TextLabel7.setText(
            QCoreApplication.translate("Config", u"All", None))
        self.TextLabel8.setText(
            QCoreApplication.translate("Config", u"1.0", None))
        self.TextLabel1_2.setText(
            QCoreApplication.translate("Config", u"Red", None))
        self.rlabel.setText(QCoreApplication.translate("Config", u"1.0", None))
        self.PushButton3.setText(
            QCoreApplication.translate("Config", u"Set all to 1.0", None))
        self.buttonOk.setText(
            QCoreApplication.translate("Config", u"&OK", None))
        self.buttonCancel.setText(
            QCoreApplication.translate("Config", u"&Cancel", None))
コード例 #5
0
class Ui_Img(object):
    def setupUi(self, Img):
        if not Img.objectName():
            Img.setObjectName(u"Img")
        Img.resize(620, 559)
        self.gridLayout = QGridLayout(Img)
        self.gridLayout.setObjectName(u"gridLayout")
        self.graphicsView = QGraphicsView(Img)
        self.graphicsView.setObjectName(u"graphicsView")

        self.gridLayout.addWidget(self.graphicsView, 0, 0, 1, 1)

        self.verticalLayout = QVBoxLayout()
        self.verticalLayout.setObjectName(u"verticalLayout")
        self.line_3 = QFrame(Img)
        self.line_3.setObjectName(u"line_3")
        self.line_3.setFrameShape(QFrame.VLine)
        self.line_3.setFrameShadow(QFrame.Sunken)

        self.verticalLayout.addWidget(self.line_3)

        self.verticalLayout_2 = QVBoxLayout()
        self.verticalLayout_2.setObjectName(u"verticalLayout_2")
        self.line_5 = QFrame(Img)
        self.line_5.setObjectName(u"line_5")
        self.line_5.setFrameShape(QFrame.VLine)
        self.line_5.setFrameShadow(QFrame.Sunken)

        self.verticalLayout_2.addWidget(self.line_5)

        self.checkBox = QCheckBox(Img)
        self.checkBox.setObjectName(u"checkBox")
        self.checkBox.setMaximumSize(QSize(100, 16777215))
        self.checkBox.setChecked(True)

        self.verticalLayout_2.addWidget(self.checkBox)

        self.ttaModel = QCheckBox(Img)
        self.ttaModel.setObjectName(u"ttaModel")
        self.ttaModel.setMaximumSize(QSize(70, 16777215))

        self.verticalLayout_2.addWidget(self.ttaModel)

        self.horizontalLayout_3 = QHBoxLayout()
        self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
        self.scaleRadio = QRadioButton(Img)
        self.buttonGroup_2 = QButtonGroup(Img)
        self.buttonGroup_2.setObjectName(u"buttonGroup_2")
        self.buttonGroup_2.addButton(self.scaleRadio)
        self.scaleRadio.setObjectName(u"scaleRadio")
        self.scaleRadio.setMaximumSize(QSize(80, 16777215))
        self.scaleRadio.setChecked(True)

        self.horizontalLayout_3.addWidget(self.scaleRadio)

        self.scaleEdit = QLineEdit(Img)
        self.scaleEdit.setObjectName(u"scaleEdit")
        self.scaleEdit.setMaximumSize(QSize(160, 16777215))
        self.scaleEdit.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_3.addWidget(self.scaleEdit)

        self.verticalLayout_2.addLayout(self.horizontalLayout_3)

        self.horizontalLayout_4 = QHBoxLayout()
        self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
        self.heighRadio = QRadioButton(Img)
        self.buttonGroup_2.addButton(self.heighRadio)
        self.heighRadio.setObjectName(u"heighRadio")
        self.heighRadio.setMaximumSize(QSize(80, 16777215))

        self.horizontalLayout_4.addWidget(self.heighRadio)

        self.widthEdit = QLineEdit(Img)
        self.widthEdit.setObjectName(u"widthEdit")
        self.widthEdit.setEnabled(False)
        self.widthEdit.setMaximumSize(QSize(60, 16777215))
        self.widthEdit.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_4.addWidget(self.widthEdit)

        self.label_2 = QLabel(Img)
        self.label_2.setObjectName(u"label_2")
        self.label_2.setMaximumSize(QSize(20, 16777215))

        self.horizontalLayout_4.addWidget(self.label_2)

        self.heighEdit = QLineEdit(Img)
        self.heighEdit.setObjectName(u"heighEdit")
        self.heighEdit.setEnabled(False)
        self.heighEdit.setMaximumSize(QSize(60, 16777215))
        self.heighEdit.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_4.addWidget(self.heighEdit)

        self.verticalLayout_2.addLayout(self.horizontalLayout_4)

        self.horizontalLayout_5 = QHBoxLayout()
        self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
        self.label_4 = QLabel(Img)
        self.label_4.setObjectName(u"label_4")
        self.label_4.setMaximumSize(QSize(60, 16777215))

        self.horizontalLayout_5.addWidget(self.label_4)

        self.noiseCombox = QComboBox(Img)
        self.noiseCombox.addItem("")
        self.noiseCombox.addItem("")
        self.noiseCombox.addItem("")
        self.noiseCombox.addItem("")
        self.noiseCombox.addItem("")
        self.noiseCombox.setObjectName(u"noiseCombox")
        self.noiseCombox.setMaximumSize(QSize(160, 16777215))

        self.horizontalLayout_5.addWidget(self.noiseCombox)

        self.verticalLayout_2.addLayout(self.horizontalLayout_5)

        self.horizontalLayout_6 = QHBoxLayout()
        self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
        self.label_5 = QLabel(Img)
        self.label_5.setObjectName(u"label_5")
        self.label_5.setMaximumSize(QSize(60, 16777215))

        self.horizontalLayout_6.addWidget(self.label_5)

        self.comboBox = QComboBox(Img)
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.setObjectName(u"comboBox")
        self.comboBox.setMaximumSize(QSize(160, 16777215))

        self.horizontalLayout_6.addWidget(self.comboBox)

        self.verticalLayout_2.addLayout(self.horizontalLayout_6)

        self.horizontalLayout_7 = QHBoxLayout()
        self.horizontalLayout_7.setObjectName(u"horizontalLayout_7")
        self.changeJpg = QPushButton(Img)
        self.changeJpg.setObjectName(u"changeJpg")
        self.changeJpg.setMaximumSize(QSize(100, 16777215))

        self.horizontalLayout_7.addWidget(self.changeJpg)

        self.changePng = QPushButton(Img)
        self.changePng.setObjectName(u"changePng")
        self.changePng.setMaximumSize(QSize(100, 16777215))

        self.horizontalLayout_7.addWidget(self.changePng)

        self.changeLabel = QLabel(Img)
        self.changeLabel.setObjectName(u"changeLabel")
        self.changeLabel.setMaximumSize(QSize(100, 16777215))
        self.changeLabel.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_7.addWidget(self.changeLabel)

        self.verticalLayout_2.addLayout(self.horizontalLayout_7)

        self.horizontalLayout_11 = QHBoxLayout()
        self.horizontalLayout_11.setObjectName(u"horizontalLayout_11")

        self.verticalLayout_2.addLayout(self.horizontalLayout_11)

        self.verticalLayout.addLayout(self.verticalLayout_2)

        self.line = QFrame(Img)
        self.line.setObjectName(u"line")
        self.line.setFrameShape(QFrame.VLine)
        self.line.setFrameShadow(QFrame.Sunken)

        self.verticalLayout.addWidget(self.line)

        self.line_4 = QFrame(Img)
        self.line_4.setObjectName(u"line_4")
        self.line_4.setFrameShape(QFrame.HLine)
        self.line_4.setFrameShadow(QFrame.Sunken)

        self.verticalLayout.addWidget(self.line_4)

        self.verticalLayout_3 = QVBoxLayout()
        self.verticalLayout_3.setObjectName(u"verticalLayout_3")
        self.horizontalLayout_8 = QHBoxLayout()
        self.horizontalLayout_8.setObjectName(u"horizontalLayout_8")
        self.label_8 = QLabel(Img)
        self.label_8.setObjectName(u"label_8")
        self.label_8.setMaximumSize(QSize(60, 16777215))

        self.horizontalLayout_8.addWidget(self.label_8)

        self.resolutionLabel = QLabel(Img)
        self.resolutionLabel.setObjectName(u"resolutionLabel")
        self.resolutionLabel.setMaximumSize(QSize(160, 16777215))

        self.horizontalLayout_8.addWidget(self.resolutionLabel)

        self.verticalLayout_3.addLayout(self.horizontalLayout_8)

        self.horizontalLayout_9 = QHBoxLayout()
        self.horizontalLayout_9.setObjectName(u"horizontalLayout_9")
        self.label_10 = QLabel(Img)
        self.label_10.setObjectName(u"label_10")
        self.label_10.setMaximumSize(QSize(60, 16777215))

        self.horizontalLayout_9.addWidget(self.label_10)

        self.sizeLabel = QLabel(Img)
        self.sizeLabel.setObjectName(u"sizeLabel")
        self.sizeLabel.setMaximumSize(QSize(160, 16777215))

        self.horizontalLayout_9.addWidget(self.sizeLabel)

        self.verticalLayout_3.addLayout(self.horizontalLayout_9)

        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.setObjectName(u"horizontalLayout")
        self.label = QLabel(Img)
        self.label.setObjectName(u"label")
        self.label.setMaximumSize(QSize(60, 16777215))

        self.horizontalLayout.addWidget(self.label)

        self.gpuName = QLabel(Img)
        self.gpuName.setObjectName(u"gpuName")
        self.gpuName.setMaximumSize(QSize(160, 16777215))

        self.horizontalLayout.addWidget(self.gpuName)

        self.verticalLayout_3.addLayout(self.horizontalLayout)

        self.horizontalLayout_10 = QHBoxLayout()
        self.horizontalLayout_10.setObjectName(u"horizontalLayout_10")
        self.label_6 = QLabel(Img)
        self.label_6.setObjectName(u"label_6")
        self.label_6.setMaximumSize(QSize(60, 16777215))

        self.horizontalLayout_10.addWidget(self.label_6)

        self.tickLabel = QLabel(Img)
        self.tickLabel.setObjectName(u"tickLabel")
        self.tickLabel.setMaximumSize(QSize(160, 16777215))

        self.horizontalLayout_10.addWidget(self.tickLabel)

        self.verticalLayout_3.addLayout(self.horizontalLayout_10)

        self.oepnButton = QPushButton(Img)
        self.oepnButton.setObjectName(u"oepnButton")
        self.oepnButton.setMaximumSize(QSize(100, 16777215))

        self.verticalLayout_3.addWidget(self.oepnButton)

        self.horizontalLayout_2 = QHBoxLayout()
        self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")

        self.verticalLayout_3.addLayout(self.horizontalLayout_2)

        self.pushButton_3 = QPushButton(Img)
        self.pushButton_3.setObjectName(u"pushButton_3")
        self.pushButton_3.setMaximumSize(QSize(100, 16777215))

        self.verticalLayout_3.addWidget(self.pushButton_3)

        self.pushButton = QPushButton(Img)
        self.pushButton.setObjectName(u"pushButton")
        self.pushButton.setMaximumSize(QSize(100, 16777215))

        self.verticalLayout_3.addWidget(self.pushButton)

        self.saveButton = QPushButton(Img)
        self.saveButton.setObjectName(u"saveButton")
        self.saveButton.setMaximumSize(QSize(100, 16777215))

        self.verticalLayout_3.addWidget(self.saveButton)

        self.verticalLayout.addLayout(self.verticalLayout_3)

        self.line_6 = QFrame(Img)
        self.line_6.setObjectName(u"line_6")
        self.line_6.setFrameShape(QFrame.HLine)
        self.line_6.setFrameShadow(QFrame.Sunken)

        self.verticalLayout.addWidget(self.line_6)

        self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum,
                                          QSizePolicy.Expanding)

        self.verticalLayout.addItem(self.verticalSpacer)

        self.line_2 = QFrame(Img)
        self.line_2.setObjectName(u"line_2")
        self.line_2.setFrameShape(QFrame.VLine)
        self.line_2.setFrameShadow(QFrame.Sunken)

        self.verticalLayout.addWidget(self.line_2)

        self.gridLayout.addLayout(self.verticalLayout, 0, 1, 1, 1)

        self.retranslateUi(Img)
        self.checkBox.clicked.connect(Img.SwithPicture)
        self.saveButton.clicked.connect(Img.SavePicture)
        self.heighEdit.textChanged.connect(Img.CheckScaleRadio)
        self.pushButton_3.clicked.connect(Img.ReduceScalePic)
        self.heighRadio.clicked.connect(Img.CheckScaleRadio)
        self.ttaModel.clicked.connect(Img.CheckScaleRadio)
        self.oepnButton.clicked.connect(Img.OpenPicture)
        self.widthEdit.textChanged.connect(Img.CheckScaleRadio)
        self.pushButton.clicked.connect(Img.AddScalePic)
        self.scaleEdit.textChanged.connect(Img.CheckScaleRadio)
        self.scaleRadio.clicked.connect(Img.CheckScaleRadio)
        self.comboBox.currentIndexChanged.connect(Img.ChangeModel)
        self.changeJpg.clicked.connect(Img.StartWaifu2x)
        self.noiseCombox.currentIndexChanged.connect(Img.CheckScaleRadio)
        self.changePng.clicked.connect(Img.StartWaifu2xPng)
        self.changeJpg.clicked.connect(Img.StartWaifu2xJPG)

        QMetaObject.connectSlotsByName(Img)

    # setupUi

    def retranslateUi(self, Img):
        Img.setWindowTitle(QCoreApplication.translate("Img", u"Form", None))
        self.checkBox.setText(
            QCoreApplication.translate("Img", u"waifu2x", None))
        #if QT_CONFIG(tooltip)
        self.ttaModel.setToolTip(
            QCoreApplication.translate(
                "Img",
                u"\u753b\u8d28\u63d0\u5347\uff0c\u8017\u65f6\u589e\u52a0",
                None))
        #endif // QT_CONFIG(tooltip)
        self.ttaModel.setText(
            QCoreApplication.translate("Img", u"tta\u6a21\u5f0f", None))
        self.scaleRadio.setText(
            QCoreApplication.translate("Img", u"\u500d\u6570\u653e\u5927",
                                       None))
        self.scaleEdit.setText(QCoreApplication.translate("Img", u"2", None))
        self.heighRadio.setText(
            QCoreApplication.translate("Img", u"\u56fa\u5b9a\u957f\u5bbd",
                                       None))
        self.label_2.setText(QCoreApplication.translate("Img", u"x", None))
        self.label_4.setText(
            QCoreApplication.translate("Img", u"\u964d\u566a\uff1a", None))
        self.noiseCombox.setItemText(
            0, QCoreApplication.translate("Img", u"3", None))
        self.noiseCombox.setItemText(
            1, QCoreApplication.translate("Img", u"2", None))
        self.noiseCombox.setItemText(
            2, QCoreApplication.translate("Img", u"1", None))
        self.noiseCombox.setItemText(
            3, QCoreApplication.translate("Img", u"0", None))
        self.noiseCombox.setItemText(
            4, QCoreApplication.translate("Img", u"-1", None))

        self.label_5.setText(
            QCoreApplication.translate("Img", u"\u6a21\u578b\uff1a", None))
        self.comboBox.setItemText(
            0, QCoreApplication.translate("Img", u"cunet", None))
        self.comboBox.setItemText(
            1, QCoreApplication.translate("Img", u"photo", None))
        self.comboBox.setItemText(
            2, QCoreApplication.translate("Img", u"anime_style_art_rgb", None))

        self.changeJpg.setText(
            QCoreApplication.translate("Img", u"\u8f6c\u6362JPG", None))
        self.changePng.setText(
            QCoreApplication.translate("Img", u"\u8f6c\u6362PNG", None))
        self.changeLabel.setText("")
        self.label_8.setText(
            QCoreApplication.translate("Img", u"\u5206\u8fa8\u7387\uff1a",
                                       None))
        self.resolutionLabel.setText(
            QCoreApplication.translate("Img", u"TextLabel", None))
        self.label_10.setText(
            QCoreApplication.translate("Img", u"\u5927 \u5c0f\uff1a", None))
        self.sizeLabel.setText(
            QCoreApplication.translate("Img", u"TextLabel", None))
        self.label.setText(QCoreApplication.translate("Img", u"GPU:", None))
        self.gpuName.setText(
            QCoreApplication.translate("Img", u"TextLabel", None))
        self.label_6.setText(
            QCoreApplication.translate("Img", u"\u8017\u65f6\uff1a", None))
        self.tickLabel.setText("")
        self.oepnButton.setText(
            QCoreApplication.translate("Img", u"\u6253\u5f00\u56fe\u7247",
                                       None))
        self.pushButton_3.setText(
            QCoreApplication.translate("Img", u"\u7f29\u5c0f", None))
        self.pushButton.setText(
            QCoreApplication.translate("Img", u"\u653e\u5927", None))
        self.saveButton.setText(
            QCoreApplication.translate("Img", u"\u4fdd\u5b58\u56fe\u7247",
                                       None))
コード例 #6
0
ファイル: ui_calcy.py プロジェクト: netsonicyxf/LaunchyQt
class Ui_CalcyOption(object):
    def setupUi(self, CalcyOption):
        if not CalcyOption.objectName():
            CalcyOption.setObjectName(u"CalcyOption")
        CalcyOption.resize(516, 262)
        self.horizontalLayout_2 = QHBoxLayout(CalcyOption)
        self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
        self.tabWidget = QTabWidget(CalcyOption)
        self.tabWidget.setObjectName(u"tabWidget")
        font = QFont()
        font.setFamilies([u"Verdana"])
        font.setPointSize(10)
        self.tabWidget.setFont(font)
        self.tabOutput = QWidget()
        self.tabOutput.setObjectName(u"tabOutput")
        self.formLayout = QFormLayout(self.tabOutput)
        self.formLayout.setObjectName(u"formLayout")
        self.verticalLayout_5 = QVBoxLayout()
        self.verticalLayout_5.setObjectName(u"verticalLayout_5")
        self.groupBox_2 = QGroupBox(self.tabOutput)
        self.groupBox_2.setObjectName(u"groupBox_2")
        self.verticalLayout_6 = QVBoxLayout(self.groupBox_2)
        self.verticalLayout_6.setObjectName(u"verticalLayout_6")
        self.radioButtonDecSepSystem = QRadioButton(self.groupBox_2)
        self.radioButtonDecSepSystem.setObjectName(u"radioButtonDecSepSystem")
        self.radioButtonDecSepSystem.setChecked(True)

        self.verticalLayout_6.addWidget(self.radioButtonDecSepSystem)

        self.radioButtonDecSepComa = QRadioButton(self.groupBox_2)
        self.radioButtonDecSepComa.setObjectName(u"radioButtonDecSepComa")

        self.verticalLayout_6.addWidget(self.radioButtonDecSepComa)

        self.radioButtonDecSepDot = QRadioButton(self.groupBox_2)
        self.radioButtonDecSepDot.setObjectName(u"radioButtonDecSepDot")

        self.verticalLayout_6.addWidget(self.radioButtonDecSepDot)


        self.verticalLayout_5.addWidget(self.groupBox_2)

        self.verticalLayout_4 = QVBoxLayout()
        self.verticalLayout_4.setObjectName(u"verticalLayout_4")
        self.horizontalLayout_3 = QHBoxLayout()
        self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
        self.label = QLabel(self.tabOutput)
        self.label.setObjectName(u"label")

        self.horizontalLayout_3.addWidget(self.label)

        self.spinBoxOutputPrecision = QSpinBox(self.tabOutput)
        self.spinBoxOutputPrecision.setObjectName(u"spinBoxOutputPrecision")
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.spinBoxOutputPrecision.sizePolicy().hasHeightForWidth())
        self.spinBoxOutputPrecision.setSizePolicy(sizePolicy)
        self.spinBoxOutputPrecision.setMinimumSize(QSize(55, 0))
        self.spinBoxOutputPrecision.setMaximumSize(QSize(60, 30))
        self.spinBoxOutputPrecision.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
        self.spinBoxOutputPrecision.setMinimum(1)
        self.spinBoxOutputPrecision.setMaximum(10)
        self.spinBoxOutputPrecision.setValue(3)

        self.horizontalLayout_3.addWidget(self.spinBoxOutputPrecision)


        self.verticalLayout_4.addLayout(self.horizontalLayout_3)

        self.checkBoxShowGrpSep = QCheckBox(self.tabOutput)
        self.checkBoxShowGrpSep.setObjectName(u"checkBoxShowGrpSep")
        self.checkBoxShowGrpSep.setChecked(False)

        self.verticalLayout_4.addWidget(self.checkBoxShowGrpSep)

        self.checkBoxCopyToClipboard = QCheckBox(self.tabOutput)
        self.checkBoxCopyToClipboard.setObjectName(u"checkBoxCopyToClipboard")
        self.checkBoxCopyToClipboard.setChecked(True)

        self.verticalLayout_4.addWidget(self.checkBoxCopyToClipboard)


        self.verticalLayout_5.addLayout(self.verticalLayout_4)


        self.formLayout.setLayout(0, QFormLayout.LabelRole, self.verticalLayout_5)

        self.tabWidget.addTab(self.tabOutput, "")
        self.tabRadix = QWidget()
        self.tabRadix.setObjectName(u"tabRadix")
        self.horizontalLayout_6 = QHBoxLayout(self.tabRadix)
        self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
        self.verticalLayout_3 = QVBoxLayout()
        self.verticalLayout_3.setObjectName(u"verticalLayout_3")
        self.groupBox_3 = QGroupBox(self.tabRadix)
        self.groupBox_3.setObjectName(u"groupBox_3")
        self.horizontalLayout = QHBoxLayout(self.groupBox_3)
        self.horizontalLayout.setObjectName(u"horizontalLayout")
        self.checkBoxBinOut = QCheckBox(self.groupBox_3)
        self.checkBoxBinOut.setObjectName(u"checkBoxBinOut")
        self.checkBoxBinOut.setChecked(True)

        self.horizontalLayout.addWidget(self.checkBoxBinOut)

        self.checkBoxOctOut = QCheckBox(self.groupBox_3)
        self.checkBoxOctOut.setObjectName(u"checkBoxOctOut")
        self.checkBoxOctOut.setChecked(True)

        self.horizontalLayout.addWidget(self.checkBoxOctOut)

        self.checkBoxHexOut = QCheckBox(self.groupBox_3)
        self.checkBoxHexOut.setObjectName(u"checkBoxHexOut")
        self.checkBoxHexOut.setChecked(True)

        self.horizontalLayout.addWidget(self.checkBoxHexOut)

        self.checkBoxSizeOut = QCheckBox(self.groupBox_3)
        self.checkBoxSizeOut.setObjectName(u"checkBoxSizeOut")
        self.checkBoxSizeOut.setChecked(True)

        self.horizontalLayout.addWidget(self.checkBoxSizeOut)


        self.verticalLayout_3.addWidget(self.groupBox_3)

        self.verticalLayout = QVBoxLayout()
        self.verticalLayout.setObjectName(u"verticalLayout")
        self.checkBoxShowBasePrefix = QCheckBox(self.tabRadix)
        self.checkBoxShowBasePrefix.setObjectName(u"checkBoxShowBasePrefix")
        self.checkBoxShowBasePrefix.setChecked(True)

        self.verticalLayout.addWidget(self.checkBoxShowBasePrefix)

        self.checkBoxShowLeadingZerosBin = QCheckBox(self.tabRadix)
        self.checkBoxShowLeadingZerosBin.setObjectName(u"checkBoxShowLeadingZerosBin")
        self.checkBoxShowLeadingZerosBin.setChecked(True)

        self.verticalLayout.addWidget(self.checkBoxShowLeadingZerosBin)

        self.checkBoxShowLeadingZerosOct = QCheckBox(self.tabRadix)
        self.checkBoxShowLeadingZerosOct.setObjectName(u"checkBoxShowLeadingZerosOct")
        self.checkBoxShowLeadingZerosOct.setChecked(True)

        self.verticalLayout.addWidget(self.checkBoxShowLeadingZerosOct)

        self.checkBoxShowLeadingZerosHex = QCheckBox(self.tabRadix)
        self.checkBoxShowLeadingZerosHex.setObjectName(u"checkBoxShowLeadingZerosHex")
        self.checkBoxShowLeadingZerosHex.setChecked(True)

        self.verticalLayout.addWidget(self.checkBoxShowLeadingZerosHex)

        self.verticalSpacer_2 = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)

        self.verticalLayout.addItem(self.verticalSpacer_2)


        self.verticalLayout_3.addLayout(self.verticalLayout)


        self.horizontalLayout_6.addLayout(self.verticalLayout_3)

        self.verticalLayout_2 = QVBoxLayout()
        self.verticalLayout_2.setObjectName(u"verticalLayout_2")
        self.groupBoxBW = QGroupBox(self.tabRadix)
        self.groupBoxBW.setObjectName(u"groupBoxBW")
        self.horizontalLayout_5 = QHBoxLayout(self.groupBoxBW)
        self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
        self.radioButtonBW64 = QRadioButton(self.groupBoxBW)
        self.radioButtonBW64.setObjectName(u"radioButtonBW64")

        self.horizontalLayout_5.addWidget(self.radioButtonBW64)

        self.radioButtonBW32 = QRadioButton(self.groupBoxBW)
        self.radioButtonBW32.setObjectName(u"radioButtonBW32")

        self.horizontalLayout_5.addWidget(self.radioButtonBW32)

        self.radioButtonBW16 = QRadioButton(self.groupBoxBW)
        self.radioButtonBW16.setObjectName(u"radioButtonBW16")
        self.radioButtonBW16.setChecked(True)

        self.horizontalLayout_5.addWidget(self.radioButtonBW16)

        self.radioButtonBW8 = QRadioButton(self.groupBoxBW)
        self.radioButtonBW8.setObjectName(u"radioButtonBW8")

        self.horizontalLayout_5.addWidget(self.radioButtonBW8)


        self.verticalLayout_2.addWidget(self.groupBoxBW)

        self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)

        self.verticalLayout_2.addItem(self.verticalSpacer)


        self.horizontalLayout_6.addLayout(self.verticalLayout_2)

        self.tabWidget.addTab(self.tabRadix, "")

        self.horizontalLayout_2.addWidget(self.tabWidget)


        self.retranslateUi(CalcyOption)

        self.tabWidget.setCurrentIndex(0)


        QMetaObject.connectSlotsByName(CalcyOption)
    # setupUi

    def retranslateUi(self, CalcyOption):
        CalcyOption.setWindowTitle(QCoreApplication.translate("CalcyOption", u"CalcyPy - Simple calculator", None))
        self.groupBox_2.setTitle(QCoreApplication.translate("CalcyOption", u"Decimal point and group separator", None))
#if QT_CONFIG(tooltip)
        self.radioButtonDecSepSystem.setToolTip(QCoreApplication.translate("CalcyOption", u"Use system locale settings", None))
#endif // QT_CONFIG(tooltip)
        self.radioButtonDecSepSystem.setText(QCoreApplication.translate("CalcyOption", u"System default", None))
        self.radioButtonDecSepComa.setText(QCoreApplication.translate("CalcyOption", u"Coma as decimal point and dot as group separator", None))
        self.radioButtonDecSepDot.setText(QCoreApplication.translate("CalcyOption", u"Dot as decimal point and coma as group separator", None))
        self.label.setText(QCoreApplication.translate("CalcyOption", u"Decimal output Precision", None))
#if QT_CONFIG(tooltip)
        self.spinBoxOutputPrecision.setToolTip(QCoreApplication.translate("CalcyOption", u"<html><head/><body><p>Sets the maximal number of digits</p></body></html>", None))
#endif // QT_CONFIG(tooltip)
        self.checkBoxShowGrpSep.setText(QCoreApplication.translate("CalcyOption", u"Show group separator in result", None))
#if QT_CONFIG(tooltip)
        self.checkBoxCopyToClipboard.setToolTip(QCoreApplication.translate("CalcyOption", u"If this option is enabled, pressing enter key will copy calculation result to clipboard.", None))
#endif // QT_CONFIG(tooltip)
        self.checkBoxCopyToClipboard.setText(QCoreApplication.translate("CalcyOption", u"Use Enter key to Copy result to Clipboard", None))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabOutput), QCoreApplication.translate("CalcyOption", u"General", None))
        self.groupBox_3.setTitle(QCoreApplication.translate("CalcyOption", u"Show result as", None))
        self.checkBoxBinOut.setText(QCoreApplication.translate("CalcyOption", u"Bin", None))
        self.checkBoxOctOut.setText(QCoreApplication.translate("CalcyOption", u"Oct", None))
        self.checkBoxHexOut.setText(QCoreApplication.translate("CalcyOption", u"Hex", None))
        self.checkBoxSizeOut.setText(QCoreApplication.translate("CalcyOption", u"Size", None))
#if QT_CONFIG(tooltip)
        self.checkBoxShowBasePrefix.setToolTip(QCoreApplication.translate("CalcyOption", u"Show prefix for given number base in results (i.e. \"0x\" for hexadecimal numbers)", None))
#endif // QT_CONFIG(tooltip)
        self.checkBoxShowBasePrefix.setText(QCoreApplication.translate("CalcyOption", u"Show base prefix in result", None))
        self.checkBoxShowLeadingZerosBin.setText(QCoreApplication.translate("CalcyOption", u"Show leading zeros in bin output", None))
        self.checkBoxShowLeadingZerosOct.setText(QCoreApplication.translate("CalcyOption", u"Show leading zeros in oct output", None))
        self.checkBoxShowLeadingZerosHex.setText(QCoreApplication.translate("CalcyOption", u"Show leading zeros in hex output", None))
        self.groupBoxBW.setTitle(QCoreApplication.translate("CalcyOption", u"Calculation bit width", None))
        self.radioButtonBW64.setText(QCoreApplication.translate("CalcyOption", u"64", None))
        self.radioButtonBW32.setText(QCoreApplication.translate("CalcyOption", u"32", None))
        self.radioButtonBW16.setText(QCoreApplication.translate("CalcyOption", u"16", None))
        self.radioButtonBW8.setText(QCoreApplication.translate("CalcyOption", u"8", None))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabRadix), QCoreApplication.translate("CalcyOption", u"Radix", None))
コード例 #7
0
class Ui_ReBuildDialog(object):
    def setupUi(self, ReBuildDialog):
        if not ReBuildDialog.objectName():
            ReBuildDialog.setObjectName(u"ReBuildDialog")
        ReBuildDialog.setWindowModality(Qt.ApplicationModal)
        ReBuildDialog.resize(268, 150)
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            ReBuildDialog.sizePolicy().hasHeightForWidth())
        ReBuildDialog.setSizePolicy(sizePolicy)
        font = QFont()
        font.setFamilies([u"DejaVu Sans"])
        ReBuildDialog.setFont(font)
        self.verticalLayout = QVBoxLayout(ReBuildDialog)
        self.verticalLayout.setSpacing(2)
        self.verticalLayout.setObjectName(u"verticalLayout")
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.TypeGroup = QGroupBox(ReBuildDialog)
        self.TypeGroup.setObjectName(u"TypeGroup")
        sizePolicy1 = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
        sizePolicy1.setHorizontalStretch(0)
        sizePolicy1.setVerticalStretch(0)
        sizePolicy1.setHeightForWidth(
            self.TypeGroup.sizePolicy().hasHeightForWidth())
        self.TypeGroup.setSizePolicy(sizePolicy1)
        self.formLayout = QFormLayout(self.TypeGroup)
        self.formLayout.setObjectName(u"formLayout")
        self.formLayout.setSizeConstraint(QLayout.SetMinimumSize)
        self.formLayout.setFieldGrowthPolicy(QFormLayout.FieldsStayAtSizeHint)
        self.formLayout.setHorizontalSpacing(15)
        self.formLayout.setVerticalSpacing(0)
        self.formLayout.setContentsMargins(2, 0, 2, 0)
        self.AllRadioButton = QRadioButton(self.TypeGroup)
        self.AllRadioButton.setObjectName(u"AllRadioButton")

        self.formLayout.setWidget(0, QFormLayout.LabelRole,
                                  self.AllRadioButton)

        self.LastRadioButton = QRadioButton(self.TypeGroup)
        self.LastRadioButton.setObjectName(u"LastRadioButton")

        self.formLayout.setWidget(1, QFormLayout.LabelRole,
                                  self.LastRadioButton)

        self.FrontierDateLabel = QLabel(self.TypeGroup)
        self.FrontierDateLabel.setObjectName(u"FrontierDateLabel")

        self.formLayout.setWidget(1, QFormLayout.FieldRole,
                                  self.FrontierDateLabel)

        self.DateRadionButton = QRadioButton(self.TypeGroup)
        self.DateRadionButton.setObjectName(u"DateRadionButton")

        self.formLayout.setWidget(2, QFormLayout.LabelRole,
                                  self.DateRadionButton)

        self.CustomDateEdit = QDateEdit(self.TypeGroup)
        self.CustomDateEdit.setObjectName(u"CustomDateEdit")
        self.CustomDateEdit.setCalendarPopup(True)
        self.CustomDateEdit.setTimeSpec(Qt.UTC)

        self.formLayout.setWidget(2, QFormLayout.FieldRole,
                                  self.CustomDateEdit)

        self.verticalLayout.addWidget(self.TypeGroup)

        self.FastAndDirty = QCheckBox(ReBuildDialog)
        self.FastAndDirty.setObjectName(u"FastAndDirty")
        self.FastAndDirty.setChecked(True)

        self.verticalLayout.addWidget(self.FastAndDirty)

        self.DialogButtonBox = QDialogButtonBox(ReBuildDialog)
        self.DialogButtonBox.setObjectName(u"DialogButtonBox")
        sizePolicy1.setHeightForWidth(
            self.DialogButtonBox.sizePolicy().hasHeightForWidth())
        self.DialogButtonBox.setSizePolicy(sizePolicy1)
        self.DialogButtonBox.setOrientation(Qt.Horizontal)
        self.DialogButtonBox.setStandardButtons(QDialogButtonBox.Cancel
                                                | QDialogButtonBox.Ok)

        self.verticalLayout.addWidget(self.DialogButtonBox)

        self.retranslateUi(ReBuildDialog)
        self.DialogButtonBox.accepted.connect(ReBuildDialog.accept)
        self.DialogButtonBox.rejected.connect(ReBuildDialog.reject)

        QMetaObject.connectSlotsByName(ReBuildDialog)

    # setupUi

    def retranslateUi(self, ReBuildDialog):
        ReBuildDialog.setWindowTitle(
            QCoreApplication.translate("ReBuildDialog", u"Re-Build Ledger",
                                       None))
        self.TypeGroup.setTitle(
            QCoreApplication.translate("ReBuildDialog", u"Date Range", None))
        self.AllRadioButton.setText(
            QCoreApplication.translate("ReBuildDialog", u"&Full, from scratch",
                                       None))
        self.LastRadioButton.setText(
            QCoreApplication.translate("ReBuildDialog", u"Since &Last actual:",
                                       None))
        self.FrontierDateLabel.setText(
            QCoreApplication.translate("ReBuildDialog", u"FrontierDate", None))
        self.DateRadionButton.setText(
            QCoreApplication.translate("ReBuildDialog", u"Since &Date:", None))
        self.CustomDateEdit.setDisplayFormat(
            QCoreApplication.translate("ReBuildDialog", u"dd/MM/yyyy", None))
        self.FastAndDirty.setText(
            QCoreApplication.translate("ReBuildDialog", u"Fast, &unreliable",
                                       None))
コード例 #8
0
    def __init__(self, stages: list[Stage], *args, **kwargs):
        QMainWindow.__init__(self, *args, **kwargs)
        if not self.objectName():
            self.setObjectName("MainWindow")
        self.resize(800, 600)
        size_policy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        size_policy.setHorizontalStretch(0)
        size_policy.setVerticalStretch(0)
        size_policy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(size_policy)
        self.setWindowTitle("Interfan")

        self.central_widget = QWidget(self)
        self.central_widget.setObjectName("central_widget")

        self.main_horizontal_layout = QHBoxLayout(self.central_widget)
        self.main_horizontal_layout.setObjectName("main_horizontal_layout")

        self.left_grid_layout = QGridLayout()
        self.left_grid_layout.setObjectName("left_grid_layout")

        self.slice_slider = QSlider(self.central_widget)
        self.slice_slider.setObjectName("slice_slider")
        self.slice_slider.setEnabled(False)
        self.slice_slider.setOrientation(Qt.Horizontal)

        self.left_grid_layout.addWidget(self.slice_slider, 1, 0, 1, 1)

        self.slice_label = QLabel(self.central_widget)
        self.slice_label.setObjectName("slice_label")
        self.slice_label.setGeometry(QRect(0, 10, 58, 18))
        self.slice_label.setText("0")
        self.left_grid_layout.addWidget(self.slice_label, 1, 1, 1, 1)

        self.main_image_scene = QGraphicsScene()
        self.main_image_view = QGraphicsView(self.main_image_scene)
        self.main_image_view.setObjectName("main_image_view")
        self.left_grid_layout.addWidget(self.main_image_view, 0, 0, 1, 1)

        self.slice_image_scene = QGraphicsScene()
        self.slice_image_view = QGraphicsView(self.slice_image_scene)
        self.slice_image_view.setObjectName("slice_image_view")
        self.left_grid_layout.addWidget(self.slice_image_view, 0, 1, 1, 1)

        self.left_grid_layout.setRowStretch(0, 12)
        self.left_grid_layout.setRowStretch(1, 1)
        self.left_grid_layout.setColumnStretch(0, 6)
        self.left_grid_layout.setColumnStretch(1, 1)

        self.main_horizontal_layout.addLayout(self.left_grid_layout)

        self.right_vertical_layout = QVBoxLayout()
        self.right_vertical_layout.setObjectName("right_vertical_layout")

        self.settings_widget = SettingWidget(self.central_widget)
        self.right_vertical_layout.addWidget(self.settings_widget.group_box)

        self.proceed_button = QPushButton(self.central_widget)
        self.proceed_button.setObjectName("proceed_button")
        self.proceed_button.setText("Выполнить")
        self.proceed_button.setEnabled(False)
        self.right_vertical_layout.addWidget(self.proceed_button)

        self.right_down_layout = QHBoxLayout()
        self.right_down_layout.setObjectName("right_down_layout")
        self.stages_layout = QVBoxLayout()
        self.stages_layout.setObjectName("stages_layout")

        self.stages_label = QLabel(self.central_widget)
        self.stages_label.setObjectName("stages_label")
        self.stages_label.setText("Этапы")
        self.stages_layout.addWidget(self.stages_label, 1)

        self.stages_radio_buttons = []
        for s in stages:
            rb = QRadioButton(self.central_widget)
            rb.setObjectName("stages_radio_button")
            rb.setEnabled(False)
            rb.setText(s.name)
            self.stages_layout.addWidget(rb, 1)
            self.stages_radio_buttons.append(rb)

        self.stages_radio_buttons[0].setEnabled(True)
        self.stages_radio_buttons[0].setChecked(True)
        self.set_stage(stages[0])

        self.right_down_layout.addLayout(self.stages_layout)

        self.history_layout = QVBoxLayout()
        self.history_layout.setObjectName("history_layout")
        self.history_header_layout = QHBoxLayout()
        self.history_header_layout.setObjectName("history_header_layout")

        self.history_label = QLabel(self.central_widget)
        self.history_label.setObjectName("history_label")
        self.history_label.setText("История операций")
        self.history_header_layout.addWidget(self.history_label)

        self.history_minus_button = QToolButton(self.central_widget)
        self.history_minus_button.setObjectName("history_minus_button")
        self.history_minus_button.setEnabled(False)
        self.history_minus_button.setText("-")
        self.history_header_layout.addWidget(self.history_minus_button)

        self.history_header_layout.setStretch(0, 8)
        self.history_header_layout.setStretch(1, 1)

        self.history_layout.addLayout(self.history_header_layout)

        self.history_list_view = QListView(self.central_widget)
        self.history_list_view.setObjectName("history_list_view")
        self.history_layout.addWidget(self.history_list_view)

        self.history_script_button = QPushButton(self.central_widget)
        self.history_script_button.setObjectName("history_script_button")
        self.history_script_button.setText("Просмотреть как скрипт")
        self.history_layout.addWidget(self.history_script_button)

        self.right_down_layout.addLayout(self.history_layout)

        self.right_down_layout.setStretch(0, 1)
        self.right_down_layout.setStretch(1, 1)

        self.right_vertical_layout.addLayout(self.right_down_layout)
        self.right_vertical_layout.setStretch(0, 1)
        self.right_vertical_layout.setStretch(1, 0)
        self.right_vertical_layout.setStretch(2, 1)

        self.main_horizontal_layout.addLayout(self.right_vertical_layout)
        self.main_horizontal_layout.setStretch(0, 1)
        self.main_horizontal_layout.setStretch(1, 1)

        self.setCentralWidget(self.central_widget)
        self.menu_bar = QMenuBar(self)
        self.menu_bar.setObjectName("menu_bar")
        self.menu_bar.setGeometry(QRect(0, 0, 800, 30))
        self.menu = QMenu(self.menu_bar)
        self.menu.setObjectName("men")
        self.menu.setTitle("Меню")
        self.setMenuBar(self.menu_bar)

        self.open_file = QAction(self)
        self.open_file.setObjectName("open_file")
        self.open_file.setText("Открыть файл")
        self.menu.addAction(self.open_file)

        self.status_bar = QStatusBar(self)
        self.status_bar.setObjectName("status_bar")
        self.setStatusBar(self.status_bar)

        self.menu_bar.addAction(self.menu.menuAction())

        QMetaObject.connectSlotsByName(self)