コード例 #1
0
    def createEditor(self, parent, option, index):
        if index.column() != 4:
            return QSqlRelationalDelegate.createEditor(self, parent, option,
                                                       index)

        # For editing the year, return a spinbox with a range from -1000 to 2100.
        spinbox = QSpinBox(parent)
        spinbox.setFrame(False)
        spinbox.setMaximum(2100)
        spinbox.setMinimum(-1000)
        return spinbox
コード例 #2
0
class FindEventsDialog(QDialog):
    def __init__(self, parent, channels, default_stim):
        super().__init__(parent)
        self.setWindowTitle("Find Events")
        vbox = QVBoxLayout(self)
        grid = QGridLayout()

        grid.addWidget(QLabel("Stim channel:"), 0, 0)
        self.stimchan = QComboBox()
        self.stimchan.addItems(channels)
        self.stimchan.setCurrentIndex(default_stim)
        grid.addWidget(self.stimchan, 0, 1)

        grid.addWidget(QLabel("Consecutive"), 1, 0)
        self.consecutive = QCheckBox()
        self.consecutive.setChecked(True)
        grid.addWidget(self.consecutive, 1, 1)

        grid.addWidget(QLabel("Initial event"), 2, 0)
        self.initial_event = QCheckBox()
        self.initial_event.setChecked(True)
        grid.addWidget(self.initial_event, 2, 1)

        grid.addWidget(QLabel("Cast to unsigned integer"), 3, 0)
        self.uint_cast = QCheckBox()
        self.uint_cast.setChecked(True)
        grid.addWidget(self.uint_cast, 3, 1)

        grid.addWidget(QLabel("Minimum duration:"), 4, 0)
        self.minduredit = QSpinBox()
        self.minduredit.setMaximum(MAX_INT)
        grid.addWidget(self.minduredit, 4, 1)

        grid.addWidget(QLabel("Shortest event:"), 5, 0)
        self.shortesteventedit = QSpinBox()
        self.shortesteventedit.setMaximum(MAX_INT)
        grid.addWidget(self.shortesteventedit, 5, 1)

        vbox.addLayout(grid)
        buttonbox = QDialogButtonBox(QDialogButtonBox.Ok
                                     | QDialogButtonBox.Cancel)
        vbox.addWidget(buttonbox)
        buttonbox.accepted.connect(self.accept)
        buttonbox.rejected.connect(self.reject)
        vbox.setSizeConstraint(QVBoxLayout.SetFixedSize)
コード例 #3
0
ファイル: pro.py プロジェクト: clpi/isutils
class Ui_ProjectSettings_UI(object):
    def setupUi(self, ProjectSettings_UI):
        if not ProjectSettings_UI.objectName():
            ProjectSettings_UI.setObjectName(u"ProjectSettings_UI")
        ProjectSettings_UI.resize(575, 685)
        self.gridLayout_3 = QGridLayout(ProjectSettings_UI)
        self.gridLayout_3.setObjectName(u"gridLayout_3")
        self.buttonBox = QDialogButtonBox(ProjectSettings_UI)
        self.buttonBox.setObjectName(u"buttonBox")
        self.buttonBox.setOrientation(Qt.Horizontal)
        self.buttonBox.setStandardButtons(QDialogButtonBox.Cancel
                                          | QDialogButtonBox.Ok)

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

        self.tabWidget = QTabWidget(ProjectSettings_UI)
        self.tabWidget.setObjectName(u"tabWidget")
        self.tabWidget.setDocumentMode(True)
        self.tab = QWidget()
        self.tab.setObjectName(u"tab")
        self.gridLayout = QGridLayout(self.tab)
        self.gridLayout.setObjectName(u"gridLayout")
        self.previewparams = QPlainTextEdit(self.tab)
        self.previewparams.setObjectName(u"previewparams")
        sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.previewparams.sizePolicy().hasHeightForWidth())
        self.previewparams.setSizePolicy(sizePolicy)
        self.previewparams.setReadOnly(True)

        self.gridLayout.addWidget(self.previewparams, 7, 0, 1, 4)

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

        self.gridLayout.addWidget(self.label_2, 5, 0, 1, 1)

        self.audio_thumbs = QCheckBox(self.tab)
        self.audio_thumbs.setObjectName(u"audio_thumbs")

        self.gridLayout.addWidget(self.audio_thumbs, 5, 2, 1, 1)

        self.horizontalLayout_2 = QHBoxLayout()
        self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
        self.label_7 = QLabel(self.tab)
        self.label_7.setObjectName(u"label_7")

        self.horizontalLayout_2.addWidget(self.label_7)

        self.video_tracks = QSpinBox(self.tab)
        self.video_tracks.setObjectName(u"video_tracks")

        self.horizontalLayout_2.addWidget(self.video_tracks)

        self.label_8 = QLabel(self.tab)
        self.label_8.setObjectName(u"label_8")

        self.horizontalLayout_2.addWidget(self.label_8)

        self.audio_tracks = QSpinBox(self.tab)
        self.audio_tracks.setObjectName(u"audio_tracks")

        self.horizontalLayout_2.addWidget(self.audio_tracks)

        self.label = QLabel(self.tab)
        self.label.setObjectName(u"label")

        self.horizontalLayout_2.addWidget(self.label)

        self.audio_channels = QComboBox(self.tab)
        self.audio_channels.addItem("")
        self.audio_channels.addItem("")
        self.audio_channels.addItem("")
        self.audio_channels.setObjectName(u"audio_channels")
        sizePolicy1 = QSizePolicy(QSizePolicy.MinimumExpanding,
                                  QSizePolicy.Fixed)
        sizePolicy1.setHorizontalStretch(0)
        sizePolicy1.setVerticalStretch(0)
        sizePolicy1.setHeightForWidth(
            self.audio_channels.sizePolicy().hasHeightForWidth())
        self.audio_channels.setSizePolicy(sizePolicy1)

        self.horizontalLayout_2.addWidget(self.audio_channels)

        self.gridLayout.addLayout(self.horizontalLayout_2, 4, 0, 1, 4)

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

        self.gridLayout.addItem(self.horizontalSpacer, 5, 3, 1, 1)

        self.profile_box = QGroupBox(self.tab)
        self.profile_box.setObjectName(u"profile_box")
        sizePolicy2 = QSizePolicy(QSizePolicy.Preferred,
                                  QSizePolicy.MinimumExpanding)
        sizePolicy2.setHorizontalStretch(0)
        sizePolicy2.setVerticalStretch(0)
        sizePolicy2.setHeightForWidth(
            self.profile_box.sizePolicy().hasHeightForWidth())
        self.profile_box.setSizePolicy(sizePolicy2)
        self.profile_box.setFlat(True)

        self.gridLayout.addWidget(self.profile_box, 3, 0, 1, 4)

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

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

        self.video_thumbs = QCheckBox(self.tab)
        self.video_thumbs.setObjectName(u"video_thumbs")

        self.gridLayout.addWidget(self.video_thumbs, 5, 1, 1, 1)

        self.horizontalLayout_4 = QHBoxLayout()
        self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
        self.label_25 = QLabel(self.tab)
        self.label_25.setObjectName(u"label_25")
        sizePolicy3 = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Preferred)
        sizePolicy3.setHorizontalStretch(0)
        sizePolicy3.setVerticalStretch(0)
        sizePolicy3.setHeightForWidth(
            self.label_25.sizePolicy().hasHeightForWidth())
        self.label_25.setSizePolicy(sizePolicy3)

        self.horizontalLayout_4.addWidget(self.label_25)

        self.preview_profile = KComboBox(self.tab)
        self.preview_profile.setObjectName(u"preview_profile")
        sizePolicy1.setHeightForWidth(
            self.preview_profile.sizePolicy().hasHeightForWidth())
        self.preview_profile.setSizePolicy(sizePolicy1)

        self.horizontalLayout_4.addWidget(self.preview_profile)

        self.preview_showprofileinfo = QToolButton(self.tab)
        self.preview_showprofileinfo.setObjectName(u"preview_showprofileinfo")
        self.preview_showprofileinfo.setCheckable(True)

        self.horizontalLayout_4.addWidget(self.preview_showprofileinfo)

        self.preview_manageprofile = QToolButton(self.tab)
        self.preview_manageprofile.setObjectName(u"preview_manageprofile")

        self.horizontalLayout_4.addWidget(self.preview_manageprofile)

        self.gridLayout.addLayout(self.horizontalLayout_4, 6, 0, 1, 4)

        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.setObjectName(u"horizontalLayout")
        self.custom_folder = QCheckBox(self.tab)
        self.custom_folder.setObjectName(u"custom_folder")

        self.horizontalLayout.addWidget(self.custom_folder)

        self.project_folder = KUrlRequester(self.tab)
        self.project_folder.setObjectName(u"project_folder")
        self.project_folder.setEnabled(False)

        self.horizontalLayout.addWidget(self.project_folder)

        self.gridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 4)

        self.same_folder = QCheckBox(self.tab)
        self.same_folder.setObjectName(u"same_folder")

        self.gridLayout.addWidget(self.same_folder, 2, 0, 1, 4)

        self.tabWidget.addTab(self.tab, "")
        self.label_4.raise_()
        self.profile_box.raise_()
        self.label_2.raise_()
        self.video_thumbs.raise_()
        self.audio_thumbs.raise_()
        self.previewparams.raise_()
        self.same_folder.raise_()
        self.tab_4 = QWidget()
        self.tab_4.setObjectName(u"tab_4")
        self.verticalLayout = QVBoxLayout(self.tab_4)
        self.verticalLayout.setObjectName(u"verticalLayout")
        self.enable_proxy = QCheckBox(self.tab_4)
        self.enable_proxy.setObjectName(u"enable_proxy")

        self.verticalLayout.addWidget(self.enable_proxy)

        self.proxy_box = QGroupBox(self.tab_4)
        self.proxy_box.setObjectName(u"proxy_box")
        self.proxy_box.setEnabled(False)
        self.proxy_box.setFlat(True)
        self.proxy_box.setCheckable(False)
        self.proxy_box.setChecked(False)
        self.gridLayout_2 = QGridLayout(self.proxy_box)
        self.gridLayout_2.setObjectName(u"gridLayout_2")
        self.gridLayout_2.setHorizontalSpacing(6)
        self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
        self.l_relPathProxyToOrig = QLabel(self.proxy_box)
        self.l_relPathProxyToOrig.setObjectName(u"l_relPathProxyToOrig")

        self.gridLayout_2.addWidget(self.l_relPathProxyToOrig, 10, 1, 1, 1)

        self.generate_imageproxy = QCheckBox(self.proxy_box)
        self.generate_imageproxy.setObjectName(u"generate_imageproxy")

        self.gridLayout_2.addWidget(self.generate_imageproxy, 3, 0, 1, 2)

        self.l_prefix_proxy = QLabel(self.proxy_box)
        self.l_prefix_proxy.setObjectName(u"l_prefix_proxy")

        self.gridLayout_2.addWidget(self.l_prefix_proxy, 11, 1, 1, 1)

        self.proxy_imagesize = QSpinBox(self.proxy_box)
        self.proxy_imagesize.setObjectName(u"proxy_imagesize")
        self.proxy_imagesize.setEnabled(False)
        self.proxy_imagesize.setMinimum(200)
        self.proxy_imagesize.setMaximum(100000)
        self.proxy_imagesize.setValue(800)

        self.gridLayout_2.addWidget(self.proxy_imagesize, 4, 2, 1, 4)

        self.label_24 = QLabel(self.proxy_box)
        self.label_24.setObjectName(u"label_24")
        sizePolicy3.setHeightForWidth(
            self.label_24.sizePolicy().hasHeightForWidth())
        self.label_24.setSizePolicy(sizePolicy3)

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

        self.proxy_minsize = QSpinBox(self.proxy_box)
        self.proxy_minsize.setObjectName(u"proxy_minsize")
        self.proxy_minsize.setMaximum(10000)
        self.proxy_minsize.setValue(1000)

        self.gridLayout_2.addWidget(self.proxy_minsize, 0, 2, 1, 4)

        self.l_prefix_clip = QLabel(self.proxy_box)
        self.l_prefix_clip.setObjectName(u"l_prefix_clip")

        self.gridLayout_2.addWidget(self.l_prefix_clip, 8, 1, 1, 1)

        self.proxy_profile = KComboBox(self.proxy_box)
        self.proxy_profile.setObjectName(u"proxy_profile")
        sizePolicy1.setHeightForWidth(
            self.proxy_profile.sizePolicy().hasHeightForWidth())
        self.proxy_profile.setSizePolicy(sizePolicy1)

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

        self.proxy_showprofileinfo = QToolButton(self.proxy_box)
        self.proxy_showprofileinfo.setObjectName(u"proxy_showprofileinfo")
        self.proxy_showprofileinfo.setCheckable(True)

        self.gridLayout_2.addWidget(self.proxy_showprofileinfo, 1, 4, 1, 1)

        self.generate_proxy = QCheckBox(self.proxy_box)
        self.generate_proxy.setObjectName(u"generate_proxy")

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

        self.proxyparams = QPlainTextEdit(self.proxy_box)
        self.proxyparams.setObjectName(u"proxyparams")
        sizePolicy.setHeightForWidth(
            self.proxyparams.sizePolicy().hasHeightForWidth())
        self.proxyparams.setSizePolicy(sizePolicy)
        self.proxyparams.setReadOnly(True)

        self.gridLayout_2.addWidget(self.proxyparams, 2, 0, 1, 6)

        self.image_label = QLabel(self.proxy_box)
        self.image_label.setObjectName(u"image_label")
        self.image_label.setEnabled(False)

        self.gridLayout_2.addWidget(self.image_label, 4, 0, 1, 2)

        self.le_relPathProxyToOrig = QLineEdit(self.proxy_box)
        self.le_relPathProxyToOrig.setObjectName(u"le_relPathProxyToOrig")
        self.le_relPathProxyToOrig.setEnabled(False)

        self.gridLayout_2.addWidget(self.le_relPathProxyToOrig, 10, 3, 1, 1)

        self.le_prefix_proxy = QLineEdit(self.proxy_box)
        self.le_prefix_proxy.setObjectName(u"le_prefix_proxy")
        self.le_prefix_proxy.setEnabled(False)

        self.gridLayout_2.addWidget(self.le_prefix_proxy, 11, 3, 1, 1)

        self.l_suffix_proxy = QLabel(self.proxy_box)
        self.l_suffix_proxy.setObjectName(u"l_suffix_proxy")

        self.gridLayout_2.addWidget(self.l_suffix_proxy, 12, 1, 1, 1)

        self.le_prefix_clip = QLineEdit(self.proxy_box)
        self.le_prefix_clip.setObjectName(u"le_prefix_clip")
        self.le_prefix_clip.setEnabled(False)

        self.gridLayout_2.addWidget(self.le_prefix_clip, 8, 3, 1, 1)

        self.le_suffix_proxy = QLineEdit(self.proxy_box)
        self.le_suffix_proxy.setObjectName(u"le_suffix_proxy")
        self.le_suffix_proxy.setEnabled(False)

        self.gridLayout_2.addWidget(self.le_suffix_proxy, 12, 3, 1, 1)

        self.proxy_imageminsize = QSpinBox(self.proxy_box)
        self.proxy_imageminsize.setObjectName(u"proxy_imageminsize")
        self.proxy_imageminsize.setMinimum(500)
        self.proxy_imageminsize.setMaximum(100000)
        self.proxy_imageminsize.setValue(2000)

        self.gridLayout_2.addWidget(self.proxy_imageminsize, 3, 2, 1, 4)

        self.l_suffix_clip = QLabel(self.proxy_box)
        self.l_suffix_clip.setObjectName(u"l_suffix_clip")

        self.gridLayout_2.addWidget(self.l_suffix_clip, 9, 1, 1, 1)

        self.l_relPathOrigToProxy = QLabel(self.proxy_box)
        self.l_relPathOrigToProxy.setObjectName(u"l_relPathOrigToProxy")

        self.gridLayout_2.addWidget(self.l_relPathOrigToProxy, 7, 1, 1, 1)

        self.le_relPathOrigToProxy = QLineEdit(self.proxy_box)
        self.le_relPathOrigToProxy.setObjectName(u"le_relPathOrigToProxy")
        self.le_relPathOrigToProxy.setEnabled(False)

        self.gridLayout_2.addWidget(self.le_relPathOrigToProxy, 7, 3, 1, 1)

        self.external_proxy_profile = QComboBox(self.proxy_box)
        self.external_proxy_profile.setObjectName(u"external_proxy_profile")

        self.gridLayout_2.addWidget(self.external_proxy_profile, 6, 1, 1, 5)

        self.proxy_resize = QSpinBox(self.proxy_box)
        self.proxy_resize.setObjectName(u"proxy_resize")
        self.proxy_resize.setMinimum(200)
        self.proxy_resize.setMaximum(100000)

        self.gridLayout_2.addWidget(self.proxy_resize, 5, 2, 1, 4)

        self.le_suffix_clip = QLineEdit(self.proxy_box)
        self.le_suffix_clip.setObjectName(u"le_suffix_clip")
        self.le_suffix_clip.setEnabled(False)

        self.gridLayout_2.addWidget(self.le_suffix_clip, 9, 3, 1, 1)

        self.external_proxy = QCheckBox(self.proxy_box)
        self.external_proxy.setObjectName(u"external_proxy")

        self.gridLayout_2.addWidget(self.external_proxy, 6, 0, 1, 1)

        self.checkProxy = QToolButton(self.proxy_box)
        self.checkProxy.setObjectName(u"checkProxy")

        self.gridLayout_2.addWidget(self.checkProxy, 1, 3, 1, 1)

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

        self.gridLayout_2.addWidget(self.label_3, 5, 0, 1, 1)

        self.proxy_manageprofile = QToolButton(self.proxy_box)
        self.proxy_manageprofile.setObjectName(u"proxy_manageprofile")

        self.gridLayout_2.addWidget(self.proxy_manageprofile, 1, 5, 1, 1)

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

        self.gridLayout_2.addItem(self.verticalSpacer, 13, 1, 1, 1)

        self.verticalLayout.addWidget(self.proxy_box)

        self.tabWidget.addTab(self.tab_4, "")
        self.tab_3 = QWidget()
        self.tab_3.setObjectName(u"tab_3")
        self.gridLayout_6 = QGridLayout(self.tab_3)
        self.gridLayout_6.setObjectName(u"gridLayout_6")
        self.metadata_list = QTreeWidget(self.tab_3)
        self.metadata_list.setObjectName(u"metadata_list")
        self.metadata_list.setAlternatingRowColors(True)
        self.metadata_list.setRootIsDecorated(False)
        self.metadata_list.setAllColumnsShowFocus(True)
        self.metadata_list.setColumnCount(2)
        self.metadata_list.header().setVisible(False)

        self.gridLayout_6.addWidget(self.metadata_list, 0, 0, 1, 1)

        self.horizontalLayout_3 = QHBoxLayout()
        self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
        self.add_metadata = QToolButton(self.tab_3)
        self.add_metadata.setObjectName(u"add_metadata")

        self.horizontalLayout_3.addWidget(self.add_metadata)

        self.delete_metadata = QToolButton(self.tab_3)
        self.delete_metadata.setObjectName(u"delete_metadata")

        self.horizontalLayout_3.addWidget(self.delete_metadata)

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

        self.horizontalLayout_3.addItem(self.horizontalSpacer_3)

        self.gridLayout_6.addLayout(self.horizontalLayout_3, 1, 0, 1, 1)

        self.tabWidget.addTab(self.tab_3, "")
        self.tab_2 = QWidget()
        self.tab_2.setObjectName(u"tab_2")
        self.gridLayout_4 = QGridLayout(self.tab_2)
        self.gridLayout_4.setObjectName(u"gridLayout_4")
        self.fonts_list = QListWidget(self.tab_2)
        self.fonts_list.setObjectName(u"fonts_list")
        self.fonts_list.setAlternatingRowColors(True)

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

        self.files_list = QTreeWidget(self.tab_2)
        __qtreewidgetitem = QTreeWidgetItem()
        __qtreewidgetitem.setText(0, u"1")
        self.files_list.setHeaderItem(__qtreewidgetitem)
        self.files_list.setObjectName(u"files_list")
        self.files_list.setAlternatingRowColors(True)
        self.files_list.setRootIsDecorated(False)
        self.files_list.setItemsExpandable(False)
        self.files_list.setHeaderHidden(True)
        self.files_list.setExpandsOnDoubleClick(False)

        self.gridLayout_4.addWidget(self.files_list, 3, 0, 1, 5)

        self.label_12 = QLabel(self.tab_2)
        self.label_12.setObjectName(u"label_12")

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

        self.used_count = QLabel(self.tab_2)
        self.used_count.setObjectName(u"used_count")

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

        self.used_size = QLabel(self.tab_2)
        self.used_size.setObjectName(u"used_size")

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

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

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

        self.unused_count = QLabel(self.tab_2)
        self.unused_count.setObjectName(u"unused_count")

        self.gridLayout_4.addWidget(self.unused_count, 1, 2, 1, 1)

        self.unused_size = QLabel(self.tab_2)
        self.unused_size.setObjectName(u"unused_size")

        self.gridLayout_4.addWidget(self.unused_size, 1, 3, 1, 1)

        self.delete_unused = QPushButton(self.tab_2)
        self.delete_unused.setObjectName(u"delete_unused")

        self.gridLayout_4.addWidget(self.delete_unused, 1, 4, 1, 1)

        self.list_search = KTreeWidgetSearchLine(self.tab_2)
        self.list_search.setObjectName(u"list_search")

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

        self.label_13 = QLabel(self.tab_2)
        self.label_13.setObjectName(u"label_13")

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

        self.label_fonts = QLabel(self.tab_2)
        self.label_fonts.setObjectName(u"label_fonts")

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

        self.button_export = QPushButton(self.tab_2)
        self.button_export.setObjectName(u"button_export")

        self.gridLayout_4.addWidget(self.button_export, 6, 0, 1, 2)

        self.files_count = QLabel(self.tab_2)
        self.files_count.setObjectName(u"files_count")

        self.gridLayout_4.addWidget(self.files_count, 2, 2, 1, 1)

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

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

        self.retranslateUi(ProjectSettings_UI)
        self.buttonBox.accepted.connect(ProjectSettings_UI.accept)
        self.buttonBox.rejected.connect(ProjectSettings_UI.reject)
        self.custom_folder.toggled.connect(self.project_folder.setEnabled)
        self.enable_proxy.toggled.connect(self.proxy_box.setEnabled)
        self.external_proxy.toggled.connect(
            self.external_proxy_profile.setEnabled)

        self.tabWidget.setCurrentIndex(0)

        QMetaObject.connectSlotsByName(ProjectSettings_UI)

    # setupUi

    def retranslateUi(self, ProjectSettings_UI):
        ProjectSettings_UI.setWindowTitle(
            QCoreApplication.translate("ProjectSettings_UI",
                                       u"Project Settings", None))
        self.label_2.setText(
            QCoreApplication.translate("ProjectSettings_UI", u"Thumbnails:",
                                       None))
        self.audio_thumbs.setText(
            QCoreApplication.translate("ProjectSettings_UI", u"Audio", None))
        self.label_7.setText(
            QCoreApplication.translate("ProjectSettings_UI", u"Video tracks:",
                                       None))
        self.label_8.setText(
            QCoreApplication.translate("ProjectSettings_UI", u"Audio tracks:",
                                       None))
        self.label.setText(
            QCoreApplication.translate("ProjectSettings_UI",
                                       u"Audio channels:", None))
        self.audio_channels.setItemText(
            0,
            QCoreApplication.translate("ProjectSettings_UI",
                                       u"2 Channels (Stereo)", None))
        self.audio_channels.setItemText(
            1,
            QCoreApplication.translate("ProjectSettings_UI", u"4 Channels",
                                       None))
        self.audio_channels.setItemText(
            2,
            QCoreApplication.translate("ProjectSettings_UI", u"6 Channels",
                                       None))

        self.label_4.setText(
            QCoreApplication.translate(
                "ProjectSettings_UI",
                u"Project folder to store proxy clips, thumbnails, previews",
                None))
        self.video_thumbs.setText(
            QCoreApplication.translate("ProjectSettings_UI", u"Video", None))
        self.label_25.setText(
            QCoreApplication.translate("ProjectSettings_UI",
                                       u"Preview profile:", None))
        self.preview_showprofileinfo.setText(
            QCoreApplication.translate("ProjectSettings_UI", u"...", None))
        self.preview_manageprofile.setText(
            QCoreApplication.translate("ProjectSettings_UI", u"...", None))
        self.custom_folder.setText(
            QCoreApplication.translate("ProjectSettings_UI",
                                       u"Custom project folder:", None))
        self.same_folder.setText(
            QCoreApplication.translate(
                "ProjectSettings_UI",
                u"Use parent folder of the project file as project folder",
                None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.tab),
            QCoreApplication.translate("ProjectSettings_UI", u"Settings",
                                       None))
        self.enable_proxy.setText(
            QCoreApplication.translate("ProjectSettings_UI",
                                       u"Enable proxy clips", None))
        self.l_relPathProxyToOrig.setText(
            QCoreApplication.translate("ProjectSettings_UI",
                                       u"Relative path from proxy to clip:",
                                       None))
        self.generate_imageproxy.setText(
            QCoreApplication.translate("ProjectSettings_UI",
                                       u"Generate for images larger than",
                                       None))
        self.l_prefix_proxy.setText(
            QCoreApplication.translate("ProjectSettings_UI",
                                       u"Prefix of proxy:", None))
        self.proxy_imagesize.setSuffix(
            QCoreApplication.translate("ProjectSettings_UI", u"pixels", None))
        self.label_24.setText(
            QCoreApplication.translate("ProjectSettings_UI",
                                       u"Encoding profile:", None))
        self.proxy_minsize.setSuffix(
            QCoreApplication.translate("ProjectSettings_UI", u"pixels", None))
        self.l_prefix_clip.setText(
            QCoreApplication.translate("ProjectSettings_UI",
                                       u"Prefix of clip:", None))
        self.proxy_showprofileinfo.setText(
            QCoreApplication.translate("ProjectSettings_UI", u"...", None))
        self.generate_proxy.setText(
            QCoreApplication.translate("ProjectSettings_UI",
                                       u"Generate for videos larger than",
                                       None))
        self.image_label.setText(
            QCoreApplication.translate("ProjectSettings_UI",
                                       u"Proxy image size", None))
        self.l_suffix_proxy.setText(
            QCoreApplication.translate("ProjectSettings_UI",
                                       u"Suffix of proxy:", None))
        self.proxy_imageminsize.setSuffix(
            QCoreApplication.translate("ProjectSettings_UI", u"pixels", None))
        self.l_suffix_clip.setText(
            QCoreApplication.translate("ProjectSettings_UI",
                                       u"Suffix of clip:", None))
        self.l_relPathOrigToProxy.setText(
            QCoreApplication.translate("ProjectSettings_UI",
                                       u"Relative path from clip to proxy:",
                                       None))
        self.proxy_resize.setSuffix(
            QCoreApplication.translate("ProjectSettings_UI", u"pixels", None))
        self.external_proxy.setText(
            QCoreApplication.translate("ProjectSettings_UI",
                                       u"Use external proxy clips", None))
        self.checkProxy.setText(
            QCoreApplication.translate("ProjectSettings_UI", u"...", None))
        self.label_3.setText(
            QCoreApplication.translate("ProjectSettings_UI",
                                       u"Proxy video resize (width)", None))
        self.proxy_manageprofile.setText(
            QCoreApplication.translate("ProjectSettings_UI", u"...", None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.tab_4),
            QCoreApplication.translate("ProjectSettings_UI", u"Proxy", None))
        ___qtreewidgetitem = self.metadata_list.headerItem()
        ___qtreewidgetitem.setText(
            1, QCoreApplication.translate("ProjectSettings_UI", u"2", None))
        ___qtreewidgetitem.setText(
            0, QCoreApplication.translate("ProjectSettings_UI", u"1", None))
        self.add_metadata.setText(
            QCoreApplication.translate("ProjectSettings_UI", u"...", None))
        self.delete_metadata.setText(
            QCoreApplication.translate("ProjectSettings_UI", u"...", None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.tab_3),
            QCoreApplication.translate("ProjectSettings_UI", u"Metadata",
                                       None))
        self.label_12.setText(
            QCoreApplication.translate("ProjectSettings_UI",
                                       u"Clips used in project:", None))
        self.used_count.setText("")
        self.used_size.setText("")
        self.label_6.setText(
            QCoreApplication.translate("ProjectSettings_UI", u"Unused clips:",
                                       None))
        self.unused_count.setText("")
        self.unused_size.setText("")
        self.delete_unused.setText(
            QCoreApplication.translate("ProjectSettings_UI", u"Delete files",
                                       None))
        self.label_13.setText(
            QCoreApplication.translate("ProjectSettings_UI", u"Project files:",
                                       None))
        self.label_fonts.setText(
            QCoreApplication.translate("ProjectSettings_UI", u"Fonts", None))
        self.button_export.setText(
            QCoreApplication.translate("ProjectSettings_UI",
                                       u"Plain Text Export...", None))
        self.files_count.setText("")
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.tab_2),
            QCoreApplication.translate("ProjectSettings_UI", u"Project Files",
                                       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
ファイル: 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))
コード例 #6
0
class Ui_TaxWidget(object):
    def setupUi(self, TaxWidget):
        if not TaxWidget.objectName():
            TaxWidget.setObjectName(u"TaxWidget")
        TaxWidget.resize(696, 408)
        self.gridLayout = QGridLayout(TaxWidget)
        self.gridLayout.setObjectName(u"gridLayout")
        self.AccountLbl = QLabel(TaxWidget)
        self.AccountLbl.setObjectName(u"AccountLbl")

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

        self.AccountWidget = AccountSelector(TaxWidget)
        self.AccountWidget.setObjectName(u"AccountWidget")

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

        self.YearLbl = QLabel(TaxWidget)
        self.YearLbl.setObjectName(u"YearLbl")

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

        self.Year = QSpinBox(TaxWidget)
        self.Year.setObjectName(u"Year")
        self.Year.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
        self.Year.setMinimum(2010)
        self.Year.setMaximum(2030)
        self.Year.setValue(2020)

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

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

        self.gridLayout.addItem(self.verticalSpacer, 8, 0, 1, 1)

        self.line = QFrame(TaxWidget)
        self.line.setObjectName(u"line")
        self.line.setFrameShape(QFrame.HLine)
        self.line.setFrameShadow(QFrame.Sunken)

        self.gridLayout.addWidget(self.line, 3, 0, 1, 3)

        self.DlsgGroup = QGroupBox(TaxWidget)
        self.DlsgGroup.setObjectName(u"DlsgGroup")
        sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.DlsgGroup.sizePolicy().hasHeightForWidth())
        self.DlsgGroup.setSizePolicy(sizePolicy)
        self.DlsgGroup.setFlat(False)
        self.DlsgGroup.setCheckable(True)
        self.DlsgGroup.setChecked(False)
        self.gridLayout_2 = QGridLayout(self.DlsgGroup)
        self.gridLayout_2.setSpacing(2)
        self.gridLayout_2.setObjectName(u"gridLayout_2")
        self.gridLayout_2.setContentsMargins(6, 6, 6, 6)
        self.DlsgFileLbl = QLabel(self.DlsgGroup)
        self.DlsgFileLbl.setObjectName(u"DlsgFileLbl")

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

        self.IncomeSourceBroker = QCheckBox(self.DlsgGroup)
        self.IncomeSourceBroker.setObjectName(u"IncomeSourceBroker")
        self.IncomeSourceBroker.setChecked(True)

        self.gridLayout_2.addWidget(self.IncomeSourceBroker, 1, 0, 1, 3)

        self.DividendsOnly = QCheckBox(self.DlsgGroup)
        self.DividendsOnly.setObjectName(u"DividendsOnly")

        self.gridLayout_2.addWidget(self.DividendsOnly, 2, 0, 1, 3)

        self.DlsgSelectBtn = QPushButton(self.DlsgGroup)
        self.DlsgSelectBtn.setObjectName(u"DlsgSelectBtn")

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

        self.DlsgFileName = QLineEdit(self.DlsgGroup)
        self.DlsgFileName.setObjectName(u"DlsgFileName")

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


        self.gridLayout.addWidget(self.DlsgGroup, 5, 0, 1, 3)

        self.XlsFileLbl = QLabel(TaxWidget)
        self.XlsFileLbl.setObjectName(u"XlsFileLbl")

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

        self.XlsFileName = QLineEdit(TaxWidget)
        self.XlsFileName.setObjectName(u"XlsFileName")
        sizePolicy1 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
        sizePolicy1.setHorizontalStretch(0)
        sizePolicy1.setVerticalStretch(0)
        sizePolicy1.setHeightForWidth(self.XlsFileName.sizePolicy().hasHeightForWidth())
        self.XlsFileName.setSizePolicy(sizePolicy1)

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

        self.XlsSelectBtn = QPushButton(TaxWidget)
        self.XlsSelectBtn.setObjectName(u"XlsSelectBtn")
        sizePolicy2 = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Fixed)
        sizePolicy2.setHorizontalStretch(0)
        sizePolicy2.setVerticalStretch(0)
        sizePolicy2.setHeightForWidth(self.XlsSelectBtn.sizePolicy().hasHeightForWidth())
        self.XlsSelectBtn.setSizePolicy(sizePolicy2)

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

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

        self.gridLayout.addItem(self.horizontalSpacer, 5, 3, 1, 1)

        self.NoSettlement = QCheckBox(TaxWidget)
        self.NoSettlement.setObjectName(u"NoSettlement")

        self.gridLayout.addWidget(self.NoSettlement, 6, 0, 1, 4)

        self.SaveButton = QPushButton(TaxWidget)
        self.SaveButton.setObjectName(u"SaveButton")

        self.gridLayout.addWidget(self.SaveButton, 7, 2, 1, 1)

        self.WarningLbl = QLabel(TaxWidget)
        self.WarningLbl.setObjectName(u"WarningLbl")
        font = QFont()
        font.setItalic(True)
        self.WarningLbl.setFont(font)

        self.gridLayout.addWidget(self.WarningLbl, 4, 0, 1, 3)


        self.retranslateUi(TaxWidget)

        QMetaObject.connectSlotsByName(TaxWidget)
    # setupUi

    def retranslateUi(self, TaxWidget):
        TaxWidget.setWindowTitle(QCoreApplication.translate("TaxWidget", u"Taxes", None))
        self.AccountLbl.setText(QCoreApplication.translate("TaxWidget", u"Account:", None))
#if QT_CONFIG(tooltip)
        self.AccountWidget.setToolTip(QCoreApplication.translate("TaxWidget", u"Foreign account to prepare tax report for", None))
#endif // QT_CONFIG(tooltip)
        self.YearLbl.setText(QCoreApplication.translate("TaxWidget", u"Year:", None))
        self.Year.setSuffix("")
        self.DlsgGroup.setTitle(QCoreApplication.translate("TaxWidget", u"Create tax form in \"\u0414\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f\" program format (*.dcX)", None))
        self.DlsgFileLbl.setText(QCoreApplication.translate("TaxWidget", u"Output file:", None))
        self.IncomeSourceBroker.setText(QCoreApplication.translate("TaxWidget", u"Use broker name as income source", None))
        self.DividendsOnly.setText(QCoreApplication.translate("TaxWidget", u"Update only information about dividends", None))
#if QT_CONFIG(tooltip)
        self.DlsgSelectBtn.setToolTip(QCoreApplication.translate("TaxWidget", u"Select file", None))
#endif // QT_CONFIG(tooltip)
        self.DlsgSelectBtn.setText(QCoreApplication.translate("TaxWidget", u" ... ", None))
#if QT_CONFIG(tooltip)
        self.DlsgFileName.setToolTip(QCoreApplication.translate("TaxWidget", u"File where to store russian tax form", None))
#endif // QT_CONFIG(tooltip)
        self.XlsFileLbl.setText(QCoreApplication.translate("TaxWidget", u"Excel file:", None))
#if QT_CONFIG(tooltip)
        self.XlsFileName.setToolTip(QCoreApplication.translate("TaxWidget", u"File where to store tax report in Excel format", None))
#endif // QT_CONFIG(tooltip)
#if QT_CONFIG(tooltip)
        self.XlsSelectBtn.setToolTip(QCoreApplication.translate("TaxWidget", u"Select file", None))
#endif // QT_CONFIG(tooltip)
        self.XlsSelectBtn.setText(QCoreApplication.translate("TaxWidget", u"...", None))
        self.NoSettlement.setText(QCoreApplication.translate("TaxWidget", u"Do not use settlement date for currency rates", None))
        self.SaveButton.setText(QCoreApplication.translate("TaxWidget", u"Save Report", None))
        self.WarningLbl.setText(QCoreApplication.translate("TaxWidget", u"Below functions are experimental - use it with care", None))
コード例 #7
0
class Ui_ConfigCapture_UI(object):
    def setupUi(self, ConfigCapture_UI):
        if not ConfigCapture_UI.objectName():
            ConfigCapture_UI.setObjectName(u"ConfigCapture_UI")
        ConfigCapture_UI.resize(525, 520)
        self.gridLayout_8 = QGridLayout(ConfigCapture_UI)
        self.gridLayout_8.setObjectName(u"gridLayout_8")
        self.gridLayout_8.setContentsMargins(0, 0, -1, -1)
        self.label = QLabel(ConfigCapture_UI)
        self.label.setObjectName(u"label")

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

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

        self.gridLayout_8.addWidget(self.kcfg_defaultcapture, 0, 1, 1, 1)

        self.tabWidget = QTabWidget(ConfigCapture_UI)
        self.tabWidget.setObjectName(u"tabWidget")
        self.tabWidget.setMinimumSize(QSize(401, 0))
        self.ffmpeg_tab = QWidget()
        self.ffmpeg_tab.setObjectName(u"ffmpeg_tab")
        self.gridLayout = QGridLayout(self.ffmpeg_tab)
        self.gridLayout.setObjectName(u"gridLayout")
        self.line = QFrame(self.ffmpeg_tab)
        self.line.setObjectName(u"line")
        self.line.setFrameShape(QFrame.HLine)
        self.line.setFrameShadow(QFrame.Sunken)

        self.gridLayout.addWidget(self.line, 10, 0, 4, 8)

        self.label_9 = QLabel(self.ffmpeg_tab)
        self.label_9.setObjectName(u"label_9")

        self.gridLayout.addWidget(self.label_9, 3, 0, 1, 2)

        self.kcfg_alsachannels = QSpinBox(self.ffmpeg_tab)
        self.kcfg_alsachannels.setObjectName(u"kcfg_alsachannels")

        self.gridLayout.addWidget(self.kcfg_alsachannels, 15, 6, 1, 2)

        self.label_24 = QLabel(self.ffmpeg_tab)
        self.label_24.setObjectName(u"label_24")
        sizePolicy1 = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Preferred)
        sizePolicy1.setHorizontalStretch(0)
        sizePolicy1.setVerticalStretch(0)
        sizePolicy1.setHeightForWidth(
            self.label_24.sizePolicy().hasHeightForWidth())
        self.label_24.setSizePolicy(sizePolicy1)

        self.gridLayout.addWidget(self.label_24, 18, 0, 1, 2)

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

        self.gridLayout.addWidget(self.label_4, 5, 0, 1, 2)

        self.kcfg_v4l_format = QComboBox(self.ffmpeg_tab)
        self.kcfg_v4l_format.setObjectName(u"kcfg_v4l_format")

        self.gridLayout.addWidget(self.kcfg_v4l_format, 3, 3, 1, 5)

        self.label_11 = QLabel(self.ffmpeg_tab)
        self.label_11.setObjectName(u"label_11")

        self.gridLayout.addWidget(self.label_11, 15, 5, 1, 1)

        self.horizontalSpacer_5 = QSpacerItem(127, 21, QSizePolicy.Expanding,
                                              QSizePolicy.Minimum)

        self.gridLayout.addItem(self.horizontalSpacer_5, 9, 3, 1, 2)

        self.config_v4l = QPushButton(self.ffmpeg_tab)
        self.config_v4l.setObjectName(u"config_v4l")

        self.gridLayout.addWidget(self.config_v4l, 9, 5, 1, 3)

        self.kcfg_v4l_alsadevice = QComboBox(self.ffmpeg_tab)
        self.kcfg_v4l_alsadevice.setObjectName(u"kcfg_v4l_alsadevice")
        sizePolicy2 = QSizePolicy(QSizePolicy.MinimumExpanding,
                                  QSizePolicy.Fixed)
        sizePolicy2.setHorizontalStretch(0)
        sizePolicy2.setVerticalStretch(0)
        sizePolicy2.setHeightForWidth(
            self.kcfg_v4l_alsadevice.sizePolicy().hasHeightForWidth())
        self.kcfg_v4l_alsadevice.setSizePolicy(sizePolicy2)

        self.gridLayout.addWidget(self.kcfg_v4l_alsadevice, 15, 0, 1, 5)

        self.label_31 = QLabel(self.ffmpeg_tab)
        self.label_31.setObjectName(u"label_31")

        self.gridLayout.addWidget(self.label_31, 7, 0, 1, 3)

        self.p_progressive = QLabel(self.ffmpeg_tab)
        self.p_progressive.setObjectName(u"p_progressive")

        self.gridLayout.addWidget(self.p_progressive, 9, 0, 1, 2)

        self.label_30 = QLabel(self.ffmpeg_tab)
        self.label_30.setObjectName(u"label_30")

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

        self.label_14 = QLabel(self.ffmpeg_tab)
        self.label_14.setObjectName(u"label_14")

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

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

        self.gridLayout.addLayout(self.v4l_profile_box, 18, 3, 1, 5)

        self.kcfg_detectedv4ldevices = QComboBox(self.ffmpeg_tab)
        self.kcfg_detectedv4ldevices.setObjectName(u"kcfg_detectedv4ldevices")

        self.gridLayout.addWidget(self.kcfg_detectedv4ldevices, 1, 3, 1, 5)

        self.p_aspect = QLabel(self.ffmpeg_tab)
        self.p_aspect.setObjectName(u"p_aspect")

        self.gridLayout.addWidget(self.p_aspect, 6, 3, 1, 5)

        self.label_23 = QLabel(self.ffmpeg_tab)
        self.label_23.setObjectName(u"label_23")

        self.gridLayout.addWidget(self.label_23, 6, 0, 1, 2)

        self.kcfg_v4l_captureaudio = QCheckBox(self.ffmpeg_tab)
        self.kcfg_v4l_captureaudio.setObjectName(u"kcfg_v4l_captureaudio")

        self.gridLayout.addWidget(self.kcfg_v4l_captureaudio, 14, 0, 1, 8)

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

        self.gridLayout.addItem(self.verticalSpacer, 20, 1, 1, 3)

        self.kcfg_v4l_capturevideo = QCheckBox(self.ffmpeg_tab)
        self.kcfg_v4l_capturevideo.setObjectName(u"kcfg_v4l_capturevideo")

        self.gridLayout.addWidget(self.kcfg_v4l_capturevideo, 0, 0, 1, 8)

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

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

        self.line_2 = QFrame(self.ffmpeg_tab)
        self.line_2.setObjectName(u"line_2")
        self.line_2.setFrameShape(QFrame.HLine)
        self.line_2.setFrameShadow(QFrame.Sunken)

        self.gridLayout.addWidget(self.line_2, 17, 0, 1, 8)

        self.label_32 = QLabel(self.ffmpeg_tab)
        self.label_32.setObjectName(u"label_32")

        self.gridLayout.addWidget(self.label_32, 8, 0, 1, 2)

        self.p_size = QLabel(self.ffmpeg_tab)
        self.p_size.setObjectName(u"p_size")

        self.gridLayout.addWidget(self.p_size, 4, 3, 1, 5)

        self.p_display = QLabel(self.ffmpeg_tab)
        self.p_display.setObjectName(u"p_display")

        self.gridLayout.addWidget(self.p_display, 7, 3, 1, 5)

        self.kcfg_video4vdevice = QLineEdit(self.ffmpeg_tab)
        self.kcfg_video4vdevice.setObjectName(u"kcfg_video4vdevice")

        self.gridLayout.addWidget(self.kcfg_video4vdevice, 2, 3, 1, 5)

        self.p_colorspace = QLabel(self.ffmpeg_tab)
        self.p_colorspace.setObjectName(u"p_colorspace")

        self.gridLayout.addWidget(self.p_colorspace, 8, 3, 1, 5)

        self.p_fps = QLabel(self.ffmpeg_tab)
        self.p_fps.setObjectName(u"p_fps")

        self.gridLayout.addWidget(self.p_fps, 5, 3, 1, 5)

        self.tabWidget.addTab(self.ffmpeg_tab, "")
        self.screen_grab_tab = QWidget()
        self.screen_grab_tab.setObjectName(u"screen_grab_tab")
        self.gridLayout_5 = QGridLayout(self.screen_grab_tab)
        self.gridLayout_5.setObjectName(u"gridLayout_5")
        self.kcfg_grab_hide_mouse = QCheckBox(self.screen_grab_tab)
        self.kcfg_grab_hide_mouse.setObjectName(u"kcfg_grab_hide_mouse")

        self.gridLayout_5.addWidget(self.kcfg_grab_hide_mouse, 3, 0, 1, 4)

        self.horizontalSpacer_2 = QSpacerItem(237, 20, QSizePolicy.Expanding,
                                              QSizePolicy.Minimum)

        self.gridLayout_5.addItem(self.horizontalSpacer_2, 2, 2, 1, 1)

        self.verticalSpacer_3 = QSpacerItem(383, 160, QSizePolicy.Minimum,
                                            QSizePolicy.Expanding)

        self.gridLayout_5.addItem(self.verticalSpacer_3, 8, 0, 1, 3)

        self.label_screengrab = QLabel(self.screen_grab_tab)
        self.label_screengrab.setObjectName(u"label_screengrab")
        sizePolicy1.setHeightForWidth(
            self.label_screengrab.sizePolicy().hasHeightForWidth())
        self.label_screengrab.setSizePolicy(sizePolicy1)

        self.gridLayout_5.addWidget(self.label_screengrab, 5, 0, 1, 1)

        self.kcfg_grab_capture_type = QComboBox(self.screen_grab_tab)
        self.kcfg_grab_capture_type.addItem("")
        self.kcfg_grab_capture_type.addItem("")
        self.kcfg_grab_capture_type.setObjectName(u"kcfg_grab_capture_type")

        self.gridLayout_5.addWidget(self.kcfg_grab_capture_type, 0, 0, 1, 3)

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

        self.gridLayout_5.addLayout(self.screen_grab_profile_box, 5, 1, 1, 2)

        self.label_18 = QLabel(self.screen_grab_tab)
        self.label_18.setObjectName(u"label_18")

        self.gridLayout_5.addWidget(self.label_18, 2, 0, 1, 1)

        self.region_group = QFrame(self.screen_grab_tab)
        self.region_group.setObjectName(u"region_group")
        self.region_group.setFrameShape(QFrame.StyledPanel)
        self.region_group.setFrameShadow(QFrame.Raised)
        self.gridLayout_3 = QGridLayout(self.region_group)
        self.gridLayout_3.setObjectName(u"gridLayout_3")
        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.setObjectName(u"horizontalLayout")
        self.kcfg_grab_follow_mouse = QCheckBox(self.region_group)
        self.kcfg_grab_follow_mouse.setObjectName(u"kcfg_grab_follow_mouse")

        self.horizontalLayout.addWidget(self.kcfg_grab_follow_mouse)

        self.kcfg_grab_hide_frame = QCheckBox(self.region_group)
        self.kcfg_grab_hide_frame.setObjectName(u"kcfg_grab_hide_frame")

        self.horizontalLayout.addWidget(self.kcfg_grab_hide_frame)

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

        self.horizontalLayout.addItem(self.horizontalSpacer_4)

        self.gridLayout_3.addLayout(self.horizontalLayout, 0, 0, 1, 3)

        self.label_19 = QLabel(self.region_group)
        self.label_19.setObjectName(u"label_19")

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

        self.kcfg_grab_offsetx = QSpinBox(self.region_group)
        self.kcfg_grab_offsetx.setObjectName(u"kcfg_grab_offsetx")
        sizePolicy.setHeightForWidth(
            self.kcfg_grab_offsetx.sizePolicy().hasHeightForWidth())
        self.kcfg_grab_offsetx.setSizePolicy(sizePolicy)
        self.kcfg_grab_offsetx.setMaximum(5000)
        self.kcfg_grab_offsetx.setValue(0)

        self.gridLayout_3.addWidget(self.kcfg_grab_offsetx, 1, 1, 1, 1)

        self.kcfg_grab_offsety = QSpinBox(self.region_group)
        self.kcfg_grab_offsety.setObjectName(u"kcfg_grab_offsety")
        sizePolicy.setHeightForWidth(
            self.kcfg_grab_offsety.sizePolicy().hasHeightForWidth())
        self.kcfg_grab_offsety.setSizePolicy(sizePolicy)
        self.kcfg_grab_offsety.setMaximum(5000)
        self.kcfg_grab_offsety.setValue(0)

        self.gridLayout_3.addWidget(self.kcfg_grab_offsety, 1, 2, 1, 1)

        self.label_20 = QLabel(self.region_group)
        self.label_20.setObjectName(u"label_20")

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

        self.kcfg_grab_width = QSpinBox(self.region_group)
        self.kcfg_grab_width.setObjectName(u"kcfg_grab_width")
        self.kcfg_grab_width.setMinimum(1)
        self.kcfg_grab_width.setMaximum(5000)
        self.kcfg_grab_width.setValue(1280)

        self.gridLayout_3.addWidget(self.kcfg_grab_width, 2, 1, 1, 1)

        self.kcfg_grab_height = QSpinBox(self.region_group)
        self.kcfg_grab_height.setObjectName(u"kcfg_grab_height")
        self.kcfg_grab_height.setMinimum(1)
        self.kcfg_grab_height.setMaximum(5000)
        self.kcfg_grab_height.setValue(720)

        self.gridLayout_3.addWidget(self.kcfg_grab_height, 2, 2, 1, 1)

        self.gridLayout_5.addWidget(self.region_group, 1, 0, 1, 3)

        self.kcfg_grab_fps = QDoubleSpinBox(self.screen_grab_tab)
        self.kcfg_grab_fps.setObjectName(u"kcfg_grab_fps")
        self.kcfg_grab_fps.setMinimum(1.000000000000000)
        self.kcfg_grab_fps.setMaximum(1000.000000000000000)

        self.gridLayout_5.addWidget(self.kcfg_grab_fps, 2, 1, 1, 1)

        self.tabWidget.addTab(self.screen_grab_tab, "")
        self.decklink_tab = QWidget()
        self.decklink_tab.setObjectName(u"decklink_tab")
        self.gridLayout_6 = QGridLayout(self.decklink_tab)
        self.gridLayout_6.setObjectName(u"gridLayout_6")
        self.kcfg_decklink_capturedevice = QComboBox(self.decklink_tab)
        self.kcfg_decklink_capturedevice.setObjectName(
            u"kcfg_decklink_capturedevice")
        sizePolicy.setHeightForWidth(
            self.kcfg_decklink_capturedevice.sizePolicy().hasHeightForWidth())
        self.kcfg_decklink_capturedevice.setSizePolicy(sizePolicy)

        self.gridLayout_6.addWidget(self.kcfg_decklink_capturedevice, 0, 1, 1,
                                    1)

        self.kcfg_decklink_filename = QLineEdit(self.decklink_tab)
        self.kcfg_decklink_filename.setObjectName(u"kcfg_decklink_filename")

        self.gridLayout_6.addWidget(self.kcfg_decklink_filename, 5, 1, 1, 1)

        self.label_16 = QLabel(self.decklink_tab)
        self.label_16.setObjectName(u"label_16")
        sizePolicy1.setHeightForWidth(
            self.label_16.sizePolicy().hasHeightForWidth())
        self.label_16.setSizePolicy(sizePolicy1)

        self.gridLayout_6.addWidget(self.label_16, 2, 0, 1, 1)

        self.label_29 = QLabel(self.decklink_tab)
        self.label_29.setObjectName(u"label_29")

        self.gridLayout_6.addWidget(self.label_29, 5, 0, 1, 1)

        self.verticalSpacer_4 = QSpacerItem(20, 327, QSizePolicy.Minimum,
                                            QSizePolicy.Expanding)

        self.gridLayout_6.addItem(self.verticalSpacer_4, 6, 1, 1, 1)

        self.label_27 = QLabel(self.decklink_tab)
        self.label_27.setObjectName(u"label_27")

        self.gridLayout_6.addWidget(self.label_27, 0, 0, 1, 1)

        self.decklink_profile_box = QHBoxLayout()
        self.decklink_profile_box.setSpacing(0)
        self.decklink_profile_box.setObjectName(u"decklink_profile_box")

        self.gridLayout_6.addLayout(self.decklink_profile_box, 2, 1, 1, 1)

        self.tabWidget.addTab(self.decklink_tab, "")
        self.audio_tab = QWidget()
        self.audio_tab.setObjectName(u"audio_tab")
        self.gridLayout_2 = QGridLayout(self.audio_tab)
        self.gridLayout_2.setObjectName(u"gridLayout_2")
        self.label_5 = QLabel(self.audio_tab)
        self.label_5.setObjectName(u"label_5")

        self.gridLayout_2.addWidget(self.label_5, 5, 0, 1, 1)

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

        self.gridLayout_2.addWidget(self.label_2, 3, 0, 1, 1)

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

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

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

        self.gridLayout_2.addWidget(self.label_3, 4, 0, 1, 1)

        self.audiocapturesamplerate = QComboBox(self.audio_tab)
        self.audiocapturesamplerate.setObjectName(u"audiocapturesamplerate")

        self.gridLayout_2.addWidget(self.audiocapturesamplerate, 5, 1, 1, 1)

        self.kcfg_audiocapturevolume = QSlider(self.audio_tab)
        self.kcfg_audiocapturevolume.setObjectName(u"kcfg_audiocapturevolume")
        self.kcfg_audiocapturevolume.setMaximum(100)
        self.kcfg_audiocapturevolume.setSliderPosition(100)
        self.kcfg_audiocapturevolume.setTracking(True)
        self.kcfg_audiocapturevolume.setOrientation(Qt.Horizontal)
        self.kcfg_audiocapturevolume.setInvertedAppearance(False)
        self.kcfg_audiocapturevolume.setInvertedControls(False)
        self.kcfg_audiocapturevolume.setTickPosition(QSlider.TicksAbove)

        self.gridLayout_2.addWidget(self.kcfg_audiocapturevolume, 3, 1, 1, 1)

        self.audiocapturechannels = QComboBox(self.audio_tab)
        self.audiocapturechannels.setObjectName(u"audiocapturechannels")

        self.gridLayout_2.addWidget(self.audiocapturechannels, 4, 1, 1, 1)

        self.kcfg_defaultaudiocapture = QComboBox(self.audio_tab)
        self.kcfg_defaultaudiocapture.setObjectName(
            u"kcfg_defaultaudiocapture")

        self.gridLayout_2.addWidget(self.kcfg_defaultaudiocapture, 1, 1, 1, 1)

        self.label_33 = QLabel(self.audio_tab)
        self.label_33.setObjectName(u"label_33")

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

        self.labelNoAudioDevices = QLabel(self.audio_tab)
        self.labelNoAudioDevices.setObjectName(u"labelNoAudioDevices")
        font = QFont()
        font.setPointSize(10)
        self.labelNoAudioDevices.setFont(font)

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

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

        self.gridLayout_8.addWidget(self.tabWidget, 1, 0, 1, 2)

        QWidget.setTabOrder(self.kcfg_defaultcapture, self.tabWidget)
        QWidget.setTabOrder(self.tabWidget, self.kcfg_grab_capture_type)
        QWidget.setTabOrder(self.kcfg_grab_capture_type,
                            self.kcfg_grab_follow_mouse)
        QWidget.setTabOrder(self.kcfg_grab_follow_mouse,
                            self.kcfg_grab_hide_frame)
        QWidget.setTabOrder(self.kcfg_grab_hide_frame, self.kcfg_grab_offsetx)
        QWidget.setTabOrder(self.kcfg_grab_offsetx, self.kcfg_grab_offsety)
        QWidget.setTabOrder(self.kcfg_grab_offsety, self.kcfg_grab_width)
        QWidget.setTabOrder(self.kcfg_grab_width, self.kcfg_grab_height)

        self.retranslateUi(ConfigCapture_UI)

        self.tabWidget.setCurrentIndex(0)

        QMetaObject.connectSlotsByName(ConfigCapture_UI)

    # setupUi

    def retranslateUi(self, ConfigCapture_UI):
        self.label.setText(
            QCoreApplication.translate("ConfigCapture_UI",
                                       u"Default capture device", None))
        self.kcfg_defaultcapture.setItemText(
            0, QCoreApplication.translate("ConfigCapture_UI", u"FFmpeg", None))
        self.kcfg_defaultcapture.setItemText(
            1,
            QCoreApplication.translate("ConfigCapture_UI", u"Screen grab",
                                       None))

        self.label_9.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Capture format",
                                       None))
        self.label_24.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Encoding profile",
                                       None))
        self.label_4.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Frame rate:",
                                       None))
        self.label_11.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Channels", None))
        self.config_v4l.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Edit", None))
        self.label_31.setText(
            QCoreApplication.translate("ConfigCapture_UI",
                                       u"Display aspect ratio:", None))
        self.p_progressive.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Interlaced",
                                       None))
        self.label_30.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Detected devices",
                                       None))
        self.label_14.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Video device",
                                       None))
        self.p_aspect.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"59/54", None))
        self.label_23.setText(
            QCoreApplication.translate("ConfigCapture_UI",
                                       u"Pixel aspect ratio:", None))
        self.kcfg_v4l_captureaudio.setText(
            QCoreApplication.translate("ConfigCapture_UI",
                                       u"Capture audio (ALSA)", None))
        self.kcfg_v4l_capturevideo.setText(
            QCoreApplication.translate("ConfigCapture_UI",
                                       u"Capture video (Video4Linux2)", None))
        self.label_6.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Size:", None))
        self.label_32.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Colorspace",
                                       None))
        self.p_size.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"720x576", None))
        self.p_display.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"4/3", None))
        self.kcfg_video4vdevice.setText("")
        self.p_colorspace.setText("")
        self.p_fps.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"25/1", None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.ffmpeg_tab),
            QCoreApplication.translate("ConfigCapture_UI", u"FFmpeg", None))
        self.kcfg_grab_hide_mouse.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Hide cursor",
                                       None))
        self.label_screengrab.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Encoding profile",
                                       None))
        self.kcfg_grab_capture_type.setItemText(
            0,
            QCoreApplication.translate("ConfigCapture_UI",
                                       u"Full Screen Capture", None))
        self.kcfg_grab_capture_type.setItemText(
            1,
            QCoreApplication.translate("ConfigCapture_UI", u"Region Capture",
                                       None))

        self.label_18.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Frame rate",
                                       None))
        self.kcfg_grab_follow_mouse.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Follow mouse",
                                       None))
        self.kcfg_grab_hide_frame.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Hide frame",
                                       None))
        self.label_19.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Offset", None))
        self.label_20.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Size", None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.screen_grab_tab),
            QCoreApplication.translate("ConfigCapture_UI", u"Screen Grab",
                                       None))
        self.label_16.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Encoding profile",
                                       None))
        self.label_29.setText(
            QCoreApplication.translate("ConfigCapture_UI",
                                       u"Capture file name:", None))
        self.label_27.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Detected devices",
                                       None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.decklink_tab),
            QCoreApplication.translate("ConfigCapture_UI", u"Blackmagic",
                                       None))
        self.label_5.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Sample rate:",
                                       None))
        self.label_2.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Capture volume:",
                                       None))
        self.label_3.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Channels:", None))
        self.label_33.setText(
            QCoreApplication.translate("ConfigCapture_UI", u"Device:", None))
        self.labelNoAudioDevices.setText(
            QCoreApplication.translate(
                "ConfigCapture_UI",
                u"Make sure you have audio plugins installed on your system",
                None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.audio_tab),
            QCoreApplication.translate("ConfigCapture_UI", u"Audio", None))
        pass
コード例 #8
0
class Ui_Form(object):
    def setupUi(self, shellTab):
        if not shellTab.objectName():
            shellTab.setObjectName(u"shellTab")
        shellTab.setAutoFillBackground(False)
        self.formLayout_2 = QFormLayout(shellTab)
        self.formLayout_2.setObjectName(u"formLayout_2")
        self.formLayout_2.setLabelAlignment(Qt.AlignLeading | Qt.AlignLeft
                                            | Qt.AlignVCenter)
        self.formLayout_2.setFormAlignment(Qt.AlignLeading | Qt.AlignLeft
                                           | Qt.AlignVCenter)
        self.formLayout_2.setVerticalSpacing(40)
        self.formLayout_2.setContentsMargins(-1, 11, -1, -1)
        self.label = QLabel(shellTab)
        self.label.setObjectName(u"label")

        self.formLayout_2.setWidget(0, QFormLayout.LabelRole, self.label)

        self.horizontalLayout_4 = QHBoxLayout()
        self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
        self.shellImgPath = QLineEdit(shellTab)
        self.shellImgPath.setObjectName(u"shellImgPath")

        self.horizontalLayout_4.addWidget(self.shellImgPath)

        self.shellBrowseImgBtn = QPushButton(shellTab)
        self.shellBrowseImgBtn.setObjectName(u"shellBrowseImgBtn")

        self.horizontalLayout_4.addWidget(self.shellBrowseImgBtn)

        self.formLayout_2.setLayout(0, QFormLayout.FieldRole,
                                    self.horizontalLayout_4)

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

        self.formLayout_2.setWidget(1, QFormLayout.LabelRole, self.label_2)

        self.horizontalLayout_7 = QHBoxLayout()
        self.horizontalLayout_7.setObjectName(u"horizontalLayout_7")
        self.label_3 = QLabel(shellTab)
        self.label_3.setObjectName(u"label_3")
        self.label_3.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_7.addWidget(self.label_3)

        self.shellFgX = QSpinBox(shellTab)
        self.shellFgX.setObjectName(u"shellFgX")
        self.shellFgX.setMaximum(100000000)

        self.horizontalLayout_7.addWidget(self.shellFgX)

        self.label_4 = QLabel(shellTab)
        self.label_4.setObjectName(u"label_4")
        self.label_4.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_7.addWidget(self.label_4)

        self.shellFgY = QSpinBox(shellTab)
        self.shellFgY.setObjectName(u"shellFgY")
        self.shellFgY.setMaximum(100000000)

        self.horizontalLayout_7.addWidget(self.shellFgY)

        self.formLayout_2.setLayout(1, QFormLayout.FieldRole,
                                    self.horizontalLayout_7)

        self.label_5 = QLabel(shellTab)
        self.label_5.setObjectName(u"label_5")

        self.formLayout_2.setWidget(2, QFormLayout.LabelRole, self.label_5)

        self.horizontalLayout_8 = QHBoxLayout()
        self.horizontalLayout_8.setObjectName(u"horizontalLayout_8")
        self.label_7 = QLabel(shellTab)
        self.label_7.setObjectName(u"label_7")
        self.label_7.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_8.addWidget(self.label_7)

        self.shellFgW = QSpinBox(shellTab)
        self.shellFgW.setObjectName(u"shellFgW")
        self.shellFgW.setMaximum(100000000)

        self.horizontalLayout_8.addWidget(self.shellFgW)

        self.label_6 = QLabel(shellTab)
        self.label_6.setObjectName(u"label_6")
        self.label_6.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_8.addWidget(self.label_6)

        self.shellFgH = QSpinBox(shellTab)
        self.shellFgH.setObjectName(u"shellFgH")
        self.shellFgH.setMaximum(10000000)

        self.horizontalLayout_8.addWidget(self.shellFgH)

        self.formLayout_2.setLayout(2, QFormLayout.FieldRole,
                                    self.horizontalLayout_8)

        self.retranslateUi(shellTab)

        QMetaObject.connectSlotsByName(shellTab)

    # setupUi

    def retranslateUi(self, shellTab):
        self.label.setText(
            QCoreApplication.translate("Form", u"Background", None))
        #if QT_CONFIG(statustip)
        self.shellImgPath.setStatusTip(
            QCoreApplication.translate(
                "Form",
                u"Filepath of image to be used as shell for demo assets",
                None))
        #endif // QT_CONFIG(statustip)
        self.shellBrowseImgBtn.setText(
            QCoreApplication.translate("Form", u"Browse", None))
        self.label_2.setText(
            QCoreApplication.translate("Form",
                                       u"Coordinates of assets on shell",
                                       None))
        self.label_3.setText(QCoreApplication.translate("Form", u"X", None))
        self.label_4.setText(QCoreApplication.translate("Form", u"Y", None))
        self.label_5.setText(
            QCoreApplication.translate("Form",
                                       u"Dimensions of assets on shell", None))
        self.label_7.setText(QCoreApplication.translate(
            "Form", u"Width", None))
        self.label_6.setText(
            QCoreApplication.translate("Form", u"Height", None))
        pass
コード例 #9
0
ファイル: edit.py プロジェクト: clpi/isutils
class Ui_EditRenderPreset_UI(object):
    def setupUi(self, EditRenderPreset_UI):
        if not EditRenderPreset_UI.objectName():
            EditRenderPreset_UI.setObjectName(u"EditRenderPreset_UI")
        EditRenderPreset_UI.resize(463, 630)
        self.verticalLayout_2 = QVBoxLayout(EditRenderPreset_UI)
        self.verticalLayout_2.setObjectName(u"verticalLayout_2")
        self.mainBox = QHBoxLayout()
        self.mainBox.setObjectName(u"mainBox")
        self.formLayout_6 = QFormLayout()
        self.formLayout_6.setObjectName(u"formLayout_6")
        self.formLayout_6.setContentsMargins(-1, 20, 10, -1)
        self.groupLabel = QLabel(EditRenderPreset_UI)
        self.groupLabel.setObjectName(u"groupLabel")

        self.formLayout_6.setWidget(0, QFormLayout.LabelRole, self.groupLabel)

        self.presetNameLabel = QLabel(EditRenderPreset_UI)
        self.presetNameLabel.setObjectName(u"presetNameLabel")

        self.formLayout_6.setWidget(1, QFormLayout.LabelRole,
                                    self.presetNameLabel)

        self.preset_name = QLineEdit(EditRenderPreset_UI)
        self.preset_name.setObjectName(u"preset_name")

        self.formLayout_6.setWidget(1, QFormLayout.FieldRole, self.preset_name)

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

        self.formLayout_6.setWidget(2, QFormLayout.LabelRole, self.label_2)

        self.formatCombo = QComboBox(EditRenderPreset_UI)
        self.formatCombo.setObjectName(u"formatCombo")

        self.formLayout_6.setWidget(2, QFormLayout.FieldRole, self.formatCombo)

        self.tabWidget = QTabWidget(EditRenderPreset_UI)
        self.tabWidget.setObjectName(u"tabWidget")
        self.video_tab = QWidget()
        self.video_tab.setObjectName(u"video_tab")
        self.verticalLayout_3 = QVBoxLayout(self.video_tab)
        self.verticalLayout_3.setObjectName(u"verticalLayout_3")
        self.verticalLayout_3.setContentsMargins(0, 0, 0, 0)
        self.scrollArea = QScrollArea(self.video_tab)
        self.scrollArea.setObjectName(u"scrollArea")
        sizePolicy = QSizePolicy(QSizePolicy.MinimumExpanding,
                                 QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.scrollArea.sizePolicy().hasHeightForWidth())
        self.scrollArea.setSizePolicy(sizePolicy)
        self.scrollArea.setFrameShape(QFrame.NoFrame)
        self.scrollArea.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
        self.scrollAreaWidgetContents = QWidget()
        self.scrollAreaWidgetContents.setObjectName(
            u"scrollAreaWidgetContents")
        self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 428, 650))
        self.formLayout_3 = QFormLayout(self.scrollAreaWidgetContents)
        self.formLayout_3.setObjectName(u"formLayout_3")
        self.formLayout_3.setContentsMargins(-1, -1, 40, -1)
        self.label_4 = QLabel(self.scrollAreaWidgetContents)
        self.label_4.setObjectName(u"label_4")

        self.formLayout_3.setWidget(0, QFormLayout.LabelRole, self.label_4)

        self.horizontalLayout_3 = QHBoxLayout()
        self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
        self.resWidth = QSpinBox(self.scrollAreaWidgetContents)
        self.resWidth.setObjectName(u"resWidth")
        self.resWidth.setMinimum(1)
        self.resWidth.setMaximum(8192)
        self.resWidth.setSingleStep(2)
        self.resWidth.setValue(1)

        self.horizontalLayout_3.addWidget(self.resWidth)

        self.label_9 = QLabel(self.scrollAreaWidgetContents)
        self.label_9.setObjectName(u"label_9")
        self.label_9.setMinimumSize(QSize(10, 0))
        self.label_9.setText(u"x")
        self.label_9.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_3.addWidget(self.label_9)

        self.resHeight = QSpinBox(self.scrollAreaWidgetContents)
        self.resHeight.setObjectName(u"resHeight")
        self.resHeight.setMinimum(1)
        self.resHeight.setMaximum(8192)
        self.resHeight.setSingleStep(2)

        self.horizontalLayout_3.addWidget(self.resHeight)

        self.linkResoultion = QToolButton(self.scrollAreaWidgetContents)
        self.linkResoultion.setObjectName(u"linkResoultion")
        icon = QIcon()
        iconThemeName = u"link"
        if QIcon.hasThemeIcon(iconThemeName):
            icon = QIcon.fromTheme(iconThemeName)
        else:
            icon.addFile(u".", QSize(), QIcon.Normal, QIcon.Off)

        self.linkResoultion.setIcon(icon)
        self.linkResoultion.setCheckable(True)
        self.linkResoultion.setAutoRaise(True)

        self.horizontalLayout_3.addWidget(self.linkResoultion)

        self.formLayout_3.setLayout(0, QFormLayout.FieldRole,
                                    self.horizontalLayout_3)

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

        self.formLayout_3.setWidget(1, QFormLayout.LabelRole, self.label_6)

        self.parCombo = QComboBox(self.scrollAreaWidgetContents)
        self.parCombo.setObjectName(u"parCombo")
        self.parCombo.setSizeAdjustPolicy(QComboBox.AdjustToContents)

        self.formLayout_3.setWidget(1, QFormLayout.FieldRole, self.parCombo)

        self.label_16 = QLabel(self.scrollAreaWidgetContents)
        self.label_16.setObjectName(u"label_16")

        self.formLayout_3.setWidget(2, QFormLayout.LabelRole, self.label_16)

        self.horizontalLayout_4 = QHBoxLayout()
        self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
        self.displayAspectNum = QSpinBox(self.scrollAreaWidgetContents)
        self.displayAspectNum.setObjectName(u"displayAspectNum")
        self.displayAspectNum.setMinimum(1)
        self.displayAspectNum.setMaximum(8192)

        self.horizontalLayout_4.addWidget(self.displayAspectNum)

        self.label_17 = QLabel(self.scrollAreaWidgetContents)
        self.label_17.setObjectName(u"label_17")
        self.label_17.setMinimumSize(QSize(10, 0))
        self.label_17.setText(u":")
        self.label_17.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_4.addWidget(self.label_17)

        self.displayAspectDen = QSpinBox(self.scrollAreaWidgetContents)
        self.displayAspectDen.setObjectName(u"displayAspectDen")
        self.displayAspectDen.setMinimum(1)
        self.displayAspectDen.setMaximum(8192)

        self.horizontalLayout_4.addWidget(self.displayAspectDen)

        self.formLayout_3.setLayout(2, QFormLayout.FieldRole,
                                    self.horizontalLayout_4)

        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.setObjectName(u"horizontalLayout")
        self.framerateNum = QSpinBox(self.scrollAreaWidgetContents)
        self.framerateNum.setObjectName(u"framerateNum")
        self.framerateNum.setMinimum(1)
        self.framerateNum.setMaximum(1000000)

        self.horizontalLayout.addWidget(self.framerateNum)

        self.label_8 = QLabel(self.scrollAreaWidgetContents)
        self.label_8.setObjectName(u"label_8")
        sizePolicy1 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
        sizePolicy1.setHorizontalStretch(0)
        sizePolicy1.setVerticalStretch(0)
        sizePolicy1.setHeightForWidth(
            self.label_8.sizePolicy().hasHeightForWidth())
        self.label_8.setSizePolicy(sizePolicy1)
        self.label_8.setMinimumSize(QSize(10, 0))
        self.label_8.setText(u"/")
        self.label_8.setAlignment(Qt.AlignCenter)

        self.horizontalLayout.addWidget(self.label_8)

        self.framerateDen = QSpinBox(self.scrollAreaWidgetContents)
        self.framerateDen.setObjectName(u"framerateDen")
        self.framerateDen.setMinimum(1)
        self.framerateDen.setMaximum(9999)

        self.horizontalLayout.addWidget(self.framerateDen)

        self.formLayout_3.setLayout(3, QFormLayout.FieldRole,
                                    self.horizontalLayout)

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

        self.formLayout_3.setWidget(3, QFormLayout.LabelRole, self.label_3)

        self.label_22 = QLabel(self.scrollAreaWidgetContents)
        self.label_22.setObjectName(u"label_22")

        self.formLayout_3.setWidget(4, QFormLayout.LabelRole, self.label_22)

        self.frameRateDisplay = QLabel(self.scrollAreaWidgetContents)
        self.frameRateDisplay.setObjectName(u"frameRateDisplay")
        self.frameRateDisplay.setEnabled(True)

        self.formLayout_3.setWidget(4, QFormLayout.FieldRole,
                                    self.frameRateDisplay)

        self.label_7 = QLabel(self.scrollAreaWidgetContents)
        self.label_7.setObjectName(u"label_7")

        self.formLayout_3.setWidget(5, QFormLayout.LabelRole, self.label_7)

        self.scanningCombo = QComboBox(self.scrollAreaWidgetContents)
        self.scanningCombo.addItem("")
        self.scanningCombo.addItem("")
        self.scanningCombo.setObjectName(u"scanningCombo")

        self.formLayout_3.setWidget(5, QFormLayout.FieldRole,
                                    self.scanningCombo)

        self.fieldOrderLabel = QLabel(self.scrollAreaWidgetContents)
        self.fieldOrderLabel.setObjectName(u"fieldOrderLabel")

        self.formLayout_3.setWidget(6, QFormLayout.LabelRole,
                                    self.fieldOrderLabel)

        self.fieldOrderCombo = QComboBox(self.scrollAreaWidgetContents)
        self.fieldOrderCombo.addItem("")
        self.fieldOrderCombo.addItem("")
        self.fieldOrderCombo.setObjectName(u"fieldOrderCombo")
        self.fieldOrderCombo.setSizeAdjustPolicy(QComboBox.AdjustToContents)

        self.formLayout_3.setWidget(6, QFormLayout.FieldRole,
                                    self.fieldOrderCombo)

        self.colorspaceLabel = QLabel(self.scrollAreaWidgetContents)
        self.colorspaceLabel.setObjectName(u"colorspaceLabel")
        self.colorspaceLabel.setEnabled(False)

        self.formLayout_3.setWidget(7, QFormLayout.LabelRole,
                                    self.colorspaceLabel)

        self.colorspaceCombo = QComboBox(self.scrollAreaWidgetContents)
        self.colorspaceCombo.setObjectName(u"colorspaceCombo")
        self.colorspaceCombo.setEnabled(False)

        self.formLayout_3.setWidget(7, QFormLayout.FieldRole,
                                    self.colorspaceCombo)

        self.vCodecCombo = QComboBox(self.scrollAreaWidgetContents)
        self.vCodecCombo.setObjectName(u"vCodecCombo")
        sizePolicy2 = QSizePolicy(QSizePolicy.MinimumExpanding,
                                  QSizePolicy.Fixed)
        sizePolicy2.setHorizontalStretch(0)
        sizePolicy2.setVerticalStretch(0)
        sizePolicy2.setHeightForWidth(
            self.vCodecCombo.sizePolicy().hasHeightForWidth())
        self.vCodecCombo.setSizePolicy(sizePolicy2)

        self.formLayout_3.setWidget(8, QFormLayout.FieldRole, self.vCodecCombo)

        self.vRateControlCombo = QComboBox(self.scrollAreaWidgetContents)
        self.vRateControlCombo.setObjectName(u"vRateControlCombo")
        sizePolicy2.setHeightForWidth(
            self.vRateControlCombo.sizePolicy().hasHeightForWidth())
        self.vRateControlCombo.setSizePolicy(sizePolicy2)

        self.formLayout_3.setWidget(9, QFormLayout.FieldRole,
                                    self.vRateControlCombo)

        self.label_24 = QLabel(self.scrollAreaWidgetContents)
        self.label_24.setObjectName(u"label_24")

        self.formLayout_3.setWidget(8, QFormLayout.LabelRole, self.label_24)

        self.label_12 = QLabel(self.scrollAreaWidgetContents)
        self.label_12.setObjectName(u"label_12")

        self.formLayout_3.setWidget(9, QFormLayout.LabelRole, self.label_12)

        self.default_vbitrate_label = QLabel(self.scrollAreaWidgetContents)
        self.default_vbitrate_label.setObjectName(u"default_vbitrate_label")

        self.formLayout_3.setWidget(10, QFormLayout.LabelRole,
                                    self.default_vbitrate_label)

        self.default_vbitrate = QSpinBox(self.scrollAreaWidgetContents)
        self.default_vbitrate.setObjectName(u"default_vbitrate")
        self.default_vbitrate.setMaximum(500000)

        self.formLayout_3.setWidget(10, QFormLayout.FieldRole,
                                    self.default_vbitrate)

        self.vBuffer_label = QLabel(self.scrollAreaWidgetContents)
        self.vBuffer_label.setObjectName(u"vBuffer_label")

        self.formLayout_3.setWidget(11, QFormLayout.LabelRole,
                                    self.vBuffer_label)

        self.vBuffer = QSpinBox(self.scrollAreaWidgetContents)
        self.vBuffer.setObjectName(u"vBuffer")
        self.vBuffer.setMaximum(9999)

        self.formLayout_3.setWidget(11, QFormLayout.FieldRole, self.vBuffer)

        self.vquality_label = QLabel(self.scrollAreaWidgetContents)
        self.vquality_label.setObjectName(u"vquality_label")

        self.formLayout_3.setWidget(12, QFormLayout.LabelRole,
                                    self.vquality_label)

        self.default_vquality = QSpinBox(self.scrollAreaWidgetContents)
        self.default_vquality.setObjectName(u"default_vquality")
        self.default_vquality.setMaximum(500000)

        self.formLayout_3.setWidget(12, QFormLayout.FieldRole,
                                    self.default_vquality)

        self.label_26 = QLabel(self.scrollAreaWidgetContents)
        self.label_26.setObjectName(u"label_26")

        self.formLayout_3.setWidget(13, QFormLayout.LabelRole, self.label_26)

        self.gopSpinner = QSpinBox(self.scrollAreaWidgetContents)
        self.gopSpinner.setObjectName(u"gopSpinner")
        self.gopSpinner.setMaximum(999)
        self.gopSpinner.setSingleStep(1)

        self.formLayout_3.setWidget(13, QFormLayout.FieldRole, self.gopSpinner)

        self.fixedGop = QCheckBox(self.scrollAreaWidgetContents)
        self.fixedGop.setObjectName(u"fixedGop")
        self.fixedGop.setEnabled(False)

        self.formLayout_3.setWidget(14, QFormLayout.FieldRole, self.fixedGop)

        self.bFramesSpinner = QSpinBox(self.scrollAreaWidgetContents)
        self.bFramesSpinner.setObjectName(u"bFramesSpinner")
        self.bFramesSpinner.setEnabled(False)
        self.bFramesSpinner.setMinimum(-1)
        self.bFramesSpinner.setMaximum(8)
        self.bFramesSpinner.setValue(-1)

        self.formLayout_3.setWidget(15, QFormLayout.FieldRole,
                                    self.bFramesSpinner)

        self.bFramesLabel = QLabel(self.scrollAreaWidgetContents)
        self.bFramesLabel.setObjectName(u"bFramesLabel")

        self.formLayout_3.setWidget(15, QFormLayout.LabelRole,
                                    self.bFramesLabel)

        self.scrollArea.setWidget(self.scrollAreaWidgetContents)

        self.verticalLayout_3.addWidget(self.scrollArea)

        self.tabWidget.addTab(self.video_tab, "")
        self.audio_tab = QWidget()
        self.audio_tab.setObjectName(u"audio_tab")
        self.formLayout_2 = QFormLayout(self.audio_tab)
        self.formLayout_2.setObjectName(u"formLayout_2")
        self.label_15 = QLabel(self.audio_tab)
        self.label_15.setObjectName(u"label_15")

        self.formLayout_2.setWidget(0, QFormLayout.LabelRole, self.label_15)

        self.audioChannels = QComboBox(self.audio_tab)
        self.audioChannels.setObjectName(u"audioChannels")

        self.formLayout_2.setWidget(0, QFormLayout.FieldRole,
                                    self.audioChannels)

        self.label_13 = QLabel(self.audio_tab)
        self.label_13.setObjectName(u"label_13")

        self.formLayout_2.setWidget(1, QFormLayout.LabelRole, self.label_13)

        self.aCodecCombo = QComboBox(self.audio_tab)
        self.aCodecCombo.setObjectName(u"aCodecCombo")

        self.formLayout_2.setWidget(1, QFormLayout.FieldRole, self.aCodecCombo)

        self.label_11 = QLabel(self.audio_tab)
        self.label_11.setObjectName(u"label_11")

        self.formLayout_2.setWidget(2, QFormLayout.LabelRole, self.label_11)

        self.horizontalLayout_5 = QHBoxLayout()
        self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
        self.audioSampleRate = QComboBox(self.audio_tab)
        self.audioSampleRate.addItem("")
        self.audioSampleRate.addItem("")
        self.audioSampleRate.addItem("")
        self.audioSampleRate.addItem("")
        self.audioSampleRate.addItem("")
        self.audioSampleRate.addItem("")
        self.audioSampleRate.addItem("")
        self.audioSampleRate.addItem("")
        self.audioSampleRate.setObjectName(u"audioSampleRate")
        self.audioSampleRate.setEditable(True)

        self.horizontalLayout_5.addWidget(self.audioSampleRate)

        self.label_20 = QLabel(self.audio_tab)
        self.label_20.setObjectName(u"label_20")

        self.horizontalLayout_5.addWidget(self.label_20)

        self.formLayout_2.setLayout(2, QFormLayout.FieldRole,
                                    self.horizontalLayout_5)

        self.label_14 = QLabel(self.audio_tab)
        self.label_14.setObjectName(u"label_14")

        self.formLayout_2.setWidget(3, QFormLayout.LabelRole, self.label_14)

        self.aRateControlCombo = QComboBox(self.audio_tab)
        self.aRateControlCombo.setObjectName(u"aRateControlCombo")

        self.formLayout_2.setWidget(3, QFormLayout.FieldRole,
                                    self.aRateControlCombo)

        self.label_18 = QLabel(self.audio_tab)
        self.label_18.setObjectName(u"label_18")

        self.formLayout_2.setWidget(4, QFormLayout.LabelRole, self.label_18)

        self.aBitrate = QSpinBox(self.audio_tab)
        self.aBitrate.setObjectName(u"aBitrate")
        self.aBitrate.setMaximum(500000)

        self.formLayout_2.setWidget(4, QFormLayout.FieldRole, self.aBitrate)

        self.label_19 = QLabel(self.audio_tab)
        self.label_19.setObjectName(u"label_19")

        self.formLayout_2.setWidget(5, QFormLayout.LabelRole, self.label_19)

        self.aQuality = QSpinBox(self.audio_tab)
        self.aQuality.setObjectName(u"aQuality")
        self.aQuality.setMaximum(500000)

        self.formLayout_2.setWidget(5, QFormLayout.FieldRole, self.aQuality)

        self.tabWidget.addTab(self.audio_tab, "")
        self.tab = QWidget()
        self.tab.setObjectName(u"tab")
        self.verticalLayout = QVBoxLayout(self.tab)
        self.verticalLayout.setObjectName(u"verticalLayout")
        self.speedsLabel = QLabel(self.tab)
        self.speedsLabel.setObjectName(u"speedsLabel")

        self.verticalLayout.addWidget(self.speedsLabel)

        self.speeds_list = QTextEdit(self.tab)
        self.speeds_list.setObjectName(u"speeds_list")
        self.speeds_list.setAcceptRichText(False)

        self.verticalLayout.addWidget(self.speeds_list)

        self.label = QLabel(self.tab)
        self.label.setObjectName(u"label")

        self.verticalLayout.addWidget(self.label)

        self.overrideParamsWarning = KMessageWidget(self.tab)
        self.overrideParamsWarning.setObjectName(u"overrideParamsWarning")
        self.overrideParamsWarning.setProperty("wordWrap", True)
        self.overrideParamsWarning.setProperty("closeButtonVisible", False)

        self.verticalLayout.addWidget(self.overrideParamsWarning)

        self.additionalParams = QPlainTextEdit(self.tab)
        self.additionalParams.setObjectName(u"additionalParams")

        self.verticalLayout.addWidget(self.additionalParams)

        self.parametersLabel = QLabel(self.tab)
        self.parametersLabel.setObjectName(u"parametersLabel")
        self.parametersLabel.setTextFormat(Qt.RichText)
        self.parametersLabel.setWordWrap(True)
        self.parametersLabel.setOpenExternalLinks(True)

        self.verticalLayout.addWidget(self.parametersLabel)

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

        self.formLayout_6.setWidget(4, QFormLayout.SpanningRole,
                                    self.tabWidget)

        self.parameters = QTextEdit(EditRenderPreset_UI)
        self.parameters.setObjectName(u"parameters")
        self.parameters.setReadOnly(True)
        self.parameters.setAcceptRichText(False)

        self.formLayout_6.setWidget(5, QFormLayout.SpanningRole,
                                    self.parameters)

        self.groupName = QComboBox(EditRenderPreset_UI)
        self.groupName.setObjectName(u"groupName")
        sizePolicy2.setHeightForWidth(
            self.groupName.sizePolicy().hasHeightForWidth())
        self.groupName.setSizePolicy(sizePolicy2)
        self.groupName.setEditable(True)
        self.groupName.setSizeAdjustPolicy(QComboBox.AdjustToContents)

        self.formLayout_6.setWidget(0, QFormLayout.FieldRole, self.groupName)

        self.mainBox.addLayout(self.formLayout_6)

        self.verticalLayout_2.addLayout(self.mainBox)

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

        self.verticalLayout_2.addWidget(self.buttonBox)

        self.retranslateUi(EditRenderPreset_UI)
        self.buttonBox.rejected.connect(EditRenderPreset_UI.reject)

        self.tabWidget.setCurrentIndex(0)

        QMetaObject.connectSlotsByName(EditRenderPreset_UI)

    # setupUi

    def retranslateUi(self, EditRenderPreset_UI):
        EditRenderPreset_UI.setWindowTitle(
            QCoreApplication.translate("EditRenderPreset_UI",
                                       u"Save Render Preset", None))
        self.groupLabel.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Group:", None))
        self.presetNameLabel.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Preset name:",
                                       None))
        self.label_2.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Container:",
                                       None))
        self.label_4.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Resolution:",
                                       None))
        self.linkResoultion.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"...", None))
        self.label_6.setText(
            QCoreApplication.translate("EditRenderPreset_UI",
                                       u"Pixel Aspect Ratio:", None))
        self.label_16.setText(
            QCoreApplication.translate("EditRenderPreset_UI",
                                       u"Display Aspect Ratio:", None))
        self.label_3.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Frame Rate:",
                                       None))
        self.label_22.setText(
            QCoreApplication.translate("EditRenderPreset_UI",
                                       u"Fields per Second:", None))
        self.frameRateDisplay.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Placeholder",
                                       None))
        self.label_7.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Scanning:",
                                       None))
        self.scanningCombo.setItemText(
            0,
            QCoreApplication.translate("EditRenderPreset_UI", u"Interlaced",
                                       None))
        self.scanningCombo.setItemText(
            1,
            QCoreApplication.translate("EditRenderPreset_UI", u"Progressive",
                                       None))

        self.fieldOrderLabel.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Field Order:",
                                       None))
        self.fieldOrderCombo.setItemText(
            0,
            QCoreApplication.translate("EditRenderPreset_UI",
                                       u"Bottom Field First", None))
        self.fieldOrderCombo.setItemText(
            1,
            QCoreApplication.translate("EditRenderPreset_UI",
                                       u"Top Field First", None))

        self.colorspaceLabel.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Colorspace:",
                                       None))
        self.label_24.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Codec:", None))
        self.label_12.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Rate Control:",
                                       None))
        self.default_vbitrate_label.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Bitrate:",
                                       None))
        self.default_vbitrate.setSuffix(
            QCoreApplication.translate("EditRenderPreset_UI", u"k", None))
        self.vBuffer_label.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Buffer Size:",
                                       None))
        self.vBuffer.setSuffix(
            QCoreApplication.translate("EditRenderPreset_UI", u" KiB", None))
        self.vquality_label.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Quality:",
                                       None))
        #if QT_CONFIG(tooltip)
        self.label_26.setToolTip(
            QCoreApplication.translate("EditRenderPreset_UI",
                                       u"GOP = Group of Pictures", None))
        #endif // QT_CONFIG(tooltip)
        self.label_26.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"GOP:", None))
        self.gopSpinner.setSpecialValueText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Auto", None))
        self.gopSpinner.setSuffix(
            QCoreApplication.translate("EditRenderPreset_UI", u" frame(s)",
                                       None))
        #if QT_CONFIG(tooltip)
        self.fixedGop.setToolTip(
            QCoreApplication.translate(
                "EditRenderPreset_UI",
                u"A fixed GOP means that keyframes will not be inserted at detected scene changes.",
                None))
        #endif // QT_CONFIG(tooltip)
        self.fixedGop.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Fixed", None))
        self.bFramesSpinner.setSpecialValueText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Auto", None))
        self.bFramesSpinner.setSuffix(
            QCoreApplication.translate("EditRenderPreset_UI", u" frame(s)",
                                       None))
        self.bFramesLabel.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"B Frames:",
                                       None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.video_tab),
            QCoreApplication.translate("EditRenderPreset_UI", u"Video", None))
        self.label_15.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Channels:",
                                       None))
        self.label_13.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Codec:", None))
        self.label_11.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Sample Rate:",
                                       None))
        self.audioSampleRate.setItemText(
            0, QCoreApplication.translate("EditRenderPreset_UI", u"8000",
                                          None))
        self.audioSampleRate.setItemText(
            1, QCoreApplication.translate("EditRenderPreset_UI", u"12000",
                                          None))
        self.audioSampleRate.setItemText(
            2, QCoreApplication.translate("EditRenderPreset_UI", u"16000",
                                          None))
        self.audioSampleRate.setItemText(
            3, QCoreApplication.translate("EditRenderPreset_UI", u"22050",
                                          None))
        self.audioSampleRate.setItemText(
            4, QCoreApplication.translate("EditRenderPreset_UI", u"32000",
                                          None))
        self.audioSampleRate.setItemText(
            5, QCoreApplication.translate("EditRenderPreset_UI", u"44100",
                                          None))
        self.audioSampleRate.setItemText(
            6, QCoreApplication.translate("EditRenderPreset_UI", u"48000",
                                          None))
        self.audioSampleRate.setItemText(
            7, QCoreApplication.translate("EditRenderPreset_UI", u"96000",
                                          None))

        self.label_20.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Hz", None))
        self.label_14.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Rate Control:",
                                       None))
        self.label_18.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Bitrate:",
                                       None))
        self.aBitrate.setSuffix(
            QCoreApplication.translate("EditRenderPreset_UI", u"k", None))
        self.label_19.setText(
            QCoreApplication.translate("EditRenderPreset_UI", u"Quality:",
                                       None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.audio_tab),
            QCoreApplication.translate("EditRenderPreset_UI", u"Audio", None))
        self.speedsLabel.setText(
            QCoreApplication.translate("EditRenderPreset_UI",
                                       u"Speed options:", None))
        #if QT_CONFIG(tooltip)
        self.speeds_list.setToolTip(
            QCoreApplication.translate(
                "EditRenderPreset_UI",
                u"One line of options per speedup step, from slowest to fastest",
                None))
        #endif // QT_CONFIG(tooltip)
        self.label.setText(
            QCoreApplication.translate("EditRenderPreset_UI",
                                       u"Additional Parameters:", None))
        self.parametersLabel.setText(
            QCoreApplication.translate(
                "EditRenderPreset_UI",
                u"<html><head/><body><p>See <a href=\"https://www.mltframework.org/plugins/ConsumerAvformat/\"><span style=\" text-decoration: underline; color:#2980b9;\">MLT documentation</span></a> for reference.</p></body></html>",
                None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.tab),
            QCoreApplication.translate("EditRenderPreset_UI", u"Other", None))
コード例 #10
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))
コード例 #11
0
class Setting_Ui(QWidget):
    def __init__(self, persepolis_setting):
        super().__init__()
        icon = QIcon()

        self.persepolis_setting = persepolis_setting

        # add support for other languages
        locale = str(self.persepolis_setting.value('settings/locale'))
        QLocale.setDefault(QLocale(locale))
        self.translator = QTranslator()
        if self.translator.load(':/translations/locales/ui_' + locale, 'ts'):
            QCoreApplication.installTranslator(self.translator)

        self.setWindowIcon(
            QIcon.fromTheme('persepolis', QIcon(':/persepolis.svg')))
        self.setWindowTitle(
            QCoreApplication.translate("setting_ui_tr", 'Preferences'))

        # set ui direction
        ui_direction = self.persepolis_setting.value('ui_direction')

        if ui_direction == 'rtl':
            self.setLayoutDirection(Qt.RightToLeft)

        elif ui_direction in 'ltr':
            self.setLayoutDirection(Qt.LeftToRight)

        global icons
        icons = ':/' + str(
            self.persepolis_setting.value('settings/icons')) + '/'

        # main layout
        window_verticalLayout = QVBoxLayout(self)

        # setting_tabWidget
        self.setting_tabWidget = QTabWidget(self)

        # download_options_tab
        self.download_options_tab = QWidget()
        download_options_tab_verticalLayout = QVBoxLayout(
            self.download_options_tab)
        download_options_tab_verticalLayout.setContentsMargins(21, 21, 0, 0)

        # tries
        tries_horizontalLayout = QHBoxLayout()

        self.tries_label = QLabel(self.download_options_tab)
        tries_horizontalLayout.addWidget(self.tries_label)

        self.tries_spinBox = QSpinBox(self.download_options_tab)
        self.tries_spinBox.setMinimum(1)

        tries_horizontalLayout.addWidget(self.tries_spinBox)
        download_options_tab_verticalLayout.addLayout(tries_horizontalLayout)

        # wait
        wait_horizontalLayout = QHBoxLayout()

        self.wait_label = QLabel(self.download_options_tab)
        wait_horizontalLayout.addWidget(self.wait_label)

        self.wait_spinBox = QSpinBox(self.download_options_tab)
        wait_horizontalLayout.addWidget(self.wait_spinBox)

        download_options_tab_verticalLayout.addLayout(wait_horizontalLayout)

        # time_out
        time_out_horizontalLayout = QHBoxLayout()

        self.time_out_label = QLabel(self.download_options_tab)
        time_out_horizontalLayout.addWidget(self.time_out_label)

        self.time_out_spinBox = QSpinBox(self.download_options_tab)
        time_out_horizontalLayout.addWidget(self.time_out_spinBox)

        download_options_tab_verticalLayout.addLayout(
            time_out_horizontalLayout)

        # connections
        connections_horizontalLayout = QHBoxLayout()

        self.connections_label = QLabel(self.download_options_tab)
        connections_horizontalLayout.addWidget(self.connections_label)

        self.connections_spinBox = QSpinBox(self.download_options_tab)
        self.connections_spinBox.setMinimum(1)
        self.connections_spinBox.setMaximum(16)
        connections_horizontalLayout.addWidget(self.connections_spinBox)

        download_options_tab_verticalLayout.addLayout(
            connections_horizontalLayout)

        # rpc_port
        self.rpc_port_label = QLabel(self.download_options_tab)
        self.rpc_horizontalLayout = QHBoxLayout()
        self.rpc_horizontalLayout.addWidget(self.rpc_port_label)

        self.rpc_port_spinbox = QSpinBox(self.download_options_tab)
        self.rpc_port_spinbox.setMinimum(1024)
        self.rpc_port_spinbox.setMaximum(65535)
        self.rpc_horizontalLayout.addWidget(self.rpc_port_spinbox)

        download_options_tab_verticalLayout.addLayout(
            self.rpc_horizontalLayout)

        # wait_queue
        wait_queue_horizontalLayout = QHBoxLayout()

        self.wait_queue_label = QLabel(self.download_options_tab)
        wait_queue_horizontalLayout.addWidget(self.wait_queue_label)

        self.wait_queue_time = MyQDateTimeEdit(self.download_options_tab)
        self.wait_queue_time.setDisplayFormat('H:mm')
        wait_queue_horizontalLayout.addWidget(self.wait_queue_time)

        download_options_tab_verticalLayout.addLayout(
            wait_queue_horizontalLayout)

        # don't check certificate checkBox
        self.dont_check_certificate_checkBox = QCheckBox(
            self.download_options_tab)
        download_options_tab_verticalLayout.addWidget(
            self.dont_check_certificate_checkBox)

        # change aria2 path
        aria2_path_verticalLayout = QVBoxLayout()

        self.aria2_path_checkBox = QCheckBox(self.download_options_tab)
        aria2_path_verticalLayout.addWidget(self.aria2_path_checkBox)

        aria2_path_horizontalLayout = QHBoxLayout()

        self.aria2_path_lineEdit = QLineEdit(self.download_options_tab)
        aria2_path_horizontalLayout.addWidget(self.aria2_path_lineEdit)

        self.aria2_path_pushButton = QPushButton(self.download_options_tab)
        aria2_path_horizontalLayout.addWidget(self.aria2_path_pushButton)

        aria2_path_verticalLayout.addLayout(aria2_path_horizontalLayout)

        download_options_tab_verticalLayout.addLayout(
            aria2_path_verticalLayout)

        download_options_tab_verticalLayout.addStretch(1)

        self.setting_tabWidget.addTab(self.download_options_tab, "")

        # save_as_tab
        self.save_as_tab = QWidget()

        save_as_tab_verticalLayout = QVBoxLayout(self.save_as_tab)
        save_as_tab_verticalLayout.setContentsMargins(20, 30, 0, 0)

        # download_folder
        self.download_folder_horizontalLayout = QHBoxLayout()

        self.download_folder_label = QLabel(self.save_as_tab)
        self.download_folder_horizontalLayout.addWidget(
            self.download_folder_label)

        self.download_folder_lineEdit = QLineEdit(self.save_as_tab)
        self.download_folder_horizontalLayout.addWidget(
            self.download_folder_lineEdit)

        self.download_folder_pushButton = QPushButton(self.save_as_tab)
        self.download_folder_horizontalLayout.addWidget(
            self.download_folder_pushButton)

        save_as_tab_verticalLayout.addLayout(
            self.download_folder_horizontalLayout)

        # temp_download_folder
        self.temp_horizontalLayout = QHBoxLayout()

        self.temp_download_label = QLabel(self.save_as_tab)
        self.temp_horizontalLayout.addWidget(self.temp_download_label)

        self.temp_download_lineEdit = QLineEdit(self.save_as_tab)
        self.temp_horizontalLayout.addWidget(self.temp_download_lineEdit)

        self.temp_download_pushButton = QPushButton(self.save_as_tab)
        self.temp_horizontalLayout.addWidget(self.temp_download_pushButton)

        save_as_tab_verticalLayout.addLayout(self.temp_horizontalLayout)

        # create subfolder
        self.subfolder_checkBox = QCheckBox(self.save_as_tab)
        save_as_tab_verticalLayout.addWidget(self.subfolder_checkBox)

        save_as_tab_verticalLayout.addStretch(1)

        self.setting_tabWidget.addTab(self.save_as_tab, "")

        # notifications_tab
        self.notifications_tab = QWidget()
        notification_tab_verticalLayout = QVBoxLayout(self.notifications_tab)
        notification_tab_verticalLayout.setContentsMargins(21, 21, 0, 0)

        self.enable_notifications_checkBox = QCheckBox(self.notifications_tab)
        notification_tab_verticalLayout.addWidget(
            self.enable_notifications_checkBox)

        self.sound_frame = QFrame(self.notifications_tab)
        self.sound_frame.setFrameShape(QFrame.StyledPanel)
        self.sound_frame.setFrameShadow(QFrame.Raised)

        verticalLayout = QVBoxLayout(self.sound_frame)

        self.volume_label = QLabel(self.sound_frame)
        verticalLayout.addWidget(self.volume_label)

        self.volume_dial = QDial(self.sound_frame)
        self.volume_dial.setProperty("value", 100)
        verticalLayout.addWidget(self.volume_dial)

        notification_tab_verticalLayout.addWidget(self.sound_frame)

        # message_notification
        message_notification_horizontalLayout = QHBoxLayout()
        self.notification_label = QLabel(self.notifications_tab)
        message_notification_horizontalLayout.addWidget(
            self.notification_label)

        self.notification_comboBox = QComboBox(self.notifications_tab)
        message_notification_horizontalLayout.addWidget(
            self.notification_comboBox)
        notification_tab_verticalLayout.addLayout(
            message_notification_horizontalLayout)

        notification_tab_verticalLayout.addStretch(1)

        self.setting_tabWidget.addTab(self.notifications_tab, "")

        # style_tab
        self.style_tab = QWidget()
        style_tab_verticalLayout = QVBoxLayout(self.style_tab)
        style_tab_verticalLayout.setContentsMargins(21, 21, 0, 0)

        # style
        style_horizontalLayout = QHBoxLayout()

        self.style_label = QLabel(self.style_tab)
        style_horizontalLayout.addWidget(self.style_label)

        self.style_comboBox = QComboBox(self.style_tab)
        style_horizontalLayout.addWidget(self.style_comboBox)

        style_tab_verticalLayout.addLayout(style_horizontalLayout)

        # language
        language_horizontalLayout = QHBoxLayout()

        self.lang_label = QLabel(self.style_tab)
        language_horizontalLayout.addWidget(self.lang_label)
        self.lang_comboBox = QComboBox(self.style_tab)
        language_horizontalLayout.addWidget(self.lang_comboBox)

        style_tab_verticalLayout.addLayout(language_horizontalLayout)
        language_horizontalLayout = QHBoxLayout()
        self.lang_label.setText(
            QCoreApplication.translate("setting_ui_tr", "Language: "))

        # color scheme
        self.color_label = QLabel(self.style_tab)
        language_horizontalLayout.addWidget(self.color_label)

        self.color_comboBox = QComboBox(self.style_tab)
        language_horizontalLayout.addWidget(self.color_comboBox)

        style_tab_verticalLayout.addLayout(language_horizontalLayout)

        # icons
        icons_horizontalLayout = QHBoxLayout()
        self.icon_label = QLabel(self.style_tab)
        icons_horizontalLayout.addWidget(self.icon_label)

        self.icon_comboBox = QComboBox(self.style_tab)
        icons_horizontalLayout.addWidget(self.icon_comboBox)

        style_tab_verticalLayout.addLayout(icons_horizontalLayout)

        self.icons_size_horizontalLayout = QHBoxLayout()
        self.icons_size_label = QLabel(self.style_tab)
        self.icons_size_horizontalLayout.addWidget(self.icons_size_label)

        self.icons_size_comboBox = QComboBox(self.style_tab)
        self.icons_size_horizontalLayout.addWidget(self.icons_size_comboBox)

        style_tab_verticalLayout.addLayout(self.icons_size_horizontalLayout)

        # font
        font_horizontalLayout = QHBoxLayout()
        self.font_checkBox = QCheckBox(self.style_tab)
        font_horizontalLayout.addWidget(self.font_checkBox)

        self.fontComboBox = QFontComboBox(self.style_tab)
        font_horizontalLayout.addWidget(self.fontComboBox)

        self.font_size_label = QLabel(self.style_tab)
        font_horizontalLayout.addWidget(self.font_size_label)

        self.font_size_spinBox = QSpinBox(self.style_tab)
        self.font_size_spinBox.setMinimum(1)
        font_horizontalLayout.addWidget(self.font_size_spinBox)

        style_tab_verticalLayout.addLayout(font_horizontalLayout)
        self.setting_tabWidget.addTab(self.style_tab, "")
        window_verticalLayout.addWidget(self.setting_tabWidget)

        # start persepolis in system tray if browser executed
        self.start_persepolis_if_browser_executed_checkBox = QCheckBox(
            self.style_tab)
        style_tab_verticalLayout.addWidget(
            self.start_persepolis_if_browser_executed_checkBox)

        # hide window if close button clicked
        self.hide_window_checkBox = QCheckBox(self.style_tab)
        style_tab_verticalLayout.addWidget(self.hide_window_checkBox)

        # Enable system tray icon
        self.enable_system_tray_checkBox = QCheckBox(self.style_tab)
        style_tab_verticalLayout.addWidget(self.enable_system_tray_checkBox)

        # after_download dialog
        self.after_download_checkBox = QCheckBox()
        style_tab_verticalLayout.addWidget(self.after_download_checkBox)

        # show_menubar_checkbox
        self.show_menubar_checkbox = QCheckBox()
        style_tab_verticalLayout.addWidget(self.show_menubar_checkbox)

        # show_sidepanel_checkbox
        self.show_sidepanel_checkbox = QCheckBox()
        style_tab_verticalLayout.addWidget(self.show_sidepanel_checkbox)

        # hide progress window
        self.show_progress_window_checkbox = QCheckBox()
        style_tab_verticalLayout.addWidget(self.show_progress_window_checkbox)

        # add persepolis to startup
        self.startup_checkbox = QCheckBox()
        style_tab_verticalLayout.addWidget(self.startup_checkbox)

        # keep system awake
        self.keep_awake_checkBox = QCheckBox()
        style_tab_verticalLayout.addWidget(self.keep_awake_checkBox)

        style_tab_verticalLayout.addStretch(1)

        # columns_tab
        self.columns_tab = QWidget()

        columns_tab_verticalLayout = QVBoxLayout(self.columns_tab)
        columns_tab_verticalLayout.setContentsMargins(21, 21, 0, 0)

        # creating checkBox for columns
        self.show_column_label = QLabel()
        self.column0_checkBox = QCheckBox()
        self.column1_checkBox = QCheckBox()
        self.column2_checkBox = QCheckBox()
        self.column3_checkBox = QCheckBox()
        self.column4_checkBox = QCheckBox()
        self.column5_checkBox = QCheckBox()
        self.column6_checkBox = QCheckBox()
        self.column7_checkBox = QCheckBox()
        self.column10_checkBox = QCheckBox()
        self.column11_checkBox = QCheckBox()
        self.column12_checkBox = QCheckBox()

        columns_tab_verticalLayout.addWidget(self.show_column_label)
        columns_tab_verticalLayout.addWidget(self.column0_checkBox)
        columns_tab_verticalLayout.addWidget(self.column1_checkBox)
        columns_tab_verticalLayout.addWidget(self.column2_checkBox)
        columns_tab_verticalLayout.addWidget(self.column3_checkBox)
        columns_tab_verticalLayout.addWidget(self.column4_checkBox)
        columns_tab_verticalLayout.addWidget(self.column5_checkBox)
        columns_tab_verticalLayout.addWidget(self.column6_checkBox)
        columns_tab_verticalLayout.addWidget(self.column7_checkBox)
        columns_tab_verticalLayout.addWidget(self.column10_checkBox)
        columns_tab_verticalLayout.addWidget(self.column11_checkBox)
        columns_tab_verticalLayout.addWidget(self.column12_checkBox)

        columns_tab_verticalLayout.addStretch(1)

        self.setting_tabWidget.addTab(self.columns_tab, '')

        # video_finder_tab
        self.video_finder_tab = QWidget()

        video_finder_layout = QVBoxLayout(self.video_finder_tab)
        video_finder_layout.setContentsMargins(21, 21, 0, 0)

        video_finder_tab_verticalLayout = QVBoxLayout()

        max_links_horizontalLayout = QHBoxLayout()

        # max_links_label
        self.max_links_label = QLabel(self.video_finder_tab)

        max_links_horizontalLayout.addWidget(self.max_links_label)

        # max_links_spinBox
        self.max_links_spinBox = QSpinBox(self.video_finder_tab)
        self.max_links_spinBox.setMinimum(1)
        self.max_links_spinBox.setMaximum(16)
        max_links_horizontalLayout.addWidget(self.max_links_spinBox)
        video_finder_tab_verticalLayout.addLayout(max_links_horizontalLayout)

        self.video_finder_dl_path_horizontalLayout = QHBoxLayout()

        self.video_finder_frame = QFrame(self.video_finder_tab)
        self.video_finder_frame.setLayout(video_finder_tab_verticalLayout)

        video_finder_tab_verticalLayout.addStretch(1)

        video_finder_layout.addWidget(self.video_finder_frame)

        self.setting_tabWidget.addTab(self.video_finder_tab, "")

        # shortcut tab
        self.shortcut_tab = QWidget()
        shortcut_tab_verticalLayout = QVBoxLayout(self.shortcut_tab)
        shortcut_tab_verticalLayout.setContentsMargins(21, 21, 0, 0)

        # shortcut_table
        self.shortcut_table = QTableWidget(self)
        self.shortcut_table.setColumnCount(2)
        self.shortcut_table.setSelectionBehavior(QAbstractItemView.SelectRows)
        self.shortcut_table.setSelectionMode(QAbstractItemView.SingleSelection)
        self.shortcut_table.setEditTriggers(QAbstractItemView.NoEditTriggers)
        self.shortcut_table.verticalHeader().hide()

        shortcut_table_header = [
            QCoreApplication.translate("setting_ui_tr", 'Action'),
            QCoreApplication.translate("setting_ui_tr", 'Shortcut')
        ]

        self.shortcut_table.setHorizontalHeaderLabels(shortcut_table_header)

        shortcut_tab_verticalLayout.addWidget(self.shortcut_table)

        self.setting_tabWidget.addTab(
            self.shortcut_tab,
            QCoreApplication.translate("setting_ui_tr", "Shortcuts"))

        # Actions
        actions_list = [
            QCoreApplication.translate('setting_ui_tr', 'Quit'),
            QCoreApplication.translate('setting_ui_tr',
                                       'Minimize to System Tray'),
            QCoreApplication.translate('setting_ui_tr',
                                       'Remove Download Items'),
            QCoreApplication.translate('setting_ui_tr',
                                       'Delete Download Items'),
            QCoreApplication.translate('setting_ui_tr',
                                       'Move Selected Items Up'),
            QCoreApplication.translate('setting_ui_tr',
                                       'Move Selected Items Down'),
            QCoreApplication.translate('setting_ui_tr',
                                       'Add New Download Link'),
            QCoreApplication.translate('setting_ui_tr', 'Add New Video Link'),
            QCoreApplication.translate('setting_ui_tr',
                                       'Import Links from Text File')
        ]

        # add actions to the shortcut_table
        j = 0
        for action in actions_list:
            item = QTableWidgetItem(str(action))

            # align center
            item.setTextAlignment(0x0004 | 0x0080)

            # insert item in shortcut_table
            self.shortcut_table.insertRow(j)
            self.shortcut_table.setItem(j, 0, item)

            j = j + 1

        self.shortcut_table.resizeColumnsToContents()

        # window buttons
        buttons_horizontalLayout = QHBoxLayout()
        buttons_horizontalLayout.addStretch(1)

        self.defaults_pushButton = QPushButton(self)
        buttons_horizontalLayout.addWidget(self.defaults_pushButton)

        self.cancel_pushButton = QPushButton(self)
        self.cancel_pushButton.setIcon(QIcon(icons + 'remove'))
        buttons_horizontalLayout.addWidget(self.cancel_pushButton)

        self.ok_pushButton = QPushButton(self)
        self.ok_pushButton.setIcon(QIcon(icons + 'ok'))
        buttons_horizontalLayout.addWidget(self.ok_pushButton)

        window_verticalLayout.addLayout(buttons_horizontalLayout)

        # set style_tab for default
        self.setting_tabWidget.setCurrentIndex(3)

        # labels and translations
        self.setWindowTitle(
            QCoreApplication.translate("setting_ui_tr", "Preferences"))

        self.tries_label.setToolTip(
            QCoreApplication.translate(
                "setting_ui_tr",
                "<html><head/><body><p>Set number of tries if download failed.</p></body></html>"
            ))
        self.tries_label.setText(
            QCoreApplication.translate("setting_ui_tr", "Number of tries: "))
        self.tries_spinBox.setToolTip(
            QCoreApplication.translate(
                "setting_ui_tr",
                "<html><head/><body><p>Set number of tries if download failed.</p></body></html>"
            ))

        self.wait_label.setToolTip(
            QCoreApplication.translate(
                "setting_ui_tr",
                "<html><head/><body><p>Set the seconds to wait between retries. Download manager will  retry  downloads  when  the  HTTP  server  returns  a  503 response.</p></body></html>"
            ))
        self.wait_label.setText(
            QCoreApplication.translate(
                "setting_ui_tr", "Wait period between retries (seconds): "))
        self.wait_spinBox.setToolTip(
            QCoreApplication.translate(
                "setting_ui_tr",
                "<html><head/><body><p>Set the seconds to wait between retries. Download manager will  retry  downloads  when  the  HTTP  server  returns  a  503 response.</p></body></html>"
            ))

        self.time_out_label.setToolTip(
            QCoreApplication.translate(
                "setting_ui_tr",
                "<html><head/><body><p>Set timeout in seconds. </p></body></html>"
            ))
        self.time_out_label.setText(
            QCoreApplication.translate("setting_ui_tr", "Timeout (seconds): "))
        self.time_out_spinBox.setToolTip(
            QCoreApplication.translate(
                "setting_ui_tr",
                "<html><head/><body><p>Set timeout in seconds. </p></body></html>"
            ))

        self.connections_label.setToolTip(
            QCoreApplication.translate(
                "setting_ui_tr",
                "<html><head/><body><p>Using multiple connections can help speed up your download.</p></body></html>"
            ))
        self.connections_label.setText(
            QCoreApplication.translate("setting_ui_tr",
                                       "Number of connections: "))
        self.connections_spinBox.setToolTip(
            QCoreApplication.translate(
                "setting_ui_tr",
                "<html><head/><body><p>Using multiple connections can help speed up your download.</p></body></html>"
            ))

        self.rpc_port_label.setText(
            QCoreApplication.translate("setting_ui_tr", "RPC port number: "))
        self.rpc_port_spinbox.setToolTip(
            QCoreApplication.translate(
                "setting_ui_tr",
                "<html><head/><body><p> Specify a port number for JSON-RPC/XML-RPC server to listen to. Possible Values: 1024 - 65535 Default: 6801 </p></body></html>"
            ))

        self.wait_queue_label.setText(
            QCoreApplication.translate(
                "setting_ui_tr",
                'Wait period between each download in queue:'))

        self.dont_check_certificate_checkBox.setText(
            QCoreApplication.translate(
                "setting_ui_tr", "Don't use certificate to verify the peers"))
        self.dont_check_certificate_checkBox.setToolTip(
            QCoreApplication.translate(
                "setting_ui_tr",
                "<html><head/><body><p>This option avoids SSL/TLS handshake failure. But use it at your own risk!</p></body></html>"
            ))

        self.aria2_path_checkBox.setText(
            QCoreApplication.translate("setting_ui_tr",
                                       'Change Aria2 default path'))
        self.aria2_path_pushButton.setText(
            QCoreApplication.translate("setting_ui_tr", 'Change'))
        aria2_path_tooltip = QCoreApplication.translate(
            "setting_ui_tr",
            "<html><head/><body><p>Attention: Wrong path may cause problems! Do it carefully or don't change default setting!</p></body></html>"
        )
        self.aria2_path_checkBox.setToolTip(aria2_path_tooltip)
        self.aria2_path_lineEdit.setToolTip(aria2_path_tooltip)
        self.aria2_path_pushButton.setToolTip(aria2_path_tooltip)

        self.setting_tabWidget.setTabText(
            self.setting_tabWidget.indexOf(self.download_options_tab),
            QCoreApplication.translate("setting_ui_tr", "Download Options"))

        self.download_folder_label.setText(
            QCoreApplication.translate("setting_ui_tr", "Download folder: "))
        self.download_folder_pushButton.setText(
            QCoreApplication.translate("setting_ui_tr", "Change"))

        self.temp_download_label.setText(
            QCoreApplication.translate("setting_ui_tr",
                                       "Temporary download folder: "))
        self.temp_download_pushButton.setText(
            QCoreApplication.translate("setting_ui_tr", "Change"))

        self.subfolder_checkBox.setText(
            QCoreApplication.translate(
                "setting_ui_tr",
                "Create subfolders for Music,Videos, ... in default download folder"
            ))

        self.setting_tabWidget.setTabText(
            self.setting_tabWidget.indexOf(self.save_as_tab),
            QCoreApplication.translate("setting_ui_tr", "Save As"))

        self.enable_notifications_checkBox.setText(
            QCoreApplication.translate("setting_ui_tr",
                                       "Enable Notification Sounds"))

        self.volume_label.setText(
            QCoreApplication.translate("setting_ui_tr", "Volume: "))

        self.setting_tabWidget.setTabText(
            self.setting_tabWidget.indexOf(self.notifications_tab),
            QCoreApplication.translate("setting_ui_tr", "Notifications"))

        self.style_label.setText(
            QCoreApplication.translate("setting_ui_tr", "Style: "))
        self.color_label.setText(
            QCoreApplication.translate("setting_ui_tr", "Color scheme: "))
        self.icon_label.setText(
            QCoreApplication.translate("setting_ui_tr", "Icons: "))

        self.icons_size_label.setText(
            QCoreApplication.translate("setting_ui_tr",
                                       "Toolbar icons size: "))

        self.notification_label.setText(
            QCoreApplication.translate("setting_ui_tr", "Notification type: "))

        self.font_checkBox.setText(
            QCoreApplication.translate("setting_ui_tr", "Font: "))
        self.font_size_label.setText(
            QCoreApplication.translate("setting_ui_tr", "Size: "))

        self.hide_window_checkBox.setText(
            QCoreApplication.translate(
                "setting_ui_tr", "Hide main window if close button clicked."))
        self.hide_window_checkBox.setToolTip(
            QCoreApplication.translate(
                "setting_ui_tr",
                "<html><head/><body><p>This feature may not work in your operating system.</p></body></html>"
            ))

        self.start_persepolis_if_browser_executed_checkBox.setText(
            QCoreApplication.translate(
                'setting_ui_tr',
                'If browser is opened, start Persepolis in system tray'))

        self.enable_system_tray_checkBox.setText(
            QCoreApplication.translate("setting_ui_tr",
                                       "Enable system tray icon"))

        self.after_download_checkBox.setText(
            QCoreApplication.translate(
                "setting_ui_tr",
                "Show download complete dialog when download is finished"))

        self.show_menubar_checkbox.setText(
            QCoreApplication.translate("setting_ui_tr", "Show menubar"))
        self.show_sidepanel_checkbox.setText(
            QCoreApplication.translate("setting_ui_tr", "Show side panel"))
        self.show_progress_window_checkbox.setText(
            QCoreApplication.translate("setting_ui_tr",
                                       "Show download progress window"))

        self.startup_checkbox.setText(
            QCoreApplication.translate("setting_ui_tr",
                                       "Run Persepolis at startup"))

        self.keep_awake_checkBox.setText(
            QCoreApplication.translate("setting_ui_tr", "Keep system awake!"))
        self.keep_awake_checkBox.setToolTip(
            QCoreApplication.translate(
                "setting_ui_tr",
                "<html><head/><body><p>This option will prevent the system from going to sleep.\
            It is necessary if your power manager is suspending the system automatically. </p></body></html>"
            ))

        self.wait_queue_time.setToolTip(
            QCoreApplication.translate(
                "setting_ui_tr",
                "<html><head/><body><p>Format HH:MM</p></body></html>"))

        self.setting_tabWidget.setTabText(
            self.setting_tabWidget.indexOf(self.style_tab),
            QCoreApplication.translate("setting_ui_tr", "Preferences"))

        # columns_tab
        self.show_column_label.setText(
            QCoreApplication.translate("setting_ui_tr", 'Show these columns:'))
        self.column0_checkBox.setText(
            QCoreApplication.translate("setting_ui_tr", 'File Name'))
        self.column1_checkBox.setText(
            QCoreApplication.translate("setting_ui_tr", 'Status'))
        self.column2_checkBox.setText(
            QCoreApplication.translate("setting_ui_tr", 'Size'))
        self.column3_checkBox.setText(
            QCoreApplication.translate("setting_ui_tr", 'Downloaded'))
        self.column4_checkBox.setText(
            QCoreApplication.translate("setting_ui_tr", 'Percentage'))
        self.column5_checkBox.setText(
            QCoreApplication.translate("setting_ui_tr", 'Connections'))
        self.column6_checkBox.setText(
            QCoreApplication.translate("setting_ui_tr", 'Transfer Rate'))
        self.column7_checkBox.setText(
            QCoreApplication.translate("setting_ui_tr", 'Estimated Time Left'))
        self.column10_checkBox.setText(
            QCoreApplication.translate("setting_ui_tr", 'First Try Date'))
        self.column11_checkBox.setText(
            QCoreApplication.translate("setting_ui_tr", 'Last Try Date'))
        self.column12_checkBox.setText(
            QCoreApplication.translate("setting_ui_tr", 'Category'))

        self.setting_tabWidget.setTabText(
            self.setting_tabWidget.indexOf(self.columns_tab),
            QCoreApplication.translate("setting_ui_tr",
                                       "Columns Customization"))

        # Video Finder options tab
        self.setting_tabWidget.setTabText(
            self.setting_tabWidget.indexOf(self.video_finder_tab),
            QCoreApplication.translate("setting_ui_tr",
                                       "Video Finder Options"))

        self.max_links_label.setText(
            QCoreApplication.translate(
                "setting_ui_tr", 'Maximum number of links to capture:<br/>'
                '<small>(If browser sends multiple video links at a time)</small>'
            ))

        # window buttons
        self.defaults_pushButton.setText(
            QCoreApplication.translate("setting_ui_tr", "Defaults"))
        self.cancel_pushButton.setText(
            QCoreApplication.translate("setting_ui_tr", "Cancel"))
        self.ok_pushButton.setText(
            QCoreApplication.translate("setting_ui_tr", "OK"))
コード例 #12
0
ファイル: RigViewer.py プロジェクト: jono-m/uChip
class DeviceItem(QWidget):
    numberChanged = Signal()

    def __init__(self, device: RigDevice):
        super().__init__()

        self.device = device

        self._nameLabel = QLabel(device.serialNumber)
        self._statusLabel = QLabel("")
        self._startNumberDial = QSpinBox()
        self._startNumberDial.setMinimum(0)
        self._startNumberDial.setMaximum(9999)
        self._startNumberDial.setValue(device.startNumber)
        self._startNumberDial.valueChanged.connect(self.SetStartNumber)

        self._enableToggle = QToolButton()
        self._enableToggle.clicked.connect(self.ToggleEnable)
        self._enableToggle.setText("Disable")

        self._layout = QHBoxLayout()
        self.setLayout(self._layout)

        self._layout.addWidget(self._nameLabel, stretch=1)
        self._layout.addWidget(self._statusLabel, stretch=1)
        self._layout.addWidget(self._enableToggle)
        self._layout.addWidget(self._startNumberDial)
        self._layout.addStretch(1)

        solenoidLabelLayout = QVBoxLayout()
        solenoidLabelLayout.addWidget(QLabel("State"), alignment=Qt.AlignRight)
        solenoidLabelLayout.addWidget(QLabel("Invert"),
                                      alignment=Qt.AlignRight)

        self._layout.addLayout(solenoidLabelLayout)
        self._layout.addSpacing(5)

        self._solenoidButtons: List[SolenoidButton] = []
        for solenoidNumber in range(24):
            newButton = SolenoidButton(
                solenoidNumber, device.solenoidPolarities[solenoidNumber])
            newButton.solenoidClicked.connect(
                lambda s=newButton: self.ToggleSolenoid(s))
            newButton.polarityClicked.connect(
                lambda s=newButton: self.TogglePolarity(s))
            self._solenoidButtons.append(newButton)
            self._layout.addWidget(newButton, stretch=0)

        self.Update()

    def SetStartNumber(self):
        self.device.startNumber = self._startNumberDial.value()
        self.Update()
        self.numberChanged.emit()

    def ToggleEnable(self):
        self.device.SetEnabled(not self.device.isEnabled)
        self.Update()

    def ToggleSolenoid(self, button: 'SolenoidButton'):
        index = self._solenoidButtons.index(button)
        AppGlobals.Rig().SetSolenoidState(
            self.device.startNumber + index,
            not AppGlobals.Rig().GetSolenoidState(self.device.startNumber +
                                                  index))
        AppGlobals.Rig().FlushStates()
        self.Update()

    def TogglePolarity(self, button: 'SolenoidButton'):
        index = self._solenoidButtons.index(button)
        self.device.solenoidPolarities[
            index] = not self.device.solenoidPolarities[index]
        AppGlobals.Rig().FlushStates()
        self.Update()

    def Update(self):
        if not self.device.IsDeviceAvailable():
            self.deleteLater()
            return

        if self.device.isConnected:
            self._statusLabel.setText("Connected.")
        else:
            if self.device.isEnabled:
                self._statusLabel.setText(self.device.errorMessage)
            else:
                self._statusLabel.setText("Disabled.")

        self._enableToggle.setText({
            False: "Enable",
            True: "Disable"
        }[self.device.isEnabled])
        self._startNumberDial.setEnabled(self.device.isEnabled
                                         and self.device.isConnected)
        for i in range(24):
            self._solenoidButtons[i].setEnabled(self.device.isConnected
                                                and self.device.isEnabled)
            self._solenoidButtons[i].Update(self.device.startNumber + i,
                                            self.device.solenoidPolarities[i])
コード例 #13
0
class Ui_opsWidget(object):
    def setupUi(self, opsWidget):
        if not opsWidget.objectName():
            opsWidget.setObjectName(u"opsWidget")
        opsWidget.resize(484, 788)
        self.opLayout = QVBoxLayout(opsWidget)
        self.opLayout.setObjectName(u"opLayout")
        self.operationSelect = QGroupBox(opsWidget)
        self.operationSelect.setObjectName(u"operationSelect")
        self.operationSelect.setEnabled(True)
        self.operationSelect.setFlat(True)
        self.verticalLayout_3 = QVBoxLayout(self.operationSelect)
        self.verticalLayout_3.setSpacing(10)
        self.verticalLayout_3.setObjectName(u"verticalLayout_3")
        self.verticalLayout_3.setContentsMargins(4, 4, 4, 4)
        self.formLayout = QFormLayout()
        self.formLayout.setObjectName(u"formLayout")
        self.formLayout.setVerticalSpacing(10)
        self.formLayout.setContentsMargins(5, 20, 5, 20)
        self.applyOpLabel = QLabel(self.operationSelect)
        self.applyOpLabel.setObjectName(u"applyOpLabel")

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

        self.opCombo = QComboBox(self.operationSelect)
        self.opCombo.addItem("")
        self.opCombo.addItem("")
        self.opCombo.addItem("")
        self.opCombo.addItem("")
        self.opCombo.addItem("")
        self.opCombo.addItem("")
        self.opCombo.addItem("")
        self.opCombo.addItem("")
        self.opCombo.addItem("")
        self.opCombo.addItem("")
        self.opCombo.setObjectName(u"opCombo")
        self.opCombo.setEnabled(True)

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

        self.applyToLabel = QLabel(self.operationSelect)
        self.applyToLabel.setObjectName(u"applyToLabel")

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

        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.setObjectName(u"horizontalLayout")
        self.verticalLayout_18 = QVBoxLayout()
        self.verticalLayout_18.setObjectName(u"verticalLayout_18")
        self.horizontalLayout_2 = QHBoxLayout()
        self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
        self.allDemoCheck = QCheckBox(self.operationSelect)
        self.allDemoCheck.setObjectName(u"allDemoCheck")
        self.allDemoCheck.setMaximumSize(QSize(10000, 16777215))

        self.horizontalLayout_2.addWidget(self.allDemoCheck)

        self.allStepsCheck = QCheckBox(self.operationSelect)
        self.allStepsCheck.setObjectName(u"allStepsCheck")
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.allStepsCheck.sizePolicy().hasHeightForWidth())
        self.allStepsCheck.setSizePolicy(sizePolicy)
        self.allStepsCheck.setMinimumSize(QSize(180, 0))
        self.allStepsCheck.setLayoutDirection(Qt.LeftToRight)

        self.horizontalLayout_2.addWidget(self.allStepsCheck)

        self.verticalLayout_18.addLayout(self.horizontalLayout_2)

        self.matchSubstringCheck = QCheckBox(self.operationSelect)
        self.matchSubstringCheck.setObjectName(u"matchSubstringCheck")

        self.verticalLayout_18.addWidget(self.matchSubstringCheck)

        self.horizontalLayout_13 = QHBoxLayout()
        self.horizontalLayout_13.setObjectName(u"horizontalLayout_13")
        self.label_16 = QLabel(self.operationSelect)
        self.label_16.setObjectName(u"label_16")
        self.label_16.setEnabled(False)

        self.horizontalLayout_13.addWidget(self.label_16)

        self.matchSubstringText = QLineEdit(self.operationSelect)
        self.matchSubstringText.setObjectName(u"matchSubstringText")
        self.matchSubstringText.setEnabled(False)

        self.horizontalLayout_13.addWidget(self.matchSubstringText)

        self.verticalLayout_18.addLayout(self.horizontalLayout_13)

        self.horizontalLayout.addLayout(self.verticalLayout_18)

        self.formLayout.setLayout(2, QFormLayout.FieldRole,
                                  self.horizontalLayout)

        self.applyDemoLabel = QLabel(self.operationSelect)
        self.applyDemoLabel.setObjectName(u"applyDemoLabel")

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

        self.demoTargetCombo = QComboBox(self.operationSelect)
        self.demoTargetCombo.setObjectName(u"demoTargetCombo")

        self.formLayout.setWidget(0, QFormLayout.FieldRole,
                                  self.demoTargetCombo)

        self.verticalLayout_3.addLayout(self.formLayout)

        self.opLayout.addWidget(self.operationSelect)

        self.groupBox_6 = QGroupBox(opsWidget)
        self.groupBox_6.setObjectName(u"groupBox_6")
        self.groupBox_6.setEnabled(True)
        self.groupBox_6.setFlat(True)
        self.verticalLayout = QVBoxLayout(self.groupBox_6)
        self.verticalLayout.setObjectName(u"verticalLayout")
        self.verticalLayout.setContentsMargins(4, 4, 4, 4)
        self.opsParamsStack = QStackedWidget(self.groupBox_6)
        self.opsParamsStack.setObjectName(u"opsParamsStack")
        self.opsParamsStack.setAutoFillBackground(False)
        self.shellTab = QWidget()
        self.shellTab.setObjectName(u"shellTab")
        self.shellTab.setAutoFillBackground(False)
        self.formLayout_2 = QFormLayout(self.shellTab)
        self.formLayout_2.setObjectName(u"formLayout_2")
        self.formLayout_2.setLabelAlignment(Qt.AlignLeading | Qt.AlignLeft
                                            | Qt.AlignVCenter)
        self.formLayout_2.setFormAlignment(Qt.AlignLeading | Qt.AlignLeft
                                           | Qt.AlignVCenter)
        self.formLayout_2.setVerticalSpacing(40)
        self.formLayout_2.setContentsMargins(-1, 11, -1, -1)
        self.label = QLabel(self.shellTab)
        self.label.setObjectName(u"label")

        self.formLayout_2.setWidget(0, QFormLayout.LabelRole, self.label)

        self.horizontalLayout_4 = QHBoxLayout()
        self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
        self.shellImgPath = QLineEdit(self.shellTab)
        self.shellImgPath.setObjectName(u"shellImgPath")

        self.horizontalLayout_4.addWidget(self.shellImgPath)

        self.shellBrowseImgBtn = QPushButton(self.shellTab)
        self.shellBrowseImgBtn.setObjectName(u"shellBrowseImgBtn")

        self.horizontalLayout_4.addWidget(self.shellBrowseImgBtn)

        self.formLayout_2.setLayout(0, QFormLayout.FieldRole,
                                    self.horizontalLayout_4)

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

        self.formLayout_2.setWidget(1, QFormLayout.LabelRole, self.label_2)

        self.horizontalLayout_7 = QHBoxLayout()
        self.horizontalLayout_7.setObjectName(u"horizontalLayout_7")
        self.label_3 = QLabel(self.shellTab)
        self.label_3.setObjectName(u"label_3")
        self.label_3.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_7.addWidget(self.label_3)

        self.shellFgX = QSpinBox(self.shellTab)
        self.shellFgX.setObjectName(u"shellFgX")
        self.shellFgX.setMaximum(100000000)

        self.horizontalLayout_7.addWidget(self.shellFgX)

        self.label_4 = QLabel(self.shellTab)
        self.label_4.setObjectName(u"label_4")
        self.label_4.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_7.addWidget(self.label_4)

        self.shellFgY = QSpinBox(self.shellTab)
        self.shellFgY.setObjectName(u"shellFgY")
        self.shellFgY.setMaximum(100000000)

        self.horizontalLayout_7.addWidget(self.shellFgY)

        self.formLayout_2.setLayout(1, QFormLayout.FieldRole,
                                    self.horizontalLayout_7)

        self.label_5 = QLabel(self.shellTab)
        self.label_5.setObjectName(u"label_5")

        self.formLayout_2.setWidget(2, QFormLayout.LabelRole, self.label_5)

        self.horizontalLayout_8 = QHBoxLayout()
        self.horizontalLayout_8.setObjectName(u"horizontalLayout_8")
        self.label_7 = QLabel(self.shellTab)
        self.label_7.setObjectName(u"label_7")
        self.label_7.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_8.addWidget(self.label_7)

        self.shellFgW = QSpinBox(self.shellTab)
        self.shellFgW.setObjectName(u"shellFgW")
        self.shellFgW.setMaximum(100000000)

        self.horizontalLayout_8.addWidget(self.shellFgW)

        self.label_6 = QLabel(self.shellTab)
        self.label_6.setObjectName(u"label_6")
        self.label_6.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_8.addWidget(self.label_6)

        self.shellFgH = QSpinBox(self.shellTab)
        self.shellFgH.setObjectName(u"shellFgH")
        self.shellFgH.setMaximum(10000000)

        self.horizontalLayout_8.addWidget(self.shellFgH)

        self.formLayout_2.setLayout(2, QFormLayout.FieldRole,
                                    self.horizontalLayout_8)

        self.opsParamsStack.addWidget(self.shellTab)
        self.insertTab = QWidget()
        self.insertTab.setObjectName(u"insertTab")
        self.formLayout_3 = QFormLayout(self.insertTab)
        self.formLayout_3.setObjectName(u"formLayout_3")
        self.formLayout_3.setVerticalSpacing(40)
        self.formLayout_3.setContentsMargins(-1, 40, -1, -1)
        self.label_32 = QLabel(self.insertTab)
        self.label_32.setObjectName(u"label_32")

        self.formLayout_3.setWidget(0, QFormLayout.LabelRole, self.label_32)

        self.horizontalLayout_20 = QHBoxLayout()
        self.horizontalLayout_20.setObjectName(u"horizontalLayout_20")
        self.insertImgPath = QLineEdit(self.insertTab)
        self.insertImgPath.setObjectName(u"insertImgPath")

        self.horizontalLayout_20.addWidget(self.insertImgPath)

        self.insertBrowseImgBtn = QPushButton(self.insertTab)
        self.insertBrowseImgBtn.setObjectName(u"insertBrowseImgBtn")

        self.horizontalLayout_20.addWidget(self.insertBrowseImgBtn)

        self.formLayout_3.setLayout(0, QFormLayout.FieldRole,
                                    self.horizontalLayout_20)

        self.label_13 = QLabel(self.insertTab)
        self.label_13.setObjectName(u"label_13")

        self.formLayout_3.setWidget(1, QFormLayout.LabelRole, self.label_13)

        self.horizontalLayout_18 = QHBoxLayout()
        self.horizontalLayout_18.setObjectName(u"horizontalLayout_18")
        self.label_26 = QLabel(self.insertTab)
        self.label_26.setObjectName(u"label_26")
        self.label_26.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_18.addWidget(self.label_26)

        self.insertFgX = QSpinBox(self.insertTab)
        self.insertFgX.setObjectName(u"insertFgX")
        sizePolicy1 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
        sizePolicy1.setHorizontalStretch(0)
        sizePolicy1.setVerticalStretch(0)
        sizePolicy1.setHeightForWidth(
            self.insertFgX.sizePolicy().hasHeightForWidth())
        self.insertFgX.setSizePolicy(sizePolicy1)
        self.insertFgX.setMaximum(10000000)

        self.horizontalLayout_18.addWidget(self.insertFgX)

        self.label_29 = QLabel(self.insertTab)
        self.label_29.setObjectName(u"label_29")
        self.label_29.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_18.addWidget(self.label_29)

        self.insertFgY = QSpinBox(self.insertTab)
        self.insertFgY.setObjectName(u"insertFgY")
        self.insertFgY.setMaximum(10000000)

        self.horizontalLayout_18.addWidget(self.insertFgY)

        self.formLayout_3.setLayout(1, QFormLayout.FieldRole,
                                    self.horizontalLayout_18)

        self.label_12 = QLabel(self.insertTab)
        self.label_12.setObjectName(u"label_12")

        self.formLayout_3.setWidget(2, QFormLayout.LabelRole, self.label_12)

        self.horizontalLayout_21 = QHBoxLayout()
        self.horizontalLayout_21.setObjectName(u"horizontalLayout_21")
        self.label_33 = QLabel(self.insertTab)
        self.label_33.setObjectName(u"label_33")
        self.label_33.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_21.addWidget(self.label_33)

        self.insertFgW = QSpinBox(self.insertTab)
        self.insertFgW.setObjectName(u"insertFgW")
        self.insertFgW.setBaseSize(QSize(1920, 0))
        self.insertFgW.setMaximum(1000000)
        self.insertFgW.setValue(1920)

        self.horizontalLayout_21.addWidget(self.insertFgW)

        self.label_34 = QLabel(self.insertTab)
        self.label_34.setObjectName(u"label_34")
        self.label_34.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_21.addWidget(self.label_34)

        self.insertFgH = QSpinBox(self.insertTab)
        self.insertFgH.setObjectName(u"insertFgH")
        self.insertFgH.setMaximum(1000000000)
        self.insertFgH.setValue(1080)

        self.horizontalLayout_21.addWidget(self.insertFgH)

        self.formLayout_3.setLayout(2, QFormLayout.FieldRole,
                                    self.horizontalLayout_21)

        self.opsParamsStack.addWidget(self.insertTab)
        self.sectionTab = QWidget()
        self.sectionTab.setObjectName(u"sectionTab")
        self.formLayout_6 = QFormLayout(self.sectionTab)
        self.formLayout_6.setObjectName(u"formLayout_6")
        self.sectionRulesListWidget = QListWidget(self.sectionTab)
        QListWidgetItem(self.sectionRulesListWidget)
        QListWidgetItem(self.sectionRulesListWidget)
        QListWidgetItem(self.sectionRulesListWidget)
        QListWidgetItem(self.sectionRulesListWidget)
        QListWidgetItem(self.sectionRulesListWidget)
        QListWidgetItem(self.sectionRulesListWidget)
        QListWidgetItem(self.sectionRulesListWidget)
        self.sectionRulesListWidget.setObjectName(u"sectionRulesListWidget")
        self.sectionRulesListWidget.setMaximumSize(QSize(16777215, 100))

        self.formLayout_6.setWidget(1, QFormLayout.FieldRole,
                                    self.sectionRulesListWidget)

        self.label_10 = QLabel(self.sectionTab)
        self.label_10.setObjectName(u"label_10")
        self.label_10.setMaximumSize(QSize(16777215, 20))

        self.formLayout_6.setWidget(0, QFormLayout.FieldRole, self.label_10)

        self.sectionCoverageLabel = QLabel(self.sectionTab)
        self.sectionCoverageLabel.setObjectName(u"sectionCoverageLabel")
        self.sectionCoverageLabel.setMaximumSize(QSize(16777215, 20))

        self.formLayout_6.setWidget(2, QFormLayout.FieldRole,
                                    self.sectionCoverageLabel)

        self.label_11 = QLabel(self.sectionTab)
        self.label_11.setObjectName(u"label_11")
        self.label_11.setMaximumSize(QSize(16777215, 20))

        self.formLayout_6.setWidget(3, QFormLayout.FieldRole, self.label_11)

        self.opsParamsStack.addWidget(self.sectionTab)
        self.audioTab = QWidget()
        self.audioTab.setObjectName(u"audioTab")
        self.formLayout_8 = QFormLayout(self.audioTab)
        self.formLayout_8.setObjectName(u"formLayout_8")
        self.comboBox = QComboBox(self.audioTab)
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.setObjectName(u"comboBox")

        self.formLayout_8.setWidget(0, QFormLayout.FieldRole, self.comboBox)

        self.label_8 = QLabel(self.audioTab)
        self.label_8.setObjectName(u"label_8")

        self.formLayout_8.setWidget(0, QFormLayout.LabelRole, self.label_8)

        self.opsParamsStack.addWidget(self.audioTab)
        self.cropTab = QWidget()
        self.cropTab.setObjectName(u"cropTab")
        self.formLayout_4 = QFormLayout(self.cropTab)
        self.formLayout_4.setObjectName(u"formLayout_4")
        self.formLayout_4.setVerticalSpacing(40)
        self.formLayout_4.setContentsMargins(-1, 40, -1, -1)
        self.label_14 = QLabel(self.cropTab)
        self.label_14.setObjectName(u"label_14")

        self.formLayout_4.setWidget(0, QFormLayout.LabelRole, self.label_14)

        self.horizontalLayout_19 = QHBoxLayout()
        self.horizontalLayout_19.setObjectName(u"horizontalLayout_19")
        self.label_30 = QLabel(self.cropTab)
        self.label_30.setObjectName(u"label_30")
        self.label_30.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_19.addWidget(self.label_30)

        self.spinBox_21 = QSpinBox(self.cropTab)
        self.spinBox_21.setObjectName(u"spinBox_21")

        self.horizontalLayout_19.addWidget(self.spinBox_21)

        self.label_31 = QLabel(self.cropTab)
        self.label_31.setObjectName(u"label_31")
        self.label_31.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_19.addWidget(self.label_31)

        self.spinBox_22 = QSpinBox(self.cropTab)
        self.spinBox_22.setObjectName(u"spinBox_22")

        self.horizontalLayout_19.addWidget(self.spinBox_22)

        self.formLayout_4.setLayout(0, QFormLayout.FieldRole,
                                    self.horizontalLayout_19)

        self.label_15 = QLabel(self.cropTab)
        self.label_15.setObjectName(u"label_15")

        self.formLayout_4.setWidget(1, QFormLayout.LabelRole, self.label_15)

        self.horizontalLayout_22 = QHBoxLayout()
        self.horizontalLayout_22.setObjectName(u"horizontalLayout_22")
        self.label_35 = QLabel(self.cropTab)
        self.label_35.setObjectName(u"label_35")
        self.label_35.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_22.addWidget(self.label_35)

        self.spinBox_25 = QSpinBox(self.cropTab)
        self.spinBox_25.setObjectName(u"spinBox_25")

        self.horizontalLayout_22.addWidget(self.spinBox_25)

        self.label_36 = QLabel(self.cropTab)
        self.label_36.setObjectName(u"label_36")
        self.label_36.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_22.addWidget(self.label_36)

        self.spinBox_26 = QSpinBox(self.cropTab)
        self.spinBox_26.setObjectName(u"spinBox_26")

        self.horizontalLayout_22.addWidget(self.spinBox_26)

        self.formLayout_4.setLayout(1, QFormLayout.FieldRole,
                                    self.horizontalLayout_22)

        self.opsParamsStack.addWidget(self.cropTab)
        self.composeTab = QWidget()
        self.composeTab.setObjectName(u"composeTab")
        self.verticalLayout_12 = QVBoxLayout(self.composeTab)
        self.verticalLayout_12.setObjectName(u"verticalLayout_12")
        self.verticalLayout_11 = QVBoxLayout()
        self.verticalLayout_11.setObjectName(u"verticalLayout_11")

        self.verticalLayout_12.addLayout(self.verticalLayout_11)

        self.opsParamsStack.addWidget(self.composeTab)
        self.resizeTab = QWidget()
        self.resizeTab.setObjectName(u"resizeTab")
        self.verticalLayout_10 = QVBoxLayout(self.resizeTab)
        self.verticalLayout_10.setObjectName(u"verticalLayout_10")
        self.verticalLayout_9 = QVBoxLayout()
        self.verticalLayout_9.setObjectName(u"verticalLayout_9")

        self.verticalLayout_10.addLayout(self.verticalLayout_9)

        self.opsParamsStack.addWidget(self.resizeTab)
        self.pacingTab = QWidget()
        self.pacingTab.setObjectName(u"pacingTab")
        self.verticalLayout_5 = QVBoxLayout(self.pacingTab)
        self.verticalLayout_5.setObjectName(u"verticalLayout_5")
        self.verticalLayout_5.setContentsMargins(0, 0, 0, 0)
        self.tabWidget = QTabWidget(self.pacingTab)
        self.tabWidget.setObjectName(u"tabWidget")
        self.tab = QWidget()
        self.tab.setObjectName(u"tab")
        self.tabWidget.addTab(self.tab, "")
        self.tab_2 = QWidget()
        self.tab_2.setObjectName(u"tab_2")
        self.tabWidget.addTab(self.tab_2, "")

        self.verticalLayout_5.addWidget(self.tabWidget)

        self.opsParamsStack.addWidget(self.pacingTab)
        self.animateTab = QWidget()
        self.animateTab.setObjectName(u"animateTab")
        self.verticalLayout_14 = QVBoxLayout(self.animateTab)
        self.verticalLayout_14.setObjectName(u"verticalLayout_14")
        self.verticalLayout_13 = QVBoxLayout()
        self.verticalLayout_13.setObjectName(u"verticalLayout_13")

        self.verticalLayout_14.addLayout(self.verticalLayout_13)

        self.opsParamsStack.addWidget(self.animateTab)
        self.renderTab = QWidget()
        self.renderTab.setObjectName(u"renderTab")
        self.verticalLayout_4 = QVBoxLayout(self.renderTab)
        self.verticalLayout_4.setObjectName(u"verticalLayout_4")
        self.verticalLayout_4.setContentsMargins(0, 0, 0, 0)
        self.renderTabTabs = QTabWidget(self.renderTab)
        self.renderTabTabs.setObjectName(u"renderTabTabs")
        self.renderTabVideoTab = QWidget()
        self.renderTabVideoTab.setObjectName(u"renderTabVideoTab")
        self.verticalLayout_2 = QVBoxLayout(self.renderTabVideoTab)
        self.verticalLayout_2.setObjectName(u"verticalLayout_2")
        self.verticalLayout_2.setContentsMargins(5, 5, 5, 5)
        self.scrollArea = QScrollArea(self.renderTabVideoTab)
        self.scrollArea.setObjectName(u"scrollArea")
        self.scrollArea.setFrameShape(QFrame.Panel)
        self.scrollArea.setFrameShadow(QFrame.Plain)
        self.scrollArea.setLineWidth(0)
        self.scrollArea.setWidgetResizable(True)
        self.scrollAreaWidgetContents = QWidget()
        self.scrollAreaWidgetContents.setObjectName(
            u"scrollAreaWidgetContents")
        self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 438, 412))
        self.formLayout_10 = QFormLayout(self.scrollAreaWidgetContents)
        self.formLayout_10.setObjectName(u"formLayout_10")
        self.videoTitleLabel = QLabel(self.scrollAreaWidgetContents)
        self.videoTitleLabel.setObjectName(u"videoTitleLabel")

        self.formLayout_10.setWidget(0, QFormLayout.LabelRole,
                                     self.videoTitleLabel)

        self.renderOutputTitle = QLineEdit(self.scrollAreaWidgetContents)
        self.renderOutputTitle.setObjectName(u"renderOutputTitle")

        self.formLayout_10.setWidget(0, QFormLayout.FieldRole,
                                     self.renderOutputTitle)

        self.videoDirectoryLabel = QLabel(self.scrollAreaWidgetContents)
        self.videoDirectoryLabel.setObjectName(u"videoDirectoryLabel")

        self.formLayout_10.setWidget(1, QFormLayout.LabelRole,
                                     self.videoDirectoryLabel)

        self.renderOutputDir = QLineEdit(self.scrollAreaWidgetContents)
        self.renderOutputDir.setObjectName(u"renderOutputDir")

        self.formLayout_10.setWidget(1, QFormLayout.FieldRole,
                                     self.renderOutputDir)

        self.videoFormatLabel = QLabel(self.scrollAreaWidgetContents)
        self.videoFormatLabel.setObjectName(u"videoFormatLabel")

        self.formLayout_10.setWidget(2, QFormLayout.LabelRole,
                                     self.videoFormatLabel)

        self.renderOutputFormat = QComboBox(self.scrollAreaWidgetContents)
        self.renderOutputFormat.addItem("")
        self.renderOutputFormat.addItem("")
        self.renderOutputFormat.setObjectName(u"renderOutputFormat")

        self.formLayout_10.setWidget(2, QFormLayout.FieldRole,
                                     self.renderOutputFormat)

        self.scrollArea.setWidget(self.scrollAreaWidgetContents)

        self.verticalLayout_2.addWidget(self.scrollArea)

        self.renderTabTabs.addTab(self.renderTabVideoTab, "")
        self.renderTabAudioTab = QWidget()
        self.renderTabAudioTab.setObjectName(u"renderTabAudioTab")
        self.verticalLayout_6 = QVBoxLayout(self.renderTabAudioTab)
        self.verticalLayout_6.setObjectName(u"verticalLayout_6")
        self.scrollArea_2 = QScrollArea(self.renderTabAudioTab)
        self.scrollArea_2.setObjectName(u"scrollArea_2")
        self.scrollArea_2.setWidgetResizable(True)
        self.scrollAreaWidgetContents_2 = QWidget()
        self.scrollAreaWidgetContents_2.setObjectName(
            u"scrollAreaWidgetContents_2")
        self.scrollAreaWidgetContents_2.setGeometry(QRect(0, 0, 428, 402))
        self.formLayout_11 = QFormLayout(self.scrollAreaWidgetContents_2)
        self.formLayout_11.setObjectName(u"formLayout_11")
        self.scrollArea_2.setWidget(self.scrollAreaWidgetContents_2)

        self.verticalLayout_6.addWidget(self.scrollArea_2)

        self.renderTabTabs.addTab(self.renderTabAudioTab, "")
        self.renderTabPacingTab = QWidget()
        self.renderTabPacingTab.setObjectName(u"renderTabPacingTab")
        self.verticalLayout_8 = QVBoxLayout(self.renderTabPacingTab)
        self.verticalLayout_8.setObjectName(u"verticalLayout_8")
        self.scrollArea_3 = QScrollArea(self.renderTabPacingTab)
        self.scrollArea_3.setObjectName(u"scrollArea_3")
        self.scrollArea_3.setWidgetResizable(True)
        self.scrollAreaWidgetContents_3 = QWidget()
        self.scrollAreaWidgetContents_3.setObjectName(
            u"scrollAreaWidgetContents_3")
        self.scrollAreaWidgetContents_3.setGeometry(QRect(0, 0, 428, 402))
        self.formLayout_12 = QFormLayout(self.scrollAreaWidgetContents_3)
        self.formLayout_12.setObjectName(u"formLayout_12")
        self.scrollArea_3.setWidget(self.scrollAreaWidgetContents_3)

        self.verticalLayout_8.addWidget(self.scrollArea_3)

        self.renderTabTabs.addTab(self.renderTabPacingTab, "")

        self.verticalLayout_4.addWidget(self.renderTabTabs)

        self.opsParamsStack.addWidget(self.renderTab)
        self.extraTab = QWidget()
        self.extraTab.setObjectName(u"extraTab")
        self.formLayout_7 = QFormLayout(self.extraTab)
        self.formLayout_7.setObjectName(u"formLayout_7")
        self.opsParamsStack.addWidget(self.extraTab)

        self.verticalLayout.addWidget(self.opsParamsStack)

        self.opLayout.addWidget(self.groupBox_6)

        self.horizontalLayout_9 = QHBoxLayout()
        self.horizontalLayout_9.setObjectName(u"horizontalLayout_9")
        self.horizontalLayout_9.setContentsMargins(10, 10, 10, 10)
        self.resetStepParamsBtn = QPushButton(opsWidget)
        self.resetStepParamsBtn.setObjectName(u"resetStepParamsBtn")

        self.horizontalLayout_9.addWidget(self.resetStepParamsBtn)

        self.saveStepParamsBtn = QPushButton(opsWidget)
        self.saveStepParamsBtn.setObjectName(u"saveStepParamsBtn")

        self.horizontalLayout_9.addWidget(self.saveStepParamsBtn)

        self.opLayout.addLayout(self.horizontalLayout_9)

        self.retranslateUi(opsWidget)
        self.opCombo.currentIndexChanged.connect(
            self.opsParamsStack.setCurrentIndex)

        self.opsParamsStack.setCurrentIndex(9)
        self.renderTabTabs.setCurrentIndex(0)

        QMetaObject.connectSlotsByName(opsWidget)

    # setupUi

    def retranslateUi(self, opsWidget):
        self.operationSelect.setTitle(
            QCoreApplication.translate("opsWidget", u"Operation", None))
        self.applyOpLabel.setText(
            QCoreApplication.translate("opsWidget", u"Operation", None))
        self.opCombo.setItemText(
            0, QCoreApplication.translate("opsWidget", u"Shell", None))
        self.opCombo.setItemText(
            1, QCoreApplication.translate("opsWidget", u"Insert", None))
        self.opCombo.setItemText(
            2, QCoreApplication.translate("opsWidget", u"Section", None))
        self.opCombo.setItemText(
            3, QCoreApplication.translate("opsWidget", u"Audio", None))
        self.opCombo.setItemText(
            4, QCoreApplication.translate("opsWidget", u"Crop", None))
        self.opCombo.setItemText(
            5, QCoreApplication.translate("opsWidget", u"Compose Demos", None))
        self.opCombo.setItemText(
            6, QCoreApplication.translate("opsWidget", u"Resize", None))
        self.opCombo.setItemText(
            7, QCoreApplication.translate("opsWidget", u"Add pacing", None))
        self.opCombo.setItemText(
            8,
            QCoreApplication.translate("opsWidget", u"Animate scroll steps",
                                       None))
        self.opCombo.setItemText(
            9, QCoreApplication.translate("opsWidget", u"Render to video",
                                          None))

        self.applyToLabel.setText(
            QCoreApplication.translate("opsWidget", u"Apply to:", None))
        self.allDemoCheck.setText(
            QCoreApplication.translate("opsWidget", u"Apply to all demos",
                                       None))
        self.allStepsCheck.setText(
            QCoreApplication.translate("opsWidget", u"Apply to all steps",
                                       None))
        self.matchSubstringCheck.setText(
            QCoreApplication.translate(
                "opsWidget", u"Apply to steps with matching substring:", None))
        self.label_16.setText(
            QCoreApplication.translate("opsWidget", u"Steps containing:",
                                       None))
        self.applyDemoLabel.setText(
            QCoreApplication.translate("opsWidget", u"Demo", None))
        self.groupBox_6.setTitle(
            QCoreApplication.translate("opsWidget", u"Parameters", None))
        self.label.setText(
            QCoreApplication.translate("opsWidget", u"Background", None))
        #if QT_CONFIG(statustip)
        self.shellImgPath.setStatusTip(
            QCoreApplication.translate(
                "opsWidget",
                u"Filepath of image to be used as shell for demo assets",
                None))
        #endif // QT_CONFIG(statustip)
        self.shellBrowseImgBtn.setText(
            QCoreApplication.translate("opsWidget", u"Browse", None))
        self.label_2.setText(
            QCoreApplication.translate("opsWidget",
                                       u"Coordinates of assets on shell",
                                       None))
        self.label_3.setText(
            QCoreApplication.translate("opsWidget", u"X", None))
        self.label_4.setText(
            QCoreApplication.translate("opsWidget", u"Y", None))
        self.label_5.setText(
            QCoreApplication.translate("opsWidget",
                                       u"Dimensions of assets on shell", None))
        self.label_7.setText(
            QCoreApplication.translate("opsWidget", u"Width", None))
        self.label_6.setText(
            QCoreApplication.translate("opsWidget", u"Height", None))
        self.label_32.setText(
            QCoreApplication.translate("opsWidget", u"Image to paste", None))
        self.insertBrowseImgBtn.setText(
            QCoreApplication.translate("opsWidget", u"Browse", None))
        self.label_13.setText(
            QCoreApplication.translate("opsWidget",
                                       u"Coords of image on assets", None))
        self.label_26.setText(
            QCoreApplication.translate("opsWidget", u"X", None))
        self.label_29.setText(
            QCoreApplication.translate("opsWidget", u"Y", None))
        self.label_12.setText(
            QCoreApplication.translate("opsWidget",
                                       u"Dimensions of image on assets", None))
        self.label_33.setText(
            QCoreApplication.translate("opsWidget", u"Width", None))
        self.label_34.setText(
            QCoreApplication.translate("opsWidget", u"Height", None))

        __sortingEnabled = self.sectionRulesListWidget.isSortingEnabled()
        self.sectionRulesListWidget.setSortingEnabled(False)
        ___qlistwidgetitem = self.sectionRulesListWidget.item(0)
        ___qlistwidgetitem.setText(
            QCoreApplication.translate("opsWidget",
                                       u"Step has TP, next step without TP",
                                       None))
        ___qlistwidgetitem1 = self.sectionRulesListWidget.item(1)
        ___qlistwidgetitem1.setText(
            QCoreApplication.translate("opsWidget",
                                       u"Step has TP, next step with TP",
                                       None))
        ___qlistwidgetitem2 = self.sectionRulesListWidget.item(2)
        ___qlistwidgetitem2.setText(
            QCoreApplication.translate(
                "opsWidget", u"Step has TP, previous step without TP", None))
        ___qlistwidgetitem3 = self.sectionRulesListWidget.item(3)
        ___qlistwidgetitem3.setText(
            QCoreApplication.translate("opsWidget",
                                       u"Step has TP, previous step with TP",
                                       None))
        ___qlistwidgetitem4 = self.sectionRulesListWidget.item(4)
        ___qlistwidgetitem4.setText(
            QCoreApplication.translate("opsWidget", u"Step has fade-in", None))
        ___qlistwidgetitem5 = self.sectionRulesListWidget.item(5)
        ___qlistwidgetitem5.setText(
            QCoreApplication.translate("opsWidget", u"Step has jump box",
                                       None))
        ___qlistwidgetitem6 = self.sectionRulesListWidget.item(6)
        ___qlistwidgetitem6.setText(
            QCoreApplication.translate("opsWidget",
                                       u"Step TP contains text pattern...",
                                       None))
        self.sectionRulesListWidget.setSortingEnabled(__sortingEnabled)

        self.label_10.setText(
            QCoreApplication.translate("opsWidget",
                                       u"Insert new section on...", None))
        self.sectionCoverageLabel.setText(
            QCoreApplication.translate(
                "opsWidget", u"Covers 0 steps in selected sections/steps",
                None))
        self.label_11.setText(
            QCoreApplication.translate(
                "opsWidget",
                u"May not match number of audio soundbites (audio not imported)",
                None))
        self.comboBox.setItemText(
            0,
            QCoreApplication.translate("opsWidget",
                                       u"Mixed section and step audio", None))
        self.comboBox.setItemText(
            1,
            QCoreApplication.translate("opsWidget", u"Section audio only",
                                       None))
        self.comboBox.setItemText(
            2, QCoreApplication.translate("opsWidget", u"Step audio only",
                                          None))

        self.label_8.setText(
            QCoreApplication.translate("opsWidget",
                                       u"Audio attachment behavior", None))
        self.label_14.setText(
            QCoreApplication.translate("opsWidget", u"Crop start coordinates",
                                       None))
        self.label_30.setText(
            QCoreApplication.translate("opsWidget", u"X", None))
        self.label_31.setText(
            QCoreApplication.translate("opsWidget", u"Y", None))
        self.label_15.setText(
            QCoreApplication.translate("opsWidget", u"Crop dimensions", None))
        self.label_35.setText(
            QCoreApplication.translate("opsWidget", u"Width", None))
        self.label_36.setText(
            QCoreApplication.translate("opsWidget", u"Height", None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.tab),
            QCoreApplication.translate("opsWidget", u"Tab 1", None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.tab_2),
            QCoreApplication.translate("opsWidget", u"Tab 2", None))
        self.videoTitleLabel.setText(
            QCoreApplication.translate("opsWidget", u"Video Title", None))
        self.videoDirectoryLabel.setText(
            QCoreApplication.translate("opsWidget", u"Video Directory", None))
        self.videoFormatLabel.setText(
            QCoreApplication.translate("opsWidget", u"Video Format", None))
        self.renderOutputFormat.setItemText(
            0, QCoreApplication.translate("opsWidget", u"avi", None))
        self.renderOutputFormat.setItemText(
            1, QCoreApplication.translate("opsWidget", u"mp4", None))

        self.renderTabTabs.setTabText(
            self.renderTabTabs.indexOf(self.renderTabVideoTab),
            QCoreApplication.translate("opsWidget", u"Video", None))
        self.renderTabTabs.setTabText(
            self.renderTabTabs.indexOf(self.renderTabAudioTab),
            QCoreApplication.translate("opsWidget", u"Audio", None))
        self.renderTabTabs.setTabText(
            self.renderTabTabs.indexOf(self.renderTabPacingTab),
            QCoreApplication.translate("opsWidget", u"Pacing", None))
        self.resetStepParamsBtn.setText(
            QCoreApplication.translate("opsWidget", u"Reset to default", None))
        self.saveStepParamsBtn.setText(
            QCoreApplication.translate("opsWidget", u"Save step parameters",
                                       None))
        pass
コード例 #14
0
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        if not MainWindow.objectName():
            MainWindow.setObjectName(u"MainWindow")
        MainWindow.resize(534, 188)
        self.centralwidget = QWidget(MainWindow)
        self.centralwidget.setObjectName(u"centralwidget")
        self.verticalLayout = QVBoxLayout(self.centralwidget)
        self.verticalLayout.setObjectName(u"verticalLayout")
        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.setObjectName(u"horizontalLayout")
        self.line_source = QLineEdit(self.centralwidget)
        self.line_source.setObjectName(u"line_source")
        self.line_source.setEnabled(True)
        self.line_source.setReadOnly(True)

        self.horizontalLayout.addWidget(self.line_source)

        self.button_source = QPushButton(self.centralwidget)
        self.button_source.setObjectName(u"button_source")

        self.horizontalLayout.addWidget(self.button_source)

        self.verticalLayout.addLayout(self.horizontalLayout)

        self.horizontalLayout_2 = QHBoxLayout()
        self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
        self.line_target = QLineEdit(self.centralwidget)
        self.line_target.setObjectName(u"line_target")
        self.line_target.setEnabled(True)
        self.line_target.setReadOnly(True)

        self.horizontalLayout_2.addWidget(self.line_target)

        self.button_target = QPushButton(self.centralwidget)
        self.button_target.setObjectName(u"button_target")

        self.horizontalLayout_2.addWidget(self.button_target)

        self.verticalLayout.addLayout(self.horizontalLayout_2)

        self.line = QFrame(self.centralwidget)
        self.line.setObjectName(u"line")
        self.line.setFrameShape(QFrame.HLine)
        self.line.setFrameShadow(QFrame.Sunken)

        self.verticalLayout.addWidget(self.line)

        self.horizontalLayout_3 = QHBoxLayout()
        self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
        self.label_2 = QLabel(self.centralwidget)
        self.label_2.setObjectName(u"label_2")

        self.horizontalLayout_3.addWidget(self.label_2)

        self.spin_memory = QSpinBox(self.centralwidget)
        self.spin_memory.setObjectName(u"spin_memory")

        self.horizontalLayout_3.addWidget(self.spin_memory)

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

        self.horizontalLayout_3.addWidget(self.label_3)

        self.spin_blur = QSpinBox(self.centralwidget)
        self.spin_blur.setObjectName(u"spin_blur")
        self.spin_blur.setValue(9)

        self.horizontalLayout_3.addWidget(self.spin_blur)

        self.label_5 = QLabel(self.centralwidget)
        self.label_5.setObjectName(u"label_5")

        self.horizontalLayout_3.addWidget(self.label_5)

        self.double_spin_threshold = QDoubleSpinBox(self.centralwidget)
        self.double_spin_threshold.setObjectName(u"double_spin_threshold")
        self.double_spin_threshold.setMaximum(1.000000000000000)
        self.double_spin_threshold.setSingleStep(0.050000000000000)
        self.double_spin_threshold.setValue(0.300000000000000)

        self.horizontalLayout_3.addWidget(self.double_spin_threshold)

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

        self.horizontalLayout_3.addWidget(self.label_6)

        self.double_spin_roimulti = QDoubleSpinBox(self.centralwidget)
        self.double_spin_roimulti.setObjectName(u"double_spin_roimulti")
        self.double_spin_roimulti.setMinimum(0.800000000000000)
        self.double_spin_roimulti.setMaximum(10.000000000000000)
        self.double_spin_roimulti.setSingleStep(0.050000000000000)
        self.double_spin_roimulti.setValue(1.000000000000000)

        self.horizontalLayout_3.addWidget(self.double_spin_roimulti)

        self.verticalLayout.addLayout(self.horizontalLayout_3)

        self.line_2 = QFrame(self.centralwidget)
        self.line_2.setObjectName(u"line_2")
        self.line_2.setFrameShape(QFrame.HLine)
        self.line_2.setFrameShadow(QFrame.Sunken)

        self.verticalLayout.addWidget(self.line_2)

        self.horizontalLayout_4 = QHBoxLayout()
        self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
        self.label = QLabel(self.centralwidget)
        self.label.setObjectName(u"label")

        self.horizontalLayout_4.addWidget(self.label)

        self.combo_box_weights = QComboBox(self.centralwidget)
        self.combo_box_weights.setObjectName(u"combo_box_weights")

        self.horizontalLayout_4.addWidget(self.combo_box_weights)

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

        self.horizontalLayout_4.addWidget(self.label_4)

        self.combo_box_scale = QComboBox(self.centralwidget)
        self.combo_box_scale.addItem("")
        self.combo_box_scale.addItem("")
        self.combo_box_scale.addItem("")
        self.combo_box_scale.setObjectName(u"combo_box_scale")

        self.horizontalLayout_4.addWidget(self.combo_box_scale)

        self.label_7 = QLabel(self.centralwidget)
        self.label_7.setObjectName(u"label_7")

        self.horizontalLayout_4.addWidget(self.label_7)

        self.spin_quality = QSpinBox(self.centralwidget)
        self.spin_quality.setObjectName(u"spin_quality")
        self.spin_quality.setMaximum(10)
        self.spin_quality.setValue(5)

        self.horizontalLayout_4.addWidget(self.spin_quality)

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

        self.horizontalLayout_4.addItem(self.horizontalSpacer)

        self.verticalLayout.addLayout(self.horizontalLayout_4)

        self.line_3 = QFrame(self.centralwidget)
        self.line_3.setObjectName(u"line_3")
        self.line_3.setFrameShape(QFrame.HLine)
        self.line_3.setFrameShadow(QFrame.Sunken)

        self.verticalLayout.addWidget(self.line_3)

        self.horizontalLayout_5 = QHBoxLayout()
        self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
        self.progress = QProgressBar(self.centralwidget)
        self.progress.setObjectName(u"progress")
        self.progress.setEnabled(True)
        self.progress.setValue(0)

        self.horizontalLayout_5.addWidget(self.progress)

        self.button_start = QPushButton(self.centralwidget)
        self.button_start.setObjectName(u"button_start")

        self.horizontalLayout_5.addWidget(self.button_start)

        self.button_abort = QPushButton(self.centralwidget)
        self.button_abort.setObjectName(u"button_abort")
        self.button_abort.setEnabled(False)

        self.horizontalLayout_5.addWidget(self.button_abort)

        self.verticalLayout.addLayout(self.horizontalLayout_5)

        MainWindow.setCentralWidget(self.centralwidget)

        self.retranslateUi(MainWindow)

        QMetaObject.connectSlotsByName(MainWindow)

    # setupUi

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(
            QCoreApplication.translate("MainWindow", u"DashcamCleaner", None))
        self.button_source.setText(
            QCoreApplication.translate("MainWindow", u"Select video", None))
        self.button_target.setText(
            QCoreApplication.translate("MainWindow", u"Select target", None))
        self.label_2.setText(
            QCoreApplication.translate("MainWindow", u"Frame memory:", None))
        self.label_3.setText(
            QCoreApplication.translate("MainWindow", u"Blur size:", None))
        self.label_5.setText(
            QCoreApplication.translate("MainWindow", u"Detection threshold:",
                                       None))
        self.label_6.setText(
            QCoreApplication.translate("MainWindow", u"ROI enlargement", None))
        self.label.setText(
            QCoreApplication.translate("MainWindow", u"Weights", None))
        self.label_4.setText(
            QCoreApplication.translate("MainWindow", u"Inference size", None))
        self.combo_box_scale.setItemText(
            0, QCoreApplication.translate("MainWindow", u"360p", None))
        self.combo_box_scale.setItemText(
            1, QCoreApplication.translate("MainWindow", u"720p", None))
        self.combo_box_scale.setItemText(
            2, QCoreApplication.translate("MainWindow", u"1080p", None))

        self.combo_box_scale.setCurrentText(
            QCoreApplication.translate("MainWindow", u"360p", None))
        self.label_7.setText(
            QCoreApplication.translate("MainWindow", u"Output Quality", None))
        self.button_start.setText(
            QCoreApplication.translate("MainWindow", u"Start", None))
        self.button_abort.setText(
            QCoreApplication.translate("MainWindow", u"Abort", None))
コード例 #15
0
class Ui_VehicleRentalDlg(object):
    def setupUi(self, VehicleRentalDlg):
        if not VehicleRentalDlg.objectName():
            VehicleRentalDlg.setObjectName(u"VehicleRentalDlg")
        VehicleRentalDlg.resize(206, 246)
        self.gridLayout = QGridLayout(VehicleRentalDlg)
        # ifndef Q_OS_MAC
        self.gridLayout.setSpacing(6)
        # endif
        # ifndef Q_OS_MAC
        self.gridLayout.setContentsMargins(9, 9, 9, 9)
        # endif
        self.gridLayout.setObjectName(u"gridLayout")
        self.buttonBox = QDialogButtonBox(VehicleRentalDlg)
        self.buttonBox.setObjectName(u"buttonBox")
        self.buttonBox.setOrientation(Qt.Horizontal)
        self.buttonBox.setStandardButtons(QDialogButtonBox.Cancel
                                          | QDialogButtonBox.Ok)

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

        self.spacerItem = QSpacerItem(188, 16, QSizePolicy.Minimum,
                                      QSizePolicy.Expanding)

        self.gridLayout.addItem(self.spacerItem, 3, 0, 1, 1)

        self.hboxLayout = QHBoxLayout()
        # ifndef Q_OS_MAC
        self.hboxLayout.setSpacing(6)
        # endif
        self.hboxLayout.setContentsMargins(0, 0, 0, 0)
        self.hboxLayout.setObjectName(u"hboxLayout")
        self.label_6 = QLabel(VehicleRentalDlg)
        self.label_6.setObjectName(u"label_6")

        self.hboxLayout.addWidget(self.label_6)

        self.mileageLabel = QLabel(VehicleRentalDlg)
        self.mileageLabel.setObjectName(u"mileageLabel")
        self.mileageLabel.setFrameShape(QFrame.StyledPanel)
        self.mileageLabel.setFrameShadow(QFrame.Sunken)
        self.mileageLabel.setAlignment(Qt.AlignRight | Qt.AlignTrailing
                                       | Qt.AlignVCenter)

        self.hboxLayout.addWidget(self.mileageLabel)

        self.gridLayout.addLayout(self.hboxLayout, 2, 0, 1, 1)

        self.stackedWidget = QStackedWidget(VehicleRentalDlg)
        self.stackedWidget.setObjectName(u"stackedWidget")
        self.page_2 = QWidget()
        self.page_2.setObjectName(u"page_2")
        self.gridLayout1 = QGridLayout(self.page_2)
        # ifndef Q_OS_MAC
        self.gridLayout1.setSpacing(6)
        # endif
        # ifndef Q_OS_MAC
        self.gridLayout1.setContentsMargins(9, 9, 9, 9)
        # endif
        self.gridLayout1.setObjectName(u"gridLayout1")
        self.colorComboBox = QComboBox(self.page_2)
        self.colorComboBox.addItem("")
        self.colorComboBox.addItem("")
        self.colorComboBox.addItem("")
        self.colorComboBox.addItem("")
        self.colorComboBox.addItem("")
        self.colorComboBox.addItem("")
        self.colorComboBox.addItem("")
        self.colorComboBox.setObjectName(u"colorComboBox")

        self.gridLayout1.addWidget(self.colorComboBox, 0, 1, 1, 1)

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

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

        self.label_5 = QLabel(self.page_2)
        self.label_5.setObjectName(u"label_5")

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

        self.seatsSpinBox = QSpinBox(self.page_2)
        self.seatsSpinBox.setObjectName(u"seatsSpinBox")
        self.seatsSpinBox.setAlignment(Qt.AlignRight)
        self.seatsSpinBox.setMinimum(2)
        self.seatsSpinBox.setMaximum(12)
        self.seatsSpinBox.setValue(4)

        self.gridLayout1.addWidget(self.seatsSpinBox, 1, 1, 1, 1)

        self.stackedWidget.addWidget(self.page_2)
        self.page = QWidget()
        self.page.setObjectName(u"page")
        self.gridLayout2 = QGridLayout(self.page)
        # ifndef Q_OS_MAC
        self.gridLayout2.setSpacing(6)
        # endif
        # ifndef Q_OS_MAC
        self.gridLayout2.setContentsMargins(9, 9, 9, 9)
        # endif
        self.gridLayout2.setObjectName(u"gridLayout2")
        self.weightSpinBox = QSpinBox(self.page)
        self.weightSpinBox.setObjectName(u"weightSpinBox")
        self.weightSpinBox.setAlignment(Qt.AlignRight)
        self.weightSpinBox.setMinimum(1)
        self.weightSpinBox.setMaximum(8)

        self.gridLayout2.addWidget(self.weightSpinBox, 0, 1, 1, 1)

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

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

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

        self.gridLayout2.addWidget(self.label_2, 0, 0, 1, 1)

        self.volumeSpinBox = QSpinBox(self.page)
        self.volumeSpinBox.setObjectName(u"volumeSpinBox")
        self.volumeSpinBox.setAlignment(Qt.AlignRight)
        self.volumeSpinBox.setMinimum(4)
        self.volumeSpinBox.setMaximum(22)
        self.volumeSpinBox.setValue(10)

        self.gridLayout2.addWidget(self.volumeSpinBox, 1, 1, 1, 1)

        self.stackedWidget.addWidget(self.page)

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

        self.hboxLayout1 = QHBoxLayout()
        # ifndef Q_OS_MAC
        self.hboxLayout1.setSpacing(6)
        # endif
        self.hboxLayout1.setContentsMargins(0, 0, 0, 0)
        self.hboxLayout1.setObjectName(u"hboxLayout1")
        self.label = QLabel(VehicleRentalDlg)
        self.label.setObjectName(u"label")

        self.hboxLayout1.addWidget(self.label)

        self.vehicleComboBox = QComboBox(VehicleRentalDlg)
        self.vehicleComboBox.addItem("")
        self.vehicleComboBox.addItem("")
        self.vehicleComboBox.setObjectName(u"vehicleComboBox")

        self.hboxLayout1.addWidget(self.vehicleComboBox)

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

        # if QT_CONFIG(shortcut)
        self.label_4.setBuddy(self.colorComboBox)
        self.label_5.setBuddy(self.seatsSpinBox)
        self.label_3.setBuddy(self.volumeSpinBox)
        self.label_2.setBuddy(self.seatsSpinBox)
        self.label.setBuddy(self.vehicleComboBox)
        # endif // QT_CONFIG(shortcut)

        self.retranslateUi(VehicleRentalDlg)
        self.vehicleComboBox.currentIndexChanged.connect(
            self.stackedWidget.setCurrentIndex)
        self.buttonBox.accepted.connect(VehicleRentalDlg.accept)
        self.buttonBox.rejected.connect(VehicleRentalDlg.reject)

        self.stackedWidget.setCurrentIndex(0)

        QMetaObject.connectSlotsByName(VehicleRentalDlg)

    # setupUi

    def retranslateUi(self, VehicleRentalDlg):
        VehicleRentalDlg.setWindowTitle(
            QCoreApplication.translate("VehicleRentalDlg", u"Vehicle Rental",
                                       None))
        self.label_6.setText(
            QCoreApplication.translate("VehicleRentalDlg", u"Max. Mileage:",
                                       None))
        self.mileageLabel.setText(
            QCoreApplication.translate("VehicleRentalDlg", u"1000 miles",
                                       None))
        self.colorComboBox.setItemText(
            0, QCoreApplication.translate("VehicleRentalDlg", u"Black", None))
        self.colorComboBox.setItemText(
            1, QCoreApplication.translate("VehicleRentalDlg", u"Blue", None))
        self.colorComboBox.setItemText(
            2, QCoreApplication.translate("VehicleRentalDlg", u"Green", None))
        self.colorComboBox.setItemText(
            3, QCoreApplication.translate("VehicleRentalDlg", u"Red", None))
        self.colorComboBox.setItemText(
            4, QCoreApplication.translate("VehicleRentalDlg", u"Silver", None))
        self.colorComboBox.setItemText(
            5, QCoreApplication.translate("VehicleRentalDlg", u"White", None))
        self.colorComboBox.setItemText(
            6, QCoreApplication.translate("VehicleRentalDlg", u"Yellow", None))

        self.label_4.setText(
            QCoreApplication.translate("VehicleRentalDlg", u"Co&lor:", None))
        self.label_5.setText(
            QCoreApplication.translate("VehicleRentalDlg", u"&Seats:", None))
        self.weightSpinBox.setSuffix(
            QCoreApplication.translate("VehicleRentalDlg", u" tons", None))
        self.label_3.setText(
            QCoreApplication.translate("VehicleRentalDlg", u"Volu&me:", None))
        self.label_2.setText(
            QCoreApplication.translate("VehicleRentalDlg", u"&Weight:", None))
        self.volumeSpinBox.setSuffix(
            QCoreApplication.translate("VehicleRentalDlg", u" cu m", None))
        self.label.setText(
            QCoreApplication.translate("VehicleRentalDlg", u"&Vehicle Type:",
                                       None))
        self.vehicleComboBox.setItemText(
            0, QCoreApplication.translate("VehicleRentalDlg", u"Car", None))
        self.vehicleComboBox.setItemText(
            1, QCoreApplication.translate("VehicleRentalDlg", u"Van", None))
コード例 #16
0
class TextQueue_Ui(QWidget):
    def __init__(self, persepolis_setting):
        super().__init__()

        self.persepolis_setting = persepolis_setting
        icons = ':/' + \
            str(self.persepolis_setting.value('settings/icons')) + '/'

        # add support for other languages
        locale = str(self.persepolis_setting.value('settings/locale'))
        QLocale.setDefault(QLocale(locale))
        self.translator = QTranslator()
        if self.translator.load(':/translations/locales/ui_' + locale, 'ts'):
            QCoreApplication.installTranslator(self.translator)

        # set ui direction
        ui_direction = self.persepolis_setting.value('ui_direction')

        if ui_direction == 'rtl':
            self.setLayoutDirection(Qt.RightToLeft)

        elif ui_direction in 'ltr':
            self.setLayoutDirection(Qt.LeftToRight)

        self.setWindowIcon(
            QIcon.fromTheme('persepolis', QIcon(':/persepolis.svg')))
        window_verticalLayout = QVBoxLayout()
        self.setLayout(window_verticalLayout)

        # queue_tabWidget
        self.queue_tabWidget = QTabWidget(self)
        window_verticalLayout.addWidget(self.queue_tabWidget)

        # links_tab
        self.links_tab = QWidget()
        links_tab_verticalLayout = QVBoxLayout(self.links_tab)

        # link table
        self.links_table = QTableWidget(self.links_tab)
        links_tab_verticalLayout.addWidget(self.links_table)

        self.links_table.setSelectionBehavior(QAbstractItemView.SelectRows)
        self.links_table.setEditTriggers(QAbstractItemView.NoEditTriggers)
        self.links_table.verticalHeader().hide()

        self.links_table.setColumnCount(3)
        links_table_header_labels = [
            'File Name', 'Download Link', 'dictionary'
        ]
        self.links_table.setHorizontalHeaderLabels(links_table_header_labels)
        self.links_table.setColumnHidden(2, True)

        self.links_table.horizontalHeader().setSectionResizeMode(
            QHeaderView.ResizeMode.Stretch)
        self.links_table.horizontalHeader().setStretchLastSection(True)

        # add_queue
        add_queue_horizontalLayout = QHBoxLayout()

        self.select_all_pushButton = QPushButton(self.links_tab)
        add_queue_horizontalLayout.addWidget(self.select_all_pushButton)

        self.deselect_all_pushButton = QPushButton(self.links_tab)
        add_queue_horizontalLayout.addWidget(self.deselect_all_pushButton)

        add_queue_horizontalLayout.addStretch(1)

        self.add_queue_label = QLabel(self.links_tab)
        add_queue_horizontalLayout.addWidget(self.add_queue_label)

        self.add_queue_comboBox = QComboBox(self.links_tab)
        add_queue_horizontalLayout.addWidget(self.add_queue_comboBox)

        links_tab_verticalLayout.addLayout(add_queue_horizontalLayout)

        links_tab_verticalLayout.addStretch(1)
        self.queue_tabWidget.addTab(self.links_tab, "")

        # options_tab
        self.options_tab = QWidget()
        options_tab_verticalLayout = QVBoxLayout(self.options_tab)

        # proxy
        proxy_verticalLayout = QVBoxLayout()

        self.proxy_checkBox = QCheckBox(self.options_tab)
        proxy_verticalLayout.addWidget(self.proxy_checkBox)

        self.proxy_frame = QFrame(self.options_tab)
        self.proxy_frame.setFrameShape(QFrame.StyledPanel)
        self.proxy_frame.setFrameShadow(QFrame.Raised)

        proxy_gridLayout = QGridLayout(self.proxy_frame)

        self.ip_lineEdit = QLineEdit(self.proxy_frame)
        self.ip_lineEdit.setInputMethodHints(Qt.ImhNone)
        proxy_gridLayout.addWidget(self.ip_lineEdit, 0, 1, 1, 1)

        self.proxy_pass_label = QLabel(self.proxy_frame)
        proxy_gridLayout.addWidget(self.proxy_pass_label, 2, 2, 1, 1)

        self.proxy_pass_lineEdit = QLineEdit(self.proxy_frame)
        self.proxy_pass_lineEdit.setEchoMode(QLineEdit.Password)
        proxy_gridLayout.addWidget(self.proxy_pass_lineEdit, 2, 3, 1, 1)

        self.ip_label = QLabel(self.proxy_frame)
        proxy_gridLayout.addWidget(self.ip_label, 0, 0, 1, 1)

        self.proxy_user_lineEdit = QLineEdit(self.proxy_frame)
        proxy_gridLayout.addWidget(self.proxy_user_lineEdit, 0, 3, 1, 1)

        self.proxy_user_label = QLabel(self.proxy_frame)
        proxy_gridLayout.addWidget(self.proxy_user_label, 0, 2, 1, 1)

        self.port_label = QLabel(self.proxy_frame)
        proxy_gridLayout.addWidget(self.port_label, 2, 0, 1, 1)

        self.port_spinBox = QSpinBox(self.proxy_frame)
        self.port_spinBox.setMaximum(9999)
        self.port_spinBox.setSingleStep(1)
        proxy_gridLayout.addWidget(self.port_spinBox, 2, 1, 1, 1)
        proxy_verticalLayout.addWidget(self.proxy_frame)
        options_tab_verticalLayout.addLayout(proxy_verticalLayout)

        # download Username & Password
        download_horizontalLayout = QHBoxLayout()
        download_horizontalLayout.setContentsMargins(-1, 10, -1, -1)

        download_verticalLayout = QVBoxLayout()
        self.download_checkBox = QCheckBox(self.options_tab)
        download_verticalLayout.addWidget(self.download_checkBox)

        self.download_frame = QFrame(self.options_tab)
        self.download_frame.setFrameShape(QFrame.StyledPanel)
        self.download_frame.setFrameShadow(QFrame.Raised)

        download_gridLayout = QGridLayout(self.download_frame)

        self.download_user_lineEdit = QLineEdit(self.download_frame)
        download_gridLayout.addWidget(self.download_user_lineEdit, 0, 1, 1, 1)

        self.download_user_label = QLabel(self.download_frame)
        download_gridLayout.addWidget(self.download_user_label, 0, 0, 1, 1)

        self.download_pass_label = QLabel(self.download_frame)
        download_gridLayout.addWidget(self.download_pass_label, 1, 0, 1, 1)

        self.download_pass_lineEdit = QLineEdit(self.download_frame)
        self.download_pass_lineEdit.setEchoMode(QLineEdit.Password)
        download_gridLayout.addWidget(self.download_pass_lineEdit, 1, 1, 1, 1)
        download_verticalLayout.addWidget(self.download_frame)
        download_horizontalLayout.addLayout(download_verticalLayout)

        # select folder
        self.folder_frame = QFrame(self.options_tab)
        self.folder_frame.setFrameShape(QFrame.StyledPanel)
        self.folder_frame.setFrameShadow(QFrame.Raised)

        folder_gridLayout = QGridLayout(self.folder_frame)

        self.download_folder_lineEdit = QLineEdit(self.folder_frame)
        folder_gridLayout.addWidget(self.download_folder_lineEdit, 2, 0, 1, 1)

        self.folder_pushButton = QPushButton(self.folder_frame)
        folder_gridLayout.addWidget(self.folder_pushButton, 3, 0, 1, 1)
        self.folder_pushButton.setIcon(QIcon(icons + 'folder'))

        self.folder_checkBox = QCheckBox(self.folder_frame)
        folder_gridLayout.addWidget(self.folder_checkBox)

        self.folder_label = QLabel(self.folder_frame)
        self.folder_label.setAlignment(Qt.AlignCenter)
        folder_gridLayout.addWidget(self.folder_label, 1, 0, 1, 1)
        download_horizontalLayout.addWidget(self.folder_frame)
        options_tab_verticalLayout.addLayout(download_horizontalLayout)

        self.queue_tabWidget.addTab(self.options_tab, '')

        # limit Speed
        limit_verticalLayout = QVBoxLayout()

        self.limit_checkBox = QCheckBox(self.options_tab)
        limit_verticalLayout.addWidget(self.limit_checkBox)

        self.limit_frame = QFrame(self.options_tab)
        self.limit_frame.setFrameShape(QFrame.StyledPanel)
        self.limit_frame.setFrameShadow(QFrame.Raised)

        limit_horizontalLayout = QHBoxLayout(self.limit_frame)

        self.limit_spinBox = QSpinBox(self.limit_frame)
        self.limit_spinBox.setMinimum(1)
        self.limit_spinBox.setMaximum(1023)
        limit_horizontalLayout.addWidget(self.limit_spinBox)

        self.limit_comboBox = QComboBox(self.limit_frame)
        self.limit_comboBox.addItem("KiB/S")
        self.limit_comboBox.addItem("MiB/S")
        limit_horizontalLayout.addWidget(self.limit_comboBox)

        limit_verticalLayout.addWidget(self.limit_frame)

        limit_connections_horizontalLayout = QHBoxLayout()
        limit_connections_horizontalLayout.addLayout(limit_verticalLayout)

        # number of connections
        connections_horizontalLayout = QHBoxLayout()
        connections_horizontalLayout.setContentsMargins(-1, 10, -1, -1)

        self.connections_frame = QFrame(self.options_tab)
        self.connections_frame.setFrameShape(QFrame.StyledPanel)
        self.connections_frame.setFrameShadow(QFrame.Raised)

        horizontalLayout_3 = QHBoxLayout(self.connections_frame)
        self.connections_label = QLabel(self.connections_frame)
        horizontalLayout_3.addWidget(self.connections_label)

        self.connections_spinBox = QSpinBox(self.connections_frame)
        self.connections_spinBox.setMinimum(1)
        self.connections_spinBox.setMaximum(16)
        self.connections_spinBox.setProperty("value", 16)

        horizontalLayout_3.addWidget(self.connections_spinBox)
        connections_horizontalLayout.addWidget(self.connections_frame)

        limit_connections_horizontalLayout.addLayout(
            connections_horizontalLayout)

        options_tab_verticalLayout.addLayout(
            limit_connections_horizontalLayout)

        options_tab_verticalLayout.addStretch(1)

        # buttons
        buttons_horizontalLayout = QHBoxLayout()
        buttons_horizontalLayout.addStretch(1)
        # ok_pushButton
        self.ok_pushButton = QPushButton(self)
        self.ok_pushButton.setIcon(QIcon(icons + 'ok'))
        buttons_horizontalLayout.addWidget(self.ok_pushButton)
        # cancel_pushButton
        self.cancel_pushButton = QPushButton(self)
        self.cancel_pushButton.setIcon(QIcon(icons + 'remove'))
        buttons_horizontalLayout.addWidget(self.cancel_pushButton)

        window_verticalLayout.addLayout(buttons_horizontalLayout)

        # labels
        self.setWindowTitle(
            QCoreApplication.translate("text_ui_tr",
                                       "Persepolis Download Manager"))

        self.queue_tabWidget.setTabText(
            self.queue_tabWidget.indexOf(self.links_tab),
            QCoreApplication.translate("text_ui_tr", 'Links'))
        self.queue_tabWidget.setTabText(
            self.queue_tabWidget.indexOf(self.options_tab),
            QCoreApplication.translate("text_ui_tr", 'Download Options'))

        self.select_all_pushButton.setText(
            QCoreApplication.translate("text_ui_tr", 'Select All'))
        self.deselect_all_pushButton.setText(
            QCoreApplication.translate("text_ui_tr", 'Deselect All'))

        self.add_queue_label.setText(
            QCoreApplication.translate("text_ui_tr", 'Add to queue: '))

        self.proxy_checkBox.setText(
            QCoreApplication.translate("text_ui_tr", 'Proxy'))
        self.proxy_pass_label.setText(
            QCoreApplication.translate("text_ui_tr", "Proxy password: "******"text_ui_tr", "IP:"))
        self.proxy_user_label.setText(
            QCoreApplication.translate("text_ui_tr", "Proxy username: "******"text_ui_tr", "Port:"))

        self.download_checkBox.setText(
            QCoreApplication.translate("text_ui_tr",
                                       "Download username and password"))
        self.download_user_label.setText(
            QCoreApplication.translate("text_ui_tr", "Download username: "******"text_ui_tr", "Download password: "******"text_ui_tr", "Change Download Folder"))
        self.folder_checkBox.setText(
            QCoreApplication.translate("addlink_ui_tr", "Remember this path"))
        self.folder_label.setText(
            QCoreApplication.translate("text_ui_tr", "Download folder: "))

        self.limit_checkBox.setText(
            QCoreApplication.translate("text_ui_tr", "Limit speed"))

        self.connections_label.setText(
            QCoreApplication.translate("text_ui_tr", "Number of connections:"))

        self.ok_pushButton.setText(
            QCoreApplication.translate("text_ui_tr", 'OK'))
        self.cancel_pushButton.setText(
            QCoreApplication.translate("text_ui_tr", 'Cancel'))
コード例 #17
0
class ParameterEditorItem(QWidget):
    onRemoveParameter = Signal(Parameter)
    onMoveParameterUp = Signal(Parameter)
    onMoveParameterDown = Signal(Parameter)
    onChanged = Signal()

    def __init__(self, parameter: Parameter):
        super().__init__()

        self.parameter = parameter

        deleteButton = QToolButton()
        deleteButton.setText("X")
        deleteButton.clicked.connect(
            lambda: self.onRemoveParameter.emit(self.parameter))
        upButton = QToolButton()
        upButton.setText("\u2191")
        upButton.clicked.connect(
            lambda: self.onMoveParameterUp.emit(self.parameter))
        downButton = QToolButton()
        downButton.setText("\u2193")
        downButton.clicked.connect(
            lambda: self.onMoveParameterDown.emit(self.parameter))

        buttonsLayout = QVBoxLayout()
        buttonsLayout.setAlignment(Qt.AlignTop)
        buttonsLayout.addWidget(deleteButton)
        buttonsLayout.addWidget(upButton)
        buttonsLayout.addWidget(downButton)

        self._nameLabel = QLabel("Name")
        self._nameField = QLineEdit()
        self._nameField.textChanged.connect(self.OnChanged)

        self._dataTypeLabel = QLabel("Data Type")
        self._dataTypeField = QComboBox()
        for dataType in DataType:
            self._dataTypeField.addItem(dataType.ToString(), userData=dataType)
        self._dataTypeField.currentIndexChanged.connect(self.OnChanged)

        self._defaultValueLabel = QLabel("Default Value")
        self._defaultInteger = QSpinBox()
        self._defaultInteger.valueChanged.connect(self.OnChanged)

        self._defaultFloat = QDoubleSpinBox()
        self._defaultFloat.valueChanged.connect(self.OnChanged)

        self._defaultBoolean = QComboBox()
        self._defaultBoolean.addItem("True", True)
        self._defaultBoolean.addItem("False", False)
        self._defaultBoolean.currentIndexChanged.connect(self.OnChanged)

        self._defaultString = QLineEdit()
        self._defaultString.textChanged.connect(self.OnChanged)

        self._minimumLabel = QLabel("Minimum")
        self._minimumFloat = QDoubleSpinBox()
        self._minimumFloat.valueChanged.connect(self.OnChanged)
        self._minimumInteger = QSpinBox()
        self._minimumInteger.valueChanged.connect(self.OnChanged)

        self._maximumLabel = QLabel("Maximum")
        self._maximumFloat = QDoubleSpinBox()
        self._maximumFloat.valueChanged.connect(self.OnChanged)
        self._maximumInteger = QSpinBox()
        self._maximumInteger.valueChanged.connect(self.OnChanged)

        gridLayout = QGridLayout()
        gridLayout.setAlignment(Qt.AlignTop)
        gridLayout.addWidget(self._nameLabel, 0, 0)
        gridLayout.addWidget(self._nameField, 0, 1)
        gridLayout.addWidget(self._dataTypeLabel, 1, 0)
        gridLayout.addWidget(self._dataTypeField, 1, 1)
        gridLayout.addWidget(self._defaultValueLabel, 2, 0)

        for defaultField in [
                self._defaultInteger, self._defaultFloat, self._defaultBoolean,
                self._defaultString
        ]:
            gridLayout.addWidget(defaultField, 2, 1)

        gridLayout.addWidget(self._minimumLabel, 3, 0)
        gridLayout.addWidget(self._minimumInteger, 3, 1)
        gridLayout.addWidget(self._minimumFloat, 3, 1)
        gridLayout.addWidget(self._maximumLabel, 4, 0)
        gridLayout.addWidget(self._maximumInteger, 4, 1)
        gridLayout.addWidget(self._maximumFloat, 4, 1)

        layout = QHBoxLayout()
        layout.addLayout(buttonsLayout)
        layout.addLayout(gridLayout)
        self.setLayout(layout)

        self.SetFieldsFromParameter()

    def SetFieldsFromParameter(self):
        self._nameField.setText(self.parameter.name)

        self._dataTypeField.setCurrentText(self.parameter.dataType.ToString())

        minFloat, maxFloat = self.parameter.minimumFloat, self.parameter.maximumFloat
        minInt, maxInt = self.parameter.minimumInteger, self.parameter.maximumInteger
        self._minimumFloat.setRange(-2**30, maxFloat)
        self._maximumFloat.setRange(minFloat, 2**30)
        self._minimumInteger.setRange(-2**30, maxInt)
        self._maximumInteger.setRange(minInt, 2**30)
        if self._minimumFloat.value() != minFloat:
            self._minimumFloat.setValue(minFloat)
        if self._maximumFloat.value() != maxFloat:
            self._maximumFloat.setValue(maxFloat)
        if self._minimumInteger.value() != minInt:
            self._minimumInteger.setValue(minInt)
        if self._maximumInteger.value() != maxInt:
            self._maximumInteger.setValue(maxInt)

        self._defaultInteger.setRange(minInt, maxInt)
        self._defaultFloat.setRange(minFloat, maxFloat)
        if self._defaultInteger.value() != self.parameter.defaultValueDict[
                DataType.INTEGER]:
            self._defaultInteger.setValue(
                self.parameter.defaultValueDict[DataType.INTEGER])
        if self._defaultFloat.value() != self.parameter.defaultValueDict[
                DataType.FLOAT]:
            self._defaultFloat.setValue(
                self.parameter.defaultValueDict[DataType.FLOAT])

        if self._defaultBoolean.currentData(
        ) != self.parameter.defaultValueDict[DataType.BOOLEAN]:
            self._defaultBoolean.setCurrentText(
                str(self.parameter.defaultValueDict[DataType.BOOLEAN]))

        if self._defaultString.text() != self.parameter.defaultValueDict[
                DataType.STRING]:
            self._defaultString.setText(
                self.parameter.defaultValueDict[DataType.STRING])

        self.UpdateVisibility()

    def UpdateVisibility(self):
        self._defaultInteger.setVisible(
            self._dataTypeField.currentData() is DataType.INTEGER)
        self._defaultFloat.setVisible(
            self._dataTypeField.currentData() is DataType.FLOAT)
        self._defaultBoolean.setVisible(
            self._dataTypeField.currentData() is DataType.BOOLEAN)
        self._defaultString.setVisible(
            self._dataTypeField.currentData() is DataType.STRING)

        self._minimumLabel.setVisible(self._dataTypeField.currentData() in
                                      [DataType.INTEGER, DataType.FLOAT])
        self._maximumLabel.setVisible(self._dataTypeField.currentData() in
                                      [DataType.INTEGER, DataType.FLOAT])
        self._minimumInteger.setVisible(
            self._dataTypeField.currentData() is DataType.INTEGER)
        self._maximumInteger.setVisible(
            self._dataTypeField.currentData() is DataType.INTEGER)
        self._minimumFloat.setVisible(
            self._dataTypeField.currentData() is DataType.FLOAT)
        self._maximumFloat.setVisible(
            self._dataTypeField.currentData() is DataType.FLOAT)
        self._minimumLabel.setVisible(self._dataTypeField.currentData() in
                                      [DataType.INTEGER, DataType.FLOAT])
        self._maximumLabel.setVisible(self._dataTypeField.currentData() in
                                      [DataType.INTEGER, DataType.FLOAT])

        self._defaultValueLabel.setVisible(self._dataTypeField.currentData(
        ) not in [DataType.VALVE, DataType.PROGRAM, DataType.PROGRAM_PRESET])

    def OnChanged(self):
        self.UpdateVisibility()
        self._minimumFloat.setMaximum(self._maximumFloat.value())
        self._maximumFloat.setMinimum(self._minimumFloat.value())
        self._minimumInteger.setMaximum(self._maximumInteger.value())
        self._maximumInteger.setMinimum(self._minimumInteger.value())
        self._defaultInteger.setRange(self._minimumInteger.value(),
                                      self._maximumInteger.value())
        self._defaultFloat.setRange(self._minimumFloat.value(),
                                    self._maximumFloat.value())
        self.onChanged.emit()

    def UpdateParameter(self):
        self.parameter.name = self._nameField.text()
        self.parameter.dataType = self._dataTypeField.currentData()

        self.parameter.defaultValueDict[
            DataType.INTEGER] = self._defaultInteger.value()
        self.parameter.defaultValueDict[
            DataType.FLOAT] = self._defaultFloat.value()
        self.parameter.defaultValueDict[
            DataType.BOOLEAN] = self._defaultBoolean.currentData()
        self.parameter.defaultValueDict[
            DataType.STRING] = self._defaultString.text()

        self.parameter.minimumInteger = self._minimumInteger.value()
        self.parameter.maximumInteger = self._maximumInteger.value()
        self.parameter.minimumFloat = self._minimumFloat.value()
        self.parameter.maximumFloat = self._maximumFloat.value()

        self.parameter.ValidateDefaultValues()

        self.SetFieldsFromParameter()
コード例 #18
0
class Ui_PaymentDlg(object):
    def setupUi(self, PaymentDlg):
        if not PaymentDlg.objectName():
            PaymentDlg.setObjectName(u"PaymentDlg")
        PaymentDlg.resize(399, 276)
        self.gridLayout = QGridLayout(PaymentDlg)
        # ifndef Q_OS_MAC
        self.gridLayout.setSpacing(6)
        # endif
        # ifndef Q_OS_MAC
        self.gridLayout.setContentsMargins(9, 9, 9, 9)
        # endif
        self.gridLayout.setObjectName(u"gridLayout")
        self.buttonBox = QDialogButtonBox(PaymentDlg)
        self.buttonBox.setObjectName(u"buttonBox")
        self.buttonBox.setOrientation(Qt.Horizontal)
        self.buttonBox.setStandardButtons(QDialogButtonBox.Cancel
                                          | QDialogButtonBox.NoButton
                                          | QDialogButtonBox.Ok)

        self.gridLayout.addWidget(self.buttonBox, 3, 0, 1, 1)

        self.spacerItem = QSpacerItem(381, 16, QSizePolicy.Minimum,
                                      QSizePolicy.Expanding)

        self.gridLayout.addItem(self.spacerItem, 2, 0, 1, 1)

        self.tabWidget = QTabWidget(PaymentDlg)
        self.tabWidget.setObjectName(u"tabWidget")
        self.tab = QWidget()
        self.tab.setObjectName(u"tab")
        self.hboxLayout = QHBoxLayout(self.tab)
        # ifndef Q_OS_MAC
        self.hboxLayout.setSpacing(6)
        # endif
        # ifndef Q_OS_MAC
        self.hboxLayout.setContentsMargins(9, 9, 9, 9)
        # endif
        self.hboxLayout.setObjectName(u"hboxLayout")
        self.paidCheckBox = QCheckBox(self.tab)
        self.paidCheckBox.setObjectName(u"paidCheckBox")

        self.hboxLayout.addWidget(self.paidCheckBox)

        self.tabWidget.addTab(self.tab, "")
        self.tab_2 = QWidget()
        self.tab_2.setObjectName(u"tab_2")
        self.gridLayout1 = QGridLayout(self.tab_2)
        # ifndef Q_OS_MAC
        self.gridLayout1.setSpacing(6)
        # endif
        # ifndef Q_OS_MAC
        self.gridLayout1.setContentsMargins(9, 9, 9, 9)
        # endif
        self.gridLayout1.setObjectName(u"gridLayout1")
        self.sortCodeLineEdit = QLineEdit(self.tab_2)
        self.sortCodeLineEdit.setObjectName(u"sortCodeLineEdit")

        self.gridLayout1.addWidget(self.sortCodeLineEdit, 1, 3, 1, 1)

        self.label_8 = QLabel(self.tab_2)
        self.label_8.setObjectName(u"label_8")

        self.gridLayout1.addWidget(self.label_8, 1, 2, 1, 1)

        self.bankLineEdit = QLineEdit(self.tab_2)
        self.bankLineEdit.setObjectName(u"bankLineEdit")

        self.gridLayout1.addWidget(self.bankLineEdit, 0, 3, 1, 1)

        self.label_7 = QLabel(self.tab_2)
        self.label_7.setObjectName(u"label_7")

        self.gridLayout1.addWidget(self.label_7, 0, 2, 1, 1)

        self.accountNumLineEdit = QLineEdit(self.tab_2)
        self.accountNumLineEdit.setObjectName(u"accountNumLineEdit")

        self.gridLayout1.addWidget(self.accountNumLineEdit, 1, 1, 1, 1)

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

        self.gridLayout1.addWidget(self.label_6, 1, 0, 1, 1)

        self.checkNumLineEdit = QLineEdit(self.tab_2)
        self.checkNumLineEdit.setObjectName(u"checkNumLineEdit")

        self.gridLayout1.addWidget(self.checkNumLineEdit, 0, 1, 1, 1)

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

        self.gridLayout1.addWidget(self.label_2, 0, 0, 1, 1)

        self.tabWidget.addTab(self.tab_2, "")
        self.tab_3 = QWidget()
        self.tab_3.setObjectName(u"tab_3")
        self.gridLayout2 = QGridLayout(self.tab_3)
        # ifndef Q_OS_MAC
        self.gridLayout2.setSpacing(6)
        # endif
        # ifndef Q_OS_MAC
        self.gridLayout2.setContentsMargins(9, 9, 9, 9)
        # endif
        self.gridLayout2.setObjectName(u"gridLayout2")
        self.creditCardLineEdit = QLineEdit(self.tab_3)
        self.creditCardLineEdit.setObjectName(u"creditCardLineEdit")

        self.gridLayout2.addWidget(self.creditCardLineEdit, 0, 1, 1, 3)

        self.label_11 = QLabel(self.tab_3)
        self.label_11.setObjectName(u"label_11")

        self.gridLayout2.addWidget(self.label_11, 0, 0, 1, 1)

        self.expiryDateEdit = QDateEdit(self.tab_3)
        self.expiryDateEdit.setObjectName(u"expiryDateEdit")
        self.expiryDateEdit.setAlignment(Qt.AlignRight)

        self.gridLayout2.addWidget(self.expiryDateEdit, 1, 3, 1, 1)

        self.label_10 = QLabel(self.tab_3)
        self.label_10.setObjectName(u"label_10")

        self.gridLayout2.addWidget(self.label_10, 1, 2, 1, 1)

        self.validFromDateEdit = QDateEdit(self.tab_3)
        self.validFromDateEdit.setObjectName(u"validFromDateEdit")
        self.validFromDateEdit.setAlignment(Qt.AlignRight)

        self.gridLayout2.addWidget(self.validFromDateEdit, 1, 1, 1, 1)

        self.label_9 = QLabel(self.tab_3)
        self.label_9.setObjectName(u"label_9")

        self.gridLayout2.addWidget(self.label_9, 1, 0, 1, 1)

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

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

        self.gridLayout3 = QGridLayout()
        # ifndef Q_OS_MAC
        self.gridLayout3.setSpacing(6)
        # endif
        self.gridLayout3.setContentsMargins(0, 0, 0, 0)
        self.gridLayout3.setObjectName(u"gridLayout3")
        self.label_3 = QLabel(PaymentDlg)
        self.label_3.setObjectName(u"label_3")

        self.gridLayout3.addWidget(self.label_3, 0, 2, 1, 1)

        self.amountSpinBox = QDoubleSpinBox(PaymentDlg)
        self.amountSpinBox.setObjectName(u"amountSpinBox")
        self.amountSpinBox.setAlignment(Qt.AlignRight)
        self.amountSpinBox.setMaximum(999999.000000000000000)

        self.gridLayout3.addWidget(self.amountSpinBox, 1, 3, 1, 1)

        self.label = QLabel(PaymentDlg)
        self.label.setObjectName(u"label")

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

        self.label_5 = QLabel(PaymentDlg)
        self.label_5.setObjectName(u"label_5")

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

        self.surnameLineEdit = QLineEdit(PaymentDlg)
        self.surnameLineEdit.setObjectName(u"surnameLineEdit")

        self.gridLayout3.addWidget(self.surnameLineEdit, 0, 3, 1, 1)

        self.forenameLineEdit = QLineEdit(PaymentDlg)
        self.forenameLineEdit.setObjectName(u"forenameLineEdit")

        self.gridLayout3.addWidget(self.forenameLineEdit, 0, 1, 1, 1)

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

        self.gridLayout3.addWidget(self.label_4, 1, 2, 1, 1)

        self.invoiceNumSpinBox = QSpinBox(PaymentDlg)
        self.invoiceNumSpinBox.setObjectName(u"invoiceNumSpinBox")
        self.invoiceNumSpinBox.setAlignment(Qt.AlignRight)
        self.invoiceNumSpinBox.setMaximum(999999999)
        self.invoiceNumSpinBox.setMinimum(1000000)
        self.invoiceNumSpinBox.setValue(1000000)

        self.gridLayout3.addWidget(self.invoiceNumSpinBox, 1, 1, 1, 1)

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

        # if QT_CONFIG(shortcut)
        self.label_8.setBuddy(self.sortCodeLineEdit)
        self.label_7.setBuddy(self.bankLineEdit)
        self.label_6.setBuddy(self.accountNumLineEdit)
        self.label_2.setBuddy(self.checkNumLineEdit)
        self.label_11.setBuddy(self.creditCardLineEdit)
        self.label_10.setBuddy(self.expiryDateEdit)
        self.label_9.setBuddy(self.validFromDateEdit)
        self.label_3.setBuddy(self.surnameLineEdit)
        self.label.setBuddy(self.forenameLineEdit)
        self.label_5.setBuddy(self.invoiceNumSpinBox)
        self.label_4.setBuddy(self.amountSpinBox)
        # endif // QT_CONFIG(shortcut)
        QWidget.setTabOrder(self.forenameLineEdit, self.surnameLineEdit)
        QWidget.setTabOrder(self.surnameLineEdit, self.invoiceNumSpinBox)
        QWidget.setTabOrder(self.invoiceNumSpinBox, self.amountSpinBox)
        QWidget.setTabOrder(self.amountSpinBox, self.tabWidget)
        QWidget.setTabOrder(self.tabWidget, self.paidCheckBox)
        QWidget.setTabOrder(self.paidCheckBox, self.checkNumLineEdit)
        QWidget.setTabOrder(self.checkNumLineEdit, self.accountNumLineEdit)
        QWidget.setTabOrder(self.accountNumLineEdit, self.bankLineEdit)
        QWidget.setTabOrder(self.bankLineEdit, self.sortCodeLineEdit)
        QWidget.setTabOrder(self.sortCodeLineEdit, self.creditCardLineEdit)
        QWidget.setTabOrder(self.creditCardLineEdit, self.validFromDateEdit)
        QWidget.setTabOrder(self.validFromDateEdit, self.expiryDateEdit)

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

        self.tabWidget.setCurrentIndex(0)

        QMetaObject.connectSlotsByName(PaymentDlg)

    # setupUi

    def retranslateUi(self, PaymentDlg):
        PaymentDlg.setWindowTitle(
            QCoreApplication.translate("PaymentDlg", u"Payment Form", None))
        self.paidCheckBox.setText(
            QCoreApplication.translate("PaymentDlg", u"&Paid", None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.tab),
            QCoreApplication.translate("PaymentDlg", u"Cas&h", None),
        )
        self.label_8.setText(
            QCoreApplication.translate("PaymentDlg", u"S&ort Code:", None))
        self.label_7.setText(
            QCoreApplication.translate("PaymentDlg", u"&Bank:", None))
        self.label_6.setText(
            QCoreApplication.translate("PaymentDlg", u"A&ccount No.:", None))
        self.label_2.setText(
            QCoreApplication.translate("PaymentDlg", u"Check &No.:", None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.tab_2),
            QCoreApplication.translate("PaymentDlg", u"Chec&k", None),
        )
        self.label_11.setText(
            QCoreApplication.translate("PaymentDlg", u"&Number:", None))
        self.expiryDateEdit.setDisplayFormat(
            QCoreApplication.translate("PaymentDlg", u"MMM yyyy", None))
        self.label_10.setText(
            QCoreApplication.translate("PaymentDlg", u"E&xpiry Date", None))
        self.validFromDateEdit.setDisplayFormat(
            QCoreApplication.translate("PaymentDlg", u"MMM yyyy", None))
        self.label_9.setText(
            QCoreApplication.translate("PaymentDlg", u"&Valid From:", None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.tab_3),
            QCoreApplication.translate("PaymentDlg", u"Credit Car&d", None),
        )
        self.label_3.setText(
            QCoreApplication.translate("PaymentDlg", u"&Surname:", None))
        self.amountSpinBox.setPrefix(
            QCoreApplication.translate("PaymentDlg", u"$ ", None))
        self.label.setText(
            QCoreApplication.translate("PaymentDlg", u"&Forename:", None))
        self.label_5.setText(
            QCoreApplication.translate("PaymentDlg", u"&Invoice No.:", None))
        self.label_4.setText(
            QCoreApplication.translate("PaymentDlg", u"&Amount:", None))
コード例 #19
0
class MainWindow(QMainWindow):
    def __init__(self):
        super().__init__()

        ## declared variables
        self.dir_path = "None selected"
        self.filelist = ["Select Folder"]
        self.filelistindex = None

        self.setWindowTitle("Ephys-Quick Analysis")

        layout = QGridLayout()

        toolbar = QToolBar("Function toolbar")
        self.addToolBar(toolbar)
        self.folderbuttonsetup()
        toolbar.addAction(self.folderbutton)
        self.setStatusBar(QStatusBar(self))

        self.filebox = QComboBox()
        self.filebox.addItems(self.filelist)
        layout.addWidget(self.filebox, 0, 0, 1, 2)

        self.tracelabel = QLabel("Sweep number :")
        layout.addWidget(self.tracelabel, 0, 2)

        self.sweepslider = QSpinBox()
        self.sweepslider.setMinimum(0)
        self.sweepslider.setSingleStep(1)
        layout.addWidget(self.sweepslider, 0, 3, 1, 2)

        self.pw = pg.PlotWidget(name='Clamp')  ## giving the plots names allows us to link their axes together
        layout.addWidget(self.pw, 1, 0, 2, 5)
        self.pw2 = pg.PlotWidget(name='ClampZoom')  ## giving the plots names allows us to link their axes together
        layout.addWidget(self.pw2, 1, 6, 2, 5)
        self.pw3 = pg.PlotWidget(name='Stim')
        layout.addWidget(self.pw3, 6, 0, 2, 5)
        self.pw3.setXLink(self.pw)
        self.pw4 = pg.PlotWidget(name='StimZoom')
        layout.addWidget(self.pw4, 6, 6, 2, 5)
        self.pw4.setXLink(self.pw2)

        self.pw.setBackground('w')
        self.pw2.setBackground('w')
        self.pw3.setBackground('w')
        self.pw4.setBackground('w')

        widget = QWidget()
        widget.setLayout(layout)
        self.setCentralWidget(widget)

    def folderbuttonsetup(self):
        self.folderbutton = QAction("Folder", self)
        self.folderbutton.setStatusTip(self.dir_path)
        self.folderbutton.triggered.connect(self.folderselect)

    def folderselect(self):
        print("click")
        print(self.dir_path)
        self.dir_path = QFileDialog.getExistingDirectory()
        self.folderbutton.setStatusTip(self.dir_path)
        print(self.dir_path)
        self.fileboxlist()

    def fileboxlist(self):
        print('Files within experiment date folder')
        print('ISOLATING ABF FILES...')
        self.dir_path_1 = self.dir_path[2:] + "/"
        self.fileinfolder = os.listdir(self.dir_path_1)
        self.abffiles = [extension for extension in self.fileinfolder if re.search("\.abf$", extension)]
        self.abffiles.sort()
        print('*.abf files in folder:')
        print(self.abffiles)
        self.filebox.clear()
        self.filebox.currentTextChanged.connect(self.fileselected)

        self.filelist = self.abffiles
        self.filebox.addItems(self.filelist)

    def fileselected(self, s):
        print("yo")
        print(s)
        self.fileselected_1 = self.dir_path_1 + s
        print(self.fileselected_1)

        self.pw.clear()
        self.pw2.clear()
        self.pw3.clear()
        self.pw4.clear()

        self.loadabf(self.fileselected_1)

    def loadabf(self, filetoload):
        print("load file")
        self.abf = pyabf.ABF(filetoload)
        self.numsweep = self.abf.sweepCount - 1
        self.sweepslider.cleanText()
        self.sweepslider.setMaximum(self.numsweep)
        self.sweepslider.valueChanged.connect(self.setsweep)

        self.pw.setLabel('left', self.abf.sweepLabelY)
        self.pw.setLabel('bottom', self.abf.sweepLabelX)
        self.pw2.setLabel('left', self.abf.sweepLabelY)
        self.pw2.setLabel('bottom', self.abf.sweepLabelX)
        self.pw3.setLabel('left', self.abf.sweepLabelY)
        self.pw3.setLabel('bottom', self.abf.sweepLabelX)
        self.pw4.setLabel('left', self.abf.sweepLabelY)
        self.pw4.setLabel('bottom', self.abf.sweepLabelX)

        self.zoomarea = pg.LinearRegionItem([0, 1])
        self.zoomarea.setZValue(-10)
        self.pw.addItem(self.zoomarea)

        for sweepnum in self.abf.sweepList:
            self.abf.setSweep(sweepnum, channel=0)
            self.pw.plot(self.abf.sweepX, self.abf.sweepY, pen=pg.mkPen('black', width=1))

        for sweepnum in self.abf.sweepList:
            self.abf.setSweep(sweepnum, channel=1)
            self.pw3.plot(self.abf.sweepX, self.abf.sweepC, pen=pg.mkPen('black', width=1))

        for sweepnum in self.abf.sweepList:
            self.abf.setSweep(sweepnum, channel=0)
            self.pw2.plot(self.abf.sweepX, self.abf.sweepY, pen=pg.mkPen('black', width=1))

        for sweepnum in self.abf.sweepList:
            self.abf.setSweep(sweepnum, channel=1)
            self.pw4.plot(self.abf.sweepX, self.abf.sweepC, pen=pg.mkPen('black', width=1))

        def updatePlot():
            self.pw2.setXRange(*self.zoomarea.getRegion(), padding=0)

        def updateRegion():
            self.zoomarea.setRegion(self.pw2.getViewBox().viewRange()[0])

        self.zoomarea.sigRegionChanged.connect(updatePlot)
        self.pw2.sigXRangeChanged.connect(updateRegion)
        updatePlot()

        self.currenttrace = self.pw.plot()
        self.currenttrace.setPen(pg.mkPen('r', width=2.5))
        self.currenttrace2 = self.pw2.plot()
        self.currenttrace2.setPen(pg.mkPen('r', width=2.5))
        self.currenttrace3 = self.pw3.plot()
        self.currenttrace3.setPen(pg.mkPen('r', width=2.5))
        self.currenttrace4 = self.pw4.plot()
        self.currenttrace4.setPen(pg.mkPen('r', width=2.5))

    def setsweep(self, numofsweep):
        print(numofsweep)
        self.currenttrace.clear()
        self.currenttrace2.clear()
        self.currenttrace3.clear()
        self.currenttrace4.clear()
        for sweepnum in self.abf.sweepList:
            self.abf.setSweep(sweepnum, channel=0)
            if sweepnum == numofsweep:
                self.currenttrace.setData(self.abf.sweepX, self.abf.sweepY)
        for sweepnum in self.abf.sweepList:
            self.abf.setSweep(sweepnum, channel=1)
            if sweepnum == numofsweep:
                self.currenttrace3.setData(self.abf.sweepX, self.abf.sweepC)
        for sweepnum in self.abf.sweepList:
            self.abf.setSweep(sweepnum, channel=0)
            if sweepnum == numofsweep:
                self.currenttrace2.setData(self.abf.sweepX, self.abf.sweepY)
        for sweepnum in self.abf.sweepList:
            self.abf.setSweep(sweepnum, channel=1)
            if sweepnum == numofsweep:
                self.currenttrace4.setData(self.abf.sweepX, self.abf.sweepC)
コード例 #20
0
class Ui_Form(object):
    def setupUi(self, insertTab):
        if not insertTab.objectName():
            insertTab.setObjectName(u"insertTab")
        self.formLayout_3 = QFormLayout(insertTab)
        self.formLayout_3.setObjectName(u"formLayout_3")
        self.formLayout_3.setVerticalSpacing(40)
        self.formLayout_3.setContentsMargins(-1, 40, -1, -1)
        self.label_32 = QLabel(insertTab)
        self.label_32.setObjectName(u"label_32")

        self.formLayout_3.setWidget(0, QFormLayout.LabelRole, self.label_32)

        self.horizontalLayout_20 = QHBoxLayout()
        self.horizontalLayout_20.setObjectName(u"horizontalLayout_20")
        self.insertImgPath = QLineEdit(insertTab)
        self.insertImgPath.setObjectName(u"insertImgPath")

        self.horizontalLayout_20.addWidget(self.insertImgPath)

        self.insertBrowseImgBtn = QPushButton(insertTab)
        self.insertBrowseImgBtn.setObjectName(u"insertBrowseImgBtn")

        self.horizontalLayout_20.addWidget(self.insertBrowseImgBtn)

        self.formLayout_3.setLayout(0, QFormLayout.FieldRole,
                                    self.horizontalLayout_20)

        self.label_13 = QLabel(insertTab)
        self.label_13.setObjectName(u"label_13")

        self.formLayout_3.setWidget(1, QFormLayout.LabelRole, self.label_13)

        self.horizontalLayout_18 = QHBoxLayout()
        self.horizontalLayout_18.setObjectName(u"horizontalLayout_18")
        self.label_26 = QLabel(insertTab)
        self.label_26.setObjectName(u"label_26")
        self.label_26.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_18.addWidget(self.label_26)

        self.insertFgX = QSpinBox(insertTab)
        self.insertFgX.setObjectName(u"insertFgX")
        sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.insertFgX.sizePolicy().hasHeightForWidth())
        self.insertFgX.setSizePolicy(sizePolicy)
        self.insertFgX.setMaximum(10000000)

        self.horizontalLayout_18.addWidget(self.insertFgX)

        self.label_29 = QLabel(insertTab)
        self.label_29.setObjectName(u"label_29")
        self.label_29.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_18.addWidget(self.label_29)

        self.insertFgY = QSpinBox(insertTab)
        self.insertFgY.setObjectName(u"insertFgY")
        self.insertFgY.setMaximum(10000000)

        self.horizontalLayout_18.addWidget(self.insertFgY)

        self.formLayout_3.setLayout(1, QFormLayout.FieldRole,
                                    self.horizontalLayout_18)

        self.label_12 = QLabel(insertTab)
        self.label_12.setObjectName(u"label_12")

        self.formLayout_3.setWidget(2, QFormLayout.LabelRole, self.label_12)

        self.horizontalLayout_21 = QHBoxLayout()
        self.horizontalLayout_21.setObjectName(u"horizontalLayout_21")
        self.label_33 = QLabel(insertTab)
        self.label_33.setObjectName(u"label_33")
        self.label_33.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_21.addWidget(self.label_33)

        self.insertFgW = QSpinBox(insertTab)
        self.insertFgW.setObjectName(u"insertFgW")
        self.insertFgW.setBaseSize(QSize(1920, 0))
        self.insertFgW.setMaximum(1000000)
        self.insertFgW.setValue(1920)

        self.horizontalLayout_21.addWidget(self.insertFgW)

        self.label_34 = QLabel(insertTab)
        self.label_34.setObjectName(u"label_34")
        self.label_34.setAlignment(Qt.AlignCenter)

        self.horizontalLayout_21.addWidget(self.label_34)

        self.insertFgH = QSpinBox(insertTab)
        self.insertFgH.setObjectName(u"insertFgH")
        self.insertFgH.setMaximum(1000000000)
        self.insertFgH.setValue(1080)

        self.horizontalLayout_21.addWidget(self.insertFgH)

        self.formLayout_3.setLayout(2, QFormLayout.FieldRole,
                                    self.horizontalLayout_21)

        self.retranslateUi(insertTab)

        QMetaObject.connectSlotsByName(insertTab)

    # setupUi

    def retranslateUi(self, insertTab):
        self.label_32.setText(
            QCoreApplication.translate("Form", u"Image to paste", None))
        self.insertBrowseImgBtn.setText(
            QCoreApplication.translate("Form", u"Browse", None))
        self.label_13.setText(
            QCoreApplication.translate("Form", u"Coords of image on assets",
                                       None))
        self.label_26.setText(QCoreApplication.translate("Form", u"X", None))
        self.label_29.setText(QCoreApplication.translate("Form", u"Y", None))
        self.label_12.setText(
            QCoreApplication.translate("Form",
                                       u"Dimensions of image on assets", None))
        self.label_33.setText(
            QCoreApplication.translate("Form", u"Width", None))
        self.label_34.setText(
            QCoreApplication.translate("Form", u"Height", None))
        pass
コード例 #21
0
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        if not MainWindow.objectName():
            MainWindow.setObjectName(u"MainWindow")
        MainWindow.resize(911, 607)
        self.action_open = QAction(MainWindow)
        self.action_open.setObjectName(u"action_open")
        self.action_open.setVisible(False)
        self.action_comparison = QAction(MainWindow)
        self.action_comparison.setObjectName(u"action_comparison")
        self.action_comparison.setVisible(False)
        self.action_plot = QAction(MainWindow)
        self.action_plot.setObjectName(u"action_plot")
        self.action_training_session = QAction(MainWindow)
        self.action_training_session.setObjectName(u"action_training_session")
        self.action_training_session.setVisible(False)
        self.action_game = QAction(MainWindow)
        self.action_game.setObjectName(u"action_game")
        self.action_save = QAction(MainWindow)
        self.action_save.setObjectName(u"action_save")
        self.action_save.setVisible(False)
        self.action_save_log = QAction(MainWindow)
        self.action_save_log.setObjectName(u"action_save_log")
        self.action_save_log.setVisible(False)
        self.action_coordinates = QAction(MainWindow)
        self.action_coordinates.setObjectName(u"action_coordinates")
        self.action_coordinates.setCheckable(True)
        self.action_about = QAction(MainWindow)
        self.action_about.setObjectName(u"action_about")
        self.action_new_db = QAction(MainWindow)
        self.action_new_db.setObjectName(u"action_new_db")
        self.action_open_db = QAction(MainWindow)
        self.action_open_db.setObjectName(u"action_open_db")
        self.centralwidget = QWidget(MainWindow)
        self.centralwidget.setObjectName(u"centralwidget")
        self.verticalLayout_2 = QVBoxLayout(self.centralwidget)
        self.verticalLayout_2.setObjectName(u"verticalLayout_2")
        self.stacked_widget = QStackedWidget(self.centralwidget)
        self.stacked_widget.setObjectName(u"stacked_widget")
        self.game_page = QWidget()
        self.game_page.setObjectName(u"game_page")
        self.gridLayout_3 = QGridLayout(self.game_page)
        self.gridLayout_3.setObjectName(u"gridLayout_3")
        self.connect4 = QPushButton(self.game_page)
        self.connect4.setObjectName(u"connect4")
        sizePolicy = QSizePolicy(QSizePolicy.Minimum,
                                 QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.connect4.sizePolicy().hasHeightForWidth())
        self.connect4.setSizePolicy(sizePolicy)

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

        self.tic_tac_toe = QPushButton(self.game_page)
        self.tic_tac_toe.setObjectName(u"tic_tac_toe")
        sizePolicy1 = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
        sizePolicy1.setHorizontalStretch(0)
        sizePolicy1.setVerticalStretch(0)
        sizePolicy1.setHeightForWidth(
            self.tic_tac_toe.sizePolicy().hasHeightForWidth())
        self.tic_tac_toe.setSizePolicy(sizePolicy1)

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

        self.othello = QPushButton(self.game_page)
        self.othello.setObjectName(u"othello")
        sizePolicy.setHeightForWidth(
            self.othello.sizePolicy().hasHeightForWidth())
        self.othello.setSizePolicy(sizePolicy)

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

        self.stacked_widget.addWidget(self.game_page)
        self.players_page = QWidget()
        self.players_page.setObjectName(u"players_page")
        self.verticalLayout = QVBoxLayout(self.players_page)
        self.verticalLayout.setObjectName(u"verticalLayout")
        self.player_layout = QGridLayout()
        self.player_layout.setObjectName(u"player_layout")
        self.searches_lock2 = QCheckBox(self.players_page)
        self.searches_lock2.setObjectName(u"searches_lock2")

        self.player_layout.addWidget(self.searches_lock2, 2, 4, 1, 1)

        self.player1 = QComboBox(self.players_page)
        self.player1.setObjectName(u"player1")
        sizePolicy2 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
        sizePolicy2.setHorizontalStretch(0)
        sizePolicy2.setVerticalStretch(0)
        sizePolicy2.setHeightForWidth(
            self.player1.sizePolicy().hasHeightForWidth())
        self.player1.setSizePolicy(sizePolicy2)

        self.player_layout.addWidget(self.player1, 1, 1, 1, 1)

        self.cancel = QPushButton(self.players_page)
        self.cancel.setObjectName(u"cancel")

        self.player_layout.addWidget(self.cancel, 4, 0, 1, 1)

        self.searches_label1 = QLabel(self.players_page)
        self.searches_label1.setObjectName(u"searches_label1")
        sizePolicy3 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Preferred)
        sizePolicy3.setHorizontalStretch(0)
        sizePolicy3.setVerticalStretch(0)
        sizePolicy3.setHeightForWidth(
            self.searches_label1.sizePolicy().hasHeightForWidth())
        self.searches_label1.setSizePolicy(sizePolicy3)

        self.player_layout.addWidget(self.searches_label1, 1, 3, 1, 1)

        self.player2 = QComboBox(self.players_page)
        self.player2.setObjectName(u"player2")
        sizePolicy2.setHeightForWidth(
            self.player2.sizePolicy().hasHeightForWidth())
        self.player2.setSizePolicy(sizePolicy2)

        self.player_layout.addWidget(self.player2, 2, 1, 1, 1)

        self.searches_lock1 = QCheckBox(self.players_page)
        self.searches_lock1.setObjectName(u"searches_lock1")

        self.player_layout.addWidget(self.searches_lock1, 1, 4, 1, 1)

        self.game_label = QLabel(self.players_page)
        self.game_label.setObjectName(u"game_label")
        sizePolicy4 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy4.setHorizontalStretch(0)
        sizePolicy4.setVerticalStretch(0)
        sizePolicy4.setHeightForWidth(
            self.game_label.sizePolicy().hasHeightForWidth())
        self.game_label.setSizePolicy(sizePolicy4)

        self.player_layout.addWidget(self.game_label, 0, 0, 1, 1)

        self.game_name = QLabel(self.players_page)
        self.game_name.setObjectName(u"game_name")

        self.player_layout.addWidget(self.game_name, 0, 1, 1, 4)

        self.searches_label2 = QLabel(self.players_page)
        self.searches_label2.setObjectName(u"searches_label2")

        self.player_layout.addWidget(self.searches_label2, 2, 3, 1, 1)

        self.player_label1 = QLabel(self.players_page)
        self.player_label1.setObjectName(u"player_label1")
        sizePolicy4.setHeightForWidth(
            self.player_label1.sizePolicy().hasHeightForWidth())
        self.player_label1.setSizePolicy(sizePolicy4)

        self.player_layout.addWidget(self.player_label1, 1, 0, 1, 1)

        self.searches1 = QSpinBox(self.players_page)
        self.searches1.setObjectName(u"searches1")
        sizePolicy5 = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Fixed)
        sizePolicy5.setHorizontalStretch(0)
        sizePolicy5.setVerticalStretch(0)
        sizePolicy5.setHeightForWidth(
            self.searches1.sizePolicy().hasHeightForWidth())
        self.searches1.setSizePolicy(sizePolicy5)
        self.searches1.setMaximum(1000000)

        self.player_layout.addWidget(self.searches1, 1, 2, 1, 1)

        self.player_label2 = QLabel(self.players_page)
        self.player_label2.setObjectName(u"player_label2")

        self.player_layout.addWidget(self.player_label2, 2, 0, 1, 1)

        self.shuffle_players = QCheckBox(self.players_page)
        self.shuffle_players.setObjectName(u"shuffle_players")

        self.player_layout.addWidget(self.shuffle_players, 3, 1, 1, 4)

        self.searches2 = QSpinBox(self.players_page)
        self.searches2.setObjectName(u"searches2")
        sizePolicy5.setHeightForWidth(
            self.searches2.sizePolicy().hasHeightForWidth())
        self.searches2.setSizePolicy(sizePolicy5)
        self.searches2.setMaximum(1000000)

        self.player_layout.addWidget(self.searches2, 2, 2, 1, 1)

        self.start = QPushButton(self.players_page)
        self.start.setObjectName(u"start")

        self.player_layout.addWidget(self.start, 4, 1, 1, 4)

        self.player_layout.setColumnStretch(1, 10)
        self.player_layout.setColumnStretch(2, 1)

        self.verticalLayout.addLayout(self.player_layout)

        self.stacked_widget.addWidget(self.players_page)
        self.humans_page = QWidget()
        self.humans_page.setObjectName(u"humans_page")
        self.gridLayout = QGridLayout(self.humans_page)
        self.gridLayout.setObjectName(u"gridLayout")
        self.close_humans = QPushButton(self.humans_page)
        self.close_humans.setObjectName(u"close_humans")
        sizePolicy4.setHeightForWidth(
            self.close_humans.sizePolicy().hasHeightForWidth())
        self.close_humans.setSizePolicy(sizePolicy4)

        self.gridLayout.addWidget(self.close_humans, 1, 1, 1, 1)

        self.players_label = QLabel(self.humans_page)
        self.players_label.setObjectName(u"players_label")

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

        self.new_human = QPushButton(self.humans_page)
        self.new_human.setObjectName(u"new_human")
        sizePolicy4.setHeightForWidth(
            self.new_human.sizePolicy().hasHeightForWidth())
        self.new_human.setSizePolicy(sizePolicy4)

        self.gridLayout.addWidget(self.new_human, 1, 3, 1, 1)

        self.players_table = QTableWidget(self.humans_page)
        self.players_table.setObjectName(u"players_table")

        self.gridLayout.addWidget(self.players_table, 0, 1, 1, 3)

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

        self.gridLayout.addItem(self.spacer, 1, 2, 1, 1)

        self.stacked_widget.addWidget(self.humans_page)
        self.rules_page = QWidget()
        self.rules_page.setObjectName(u"rules_page")
        self.gridLayout_4 = QGridLayout(self.rules_page)
        self.gridLayout_4.setObjectName(u"gridLayout_4")
        self.rules_text = QTextBrowser(self.rules_page)
        self.rules_text.setObjectName(u"rules_text")

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

        self.rules_close = QPushButton(self.rules_page)
        self.rules_close.setObjectName(u"rules_close")
        sizePolicy4.setHeightForWidth(
            self.rules_close.sizePolicy().hasHeightForWidth())
        self.rules_close.setSizePolicy(sizePolicy4)

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

        self.stacked_widget.addWidget(self.rules_page)
        self.display_page = QWidget()
        self.display_page.setObjectName(u"display_page")
        self.gridLayout_2 = QGridLayout(self.display_page)
        self.gridLayout_2.setObjectName(u"gridLayout_2")
        self.toggle_review = QPushButton(self.display_page)
        self.toggle_review.setObjectName(u"toggle_review")
        sizePolicy4.setHeightForWidth(
            self.toggle_review.sizePolicy().hasHeightForWidth())
        self.toggle_review.setSizePolicy(sizePolicy4)

        self.gridLayout_2.addWidget(self.toggle_review, 3, 2, 1, 1)

        self.move_history = QComboBox(self.display_page)
        self.move_history.setObjectName(u"move_history")
        sizePolicy6 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
        sizePolicy6.setHorizontalStretch(1)
        sizePolicy6.setVerticalStretch(0)
        sizePolicy6.setHeightForWidth(
            self.move_history.sizePolicy().hasHeightForWidth())
        self.move_history.setSizePolicy(sizePolicy6)

        self.gridLayout_2.addWidget(self.move_history, 3, 1, 1, 1)

        self.choices = QTableWidget(self.display_page)
        self.choices.setObjectName(u"choices")
        sizePolicy7 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
        sizePolicy7.setHorizontalStretch(0)
        sizePolicy7.setVerticalStretch(0)
        sizePolicy7.setHeightForWidth(
            self.choices.sizePolicy().hasHeightForWidth())
        self.choices.setSizePolicy(sizePolicy7)

        self.gridLayout_2.addWidget(self.choices, 1, 0, 1, 3)

        self.resume_here = QPushButton(self.display_page)
        self.resume_here.setObjectName(u"resume_here")
        sizePolicy5.setHeightForWidth(
            self.resume_here.sizePolicy().hasHeightForWidth())
        self.resume_here.setSizePolicy(sizePolicy5)

        self.gridLayout_2.addWidget(self.resume_here, 3, 0, 1, 1)

        self.game_display = QLabel(self.display_page)
        self.game_display.setObjectName(u"game_display")

        self.gridLayout_2.addWidget(self.game_display, 0, 0, 1, 3)

        self.stacked_widget.addWidget(self.display_page)
        self.plot_strength_page = QWidget()
        self.plot_strength_page.setObjectName(u"plot_strength_page")
        self.gridLayout_5 = QGridLayout(self.plot_strength_page)
        self.gridLayout_5.setObjectName(u"gridLayout_5")
        self.label = QLabel(self.plot_strength_page)
        self.label.setObjectName(u"label")

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

        self.plot_game = QComboBox(self.plot_strength_page)
        self.plot_game.setObjectName(u"plot_game")

        self.gridLayout_5.addWidget(self.plot_game, 0, 1, 1, 2)

        self.lineEdit = QLineEdit(self.plot_strength_page)
        self.lineEdit.setObjectName(u"lineEdit")

        self.gridLayout_5.addWidget(self.lineEdit, 2, 1, 1, 2)

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

        self.gridLayout_5.addWidget(self.label_2, 3, 0, 1, 1)

        self.lineEdit_2 = QLineEdit(self.plot_strength_page)
        self.lineEdit_2.setObjectName(u"lineEdit_2")

        self.gridLayout_5.addWidget(self.lineEdit_2, 3, 1, 1, 2)

        self.reset_plot = QPushButton(self.plot_strength_page)
        self.reset_plot.setObjectName(u"reset_plot")

        self.gridLayout_5.addWidget(self.reset_plot, 6, 2, 1, 1)

        self.start_stop_plot = QPushButton(self.plot_strength_page)
        self.start_stop_plot.setObjectName(u"start_stop_plot")

        self.gridLayout_5.addWidget(self.start_stop_plot, 6, 1, 1, 1)

        self.strengths_label = QLabel(self.plot_strength_page)
        self.strengths_label.setObjectName(u"strengths_label")

        self.gridLayout_5.addWidget(self.strengths_label, 2, 0, 1, 1)

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

        self.gridLayout_5.addWidget(self.label_3, 4, 0, 1, 1)

        self.lineEdit_3 = QLineEdit(self.plot_strength_page)
        self.lineEdit_3.setObjectName(u"lineEdit_3")

        self.gridLayout_5.addWidget(self.lineEdit_3, 4, 1, 1, 2)

        self.stacked_widget.addWidget(self.plot_strength_page)
        self.plot_history_page = QWidget()
        self.plot_history_page.setObjectName(u"plot_history_page")
        self.gridLayout_6 = QGridLayout(self.plot_history_page)
        self.gridLayout_6.setObjectName(u"gridLayout_6")
        self.label_4 = QLabel(self.plot_history_page)
        self.label_4.setObjectName(u"label_4")

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

        self.history_game = QComboBox(self.plot_history_page)
        self.history_game.setObjectName(u"history_game")

        self.gridLayout_6.addWidget(self.history_game, 0, 1, 1, 1)

        self.gridLayout_6.setColumnStretch(0, 1)
        self.gridLayout_6.setColumnStretch(1, 8)
        self.stacked_widget.addWidget(self.plot_history_page)

        self.verticalLayout_2.addWidget(self.stacked_widget)

        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QMenuBar(MainWindow)
        self.menubar.setObjectName(u"menubar")
        self.menubar.setGeometry(QRect(0, 0, 911, 22))
        self.menu_file = QMenu(self.menubar)
        self.menu_file.setObjectName(u"menu_file")
        self.menu_new = QMenu(self.menu_file)
        self.menu_new.setObjectName(u"menu_new")
        self.menu_view = QMenu(self.menubar)
        self.menu_view.setObjectName(u"menu_view")
        self.menu_help = QMenu(self.menubar)
        self.menu_help.setObjectName(u"menu_help")
        self.menu_rules = QMenu(self.menu_help)
        self.menu_rules.setObjectName(u"menu_rules")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QStatusBar(MainWindow)
        self.statusbar.setObjectName(u"statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.menubar.addAction(self.menu_file.menuAction())
        self.menubar.addAction(self.menu_view.menuAction())
        self.menubar.addAction(self.menu_help.menuAction())
        self.menu_file.addAction(self.menu_new.menuAction())
        self.menu_file.addAction(self.action_open)
        self.menu_file.addAction(self.action_save)
        self.menu_file.addAction(self.action_save_log)
        self.menu_file.addAction(self.action_new_db)
        self.menu_file.addAction(self.action_open_db)
        self.menu_new.addAction(self.action_game)
        self.menu_new.addAction(self.action_comparison)
        self.menu_new.addAction(self.action_plot)
        self.menu_new.addAction(self.action_training_session)
        self.menu_view.addAction(self.action_coordinates)
        self.menu_help.addAction(self.action_about)
        self.menu_help.addAction(self.menu_rules.menuAction())

        self.retranslateUi(MainWindow)

        self.stacked_widget.setCurrentIndex(2)

        QMetaObject.connectSlotsByName(MainWindow)

    # setupUi

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(
            QCoreApplication.translate("MainWindow", u"MainWindow", None))
        self.action_open.setText(
            QCoreApplication.translate("MainWindow", u"&Open...", None))
        self.action_comparison.setText(
            QCoreApplication.translate("MainWindow", u"&Comparison", None))
        self.action_plot.setText(
            QCoreApplication.translate("MainWindow", u"&Plot", None))
        self.action_training_session.setText(
            QCoreApplication.translate("MainWindow", u"&Training Session",
                                       None))
        self.action_game.setText(
            QCoreApplication.translate("MainWindow", u"&Game", None))
        self.action_save.setText(
            QCoreApplication.translate("MainWindow", u"&Save...", None))
        self.action_save_log.setText(
            QCoreApplication.translate("MainWindow", u"Save &Log...", None))
        self.action_coordinates.setText(
            QCoreApplication.translate("MainWindow", u"Coordinates", None))
        self.action_about.setText(
            QCoreApplication.translate("MainWindow", u"&About...", None))
        self.action_new_db.setText(
            QCoreApplication.translate("MainWindow",
                                       u"New Player &Database...", None))
        self.action_open_db.setText(
            QCoreApplication.translate("MainWindow",
                                       u"&Open Player Database...", None))
        self.connect4.setText(
            QCoreApplication.translate("MainWindow", u"Connect 4", None))
        self.tic_tac_toe.setText(
            QCoreApplication.translate("MainWindow", u"Tic Tac Toe", None))
        self.othello.setText(
            QCoreApplication.translate("MainWindow", u"Othello", None))
        self.searches_lock2.setText(
            QCoreApplication.translate("MainWindow", u"Lock", None))
        self.cancel.setText(
            QCoreApplication.translate("MainWindow", u"Cancel", None))
        self.searches_label1.setText(
            QCoreApplication.translate("MainWindow", u"searches", None))
        self.searches_lock1.setText(
            QCoreApplication.translate("MainWindow", u"Lock", None))
        self.game_label.setText(
            QCoreApplication.translate("MainWindow", u"Game:", None))
        self.game_name.setText(
            QCoreApplication.translate("MainWindow", u"Chosen Game's Name",
                                       None))
        self.searches_label2.setText(
            QCoreApplication.translate("MainWindow", u"searches", None))
        self.player_label1.setText(
            QCoreApplication.translate("MainWindow", u"Player 1:", None))
        self.player_label2.setText(
            QCoreApplication.translate("MainWindow", u"Player 2:", None))
        self.shuffle_players.setText(
            QCoreApplication.translate("MainWindow", u"Shuffle Player Order",
                                       None))
        self.start.setText(
            QCoreApplication.translate("MainWindow", u"Start", None))
        self.close_humans.setText(
            QCoreApplication.translate("MainWindow", u"OK", None))
        self.players_label.setText(
            QCoreApplication.translate("MainWindow", u"Players", None))
        self.new_human.setText(
            QCoreApplication.translate("MainWindow", u"New", None))
        self.rules_close.setText(
            QCoreApplication.translate("MainWindow", u"Close", None))
        self.toggle_review.setText(
            QCoreApplication.translate("MainWindow", u"Review / Resume", None))
        self.resume_here.setText(
            QCoreApplication.translate("MainWindow", u"Resume Here", None))
        self.game_display.setText(
            QCoreApplication.translate("MainWindow", u"Game Display", None))
        self.label.setText(
            QCoreApplication.translate("MainWindow", u"Game:", None))
        #if QT_CONFIG(whatsthis)
        self.lineEdit.setWhatsThis("")
        #endif // QT_CONFIG(whatsthis)
        self.label_2.setText(
            QCoreApplication.translate("MainWindow", u"Opponent min:", None))
        self.reset_plot.setText(
            QCoreApplication.translate("MainWindow", u"Reset", None))
        self.start_stop_plot.setText(
            QCoreApplication.translate("MainWindow", u"Start / Stop", None))
        self.strengths_label.setText(
            QCoreApplication.translate("MainWindow", u"Player Strengths:",
                                       None))
        self.label_3.setText(
            QCoreApplication.translate("MainWindow", u"Opponent max:", None))
        self.label_4.setText(
            QCoreApplication.translate("MainWindow", u"Game:", None))
        self.menu_file.setTitle(
            QCoreApplication.translate("MainWindow", u"&File", None))
        self.menu_new.setTitle(
            QCoreApplication.translate("MainWindow", u"&New", None))
        self.menu_view.setTitle(
            QCoreApplication.translate("MainWindow", u"&View", None))
        self.menu_help.setTitle(
            QCoreApplication.translate("MainWindow", u"&Help", None))
        self.menu_rules.setTitle(
            QCoreApplication.translate("MainWindow", u"&Rules", None))
コード例 #22
0
class Ui_TaxExportDlg(object):
    def setupUi(self, TaxExportDlg):
        if not TaxExportDlg.objectName():
            TaxExportDlg.setObjectName(u"TaxExportDlg")
        TaxExportDlg.resize(602, 315)
        self.gridLayout = QGridLayout(TaxExportDlg)
        self.gridLayout.setObjectName(u"gridLayout")
        self.gridLayout.setHorizontalSpacing(6)
        self.gridLayout.setContentsMargins(9, 9, 9, 9)
        self.line = QFrame(TaxExportDlg)
        self.line.setObjectName(u"line")
        self.line.setFrameShape(QFrame.HLine)
        self.line.setFrameShadow(QFrame.Sunken)

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

        self.XlsSelectBtn = QPushButton(TaxExportDlg)
        self.XlsSelectBtn.setObjectName(u"XlsSelectBtn")
        sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.XlsSelectBtn.sizePolicy().hasHeightForWidth())
        self.XlsSelectBtn.setSizePolicy(sizePolicy)

        self.gridLayout.addWidget(self.XlsSelectBtn, 3, 2, 1, 1)

        self.WarningLbl = QLabel(TaxExportDlg)
        self.WarningLbl.setObjectName(u"WarningLbl")
        font = QFont()
        font.setItalic(True)
        self.WarningLbl.setFont(font)

        self.gridLayout.addWidget(self.WarningLbl, 5, 0, 1, 4)

        self.DlsgGroup = QGroupBox(TaxExportDlg)
        self.DlsgGroup.setObjectName(u"DlsgGroup")
        sizePolicy1 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
        sizePolicy1.setHorizontalStretch(0)
        sizePolicy1.setVerticalStretch(0)
        sizePolicy1.setHeightForWidth(
            self.DlsgGroup.sizePolicy().hasHeightForWidth())
        self.DlsgGroup.setSizePolicy(sizePolicy1)
        self.DlsgGroup.setFlat(False)
        self.DlsgGroup.setCheckable(True)
        self.DlsgGroup.setChecked(False)
        self.gridLayout_2 = QGridLayout(self.DlsgGroup)
        self.gridLayout_2.setSpacing(2)
        self.gridLayout_2.setObjectName(u"gridLayout_2")
        self.gridLayout_2.setContentsMargins(6, 6, 6, 6)
        self.InitialFileLbl = QLabel(self.DlsgGroup)
        self.InitialFileLbl.setObjectName(u"InitialFileLbl")

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

        self.DlsgOutFileName = QLineEdit(self.DlsgGroup)
        self.DlsgOutFileName.setObjectName(u"DlsgOutFileName")

        self.gridLayout_2.addWidget(self.DlsgOutFileName, 1, 1, 1, 1)

        self.DlsgInFileName = QLineEdit(self.DlsgGroup)
        self.DlsgInFileName.setObjectName(u"DlsgInFileName")

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

        self.OutputFileLbl = QLabel(self.DlsgGroup)
        self.OutputFileLbl.setObjectName(u"OutputFileLbl")

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

        self.DividendsOnly = QCheckBox(self.DlsgGroup)
        self.DividendsOnly.setObjectName(u"DividendsOnly")

        self.gridLayout_2.addWidget(self.DividendsOnly, 3, 0, 1, 3)

        self.OutputSelectBtn = QPushButton(self.DlsgGroup)
        self.OutputSelectBtn.setObjectName(u"OutputSelectBtn")

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

        self.InitialSelectBtn = QPushButton(self.DlsgGroup)
        self.InitialSelectBtn.setObjectName(u"InitialSelectBtn")

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

        self.IncomeSourceBroker = QCheckBox(self.DlsgGroup)
        self.IncomeSourceBroker.setObjectName(u"IncomeSourceBroker")
        self.IncomeSourceBroker.setChecked(True)

        self.gridLayout_2.addWidget(self.IncomeSourceBroker, 2, 0, 1, 3)

        self.gridLayout.addWidget(self.DlsgGroup, 7, 0, 1, 4)

        self.Year = QSpinBox(TaxExportDlg)
        self.Year.setObjectName(u"Year")
        self.Year.setAlignment(Qt.AlignRight | Qt.AlignTrailing
                               | Qt.AlignVCenter)
        self.Year.setMinimum(2010)
        self.Year.setMaximum(2030)
        self.Year.setValue(2020)

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

        self.XlsFileName = QLineEdit(TaxExportDlg)
        self.XlsFileName.setObjectName(u"XlsFileName")
        sizePolicy2 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
        sizePolicy2.setHorizontalStretch(0)
        sizePolicy2.setVerticalStretch(0)
        sizePolicy2.setHeightForWidth(
            self.XlsFileName.sizePolicy().hasHeightForWidth())
        self.XlsFileName.setSizePolicy(sizePolicy2)

        self.gridLayout.addWidget(self.XlsFileName, 3, 1, 1, 1)

        self.AccountWidget = AccountSelector(TaxExportDlg)
        self.AccountWidget.setObjectName(u"AccountWidget")

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

        self.YearLbl = QLabel(TaxExportDlg)
        self.YearLbl.setObjectName(u"YearLbl")

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

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

        self.gridLayout.addWidget(self.buttonBox, 1, 3, 3, 1)

        self.AccountLbl = QLabel(TaxExportDlg)
        self.AccountLbl.setObjectName(u"AccountLbl")

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

        self.XlsFileLbl = QLabel(TaxExportDlg)
        self.XlsFileLbl.setObjectName(u"XlsFileLbl")

        self.gridLayout.addWidget(self.XlsFileLbl, 3, 0, 1, 1)

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

        self.gridLayout.addItem(self.verticalSpacer, 9, 0, 1, 1)

        self.NoSettlement = QCheckBox(TaxExportDlg)
        self.NoSettlement.setObjectName(u"NoSettlement")

        self.gridLayout.addWidget(self.NoSettlement, 8, 0, 1, 4)

        QWidget.setTabOrder(self.Year, self.XlsFileName)
        QWidget.setTabOrder(self.XlsFileName, self.XlsSelectBtn)
        QWidget.setTabOrder(self.XlsSelectBtn, self.DlsgGroup)
        QWidget.setTabOrder(self.DlsgGroup, self.DlsgInFileName)
        QWidget.setTabOrder(self.DlsgInFileName, self.InitialSelectBtn)
        QWidget.setTabOrder(self.InitialSelectBtn, self.DlsgOutFileName)
        QWidget.setTabOrder(self.DlsgOutFileName, self.OutputSelectBtn)

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

        QMetaObject.connectSlotsByName(TaxExportDlg)

    # setupUi

    def retranslateUi(self, TaxExportDlg):
        TaxExportDlg.setWindowTitle(
            QCoreApplication.translate(
                "TaxExportDlg", u"Select parameters and files for tax report",
                None))
        #if QT_CONFIG(tooltip)
        self.XlsSelectBtn.setToolTip(
            QCoreApplication.translate("TaxExportDlg", u"Select file", None))
        #endif // QT_CONFIG(tooltip)
        self.XlsSelectBtn.setText(
            QCoreApplication.translate("TaxExportDlg", u"...", None))
        self.WarningLbl.setText(
            QCoreApplication.translate(
                "TaxExportDlg",
                u"Below functions are experimental - use it with care", None))
        self.DlsgGroup.setTitle(
            QCoreApplication.translate(
                "TaxExportDlg",
                u"Update file \"\u0414\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f\" (*.dc0)",
                None))
        self.InitialFileLbl.setText(
            QCoreApplication.translate("TaxExportDlg", u"Initial file:", None))
        #if QT_CONFIG(tooltip)
        self.DlsgOutFileName.setToolTip(
            QCoreApplication.translate(
                "TaxExportDlg", u"File where to store russian tax form", None))
        #endif // QT_CONFIG(tooltip)
        #if QT_CONFIG(tooltip)
        self.DlsgInFileName.setToolTip(
            QCoreApplication.translate(
                "TaxExportDlg",
                u"File to use as a template for russian tax form", None))
        #endif // QT_CONFIG(tooltip)
        self.OutputFileLbl.setText(
            QCoreApplication.translate("TaxExportDlg", u"Output file:", None))
        self.DividendsOnly.setText(
            QCoreApplication.translate(
                "TaxExportDlg", u"Update only information about dividends",
                None))
        #if QT_CONFIG(tooltip)
        self.OutputSelectBtn.setToolTip(
            QCoreApplication.translate("TaxExportDlg", u"Select file", None))
        #endif // QT_CONFIG(tooltip)
        self.OutputSelectBtn.setText(
            QCoreApplication.translate("TaxExportDlg", u" ... ", None))
        #if QT_CONFIG(tooltip)
        self.InitialSelectBtn.setToolTip(
            QCoreApplication.translate("TaxExportDlg", u"Select file", None))
        #endif // QT_CONFIG(tooltip)
        self.InitialSelectBtn.setText(
            QCoreApplication.translate("TaxExportDlg", u" ... ", None))
        self.IncomeSourceBroker.setText(
            QCoreApplication.translate("TaxExportDlg",
                                       u"Use broker name as income source",
                                       None))
        self.Year.setSuffix("")
        #if QT_CONFIG(tooltip)
        self.XlsFileName.setToolTip(
            QCoreApplication.translate(
                "TaxExportDlg",
                u"File where to store tax report in Excel format", None))
        #endif // QT_CONFIG(tooltip)
        #if QT_CONFIG(tooltip)
        self.AccountWidget.setToolTip(
            QCoreApplication.translate(
                "TaxExportDlg", u"Foreign account to prepare tax report for",
                None))
        #endif // QT_CONFIG(tooltip)
        self.YearLbl.setText(
            QCoreApplication.translate("TaxExportDlg", u"Year:", None))
        self.AccountLbl.setText(
            QCoreApplication.translate("TaxExportDlg", u"Account:", None))
        self.XlsFileLbl.setText(
            QCoreApplication.translate("TaxExportDlg", u"Excel file:", None))
        self.NoSettlement.setText(
            QCoreApplication.translate(
                "TaxExportDlg",
                u"Do not use settlement date for currency rates", None))
コード例 #23
0
class ValveChipItem(WidgetChipItem):
    def __init__(self, valve: Valve):
        super().__init__()

        AppGlobals.Instance().onChipModified.connect(self.CheckForValve)

        self._valve = valve

        self.valveToggleButton = QToolButton()
        self.valveNumberLabel = QLabel("Number")
        self.valveNumberDial = QSpinBox()
        self.valveNumberDial.setMinimum(0)
        self.valveNumberDial.setValue(self._valve.solenoidNumber)
        self.valveNumberDial.setMaximum(9999)
        self.valveNumberDial.valueChanged.connect(self.UpdateValve)

        self.valveNameLabel = QLabel("Name")
        self.valveNameField = QLineEdit(self._valve.name)
        self.valveNameField.textChanged.connect(self.UpdateValve)

        mainLayout = QVBoxLayout()
        mainLayout.addWidget(self.valveToggleButton, alignment=Qt.AlignCenter)

        layout = QGridLayout()
        layout.addWidget(self.valveNameLabel, 0, 0)
        layout.addWidget(self.valveNameField, 0, 1)
        layout.addWidget(self.valveNumberLabel, 1, 0)
        layout.addWidget(self.valveNumberDial, 1, 1)

        mainLayout.addLayout(layout)
        self.containerWidget.setLayout(mainLayout)
        self.valveToggleButton.clicked.connect(self.Toggle)

        self.Update()
        self.Move(QPointF())

    def CheckForValve(self):
        if self._valve not in AppGlobals.Chip().valves:
            self.RemoveItem()

    def Move(self, delta: QPointF):
        if delta != QPointF():
            AppGlobals.Instance().onChipDataModified.emit()
        self._valve.position += delta
        self.GraphicsObject().setPos(self._valve.position)

    def SetEditDisplay(self, editing: bool):
        self.valveNameField.setVisible(editing)
        self.valveNameLabel.setVisible(editing)
        self.valveNumberLabel.setVisible(editing)
        self.valveNumberDial.setVisible(editing)
        super().SetEditDisplay(editing)

    def UpdateValve(self):
        self._valve.solenoidNumber = self.valveNumberDial.value()
        self._valve.name = self.valveNameField.text()
        AppGlobals.Instance().onChipDataModified.emit()

    def Toggle(self):
        AppGlobals.Rig().SetSolenoidState(
            self._valve.solenoidNumber,
            not AppGlobals.Rig().GetSolenoidState(self._valve.solenoidNumber),
            True)

    def RequestDelete(self):
        AppGlobals.Chip().valves.remove(self._valve)
        AppGlobals.Instance().onChipModified.emit()

    def Duplicate(self) -> 'ChipItem':
        newValve = Valve()
        newValve.position = QPointF(self._valve.position)
        newValve.name = self._valve.name
        newValve.solenoidNumber = AppGlobals.Chip().NextSolenoidNumber()

        AppGlobals.Chip().valves.append(newValve)
        AppGlobals.Instance().onChipModified.emit()
        return ValveChipItem(newValve)

    def Update(self):
        text = self._valve.name + "\n(" + str(self._valve.solenoidNumber) + ")"
        if text != self.valveToggleButton.text():
            self.valveToggleButton.setText(text)

        lastState = self.valveToggleButton.property("valveState")
        newState = {
            True: "OPEN",
            False: "CLOSED"
        }[AppGlobals.Rig().GetSolenoidState(self._valve.solenoidNumber)]
        if lastState != newState:
            self.valveToggleButton.setProperty("valveState", newState)
            self.valveToggleButton.setStyle(self.valveToggleButton.style())
コード例 #24
0
ファイル: prof.py プロジェクト: clpi/isutils
class Ui_ProfilesDialog_UI(object):
    def setupUi(self, ProfilesDialog_UI):
        if not ProfilesDialog_UI.objectName():
            ProfilesDialog_UI.setObjectName(u"ProfilesDialog_UI")
        ProfilesDialog_UI.resize(594, 639)
        self.gridLayout_2 = QGridLayout(ProfilesDialog_UI)
        self.gridLayout_2.setObjectName(u"gridLayout_2")
        self.button_create = QToolButton(ProfilesDialog_UI)
        self.button_create.setObjectName(u"button_create")
        icon = QIcon()
        iconThemeName = u"document-new"
        if QIcon.hasThemeIcon(iconThemeName):
            icon = QIcon.fromTheme(iconThemeName)
        else:
            icon.addFile(u".", QSize(), QIcon.Normal, QIcon.Off)
        
        self.button_create.setIcon(icon)

        self.gridLayout_2.addWidget(self.button_create, 0, 4, 1, 1)

        self.label = QLabel(ProfilesDialog_UI)
        self.label.setObjectName(u"label")

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

        self.button_delete = QToolButton(ProfilesDialog_UI)
        self.button_delete.setObjectName(u"button_delete")
        self.button_delete.setEnabled(False)
        icon1 = QIcon()
        iconThemeName = u"delete"
        if QIcon.hasThemeIcon(iconThemeName):
            icon1 = QIcon.fromTheme(iconThemeName)
        else:
            icon1.addFile(u".", QSize(), QIcon.Normal, QIcon.Off)
        
        self.button_delete.setIcon(icon1)

        self.gridLayout_2.addWidget(self.button_delete, 0, 6, 1, 1)

        self.properties = QGroupBox(ProfilesDialog_UI)
        self.properties.setObjectName(u"properties")
        self.gridLayout = QGridLayout(self.properties)
        self.gridLayout.setObjectName(u"gridLayout")
        self.aspect_den = QSpinBox(self.properties)
        self.aspect_den.setObjectName(u"aspect_den")
        self.aspect_den.setMinimum(1)
        self.aspect_den.setMaximum(10000)

        self.gridLayout.addWidget(self.aspect_den, 4, 3, 1, 1)

        self.size_w = QSpinBox(self.properties)
        self.size_w.setObjectName(u"size_w")
        self.size_w.setMinimum(1)
        self.size_w.setMaximum(10000)

        self.gridLayout.addWidget(self.size_w, 1, 1, 1, 1)

        self.size_h = QSpinBox(self.properties)
        self.size_h.setObjectName(u"size_h")
        self.size_h.setMinimum(1)
        self.size_h.setMaximum(10000)

        self.gridLayout.addWidget(self.size_h, 1, 3, 1, 1)

        self.fields = QLabel(self.properties)
        self.fields.setObjectName(u"fields")
        self.fields.setText(u"interl: 2*fps")

        self.gridLayout.addWidget(self.fields, 3, 3, 1, 1)

        self.label_dar = QLabel(self.properties)
        self.label_dar.setObjectName(u"label_dar")
        self.label_dar.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)

        self.gridLayout.addWidget(self.label_dar, 5, 0, 1, 1)

        self.label_3 = QLabel(self.properties)
        self.label_3.setObjectName(u"label_3")
        self.label_3.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)

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

        self.description = QLineEdit(self.properties)
        self.description.setObjectName(u"description")

        self.gridLayout.addWidget(self.description, 0, 1, 1, 3)

        self.colorspace = KComboBox(self.properties)
        self.colorspace.setObjectName(u"colorspace")

        self.gridLayout.addWidget(self.colorspace, 7, 1, 1, 3)

        self.label_8 = QLabel(self.properties)
        self.label_8.setObjectName(u"label_8")
        sizePolicy = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_8.sizePolicy().hasHeightForWidth())
        self.label_8.setSizePolicy(sizePolicy)

        self.gridLayout.addWidget(self.label_8, 5, 2, 1, 1)

        self.field_order = QComboBox(self.properties)
        self.field_order.addItem("")
        self.field_order.addItem("")
        self.field_order.setObjectName(u"field_order")

        self.gridLayout.addWidget(self.field_order, 9, 1, 1, 3)

        self.display_num = QSpinBox(self.properties)
        self.display_num.setObjectName(u"display_num")
        self.display_num.setMinimum(1)
        self.display_num.setMaximum(10000)

        self.gridLayout.addWidget(self.display_num, 5, 1, 1, 1)

        self.label_scanning = QLabel(self.properties)
        self.label_scanning.setObjectName(u"label_scanning")
        self.label_scanning.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)

        self.gridLayout.addWidget(self.label_scanning, 8, 0, 1, 1)

        self.label_4 = QLabel(self.properties)
        self.label_4.setObjectName(u"label_4")
        sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth())
        self.label_4.setSizePolicy(sizePolicy)

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

        self.aspect_num = QSpinBox(self.properties)
        self.aspect_num.setObjectName(u"aspect_num")
        self.aspect_num.setMinimum(1)
        self.aspect_num.setMaximum(10000)

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

        self.label_6 = QLabel(self.properties)
        self.label_6.setObjectName(u"label_6")
        sizePolicy.setHeightForWidth(self.label_6.sizePolicy().hasHeightForWidth())
        self.label_6.setSizePolicy(sizePolicy)

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

        self.label_2 = QLabel(self.properties)
        self.label_2.setObjectName(u"label_2")
        self.label_2.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)

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

        self.scanning = QComboBox(self.properties)
        self.scanning.addItem("")
        self.scanning.addItem("")
        self.scanning.setObjectName(u"scanning")

        self.gridLayout.addWidget(self.scanning, 8, 1, 1, 3)

        self.frame_num = QSpinBox(self.properties)
        self.frame_num.setObjectName(u"frame_num")
        self.frame_num.setMinimum(1)
        self.frame_num.setMaximum(500000)

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

        self.display_den = QSpinBox(self.properties)
        self.display_den.setObjectName(u"display_den")
        self.display_den.setMinimum(1)
        self.display_den.setMaximum(10000)

        self.gridLayout.addWidget(self.display_den, 5, 3, 1, 1)

        self.verticalSpacer = QSpacerItem(105, 17, QSizePolicy.Minimum, QSizePolicy.Expanding)

        self.gridLayout.addItem(self.verticalSpacer, 11, 0, 1, 2)

        self.label_9 = QLabel(self.properties)
        self.label_9.setObjectName(u"label_9")
        self.label_9.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)

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

        self.label_12 = QLabel(self.properties)
        self.label_12.setObjectName(u"label_12")
        self.label_12.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)

        self.gridLayout.addWidget(self.label_12, 7, 0, 1, 1)

        self.label_5 = QLabel(self.properties)
        self.label_5.setObjectName(u"label_5")
        self.label_5.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)

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

        self.label_field_order = QLabel(self.properties)
        self.label_field_order.setObjectName(u"label_field_order")
        self.label_field_order.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)

        self.gridLayout.addWidget(self.label_field_order, 9, 0, 1, 1)

        self.label_7 = QLabel(self.properties)
        self.label_7.setObjectName(u"label_7")
        sizePolicy.setHeightForWidth(self.label_7.sizePolicy().hasHeightForWidth())
        self.label_7.setSizePolicy(sizePolicy)

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

        self.frame_den = QSpinBox(self.properties)
        self.frame_den.setObjectName(u"frame_den")
        self.frame_den.setMinimum(1)
        self.frame_den.setMaximum(10000)

        self.gridLayout.addWidget(self.frame_den, 2, 3, 1, 1)

        self.label_11 = QLabel(self.properties)
        self.label_11.setObjectName(u"label_11")
        self.label_11.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)

        self.gridLayout.addWidget(self.label_11, 3, 0, 1, 1)

        self.effect_warning = KMessageWidget(self.properties)
        self.effect_warning.setObjectName(u"effect_warning")
        self.effect_warning.setWordWrap(True)
        self.effect_warning.setCloseButtonVisible(False)
        self.effect_warning.setMessageType(KMessageWidget.Warning)

        self.gridLayout.addWidget(self.effect_warning, 10, 1, 1, 3)


        self.gridLayout_2.addWidget(self.properties, 1, 0, 1, 8)

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

        self.gridLayout_2.addItem(self.horizontalSpacer, 0, 3, 1, 1)

        self.button_save = QToolButton(ProfilesDialog_UI)
        self.button_save.setObjectName(u"button_save")
        self.button_save.setEnabled(False)
        icon2 = QIcon()
        iconThemeName = u"document-save"
        if QIcon.hasThemeIcon(iconThemeName):
            icon2 = QIcon.fromTheme(iconThemeName)
        else:
            icon2.addFile(u".", QSize(), QIcon.Normal, QIcon.Off)
        
        self.button_save.setIcon(icon2)

        self.gridLayout_2.addWidget(self.button_save, 0, 5, 1, 1)

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

        self.gridLayout_2.addItem(self.horizontalSpacer_2, 3, 3, 1, 2)

        self.buttonBox = QDialogButtonBox(ProfilesDialog_UI)
        self.buttonBox.setObjectName(u"buttonBox")
        self.buttonBox.setOrientation(Qt.Horizontal)
        self.buttonBox.setStandardButtons(QDialogButtonBox.Close)

        self.gridLayout_2.addWidget(self.buttonBox, 3, 5, 1, 3)

        self.profiles_list = QComboBox(ProfilesDialog_UI)
        self.profiles_list.setObjectName(u"profiles_list")

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

        self.button_default = QPushButton(ProfilesDialog_UI)
        self.button_default.setObjectName(u"button_default")

        self.gridLayout_2.addWidget(self.button_default, 3, 0, 1, 3)

        self.info_message = KMessageWidget(ProfilesDialog_UI)
        self.info_message.setObjectName(u"info_message")
        self.info_message.setWordWrap(True)

        self.gridLayout_2.addWidget(self.info_message, 2, 0, 1, 8)


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

        QMetaObject.connectSlotsByName(ProfilesDialog_UI)
    # setupUi

    def retranslateUi(self, ProfilesDialog_UI):
        ProfilesDialog_UI.setWindowTitle(QCoreApplication.translate("ProfilesDialog_UI", u"Profiles", None))
#if QT_CONFIG(tooltip)
        self.button_create.setToolTip(QCoreApplication.translate("ProfilesDialog_UI", u"Create  new profile", None))
#endif // QT_CONFIG(tooltip)
        self.button_create.setText(QCoreApplication.translate("ProfilesDialog_UI", u"C", None))
        self.label.setText(QCoreApplication.translate("ProfilesDialog_UI", u"Profile:", None))
#if QT_CONFIG(tooltip)
        self.button_delete.setToolTip(QCoreApplication.translate("ProfilesDialog_UI", u"Delete profile", None))
#endif // QT_CONFIG(tooltip)
        self.button_delete.setText(QCoreApplication.translate("ProfilesDialog_UI", u"D", None))
        self.properties.setTitle(QCoreApplication.translate("ProfilesDialog_UI", u"Properties", None))
        self.label_dar.setText(QCoreApplication.translate("ProfilesDialog_UI", u"Display aspect ratio:", None))
        self.label_3.setText(QCoreApplication.translate("ProfilesDialog_UI", u"Frame rate:", None))
        self.label_8.setText(QCoreApplication.translate("ProfilesDialog_UI", u"/", None))
        self.field_order.setItemText(0, QCoreApplication.translate("ProfilesDialog_UI", u"Top Field First", None))
        self.field_order.setItemText(1, QCoreApplication.translate("ProfilesDialog_UI", u"Bottom Field First", None))

        self.label_scanning.setText(QCoreApplication.translate("ProfilesDialog_UI", u"Scanning:", None))
        self.label_4.setText(QCoreApplication.translate("ProfilesDialog_UI", u"/", None))
        self.label_6.setText(QCoreApplication.translate("ProfilesDialog_UI", u"x", None))
        self.label_2.setText(QCoreApplication.translate("ProfilesDialog_UI", u"Description:", None))
        self.scanning.setItemText(0, QCoreApplication.translate("ProfilesDialog_UI", u"Interlaced", None))
        self.scanning.setItemText(1, QCoreApplication.translate("ProfilesDialog_UI", u"Progressive", None))

        self.label_9.setText(QCoreApplication.translate("ProfilesDialog_UI", u"Pixel aspect ratio:", None))
        self.label_12.setText(QCoreApplication.translate("ProfilesDialog_UI", u"Colorspace:", None))
        self.label_5.setText(QCoreApplication.translate("ProfilesDialog_UI", u"Size:", None))
        self.label_field_order.setText(QCoreApplication.translate("ProfilesDialog_UI", u"Field order:", None))
        self.label_7.setText(QCoreApplication.translate("ProfilesDialog_UI", u"/", None))
        self.label_11.setText(QCoreApplication.translate("ProfilesDialog_UI", u"Fields per second:", None))
        self.effect_warning.setText(QCoreApplication.translate("ProfilesDialog_UI", u"The \"avfilter.fieldorder\" effect is internally used to set the field order, but the effect was not found.\n"
"This feature will not work as expected.", None))
#if QT_CONFIG(tooltip)
        self.button_save.setToolTip(QCoreApplication.translate("ProfilesDialog_UI", u"Save profile", None))
#endif // QT_CONFIG(tooltip)
        self.button_save.setText(QCoreApplication.translate("ProfilesDialog_UI", u"S", None))
        self.button_default.setText(QCoreApplication.translate("ProfilesDialog_UI", u"Use as default", None))
コード例 #25
0
 def createEditor(self, parent, option, index):
     editor = QSpinBox(parent)
     editor.setMinimum(self.min)
     editor.setMaximum(self.max)
     editor.setSuffix(self.suffix)
     return editor