Python PyQt5.QtWidgets 模块,QDialogButtonBox() 实例源码

我们从Python开源项目中,提取了以下50个代码示例,用于说明如何使用PyQt5.QtWidgets.QDialogButtonBox()

项目:specton    作者:somesortoferror    | 项目源码 | 文件源码
def setupUi(self, FileInfoDialog):
        FileInfoDialog.setObjectName("FileInfoDialog")
        FileInfoDialog.resize(579, 472)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap("icons/157-stats-bars.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        FileInfoDialog.setWindowIcon(icon)
        self.gridLayout = QtWidgets.QGridLayout(FileInfoDialog)
        self.gridLayout.setObjectName("gridLayout")
        self.gridLayout_2 = QtWidgets.QGridLayout()
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.tabWidget = QtWidgets.QTabWidget(FileInfoDialog)
        self.tabWidget.setObjectName("tabWidget")
        self.gridLayout_2.addWidget(self.tabWidget, 0, 0, 1, 1)
        self.buttonBox = QtWidgets.QDialogButtonBox(FileInfoDialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close)
        self.buttonBox.setObjectName("buttonBox")
        self.gridLayout_2.addWidget(self.buttonBox, 1, 0, 1, 1)
        self.gridLayout.addLayout(self.gridLayout_2, 0, 0, 1, 1)

        self.retranslateUi(FileInfoDialog)
        self.tabWidget.setCurrentIndex(-1)
        self.buttonBox.accepted.connect(FileInfoDialog.accept)
        self.buttonBox.rejected.connect(FileInfoDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(FileInfoDialog)
项目:scm-workbench    作者:barry-scott    | 项目源码 | 文件源码
def __init__( self, parent=None, cancel=True ):
        super().__init__( parent )

        self.buttons = QtWidgets.QDialogButtonBox()
        self.ok_button = self.buttons.addButton( self.buttons.Ok )
        if cancel:
            self.buttons.addButton( self.buttons.Cancel )

        self.buttons.accepted.connect( self.accept )
        self.buttons.rejected.connect( self.reject )

        self.grid_layout = WbFeedbackGridLayout()

        self.setLayout( self.grid_layout )

        # Often the rest of init has to be done after the widgets are rendered
        # for example to set focus on a widget
        self.__timer_init = QtCore.QTimer()
        self.__timer_init.timeout.connect( self.__completeInit )
        self.__timer_init.setSingleShot( True )
        self.__timer_init.start( 0 )
项目:fomod-designer    作者:GandaG    | 项目源码 | 文件源码
def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(247, 195)
        self.verticalLayout = QtWidgets.QVBoxLayout(Dialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.edit_text = QtWidgets.QTextEdit(Dialog)
        self.edit_text.setObjectName("edit_text")
        self.verticalLayout.addWidget(self.edit_text)
        self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setCenterButtons(True)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(Dialog)
        self.buttonBox.accepted.connect(Dialog.accept)
        self.buttonBox.rejected.connect(Dialog.reject)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
项目:Qyoutube-dl    作者:lzambella    | 项目源码 | 文件源码
def setupUi(self, About):
        About.setObjectName("About")
        About.resize(401, 117)
        About.setMinimumSize(QtCore.QSize(401, 117))
        About.setMaximumSize(QtCore.QSize(401, 117))
        self.buttonBox = QtWidgets.QDialogButtonBox(About)
        self.buttonBox.setGeometry(QtCore.QRect(10, 80, 381, 32))
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setCenterButtons(True)
        self.buttonBox.setObjectName("buttonBox")
        self.label = QtWidgets.QLabel(About)
        self.label.setGeometry(QtCore.QRect(0, 20, 401, 21))
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setObjectName("label")
        self.label_2 = QtWidgets.QLabel(About)
        self.label_2.setGeometry(QtCore.QRect(0, 40, 401, 20))
        self.label_2.setAlignment(QtCore.Qt.AlignCenter)
        self.label_2.setObjectName("label_2")

        self.retranslateUi(About)
        self.buttonBox.clicked['QAbstractButton*'].connect(About.close)
        QtCore.QMetaObject.connectSlotsByName(About)
项目:scm-workbench    作者:barry-scott    | 项目源码 | 文件源码
def __init__( self, app, parent, rel_path, abs_path, info ):
        super().__init__( parent )

        self.app = app

        self.setWindowTitle( T_('Svn Info for %s') % (rel_path,) )

        self.v_layout = QtWidgets.QVBoxLayout()

        self.group = None
        self.grid = None

        self.addGroup( T_('Entry') )
        self.addRow( T_('Path:'), abs_path )

        self.initFromInfo( info )

        self.buttons = QtWidgets.QDialogButtonBox()
        self.buttons.addButton( self.buttons.Close )

        self.buttons.rejected.connect( self.close )

        self.v_layout.addWidget( self.buttons )

        self.setLayout( self.v_layout )
项目:scm-workbench    作者:barry-scott    | 项目源码 | 文件源码
def __init__( self, parent=None, size=None ):
        super().__init__( parent )

        self.tabs = QtWidgets.QTabWidget()

        self.buttons = QtWidgets.QDialogButtonBox()
        self.ok_button = self.buttons.addButton( self.buttons.Ok )
        self.buttons.addButton( self.buttons.Cancel )

        self.buttons.accepted.connect( self.accept )
        self.buttons.rejected.connect( self.reject )

        # must add the tabs at this stage or that will not display
        self.completeTabsInit()

        self.layout = QtWidgets.QVBoxLayout()
        self.layout.addWidget( self.tabs )
        self.layout.addWidget( self.buttons )

        self.setLayout( self.layout )

        if size is not None:
            em = self.app.fontMetrics().width( 'm' )
            ex = self.app.fontMetrics().lineSpacing()
            self.resize( size[0]*em, size[1]*ex )
项目:FuME    作者:fupadev    | 项目源码 | 文件源码
def setupUi(self, Log):
        Log.setObjectName("Log")
        Log.resize(631, 264)
        self.gridLayout = QtWidgets.QGridLayout(Log)
        self.gridLayout.setObjectName("gridLayout")
        self.buttonBox = QtWidgets.QDialogButtonBox(Log)
        self.buttonBox.setOrientation(QtCore.Qt.Vertical)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.gridLayout.addWidget(self.buttonBox, 0, 1, 1, 1)
        self.plainTextEdit = QtWidgets.QPlainTextEdit(Log)
        self.plainTextEdit.setLineWrapMode(QtWidgets.QPlainTextEdit.NoWrap)
        self.plainTextEdit.setObjectName("plainTextEdit")
        self.gridLayout.addWidget(self.plainTextEdit, 0, 0, 1, 1)

        self.retranslateUi(Log)
        self.buttonBox.accepted.connect(Log.accept)
        self.buttonBox.rejected.connect(Log.reject)
        QtCore.QMetaObject.connectSlotsByName(Log)
项目:sequana    作者:sequana    | 项目源码 | 文件源码
def setupUi(self, Help):
        Help.setObjectName("Help")
        Help.resize(456, 582)
        self.gridLayout = QtWidgets.QGridLayout(Help)
        self.gridLayout.setObjectName("gridLayout")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.textBrowser = QtWidgets.QTextBrowser(Help)
        self.textBrowser.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)
        self.textBrowser.setOpenExternalLinks(True)
        self.textBrowser.setObjectName("textBrowser")
        self.verticalLayout.addWidget(self.textBrowser)
        self.buttonBox = QtWidgets.QDialogButtonBox(Help)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)
        self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)

        self.retranslateUi(Help)
        QtCore.QMetaObject.connectSlotsByName(Help)
项目:OnCue    作者:featherbear    | 项目源码 | 文件源码
def __init__(self):
        QtWidgets.QColorDialog.__init__(self)
        self.setOption(QtWidgets.QColorDialog.NoButtons)
        """
        QColorDialog
            [0] PyQt5.QtWidgets.QVBoxLayout
            [1] PyQt5.QtWidgets.QWidget             | Basic Color Grid
            [2] PyQt5.QtWidgets.QLabel              | Basic Color Label
            [3] PyQt5.QtWidgets.QPushButton         | Pick Screen Color Button
            [4] PyQt5.QtWidgets.QLabel              | Background for the colour preview
            [5] PyQt5.QtWidgets.QWidget             | Custom Color Grid
            [6] PyQt5.QtWidgets.QLabel              | Custom Color Label
            [7] PyQt5.QtWidgets.QPushButton         | Add to Custom Colors Button
            [8] PyQt5.QtWidgets.QFrame              | Hue Saturation Picker
            [9] PyQt5.QtWidgets.QWidget             | Intensity Slider
            [10] PyQt5.QtWidgets.QWidget            | Value and Preview
            [11] PyQt5.QtWidgets.QDialogButtonBox   | Dialog Buttons
            [12] PyQt5.QtCore.QTimer                | ???
        """
        self.children()[10].children()[16].setText("&Hex:")
        [self.children()[1].setParent(None) for elem in range(7)]  # Remove elements 1-7
        self.updateColor()
        # Elements 0, 8, 9, 10, 11 are important
项目:plexdesktop    作者:coryo    | 项目源码 | 文件源码
def __init__(self, parent=None):
        super().__init__(parent)
        self.setWindowTitle('Manual Add Server')
        self.form = QtWidgets.QFormLayout(self)
        self.secure = QtWidgets.QCheckBox()
        self.address = QtWidgets.QLineEdit()
        self.port = QtWidgets.QLineEdit('32400')
        self.token = QtWidgets.QLineEdit()
        self.form.addRow(QtWidgets.QLabel('HTTPS?'), self.secure)
        self.form.addRow(QtWidgets.QLabel('Address'), self.address)
        self.form.addRow(QtWidgets.QLabel('Port'), self.port)
        self.form.addRow(QtWidgets.QLabel('Access Token (optional)'), self.token)
        self.buttons = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel, QtCore.Qt.Horizontal, self)
        self.form.addRow(self.buttons)
        self.buttons.rejected.connect(self.reject)
        self.buttons.accepted.connect(self.accept)
项目:PINCE    作者:korcankaraokcu    | 项目源码 | 文件源码
def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(188, 48)
        Dialog.setWindowTitle("")
        self.horizontalLayout = QtWidgets.QHBoxLayout(Dialog)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setCenterButtons(True)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)
        self.horizontalLayout.addLayout(self.verticalLayout)

        self.retranslateUi(Dialog)
        self.buttonBox.accepted.connect(Dialog.accept)
        self.buttonBox.rejected.connect(Dialog.reject)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
项目:ChenSpiderGUI    作者:chenyansu    | 项目源码 | 文件源码
def setupUi3(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(415, 296)
        self.dialogButtonBox = QtWidgets.QDialogButtonBox(Dialog)
        self.dialogButtonBox.setGeometry(QtCore.QRect(190, 240, 181, 32))
        self.dialogButtonBox.setOrientation(QtCore.Qt.Horizontal)
        self.dialogButtonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.dialogButtonBox.setObjectName("dialogButtonBox")
        self.author = QtWidgets.QLabel(Dialog)
        self.author.setGeometry(QtCore.QRect(10, 30, 191, 17))
        self.author.setObjectName("author")
        self.email = QtWidgets.QLabel(Dialog)
        self.email.setGeometry(QtCore.QRect(10, 60, 271, 17))
        self.email.setObjectName("email")
        self.github = QtWidgets.QLabel(Dialog)
        self.github.setGeometry(QtCore.QRect(10, 90, 371, 17))
        self.github.setObjectName("github")
        self.GPL = QtWidgets.QLabel(Dialog)
        self.GPL.setGeometry(QtCore.QRect(10, 120, 161, 17))
        self.GPL.setObjectName("GPL")

        self.retranslateUi(Dialog)
        self.dialogButtonBox.accepted.connect(Dialog.accept)
        self.dialogButtonBox.rejected.connect(Dialog.reject)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
项目:mindfulness-at-the-computer    作者:SunyataZero    | 项目源码 | 文件源码
def __init__(self, i_description_str: str, i_parent=None):
        super(SafeDeleteDlg, self).__init__(i_parent)

        vbox = QtWidgets.QVBoxLayout(self)

        self.description_qll = QtWidgets.QLabel(i_description_str)
        vbox.addWidget(self.description_qll)

        self.button_box = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel,
            QtCore.Qt.Horizontal,
            self
        )
        vbox.addWidget(self.button_box)
        self.button_box.accepted.connect(self.accept)
        self.button_box.rejected.connect(self.reject)
        # -accept and reject are "slots" built into Qt
项目:mindfulness-at-the-computer    作者:SunyataZero    | 项目源码 | 文件源码
def __init__(self, i_description_str, i_parent = None):
        super(SafeDeleteDialog, self).__init__(i_parent)

        vbox = QtWidgets.QVBoxLayout(self)

        self.description_qll = QtWidgets.QLabel(i_description_str)
        vbox.addWidget(self.description_qll)

        self.button_box = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel,
            QtCore.Qt.Horizontal,
            self
        )
        vbox.addWidget(self.button_box)
        self.button_box.accepted.connect(self.accept)
        self.button_box.rejected.connect(self.reject)
        # -accept and reject are "slots" built into Qt
项目:well-being-diary    作者:SunyataZero    | 项目源码 | 文件源码
def __init__(self, i_parent = None):
        super(QuestionSelectionDialog, self).__init__(i_parent)

        vbox = QtWidgets.QVBoxLayout(self)

        self.list_widget = QtWidgets.QListWidget()
        vbox.addWidget(self.list_widget)
        self.populate_list()

        self.button_box = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel,
            QtCore.Qt.Horizontal,
            self
        )
        vbox.addWidget(self.button_box)
        self.button_box.accepted.connect(self.accept)
        self.button_box.rejected.connect(self.reject)
        # -accept and reject are "slots" built into Qt
项目:well-being-diary    作者:SunyataZero    | 项目源码 | 文件源码
def __init__(self, i_description_str, i_parent = None):
        super(SafeConfirmationDialog, self).__init__(i_parent)

        vbox = QtWidgets.QVBoxLayout(self)

        self.description_qll = QtWidgets.QLabel(i_description_str)
        vbox.addWidget(self.description_qll)

        self.line_edit = QtWidgets.QLineEdit(self)
        vbox.addWidget(self.line_edit)

        self.button_box = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel,
            QtCore.Qt.Horizontal,
            self
        )
        vbox.addWidget(self.button_box)
        self.button_box.accepted.connect(self.accept)
        self.button_box.rejected.connect(self.reject)
        # -accept and reject are "slots" built into Qt
项目:well-being-diary    作者:SunyataZero    | 项目源码 | 文件源码
def __init__(self, i_unix_time_it, i_parent = None):
        super(DateTimeDialog, self).__init__(i_parent)

        vbox = QtWidgets.QVBoxLayout(self)

        self.date_time_edit = QtWidgets.QDateTimeEdit(self)
        self.date_time_edit.setCalendarPopup(True)
        present_qdatetime = QtCore.QDateTime()
        present_qdatetime.setMSecsSinceEpoch(1000 * i_unix_time_it)
        self.date_time_edit.setDateTime(present_qdatetime)
        vbox.addWidget(self.date_time_edit)

        self.button_box = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel,
            QtCore.Qt.Horizontal,
            self
        )
        vbox.addWidget(self.button_box)
        self.button_box.accepted.connect(self.accept)
        self.button_box.rejected.connect(self.reject)
        # -accept and reject are "slots" built into Qt
项目:copa    作者:komradz    | 项目源码 | 文件源码
def setupUi(self):
        self.setObjectName("Dialog")
        self.resize(355, 76)
        self.buttonBox = QtWidgets.QDialogButtonBox(self)
        self.buttonBox.setGeometry(QtCore.QRect(0, 40, 341, 32))
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.lineEdit_basepath = QtWidgets.QLineEdit(self)
        self.lineEdit_basepath.setGeometry(QtCore.QRect(100, 10, 221, 20))
        self.lineEdit_basepath.setObjectName("lineEdit_basepath")
        self.select_base_Btn = QtWidgets.QPushButton(self)
        self.select_base_Btn.setGeometry(QtCore.QRect(320, 10, 21, 20))
        self.select_base_Btn.setObjectName("select_base_Btn")
        self.label = QtWidgets.QLabel(self)
        self.label.setGeometry(QtCore.QRect(10, 10, 71, 16))
        self.label.setObjectName("label")
        # self.create_Btn = QtWidgets.QPushButton(self)
        # self.create_Btn.setGeometry(QtCore.QRect(10, 60, 91, 31))
        # self.create_Btn.setObjectName("create_Btn")
        self.create_Btn = self.buttonBox.addButton('Create new base',QtWidgets.QDialogButtonBox.ApplyRole)

        self.lineEdit_basepath.setText(self.filename[0])
        self.retranslateUi()
        #button clicks events
        self.create_Btn.clicked.connect(self.createBtnclicked)
        self.select_base_Btn.clicked.connect(self.select_baseBtnclicked)
        self.buttonBox.accepted.connect(self.accept)
        self.buttonBox.rejected.connect(self.reject)

        QtCore.QMetaObject.connectSlotsByName(self)
项目:specton    作者:somesortoferror    | 项目源码 | 文件源码
def setupUi(self, DownloaderDlg):
        DownloaderDlg.setObjectName("DownloaderDlg")
        DownloaderDlg.resize(524, 443)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(DownloaderDlg.sizePolicy().hasHeightForWidth())
        DownloaderDlg.setSizePolicy(sizePolicy)
        self.downloads_buttonBox = QtWidgets.QDialogButtonBox(DownloaderDlg)
        self.downloads_buttonBox.setGeometry(QtCore.QRect(350, 400, 161, 32))
        self.downloads_buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.downloads_buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close | QtWidgets.QDialogButtonBox.Ok)
        self.downloads_buttonBox.setCenterButtons(False)
        self.downloads_buttonBox.setObjectName("downloads_buttonBox")
        self.downloads_treeWidget = QtWidgets.QTreeWidget(DownloaderDlg)
        self.downloads_treeWidget.setGeometry(QtCore.QRect(10, 10, 501, 381))
        self.downloads_treeWidget.setObjectName("downloads_treeWidget")
        self.downloads_treeWidget.headerItem().setText(0, "1")
        self.statusLabel = QtWidgets.QLabel(DownloaderDlg)
        self.statusLabel.setGeometry(QtCore.QRect(20, 400, 321, 31))
        self.statusLabel.setText("")
        self.statusLabel.setObjectName("statusLabel")

        self.retranslateUi(DownloaderDlg)
        self.downloads_buttonBox.accepted.connect(DownloaderDlg.accept)
        self.downloads_buttonBox.rejected.connect(DownloaderDlg.reject)
        QtCore.QMetaObject.connectSlotsByName(DownloaderDlg)
项目:scm-workbench    作者:barry-scott    | 项目源码 | 文件源码
def __init__( self, app, main_window, all_stashes ):
        super().__init__( main_window )

        self.app = app
        self.stash_id = None

        em = self.fontMetrics().width( 'M' )
        self.resize( 70*em, 30*em )

        self.setWindowTitle( T_('Git Stash list - %s') % (' '.join( app.app_name_parts ),) )

        self.buttons = QtWidgets.QDialogButtonBox()
        self.ok_button = self.buttons.addButton( self.buttons.Ok )
        self.ok_button.setText( T_('Stash Pop') )
        self.buttons.addButton( self.buttons.Cancel )

        self.stashes_model = WbGitStashesModel( app )
        self.stashes_model.loadStashInfo( all_stashes )

        self.stashes_table = WbStashesTableView( self, main_window, self.stashes_model )
        self.stashes_table.setSelectionBehavior( self.stashes_table.SelectRows )
        self.stashes_table.setSelectionMode( self.stashes_table.SingleSelection )

        self.vert_layout = QtWidgets.QVBoxLayout()

        self.buttons.accepted.connect( self.accept )
        self.buttons.rejected.connect( self.reject )

        self.vert_layout.addWidget( self.stashes_table )
        self.vert_layout.addWidget( self.buttons )

        self.setLayout( self.vert_layout )
项目:scm-workbench    作者:barry-scott    | 项目源码 | 文件源码
def __init__( self, app, parent, path, prop_dict ):
        super().__init__( parent )

        self.path = path
        self.prop_dict = prop_dict

        self.grid = QtWidgets.QGridLayout()
        self.grid.setColumnStretch( 1, 1 )

        self.property_ctrls = {}

        self.initKnownProperties()

        for prop in sorted( self.prop_dict ):
            if( prop not in self.known_properties_names
            and prop not in self.ignore_properties_names ):
                self.property_ctrls[ prop ] = SinglePropertyText( self, prop, True, self.prop_dict[ prop ] )

        self.new_name_ctrl  = QtWidgets.QLineEdit( '' )
        self.new_value_ctrl = QtWidgets.QLineEdit( '' )

        self.addRow( self.new_name_ctrl, self.new_value_ctrl )

        self.buttons = QtWidgets.QDialogButtonBox()
        self.buttons.addButton( self.buttons.Ok )
        self.buttons.addButton( self.buttons.Cancel )

        self.buttons.accepted.connect( self.accept )
        self.buttons.rejected.connect( self.reject )

        self.grid.addWidget( self.buttons, self.grid.rowCount(), 0, 2, 1 )

        self.setLayout( self.grid )
项目:FuME    作者:fupadev    | 项目源码 | 文件源码
def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.setWindowModality(QtCore.Qt.ApplicationModal)
        Dialog.resize(452, 144)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(Dialog.sizePolicy().hasHeightForWidth())
        Dialog.setSizePolicy(sizePolicy)
        Dialog.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
        self.verticalLayout = QtWidgets.QVBoxLayout(Dialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.label_2 = QtWidgets.QLabel(Dialog)
        self.label_2.setOpenExternalLinks(True)
        self.label_2.setObjectName("label_2")
        self.verticalLayout.addWidget(self.label_2)
        self.label_5 = QtWidgets.QLabel(Dialog)
        self.label_5.setOpenExternalLinks(True)
        self.label_5.setObjectName("label_5")
        self.verticalLayout.addWidget(self.label_5)
        self.label_6 = QtWidgets.QLabel(Dialog)
        self.label_6.setOpenExternalLinks(True)
        self.label_6.setObjectName("label_6")
        self.verticalLayout.addWidget(self.label_6)
        self.label_7 = QtWidgets.QLabel(Dialog)
        self.label_7.setOpenExternalLinks(True)
        self.label_7.setObjectName("label_7")
        self.verticalLayout.addWidget(self.label_7)
        self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(Dialog)
        self.buttonBox.accepted.connect(Dialog.accept)
        self.buttonBox.rejected.connect(Dialog.reject)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
项目:FuME    作者:fupadev    | 项目源码 | 文件源码
def setupUi(self, filter):
        filter.setObjectName("filter")
        filter.resize(381, 435)
        self.gridLayout = QtWidgets.QGridLayout(filter)
        self.gridLayout.setObjectName("gridLayout")
        self.buttonBox = QtWidgets.QDialogButtonBox(filter)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.gridLayout.addWidget(self.buttonBox, 3, 0, 1, 1)
        self.label_2 = QtWidgets.QLabel(filter)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 0, 0, 1, 1)
        self.listWidget = QtWidgets.QListWidget(filter)
        self.listWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.listWidget.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
        self.listWidget.setObjectName("listWidget")
        self.gridLayout.addWidget(self.listWidget, 2, 0, 1, 1)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.label = QtWidgets.QLabel(filter)
        self.label.setObjectName("label")
        self.horizontalLayout.addWidget(self.label)
        self.lineEdit = QtWidgets.QLineEdit(filter)
        self.lineEdit.setInputMask("")
        self.lineEdit.setPlaceholderText("")
        self.lineEdit.setObjectName("lineEdit")
        self.horizontalLayout.addWidget(self.lineEdit)
        self.checkBox = QtWidgets.QCheckBox(filter)
        self.checkBox.setObjectName("checkBox")
        self.horizontalLayout.addWidget(self.checkBox)
        self.gridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 1)
        self.label_2.raise_()
        self.listWidget.raise_()
        self.buttonBox.raise_()
        self.label.raise_()

        self.retranslateUi(filter)
        self.buttonBox.accepted.connect(filter.accept)
        self.buttonBox.rejected.connect(filter.reject)
        QtCore.QMetaObject.connectSlotsByName(filter)
项目:coquery    作者:gkunter    | 项目源码 | 文件源码
def setupUi(self, NLTKDatafiles):
        NLTKDatafiles.setObjectName("NLTKDatafiles")
        NLTKDatafiles.resize(640, 480)
        self.verticalLayout = QtWidgets.QVBoxLayout(NLTKDatafiles)
        self.verticalLayout.setObjectName("verticalLayout")
        self.label_2 = QtWidgets.QLabel(NLTKDatafiles)
        self.label_2.setObjectName("label_2")
        self.verticalLayout.addWidget(self.label_2)
        self.textBrowser = QtWidgets.QTextBrowser(NLTKDatafiles)
        self.textBrowser.setLineWrapMode(QtWidgets.QTextEdit.NoWrap)
        self.textBrowser.setObjectName("textBrowser")
        self.verticalLayout.addWidget(self.textBrowser)
        self.progressBar = QtWidgets.QProgressBar(NLTKDatafiles)
        self.progressBar.setProperty("value", 24)
        self.progressBar.setObjectName("progressBar")
        self.verticalLayout.addWidget(self.progressBar)
        self.label = QtWidgets.QLabel(NLTKDatafiles)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
        self.label.setSizePolicy(sizePolicy)
        self.label.setWordWrap(True)
        self.label.setObjectName("label")
        self.verticalLayout.addWidget(self.label)
        self.buttonBox = QtWidgets.QDialogButtonBox(NLTKDatafiles)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.No|QtWidgets.QDialogButtonBox.Open|QtWidgets.QDialogButtonBox.Yes)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(NLTKDatafiles)
        self.buttonBox.accepted.connect(NLTKDatafiles.accept)
        self.buttonBox.rejected.connect(NLTKDatafiles.reject)
        QtCore.QMetaObject.connectSlotsByName(NLTKDatafiles)
项目:coquery    作者:gkunter    | 项目源码 | 文件源码
def setupUi(self, OrphanagedDatabases):
        OrphanagedDatabases.setObjectName("OrphanagedDatabases")
        OrphanagedDatabases.resize(640, 479)
        self.verticalLayout = QtWidgets.QVBoxLayout(OrphanagedDatabases)
        self.verticalLayout.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint)
        self.verticalLayout.setObjectName("verticalLayout")
        self.label = QtWidgets.QLabel(OrphanagedDatabases)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
        self.label.setSizePolicy(sizePolicy)
        self.label.setWordWrap(True)
        self.label.setObjectName("label")
        self.verticalLayout.addWidget(self.label)
        self.listWidget = QtWidgets.QListWidget(OrphanagedDatabases)
        self.listWidget.setObjectName("listWidget")
        self.verticalLayout.addWidget(self.listWidget)
        self.label_3 = QtWidgets.QLabel(OrphanagedDatabases)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
        self.label_3.setSizePolicy(sizePolicy)
        self.label_3.setWordWrap(True)
        self.label_3.setObjectName("label_3")
        self.verticalLayout.addWidget(self.label_3)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.buttonBox = QtWidgets.QDialogButtonBox(OrphanagedDatabases)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.No|QtWidgets.QDialogButtonBox.Yes)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(OrphanagedDatabases)
        self.buttonBox.accepted.connect(OrphanagedDatabases.accept)
        self.buttonBox.rejected.connect(OrphanagedDatabases.reject)
        QtCore.QMetaObject.connectSlotsByName(OrphanagedDatabases)
项目:plexdesktop    作者:coryo    | 项目源码 | 文件源码
def __init__(self, media_object, parent=None):
        super().__init__(parent)
        self.setWindowTitle('Preferences')
        self.form = QtWidgets.QFormLayout(self)
        server = media_object.container.server
        settings = server.container(media_object.key)
        self.ids = []
        for item in settings['_children']:
            itype = item['type']
            if itype == 'bool':
                input_widget = QtWidgets.QCheckBox()
                input_widget.setCheckState(QtCore.Qt.Checked if item['value'] == 'true' else QtCore.Qt.Unchecked)
            elif itype == 'enum':
                input_widget = QtWidgets.QComboBox()
                input_widget.addItems(item['values'].split('|'))
                input_widget.setCurrentIndex(int(item['value']))
            elif itype == 'text':
                input_widget = QtWidgets.QLineEdit(item['value'])
                if item['secure'] == 'true':
                    input_widget.setEchoMode(QtWidgets.QLineEdit.PasswordEchoOnEdit)
            else:
                input_widget = QtWidgets.QLabel('...')
            self.form.addRow(QtWidgets.QLabel(item['label']), input_widget)
            self.ids.append((item['id'], input_widget))

        self.buttons = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel, QtCore.Qt.Horizontal, self)
        self.form.addRow(self.buttons)
        self.buttons.rejected.connect(self.reject)
        self.buttons.accepted.connect(self.accept)
        if self.exec_() == QtWidgets.QDialog.Accepted:
            media_object.container.server.request(media_object.key + '/set', params=self.extract_values())
项目:plexdesktop    作者:coryo    | 项目源码 | 文件源码
def __init__(self, parent=None):
        super().__init__(parent)
        s = plexdesktop.settings.Settings()
        self.setWindowTitle('Preferences')
        self.form = QtWidgets.QFormLayout(self)

        i = QtWidgets.QComboBox()
        i.addItems(plexdesktop.style.Style.Instance().themes)
        i.setCurrentIndex(i.findText(s.value('theme')))
        self.form.addRow(QtWidgets.QLabel('theme'), i)

        bf = QtWidgets.QSpinBox()
        bf.setValue(int(s.value('browser_font', 9)))
        self.form.addRow(QtWidgets.QLabel('browser font size'), bf)

        icon_size = QtWidgets.QLineEdit(str(s.value('thumb_size', 240)))
        icon_size.setValidator(QtGui.QIntValidator(0, 300))
        self.form.addRow(QtWidgets.QLabel('thumbnail size'), icon_size)

        widget_player = QtWidgets.QCheckBox()
        widget_player.setCheckState(QtCore.Qt.Checked if bool(int(s.value('widget_player', 0))) else QtCore.Qt.Unchecked)
        self.form.addRow(QtWidgets.QLabel('use widget player'), widget_player)

        self.buttons = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel,
            QtCore.Qt.Horizontal, self)
        self.form.addRow(self.buttons)
        self.buttons.rejected.connect(self.reject)
        self.buttons.accepted.connect(self.accept)

        if self.exec_() == QtWidgets.QDialog.Accepted:
            # s = Settings()
            theme = i.currentText()
            s.setValue('theme', theme)
            plexdesktop.style.Style.Instance().theme(theme)

            s.setValue('browser_font', bf.value())

            s.setValue('thumb_size', int(icon_size.text()))

            s.setValue('widget_player', 1 if widget_player.checkState() == QtCore.Qt.Checked else 0)
项目:plexdesktop    作者:coryo    | 项目源码 | 文件源码
def setupUi(self, Login):
        Login.setObjectName("Login")
        Login.resize(234, 101)
        self.verticalLayout = QtWidgets.QVBoxLayout(Login)
        self.verticalLayout.setObjectName("verticalLayout")
        self.formLayout_2 = QtWidgets.QFormLayout()
        self.formLayout_2.setObjectName("formLayout_2")
        self.username = QtWidgets.QLineEdit(Login)
        self.username.setObjectName("username")
        self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.username)
        self.password = QtWidgets.QLineEdit(Login)
        self.password.setEchoMode(QtWidgets.QLineEdit.Password)
        self.password.setObjectName("password")
        self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.password)
        self.label = QtWidgets.QLabel(Login)
        self.label.setObjectName("label")
        self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label)
        self.label_2 = QtWidgets.QLabel(Login)
        self.label_2.setObjectName("label_2")
        self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_2)
        self.buttonBox = QtWidgets.QDialogButtonBox(Login)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.formLayout_2.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.buttonBox)
        self.verticalLayout.addLayout(self.formLayout_2)

        self.retranslateUi(Login)
        self.buttonBox.accepted.connect(Login.accept)
        self.buttonBox.rejected.connect(Login.reject)
        QtCore.QMetaObject.connectSlotsByName(Login)
项目:PINCE    作者:korcankaraokcu    | 项目源码 | 文件源码
def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(515, 138)
        self.gridLayout = QtWidgets.QGridLayout(Dialog)
        self.gridLayout.setObjectName("gridLayout")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.label = QtWidgets.QLabel(Dialog)
        self.label.setObjectName("label")
        self.horizontalLayout.addWidget(self.label)
        self.lineEdit_Address = QtWidgets.QLineEdit(Dialog)
        self.lineEdit_Address.setObjectName("lineEdit_Address")
        self.horizontalLayout.addWidget(self.lineEdit_Address)
        self.label_2 = QtWidgets.QLabel(Dialog)
        self.label_2.setObjectName("label_2")
        self.horizontalLayout.addWidget(self.label_2)
        self.lineEdit_Length = QtWidgets.QLineEdit(Dialog)
        self.lineEdit_Length.setObjectName("lineEdit_Length")
        self.horizontalLayout.addWidget(self.lineEdit_Length)
        self.pushButton_Refresh = QtWidgets.QPushButton(Dialog)
        self.pushButton_Refresh.setObjectName("pushButton_Refresh")
        self.horizontalLayout.addWidget(self.pushButton_Refresh)
        self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1)
        self.lineEdit_AsciiView = QtWidgets.QLineEdit(Dialog)
        self.lineEdit_AsciiView.setObjectName("lineEdit_AsciiView")
        self.gridLayout.addWidget(self.lineEdit_AsciiView, 1, 0, 1, 1)
        self.lineEdit_HexView = QtWidgets.QLineEdit(Dialog)
        self.lineEdit_HexView.setObjectName("lineEdit_HexView")
        self.gridLayout.addWidget(self.lineEdit_HexView, 2, 0, 1, 1)
        self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.gridLayout.addWidget(self.buttonBox, 3, 0, 1, 1)

        self.retranslateUi(Dialog)
        self.buttonBox.accepted.connect(Dialog.accept)
        self.buttonBox.rejected.connect(Dialog.reject)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
项目:CRIkit2    作者:CoherentRamanNIST    | 项目源码 | 文件源码
def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(389, 239)
        Dialog.setStyleSheet("font: 10pt \"Arial\";")
        self.gridLayout = QtWidgets.QGridLayout(Dialog)
        self.gridLayout.setObjectName("gridLayout")
        self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.gridLayout.addWidget(self.buttonBox, 1, 0, 1, 1)
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.label = QtWidgets.QLabel(Dialog)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(10)
        font.setItalic(False)
        self.label.setFont(font)
        self.label.setObjectName("label")
        self.verticalLayout.addWidget(self.label, 0, QtCore.Qt.AlignTop)
        self.comboBox = QtWidgets.QComboBox(Dialog)
        self.comboBox.setObjectName("comboBox")
        self.verticalLayout.addWidget(self.comboBox)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem1)
        self.label_2 = QtWidgets.QLabel(Dialog)
        self.label_2.setObjectName("label_2")
        self.verticalLayout.addWidget(self.label_2)
        self.plainTextEditDescription = QtWidgets.QPlainTextEdit(Dialog)
        self.plainTextEditDescription.setReadOnly(True)
        self.plainTextEditDescription.setObjectName("plainTextEditDescription")
        self.verticalLayout.addWidget(self.plainTextEditDescription)
        self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)

        self.retranslateUi(Dialog)
        self.buttonBox.accepted.connect(Dialog.accept)
        self.buttonBox.rejected.connect(Dialog.reject)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
项目:Enchain    作者:Zhehua-Hu    | 项目源码 | 文件源码
def setupUi(self, AutoSelectSetting):
        AutoSelectSetting.setObjectName("AutoSelectSetting")
        AutoSelectSetting.resize(386, 219)
        self.buttonBoxQuery = QtWidgets.QDialogButtonBox(AutoSelectSetting)
        self.buttonBoxQuery.setGeometry(QtCore.QRect(20, 181, 341, 31))
        self.buttonBoxQuery.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBoxQuery.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBoxQuery.setObjectName("buttonBoxQuery")
        self.gridLayoutWidget = QtWidgets.QWidget(AutoSelectSetting)
        self.gridLayoutWidget.setGeometry(QtCore.QRect(20, 40, 160, 81))
        self.gridLayoutWidget.setObjectName("gridLayoutWidget")
        self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
        self.gridLayout.setObjectName("gridLayout")
        self.spinBox = QtWidgets.QSpinBox(self.gridLayoutWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(15)
        sizePolicy.setHeightForWidth(self.spinBox.sizePolicy().hasHeightForWidth())
        self.spinBox.setSizePolicy(sizePolicy)
        self.spinBox.setProperty("value", 1)
        self.spinBox.setObjectName("spinBox")
        self.gridLayout.addWidget(self.spinBox, 1, 0, 1, 1)
        self.label = QtWidgets.QLabel(self.gridLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(14)
        font.setBold(True)
        font.setItalic(True)
        font.setWeight(75)
        self.label.setFont(font)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)

        self.retranslateUi(AutoSelectSetting)
        self.buttonBoxQuery.accepted.connect(AutoSelectSetting.accept)
        self.buttonBoxQuery.rejected.connect(AutoSelectSetting.reject)
        QtCore.QMetaObject.connectSlotsByName(AutoSelectSetting)
项目:ClockworkVMs    作者:csd-dev-tools    | 项目源码 | 文件源码
def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(325, 250)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
        self.gridLayout.setObjectName("gridLayout")
        self.label_4 = QtWidgets.QLabel(self.centralwidget)
        font = QtGui.QFont()
        font.setPointSize(24)
        self.label_4.setFont(font)
        self.label_4.setObjectName("label_4")
        self.gridLayout.addWidget(self.label_4, 0, 0, 1, 1)
        self.packerLabel = QtWidgets.QLabel(self.centralwidget)
        self.packerLabel.setObjectName("packerLabel")
        self.gridLayout.addWidget(self.packerLabel, 1, 0, 1, 1)
        self.boxcutterLabel = QtWidgets.QLabel(self.centralwidget)
        self.boxcutterLabel.setObjectName("boxcutterLabel")
        self.gridLayout.addWidget(self.boxcutterLabel, 2, 0, 1, 1)
        self.osFamily = QtWidgets.QComboBox(self.centralwidget)
        self.osFamily.setObjectName("osFamily")
        self.gridLayout.addWidget(self.osFamily, 3, 0, 1, 1)
        self.osVersions = QtWidgets.QComboBox(self.centralwidget)
        self.osVersions.setObjectName("osVersions")
        self.gridLayout.addWidget(self.osVersions, 4, 0, 1, 1)
        self.buttonBox = QtWidgets.QDialogButtonBox(self.centralwidget)
        self.buttonBox.setToolTipDuration(30)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply|QtWidgets.QDialogButtonBox.Close|QtWidgets.QDialogButtonBox.Ok|QtWidgets.QDialogButtonBox.Save)
        self.buttonBox.setObjectName("buttonBox")
        self.gridLayout.addWidget(self.buttonBox, 5, 0, 1, 1)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 325, 22))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
项目:BadPlayer    作者:SebastienTr    | 项目源码 | 文件源码
def setupUi(self, SettingsDialog):
        SettingsDialog.setObjectName("SettingsDialog")
        SettingsDialog.resize(459, 141)
        self.gridLayout_2 = QtWidgets.QGridLayout(SettingsDialog)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.comboBox = QtWidgets.QComboBox(SettingsDialog)
        self.comboBox.setObjectName("comboBox")
        self.gridLayout_2.addWidget(self.comboBox, 0, 1, 1, 1)
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setContentsMargins(0, -1, -1, -1)
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtWidgets.QLabel(SettingsDialog)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
        self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
        self.buttonBox = QtWidgets.QDialogButtonBox(SettingsDialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.gridLayout_2.addWidget(self.buttonBox, 2, 0, 1, 2)
        self.label_2 = QtWidgets.QLabel(SettingsDialog)
        self.label_2.setObjectName("label_2")
        self.gridLayout_2.addWidget(self.label_2, 1, 0, 1, 1)
        self.spinBox = QtWidgets.QSpinBox(SettingsDialog)
        self.spinBox.setObjectName("spinBox")
        self.gridLayout_2.addWidget(self.spinBox, 1, 1, 1, 1)

        self.retranslateUi(SettingsDialog)
        self.buttonBox.accepted.connect(SettingsDialog.accept)
        self.buttonBox.rejected.connect(SettingsDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(SettingsDialog)
项目:Worksets    作者:DozyDolphin    | 项目源码 | 文件源码
def setupUi(self, manage_worksets):
        manage_worksets.setObjectName("manage_worksets")
        manage_worksets.resize(500, 350)
        manage_worksets.setMinimumSize(QtCore.QSize(500, 300))
        manage_worksets.setMaximumSize(QtCore.QSize(500, 350))
        self.buttonBox = QtWidgets.QDialogButtonBox(manage_worksets)
        self.buttonBox.setGeometry(QtCore.QRect(140, 300, 341, 32))
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.workset_list = QtWidgets.QListWidget(manage_worksets)
        self.workset_list.setGeometry(QtCore.QRect(21, 20, 459, 221))
        self.workset_list.setMinimumSize(QtCore.QSize(459, 0))
        self.workset_list.setMaximumSize(QtCore.QSize(341, 350))
        self.workset_list.setObjectName("workset_list")
        self.new_workset_btn = QtWidgets.QPushButton(manage_worksets)
        self.new_workset_btn.setGeometry(QtCore.QRect(380, 250, 101, 26))
        self.new_workset_btn.setObjectName("new_workset_btn")
        self.delete_btn = QtWidgets.QPushButton(manage_worksets)
        self.delete_btn.setEnabled(False)
        self.delete_btn.setGeometry(QtCore.QRect(20, 250, 101, 26))
        self.delete_btn.setObjectName("delete_btn")

        self.retranslateUi(manage_worksets)
        self.buttonBox.accepted.connect(manage_worksets.accept)
        self.buttonBox.rejected.connect(manage_worksets.reject)
        QtCore.QMetaObject.connectSlotsByName(manage_worksets)
项目:mindfulness-at-the-computer    作者:SunyataZero    | 项目源码 | 文件源码
def __init__(self, i_parent=None):
        super(EditDialog, self).__init__(i_parent)

        # If a phrase is not selected, default to phrase with id 1
        if mc.mc_global.active_phrase_id_it == mc.mc_global.NO_PHRASE_SELECTED_INT:
            mc.mc_global.active_phrase_id_it = 1

        active_phrase = mc.model.PhrasesM.get(mc.mc_global.active_phrase_id_it)

        vbox = QtWidgets.QVBoxLayout(self)

        self.breath_title_qle = QtWidgets.QLineEdit(active_phrase.title_str)
        vbox.addWidget(QtWidgets.QLabel("Title"))
        vbox.addWidget(self.breath_title_qle)

        self.in_breath_phrase_qle = QtWidgets.QLineEdit(active_phrase.ib_str)
        vbox.addWidget(QtWidgets.QLabel("In breath phrase"))
        vbox.addWidget(self.in_breath_phrase_qle)
        self.out_breath_phrase_qle = QtWidgets.QLineEdit(active_phrase.ob_str)
        vbox.addWidget(QtWidgets.QLabel("Out breath phrase"))
        vbox.addWidget(self.out_breath_phrase_qle)

        vbox.addWidget(QtWidgets.QLabel("Short in breath phrase"))
        self.short_in_breath_phrase_qle = QtWidgets.QLineEdit(active_phrase.ib_short_str)
        vbox.addWidget(self.short_in_breath_phrase_qle)
        vbox.addWidget(QtWidgets.QLabel("Short out breath phrase"))
        self.short_out_breath_phrase_qle = QtWidgets.QLineEdit(active_phrase.ob_short_str)
        vbox.addWidget(self.short_out_breath_phrase_qle)

        self.button_box = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel,
            QtCore.Qt.Horizontal,
            self
        )
        vbox.addWidget(self.button_box)
        self.button_box.accepted.connect(self.accept)
        self.button_box.rejected.connect(self.reject)
        # -accept and reject are "slots" built into Qt
项目:bubblesub    作者:rr-    | 项目源码 | 文件源码
def __init__(self, api, main_window, dictionary):
        super().__init__(main_window)
        self._main_window = main_window
        self._api = api
        self._dictionary = dictionary
        self._lines_to_spellcheck = api.subs.selected_lines

        self._mispelt_text_edit = QtWidgets.QLineEdit(self, readOnly=True)
        self._replacement_text_edit = QtWidgets.QLineEdit(self)
        self._suggestions_list_view = QtWidgets.QListView(self)
        self._suggestions_list_view.setModel(QtGui.QStandardItemModel())
        self._suggestions_list_view.clicked.connect(self._on_suggestion_click)

        box = QtWidgets.QWidget(self)
        layout = QtWidgets.QVBoxLayout(box)
        layout.setContentsMargins(0, 0, 0, 0)
        layout.addWidget(QtWidgets.QLabel('Mispelt word:', self))
        layout.addWidget(self._mispelt_text_edit)
        layout.addWidget(QtWidgets.QLabel('Replacement:', self))
        layout.addWidget(self._replacement_text_edit)
        layout.addWidget(QtWidgets.QLabel('Suggestions:', self))
        layout.addWidget(self._suggestions_list_view)

        strip = QtWidgets.QDialogButtonBox(
            self, orientation=QtCore.Qt.Vertical)
        self.add_btn = strip.addButton('Add to dictionary', strip.ActionRole)
        self.ignore_btn = strip.addButton('Ignore', strip.ActionRole)
        self.ignore_all_btn = strip.addButton('Ignore all', strip.ActionRole)
        self.replace_btn = strip.addButton('Replace', strip.ActionRole)
        strip.addButton('Cancel', strip.RejectRole)
        strip.clicked.connect(self.action)
        strip.rejected.connect(self.reject)

        layout = QtWidgets.QHBoxLayout(self, spacing=24)
        layout.addWidget(box)
        layout.addWidget(strip)

        if self._next():
            self.exec_()
项目:DownloaderForReddit    作者:MalloyDelacroix    | 项目源码 | 文件源码
def setupUi(self, add_user_dialog):
        add_user_dialog.setObjectName("add_user_dialog")
        add_user_dialog.resize(259, 98)
        font = QtGui.QFont()
        font.setPointSize(10)
        add_user_dialog.setFont(font)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap("Images/add.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        add_user_dialog.setWindowIcon(icon)
        self.gridLayout = QtWidgets.QGridLayout(add_user_dialog)
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtWidgets.QLabel(add_user_dialog)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 2)
        self.user_name_line_edit = QtWidgets.QLineEdit(add_user_dialog)
        self.user_name_line_edit.setObjectName("user_name_line_edit")
        self.gridLayout.addWidget(self.user_name_line_edit, 1, 0, 1, 2)
        self.add_another_button = QtWidgets.QPushButton(add_user_dialog)
        self.add_another_button.setObjectName("add_another_button")
        self.gridLayout.addWidget(self.add_another_button, 2, 0, 1, 1)
        self.ok_cancel_button_box = QtWidgets.QDialogButtonBox(add_user_dialog)
        self.ok_cancel_button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.ok_cancel_button_box.setObjectName("ok_cancel_button_box")
        self.gridLayout.addWidget(self.ok_cancel_button_box, 2, 1, 1, 1)

        self.retranslateUi(add_user_dialog)
        QtCore.QMetaObject.connectSlotsByName(add_user_dialog)
项目:DownloaderForReddit    作者:MalloyDelacroix    | 项目源码 | 文件源码
def setupUi(self, failed_downloads_dialog):
        failed_downloads_dialog.setObjectName("failed_downloads_dialog")
        failed_downloads_dialog.resize(659, 294)
        font = QtGui.QFont()
        font.setPointSize(10)
        failed_downloads_dialog.setFont(font)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap("Images/failed_download.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        failed_downloads_dialog.setWindowIcon(icon)
        self.gridLayout = QtWidgets.QGridLayout(failed_downloads_dialog)
        self.gridLayout.setObjectName("gridLayout")
        self.buttonBox = QtWidgets.QDialogButtonBox(failed_downloads_dialog)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.gridLayout.addWidget(self.buttonBox, 1, 1, 1, 1)
        self.auto_display_checkbox = QtWidgets.QCheckBox(failed_downloads_dialog)
        self.auto_display_checkbox.setObjectName("auto_display_checkbox")
        self.gridLayout.addWidget(self.auto_display_checkbox, 1, 0, 1, 1)
        self.textBrowser = QtWidgets.QTextBrowser(failed_downloads_dialog)
        self.textBrowser.setObjectName("textBrowser")
        self.gridLayout.addWidget(self.textBrowser, 0, 0, 1, 2)

        self.retranslateUi(failed_downloads_dialog)
        QtCore.QMetaObject.connectSlotsByName(failed_downloads_dialog)
项目:DownloaderForReddit    作者:MalloyDelacroix    | 项目源码 | 文件源码
def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(632, 133)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap("Images/iconmonstr-warning-6-48.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        Dialog.setWindowIcon(icon)
        self.gridLayout_2 = QtWidgets.QGridLayout(Dialog)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtWidgets.QLabel(Dialog)
        self.label.setWordWrap(True)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
        self.button_box = QtWidgets.QDialogButtonBox(Dialog)
        font = QtGui.QFont()
        font.setPointSize(10)
        self.button_box.setFont(font)
        self.button_box.setOrientation(QtCore.Qt.Horizontal)
        self.button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.button_box.setObjectName("button_box")
        self.gridLayout_2.addWidget(self.button_box, 1, 0, 1, 1)

        self.retranslateUi(Dialog)
        self.button_box.accepted.connect(Dialog.accept)
        self.button_box.rejected.connect(Dialog.reject)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
项目:DownloaderForReddit    作者:MalloyDelacroix    | 项目源码 | 文件源码
def setupUi(self, About):
        About.setObjectName("About")
        About.resize(403, 405)
        About.setMinimumSize(QtCore.QSize(403, 405))
        About.setMaximumSize(QtCore.QSize(403, 405))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap("Images/RedditDownloaderIcon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        About.setWindowIcon(icon)
        self.buttonBox = QtWidgets.QDialogButtonBox(About)
        self.buttonBox.setGeometry(QtCore.QRect(320, 370, 71, 32))
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.logo_label = QtWidgets.QLabel(About)
        self.logo_label.setGeometry(QtCore.QRect(10, 10, 80, 82))
        self.logo_label.setObjectName("logo_label")
        self.license_box = QtWidgets.QTextBrowser(About)
        self.license_box.setGeometry(QtCore.QRect(10, 120, 381, 231))
        self.license_box.setObjectName("license_box")
        self.info_label = QtWidgets.QLabel(About)
        self.info_label.setGeometry(QtCore.QRect(110, 30, 281, 51))
        self.info_label.setObjectName("info_label")
        self.label = QtWidgets.QLabel(About)
        self.label.setGeometry(QtCore.QRect(110, 10, 291, 21))
        font = QtGui.QFont()
        font.setPointSize(12)
        self.label.setFont(font)
        self.label.setObjectName("label")
        self.link_label = QtWidgets.QLabel(About)
        self.link_label.setGeometry(QtCore.QRect(110, 70, 291, 21))
        self.link_label.setOpenExternalLinks(True)
        self.link_label.setObjectName("link_label")
        self.total_downloads_label = QtWidgets.QLabel(About)
        self.total_downloads_label.setGeometry(QtCore.QRect(20, 380, 291, 19))
        self.total_downloads_label.setObjectName("total_downloads_label")

        self.retranslateUi(About)
        self.buttonBox.accepted.connect(About.accept)
        self.buttonBox.rejected.connect(About.reject)
        QtCore.QMetaObject.connectSlotsByName(About)
项目:Pyslvs-PyQt5    作者:KmolYuan    | 项目源码 | 文件源码
def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(323, 85)
        Dialog.setMinimumSize(QtCore.QSize(323, 85))
        Dialog.setMaximumSize(QtCore.QSize(323, 85))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/icons/delete.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        Dialog.setWindowIcon(icon)
        Dialog.setSizeGripEnabled(False)
        Dialog.setModal(True)
        self.horizontalLayout = QtWidgets.QHBoxLayout(Dialog)
        self.horizontalLayout.setContentsMargins(6, 6, 6, 6)
        self.horizontalLayout.setSpacing(6)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.Entity = QtWidgets.QComboBox(Dialog)
        self.Entity.setObjectName("Entity")
        self.horizontalLayout.addWidget(self.Entity)
        self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
        self.buttonBox.setOrientation(QtCore.Qt.Vertical)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.horizontalLayout.addWidget(self.buttonBox)

        self.retranslateUi(Dialog)
        self.buttonBox.accepted.connect(Dialog.accept)
        self.buttonBox.rejected.connect(Dialog.reject)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
项目:copa    作者:komradz    | 项目源码 | 文件源码
def setupUi(self):
        self.setObjectName("Dialog")
        self.resize(355, 76)
        self.buttonBox = QtWidgets.QDialogButtonBox(self)
        self.buttonBox.setGeometry(QtCore.QRect(0, 40, 341, 32))
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        font8 = QtGui.QFont('Courier New',8)
        self.buttonBox.addButton('Find (Enter)',QtWidgets.QDialogButtonBox.AcceptRole)
        self.findnext_Btn = self.buttonBox.addButton('Find next (F3)',QtWidgets.QDialogButtonBox.ApplyRole)
        self.buttonBox.addButton('Cancel',QtWidgets.QDialogButtonBox.RejectRole)
        self.buttonBox.setObjectName("buttonBox")
        self.lineEdit_search = QtWidgets.QLineEdit(self)
        self.lineEdit_search.setGeometry(QtCore.QRect(100, 10, 221, 20))
        self.lineEdit_search.setObjectName("lineEdit_search")
        self.lineEdit_search.setFont(font8)
        self.lineEdit_search.setClearButtonEnabled(True)
        self.label = QtWidgets.QLabel(self)
        self.label.setGeometry(QtCore.QRect(10, 10, 71, 16))
        self.label.setObjectName("label")

        self.lineEdit_search.setText('search here')
        self.retranslateUi()
        #button clicks events
        self.buttonBox.accepted.connect(self.accept)
        self.buttonBox.rejected.connect(self.reject)
        self.findnext_Btn.clicked.connect(self.acceptNext)

        # shortcut = QtWidgets.QShortcut(QtGui.QKeySequence(QtCore.Qt.Key_F3), self)
        # # shortcut = QtWidgets.QShortcut(QtGui.QKeySequence(QtCore.Qt.Key_F3), self, QtCore.SLOT(self.acceptNext))
        # self.setShortcutEnabled(shortcut.id(),True)
        # findNext_ = QtWidgets.QAction('&FindNext', self)
        # findNext_.setShortcut(QtGui.QKeySequence(QtCore.Qt.Key_F3))
        # findNext_.triggered.connect(self.acceptNext)

        find_ = QtWidgets.QAction('&Find', self)
        find_.setShortcut(self.tr("Enter"))
        find_.triggered.connect(self.accept)

        QtCore.QMetaObject.connectSlotsByName(self)
        self.setTabOrder(self.lineEdit_search, self.findnext_Btn)
        self.setTabOrder(self.findnext_Btn, self.buttonBox)
    # def exec(self):
    #     return 1
项目:FuME    作者:fupadev    | 项目源码 | 文件源码
def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.setWindowModality(QtCore.Qt.ApplicationModal)
        Dialog.resize(450, 473)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(Dialog.sizePolicy().hasHeightForWidth())
        Dialog.setSizePolicy(sizePolicy)
        Dialog.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
        self.gridLayout = QtWidgets.QGridLayout(Dialog)
        self.gridLayout.setObjectName("gridLayout")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.label = QtWidgets.QLabel(Dialog)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
        self.label.setSizePolicy(sizePolicy)
        self.label.setMaximumSize(QtCore.QSize(100, 100))
        self.label.setText("")
        self.label.setPixmap(QtGui.QPixmap("header_klein.png"))
        self.label.setObjectName("label")
        self.verticalLayout.addWidget(self.label, 0, QtCore.Qt.AlignHCenter)
        self.label_2 = QtWidgets.QLabel(Dialog)
        self.label_2.setObjectName("label_2")
        self.verticalLayout.addWidget(self.label_2, 0, QtCore.Qt.AlignHCenter)
        self.label_3 = QtWidgets.QLabel(Dialog)
        self.label_3.setObjectName("label_3")
        self.verticalLayout.addWidget(self.label_3, 0, QtCore.Qt.AlignHCenter)
        self.label_5 = QtWidgets.QLabel(Dialog)
        self.label_5.setOpenExternalLinks(True)
        self.label_5.setObjectName("label_5")
        self.verticalLayout.addWidget(self.label_5, 0, QtCore.Qt.AlignHCenter)
        self.textEdit = QtWidgets.QTextEdit(Dialog)
        self.textEdit.setAutoFillBackground(False)
        self.textEdit.setReadOnly(True)
        self.textEdit.setObjectName("textEdit")
        self.verticalLayout.addWidget(self.textEdit)
        self.label_4 = QtWidgets.QLabel(Dialog)
        self.label_4.setObjectName("label_4")
        self.verticalLayout.addWidget(self.label_4, 0, QtCore.Qt.AlignHCenter)
        self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)
        self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)

        self.retranslateUi(Dialog)
        self.buttonBox.accepted.connect(Dialog.accept)
        self.buttonBox.rejected.connect(Dialog.reject)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
项目:FuME    作者:fupadev    | 项目源码 | 文件源码
def setupUi(self, Settings):
        Settings.setObjectName("Settings")
        Settings.resize(471, 410)
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(Settings)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.groupBox = QtWidgets.QGroupBox(Settings)
        self.groupBox.setObjectName("groupBox")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.groupBox)
        self.verticalLayout.setObjectName("verticalLayout")
        self.label_3 = QtWidgets.QLabel(self.groupBox)
        self.label_3.setMinimumSize(QtCore.QSize(0, 50))
        self.label_3.setWordWrap(True)
        self.label_3.setOpenExternalLinks(True)
        self.label_3.setObjectName("label_3")
        self.verticalLayout.addWidget(self.label_3)
        self.label = QtWidgets.QLabel(self.groupBox)
        self.label.setObjectName("label")
        self.verticalLayout.addWidget(self.label)
        self.lineEdit = QtWidgets.QLineEdit(self.groupBox)
        self.lineEdit.setObjectName("lineEdit")
        self.verticalLayout.addWidget(self.lineEdit)
        self.label_2 = QtWidgets.QLabel(self.groupBox)
        self.label_2.setObjectName("label_2")
        self.verticalLayout.addWidget(self.label_2)
        self.lineEdit_2 = QtWidgets.QLineEdit(self.groupBox)
        self.lineEdit_2.setEchoMode(QtWidgets.QLineEdit.Password)
        self.lineEdit_2.setObjectName("lineEdit_2")
        self.verticalLayout.addWidget(self.lineEdit_2)
        self.pushButton = QtWidgets.QPushButton(self.groupBox)
        self.pushButton.setAutoDefault(True)
        self.pushButton.setDefault(False)
        self.pushButton.setFlat(False)
        self.pushButton.setObjectName("pushButton")
        self.verticalLayout.addWidget(self.pushButton)
        self.verticalLayout_2.addWidget(self.groupBox)
        self.groupBox_2 = QtWidgets.QGroupBox(Settings)
        self.groupBox_2.setObjectName("groupBox_2")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.groupBox_2)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.pushButton_2 = QtWidgets.QPushButton(self.groupBox_2)
        self.pushButton_2.setObjectName("pushButton_2")
        self.verticalLayout_3.addWidget(self.pushButton_2)
        self.pushButton_3 = QtWidgets.QPushButton(self.groupBox_2)
        self.pushButton_3.setObjectName("pushButton_3")
        self.verticalLayout_3.addWidget(self.pushButton_3)
        self.checkBox = QtWidgets.QCheckBox(self.groupBox_2)
        self.checkBox.setChecked(True)
        self.checkBox.setObjectName("checkBox")
        self.verticalLayout_3.addWidget(self.checkBox)
        self.verticalLayout_2.addWidget(self.groupBox_2)
        self.buttonBox = QtWidgets.QDialogButtonBox(Settings)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout_2.addWidget(self.buttonBox)

        self.retranslateUi(Settings)
        self.buttonBox.accepted.connect(Settings.accept)
        self.buttonBox.rejected.connect(Settings.reject)
        QtCore.QMetaObject.connectSlotsByName(Settings)
项目:SiviCNCDriver    作者:Klafyvel    | 项目源码 | 文件源码
def setupUi(self, dialog):
        dialog.setObjectName("dialog")
        dialog.resize(561, 298)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap("traceIcon.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        dialog.setWindowIcon(icon)
        dialog.setModal(True)
        self.verticalLayout_4 = QtWidgets.QVBoxLayout(dialog)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.widget_2 = QtWidgets.QWidget(dialog)
        self.widget_2.setObjectName("widget_2")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.widget_2)
        self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.widget = QtWidgets.QWidget(self.widget_2)
        self.widget.setObjectName("widget")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.widget)
        self.verticalLayout_3.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.groupBox = QtWidgets.QGroupBox(self.widget)
        self.groupBox.setObjectName("groupBox")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.groupBox)
        self.verticalLayout.setObjectName("verticalLayout")
        self.chk_del_num = QtWidgets.QCheckBox(self.groupBox)
        self.chk_del_num.setChecked(True)
        self.chk_del_num.setObjectName("chk_del_num")
        self.verticalLayout.addWidget(self.chk_del_num)
        self.chk_del_comments = QtWidgets.QCheckBox(self.groupBox)
        self.chk_del_comments.setChecked(True)
        self.chk_del_comments.setObjectName("chk_del_comments")
        self.verticalLayout.addWidget(self.chk_del_comments)
        self.chk_optimize_bounding_box = QtWidgets.QCheckBox(self.groupBox)
        self.chk_optimize_bounding_box.setToolTip("")
        self.chk_optimize_bounding_box.setChecked(True)
        self.chk_optimize_bounding_box.setObjectName("chk_optimize_bounding_box")
        self.verticalLayout.addWidget(self.chk_optimize_bounding_box)
        self.verticalLayout_3.addWidget(self.groupBox)
        self.btn_run_preproc = QtWidgets.QPushButton(self.widget)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(":/rc/rc/work.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.btn_run_preproc.setIcon(icon1)
        self.btn_run_preproc.setObjectName("btn_run_preproc")
        self.verticalLayout_3.addWidget(self.btn_run_preproc)
        self.horizontalLayout.addWidget(self.widget)
        self.groupBox_2 = QtWidgets.QGroupBox(self.widget_2)
        self.groupBox_2.setObjectName("groupBox_2")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox_2)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.output = QtWidgets.QTextEdit(self.groupBox_2)
        self.output.setObjectName("output")
        self.verticalLayout_2.addWidget(self.output)
        self.horizontalLayout.addWidget(self.groupBox_2)
        self.verticalLayout_4.addWidget(self.widget_2)
        self.buttonBox = QtWidgets.QDialogButtonBox(dialog)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setCenterButtons(False)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout_4.addWidget(self.buttonBox)

        self.retranslateUi(dialog)
        QtCore.QMetaObject.connectSlotsByName(dialog)
项目:OnCue    作者:featherbear    | 项目源码 | 文件源码
def setupUi(self, modal_ynoc):
        modal_ynoc.setObjectName("modal_ynoc")
        modal_ynoc.setWindowModality(QtCore.Qt.ApplicationModal)
        modal_ynoc.resize(508, 309)
        font = QtGui.QFont()
        font.setPointSize(12)
        modal_ynoc.setFont(font)
        modal_ynoc.setStyleSheet("QWidget {\n"
"text-align: center;\n"
"color: black;\n"
"border: none;\n"
"text-decoration: none;\n"
"}")
        modal_ynoc.setModal(True)
        self.theming = QtWidgets.QFrame(modal_ynoc)
        self.theming.setGeometry(QtCore.QRect(0, 0, 508, 309))
        self.theming.setStyleSheet("QPushButton {\n"
"background-color: #BAB9BA;\n"
"color: white;\n"
"}\n"
"QPushButton:hover {\n"
"background-color: #8CC5FF;\n"
"}")
        self.theming.setObjectName("theming")
        self.response = QtWidgets.QDialogButtonBox(self.theming)
        self.response.setGeometry(QtCore.QRect(20, 250, 471, 41))
        self.response.setStyleSheet("width: 157px; height: 100%;")
        self.response.setOrientation(QtCore.Qt.Horizontal)
        self.response.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.No|QtWidgets.QDialogButtonBox.Ok|QtWidgets.QDialogButtonBox.Yes)
        self.response.setCenterButtons(True)
        self.response.setObjectName("response")
        self.message = QtWidgets.QLabel(self.theming)
        self.message.setGeometry(QtCore.QRect(20, 20, 471, 211))
        font = QtGui.QFont()
        font.setPointSize(12)
        self.message.setFont(font)
        self.message.setAlignment(QtCore.Qt.AlignCenter)
        self.message.setWordWrap(True)
        self.message.setObjectName("message")
        self.message.raise_()
        self.response.raise_()

        self.retranslateUi(modal_ynoc)
        self.response.accepted.connect(modal_ynoc.accept)
        self.response.rejected.connect(modal_ynoc.reject)
        QtCore.QMetaObject.connectSlotsByName(modal_ynoc)
项目:coquery    作者:gkunter    | 项目源码 | 文件源码
def setupUi(self, UniqueViewer):
        UniqueViewer.setObjectName("UniqueViewer")
        UniqueViewer.resize(407, 544)
        self.verticalLayout = QtWidgets.QVBoxLayout(UniqueViewer)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setSpacing(0)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout()
        self.verticalLayout_3.setContentsMargins(4, -1, 4, -1)
        self.verticalLayout_3.setSpacing(1)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.label_inform = QtWidgets.QLabel(UniqueViewer)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_inform.sizePolicy().hasHeightForWidth())
        self.label_inform.setSizePolicy(sizePolicy)
        self.label_inform.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
        self.label_inform.setObjectName("label_inform")
        self.verticalLayout_3.addWidget(self.label_inform)
        self.progress_bar = QtWidgets.QProgressBar(UniqueViewer)
        self.progress_bar.setMaximum(0)
        self.progress_bar.setProperty("value", 0)
        self.progress_bar.setObjectName("progress_bar")
        self.verticalLayout_3.addWidget(self.progress_bar)
        self.verticalLayout_2.addLayout(self.verticalLayout_3)
        self.tableWidget = QtWidgets.QTableWidget(UniqueViewer)
        self.tableWidget.setAlternatingRowColors(True)
        self.tableWidget.setShowGrid(False)
        self.tableWidget.setCornerButtonEnabled(False)
        self.tableWidget.setObjectName("tableWidget")
        self.tableWidget.setColumnCount(0)
        self.tableWidget.setRowCount(0)
        self.tableWidget.horizontalHeader().setSortIndicatorShown(True)
        self.tableWidget.horizontalHeader().setStretchLastSection(True)
        self.verticalLayout_2.addWidget(self.tableWidget)
        spacerItem = QtWidgets.QSpacerItem(20, 0, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem)
        self.verticalLayout_2.setStretch(1, 1)
        self.verticalLayout.addLayout(self.verticalLayout_2)
        self.buttonBox = QtWidgets.QDialogButtonBox(UniqueViewer)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Save)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(UniqueViewer)
        QtCore.QMetaObject.connectSlotsByName(UniqueViewer)
项目:coquery    作者:gkunter    | 项目源码 | 文件源码
def setupUi(self, GroupDialog):
        GroupDialog.setObjectName("GroupDialog")
        GroupDialog.resize(640, 480)
        self.verticalLayout = QtWidgets.QGridLayout(GroupDialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.buttonBox = QtWidgets.QDialogButtonBox(GroupDialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox, 3, 1, 1, 1)
        self.label_3 = QtWidgets.QLabel(GroupDialog)
        self.label_3.setObjectName("label_3")
        self.verticalLayout.addWidget(self.label_3, 2, 0, 1, 1)
        self.label = QtWidgets.QLabel(GroupDialog)
        self.label.setObjectName("label")
        self.verticalLayout.addWidget(self.label, 0, 0, 1, 1)
        self.widget_selection = CoqListSelect(GroupDialog)
        self.widget_selection.setObjectName("widget_selection")
        self.verticalLayout.addWidget(self.widget_selection, 1, 1, 1, 1)
        self.label_2 = QtWidgets.QLabel(GroupDialog)
        self.label_2.setObjectName("label_2")
        self.verticalLayout.addWidget(self.label_2, 1, 0, 1, 1)
        self.edit_label = QtWidgets.QLineEdit(GroupDialog)
        self.edit_label.setText("")
        self.edit_label.setObjectName("edit_label")
        self.verticalLayout.addWidget(self.edit_label, 0, 1, 1, 1)
        self.scroll_area = QtWidgets.QScrollArea(GroupDialog)
        self.scroll_area.setWidgetResizable(True)
        self.scroll_area.setObjectName("scroll_area")
        self.scroll_content = QtWidgets.QWidget()
        self.scroll_content.setGeometry(QtCore.QRect(0, 0, 535, 265))
        self.scroll_content.setObjectName("scroll_content")
        self.scroll_layout = QtWidgets.QVBoxLayout(self.scroll_content)
        self.scroll_layout.setContentsMargins(0, 0, 0, 0)
        self.scroll_layout.setSpacing(0)
        self.scroll_layout.setObjectName("scroll_layout")
        self.scroll_area.setWidget(self.scroll_content)
        self.verticalLayout.addWidget(self.scroll_area, 2, 1, 1, 1)
        self.verticalLayout.setRowStretch(1, 1)
        self.verticalLayout.setRowStretch(2, 2)
        self.label_3.setBuddy(self.scroll_content)
        self.label.setBuddy(self.edit_label)
        self.label_2.setBuddy(self.widget_selection)

        self.retranslateUi(GroupDialog)
        self.buttonBox.accepted.connect(GroupDialog.accept)
        self.buttonBox.rejected.connect(GroupDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(GroupDialog)
项目:coquery    作者:gkunter    | 项目源码 | 文件源码
def setupUi(self, Stopwords):
        Stopwords.setObjectName("Stopwords")
        Stopwords.resize(640, 480)
        self.verticalLayout_4 = QtWidgets.QVBoxLayout(Stopwords)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.groupBox = QtWidgets.QGroupBox(Stopwords)
        self.groupBox.setObjectName("groupBox")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.groupBox)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.stopword_list = CoqTagBox(self.groupBox)
        self.stopword_list.setObjectName("stopword_list")
        self.verticalLayout_3.addWidget(self.stopword_list)
        self.buttonbox_io = QtWidgets.QDialogButtonBox(self.groupBox)
        self.buttonbox_io.setStandardButtons(QtWidgets.QDialogButtonBox.Open|QtWidgets.QDialogButtonBox.Reset|QtWidgets.QDialogButtonBox.Save)
        self.buttonbox_io.setObjectName("buttonbox_io")
        self.verticalLayout_3.addWidget(self.buttonbox_io)
        self.verticalLayout_4.addWidget(self.groupBox)
        self.groupBox1 = QtWidgets.QGroupBox(Stopwords)
        self.groupBox1.setObjectName("groupBox1")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.groupBox1)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.label_2 = QtWidgets.QLabel(self.groupBox1)
        self.label_2.setObjectName("label_2")
        self.horizontalLayout_3.addWidget(self.label_2)
        self.combo_language = QtWidgets.QComboBox(self.groupBox1)
        self.combo_language.setObjectName("combo_language")
        self.horizontalLayout_3.addWidget(self.combo_language)
        self.button_add_list = QtWidgets.QPushButton(self.groupBox1)
        self.button_add_list.setObjectName("button_add_list")
        self.horizontalLayout_3.addWidget(self.button_add_list)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_3.addItem(spacerItem)
        self.verticalLayout_4.addWidget(self.groupBox1)
        self.buttonBox = QtWidgets.QDialogButtonBox(Stopwords)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setCenterButtons(False)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout_4.addWidget(self.buttonBox)
        self.label_2.setBuddy(self.combo_language)

        self.retranslateUi(Stopwords)
        self.buttonBox.accepted.connect(Stopwords.accept)
        self.buttonBox.rejected.connect(Stopwords.reject)
        QtCore.QMetaObject.connectSlotsByName(Stopwords)
项目:MDT    作者:cbclab    | 项目源码 | 文件源码
def setupUi(self, RuntimeSettingsDialog):
        RuntimeSettingsDialog.setObjectName("RuntimeSettingsDialog")
        RuntimeSettingsDialog.resize(844, 243)
        self.verticalLayout = QtWidgets.QVBoxLayout(RuntimeSettingsDialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout()
        self.verticalLayout_3.setSpacing(0)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.label_3 = QtWidgets.QLabel(RuntimeSettingsDialog)
        font = QtGui.QFont()
        font.setPointSize(14)
        self.label_3.setFont(font)
        self.label_3.setObjectName("label_3")
        self.verticalLayout_3.addWidget(self.label_3)
        self.label_4 = QtWidgets.QLabel(RuntimeSettingsDialog)
        font = QtGui.QFont()
        font.setItalic(True)
        self.label_4.setFont(font)
        self.label_4.setObjectName("label_4")
        self.verticalLayout_3.addWidget(self.label_4)
        self.verticalLayout.addLayout(self.verticalLayout_3)
        self.line = QtWidgets.QFrame(RuntimeSettingsDialog)
        self.line.setFrameShape(QtWidgets.QFrame.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")
        self.verticalLayout.addWidget(self.line)
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.cldevicesSelection = QtWidgets.QListWidget(RuntimeSettingsDialog)
        self.cldevicesSelection.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
        self.cldevicesSelection.setObjectName("cldevicesSelection")
        self.gridLayout.addWidget(self.cldevicesSelection, 0, 1, 1, 1)
        self.label_10 = QtWidgets.QLabel(RuntimeSettingsDialog)
        font = QtGui.QFont()
        font.setItalic(True)
        self.label_10.setFont(font)
        self.label_10.setObjectName("label_10")
        self.gridLayout.addWidget(self.label_10, 0, 2, 1, 1)
        self.label = QtWidgets.QLabel(RuntimeSettingsDialog)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.verticalLayout.addLayout(self.gridLayout)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.line_3 = QtWidgets.QFrame(RuntimeSettingsDialog)
        self.line_3.setFrameShape(QtWidgets.QFrame.HLine)
        self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_3.setObjectName("line_3")
        self.verticalLayout.addWidget(self.line_3)
        self.buttonBox = QtWidgets.QDialogButtonBox(RuntimeSettingsDialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(RuntimeSettingsDialog)
        self.buttonBox.accepted.connect(RuntimeSettingsDialog.accept)
        self.buttonBox.rejected.connect(RuntimeSettingsDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(RuntimeSettingsDialog)