Beispiel #1
0
    def __init__(self, parent=None, flags=QtCore.Qt.Window):
        super().__init__(parent=parent, f=flags)
        self.setWindowTitle("Build a formula")
        self.setWindowModality(QtCore.Qt.ApplicationModal)
        self.interpreter = None
        self.key = ("", "")

        # 6 broad by 6 deep.
        grid = QtWidgets.QGridLayout(self)
        self.text_field = QtWidgets.QLineEdit(self)
        self.text_field.textChanged.connect(self.validate_formula)
        self.buttons = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Save
            | QtWidgets.QDialogButtonBox.Cancel)
        self.buttons.setSizePolicy(
            QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                  QtWidgets.QSizePolicy.Preferred,
                                  QtWidgets.QSizePolicy.ButtonBox))
        self.parameters = QtWidgets.QTableView(self)
        model = QtGui.QStandardItemModel(self)
        self.parameters.setModel(model)
        completer = QtWidgets.QCompleter(model, self)
        completer.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
        self.text_field.setCompleter(completer)
        self.parameters.doubleClicked.connect(self.append_parameter_name)
        self.new_parameter = QtWidgets.QPushButton(qicons.add, "New parameter",
                                                   self)
        self.new_parameter.clicked.connect(self.create_parameter)

        self.calculator = CalculatorButtons(self)
        self.calculator.button_press.connect(self.text_field.insert)
        self.calculator.clear.connect(self.text_field.clear)

        grid.addWidget(self.text_field, 0, 0, 5, 1)
        grid.addWidget(self.buttons, 5, 0, 1, 1)
        grid.addWidget(self.calculator, 0, 1, 5, 1)
        grid.addWidget(self.parameters, 0, 2, 5, 1)
        grid.addWidget(self.new_parameter, 5, 2, 1, 1)

        self.buttons.accepted.connect(self.accept)
        self.buttons.rejected.connect(self.reject)
        self.show()
    def __init__(self, parent=None, phoneme_set=None):
        super(PronunciationDialog, self).__init__(None)

        self.setWindowTitle("Unknown Word")
        self.word_label = QtWidgets.QLabel("Break down the word:", self)
        self.word_label.setAlignment(QtCore.Qt.AlignCenter)
        self.box = QtWidgets.QVBoxLayout()
        self.phoneme_grid = QtWidgets.QGridLayout()
        self.decide_box = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel)
        self.confirm_button = QtWidgets.QPushButton("OK")
        self.cancel_button = QtWidgets.QPushButton("Cancel")
        self.phoneme_ctrl = QtWidgets.QLineEdit()

        self.gave_ok = False
        self.curr_x = 0
        self.curr_y = 0
        self.max_x = round(sqrt(len(phoneme_set)))  # This way the grid should always be as square as possible

        self.box.addWidget(self.word_label)
        self.box.addLayout(self.phoneme_grid)
        self.box.addWidget(self.phoneme_ctrl)
        self.box.addWidget(self.decide_box)

        phoneme_ids = {}
        self.phoneme_buttons = {}

        for phoneme in phoneme_set:
            if phoneme != "rest":
                phoneme_ids[phoneme] = QtWidgets.QPushButton(phoneme, self)
                phoneme_ids[phoneme].clicked.connect(self.on_phoneme_click)
                self.phoneme_grid.addWidget(phoneme_ids[phoneme], self.curr_y, self.curr_x)
                self.curr_x += 1
                if self.curr_x >= self.max_x:
                    self.curr_x = 0
                    self.curr_y += 1

        self.decide_box.accepted.connect(self.on_accept)
        self.decide_box.rejected.connect(self.on_reject)

        self.setLayout(self.box)
        self.setModal(True)
        self.show()
Beispiel #3
0
    def setupUi(self):
        self.setWindowModality(QtCore.Qt.WindowModal)
        self.resize(319, 167)
        self.setSizeGripEnabled(False)
        self.setModal(True)
        self.button_box = QtWidgets.QDialogButtonBox(self)
        self.button_box.setGeometry(QtCore.QRect(70, 120, 161, 32))
        self.button_box.setOrientation(QtCore.Qt.Horizontal)
        self.button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel
                                           | QtWidgets.QDialogButtonBox.Ok)
        self.layoutWidget = QtWidgets.QWidget(self)
        self.layoutWidget.setGeometry(QtCore.QRect(14, 10, 290, 48))
        self.number_grid_layout = QtWidgets.QGridLayout(self.layoutWidget)
        self.number_grid_layout.setContentsMargins(0, 0, 0, 0)
        self.source_num_label = QtWidgets.QLabel(self.layoutWidget)
        self.number_grid_layout.addWidget(self.source_num_label, 0, 0, 1, 1)
        self.source_num_spin_box = QtWidgets.QSpinBox(self.layoutWidget)
        self.source_num_spin_box.setMaximum(100000)
        self.number_grid_layout.addWidget(self.source_num_spin_box, 0, 1, 1, 1)
        self.source_info_label = QtWidgets.QLabel(self.layoutWidget)
        self.number_grid_layout.addWidget(self.source_info_label, 0, 2, 1, 1)
        self.target_num_label = QtWidgets.QLabel(self.layoutWidget)
        self.number_grid_layout.addWidget(self.target_num_label, 1, 0, 1, 1)
        self.target_num_spin_box = QtWidgets.QSpinBox(self.layoutWidget)
        self.target_num_spin_box.setMaximum(100000)
        self.number_grid_layout.addWidget(self.target_num_spin_box, 1, 1, 1, 1)
        self.target_info_label = QtWidgets.QLabel(self.layoutWidget)
        self.number_grid_layout.addWidget(self.target_info_label, 1, 2, 1, 1)
        self.layoutWidget1 = QtWidgets.QWidget(self)
        self.layoutWidget1.setGeometry(QtCore.QRect(14, 70, 256, 42))
        self.options_vert_layout = QtWidgets.QVBoxLayout(self.layoutWidget1)
        self.options_vert_layout.setContentsMargins(0, 0, 0, 0)
        self.remove_radio_button = QtWidgets.QRadioButton(self.layoutWidget1)
        self.remove_radio_button.setChecked(True)
        self.options_vert_layout.addWidget(self.remove_radio_button)
        self.replace_radio_button = QtWidgets.QRadioButton(self.layoutWidget1)
        self.options_vert_layout.addWidget(self.replace_radio_button)

        self.retranslateUi()
        self.button_box.accepted.connect(self.accept)
        self.button_box.rejected.connect(self.reject)
        QtCore.QMetaObject.connectSlotsByName(self)
    def setupUi(self, ParameterValueEditor):
        ParameterValueEditor.setObjectName("ParameterValueEditor")
        ParameterValueEditor.resize(700, 400)
        self.verticalLayout = QtWidgets.QVBoxLayout(ParameterValueEditor)
        self.verticalLayout.setObjectName("verticalLayout")
        self.parameter_type_selector_layout = QtWidgets.QHBoxLayout()
        self.parameter_type_selector_layout.setObjectName(
            "parameter_type_selector_layout")
        self.parameter_type_selector_label = QtWidgets.QLabel(
            ParameterValueEditor)
        self.parameter_type_selector_label.setObjectName(
            "parameter_type_selector_label")
        self.parameter_type_selector_layout.addWidget(
            self.parameter_type_selector_label)
        self.parameter_type_selector = QtWidgets.QComboBox(
            ParameterValueEditor)
        self.parameter_type_selector.setObjectName("parameter_type_selector")
        self.parameter_type_selector.addItem("")
        self.parameter_type_selector.addItem("")
        self.parameter_type_selector.addItem("")
        self.parameter_type_selector.addItem("")
        self.parameter_type_selector.addItem("")
        self.parameter_type_selector.addItem("")
        self.parameter_type_selector_layout.addWidget(
            self.parameter_type_selector)
        spacerItem = QtWidgets.QSpacerItem(40, 20,
                                           QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Minimum)
        self.parameter_type_selector_layout.addItem(spacerItem)
        self.verticalLayout.addLayout(self.parameter_type_selector_layout)
        self.editor_stack = QtWidgets.QStackedWidget(ParameterValueEditor)
        self.editor_stack.setObjectName("editor_stack")
        self.verticalLayout.addWidget(self.editor_stack)
        self.button_box = QtWidgets.QDialogButtonBox(ParameterValueEditor)
        self.button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel
                                           | QtWidgets.QDialogButtonBox.Ok)
        self.button_box.setObjectName("button_box")
        self.verticalLayout.addWidget(self.button_box)

        self.retranslateUi(ParameterValueEditor)
        self.editor_stack.setCurrentIndex(-1)
        QtCore.QMetaObject.connectSlotsByName(ParameterValueEditor)
    def __init__(self, parent):
        super(ListView, self).__init__(
            parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)

        self.setWindowTitle("Installed Python Extensions")

        self.layout = QtWidgets.QVBoxLayout(self)

        self.label = QtWidgets.QLabel()
        self.label.setText(
            "Manage Python extensions installed to \"{0}\".".format(
                instance.extensionDir().absolutePath()))
        self.label.setWordWrap(True)
        self.layout.addWidget(self.label)

        self.list = ExtensionList()
        self.layout.addWidget(self.list)

        self.buttonDone = QtWidgets.QPushButton("Close")
        self.buttonDone.setDefault(True)
        self.buttonDone.clicked.connect(self.close)

        self.buttonDelete = QtWidgets.QPushButton("Uninstall")
        self.buttonDelete.setAutoDefault(False)
        self.buttonDelete.clicked.connect(self.actionDelete)

        self.buttonAdd = QtWidgets.QPushButton("Install")
        self.buttonAdd.setAutoDefault(False)
        self.buttonAdd.clicked.connect(self.actionAdd)

        self.buttonBox = QtWidgets.QDialogButtonBox(QtCore.Qt.Horizontal)
        self.buttonBox.addButton(self.buttonDone,
                                 QtWidgets.QDialogButtonBox.AcceptRole)
        self.buttonBox.addButton(self.buttonDelete,
                                 QtWidgets.QDialogButtonBox.ActionRole)
        self.buttonBox.addButton(self.buttonAdd,
                                 QtWidgets.QDialogButtonBox.ActionRole)
        self.layout.addWidget(self.buttonBox)

        self.reloadExtensionList()

        self.resize(400, 350)
Beispiel #6
0
    def __init__(self, parent=None):
        """
        Inicijalizator dijaloga za dodavanje nove hale u magacin.

        :param parent: roditeljski widget.
        :type parent: QWidget
        """
        super().__init__(parent)
        self.setWindowTitle("Dodaj halu")
        self.vbox_layout = QtWidgets.QVBoxLayout()
        self.form_layout = QtWidgets.QFormLayout()
        self.name_input = QtWidgets.QLineEdit(self)
        self.type_input = QtWidgets.QComboBox(self)
        self.type_input.addItem(QtGui.QIcon("resources/icons/weather.png"),
                                "Sobna temperatura")
        self.type_input.addItem(
            QtGui.QIcon("resources/icons/weather-moon.png"), "Rashladna")
        self.type_input.addItem(
            QtGui.QIcon("resources/icons/weather-snowflake.png"),
            "Zamrzavanje")
        self.capacity_input = QtWidgets.QSpinBox(self)

        self.button_box = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Ok
            | QtWidgets.QDialogButtonBox.Cancel,
            parent=self)

        self.capacity_input.setMinimum(1)
        self.capacity_input.setMaximum(999999)
        self.capacity_input.setSingleStep(1)

        self.form_layout.addRow("Naziv:", self.name_input)
        self.form_layout.addRow("Tip:", self.type_input)
        self.form_layout.addRow("Kapacitet:", self.capacity_input)

        self.vbox_layout.addLayout(self.form_layout)
        self.vbox_layout.addWidget(self.button_box)

        self.button_box.accepted.connect(self._on_accept)
        self.button_box.rejected.connect(self.reject)

        self.setLayout(self.vbox_layout)
    def __init__(self, parent=None):
        """
        Inicijalizator dijaloga za dodavanje novog kontakta u imenik.

        :param parent: roditeljski widget.
        :type parent: QWidget
        """
        super().__init__(parent)
        self.setWindowTitle("Dodaj kontakt")
        self.vbox_layout = QtWidgets.QVBoxLayout()
        self.form_layout = QtWidgets.QFormLayout()
        self.name_input = QtWidgets.QLineEdit(self)
        self.surname_input = QtWidgets.QLineEdit(self)
        self.phone_input = QtWidgets.QLineEdit(self)
        self.email_input = QtWidgets.QLineEdit(self)
        self.birthday_input = QtWidgets.QDateEdit(self)
        self.button_box = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Ok
            | QtWidgets.QDialogButtonBox.Cancel,
            parent=self)
        self.email_re = QtCore.QRegExp(
            r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)",
            QtCore.Qt.CaseInsensitive)
        self.email_validator = QtGui.QRegExpValidator(self.email_re)
        self.email_input.setValidator(self.email_validator)
        self.email_input.textChanged.connect(self.adjust_text_color)

        self.birthday_input.setDate(QtCore.QDate.currentDate())
        self.birthday_input.setCalendarPopup(True)
        self.form_layout.addRow("Ime:", self.name_input)
        self.form_layout.addRow("Prezime:", self.surname_input)
        self.form_layout.addRow("Telefon:", self.phone_input)
        self.form_layout.addRow("Email:", self.email_input)
        self.form_layout.addRow("Datum rodjenja:", self.birthday_input)

        self.vbox_layout.addLayout(self.form_layout)
        self.vbox_layout.addWidget(self.button_box)

        self.button_box.accepted.connect(self._on_accept)
        self.button_box.rejected.connect(self.reject)

        self.setLayout(self.vbox_layout)
Beispiel #8
0
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.setWindowModality(QtCore.Qt.ApplicationModal)
        Dialog.resize(364, 138)
        Dialog.setModal(True)
        self.verticalLayout = QtWidgets.QVBoxLayout(Dialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.formLayout = QtWidgets.QFormLayout()
        self.formLayout.setFieldGrowthPolicy(
            QtWidgets.QFormLayout.AllNonFixedFieldsGrow)
        self.formLayout.setContentsMargins(-1, 10, -1, -1)
        self.formLayout.setObjectName("formLayout")
        self.login_or_email_label = QtWidgets.QLabel(Dialog)
        self.login_or_email_label.setObjectName("login_or_email_label")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole,
                                  self.login_or_email_label)
        self.login_or_email_lineEdit = QtWidgets.QLineEdit(Dialog)
        self.login_or_email_lineEdit.setInputMask("")
        self.login_or_email_lineEdit.setObjectName("login_or_email_lineEdit")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole,
                                  self.login_or_email_lineEdit)
        self.password_label = QtWidgets.QLabel(Dialog)
        self.password_label.setObjectName("password_label")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole,
                                  self.password_label)
        self.password_lineEdit = QtWidgets.QLineEdit(Dialog)
        self.password_lineEdit.setInputMask("")
        self.password_lineEdit.setText("")
        self.password_lineEdit.setEchoMode(QtWidgets.QLineEdit.Password)
        self.password_lineEdit.setObjectName("password_lineEdit")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole,
                                  self.password_lineEdit)
        self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel
                                          | QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole,
                                  self.buttonBox)
        self.verticalLayout.addLayout(self.formLayout)

        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
Beispiel #9
0
    def __init__(
        self,
        form_widget: Optional[YamlFormWidget] = None,
        form_name: Optional[Text] = None,
        *args,
        **kwargs,
    ):
        super(FormBuilderModalDialog, self).__init__()

        if not form_widget and form_name:
            form_widget = YamlFormWidget.from_name(form_name)

        if not form_widget:
            raise ValueError(
                "FormBuilderModalDialog must have either form widget or name.")

        self._results = None
        self.form_widget = form_widget
        self.message_fields = []

        # Layout for buttons
        buttons = QtWidgets.QDialogButtonBox()
        self.cancel_button = buttons.addButton(
            QtWidgets.QDialogButtonBox.Cancel)
        self.run_button = buttons.addButton(QtWidgets.QDialogButtonBox.Ok)

        buttons_layout = QtWidgets.QHBoxLayout()
        buttons_layout.addWidget(buttons, alignment=QtCore.Qt.AlignTop)

        buttons_layout_widget = QtWidgets.QWidget()
        buttons_layout_widget.setLayout(buttons_layout)

        # Layout for entire dialog
        layout = QtWidgets.QVBoxLayout()
        layout.addWidget(self.form_widget)
        layout.addWidget(buttons_layout_widget)

        self.setLayout(layout)

        # Connect actions for buttons
        buttons.accepted.connect(self.on_accept)
        buttons.rejected.connect(self.reject)
Beispiel #10
0
    def __init__(self, parent=None):
        super().__init__(parent)

        self.input_box = QtWidgets.QGroupBox(self)
        self.input_box.setStyleSheet(style_group_box.border_title)
        input_field_layout = QtWidgets.QVBoxLayout()
        self.input_box.setLayout(input_field_layout)
        self.group = QtWidgets.QButtonGroup(self)
        self.group.setExclusive(True)

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

        layout = QtWidgets.QVBoxLayout()
        layout.addWidget(self.input_box)
        layout.addWidget(self.buttons)
        self.setLayout(layout)
Beispiel #11
0
    def setupUi(self, settingsDialog):
        settingsDialog.setObjectName("settingsDialog")
        settingsDialog.resize(604, 201)
        self.verticalLayout = QtWidgets.QVBoxLayout(settingsDialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.table = QtWidgets.QTableWidget(settingsDialog)
        self.table.setObjectName("table")
        self.table.setColumnCount(0)
        self.table.setRowCount(0)
        self.verticalLayout.addWidget(self.table)
        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.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(settingsDialog)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), settingsDialog.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), settingsDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(settingsDialog)
Beispiel #12
0
    def initUI(self):
        layout = qw.QGridLayout()

        # Image 0 0
        self.l_image = qw.QLabel()
        self.l_image.setPixmap(self.icon)
        layout.addWidget(self.l_image, 0, 0)
        
        # Info text
        self.l_info = qw.QLabel(self.text)
        self.l_info.setWordWrap(True)
        self.l_info.setMaximumWidth(450)
        layout.addWidget(self.l_info, 0, 1)

        # Buttons
        self.ok_button = qw.QDialogButtonBox(qw.QDialogButtonBox.Ok)
        self.ok_button.accepted.connect(self.On_OkPressed)
        layout.addWidget(self.ok_button, 1,1)

        self.setLayout(layout)
Beispiel #13
0
    def setupUi(self, DialogLog):
        DialogLog.setObjectName("DialogLog")
        DialogLog.resize(400, 280)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/icons/icons/Small/icon100_com_102.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        DialogLog.setWindowIcon(icon)
        self.buttonBox = QtWidgets.QDialogButtonBox(DialogLog)
        self.buttonBox.setGeometry(QtCore.QRect(30, 240, 341, 32))
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setCenterButtons(True)
        self.buttonBox.setObjectName("buttonBox")
        self.textBrowser = QtWidgets.QTextBrowser(DialogLog)
        self.textBrowser.setGeometry(QtCore.QRect(10, 10, 381, 221))
        self.textBrowser.setObjectName("textBrowser")

        self.retranslateUi(DialogLog)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), DialogLog.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), DialogLog.reject)
        QtCore.QMetaObject.connectSlotsByName(DialogLog)
Beispiel #14
0
    def createRemoveTransitionDialog(self):
        dialog = QtWidgets.QDialog()
        dialog.resize(236, 149)
        self.buttonBox = QtWidgets.QDialogButtonBox(dialog)
        self.buttonBox.setGeometry(QtCore.QRect(30, 100, 171, 32))
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel
                                          | QtWidgets.QDialogButtonBox.Ok)
        self.label_2 = QtWidgets.QLabel(dialog)
        self.label_2.setGeometry(QtCore.QRect(30, 20, 191, 17))
        self.comboBox = QtWidgets.QComboBox(dialog)
        self.comboBox.setGeometry(QtCore.QRect(40, 50, 161, 25))
        self.buttonBox.accepted.connect(self.removeTransition)
        self.buttonBox.rejected.connect(dialog.close)
        self.label_2.setText("Select an existing transition")

        selected = self.transition_table.selectedItems()
        if len(selected) == 0:
            self.createErrorDialog(
                "Select the source state of the transition to be removed")
            return

        row = selected[0].row()
        state = self.transition_table.item(row, 2).text()

        for i in range(3, self.transition_table.columnCount()):
            conj = self.getTransitionSet(row, i)
            input = self.transition_table.horizontalHeaderItem(i).text()

            for t in conj:
                if t != "":
                    self.comboBox.addItem("(" + state + ", " + input +
                                          ") -> " + t)

        if self.comboBox.count() == 0:
            self.createErrorDialog(
                "This state doesn't have existing transitions to remove!!")
            return

        self.dialog = dialog
        self.dialog.show()
    def setupUi(self, chooseParams):
        chooseParams.setObjectName("chooseParams")
        chooseParams.resize(360, 630)
        self.gridLayout = QtWidgets.QGridLayout(chooseParams)
        self.gridLayout.setObjectName("gridLayout")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.label = QtWidgets.QLabel(chooseParams)
        font = QtGui.QFont()
        font.setPointSize(20)
        font.setWeight(75)
        font.setBold(True)
        self.label.setFont(font)
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setObjectName("label")
        self.verticalLayout.addWidget(self.label)
        self.paramList = QtWidgets.QListWidget(chooseParams)
        self.paramList.setSelectionMode(
            QtWidgets.QAbstractItemView.MultiSelection)
        self.paramList.setObjectName("paramList")
        self.verticalLayout.addWidget(self.paramList)
        self.label_2 = QtWidgets.QLabel(chooseParams)
        self.label_2.setObjectName("label_2")
        self.verticalLayout.addWidget(self.label_2)
        self.verticalLayout_2.addLayout(self.verticalLayout)
        self.buttonBox = QtWidgets.QDialogButtonBox(chooseParams)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel
                                          | QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout_2.addWidget(self.buttonBox)
        self.gridLayout.addLayout(self.verticalLayout_2, 0, 0, 1, 1)

        self.retranslateUi(chooseParams)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"),
                               chooseParams.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"),
                               chooseParams.reject)
        QtCore.QMetaObject.connectSlotsByName(chooseParams)
Beispiel #16
0
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(363, 312)
        self.verticalLayout = QtWidgets.QVBoxLayout(Dialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.tableView = CopyPasteTableView(Dialog)
        self.tableView.setEditTriggers(
            QtWidgets.QAbstractItemView.AnyKeyPressed
            | QtWidgets.QAbstractItemView.DoubleClicked
            | QtWidgets.QAbstractItemView.EditKeyPressed)
        self.tableView.setTabKeyNavigation(False)
        self.tableView.setObjectName("tableView")
        self.tableView.horizontalHeader().setStretchLastSection(True)
        self.verticalLayout.addWidget(self.tableView)
        self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
        self.buttonBox.setFocusPolicy(QtCore.Qt.StrongFocus)
        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.actionInsert_row = QtWidgets.QAction(Dialog)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/icons/plus_object_icon.png"),
                       QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionInsert_row.setIcon(icon)
        self.actionInsert_row.setObjectName("actionInsert_row")
        self.actionRemove_rows = QtWidgets.QAction(Dialog)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(":/icons/minus_object_icon.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionRemove_rows.setIcon(icon1)
        self.actionRemove_rows.setObjectName("actionRemove_rows")

        self.retranslateUi(Dialog)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"),
                               Dialog.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"),
                               Dialog.reject)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
        Dialog.setTabOrder(self.tableView, self.buttonBox)
Beispiel #17
0
    def __init__(self, parent=None):

        super().__init__(parent)

        self.setWindowTitle("Dodaj halu")
        self.setWindowIcon(QtGui.QIcon("resources/icons/block.png"))

        self.vbox_layout = QtWidgets.QVBoxLayout()
        self.hbox_layout = QtWidgets.QHBoxLayout()
        self.form_layout = QtWidgets.QFormLayout()
        self.line_edit_naziv = QtWidgets.QLineEdit(self)
        self.spin_box_kapacitet = QtWidgets.QSpinBox()
        self.radio_button_temperatura_0 = QtWidgets.QRadioButton(
            "-10C - 0C", self)
        self.radio_button_temperatura_18 = QtWidgets.QRadioButton(
            "1C - 18C", self)
        self.radio_button_temperatura_25 = QtWidgets.QRadioButton(
            "19C - 25C", self)
        self.dialog_button_box = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel,
            parent=self)

        self.line_edit_naziv.setMaxLength(10)
        self.spin_box_kapacitet.setMinimum(1)
        self.spin_box_kapacitet.setMaximum(1000)

        self.hbox_layout.addWidget(self.radio_button_temperatura_0)
        self.hbox_layout.addWidget(self.radio_button_temperatura_18)
        self.hbox_layout.addWidget(self.radio_button_temperatura_25)

        self.form_layout.addRow("Naziv:", self.line_edit_naziv)
        self.form_layout.addRow("Kapacitet:", self.spin_box_kapacitet)
        self.form_layout.addRow(self.hbox_layout)

        self.vbox_layout.addLayout(self.form_layout)
        self.vbox_layout.addWidget(self.dialog_button_box)

        self.dialog_button_box.accepted.connect(self._ok)
        self.dialog_button_box.rejected.connect(self.reject)

        self.setLayout(self.vbox_layout)
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(400, 300)
        self.verticalLayout = QtWidgets.QVBoxLayout(Dialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.label = QtWidgets.QLabel(Dialog)
        self.label.setObjectName("label")
        self.verticalLayout.addWidget(self.label)
        self.plainTextEdit = QtWidgets.QPlainTextEdit(Dialog)
        self.plainTextEdit.setObjectName("plainTextEdit")
        self.verticalLayout.addWidget(self.plainTextEdit)
        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.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(Dialog)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), Dialog.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), Dialog.reject)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
Beispiel #19
0
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(825, 552)
        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.tableView = QtWidgets.QTableView(Dialog)
        self.tableView.setObjectName("tableView")
        self.gridLayout.addWidget(self.tableView, 0, 0, 1, 1)

        self.retranslateUi(Dialog)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"),
                               Dialog.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"),
                               Dialog.reject)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
Beispiel #20
0
    def __init__(self, parent=None):
        super(SaveChangesDlg, self).__init__(parent)
        main_layout = QtWidgets.QVBoxLayout()

        self.save = 0

        labelLayout = QtWidgets.QHBoxLayout()
        label = QtWidgets.QLabel('Save changes to current file ?')
        labelLayout.addWidget(label)

        btnLayout = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Yes | QtWidgets.QDialogButtonBox.No,
            QtCore.Qt.Horizontal, self)
        btnLayout.accepted.connect(self.accept)
        btnLayout.button(QtWidgets.QDialogButtonBox.No).clicked.connect(
            self.discarded)
        main_layout.addLayout(labelLayout)
        main_layout.addWidget(btnLayout)

        self.setLayout(main_layout)
        self.setWindowTitle('Save changes')
Beispiel #21
0
    def __init__(self, parent):
        QtWidgets.QDialog.__init__(self, parent)
        self.setObjectName("dialog")
        self.resize(326, 160)
        self.buttonBox = QtWidgets.QDialogButtonBox(self)
        self.buttonBox.setGeometry(QtCore.QRect(150, 120, 156, 23))
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel
                                          | QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.label = QtWidgets.QLabel(self)
        self.label.setGeometry(QtCore.QRect(20, 30, 141, 16))
        self.label.setObjectName("label")
        self.label_2 = QtWidgets.QLabel(self)
        self.label_2.setGeometry(QtCore.QRect(20, 70, 121, 16))
        self.label_2.setObjectName("label_2")

        self.translateUi(self)
        self.buttonBox.accepted.connect(self.accept)
        self.buttonBox.rejected.connect(self.reject)
        QtCore.QMetaObject.connectSlotsByName(self)
    def __init__(self, parent=None):
        super().__init__(parent)
        self.setWindowTitle("Add peer")

        self.buttonBox = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel)
        self.buttonBox.accepted.connect(self.working_click)
        self.buttonBox.rejected.connect(self.reject)

        tx_layout = QtWidgets.QFormLayout()

        self.peer_address = QtWidgets.QLineEdit()

        self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setEnabled(False)
        self.peer_address.textChanged.connect(self.allowButton)

        self.setWindowModality(QtCore.Qt.ApplicationModal)
        tx_layout.addRow("Adress of receiver: ", self.peer_address)

        tx_layout.addWidget(self.buttonBox)
        self.setLayout(tx_layout)
Beispiel #23
0
    def __init__(self, projects, *args, **kwargs):
        super(OTIOProjectSelect, self).__init__(*args, **kwargs)
        self.setWindowTitle('Please select active project')
        self.layout = qw.QVBoxLayout()

        self.label = qw.QLabel(
            'Unable to determine which project to import sequence to.\n'
            'Please select one.')
        self.layout.addWidget(self.label)

        self.projects = qw.QComboBox()
        self.projects.addItems(map(lambda p: p.name(), projects))
        self.layout.addWidget(self.projects)

        QBtn = qw.QDialogButtonBox.Ok | qw.QDialogButtonBox.Cancel
        self.buttonBox = qw.QDialogButtonBox(QBtn)
        self.buttonBox.accepted.connect(self.accept)
        self.buttonBox.rejected.connect(self.reject)

        self.layout.addWidget(self.buttonBox)
        self.setLayout(self.layout)
Beispiel #24
0
 def createResultDialog(self, result):
     dialog = QtWidgets.QDialog()
     layout = QtWidgets.QVBoxLayout()
     dialog.resize(180, 120)
     label = QtWidgets.QLabel(dialog)
     label.setFixedWidth(120)
     label.setGeometry(QtCore.QRect(50, 30, 67, 17))
     buttonBox = QtWidgets.QDialogButtonBox(dialog)
     buttonBox.setGeometry(QtCore.QRect(40, 70, 81, 25))
     buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Ok)
     buttonBox.accepted.connect(dialog.close)
     dialog.setWindowTitle("Result")
     label.setText(result)
     label.setWordWrap(True)
     label.adjustSize()
     layout.addWidget(label)
     layout.addWidget(buttonBox)
     dialog.adjustSize()
     dialog.setLayout(layout)
     self.resultForm = dialog
     self.resultForm.show()
    def setupUi(self, ExcelSelectionDialog):
        ExcelSelectionDialog.setObjectName("ExcelSelectionDialog")
        ExcelSelectionDialog.resize(272, 229)
        ExcelSelectionDialog.setMaximumSize(QtCore.QSize(272, 229))
        ExcelSelectionDialog.setModal(True)
        self.verticalLayout = QtWidgets.QVBoxLayout(ExcelSelectionDialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.sheets_list = QtWidgets.QListWidget(ExcelSelectionDialog)
        self.sheets_list.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.sheets_list.setObjectName("sheets_list")
        self.verticalLayout.addWidget(self.sheets_list)
        self.buttonBox = QtWidgets.QDialogButtonBox(ExcelSelectionDialog)
        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(ExcelSelectionDialog)
        self.buttonBox.accepted.connect(ExcelSelectionDialog.accept)
        self.buttonBox.rejected.connect(ExcelSelectionDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(ExcelSelectionDialog)
Beispiel #26
0
 def __init__(self, parent=None, value=None, qty=None):
     super().__init__(parent)
     self.value = value
     self.qty = qty
     #  self.second = QtWidgets.QLineEdit(self)
     self.setWindowTitle("изменить кол-во")
     buttonBox = QtWidgets.QDialogButtonBox(
         QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel,
         self)
     layout = QtWidgets.QVBoxLayout(self)
     text = QtWidgets.QLabel(self.value)
     layout.addWidget(text)
     self.box = QtWidgets.QSpinBox(self)
     self.box.setMaximum(int(self.qty))
     if int(self.qty) > 0:
         self.box.setMinimum(1)
     self.box.setValue(int(1))
     layout.addWidget(self.box)
     layout.addWidget(buttonBox)
     buttonBox.accepted.connect(self.accept)
     buttonBox.rejected.connect(self.reject)
Beispiel #27
0
    def __init__(self, parent=None):
        super().__init__(parent)
        self.setWindowTitle("Database linking")

        self.db_label = QtWidgets.QLabel()
        self.label_choices = []
        self.grid_box = QtWidgets.QGroupBox("Database links:")
        self.grid = QtWidgets.QGridLayout()
        self.grid_box.setLayout(self.grid)

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

        layout = QtWidgets.QVBoxLayout()
        layout.addWidget(self.db_label)
        layout.addWidget(self.grid_box)
        layout.addWidget(self.buttons)
        self.setLayout(layout)
Beispiel #28
0
    def setupUi(self):
        verticalLayout = getConfiguredLayout(LayoutType.VERTICAL.value,
                                             parent=self)
        horizontalLayout = getConfiguredLayout(LayoutType.HORIZONTAL.value,
                                               margins=[0])

        label = QtWidgets.QLabel(self)
        label.setText("name : ")
        horizontalLayout.addWidget(label)

        self._nameLeagueEdit = QtWidgets.QLineEdit(self)
        horizontalLayout.addWidget(self._nameLeagueEdit)
        verticalLayout.addLayout(horizontalLayout)

        buttonBox = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel,
            parent=self)
        buttonBox.accepted.connect(self.accept)
        buttonBox.rejected.connect(self.reject)

        verticalLayout.addWidget(buttonBox)
Beispiel #29
0
    def __init__(self, model, view, *args):

        self.model = model
        self.view = view
        self.buttonBox = None

        QtWidgets.QDialog.__init__(self, self.view)

        self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
        self.setSizePolicy(QtWidgets.QSizePolicy.Expanding,
                           QtWidgets.QSizePolicy.Expanding)

        self.set_up(*args)

        self.setWindowTitle("About CeraMatch")

        self.buttonBox = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Ok, QtCore.Qt.Horizontal)
        self.buttonBox.accepted.connect(self.accept)
        QtWidgets.QDialog.layout(self).addWidget(self.buttonBox)
        self.adjustSize()
Beispiel #30
0
    def __init__(self, procSearch, parent=None):
        QtWidgets.QDialog.__init__(self, parent)
        layout = QtWidgets.QVBoxLayout(self)

        self.setModal(True)
        self.setFixedWidth(500)
        self.setWindowTitle("Unbook and kill frames?")

        self.__procSearch = procSearch
        self.__procs = opencue.api.getProcs(**procSearch.options)
        self.__amount = len(self.__procs)

        if self.__amount == 1:
            msg = "Unbook and kill this %d matching frame?"
        else:
            msg = "Unbook and kill these %d matching frames?"
        __descriptionLabel = QtWidgets.QLabel(msg % self.__amount, self)

        # Show list of jobs selected
        self.__jobList = QtWidgets.QTextEdit(self)
        self.__jobList.setText("\n".join([
            "%s %s" % (proc.data.job_name, proc.data.frame_name)
            for proc in self.__procs
        ]))
        self.__jobList.setReadOnly(True)
        self.__jobList.setSizePolicy(
            QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                  QtWidgets.QSizePolicy.Maximum))

        self.__buttons = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel,
            QtCore.Qt.Horizontal, self)

        layout.addWidget(__descriptionLabel)
        layout.addWidget(self.__jobList)
        layout.addWidget(self.__buttons)

        # pylint: disable=no-member
        self.__buttons.accepted.connect(self.accept)
        self.__buttons.rejected.connect(self.reject)