Python PyQt5.QtWidgets.QDialogButtonBox() Examples

The following are 30 code examples for showing how to use PyQt5.QtWidgets.QDialogButtonBox(). These examples are extracted from open source projects. 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 check out the related API usage on the sidebar.

You may also want to check out all available functions/classes of the module PyQt5.QtWidgets , or try the search function .

Example 1
Project: mindfulness-at-the-computer   Author: mindfulness-at-the-computer   File: warning_dlg.py    License: GNU General Public License v3.0 7 votes vote down vote up
def __init__(self, i_description_str: str, i_parent=None) -> None:
        super(WarningDlg, 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 ,
            QtCore.Qt.Horizontal,
            self
        )
        vbox.addWidget(self.button_box)
        self.button_box.accepted.connect(self.accept)
        # -accept and reject are "slots" built into Qt 
Example 2
Project: simnibs   Author: simnibs   File: simulation_menu.py    License: GNU General Public License v3.0 6 votes vote down vote up
def __init__(self, parent, session):
        super(SimulationOptionsDialog, self).__init__(parent)

        self.session = session


        self.fields_box = self.selectFields()

        self.options_box = self.selectOtherOptions()
        self.button_box = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Ok|QtWidgets.QDialogButtonBox.Cancel)
        self.button_box.accepted.connect(self.accept)
        self.button_box.rejected.connect(self.reject)


        mainLayout = QtWidgets.QVBoxLayout()

        mainLayout.addWidget(self.fields_box)
        mainLayout.addWidget(self.options_box)
        mainLayout.addWidget(self.button_box)

        self.setLayout(mainLayout)  

        self.setWindowTitle('Simulation Options') 
Example 3
Project: simnibs   Author: simnibs   File: postinstall_simnibs.py    License: GNU General Public License v3.0 6 votes vote down vote up
def __init__(self):
            super().__init__()
            button_box = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Ok|QtWidgets.QDialogButtonBox.Cancel)
            button_box.accepted.connect(self.accept)
            button_box.rejected.connect(self.reject)
            mainLayout = QtWidgets.QVBoxLayout()
            mainLayout.addWidget(
                QtWidgets.QLabel(
                    f'SimNIBS version {__version__} will be uninstalled. '
                    'Are you sure?'))
            mainLayout.addWidget(button_box)
            self.setLayout(mainLayout)
            self.setWindowTitle('SimNIBS Uninstaller')
            gui_icon = os.path.join(SIMNIBSDIR,'resources', 'gui_icon.ico')
            self.setWindowIcon(QtGui.QIcon(gui_icon)) 
Example 4
Project: easygui_qt   Author: aroberge   File: calendar_widget.py    License: BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def __init__(self, title="Calendar"):
        super(CalendarWidget, self).__init__()

        self.setWindowTitle(title)
        layout = qt_widgets.QGridLayout()
        layout.setColumnStretch(1, 1)

        self.cal = qt_widgets.QCalendarWidget(self)
        self.cal.setGridVisible(True)
        self.cal.clicked[QtCore.QDate].connect(self.show_date)
        layout.addWidget(self.cal, 0, 0, 1, 2)

        self.date_label = qt_widgets.QLabel()
        self.date = self.cal.selectedDate()
        self.date_label.setText(self.date.toString())
        layout.addWidget(self.date_label, 1, 0)

        button_box = qt_widgets.QDialogButtonBox()
        confirm_button = button_box.addButton(qt_widgets.QDialogButtonBox.Ok)
        confirm_button.clicked.connect(self.confirm)
        layout.addWidget(button_box, 1, 1)

        self.setLayout(layout)
        self.show()
        self.raise_() 
Example 5
Project: mindfulness-at-the-computer   Author: mindfulness-at-the-computer   File: experimental_list_widget.py    License: GNU General Public License v3.0 6 votes vote down vote up
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 
Example 6
Project: mindfulness-at-the-computer   Author: mindfulness-at-the-computer   File: safe_delete_dlg.py    License: GNU General Public License v3.0 6 votes vote down vote up
def __init__(self, i_description_str: str, i_parent=None) -> 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 
Example 7
Project: dash-masternode-tool   Author: Bertrand256   File: ui_doc_dlg.py    License: MIT License 6 votes vote down vote up
def setupUi(self, DocDlg):
        DocDlg.setObjectName("DocDlg")
        DocDlg.resize(714, 454)
        self.verticalLayout = QtWidgets.QVBoxLayout(DocDlg)
        self.verticalLayout.setContentsMargins(6, 6, 6, 6)
        self.verticalLayout.setSpacing(6)
        self.verticalLayout.setObjectName("verticalLayout")
        self.textMain = QtWidgets.QTextBrowser(DocDlg)
        self.textMain.setStyleSheet("")
        self.textMain.setLineWrapMode(QtWidgets.QTextEdit.NoWrap)
        self.textMain.setOpenExternalLinks(True)
        self.textMain.setObjectName("textMain")
        self.verticalLayout.addWidget(self.textMain)
        self.buttonBox = QtWidgets.QDialogButtonBox(DocDlg)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(DocDlg)
        self.buttonBox.accepted.connect(DocDlg.accept)
        self.buttonBox.rejected.connect(DocDlg.reject)
        QtCore.QMetaObject.connectSlotsByName(DocDlg) 
Example 8
Project: IDASkins   Author: zyantific   File: clrapplier.py    License: MIT License 6 votes vote down vote up
def eventFilter(self, obj, event):
        def is_colors_dialog():
            return isinstance(
                obj, QDialog) and 'IDA Colors' in obj.windowTitle()

        if isinstance(event, QShowEvent) and is_colors_dialog():
            qApp.removeEventFilter(self)

            # Hide window and find &Import button
            obj.windowHandle().setOpacity(0)
            buttons = [widget for widget in obj.children() if isinstance(
                widget, QDialogButtonBox)][0]
            button = [widget for widget in buttons.buttons() if widget.text()
                      == '&Import'][0]

            with NativeHook(ask_file=self.ask_file_handler):
                button.click()

            QTimer.singleShot(0, lambda: obj.accept())
            return 1
        return 0 
Example 9
Project: pychemqt   Author: jjgomera   File: newComponent.py    License: GNU General Public License v3.0 6 votes vote down vote up
def loadUI(self):
        """Define common widget for chid class"""
        layoutBottom = QtWidgets.QHBoxLayout()
        self.status = Status()
        layoutBottom.addWidget(self.status)
        self.buttonShowDetails = QtWidgets.QPushButton(
            QtWidgets.QApplication.translate("pychemqt", "Show Details"))
        self.buttonShowDetails.clicked.connect(self.showDetails)
        self.buttonShowDetails.setEnabled(False)
        layoutBottom.addWidget(self.buttonShowDetails)
        self.btonBox = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Cancel |
            QtWidgets.QDialogButtonBox.Save)
        self.btonBox.button(QtWidgets.QDialogButtonBox.Save).setEnabled(False)
        self.btonBox.accepted.connect(self.save)
        self.btonBox.rejected.connect(self.reject)
        layoutBottom.addWidget(self.btonBox)
        self.layout().addLayout(layoutBottom) 
Example 10
Project: pychemqt   Author: jjgomera   File: flujo.py    License: GNU General Public License v3.0 6 votes vote down vote up
def changeproject(self, path):
        st = QtWidgets.QApplication.translate("pychemqt", "Loading project...")
        self.status.setText(st)
        QtWidgets.QApplication.processEvents()
        try:
            with open(path, "r") as file:
                self.project = json.load(file)
        except Exception as e:
            print(e)
            self.status.setText(QtGui.QApplication.translate(
                "pychemqt", "Failed to loading project..."))
        self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setEnabled(True)
        self.status.setText(QtWidgets.QApplication.translate(
            "pychemqt", "Project loaded succesfully"))
        self.stream.clear()
        for stream in sorted(self.project["stream"].keys()):
            self.stream.addItem(stream) 
Example 11
Project: pychemqt   Author: jjgomera   File: wizard.py    License: GNU General Public License v3.0 6 votes vote down vote up
def __init__(self, parent=None):
        super(AutoDialog, self).__init__(parent)
        layout = QtWidgets.QGridLayout(self)
        layout.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "T<sub>min</sub>")), 1, 1)
        self.Tmin = Entrada_con_unidades(Temperature)
        layout.addWidget(self.Tmin, 1, 2)
        layout.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "T<sub>max</sub>")), 2, 1)
        self.Tmax = Entrada_con_unidades(Temperature)
        layout.addWidget(self.Tmax, 2, 2)
        layout.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "P<sub>min</sub>")), 3, 1)
        self.Pmin = Entrada_con_unidades(Pressure)
        layout.addWidget(self.Pmin, 3, 2)
        layout.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "P<sub>max</sub>")), 4, 1)
        self.Pmax = Entrada_con_unidades(Pressure)
        layout.addWidget(self.Pmax, 4, 2)

        self.buttonBox = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.accepted.connect(self.accept)
        self.buttonBox.rejected.connect(self.reject)
        layout.addWidget(self.buttonBox, 5, 1, 1, 2) 
Example 12
Project: pychemqt   Author: jjgomera   File: inputTable.py    License: GNU General Public License v3.0 6 votes vote down vote up
def __init__(self, columnas=2, help=False, helpFile="", **kwargs):
        """
        title: window title
        help: boolean to show help button
        helpFile: Path for help file, file or url
        """
        parent = kwargs.get("parent", None)
        super(InputTableDialog, self).__init__(parent)
        title = kwargs.get("title", "")
        self.setWindowTitle(title)
        self.helpFile = helpFile
        layout = QtWidgets.QVBoxLayout(self)
        self.widget = InputTableWidget(columnas, **kwargs)
        layout.addWidget(self.widget)
        self.buttonBox = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok)
        if help:
            self.buttonBox.addButton(QtWidgets.QDialogButtonBox.Help)
            self.buttonBox.helpRequested.connect(self.ayuda)
        self.buttonBox.accepted.connect(self.accept)
        self.buttonBox.rejected.connect(self.reject)
        layout.addWidget(self.buttonBox) 
Example 13
Project: pychemqt   Author: jjgomera   File: viewComponents.py    License: GNU General Public License v3.0 6 votes vote down vote up
def buttonClicked(self, boton):
        role = self.btnBox.buttonRole(boton)
        if role == QtWidgets.QDialogButtonBox.AcceptRole:
            componente = self.getComponent()
            sql.inserElementsFromArray(sql.databank_Custom_name, [componente])
            self.accept()
        elif role == QtWidgets.QDialogButtonBox.ApplyRole:
            componente = self.getComponent()
            sql.updateElement(componente, self.index)
            self.accept()
        elif role == QtWidgets.QDialogButtonBox.DestructiveRole:
            componente = self.getComponent()
            if self.index == 0:
                func = sql.inserElementsFromArray
                arg = (sql.databank_Custom_name, [componente])
            elif self.index > 1000:
                func = sql.updateElement
                arg = (componente, self.index)
            if okToContinue(self, self.dirty, func, arg):
                self.accept()
            else:
                self.reject()
        else:
            self.reject() 
Example 14
Project: pychemqt   Author: jjgomera   File: UI_unitConverter.py    License: GNU General Public License v3.0 6 votes vote down vote up
def __init__(self, parent=None):
        super(UI_unitConverter, self).__init__(parent)
        self.setWindowTitle(
            QtWidgets.QApplication.translate("pychemqt", "Units converter"))

        self.verticalLayout = QtWidgets.QVBoxLayout(self)
        self.lista = QtWidgets.QListWidget()
        self.lista.itemDoubleClicked.connect(self.showChildWindow)
        self.verticalLayout.addWidget(self.lista)
        self.buttonBox = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Close)
        self.buttonBox.rejected.connect(self.reject)
        self.verticalLayout.addWidget(self.buttonBox)
        for unidad in _all:
            self.lista.addItem(unidad.__title__)

        self.lista.setCurrentRow(-1)
        logging.info(QtWidgets.QApplication.translate(
            "pychemqt", "Starting unit converte tool")) 
Example 15
Project: pychemqt   Author: jjgomera   File: reference.py    License: GNU General Public License v3.0 6 votes vote down vote up
def buttonClicked(self, boton):
        """Actions for dialogbuttonbox functionality"""
        if self.buttonBox.buttonRole(boton) == \
                QtWidgets.QDialogButtonBox.AcceptRole:
            self.accept()
        elif self.buttonBox.buttonRole(boton) == \
                QtWidgets.QDialogButtonBox.RejectRole:
            self.reject()
        else:
            if boton == \
                    self.buttonBox.button(QtWidgets.QDialogButtonBox.Reset):
                values = self._default
            elif boton.text() == \
                    QtWidgets.QApplication.translate("pychemqt", "No Mark"):
                values = [0]*N_PROP
            else:
                values = [1]*N_PROP

            for i, propiedad in enumerate(values):
                if propiedad == 1:
                    val = "1"
                else:
                    val = ""
                self.prop.item(i, 0).setText(val) 
Example 16
Project: pychemqt   Author: jjgomera   File: plot.py    License: GNU General Public License v3.0 6 votes vote down vote up
def __init__(self, parent=None):
        super(AddLine, self).__init__(parent)
        self.setWindowTitle(
            QtWidgets.QApplication.translate("pychemqt", "Add Line to Plot"))
        layout = QtWidgets.QGridLayout(self)

        self.tipo = QtWidgets.QComboBox()
        layout.addWidget(self.tipo, 1, 1, 1, 2)
        layout.addWidget(QtWidgets.QLabel(
            QtWidgets.QApplication.translate("pychemqt", "Value")), 2, 1)

        self.input = []
        for title, unidad, magnitud in self.lineas:
            self.input.append(Entrada_con_unidades(unidad, magnitud))
            layout.addWidget(self.input[-1], 2, 2)
            self.tipo.addItem(title)

        self.buttonBox = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel)
        self.buttonBox.accepted.connect(self.accept)
        self.buttonBox.rejected.connect(self.reject)
        layout.addWidget(self.buttonBox, 10, 1, 1, 2)

        self.isolineaChanged(0)
        self.tipo.currentIndexChanged.connect(self.isolineaChanged) 
Example 17
Project: Miyamoto   Author: aboood40091   File: puzzle.py    License: GNU General Public License v3.0 6 votes vote down vote up
def __init__(self):
        """
        Creates and initializes the dialog
        """
        QtWidgets.QDialog.__init__(self)
        self.setWindowTitle('Choose Object')

        self.objNum = QtWidgets.QSpinBox()
        count = len(Tileset.objects) - 1
        self.objNum.setRange(0, count)
        self.objNum.setValue(0)

        buttonBox = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel)

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

        mainLayout = QtWidgets.QVBoxLayout()
        mainLayout.addWidget(self.objNum)
        mainLayout.addWidget(buttonBox)

        self.setLayout(mainLayout) 
Example 18
Project: simnibs   Author: simnibs   File: electrodeGUI.py    License: GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, electrode_struct):
        super(Ui_Electrode, self).__init__()

        self.electrode_struct = copy.deepcopy(electrode_struct)
        mainLayout = QtWidgets.QGridLayout()

        self.glElectrode = GLElectrode()
        self.set_shape_size_layout()
        self.set_connector_layout()
        self.set_type_tick_layout()
        self.button_box = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Ok|QtWidgets.QDialogButtonBox.Cancel)
        self.button_box.accepted.connect(self.checkAndAccept)
        #self.button_box.accepted.connect(self.accept)
        self.button_box.rejected.connect(self.reject)

        mainLayout.addWidget(self.shape_size, 0,4)
        mainLayout.addWidget(self.type_thick, 1,4)
        mainLayout.addWidget(self.connector_box,2,4)
        mainLayout.addWidget(self.glElectrode,0,0,4,4)
        mainLayout.addWidget(self.button_box, 4,4)


        self.update_electrode()
        self.glElectrode.electrode_object, self.glElectrode.plug_object = self.glElectrode.drawElectrode(self.electrode_struct)
        self.glElectrode.electrode_struct = self.electrode_struct
        self.glElectrode.update()

        self.setLayout(mainLayout)
        self.resize(900,450)

        self.setWindowTitle('Electrode')


    #Shape and size box 
Example 19
Project: simnibs   Author: simnibs   File: main_gui.py    License: GNU General Public License v3.0 5 votes vote down vote up
def setButtonBox(self):
        runButton = QtWidgets.QPushButton("Run")
        runButton.setDefault(True)
        runButton.clicked.connect(self.runSimnibs)

        button_box = QtWidgets.QDialogButtonBox()
        button_box.addButton(runButton, QtWidgets.QDialogButtonBox.ActionRole)

        return button_box

    #Creates the menu bar 
Example 20
Project: simnibs   Author: simnibs   File: main_gui.py    License: GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, centre, reference, name, glHeadModel):
        super(Position_GUI, self).__init__()
        self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
        self.centre = centre
        self.reference = reference
        self.glHeadModel = glHeadModel
        self.ogl_object = None
        self.name = name
        glHeadModel.windowClicked.connect(self.getClickedPosition)

        mainLayout = QtWidgets.QGridLayout()

        self.set_position_layout()
        self.set_direction_layout()
        #self.getClickedPosition()

        mainLayout.addWidget(self.position_box,0,0,1,2)
        mainLayout.addWidget(self.direction_box,1,0,1,2)

        self.button_box = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Ok|QtWidgets.QDialogButtonBox.Cancel)
        self.button_box.accepted.connect(self.accept)
        self.button_box.rejected.connect(self.reject)

        mainLayout.addWidget(self.button_box,2,1,1,3)


        self.project_button = QtWidgets.QPushButton('Project on scalp') 
        self.project_button.clicked.connect(self.project_points)
        mainLayout.addWidget(self.project_button,2,0,1,1)

        self.setLayout(mainLayout)
        self.setWindowTitle("Position")
        self.el_type = []
        self.el_coords = []
        self.el_name = []
        self.load_cap()
        #self.resize(200,300) 
Example 21
Project: simnibs   Author: simnibs   File: main_gui.py    License: GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, simulist):
        super(ConductivitiesGui, self).__init__()

        self.simulist = simulist

        mainLayout = QtWidgets.QVBoxLayout()

        self.setCondTable()
        self.tensorBox = self.setTensorThings()
        self.changeCondType()

        mainLayout.addWidget(self.condTable)
        mainLayout.addWidget(self.tensorBox)

        self.button_box = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.button_box.accepted.connect(self.checkAndAccept)
        #self.button_box.accepted.connect(self.accept)
        self.button_box.rejected.connect(self.reject)
        self.resetButton = QtWidgets.QPushButton("Reset")
        self.resetButton.clicked.connect(self.reset)
        self.button_box.addButton(self.resetButton, QtWidgets.QDialogButtonBox.ResetRole)

        mainLayout.addWidget(self.button_box)

        self.setLayout(mainLayout)    
        self.setWindowTitle("Conductivities")
        self.resize(450,400) 
Example 22
Project: simnibs   Author: simnibs   File: simulation_menu.py    License: GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, parent, eeg_cap):
        super(EEGFileDialog, self).__init__(parent)

        self.fname = eeg_cap

        groupBox = QtWidgets.QGroupBox('EEG Cap File')
        layout = QtWidgets.QHBoxLayout()

        groupBox.lineEdit = QtWidgets.QLineEdit()
        if self.fname is not None:
            groupBox.lineEdit.setText(self.fname)
        layout.addWidget(groupBox.lineEdit)

        groupBox.selectFile = QtWidgets.QPushButton('&Browse')
        groupBox.selectFile.clicked.connect(self.selectFile)
        layout.addWidget(groupBox.selectFile)

        groupBox.setLayout(layout)
        self.group_box = groupBox

        self.button_box = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Ok|QtWidgets.QDialogButtonBox.Cancel)
        self.button_box.accepted.connect(self.accept)
        self.button_box.rejected.connect(self.reject)

        mainLayout = QtWidgets.QGridLayout()

        mainLayout.addWidget(self.group_box)
        mainLayout.addWidget(self.button_box)

        self.setLayout(mainLayout)  

        self.setWindowTitle('Tensor file names')
        self.resize(400,200) 
Example 23
Project: mindfulness-at-the-computer   Author: mindfulness-at-the-computer   File: sysinfo_dlg.py    License: GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, i_parent=None):
        super(SysinfoDialog, self).__init__(i_parent)
        self.setModal(True)

        vbox_l2 = QtWidgets.QVBoxLayout(self)

        self._system_info_str = '\n'.join([
            descr_str + ": " + str(value) for (descr_str, value) in mc.mc_global.sys_info_telist
        ])

        self.system_info_qll = QtWidgets.QLabel(self._system_info_str)
        vbox_l2.addWidget(self.system_info_qll)

        self.copy_qpb = QtWidgets.QPushButton(self.tr("Copy to clipboard"))
        self.copy_qpb.clicked.connect(self.on_copy_button_clicked)
        vbox_l2.addWidget(self.copy_qpb)

        self.button_box = QtWidgets.QDialogButtonBox(
            QtCore.Qt.Horizontal,
            self
        )
        self.button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Close)

        vbox_l2.addWidget(self.button_box)
        self.button_box.rejected.connect(self.reject)
        # -accepted and rejected are "slots" built into Qt 
Example 24
Project: IDAngr   Author: andreafioraldi   File: constraints.py    License: BSD 2-Clause "Simplified" License 5 votes vote down vote up
def setupUi(self, IDAngrConstraintsDialog):
        IDAngrConstraintsDialog.setObjectName("IDAngrConstraintsDialog")
        IDAngrConstraintsDialog.resize(811, 599)
        self.gridLayout_2 = QtWidgets.QGridLayout(IDAngrConstraintsDialog)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.constrEdit = QtWidgets.QPlainTextEdit(IDAngrConstraintsDialog)
        self.constrEdit.setEnabled(True)
        self.constrEdit.setObjectName("constrEdit")
        self.gridLayout_2.addWidget(self.constrEdit, 0, 0, 1, 1)
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.savedsBtn = QtWidgets.QPushButton(IDAngrConstraintsDialog)
        self.savedsBtn.setEnabled(True)
        self.savedsBtn.setObjectName("savedsBtn")
        self.gridLayout.addWidget(self.savedsBtn, 0, 0, 1, 1)
        self.buttonBox = QtWidgets.QDialogButtonBox(IDAngrConstraintsDialog)
        self.buttonBox.setMinimumSize(QtCore.QSize(0, 48))
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.gridLayout.addWidget(self.buttonBox, 0, 1, 1, 1)
        self.gridLayout_2.addLayout(self.gridLayout, 1, 0, 1, 1)

        self.retranslateUi(IDAngrConstraintsDialog)
        self.buttonBox.accepted.connect(IDAngrConstraintsDialog.accept)
        self.buttonBox.rejected.connect(IDAngrConstraintsDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(IDAngrConstraintsDialog) 
Example 25
Project: IDAngr   Author: andreafioraldi   File: saveds.py    License: BSD 2-Clause "Simplified" License 5 votes vote down vote up
def setupUi(self, IDAngrSavedsDialog):
        IDAngrSavedsDialog.setObjectName("IDAngrSavedsDialog")
        IDAngrSavedsDialog.resize(941, 569)
        self.gridLayout = QtWidgets.QGridLayout(IDAngrSavedsDialog)
        self.gridLayout.setObjectName("gridLayout")
        self.splitter = QtWidgets.QSplitter(IDAngrSavedsDialog)
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setObjectName("splitter")
        self.selectorList = QtWidgets.QListView(self.splitter)
        self.selectorList.setMaximumSize(QtCore.QSize(270, 16777215))
        self.selectorList.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
        self.selectorList.setObjectName("selectorList")
        self.codeView = QtWidgets.QPlainTextEdit(self.splitter)
        self.codeView.setReadOnly(True)
        self.codeView.setObjectName("codeView")
        self.gridLayout.addWidget(self.splitter, 0, 0, 1, 1)
        self.buttonBox = QtWidgets.QDialogButtonBox(IDAngrSavedsDialog)
        self.buttonBox.setMaximumSize(QtCore.QSize(16777215, 48))
        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.retranslateUi(IDAngrSavedsDialog)
        self.buttonBox.accepted.connect(IDAngrSavedsDialog.accept)
        self.buttonBox.rejected.connect(IDAngrSavedsDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(IDAngrSavedsDialog) 
Example 26
Project: IDAngr   Author: andreafioraldi   File: addmem.py    License: BSD 2-Clause "Simplified" License 5 votes vote down vote up
def setupUi(self, IDAngrAddMem):
        IDAngrAddMem.setObjectName("IDAngrAddMem")
        IDAngrAddMem.resize(440, 251)
        self.gridLayout_2 = QtWidgets.QGridLayout(IDAngrAddMem)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtWidgets.QLabel(IDAngrAddMem)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.addrTextEdit = QtWidgets.QLineEdit(IDAngrAddMem)
        self.addrTextEdit.setObjectName("addrTextEdit")
        self.gridLayout.addWidget(self.addrTextEdit, 1, 0, 1, 1)
        self.label_2 = QtWidgets.QLabel(IDAngrAddMem)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
        self.lenTextEdit = QtWidgets.QLineEdit(IDAngrAddMem)
        self.lenTextEdit.setObjectName("lenTextEdit")
        self.gridLayout.addWidget(self.lenTextEdit, 3, 0, 1, 1)
        self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(20, 79, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.gridLayout_2.addItem(spacerItem, 1, 0, 1, 1)
        self.buttonBox = QtWidgets.QDialogButtonBox(IDAngrAddMem)
        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, 1)

        self.retranslateUi(IDAngrAddMem)
        self.buttonBox.accepted.connect(IDAngrAddMem.accept)
        self.buttonBox.rejected.connect(IDAngrAddMem.reject)
        QtCore.QMetaObject.connectSlotsByName(IDAngrAddMem) 
Example 27
Project: dash-masternode-tool   Author: Bertrand256   File: hw_common.py    License: MIT License 5 votes vote down vote up
def setupUi(self, Form):
        Form.setObjectName("SelectHWDevice")
        self.lay_main = QtWidgets.QVBoxLayout(Form)
        self.lay_main.setContentsMargins(-1, 3, -1, 3)
        self.lay_main.setObjectName("lay_main")
        self.gb_devices = QtWidgets.QGroupBox(Form)
        self.gb_devices.setFlat(False)
        self.gb_devices.setCheckable(False)
        self.gb_devices.setObjectName("gb_devices")
        self.lay_main.addWidget(self.gb_devices)

        self.lay_devices = QtWidgets.QVBoxLayout(self.gb_devices)
        for idx, dev in enumerate(self.device_list):
            rb = QRadioButton(self.gb_devices)
            rb.setText(dev)
            rb.toggled.connect(partial(self.on_item_toggled, idx))
            self.device_radiobutton_list.append(rb)
            self.lay_devices.addWidget(rb)

        self.btn_main = QtWidgets.QDialogButtonBox(Form)
        self.btn_main.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok)
        self.btn_main.setObjectName("btn_main")
        self.lay_main.addWidget(self.btn_main)
        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
        self.setFixedSize(self.sizeHint()) 
Example 28
Project: dash-masternode-tool   Author: Bertrand256   File: ui_cmd_console_dlg.py    License: MIT License 5 votes vote down vote up
def setupUi(self, CmdConsoleDlg):
        CmdConsoleDlg.setObjectName("CmdConsoleDlg")
        CmdConsoleDlg.resize(468, 334)
        self.verticalLayout = QtWidgets.QVBoxLayout(CmdConsoleDlg)
        self.verticalLayout.setObjectName("verticalLayout")
        self.edtCmdLog = QtWidgets.QTextBrowser(CmdConsoleDlg)
        font = QtGui.QFont()
        font.setFamily("Courier New")
        font.setPointSize(12)
        font.setKerning(False)
        self.edtCmdLog.setFont(font)
        self.edtCmdLog.setLineWrapMode(QtWidgets.QTextEdit.WidgetWidth)
        self.edtCmdLog.setObjectName("edtCmdLog")
        self.verticalLayout.addWidget(self.edtCmdLog)
        self.label = QtWidgets.QLabel(CmdConsoleDlg)
        self.label.setObjectName("label")
        self.verticalLayout.addWidget(self.label)
        self.edtCommand = QtWidgets.QLineEdit(CmdConsoleDlg)
        self.edtCommand.setClearButtonEnabled(True)
        self.edtCommand.setObjectName("edtCommand")
        self.verticalLayout.addWidget(self.edtCommand)
        self.buttonBox = QtWidgets.QDialogButtonBox(CmdConsoleDlg)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(CmdConsoleDlg)
        self.buttonBox.accepted.connect(CmdConsoleDlg.accept)
        self.buttonBox.rejected.connect(CmdConsoleDlg.reject)
        QtCore.QMetaObject.connectSlotsByName(CmdConsoleDlg) 
Example 29
Project: dash-masternode-tool   Author: Bertrand256   File: ui_message_dlg.py    License: MIT License 5 votes vote down vote up
def setupUi(self, MessageDlg):
        MessageDlg.setObjectName("MessageDlg")
        MessageDlg.resize(263, 96)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(15)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(MessageDlg.sizePolicy().hasHeightForWidth())
        MessageDlg.setSizePolicy(sizePolicy)
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(MessageDlg)
        self.verticalLayout_2.setSizeConstraint(QtWidgets.QLayout.SetMinimumSize)
        self.verticalLayout_2.setContentsMargins(6, 6, 6, 6)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.lblMessage = QtWidgets.QLabel(MessageDlg)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.lblMessage.sizePolicy().hasHeightForWidth())
        self.lblMessage.setSizePolicy(sizePolicy)
        self.lblMessage.setSizeIncrement(QtCore.QSize(0, 0))
        self.lblMessage.setFrameShape(QtWidgets.QFrame.Box)
        self.lblMessage.setText("")
        self.lblMessage.setScaledContents(True)
        self.lblMessage.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
        self.lblMessage.setWordWrap(True)
        self.lblMessage.setOpenExternalLinks(True)
        self.lblMessage.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse)
        self.lblMessage.setObjectName("lblMessage")
        self.verticalLayout_2.addWidget(self.lblMessage)
        spacerItem = QtWidgets.QSpacerItem(20, 0, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem)
        self.buttonBox = QtWidgets.QDialogButtonBox(MessageDlg)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout_2.addWidget(self.buttonBox)

        self.retranslateUi(MessageDlg)
        QtCore.QMetaObject.connectSlotsByName(MessageDlg) 
Example 30
Project: dash-masternode-tool   Author: Bertrand256   File: ui_find_coll_tx_dlg.py    License: MIT License 5 votes vote down vote up
def setupUi(self, ListCollateralTxsDlg):
        ListCollateralTxsDlg.setObjectName("ListCollateralTxsDlg")
        ListCollateralTxsDlg.resize(655, 286)
        ListCollateralTxsDlg.setModal(True)
        self.verticalLayout = QtWidgets.QVBoxLayout(ListCollateralTxsDlg)
        self.verticalLayout.setContentsMargins(8, 8, 8, 8)
        self.verticalLayout.setSpacing(8)
        self.verticalLayout.setObjectName("verticalLayout")
        self.lblMessage = QtWidgets.QLabel(ListCollateralTxsDlg)
        self.lblMessage.setText("")
        self.lblMessage.setWordWrap(True)
        self.lblMessage.setObjectName("lblMessage")
        self.verticalLayout.addWidget(self.lblMessage)
        self.collsTableView = QtWidgets.QTableView(ListCollateralTxsDlg)
        self.collsTableView.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContentsOnFirstShow)
        self.collsTableView.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
        self.collsTableView.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
        self.collsTableView.setShowGrid(True)
        self.collsTableView.setSortingEnabled(False)
        self.collsTableView.setObjectName("collsTableView")
        self.collsTableView.verticalHeader().setVisible(False)
        self.collsTableView.verticalHeader().setCascadingSectionResizes(True)
        self.collsTableView.verticalHeader().setHighlightSections(False)
        self.verticalLayout.addWidget(self.collsTableView)
        self.buttonBox = QtWidgets.QDialogButtonBox(ListCollateralTxsDlg)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Apply|QtWidgets.QDialogButtonBox.Close)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(ListCollateralTxsDlg)
        QtCore.QMetaObject.connectSlotsByName(ListCollateralTxsDlg)