示例#1
0
 def init_form(self):
     control_path = tools.getFileInSameDirectory(__file__, "fileInput.ui")
     self._form = uic.loadUi(control_path)
     self._form.label.setText(self._label)
     self._form.pushButton.clicked.connect(self.click)
     self.form.lineEdit.editingFinished.connect(self.finishEditing)
     self._form.pushButton.setIcon(conf.PYFORMS_ICON_FILE_OPEN)
 def init_form(self):
     control_path = tools.getFileInSameDirectory(__file__, "number.ui")
     self._form = uic.loadUi(control_path)
     self.min = self._min
     self.max = self._max
     self.label = self._label
     self.value = self._value
     self.form.label.setAccessibleName('ControlNumber-label')
     self.form.spinBox.valueChanged.connect(self.update_event)
    def init_form(self):
        control_path = tools.getFileInSameDirectory(__file__, "sliderInput.ui")
        self._form = uic.loadUi(control_path)
        self._form.label.setText(self._label)
        self.form.label.setAccessibleName('ControlSlider-label')

        self._form.horizontalSlider.setMinimum(self._min)
        self._form.horizontalSlider.setMaximum(self._max)
        self._form.horizontalSlider.setValue(self._value)
示例#4
0
    def init_form(self):
        control_path = tools.getFileInSameDirectory(__file__, "textArea.ui")
        self._form = uic.loadUi(control_path)
        self._form.label.setText(self._label)
        if self._value:
            self._form.plainTextEdit.setPlainText(str(self._value))

        if not self._label or len(self._label) == 0:
            self.form.label.hide()

        super(ControlTextArea, self).init_form()
        self.form.plainTextEdit.textChanged.connect(self.finishEditing)
示例#5
0
    def init_form(self):
        control_path = tools.getFileInSameDirectory(__file__, "tree.ui")
        self._form = uic.loadUi(control_path)

        self._form.label.setText(self._label)

        self._form.listWidget.itemChanged.connect(self.item_changed)

        self._form.listWidget.itemSelectionChanged.connect(
            self.__itemSelectionChanged)

        if self.help: self.form.setToolTip(self.help)
    def init_form(self):
        control_path = tools.getFileInSameDirectory(__file__, "checkbox.ui")
        self._form = uic.loadUi(control_path)
        self._form.checkBox.setText(self._label)
        self._form.checkBox.stateChanged.connect(self.__checkedToggle)

        if self._value and self._value != '':
            self._form.checkBox.setCheckState(QtCore.Qt.Checked)
        else:
            self._form.checkBox.setCheckState(QtCore.Qt.Unchecked)

        if self.help: self.form.setToolTip(self.help)
 def init_form(self):
     control_path = tools.getFileInSameDirectory(__file__, "label.ui")
     self._form = uic.loadUi(control_path)
     self._form.label.setText(self._label)