Python PyQt4.QtGui.QLineEdit() Examples

The following are 30 code examples of PyQt4.QtGui.QLineEdit(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module PyQt4.QtGui , or try the search function .
Example #1
Source File: Sniffer.py    From SimpleSniffer with GNU General Public License v3.0 6 votes vote down vote up
def initUI(self):
        grid = QtGui.QGridLayout()

        grid.addWidget(QtGui.QLabel(u'过滤规则:', parent=self), 0, 0, 1, 1)
        self.filter = QtGui.QLineEdit(parent=self)
        grid.addWidget(self.filter, 0, 1, 1, 1)
        # 创建ButtonBox,用户确定和取消
        buttonBox = QtGui.QDialogButtonBox(parent=self)
        buttonBox.setOrientation(QtCore.Qt.Horizontal) # 设置为水平方向
        buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok) # 确定和取消两个按钮
        # 连接信号和槽
        buttonBox.accepted.connect(self.accept) # 确定
        buttonBox.rejected.connect(self.reject) # 取消
        # 垂直布局,布局表格及按钮
        layout = QtGui.QVBoxLayout()
        # 加入前面创建的表格布局
        layout.addLayout(grid)
        # 放一个间隔对象美化布局
        spacerItem = QtGui.QSpacerItem(20, 48, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        layout.addItem(spacerItem)
        # ButtonBox
        layout.addWidget(buttonBox)
        self.setLayout(layout) 
Example #2
Source File: ui_varchar_property.py    From stdm with GNU General Public License v2.0 6 votes vote down vote up
def setupUi(self, VarcharProperty):
        VarcharProperty.setObjectName(_fromUtf8("VarcharProperty"))
        VarcharProperty.resize(246, 67)
        self.formLayout = QtGui.QFormLayout(VarcharProperty)
        self.formLayout.setObjectName(_fromUtf8("formLayout"))
        self.label = QtGui.QLabel(VarcharProperty)
        self.label.setObjectName(_fromUtf8("label"))
        self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.label)
        self.edtCharLen = QtGui.QLineEdit(VarcharProperty)
        self.edtCharLen.setObjectName(_fromUtf8("edtCharLen"))
        self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.edtCharLen)
        self.buttonBox = QtGui.QDialogButtonBox(VarcharProperty)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.formLayout.setWidget(1, QtGui.QFormLayout.SpanningRole, self.buttonBox)

        self.retranslateUi(VarcharProperty)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), VarcharProperty.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), VarcharProperty.reject)
        QtCore.QMetaObject.connectSlotsByName(VarcharProperty) 
Example #3
Source File: mainwindow.py    From nike_purchase_system with GNU General Public License v3.0 6 votes vote down vote up
def __init__(self):
        super(NikeSetTiming, self).__init__()
        self.setWindowModality(QtCore.Qt.ApplicationModal)
        self.setWindowTitle('定时设置')
        # self.setFixedSize(500, 400)
        self.timer = None
        label_start_time = QtGui.QLabel('开始时间')
        current_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time()))
        self.line = QtGui.QLineEdit(current_time)
        self.time_label = QtGui.QLabel('剩余时间')
        self.time_label.setFixedSize(200, 20)
        self.button_confirm = QtGui.QPushButton('确定')
        self.button_confirm.clicked.connect(self.add_timing)
        grid = QtGui.QGridLayout()
        # 组件间的间距为10
        grid.setSpacing(10)
        grid.addWidget(label_start_time, 1, 0)
        grid.addWidget(self.line, 1, 1)
        grid.addWidget(self.time_label, 2, 0)
        grid.addWidget(self.button_confirm, 2, 1)
        self.setLayout(grid)

    # 创建计时器 
Example #4
Source File: memoEdit_ui.py    From memo with Creative Commons Zero v1.0 Universal 6 votes vote down vote up
def setupUi(self, MemoEdit):
        '''被memoedit调用'''
        MemoEdit.setFixedWidth(400)

        '''初始化组件'''
        self.titleEdit = QtGui.QLineEdit()
        self.timeEdit = QtGui.QDateTimeEdit()
        self.contentEdit = QtGui.QTextEdit()
        self.okBtn = QtGui.QPushButton(_fromUtf8("确定"))
        self.layout = QtGui.QVBoxLayout()

        '''设置组件大小属性'''
        self.layout.setMargin(0)
        self.layout.setSpacing(0)

        ''' 设置stylesheet'''
        '''设置布局'''
        self.layout.addWidget(self.titleEdit)
        self.layout.addWidget(self.timeEdit)
        self.layout.addWidget(self.contentEdit)
        self.layout.addWidget(self.okBtn)

        self.setLayout(self.layout) 
Example #5
Source File: widgets.py    From kano-burners with GNU General Public License v2.0 6 votes vote down vote up
def addTextEdit(self, text, readOnly=True, startsVisible=True, oneLine=False):
        if oneLine:
            textEdit = QtGui.QLineEdit()
        else:
            textEdit = QtGui.QTextEdit()
        load_css_for_widget(textEdit, os.path.join(css_path, 'textedit.css'))

        if readOnly:
            textEdit.setText(text)
        else:
            textEdit.setPlaceholderText(text)

        textEdit.setReadOnly(readOnly)
        textEdit.setGeometry(100, 100, 800, 600)
        textEdit.setVisible(startsVisible)

        return textEdit 
Example #6
Source File: gui.py    From rpi-course with MIT License 6 votes vote down vote up
def setupUi(self, Dialog):
        Dialog.setObjectName(_fromUtf8("Dialog"))
        Dialog.resize(400, 300)
        self.pushButton = QtGui.QPushButton(Dialog)
        self.pushButton.setGeometry(QtCore.QRect(250, 140, 75, 23))
        self.pushButton.setObjectName(_fromUtf8("pushButton"))
        self.lineEdit = QtGui.QLineEdit(Dialog)
        self.lineEdit.setGeometry(QtCore.QRect(50, 140, 191, 20))
        self.lineEdit.setObjectName(_fromUtf8("lineEdit"))
        self.label = QtGui.QLabel(Dialog)
        self.label.setGeometry(QtCore.QRect(100, 180, 201, 51))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label.setFont(font)
        self.label.setObjectName(_fromUtf8("label"))

        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog) 
Example #7
Source File: ddt4all.py    From ddt4all with GNU General Public License v3.0 6 votes vote down vote up
def __init__(self, ecuscanner):
        super(Ecu_finder, self).__init__()
        self.ecuscanner = ecuscanner
        layoutv = widgets.QVBoxLayout()
        layouth = widgets.QHBoxLayout()
        self.setLayout(layoutv)
        layoutv.addLayout(layouth)
        self.ecuaddr = widgets.QLineEdit()
        self.ecuident = widgets.QLineEdit()
        layouth.addWidget(widgets.QLabel("Addr :"))
        layouth.addWidget(self.ecuaddr)
        layouth.addWidget(widgets.QLabel("ID frame :"))
        layouth.addWidget(self.ecuident)
        button = widgets.QPushButton("VALIDATE")
        layouth.addWidget(button)
        button.clicked.connect(self.check) 
Example #8
Source File: ui_trezor_passphrase_dialog.py    From deosorg with GNU General Public License v3.0 6 votes vote down vote up
def setupUi(self, TrezorPassphraseDialog):
        TrezorPassphraseDialog.setObjectName(_fromUtf8("TrezorPassphraseDialog"))
        TrezorPassphraseDialog.resize(400, 133)
        self.verticalLayout = QtGui.QVBoxLayout(TrezorPassphraseDialog)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.label = QtGui.QLabel(TrezorPassphraseDialog)
        self.label.setObjectName(_fromUtf8("label"))
        self.verticalLayout.addWidget(self.label)
        self.passphraseEdit = QtGui.QLineEdit(TrezorPassphraseDialog)
        self.passphraseEdit.setEchoMode(QtGui.QLineEdit.Password)
        self.passphraseEdit.setObjectName(_fromUtf8("passphraseEdit"))
        self.verticalLayout.addWidget(self.passphraseEdit)
        spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.buttonBox = QtGui.QDialogButtonBox(TrezorPassphraseDialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(TrezorPassphraseDialog)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), TrezorPassphraseDialog.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), TrezorPassphraseDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(TrezorPassphraseDialog) 
Example #9
Source File: ui_add_group_dialog.py    From deosorg with GNU General Public License v3.0 6 votes vote down vote up
def setupUi(self, AddGroupDialog):
        AddGroupDialog.setObjectName(_fromUtf8("AddGroupDialog"))
        AddGroupDialog.resize(415, 111)
        self.verticalLayout = QtGui.QVBoxLayout(AddGroupDialog)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.label = QtGui.QLabel(AddGroupDialog)
        self.label.setObjectName(_fromUtf8("label"))
        self.verticalLayout.addWidget(self.label)
        self.newGroupEdit = QtGui.QLineEdit(AddGroupDialog)
        self.newGroupEdit.setMaxLength(64)
        self.newGroupEdit.setObjectName(_fromUtf8("newGroupEdit"))
        self.verticalLayout.addWidget(self.newGroupEdit)
        spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.buttonBox = QtGui.QDialogButtonBox(AddGroupDialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(AddGroupDialog)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), AddGroupDialog.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), AddGroupDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(AddGroupDialog) 
Example #10
Source File: uiBasicWidget.py    From InplusTrader_Linux with MIT License 5 votes vote down vote up
def initUi(self):
        """初始化界面"""
        labelSymbol = QtGui.QLabel(u'代码:')
        lableDay = QtGui.QLabel(u'日期:')
        self.lineSymbol = QtGui.QLineEdit()  
        self.lineSymbol.setText('IF1704')
        self.lineDay = QtGui.QLineEdit()    
        self.lineDay.setText('2017-03-14')

        grid = QtGui.QGridLayout()
        grid.addWidget(labelSymbol, 0, 0)
        grid.addWidget(lableDay, 1, 0)

        grid.addWidget(self.lineSymbol, 0, 1)
        grid.addWidget(self.lineDay, 1, 1)

        # 启动exe显示数据按钮
        buttonShowMin = QtGui.QPushButton(u'显示分钟线数据')

        size = buttonShowMin.sizeHint()
        buttonShowMin.setMinimumHeight(size.height()*2)   # 把按钮高度设为默认两倍

        # 整合布局
        hbox = QtGui.QHBoxLayout()
        hbox.addLayout(grid)

        vbox = QtGui.QVBoxLayout()
        vbox.addLayout(hbox)
        vbox.addWidget(buttonShowMin)
        vbox.addStretch()

        self.setLayout(vbox)

        # 关联
        buttonShowMin.clicked.connect(self.openExe) 
Example #11
Source File: gui.py    From PrusaControl with GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, controller):
        super(NewOctoPrintDialog, self).__init__(controller.view, Qt.WindowSystemMenuHint | Qt.WindowTitleHint)

        self.controller = controller

        layout = QFormLayout(self)

        # nice widget for editing the date
        self.name_label = QLabel(self.tr("Name"))
        self.name_edit = QLineEdit()

        self.ip_address_label = QLabel(self.tr("IP"))
        self.ip_address_edit = QLineEdit()

        self.apikey_label = QLabel(self.tr("ApiKey"))
        self.apikey_edit = QLineEdit()

        #self.username_label = QLabel(self.tr("User"))
        #self.username_edit = QLineEdit()

        #self.password_label = QLabel(self.tr("Password"))
        #self.password_edit = QLineEdit()

        layout.addRow(self.name_label, self.name_edit)
        layout.addRow(self.ip_address_label, self.ip_address_edit)
        layout.addRow(self.apikey_label, self.apikey_edit)
        #layout.addRow(self.username_label, self.username_edit)
        #layout.addRow(self.password_label, self.password_edit)

        # OK and Cancel buttons
        buttons = QDialogButtonBox(
            QDialogButtonBox.Ok | QDialogButtonBox.Cancel,
            Qt.Horizontal, self)

        buttons.accepted.connect(self.accept)
        buttons.rejected.connect(self.reject)
        layout.addWidget(buttons) 
Example #12
Source File: uiBasicWidget.py    From InplusTrader_Linux with MIT License 5 votes vote down vote up
def initUi(self):
        """初始化界面"""
        labelSymbol = QtGui.QLabel(u'代码:')
        lableDay = QtGui.QLabel(u'日期:')
        self.lineSymbol = QtGui.QLineEdit()  
        self.lineSymbol.setText('IF1704')
        self.lineDay = QtGui.QLineEdit()    
        self.lineDay.setText('2017-03-14')

        grid = QtGui.QGridLayout()
        grid.addWidget(labelSymbol, 0, 0)
        grid.addWidget(lableDay, 1, 0)

        grid.addWidget(self.lineSymbol, 0, 1)
        grid.addWidget(self.lineDay, 1, 1)

        # 启动exe显示数据按钮
        buttonShowMin = QtGui.QPushButton(u'显示分钟线数据')

        size = buttonShowMin.sizeHint()
        buttonShowMin.setMinimumHeight(size.height()*2)   # 把按钮高度设为默认两倍

        # 整合布局
        hbox = QtGui.QHBoxLayout()
        hbox.addLayout(grid)

        vbox = QtGui.QVBoxLayout()
        vbox.addLayout(hbox)
        vbox.addWidget(buttonShowMin)
        vbox.addStretch()

        self.setLayout(vbox)

        # 关联
        buttonShowMin.clicked.connect(self.openExe) 
Example #13
Source File: ui_new_role.py    From stdm with GNU General Public License v2.0 5 votes vote down vote up
def setupUi(self, frmNewRole):
        frmNewRole.setObjectName(_fromUtf8("frmNewRole"))
        frmNewRole.resize(280, 186)
        self.gridLayout = QtGui.QGridLayout(frmNewRole)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.groupBox = QtGui.QGroupBox(frmNewRole)
        self.groupBox.setObjectName(_fromUtf8("groupBox"))
        self.gridLayout_2 = QtGui.QGridLayout(self.groupBox)
        self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
        self.label = QtGui.QLabel(self.groupBox)
        self.label.setMinimumSize(QtCore.QSize(60, 0))
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout_2.addWidget(self.label, 0, 0, 1, 1)
        self.txtRoleName = QtGui.QLineEdit(self.groupBox)
        self.txtRoleName.setMinimumSize(QtCore.QSize(0, 30))
        self.txtRoleName.setMaxLength(50)
        self.txtRoleName.setObjectName(_fromUtf8("txtRoleName"))
        self.gridLayout_2.addWidget(self.txtRoleName, 0, 1, 1, 1)
        self.label_2 = QtGui.QLabel(self.groupBox)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout_2.addWidget(self.label_2, 1, 0, 1, 1)
        self.txtRoleDescription = QtGui.QLineEdit(self.groupBox)
        self.txtRoleDescription.setMinimumSize(QtCore.QSize(0, 30))
        self.txtRoleDescription.setMaxLength(50)
        self.txtRoleDescription.setObjectName(_fromUtf8("txtRoleDescription"))
        self.gridLayout_2.addWidget(self.txtRoleDescription, 1, 1, 1, 1)
        self.gridLayout.addWidget(self.groupBox, 0, 0, 1, 1)
        self.buttonBox = QtGui.QDialogButtonBox(frmNewRole)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.gridLayout.addWidget(self.buttonBox, 1, 0, 1, 1)

        self.retranslateUi(frmNewRole)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), frmNewRole.reject)
        QtCore.QMetaObject.connectSlotsByName(frmNewRole) 
Example #14
Source File: ui_changepwd.py    From stdm with GNU General Public License v2.0 5 votes vote down vote up
def setupUi(self, frmChangePwd):
        frmChangePwd.setObjectName(_fromUtf8("frmChangePwd"))
        frmChangePwd.resize(320, 200)
        frmChangePwd.setMaximumSize(QtCore.QSize(320, 16777215))
        self.gridLayout_2 = QtGui.QGridLayout(frmChangePwd)
        self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
        self.groupBox = QtGui.QGroupBox(frmChangePwd)
        self.groupBox.setObjectName(_fromUtf8("groupBox"))
        self.gridLayout_3 = QtGui.QGridLayout(self.groupBox)
        self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
        self.gridLayout = QtGui.QGridLayout()
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.txtNewPass = QtGui.QLineEdit(self.groupBox)
        self.txtNewPass.setMinimumSize(QtCore.QSize(0, 30))
        self.txtNewPass.setMaxLength(200)
        self.txtNewPass.setEchoMode(QtGui.QLineEdit.Password)
        self.txtNewPass.setObjectName(_fromUtf8("txtNewPass"))
        self.gridLayout.addWidget(self.txtNewPass, 0, 1, 1, 1)
        self.label = QtGui.QLabel(self.groupBox)
        self.label.setMinimumSize(QtCore.QSize(70, 0))
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.label_2 = QtGui.QLabel(self.groupBox)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
        self.txtConfirmPass = QtGui.QLineEdit(self.groupBox)
        self.txtConfirmPass.setMinimumSize(QtCore.QSize(0, 30))
        self.txtConfirmPass.setMaxLength(200)
        self.txtConfirmPass.setEchoMode(QtGui.QLineEdit.Password)
        self.txtConfirmPass.setObjectName(_fromUtf8("txtConfirmPass"))
        self.gridLayout.addWidget(self.txtConfirmPass, 1, 1, 1, 1)
        self.gridLayout_3.addLayout(self.gridLayout, 0, 0, 1, 1)
        self.gridLayout_2.addWidget(self.groupBox, 0, 0, 1, 1)
        self.btnBox = QtGui.QDialogButtonBox(frmChangePwd)
        self.btnBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.btnBox.setObjectName(_fromUtf8("btnBox"))
        self.gridLayout_2.addWidget(self.btnBox, 1, 0, 1, 1)

        self.retranslateUi(frmChangePwd)
        QtCore.QObject.connect(self.btnBox, QtCore.SIGNAL(_fromUtf8("rejected()")), frmChangePwd.reject)
        QtCore.QMetaObject.connectSlotsByName(frmChangePwd) 
Example #15
Source File: savestatesdialog_ui.py    From pyqtggpo with GNU General Public License v2.0 5 votes vote down vote up
def setupUi(self, SavestatesDialog):
        SavestatesDialog.setObjectName(_fromUtf8("SavestatesDialog"))
        SavestatesDialog.resize(630, 600)
        SavestatesDialog.setWindowTitle(QtGui.QApplication.translate("SavestatesDialog", "Unsupported game savestates", None, QtGui.QApplication.UnicodeUTF8))
        self.verticalLayout = QtGui.QVBoxLayout(SavestatesDialog)
        self.verticalLayout.setContentsMargins(2, 0, 2, 6)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.label = QtGui.QLabel(SavestatesDialog)
        self.label.setText(QtGui.QApplication.translate("SavestatesDialog", "Filter:", None, QtGui.QApplication.UnicodeUTF8))
        self.label.setObjectName(_fromUtf8("label"))
        self.horizontalLayout.addWidget(self.label)
        self.uiFilterLineEdit = QtGui.QLineEdit(SavestatesDialog)
        self.uiFilterLineEdit.setText(_fromUtf8(""))
        self.uiFilterLineEdit.setObjectName(_fromUtf8("uiFilterLineEdit"))
        self.horizontalLayout.addWidget(self.uiFilterLineEdit)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.uiSavestatesTblv = QtGui.QTableView(SavestatesDialog)
        self.uiSavestatesTblv.setObjectName(_fromUtf8("uiSavestatesTblv"))
        self.verticalLayout.addWidget(self.uiSavestatesTblv)
        self.uiButtonBox = QtGui.QDialogButtonBox(SavestatesDialog)
        self.uiButtonBox.setOrientation(QtCore.Qt.Horizontal)
        self.uiButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.uiButtonBox.setObjectName(_fromUtf8("uiButtonBox"))
        self.verticalLayout.addWidget(self.uiButtonBox)

        self.retranslateUi(SavestatesDialog)
        QtCore.QObject.connect(self.uiButtonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), SavestatesDialog.accept)
        QtCore.QObject.connect(self.uiButtonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), SavestatesDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(SavestatesDialog)
        SavestatesDialog.setTabOrder(self.uiFilterLineEdit, self.uiSavestatesTblv)
        SavestatesDialog.setTabOrder(self.uiSavestatesTblv, self.uiButtonBox) 
Example #16
Source File: ui_bigint_property.py    From stdm with GNU General Public License v2.0 5 votes vote down vote up
def setupUi(self, BigintProperty):
        BigintProperty.setObjectName(_fromUtf8("BigintProperty"))
        BigintProperty.resize(244, 101)
        self.formLayout = QtGui.QFormLayout(BigintProperty)
        self.formLayout.setObjectName(_fromUtf8("formLayout"))
        self.label = QtGui.QLabel(BigintProperty)
        self.label.setObjectName(_fromUtf8("label"))
        self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.label)
        self.edtMinVal = QtGui.QLineEdit(BigintProperty)
        self.edtMinVal.setObjectName(_fromUtf8("edtMinVal"))
        self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.edtMinVal)
        self.label_2 = QtGui.QLabel(BigintProperty)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.label_2)
        self.edtMaxVal = QtGui.QLineEdit(BigintProperty)
        self.edtMaxVal.setObjectName(_fromUtf8("edtMaxVal"))
        self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.edtMaxVal)
        self.buttonBox = QtGui.QDialogButtonBox(BigintProperty)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.formLayout.setWidget(2, QtGui.QFormLayout.SpanningRole, self.buttonBox)

        self.retranslateUi(BigintProperty)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), BigintProperty.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), BigintProperty.reject)
        QtCore.QMetaObject.connectSlotsByName(BigintProperty) 
Example #17
Source File: ui_profile.py    From stdm with GNU General Public License v2.0 5 votes vote down vote up
def setupUi(self, Profile):
        Profile.setObjectName(_fromUtf8("Profile"))
        Profile.resize(329, 153)
        self.verticalLayout_2 = QtGui.QVBoxLayout(Profile)
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.notif_bar = QtGui.QVBoxLayout()
        self.notif_bar.setObjectName(_fromUtf8("notif_bar"))
        self.verticalLayout_2.addLayout(self.notif_bar)
        self.gridLayout = QtGui.QGridLayout()
        self.gridLayout.setVerticalSpacing(10)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.label = QtGui.QLabel(Profile)
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.edtProfile = QtGui.QLineEdit(Profile)
        self.edtProfile.setObjectName(_fromUtf8("edtProfile"))
        self.gridLayout.addWidget(self.edtProfile, 0, 1, 1, 1)
        self.label_2 = QtGui.QLabel(Profile)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
        self.edtDesc = QtGui.QLineEdit(Profile)
        self.edtDesc.setObjectName(_fromUtf8("edtDesc"))
        self.gridLayout.addWidget(self.edtDesc, 1, 1, 1, 1)
        self.verticalLayout_2.addLayout(self.gridLayout)
        self.buttonBox = QtGui.QDialogButtonBox(Profile)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.verticalLayout_2.addWidget(self.buttonBox)

        self.retranslateUi(Profile)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), Profile.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Profile.reject)
        QtCore.QMetaObject.connectSlotsByName(Profile)
        Profile.setTabOrder(self.edtProfile, self.buttonBox) 
Example #18
Source File: login_dialog_UI_pyqt4.py    From anima with MIT License 5 votes vote down vote up
def setupUi(self, Dialog):
        Dialog.setObjectName(_fromUtf8("Dialog"))
        Dialog.setWindowModality(QtCore.Qt.ApplicationModal)
        Dialog.resize(364, 138)
        Dialog.setModal(True)
        self.verticalLayout = QtGui.QVBoxLayout(Dialog)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.formLayout = QtGui.QFormLayout()
        self.formLayout.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
        self.formLayout.setContentsMargins(-1, 10, -1, -1)
        self.formLayout.setObjectName(_fromUtf8("formLayout"))
        self.login_or_email_label = QtGui.QLabel(Dialog)
        self.login_or_email_label.setObjectName(_fromUtf8("login_or_email_label"))
        self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.login_or_email_label)
        self.login_or_email_lineEdit = QtGui.QLineEdit(Dialog)
        self.login_or_email_lineEdit.setInputMask(_fromUtf8(""))
        self.login_or_email_lineEdit.setObjectName(_fromUtf8("login_or_email_lineEdit"))
        self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.login_or_email_lineEdit)
        self.password_label = QtGui.QLabel(Dialog)
        self.password_label.setObjectName(_fromUtf8("password_label"))
        self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.password_label)
        self.password_lineEdit = QtGui.QLineEdit(Dialog)
        self.password_lineEdit.setInputMask(_fromUtf8(""))
        self.password_lineEdit.setText(_fromUtf8(""))
        self.password_lineEdit.setEchoMode(QtGui.QLineEdit.Password)
        self.password_lineEdit.setObjectName(_fromUtf8("password_lineEdit"))
        self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.password_lineEdit)
        self.buttonBox = QtGui.QDialogButtonBox(Dialog)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.buttonBox)
        self.verticalLayout.addLayout(self.formLayout)

        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog) 
Example #19
Source File: ui_source_document_dialog.py    From stdm with GNU General Public License v2.0 5 votes vote down vote up
def setupUi(self, SourceDocumentTranslatorDialog):
        SourceDocumentTranslatorDialog.setObjectName(_fromUtf8("SourceDocumentTranslatorDialog"))
        SourceDocumentTranslatorDialog.resize(497, 127)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(SourceDocumentTranslatorDialog.sizePolicy().hasHeightForWidth())
        SourceDocumentTranslatorDialog.setSizePolicy(sizePolicy)
        SourceDocumentTranslatorDialog.setMinimumSize(QtCore.QSize(0, 127))
        self.gridLayout = QtGui.QGridLayout(SourceDocumentTranslatorDialog)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.vlNotification = QtGui.QVBoxLayout()
        self.vlNotification.setObjectName(_fromUtf8("vlNotification"))
        self.gridLayout.addLayout(self.vlNotification, 0, 0, 1, 3)
        self.label = QtGui.QLabel(SourceDocumentTranslatorDialog)
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
        self.txtRootFolder = QtGui.QLineEdit(SourceDocumentTranslatorDialog)
        self.txtRootFolder.setMinimumSize(QtCore.QSize(0, 30))
        self.txtRootFolder.setObjectName(_fromUtf8("txtRootFolder"))
        self.gridLayout.addWidget(self.txtRootFolder, 1, 1, 1, 1)
        self.btn_source_doc_folder = QtGui.QToolButton(SourceDocumentTranslatorDialog)
        self.btn_source_doc_folder.setMinimumSize(QtCore.QSize(30, 30))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/stdm/images/icons/open_file.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.btn_source_doc_folder.setIcon(icon)
        self.btn_source_doc_folder.setObjectName(_fromUtf8("btn_source_doc_folder"))
        self.gridLayout.addWidget(self.btn_source_doc_folder, 1, 2, 1, 1)
        self.buttonBox = QtGui.QDialogButtonBox(SourceDocumentTranslatorDialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.gridLayout.addWidget(self.buttonBox, 2, 0, 1, 3)

        self.retranslateUi(SourceDocumentTranslatorDialog)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), SourceDocumentTranslatorDialog.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), SourceDocumentTranslatorDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(SourceDocumentTranslatorDialog) 
Example #20
Source File: ui_multiple_enumeration_dialog.py    From stdm with GNU General Public License v2.0 5 votes vote down vote up
def setupUi(self, EnumerationTranslatorDialog):
        EnumerationTranslatorDialog.setObjectName(_fromUtf8("EnumerationTranslatorDialog"))
        EnumerationTranslatorDialog.resize(443, 192)
        self.gridLayout_3 = QtGui.QGridLayout(EnumerationTranslatorDialog)
        self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
        self.vl_notification = QtGui.QVBoxLayout()
        self.vl_notification.setObjectName(_fromUtf8("vl_notification"))
        self.gridLayout_3.addLayout(self.vl_notification, 0, 0, 1, 1)
        self.buttonBox = QtGui.QDialogButtonBox(EnumerationTranslatorDialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.gridLayout_3.addWidget(self.buttonBox, 2, 0, 1, 1)
        self.groupBox_2 = QtGui.QGroupBox(EnumerationTranslatorDialog)
        self.groupBox_2.setObjectName(_fromUtf8("groupBox_2"))
        self.gridLayout_2 = QtGui.QGridLayout(self.groupBox_2)
        self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
        self.label_4 = QtGui.QLabel(self.groupBox_2)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.gridLayout_2.addWidget(self.label_4, 0, 0, 1, 1)
        self.txt_source_col = QtGui.QLineEdit(self.groupBox_2)
        self.txt_source_col.setMinimumSize(QtCore.QSize(0, 30))
        self.txt_source_col.setStyleSheet(_fromUtf8("background-color: rgb(232, 232, 232);"))
        self.txt_source_col.setReadOnly(True)
        self.txt_source_col.setObjectName(_fromUtf8("txt_source_col"))
        self.gridLayout_2.addWidget(self.txt_source_col, 0, 1, 1, 1)
        self.label_6 = QtGui.QLabel(self.groupBox_2)
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.gridLayout_2.addWidget(self.label_6, 1, 0, 1, 1)
        self.cbo_separator = QtGui.QComboBox(self.groupBox_2)
        self.cbo_separator.setMinimumSize(QtCore.QSize(0, 30))
        self.cbo_separator.setObjectName(_fromUtf8("cbo_separator"))
        self.gridLayout_2.addWidget(self.cbo_separator, 1, 1, 1, 1)
        self.gridLayout_3.addWidget(self.groupBox_2, 1, 0, 1, 1)

        self.retranslateUi(EnumerationTranslatorDialog)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), EnumerationTranslatorDialog.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), EnumerationTranslatorDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(EnumerationTranslatorDialog) 
Example #21
Source File: ModelicaUI.py    From eSim with GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, dir=None):
        QtGui.QWidget.__init__(self)
        self.obj_validation = Validation()
        self.obj_appconfig = Appconfig()
        self.projDir = dir
        self.projName = os.path.basename(self.projDir)
        self.ngspiceNetlist = os.path.join(
            self.projDir, self.projName + ".cir.out")
        self.modelicaNetlist = os.path.join(self.projDir, "*.mo")
        self.map_json = Appconfig.modelica_map_json

        self.grid = QtGui.QGridLayout()
        self.FileEdit = QtGui.QLineEdit()
        self.FileEdit.setText(self.ngspiceNetlist)
        self.grid.addWidget(self.FileEdit, 0, 0)

        self.browsebtn = QtGui.QPushButton("Browse")
        self.browsebtn.clicked.connect(self.browseFile)
        self.grid.addWidget(self.browsebtn, 0, 1)

        self.convertbtn = QtGui.QPushButton("Convert")
        self.convertbtn.clicked.connect(self.callConverter)
        self.grid.addWidget(self.convertbtn, 2, 1)

        self.loadOMbtn = QtGui.QPushButton("Load OMEdit")
        self.loadOMbtn.clicked.connect(self.callOMEdit)
        self.grid.addWidget(self.loadOMbtn, 3, 1)

        # self.setGeometry(300, 300, 350, 300)
        self.setLayout(self.grid)
        self.show() 
Example #22
Source File: mainwindow.py    From nike_purchase_system with GNU General Public License v3.0 5 votes vote down vote up
def __init__(self):
        super(NikeSetting, self).__init__()
        self.setWindowModality(QtCore.Qt.ApplicationModal)
        self.setWindowTitle("可选设置")
        self.setGeometry(250, 250, 250, 200)
        self.setFixedSize(250, 200)

        self.label_mail = QtGui.QLabel("加入购物车后发送邮件", self)
        self.label_mail.setGeometry(20, 20, 50, 20)

        self.rb_mail = QtGui.QRadioButton(self)
        self.rb_mail.setGeometry(75, 20, 15, 20)

        self.text_mail = QtGui.QLineEdit(self)
        self.text_mail.setText('859905874@qq.com')

        self.label_size = QtGui.QLabel("默认尺码", self)
        self.label_size.setGeometry(20, 45, 50, 20)
        self.text_sizes = QtGui.QLineEdit(self)
        self.text_sizes.setGeometry(75, 45, 100, 20)

        self.label_pay_in_qrcode = QtGui.QLabel('二维码付款', self)
        self.rb_pay_in_qrcode = QtGui.QRadioButton(self)

        self.button = QtGui.QPushButton('确定', self)
        self.button.setGeometry(160, 150, 80, 40) 
Example #23
Source File: Settings.py    From darkc0de-old-stuff with GNU General Public License v3.0 5 votes vote down vote up
def setupUi(self, Settings):
        Settings.setObjectName("Settings")
        Settings.resize(310, 96)
        Settings.setMinimumSize(QtCore.QSize(310, 96))
        Settings.setMaximumSize(QtCore.QSize(310, 96))
        self.layoutWidget = QtGui.QWidget(Settings)
        self.layoutWidget.setGeometry(QtCore.QRect(0, 0, 310, 104))
        self.layoutWidget.setObjectName("layoutWidget")
        self.verticalLayout = QtGui.QVBoxLayout(self.layoutWidget)
        self.verticalLayout.setObjectName("verticalLayout")
        self.gridLayout = QtGui.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.label_3 = QtGui.QLabel(self.layoutWidget)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 0, 0, 1, 1)
        self.path = QtGui.QLineEdit(self.layoutWidget)
        self.path.setObjectName("path")
        self.gridLayout.addWidget(self.path, 0, 1, 1, 1)
        self.browse = QtGui.QPushButton(self.layoutWidget)
        self.browse.setObjectName("browse")
        self.gridLayout.addWidget(self.browse, 0, 2, 1, 1)
        self.verticalLayout.addLayout(self.gridLayout)
        self.buttonBox = QtGui.QDialogButtonBox(self.layoutWidget)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(Settings)
        QtCore.QMetaObject.connectSlotsByName(Settings) 
Example #24
Source File: Settings.py    From darkc0de-old-stuff with GNU General Public License v3.0 5 votes vote down vote up
def setupUi(self, Settings):
        Settings.setObjectName("Settings")
        Settings.resize(310, 96)
        Settings.setMinimumSize(QtCore.QSize(310, 96))
        Settings.setMaximumSize(QtCore.QSize(310, 96))
        self.layoutWidget = QtGui.QWidget(Settings)
        self.layoutWidget.setGeometry(QtCore.QRect(0, 0, 310, 104))
        self.layoutWidget.setObjectName("layoutWidget")
        self.verticalLayout = QtGui.QVBoxLayout(self.layoutWidget)
        self.verticalLayout.setObjectName("verticalLayout")
        self.gridLayout = QtGui.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.label_3 = QtGui.QLabel(self.layoutWidget)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 0, 0, 1, 1)
        self.path = QtGui.QLineEdit(self.layoutWidget)
        self.path.setObjectName("path")
        self.gridLayout.addWidget(self.path, 0, 1, 1, 1)
        self.browse = QtGui.QPushButton(self.layoutWidget)
        self.browse.setObjectName("browse")
        self.gridLayout.addWidget(self.browse, 0, 2, 1, 1)
        self.verticalLayout.addLayout(self.gridLayout)
        self.buttonBox = QtGui.QDialogButtonBox(self.layoutWidget)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(Settings)
        QtCore.QMetaObject.connectSlotsByName(Settings) 
Example #25
Source File: gui.py    From ropa with GNU General Public License v3.0 5 votes vote down vote up
def _init_text_inputs(self):
        filter_input = self.findChild(qg.QLineEdit, 'searchBar')

        badbytes_input = self.findChild(qg.QLineEdit, 'badbytesInput')

        self.filter_input = FilterInputController(self,
                                                  filter_input)
        self.badbytes_input = BadbytesInputController(self,
                                                      badbytes_input) 
Example #26
Source File: main_gui.py    From pySecMaster with GNU Affero General Public License v3.0 5 votes vote down vote up
def save_settings(self, ini_name):
        """
        Technique structured from the code from: "https://stackoverflow.com
        /questions/23279125/python-pyqt4-functions-to-save-and-restore-ui-
        widget-values"

        :param ini_name: Name of the .ini file (Ex. pysecmaster.ini)
        :return:
        """

        settings = QtCore.QSettings(ini_name, QtCore.QSettings.IniFormat)

        # For child in ui.children():  # works like getmembers, but because it
        # traverses the hierarchy, you would have to call the method recursively
        # to traverse down the tree.

        for name, obj in inspect.getmembers(self):
            if isinstance(obj, QtGui.QComboBox):
                name = obj.objectName()
                text = obj.currentText()
                settings.setValue(name, text)

            elif isinstance(obj, QtGui.QLineEdit):
                name = obj.objectName()
                value = obj.text()
                settings.setValue(name, value)

            elif isinstance(obj, QtGui.QSpinBox):
                name = obj.objectName()
                value = obj.value()
                settings.setValue(name, value)

            elif isinstance(obj, QtGui.QCheckBox):
                name = obj.objectName()
                state = obj.checkState()
                settings.setValue(name, state) 
Example #27
Source File: run.py    From Open-Browser with GNU General Public License v3.0 5 votes vote down vote up
def createWidgets(self):
        self.dbx_grid = QtGui.QGridLayout()
        self.dbx_code_label = QtGui.QLabel('Enter the code here: ')
        self.dbx_code_label.setFont(QtGui.QFont("Arial", weight=QtGui.QFont.Bold))
        self.dbx_getCode = QtGui.QLineEdit()
        self.dbx_grid.addWidget(self.dbx_code_label,0,1)
        self.dbx_grid.addWidget(self.dbx_getCode,0,2)
        self.dbx_save_button = QtGui.QPushButton('Save')
        self.dbx_save_button.setFixedWidth(90)
        self.dbx_save_button.clicked.connect(self.createAppFolder)
        self.dbx_grid.addWidget(self.dbx_save_button,0,3)
        self.dbx_grid.addWidget(self.dbx_tabWidget,3,1,1,3)
        self.generateCode()
        self.setLayout(self.dbx_grid) 
Example #28
Source File: DB_UI_main.py    From LLP_026_MySQL_PyQt_Example with GNU General Public License v2.0 5 votes vote down vote up
def setupUi(self, TPayne_MySQL_Tool):
        TPayne_MySQL_Tool.setObjectName(_fromUtf8("TPayne_MySQL_Tool"))
        TPayne_MySQL_Tool.resize(457, 235)
        self.verticalLayout_2 = QtGui.QVBoxLayout(TPayne_MySQL_Tool)
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.label = QtGui.QLabel(TPayne_MySQL_Tool)
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label.setFont(font)
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setObjectName(_fromUtf8("label"))
        self.verticalLayout.addWidget(self.label)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.lineEdit = QtGui.QLineEdit(TPayne_MySQL_Tool)
        self.lineEdit.setObjectName(_fromUtf8("lineEdit"))
        self.horizontalLayout.addWidget(self.lineEdit)
        self.commitButton = QtGui.QPushButton(TPayne_MySQL_Tool)
        self.commitButton.setObjectName(_fromUtf8("commitButton"))
        self.horizontalLayout.addWidget(self.commitButton)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.treeWidget = QtGui.QTreeWidget(TPayne_MySQL_Tool)
        self.treeWidget.setObjectName(_fromUtf8("treeWidget"))
        self.verticalLayout.addWidget(self.treeWidget)
        self.verticalLayout_2.addLayout(self.verticalLayout)

        self.retranslateUi(TPayne_MySQL_Tool)
        QtCore.QMetaObject.connectSlotsByName(TPayne_MySQL_Tool) 
Example #29
Source File: DB_UI.py    From LLP_026_MySQL_PyQt_Example with GNU General Public License v2.0 5 votes vote down vote up
def setupUi(self, TPayne_MySQL_Tool):
        TPayne_MySQL_Tool.setObjectName(_fromUtf8("TPayne_MySQL_Tool"))
        TPayne_MySQL_Tool.resize(457, 235)
        self.verticalLayout_2 = QtGui.QVBoxLayout(TPayne_MySQL_Tool)
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.label = QtGui.QLabel(TPayne_MySQL_Tool)
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label.setFont(font)
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setObjectName(_fromUtf8("label"))
        self.verticalLayout.addWidget(self.label)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.lineEdit = QtGui.QLineEdit(TPayne_MySQL_Tool)
        self.lineEdit.setObjectName(_fromUtf8("lineEdit"))
        self.horizontalLayout.addWidget(self.lineEdit)
        self.commitButton = QtGui.QPushButton(TPayne_MySQL_Tool)
        self.commitButton.setObjectName(_fromUtf8("commitButton"))
        self.horizontalLayout.addWidget(self.commitButton)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.treeWidget = QtGui.QTreeWidget(TPayne_MySQL_Tool)
        self.treeWidget.setObjectName(_fromUtf8("treeWidget"))
        item_0 = QtGui.QTreeWidgetItem(self.treeWidget)
        item_0 = QtGui.QTreeWidgetItem(self.treeWidget)
        self.verticalLayout.addWidget(self.treeWidget)
        self.verticalLayout_2.addLayout(self.verticalLayout)

        self.retranslateUi(TPayne_MySQL_Tool)
        QtCore.QMetaObject.connectSlotsByName(TPayne_MySQL_Tool) 
Example #30
Source File: racer_edit_dialog.py    From time_trial with MIT License 5 votes vote down vote up
def __init__(self, racer, parent = None, flags = QtCore.Qt.Dialog):
        QtGui.QDialog.__init__(self, parent, flags)

        self.racer = racer

        self.layout = QtGui.QVBoxLayout()
        self.setLayout(self.layout)

        form_layout = QtGui.QFormLayout()
        self.layout.addLayout(form_layout)

        self.name = QtGui.QLineEdit(text=racer.name)
        form_layout.addRow("Name", self.name)
        self.hostname = QtGui.QLineEdit(text=racer.hostname)
        form_layout.addRow("Hostname",self.hostname)
        self.location = QtGui.QLineEdit(text=racer.location)
        form_layout.addRow("Location",self.location)

        button_layout = QtGui.QHBoxLayout()
        save = QtGui.QPushButton(text="Save")
        save.released.connect(self.save)
        button_layout.addWidget(save)
        cancel = QtGui.QPushButton(text="Cancel")
        cancel.released.connect(self.reject)
        button_layout.addWidget(cancel)

        self.layout.addLayout(button_layout)