Example #1
0
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(333, 136)
        self.verticalLayout = QtWidgets.QVBoxLayout(Form)
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.label = QtWidgets.QLabel(Form)
        self.label.setObjectName("label")
        self.horizontalLayout_2.addWidget(self.label)
        self.Min_SP = QtWidgets.QDoubleSpinBox(Form)
        self.Min_SP.setDecimals(3)
        self.Min_SP.setMaximum(1.0)
        self.Min_SP.setSingleStep(0.001)
        self.Min_SP.setObjectName("Min_SP")
        self.horizontalLayout_2.addWidget(self.Min_SP)
        self.Min_Slider = QtWidgets.QSlider(Form)
        self.Min_Slider.setMaximum(1000)
        self.Min_Slider.setOrientation(QtCore.Qt.Horizontal)
        self.Min_Slider.setObjectName("Min_Slider")
        self.horizontalLayout_2.addWidget(self.Min_Slider)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.label_2 = QtWidgets.QLabel(Form)
        self.label_2.setObjectName("label_2")
        self.horizontalLayout.addWidget(self.label_2)
        self.Max_SP = QtWidgets.QDoubleSpinBox(Form)
        self.Max_SP.setDecimals(3)
        self.Max_SP.setMaximum(1.0)
        self.Max_SP.setSingleStep(0.001)
        self.Max_SP.setProperty("value", 0.015)
        self.Max_SP.setObjectName("Max_SP")
        self.horizontalLayout.addWidget(self.Max_SP)
        self.Max_Slider = QtWidgets.QSlider(Form)
        self.Max_Slider.setMaximum(1000)
        self.Max_Slider.setOrientation(QtCore.Qt.Horizontal)
        self.Max_Slider.setObjectName("Max_Slider")
        self.horizontalLayout.addWidget(self.Max_Slider)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.Vis_BTN = QtWidgets.QPushButton(Form)
        self.Vis_BTN.setObjectName("Vis_BTN")
        self.verticalLayout.addWidget(self.Vis_BTN)
        self.Min_Label = QtWidgets.QLabel(Form)
        self.Min_Label.setAlignment(QtCore.Qt.AlignCenter)
        self.Min_Label.setObjectName("Min_Label")
        self.verticalLayout.addWidget(self.Min_Label)
        self.Max_Label = QtWidgets.QLabel(Form)
        self.Max_Label.setAlignment(QtCore.Qt.AlignCenter)
        self.Max_Label.setObjectName("Max_Label")
        self.verticalLayout.addWidget(self.Max_Label)
        spacerItem = QtWidgets.QSpacerItem(20, 40,
                                           QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
    def __init__(self,**kwargs):
        super(GroceryItemWidget,self).__init__()
        self.note = ''

        # Data
        self.billingActions = []

        # Widget Construction
        self.lblItemName = QtWidgets.QLabel('Item Name:')
        self.uiItemName = QtWidgets.QLineEdit()
        self.lblPrice = QtWidgets.QLabel('Price:')
        self.uiPrice = QtWidgets.QDoubleSpinBox()
        self.lblCRV = QtWidgets.QLabel('CRV:')
        self.uiCRV = QtWidgets.QDoubleSpinBox()     
        self.uiBillTo = QtWidgets.QPushButton('Add Bill Recipient:')
        self.uiBillToMenu = QtWidgets.QMenu()
        self.lblBillist = QtWidgets.QLabel()
        self.uiTaxable = QtWidgets.QCheckBox('Taxable')
        self.uiEditNote = QtWidgets.QPushButton()

        # Widget settings
        self.uiBillTo.setMenu(self.uiBillToMenu)
        for k in sorted(BillTo.keys()):
            action = QtWidgets.QAction(BillTo[k],self)
            action.setCheckable(True)
            action.triggered.connect(self.updateBillToList)
            self.uiBillToMenu.addAction(action)
            self.billingActions.append(action)
        self.uiEditNote.setIcon(StyleUtils.getIcon('edit'))
        self.uiEditNote.setToolTip('View/Edit Notes')

        # Layout Creation
        self.layMain = QtWidgets.QHBoxLayout()

        for widge in [
            self.lblItemName,
            self.uiItemName,
            self.lblPrice,
            self.uiPrice,
            self.lblCRV,
            self.uiCRV,
            self.uiTaxable,
            self.uiBillTo,
            self.lblBillist,
            self.uiEditNote
        ]:
            self.layMain.addWidget(widge)

        self.setLayout(self.layMain)

        self.uiItemName.textEdited.connect(self.itemUpdated.emit)
        self.uiPrice.valueChanged.connect(self.itemUpdated.emit)
        self.uiCRV.valueChanged.connect(self.itemUpdated.emit)
        self.uiTaxable.stateChanged.connect(self.itemUpdated.emit)
        self.uiEditNote.clicked.connect(self.addNote)
Example #3
0
 def addSupplyDropSetRow(self):
     """ creates and sets up a new row for a Set on the sdConfigTable """
     data = {"type": "set"}
     rowId = self.sdConfigTable.addRow(data=data)
     row = [
         QtWid.QLabel("New Item Set :"),
         QtWid.QLabel("  "),
         QtWid.QDoubleSpinBox(),
         QtWid.QSpinBox(),
         QtWid.QSpinBox(),
         QtWid.QLabel("  "),
         QtWid.QLabel("  "),
         QtWid.QLabel("  "),
         QtWid.QLabel("  "),
         QtWid.QPushButton("DEL"),
     ]
     row[0].setMinimumWidth(130)
     row[1].setMinimumWidth(200)
     row[2].setValue(30.0)
     row[2].setMinimum(0.01)
     row[2].setMaximum(100.0)
     row[3].setValue(1.0)
     row[4].setValue(1.0)
     row[9].clicked.connect(partial(self.sdConfigTable.removeRow, rowId))
     self.sdConfigTable.addWidgetToRow(rowId, row, 26)
Example #4
0
    def initialize(self):
        layout = QtWidgets.QVBoxLayout()
        self.setLayout(layout)

        self.edit = QtWidgets.QLineEdit()
        self.label = QtWidgets.QLabel()
        self.button = QtWidgets.QPushButton("set selection")
        layout.addWidget(self.edit)
        layout.addWidget(self.label)
        layout.addWidget(self.button)

        self.button.clicked.connect(self.change_selection)
        self.edit.setText(lambda: self.state.text)
        self.edit.setSelection(lambda: (self.state.start, self.state.end))
        self.label.setText(lambda: "message is %s" % self.state.text)

        self.spin = QtWidgets.QSpinBox(self)
        self.label = QtWidgets.QLabel()
        layout.addWidget(self.spin)
        layout.addWidget(self.label)
        self.spin.setValue(lambda: self.state.num)
        self.label.setText(lambda: "num is %s" % self.state.num)
        self.spin = QtWidgets.QDoubleSpinBox(self)
        self.label = QtWidgets.QLabel()
        layout.addWidget(self.spin)
        layout.addWidget(self.label)
        self.spin.setValue(lambda: self.state.val)
        self.label.setText(lambda: "val is %s" % self.state.val)
Example #5
0
    def draw(self):
        upperLayout = QtWidgets.QHBoxLayout()
        upperLayout.setContentsMargins(0, 0, 0, 0)
        # upperLayout.setSpacing(0)

        self.label = QtWidgets.QLabel(self.label, self)
        self.label.setMinimumWidth(left_pad)
        self.label.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
        if self.toolTip:
            self.label.setToolTip(self.toolTip)

        self.lineEdit = QtWidgets.QDoubleSpinBox(self)
        self.lineEdit.setEnabled(self.enabled)
        self.lineEdit.setReadOnly(self.readOnly)
        self.lineEdit.setSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                    QtWidgets.QSizePolicy.Minimum)

        upperLayout.addWidget(self.label)
        upperLayout.addWidget(self.lineEdit)

        self.setLayout(upperLayout)

        # Chain signals out with property name and value
        self.lineEdit.editingFinished.connect(lambda: self.valueChanged.emit(
            self.label.text(), self.lineEdit.value()))
Example #6
0
 def addSupplyDropItemRow(self):
     """ creates and sets up a new row for an Item on the sdConfigTable """
     data = {"type": "item"}
     rowId = self.sdConfigTable.addRow(data=data)
     row = [
         QtWid.QComboBox(),
         QtWid.QComboBox(),
         QtWid.QDoubleSpinBox(),
         QtWid.QSpinBox(),
         QtWid.QSpinBox(),
         QtWid.QDoubleSpinBox(),
         QtWid.QDoubleSpinBox(),
         QtWid.QComboBox(),
         QtWid.QDoubleSpinBox(),
         QtWid.QPushButton("DEL"),
     ]
     row[0].addItems(ITEMS.keys())
     row[0].currentIndexChanged.connect(
         partial(self.toggleSupplyDropCategory, rowId))
     row[0].setMinimumWidth(130)
     row[1].setMinimumWidth(200)
     row[2].setValue(30.0)
     row[2].setMinimum(0.01)
     row[2].setMaximum(100.0)
     row[3].setValue(1.0)
     row[3].setMaximum(10000.0)
     row[4].setValue(1.0)
     row[4].setMaximum(10000.0)
     row[5].setValue(1.0)
     row[6].setValue(1.0)
     row[7].addItems(BOOL_OPTIONS)
     row[7].setCurrentIndex(1)
     row[8].setValue(0.3)
     row[2].setMaximumWidth(63)
     row[3].setMaximumWidth(63)
     row[4].setMaximumWidth(63)
     row[5].setMaximumWidth(63)
     row[6].setMaximumWidth(63)
     row[7].setMaximumWidth(80)
     row[8].setMaximumWidth(63)
     row[9].clicked.connect(partial(self.sdConfigTable.removeRow, rowId))
     self.sdConfigTable.addWidgetToRow(rowId, row, 26)
     self.toggleSupplyDropCategory(rowId)
Example #7
0
 def addDinoToSpawn(self):
     """ Sets up a new Dino row that will be added to the SpawnZone above it """
     data = {"type": "dino"}
     rowId = self.cdsConfigTable.addRow(data=data)
     row = [
         QtWid.QLabel("  "),
         QtWid.QLineEdit(),
         QtWid.QComboBox(),
         QtWid.QDoubleSpinBox(),
         QtWid.QDoubleSpinBox(),
         QtWid.QPushButton("DEL"),
     ]
     row[1].setPlaceholderText("UniqueNameForThisDino")
     row[2].addItems(CREATURES.keys())
     row[3].setMaximum(99999)
     row[4].setMaximum(100)
     row[4].setSingleStep(0.01)
     row[5].clicked.connect(partial(self.cdsConfigTable.removeRow, rowId))
     self.cdsConfigTable.addWidgetToRow(rowId, row, 26)
Example #8
0
 def __init__(self, parent, value, *args, **kwargs):
     super(FloatWidget, self).__init__(parent, value, *args, **kwargs)
     self.setLayout(QtWidgets.QHBoxLayout(self))
     self.layout().setContentsMargins(0, 0, 0, 0)
     self.spinbox = QtWidgets.QDoubleSpinBox(self)
     self.spinbox.setMinimum(-16777215)
     self.spinbox.setMaximum(16777215)
     self.spinbox.setValue(value if value is not None else 0)
     self.layout().addWidget(self.spinbox)
     if self.plug is not None:
         self.spinbox.valueChanged.connect(self.set_plug_value)
Example #9
0
    def __init__(self, theAttr, singleStep=.1, precision=2):
        super(spinnerWidget, self).__init__()
        self.theAttr = theAttr
        self.theSpinner = QtWidgets.QDoubleSpinBox(self)
        self.theSpinner.setRange(-16777214, 16777215)
        self.theSpinner.setSingleStep(singleStep)
        self.theSpinner.setDecimals(precision)

        self.theSpinner.move(0, 0)
        #self.setMinimumWidth(50)
        self.createWidget(singleStep=singleStep, precision=precision)
        self.doConnectAttrSpinner(theAttr)
    def BuildUI(self):
        layout = QtWidgets.QVBoxLayout(self)

        gearLabel = QtWidgets.QLabel("Gear Creator")
        gearLabel.setFont(QtGui.QFont("Times", weight = QtGui.QFont.Bold))
        layout.addWidget(gearLabel)

        createBtn = QtWidgets.QPushButton("Create Gear")
        createBtn.clicked.connect(self.CreateGear)
        layout.addWidget(createBtn)

        teethBox = QtWidgets.QGroupBox("Teeth")
        teethHLayout = QtWidgets.QHBoxLayout()

        self.teethSlider = QtWidgets.QSlider(QtCore.Qt.Horizontal)
        self.teethSlider.setMinimum(5)
        self.teethSlider.setMaximum(30)
        self.teethSlider.setValue(10)
        self.teethSlider.setSingleStep(1)
        self.teethSlider.valueChanged.connect(self.ModifyTeeth)
        teethHLayout.addWidget(self.teethSlider)

        self.teethNumber = QtWidgets.QLabel("10")
        teethHLayout.addWidget(self.teethNumber)

        resetbtnT = QtWidgets.QPushButton("Reset")
        resetbtnT.clicked.connect(self.ResetTeeth)
        teethHLayout.addWidget(resetbtnT)

        teethBox.setLayout(teethHLayout)
        layout.addWidget(teethBox)

        lengthBox = QtWidgets.QGroupBox("Length")
        lenghtHLayout = QtWidgets.QHBoxLayout()

        self.lengthSpinBox = QtWidgets.QDoubleSpinBox()
        self.lengthSpinBox.setMinimum(0.05)
        self.lengthSpinBox.setMaximum(1)
        self.lengthSpinBox.setValue(0.3)
        self.lengthSpinBox.setSingleStep(0.01)
        self.lengthSpinBox.valueChanged.connect(self.ModifyLength)
        lenghtHLayout.addWidget(self.lengthSpinBox)

        resetbtnL = QtWidgets.QPushButton("Reset")
        resetbtnL.clicked.connect(self.ResetLength)
        lenghtHLayout.addWidget(resetbtnL)

        lengthBox.setLayout(lenghtHLayout)
        layout.addWidget(lengthBox)

        setBtn = QtWidgets.QPushButton("Set Gear")
        setBtn.clicked.connect(self.Set)
        layout.addWidget(setBtn)
Example #11
0
    def _setupUI(self):
        self._layout = QtWidgets.QHBoxLayout()
        self._layout.setContentsMargins(0, 0, 0, 0)
        self.setLayout(self._layout)

        self._slider = AutoRangeSlider(QtCore.Qt.Horizontal)
        self._layout.addWidget(self._slider)

        self._doubleSpinBox = QtWidgets.QDoubleSpinBox()
        self._doubleSpinBox.setMaximum(self._maximum if self._clamp else 1e9)
        self._doubleSpinBox.setMinimum(self._minimum)
        self._layout.addWidget(self._doubleSpinBox)
Example #12
0
    def createEditor(self, parent, option, index):
        data = index.data(QtCore.Qt.UserRole)
        wid = QtWidgets.QWidget(parent)
        wid.setLayout(QtWidgets.QHBoxLayout(parent))
        wid.layout().setContentsMargins(0, 0, 0, 0)
        wid.layout().setSpacing(0)

        start = data['start']
        end = data['end']
        step = data['step']

        if isinstance(start, float):
            start_spinbox = QtWidgets.QDoubleSpinBox(wid)
        else:
            start_spinbox = QtWidgets.QSpinBox(wid)

        if isinstance(end, float):
            end_spinbox = QtWidgets.QDoubleSpinBox(wid)
        else:
            end_spinbox = QtWidgets.QSpinBox(wid)

        if isinstance(step, float):
            step_spinbox = QtWidgets.QDoubleSpinBox(wid)
        else:
            step_spinbox = QtWidgets.QSpinBox(wid)

        start_spinbox.setRange(-16777215, 16777215)
        end_spinbox.setRange(-16777215, 16777215)
        step_spinbox.setRange(-16777215, 16777215)
        start_spinbox.setValue(start)
        end_spinbox.setValue(end)
        step_spinbox.setValue(step)
        wid.layout().addWidget(start_spinbox)
        wid.layout().addWidget(end_spinbox)
        wid.layout().addWidget(step_spinbox)
        return wid
Example #13
0
    def __init__(self,
                 orientation=QtCore.Qt.Horizontal,
                 height=20,
                 value=0,
                 min_value=-10000000,
                 max_value=10000000,
                 user_range_min=0,
                 user_range_max=100,
                 *args,
                 **kwargs):
        super(FloatFieldSlider, self).__init__(*args, **kwargs)

        # Set up size of FloatFieldSlider widget
        self.setSizePolicy(MTool.FixedHeightPolicy())
        self.setObjectName("FloatFieldSlider")

        # Create float field
        self.float_field = QtWidgets.QDoubleSpinBox()
        self.float_field.setRange(min_value, max_value)
        self.float_field.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)
        self.float_field.setFocusPolicy(QtCore.Qt.StrongFocus)
        self.float_field.setSizePolicy(MTool.FixedHeightPolicy())
        self.float_field.setMinimumSize(QtCore.QSize(55, 0))
        self.float_field.setFixedHeight(height)
        self.float_field.setDecimals(3)
        self.float_field.setObjectName("float_field")
        self.float_field.setValue(value)

        # Create slider
        slider_size_policy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        slider_size_policy.setHorizontalStretch(0)
        slider_size_policy.setVerticalStretch(0)

        self.float_slider = HistoryCircleSlider(value=value,
                                                user_range_min=user_range_min,
                                                user_range_max=user_range_max)
        self.float_slider.setSizePolicy(slider_size_policy)
        self.float_slider.setFocusPolicy(QtCore.Qt.StrongFocus)
        self.float_slider.setObjectName("float_slider")

        slidersLayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight)
        slidersLayout.addWidget(self.float_field)
        slidersLayout.addWidget(self.float_slider)
        self.setLayout(slidersLayout)

        self.setContentsMargins(0, 0, 0, 0)
        slidersLayout.setContentsMargins(0, 0, 0, 0)
Example #14
0
 def __init__(self, parent, sim):
     super().__init__(parent)
     self.sim = sim
     self.setMinimumSize(200, 100)
     box = QtWidgets.QGridLayout()
     self.spins = []
     for j in range(args['YBLOCKS']):
         for i in range(args['XBLOCKS']):
             spin = QtWidgets.QDoubleSpinBox()
             spin.setRange(PARAM_MIN, PARAM_MAX)
             spin.setSingleStep((PARAM_MAX - PARAM_MIN) / PARAM_STEPS)
             spin.setValue(PARAM_MIN)
             self.spins.append(spin)
             box.addWidget(spin, j, i)
             spin.valueChanged.connect(parent.solve_update)
     self.setLayout(box)
Example #15
0
    def create(self):
        if isinstance(self, Float):
            widget = QtWidgets.QDoubleSpinBox()
            widget.setMinimum(self._data.get("min", 0.0))
            widget.setMaximum(self._data.get("max", 99.99))
        else:
            widget = QtWidgets.QSpinBox()
            widget.setMinimum(self._data.get("min", 0))
            widget.setMaximum(self._data.get("max", 99))

        widget.editingFinished.connect(self.changed.emit)
        self._read = lambda: widget.value()
        self._write = lambda value: widget.setValue(value)

        if self["default"] != self.default:
            self._write(self["default"])

        return widget
Example #16
0
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(474, 217)
        Form.setStyleSheet("font: bold 18pt \"Microsoft YaHei\";")
        self.verticalLayout = QtWidgets.QVBoxLayout(Form)
        self.verticalLayout.setObjectName("verticalLayout")
        self.Help_Label = QtWidgets.QLabel(Form)
        self.Help_Label.setObjectName("Help_Label")
        self.verticalLayout.addWidget(self.Help_Label)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.label = QtWidgets.QLabel(Form)
        self.label.setObjectName("label")
        self.horizontalLayout.addWidget(self.label)
        self.Slider = QtWidgets.QSlider(Form)
        self.Slider.setMaximum(100)
        self.Slider.setSingleStep(1)
        self.Slider.setPageStep(10)
        self.Slider.setProperty("value", 5)
        self.Slider.setOrientation(QtCore.Qt.Horizontal)
        self.Slider.setObjectName("Slider")
        self.horizontalLayout.addWidget(self.Slider)
        self.SP = QtWidgets.QDoubleSpinBox(Form)
        self.SP.setFrame(False)
        self.SP.setProperty("value", 0.05)
        self.SP.setObjectName("SP")
        self.SP.setMaximum(1)
        self.SP.setSingleStep(0.01)
        self.horizontalLayout.addWidget(self.SP)
        self.Unlock_BTN = QtWidgets.QPushButton(Form)
        font = QtGui.QFont()
        font.setFamily("Microsoft YaHei")
        font.setPointSize(18)
        font.setWeight(75)
        font.setItalic(False)
        font.setBold(True)
        self.Unlock_BTN.setFont(font)
        self.Unlock_BTN.setObjectName("Unlock_BTN")

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
Example #17
0
    def create(self):
        if isinstance(self, Float):
            widget = QtWidgets.QDoubleSpinBox()
        else:
            widget = QtWidgets.QSpinBox()

        if self._data.get("minimum"):
            widget.setMinimum(self._data.get("minimum"))

        if self._data.get("maximum"):
            widget.setMaximum(self._data.get("maximum"))

        widget.editingFinished.connect(self.changed.emit)

        self._read = lambda: widget.value()
        self._write = lambda value: widget.setValue(float(value))

        if self["default"] is not None:
            self._write(self["default"])

        return widget
Example #18
0
    def __init__(self,
                 node_name,
                 attr_names,
                 height=20,
                 min_value=-10000000,
                 max_value=10000000,
                 *args,
                 **kwargs):
        super(FloatFieldVector, self).__init__(*args, **kwargs)

        # Set up size of FloatFieldSlider widget
        self.setSizePolicy(MTool.FixedHeightPolicy())
        self.setObjectName("FloatFieldVector")

        # Create main layout
        main_layout = QtWidgets.QHBoxLayout(self)
        self.setContentsMargins(0, 0, 0, 0)
        main_layout.setContentsMargins(0, 0, 0, 0)

        # Create label
        self.attr_label = MLabel.AttrLabel(self.tr(attr_names[0]))
        # Add to layout
        main_layout.addWidget(self.attr_label)

        # Create float field
        self.float_fields = []
        for attr_name in attr_names:
            float_field = QtWidgets.QDoubleSpinBox()
            float_field.setRange(min_value, max_value)
            float_field.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)
            float_field.setFocusPolicy(QtCore.Qt.StrongFocus)
            float_field.setSizePolicy(MTool.FixedHeightPolicy())
            float_field.setMinimumSize(QtCore.QSize(55, 0))
            float_field.setFixedHeight(height)
            float_field.setDecimals(3)
            float_field.setObjectName("float_field")
            float_field.setValue(0)
            main_layout.addWidget(float_field)

            self.float_fields.append(float_field)
Example #19
0
    def initialize(self):
        layout = QtWidgets.QVBoxLayout()
        self.setLayout(layout)

        self.edit = QtWidgets.QLineEdit()
        self.label = QtWidgets.QLabel()
        self.button = QtWidgets.QPushButton("change Text")
        layout.addWidget(self.edit)
        layout.addWidget(self.label)
        layout.addWidget(self.button)

        self.button.clicked.connect(lambda: self.state.text >> Set("asd"))
        self.edit.setText(lambda: self.state.text)
        self.label.setText(lambda: "message is %s" % self.state.text)

        event_hook.add_hook(self.edit, QtCore.QEvent.FocusIn,
                            lambda: self.state.color >> Set("red"))
        event_hook.add_hook(self.edit, QtCore.QEvent.FocusOut,
                            lambda: self.state.color >> Set("black"))
        self.label.setStyleSheet(lambda: "color:%s" % self.state.color)

        self.spin = QtWidgets.QSpinBox(self)
        self.label = QtWidgets.QLabel()
        layout.addWidget(self.spin)
        layout.addWidget(self.label)
        self.spin.setValue(lambda: self.state.num)
        self.label.setText(lambda: "num is %s" % self.state.num)

        self.spin >> event_hook("HoverEnter",
                                lambda: self.state.spin_color >> Set("pink"))
        self.spin >> event_hook("HoverLeave",
                                lambda: self.state.spin_color >> Set("blue"))
        self.label.setStyleSheet(lambda: "color:%s" % self.state.spin_color)

        self.spin = QtWidgets.QDoubleSpinBox(self)
        self.label = QtWidgets.QLabel()
        layout.addWidget(self.spin)
        layout.addWidget(self.label)
        self.spin.setValue(lambda: self.state.val)
        self.label.setText(lambda: "val is %s" % self.state.val)
Example #20
0
 def create_QDoubleSpinBox(self,
                           ui_name=None,
                           range=None,
                           step=0.1,
                           suffix=None,
                           value=0.0,
                           precision=2,
                           parent=None,
                           co=None):
     spin_box = QtWidgets.QDoubleSpinBox()
     spin_box.setSingleStep(step)
     spin_box.setValue(value)
     spin_box.setDecimals(precision)
     if ui_name:
         spin_box.setObjectName(ui_name)
     if range:
         spin_box.setRange(range[0], range[1])
     if suffix:
         spin_box.setSuffix(suffix)
     if parent:
         self.parent_QtWidgets(parent, spin_box, co=co)
     return spin_box
    def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(498, 226)
        Form.setMaximumSize(QtCore.QSize(16777215, 230))
        self.mainLayout = QtGui.QVBoxLayout(Form)
        # self.mainLayout.setMargin(2)
        self.mainLayout.setSpacing(2)
        self.mainLayout.setObjectName(_fromUtf8("mainLayout"))
        self.delete_this = QtGui.QPushButton(Form)
        self.delete_this.setMinimumSize(QtCore.QSize(25, 25))
        self.delete_this.setMaximumSize(QtCore.QSize(25, 25))
        self.delete_this.setText(_fromUtf8(""))
        self.delete_this.setObjectName(_fromUtf8("delete_this"))
        self.mainLayout.addWidget(self.delete_this)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.label = QtGui.QLabel(Form)
        self.label.setObjectName(_fromUtf8("label"))
        self.horizontalLayout.addWidget(self.label)
        self.attr_name = QtGui.QLineEdit(Form)
        self.attr_name.setMaximumSize(QtCore.QSize(270, 16777215))
        self.attr_name.setObjectName(_fromUtf8("attr_name"))
        self.horizontalLayout.addWidget(self.attr_name)
        self.mainLayout.addLayout(self.horizontalLayout)
        self.gridLayout = QtGui.QGridLayout()
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.random_grayscale = QtGui.QRadioButton(Form)
        self.random_grayscale.setObjectName(_fromUtf8("random_grayscale"))
        self.gridLayout.addWidget(self.random_grayscale, 2, 1, 1, 1)
        self.random_color = QtGui.QRadioButton(Form)
        self.random_color.setChecked(True)
        self.random_color.setObjectName(_fromUtf8("random_color"))
        self.gridLayout.addWidget(self.random_color, 0, 1, 1, 1)
        self.label_2 = QtGui.QLabel(Form)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout.addWidget(self.label_2, 0, 0, 1, 1)
        self.color_picker = QtGui.QPushButton(Form)
        self.color_picker.setText(_fromUtf8(""))
        self.color_picker.setObjectName(_fromUtf8("color_picker"))
        self.gridLayout.addWidget(self.color_picker, 1, 2, 1, 1)
        self.random_color_shades = QtGui.QRadioButton(Form)
        self.random_color_shades.setObjectName(
            _fromUtf8("random_color_shades"))
        self.gridLayout.addWidget(self.random_color_shades, 1, 1, 1, 1)
        self.mainLayout.addLayout(self.gridLayout)
        self.gridLayout_2 = QtGui.QGridLayout()
        self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
        self.label_3 = QtGui.QLabel(Form)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.gridLayout_2.addWidget(self.label_3, 0, 0, 1, 1)
        self.horizontalLayout_3 = QtGui.QHBoxLayout()
        self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_3.addItem(spacerItem)
        self.label_6 = QtGui.QLabel(Form)
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.horizontalLayout_3.addWidget(self.label_6)
        self.min_s_value = QtGui.QDoubleSpinBox(Form)
        self.min_s_value.setMinimumSize(QtCore.QSize(100, 0))
        self.min_s_value.setSingleStep(0.1)
        self.min_s_value.setObjectName(_fromUtf8("min_s_value"))
        self.horizontalLayout_3.addWidget(self.min_s_value)
        self.label_7 = QtGui.QLabel(Form)
        self.label_7.setObjectName(_fromUtf8("label_7"))
        self.horizontalLayout_3.addWidget(self.label_7)
        self.max_s_value = QtGui.QDoubleSpinBox(Form)
        self.max_s_value.setMinimumSize(QtCore.QSize(100, 0))
        self.max_s_value.setSingleStep(0.1)
        self.max_s_value.setProperty("value", 1.0)
        self.max_s_value.setObjectName(_fromUtf8("max_s_value"))
        self.horizontalLayout_3.addWidget(self.max_s_value)
        spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                        QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_3.addItem(spacerItem1)
        self.gridLayout_2.addLayout(self.horizontalLayout_3, 0, 1, 1, 1)
        self.label_4 = QtGui.QLabel(Form)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.gridLayout_2.addWidget(self.label_4, 1, 0, 1, 1)
        self.horizontalLayout_4 = QtGui.QHBoxLayout()
        self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4"))
        spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                        QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_4.addItem(spacerItem2)
        self.label_8 = QtGui.QLabel(Form)
        self.label_8.setObjectName(_fromUtf8("label_8"))
        self.horizontalLayout_4.addWidget(self.label_8)
        self.min_v_value = QtGui.QDoubleSpinBox(Form)
        self.min_v_value.setMinimumSize(QtCore.QSize(100, 0))
        self.min_v_value.setSingleStep(0.1)
        self.min_v_value.setObjectName(_fromUtf8("min_v_value"))
        self.horizontalLayout_4.addWidget(self.min_v_value)
        self.label_9 = QtGui.QLabel(Form)
        self.label_9.setObjectName(_fromUtf8("label_9"))
        self.horizontalLayout_4.addWidget(self.label_9)
        self.max_v_value = QtGui.QDoubleSpinBox(Form)
        self.max_v_value.setMinimumSize(QtCore.QSize(100, 0))
        self.max_v_value.setSingleStep(0.1)
        self.max_v_value.setProperty("value", 1.0)
        self.max_v_value.setObjectName(_fromUtf8("max_v_value"))
        self.horizontalLayout_4.addWidget(self.max_v_value)
        spacerItem3 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                        QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_4.addItem(spacerItem3)
        self.gridLayout_2.addLayout(self.horizontalLayout_4, 1, 1, 1, 1)
        self.mainLayout.addLayout(self.gridLayout_2)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setContentsMargins(0, -1, -1, -1)
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.label_5 = QtGui.QLabel(Form)
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.horizontalLayout_2.addWidget(self.label_5)
        self.primvar_node_name = QtGui.QLineEdit(Form)
        self.primvar_node_name.setMinimumSize(QtCore.QSize(110, 0))
        self.primvar_node_name.setObjectName(_fromUtf8("primvar_node_name"))
        self.horizontalLayout_2.addWidget(self.primvar_node_name)
        self.get_node_name = QtGui.QPushButton(Form)
        self.get_node_name.setObjectName(_fromUtf8("get_node_name"))
        self.horizontalLayout_2.addWidget(self.get_node_name)
        self.create_node = QtGui.QPushButton(Form)
        self.create_node.setObjectName(_fromUtf8("create_node"))
        self.horizontalLayout_2.addWidget(self.create_node)
        self.mainLayout.addLayout(self.horizontalLayout_2)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
Example #22
0
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(356, 25)
        self.horizontalLayout_5 = QtWidgets.QHBoxLayout(Form)
        self.horizontalLayout_5.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.label = QtWidgets.QLabel(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
        self.label.setSizePolicy(sizePolicy)
        self.label.setObjectName("label")
        self.horizontalLayout.addWidget(self.label)
        self.dsbX = QtWidgets.QDoubleSpinBox(Form)
        self.dsbX.setMinimumSize(QtCore.QSize(0, 0))
        self.dsbX.setMaximumSize(QtCore.QSize(80, 16777215))
        self.dsbX.setObjectName("dsbX")
        self.horizontalLayout.addWidget(self.dsbX)
        self.horizontalLayout_5.addLayout(self.horizontalLayout)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.label_2 = QtWidgets.QLabel(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
        self.label_2.setSizePolicy(sizePolicy)
        self.label_2.setObjectName("label_2")
        self.horizontalLayout_2.addWidget(self.label_2)
        self.dsbY = QtWidgets.QDoubleSpinBox(Form)
        self.dsbY.setMinimumSize(QtCore.QSize(0, 0))
        self.dsbY.setMaximumSize(QtCore.QSize(80, 16777215))
        self.dsbY.setObjectName("dsbY")
        self.horizontalLayout_2.addWidget(self.dsbY)
        self.horizontalLayout_5.addLayout(self.horizontalLayout_2)
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.label_3 = QtWidgets.QLabel(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
        self.label_3.setSizePolicy(sizePolicy)
        self.label_3.setObjectName("label_3")
        self.horizontalLayout_3.addWidget(self.label_3)
        self.dsbZ = QtWidgets.QDoubleSpinBox(Form)
        self.dsbZ.setMaximumSize(QtCore.QSize(80, 16777215))
        self.dsbZ.setObjectName("dsbZ")
        self.horizontalLayout_3.addWidget(self.dsbZ)
        self.horizontalLayout_5.addLayout(self.horizontalLayout_3)
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.label_4 = QtWidgets.QLabel(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth())
        self.label_4.setSizePolicy(sizePolicy)
        self.label_4.setObjectName("label_4")
        self.horizontalLayout_4.addWidget(self.label_4)
        self.dsbW = QtWidgets.QDoubleSpinBox(Form)
        self.dsbW.setMaximumSize(QtCore.QSize(80, 16777215))
        self.dsbW.setObjectName("dsbW")
        self.horizontalLayout_4.addWidget(self.dsbW)
        self.horizontalLayout_5.addLayout(self.horizontalLayout_4)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_5.addItem(spacerItem)
        self.pbReset = QtWidgets.QPushButton(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pbReset.sizePolicy().hasHeightForWidth())
        self.pbReset.setSizePolicy(sizePolicy)
        self.pbReset.setMaximumSize(QtCore.QSize(25, 25))
        self.pbReset.setText("")
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/icons/resources/reset.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pbReset.setIcon(icon)
        self.pbReset.setObjectName("pbReset")
        self.horizontalLayout_5.addWidget(self.pbReset)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
Example #23
0
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(281, 96)
        self.horizontalLayout = QtWidgets.QHBoxLayout(Form)
        self.horizontalLayout.setSpacing(7)
        self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setSpacing(2)
        self.gridLayout.setObjectName("gridLayout")
        self.dsbm22 = QtWidgets.QDoubleSpinBox(Form)
        self.dsbm22.setMaximumSize(QtCore.QSize(80, 16777215))
        self.dsbm22.setSingleStep(0.1)
        self.dsbm22.setObjectName("dsbm22")
        self.gridLayout.addWidget(self.dsbm22, 1, 1, 1, 1)
        self.dsbm21 = QtWidgets.QDoubleSpinBox(Form)
        self.dsbm21.setMaximumSize(QtCore.QSize(80, 16777215))
        self.dsbm21.setSingleStep(0.1)
        self.dsbm21.setObjectName("dsbm21")
        self.gridLayout.addWidget(self.dsbm21, 1, 0, 1, 1)
        self.dsbm31 = QtWidgets.QDoubleSpinBox(Form)
        self.dsbm31.setMaximumSize(QtCore.QSize(80, 16777215))
        self.dsbm31.setSingleStep(0.1)
        self.dsbm31.setObjectName("dsbm31")
        self.gridLayout.addWidget(self.dsbm31, 2, 0, 1, 1)
        self.dsbm32 = QtWidgets.QDoubleSpinBox(Form)
        self.dsbm32.setMaximumSize(QtCore.QSize(80, 16777215))
        self.dsbm32.setSingleStep(0.1)
        self.dsbm32.setObjectName("dsbm32")
        self.gridLayout.addWidget(self.dsbm32, 2, 1, 1, 1)
        self.dsbm23 = QtWidgets.QDoubleSpinBox(Form)
        self.dsbm23.setMaximumSize(QtCore.QSize(80, 16777215))
        self.dsbm23.setSingleStep(0.1)
        self.dsbm23.setObjectName("dsbm23")
        self.gridLayout.addWidget(self.dsbm23, 1, 2, 1, 1)
        self.dsbm33 = QtWidgets.QDoubleSpinBox(Form)
        self.dsbm33.setMaximumSize(QtCore.QSize(80, 16777215))
        self.dsbm33.setSingleStep(0.1)
        self.dsbm33.setObjectName("dsbm33")
        self.gridLayout.addWidget(self.dsbm33, 2, 2, 1, 1)
        self.dsbm12 = QtWidgets.QDoubleSpinBox(Form)
        self.dsbm12.setMaximumSize(QtCore.QSize(80, 16777215))
        self.dsbm12.setSingleStep(0.1)
        self.dsbm12.setObjectName("dsbm12")
        self.gridLayout.addWidget(self.dsbm12, 0, 1, 1, 1)
        self.dsbm11 = QtWidgets.QDoubleSpinBox(Form)
        self.dsbm11.setMaximumSize(QtCore.QSize(80, 16777215))
        self.dsbm11.setSingleStep(0.1)
        self.dsbm11.setObjectName("dsbm11")
        self.gridLayout.addWidget(self.dsbm11, 0, 0, 1, 1)
        self.dsbm13 = QtWidgets.QDoubleSpinBox(Form)
        self.dsbm13.setMaximumSize(QtCore.QSize(80, 16777215))
        self.dsbm13.setSingleStep(0.1)
        self.dsbm13.setObjectName("dsbm13")
        self.gridLayout.addWidget(self.dsbm13, 0, 2, 1, 1)
        self.dsbm24 = QtWidgets.QDoubleSpinBox(Form)
        self.dsbm24.setMaximumSize(QtCore.QSize(80, 16777215))
        self.dsbm24.setObjectName("dsbm24")
        self.gridLayout.addWidget(self.dsbm24, 1, 3, 1, 1)
        self.dsbm34 = QtWidgets.QDoubleSpinBox(Form)
        self.dsbm34.setMaximumSize(QtCore.QSize(80, 16777215))
        self.dsbm34.setObjectName("dsbm34")
        self.gridLayout.addWidget(self.dsbm34, 2, 3, 1, 1)
        self.dsbm14 = QtWidgets.QDoubleSpinBox(Form)
        self.dsbm14.setMaximumSize(QtCore.QSize(80, 16777215))
        self.dsbm14.setObjectName("dsbm14")
        self.gridLayout.addWidget(self.dsbm14, 0, 3, 1, 1)
        self.dsbm44 = QtWidgets.QDoubleSpinBox(Form)
        self.dsbm44.setMaximumSize(QtCore.QSize(80, 16777215))
        self.dsbm44.setObjectName("dsbm44")
        self.gridLayout.addWidget(self.dsbm44, 3, 3, 1, 1)
        self.dsbm41 = QtWidgets.QDoubleSpinBox(Form)
        self.dsbm41.setMaximumSize(QtCore.QSize(80, 16777215))
        self.dsbm41.setObjectName("dsbm41")
        self.gridLayout.addWidget(self.dsbm41, 3, 0, 1, 1)
        self.dsbm42 = QtWidgets.QDoubleSpinBox(Form)
        self.dsbm42.setMaximumSize(QtCore.QSize(80, 16777215))
        self.dsbm42.setObjectName("dsbm42")
        self.gridLayout.addWidget(self.dsbm42, 3, 1, 1, 1)
        self.dsbm43 = QtWidgets.QDoubleSpinBox(Form)
        self.dsbm43.setMaximumSize(QtCore.QSize(80, 16777215))
        self.dsbm43.setObjectName("dsbm43")
        self.gridLayout.addWidget(self.dsbm43, 3, 2, 1, 1)
        self.horizontalLayout.addLayout(self.gridLayout)
        spacerItem = QtWidgets.QSpacerItem(40, 20,
                                           QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.pbReset = QtWidgets.QPushButton(Form)
        self.pbReset.setMaximumSize(QtCore.QSize(25, 25))
        self.pbReset.setText("")
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/icons/resources/reset.png"),
                       QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pbReset.setIcon(icon)
        self.pbReset.setObjectName("pbReset")
        self.verticalLayout.addWidget(self.pbReset)
        spacerItem1 = QtWidgets.QSpacerItem(20, 40,
                                            QtWidgets.QSizePolicy.Minimum,
                                            QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem1)
        self.horizontalLayout.addLayout(self.verticalLayout)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
def get_input(title, data, options=FormOptions()):
    """
    Get input from user
    
    If the user accepts the dialog then the current values will be
    written back to the data object.
    Note that for list queries this will change the value type!
    
    Args:
       title (str): Dialog title
       data (dict | OrderedDict): Input data to build tha dialog for
       options(FormOptions): Options to control dialog behavior
    
    Returns:
        bool: Returns True if dialog is accepted, False otherwise
    """
    dialog = QtWidgets.QDialog()
    dialog.setWindowTitle(title)

    layout = QtWidgets.QGridLayout(dialog)
    layout.setContentsMargins(2, 2, 2, 2)
    layout.setSpacing(4)

    widgets = {}

    for row, key in enumerate(data):
        label = QtWidgets.QLabel(key + ':')
        layout.addWidget(label)

        value = data[key]
        if isinstance(value, bool):
            widget = QtWidgets.QCheckBox()
            widget.setChecked(value)
            layout.addWidget(widget, row, 1)
            widgets[key] = widget
        elif isinstance(value, QtGui.QColor):
            widget = ColorSwatchButton()
            widget.set_color(value)
            layout.addWidget(widget, row, 1)
            widgets[key] = widget
        elif isinstance(value, float):
            widget = QtWidgets.QDoubleSpinBox()
            widget.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)
            widget.setMaximum(options.numeric_max)
            widget.setMinimum(options.numeric_min)
            widget.setDecimals(options.numeric_precision)
            widget.setValue(value)
            layout.addWidget(widget, row, 1)
            widgets[key] = widget
        elif isinstance(value, int):
            widget = QtWidgets.QSpinBox()
            widget.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)
            widget.setMaximum(options.numeric_max)
            widget.setMinimum(options.numeric_min)
            widget.setValue(value)
            layout.addWidget(widget, row, 1)
            widgets[key] = widget
        elif isinstance(value, str):
            widget = QtWidgets.QLineEdit(value)
            layout.addWidget(widget, row, 1)
            widgets[key] = widget
        elif isinstance(value, list):
            if options.list_displays_as_radios:
                widget = QtWidgets.QWidget()
                widget_layout = QtWidgets.QHBoxLayout(widget)
                widget_layout.setContentsMargins(2, 2, 2, 2)
                widget_layout.setSpacing(2)

                is_checked = False
                for item in value:
                    button = QtWidgets.QRadioButton(item)
                    widget_layout.addWidget(button)

                    if not is_checked:
                        button.setChecked(True)
                        is_checked = True

                layout.addWidget(widget, row, 1)
                widgets[key] = widget
            else:
                widget = QtWidgets.QComboBox()
                widget.addItems(value)
                layout.addWidget(widget, row, 1)
                widgets[key] = widget
        elif isinstance(value, QtGui.QVector2D) or isinstance(
                value, QtGui.QVector3D):
            widget = QtWidgets.QWidget()
            widget_layout = QtWidgets.QHBoxLayout(widget)
            widget_layout.setContentsMargins(2, 2, 2, 2)
            widget_layout.setSpacing(2)

            x_widget = QtWidgets.QDoubleSpinBox()
            x_widget.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)
            x_widget.setMaximum(options.numeric_max)
            x_widget.setMinimum(options.numeric_min)
            x_widget.setDecimals(options.numeric_precision)
            x_widget.setValue(value.x())

            y_widget = QtWidgets.QDoubleSpinBox()
            y_widget.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)
            y_widget.setMaximum(options.numeric_max)
            y_widget.setMinimum(options.numeric_min)
            y_widget.setDecimals(options.numeric_precision)
            y_widget.setValue(value.y())

            widget_layout.addWidget(x_widget)
            widget_layout.addWidget(y_widget)

            if isinstance(value, QtGui.QVector3D):
                z_widget = QtWidgets.QDoubleSpinBox()
                z_widget.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)
                z_widget.setMaximum(options.numeric_max)
                z_widget.setMinimum(options.numeric_min)
                z_widget.setDecimals(options.numeric_precision)
                z_widget.setValue(value.y())
                widget_layout.addWidget(z_widget)

            layout.addWidget(widget, row, 1)
            widgets[key] = widget
        else:
            raise ValueError(
                'Data of type "{}" is not supported!'.format(value_type))

    button_layout = QtWidgets.QHBoxLayout()
    button_layout.setContentsMargins(2, 2, 2, 2)
    button_layout.setSpacing(2)
    layout.addLayout(button_layout, len(data) + 1, 0, 1, 2)

    ok_button = QtWidgets.QPushButton('Ok')
    ok_button.setDefault(True)
    ok_button.clicked.connect(dialog.accept)
    button_layout.addWidget(ok_button)

    cancel_button = QtWidgets.QPushButton('Cancel')
    cancel_button.clicked.connect(dialog.reject)
    button_layout.addWidget(cancel_button)

    if dialog.exec_() != QtWidgets.QDialog.Accepted:
        dialog.deleteLater()
        return False

    for key in data:
        value = data[key]
        if isinstance(value, bool):
            data[key] = widgets[key].isChecked()
        elif isinstance(value, QtGui.QColor):
            data[key] = widgets[key].color()
        elif isinstance(value, float) or isinstance(value, int):
            data[key] = widgets[key].value()
        elif isinstance(value, str):
            data[key] = widgets[key].text()
        elif isinstance(value, list):
            if options.list_displays_as_radios:
                children = widgets[key].children()
                for index, child in enumerate(children):
                    if not isinstance(child, QtWidgets.QRadioButton):
                        continue

                    if child.isChecked():
                        if options.list_returns_index:
                            data[key] = index
                        else:
                            data[key] = child.text()
            else:
                if options.list_returns_index:
                    data[key] = widgets[key].currentIndex()
                else:
                    data[key] = widgets[key].currentText()
        elif isinstance(value, QtGui.QVector2D):
            children = widgets[key].children()
            data[key] = QtGui.QVector2D(children[1].value(),
                                        children[2].value())
        elif isinstance(value, QtGui.QVector3D):
            children = widgets[key].children()
            data[key] = QtGui.QVector3D(children[1].value(),
                                        children[2].value(),
                                        children[3].value())

    dialog.deleteLater()
    return True
Example #25
0
    def buildUI(self):

        # Layout
        layout = QtWidgets.QGridLayout(self)
        buildingWidget = QtWidgets.QWidget()
        layout.addWidget(buildingWidget)

        # Label - Title
        titleLabel = QtWidgets.QLabel("BUILDING GENERATOR")
        layout.addWidget(titleLabel, 0, 0, 1, 2)

        # Line Break
        line = QtWidgets.QFrame()
        line.setFrameShape(QtWidgets.QFrame.HLine)
        line.setFrameShadow(QtWidgets.QFrame.Sunken)
        layout.addWidget(line, 1, 0, 1, 3)

        # Label - Number of Walls
        numOfWallsLabel = QtWidgets.QLabel("Set Number of Walls")
        layout.addWidget(numOfWallsLabel, 2, 0, 1, 2)

        # LENGTH WIDGETS
        # Label - Length
        lengthLabel = QtWidgets.QLabel("Length")
        layout.addWidget(lengthLabel, 3, 0)

        # NameField - Length
        self.lengthNameField = QtWidgets.QSpinBox()
        self.lengthNameField.setValue(1)
        self.lengthNameField.valueChanged.connect(
            lambda val: self.lengthSlider.setValue(val))
        layout.addWidget(self.lengthNameField, 3, 1)

        # Slider - Length
        self.lengthSlider = QtWidgets.QSlider(
            QtCore.Qt.Horizontal)  # left to right slider
        self.lengthSlider.setMinimum(1)
        self.lengthSlider.setMaximum(100)
        self.lengthSlider.setValue(1)
        self.lengthSlider.setTickPosition(QtWidgets.QSlider.TicksBelow)
        self.lengthSlider.setTickInterval(10)
        self.lengthSlider.valueChanged.connect(
            lambda val: self.lengthNameField.setValue(val))
        layout.addWidget(self.lengthSlider, 3, 2)

        # WIDTH WIDGETS
        # Label - Width
        widthLabel = QtWidgets.QLabel("Width")
        layout.addWidget(widthLabel, 4, 0)

        # NameField - Width
        self.widthNameField = QtWidgets.QSpinBox()
        self.widthNameField.setValue(1)
        self.widthNameField.valueChanged.connect(
            lambda val: self.widthSlider.setValue(val))
        layout.addWidget(self.widthNameField, 4, 1)

        # Slider - Width
        self.widthSlider = QtWidgets.QSlider(
            QtCore.Qt.Horizontal)  # left to right slider
        self.widthSlider.setMinimum(1)
        self.widthSlider.setMaximum(100)
        self.widthSlider.setValue(1)
        self.widthSlider.setTickPosition(QtWidgets.QSlider.TicksBelow)
        self.widthSlider.setTickInterval(10)
        self.widthSlider.valueChanged.connect(
            lambda val: self.widthNameField.setValue(val))
        layout.addWidget(self.widthSlider, 4, 2)

        # FLOORS WIDGETS
        # Label - Floors
        floorLabel = QtWidgets.QLabel("Floors")
        layout.addWidget(floorLabel, 5, 0)

        # NameField - Floors
        self.floorNameField = QtWidgets.QSpinBox()
        self.floorNameField.setValue(1)
        self.floorNameField.valueChanged.connect(
            lambda val: self.floorSlider.setValue(val))
        layout.addWidget(self.floorNameField, 5, 1)

        # Slider - Floors
        self.floorSlider = QtWidgets.QSlider(
            QtCore.Qt.Horizontal)  # left to right slider
        self.floorSlider.setMinimum(1)
        self.floorSlider.setMaximum(100)
        self.floorSlider.setValue(1)
        self.floorSlider.setTickPosition(QtWidgets.QSlider.TicksBelow)
        self.floorSlider.setTickInterval(10)
        self.floorSlider.valueChanged.connect(
            lambda val: self.floorNameField.setValue(val))
        layout.addWidget(self.floorSlider, 5, 2)

        # Line Break
        line = QtWidgets.QFrame()
        line.setFrameShape(QtWidgets.QFrame.HLine)
        line.setFrameShadow(QtWidgets.QFrame.Sunken)
        layout.addWidget(line, 6, 0, 1, 3)

        # Label - Gap
        gapLabel = QtWidgets.QLabel("Adjust Gap")
        layout.addWidget(gapLabel, 7, 0, 1, 2)

        # LENGTH GAP WIDGETS
        # Label - Length Gap
        lengthGapLabel = QtWidgets.QLabel("Length")
        layout.addWidget(lengthGapLabel, 8, 0)

        # NameField - Length Gap
        self.lengthGapNameField = QtWidgets.QDoubleSpinBox()
        self.lengthGapNameField.setMinimum(-1000)
        self.lengthGapNameField.setMaximum(1000)
        self.lengthGapNameField.setValue(0)
        self.lengthGapNameField.valueChanged.connect(
            lambda val: self.lengthGapSlider.setValue(val))
        layout.addWidget(self.lengthGapNameField, 8, 1)

        # Slider - Length Gap
        self.lengthGapSlider = QtWidgets.QSlider(
            QtCore.Qt.Horizontal)  # left to right slider
        self.lengthGapSlider.setMinimum(-1000)
        self.lengthGapSlider.setMaximum(1000)
        self.lengthGapSlider.setValue(0)
        self.lengthGapSlider.setTickPosition(QtWidgets.QSlider.TicksBelow)
        self.lengthGapSlider.setTickInterval(10)
        self.lengthGapSlider.valueChanged.connect(
            lambda val: self.lengthGapNameField.setValue(val))
        layout.addWidget(self.lengthGapSlider, 8, 2)

        # HEIGHT GAP WIDGETS
        # Label - Height
        heightGapLabel = QtWidgets.QLabel("Height")
        layout.addWidget(heightGapLabel, 9, 0)

        # NameField - Floors
        self.heightGapNameField = QtWidgets.QDoubleSpinBox()
        self.heightGapNameField.setMinimum(-1000)
        self.heightGapNameField.setMaximum(1000)
        self.heightGapNameField.setValue(0)
        self.heightGapNameField.valueChanged.connect(
            lambda val: self.heightGapSlider.setValue(val))
        layout.addWidget(self.heightGapNameField, 9, 1)

        # Slider - Floors
        self.heightGapSlider = QtWidgets.QSlider(
            QtCore.Qt.Horizontal)  # left to right slider
        self.heightGapSlider.setMinimum(-1000)
        self.heightGapSlider.setMaximum(1000)
        self.heightGapSlider.setValue(0)
        self.heightGapSlider.setTickPosition(QtWidgets.QSlider.TicksBelow)
        self.heightGapSlider.setTickInterval(10)
        self.heightGapSlider.valueChanged.connect(
            lambda val: self.heightGapNameField.setValue(val))
        layout.addWidget(self.heightGapSlider, 9, 2)

        # Line Break
        line = QtWidgets.QFrame()
        line.setFrameShape(QtWidgets.QFrame.HLine)
        line.setFrameShadow(QtWidgets.QFrame.Sunken)
        layout.addWidget(line, 10, 0, 1, 3)

        # reverse button
        self.reverseBtn = QtWidgets.QPushButton('Undo')
        self.reverseBtn.clicked.connect(self.reverseBuilding)
        layout.addWidget(self.reverseBtn, 11, 0)

        # create button
        self.createBtn = QtWidgets.QPushButton('Create')
        self.createBtn.clicked.connect(self.createBuilding)
        layout.addWidget(self.createBtn, 11, 1, 1, 2)
Example #26
0
    def setupUi(self, QSpectrumAnalyzerMainWindow):
        QSpectrumAnalyzerMainWindow.setObjectName("QSpectrumAnalyzerMainWindow")
        QSpectrumAnalyzerMainWindow.resize(1200, 840)
        self.centralwidget = QtWidgets.QWidget(QSpectrumAnalyzerMainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.centralwidget)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.plotSplitter = QtWidgets.QSplitter(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.plotSplitter.sizePolicy().hasHeightForWidth())
        self.plotSplitter.setSizePolicy(sizePolicy)
        self.plotSplitter.setOrientation(QtCore.Qt.Vertical)
        self.plotSplitter.setObjectName("plotSplitter")
        self.mainPlotLayout = GraphicsLayoutWidget(self.plotSplitter)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.mainPlotLayout.sizePolicy().hasHeightForWidth())
        self.mainPlotLayout.setSizePolicy(sizePolicy)
        self.mainPlotLayout.setObjectName("mainPlotLayout")
        self.waterfallPlotLayout = GraphicsLayoutWidget(self.plotSplitter)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.waterfallPlotLayout.sizePolicy().hasHeightForWidth())
        self.waterfallPlotLayout.setSizePolicy(sizePolicy)
        self.waterfallPlotLayout.setObjectName("waterfallPlotLayout")
        self.horizontalLayout.addWidget(self.plotSplitter)
        QSpectrumAnalyzerMainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(QSpectrumAnalyzerMainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1200, 32))
        self.menubar.setObjectName("menubar")
        self.menu_File = QtWidgets.QMenu(self.menubar)
        self.menu_File.setObjectName("menu_File")
        self.menu_Help = QtWidgets.QMenu(self.menubar)
        self.menu_Help.setObjectName("menu_Help")
        QSpectrumAnalyzerMainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(QSpectrumAnalyzerMainWindow)
        self.statusbar.setObjectName("statusbar")
        QSpectrumAnalyzerMainWindow.setStatusBar(self.statusbar)
        self.controlsDockWidget = QtWidgets.QDockWidget(QSpectrumAnalyzerMainWindow)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.controlsDockWidget.sizePolicy().hasHeightForWidth())
        self.controlsDockWidget.setSizePolicy(sizePolicy)
        self.controlsDockWidget.setMinimumSize(QtCore.QSize(190, 130))
        self.controlsDockWidget.setFeatures(QtWidgets.QDockWidget.DockWidgetFloatable|QtWidgets.QDockWidget.DockWidgetMovable)
        self.controlsDockWidget.setObjectName("controlsDockWidget")
        self.controlsDockWidgetContents = QtWidgets.QWidget()
        self.controlsDockWidgetContents.setObjectName("controlsDockWidgetContents")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.controlsDockWidgetContents)
        self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.startButton = QtWidgets.QPushButton(self.controlsDockWidgetContents)
        self.startButton.setObjectName("startButton")
        self.gridLayout_2.addWidget(self.startButton, 0, 0, 1, 1)
        self.stopButton = QtWidgets.QPushButton(self.controlsDockWidgetContents)
        self.stopButton.setObjectName("stopButton")
        self.gridLayout_2.addWidget(self.stopButton, 0, 1, 1, 1)
        self.singleShotButton = QtWidgets.QPushButton(self.controlsDockWidgetContents)
        self.singleShotButton.setObjectName("singleShotButton")
        self.gridLayout_2.addWidget(self.singleShotButton, 1, 0, 1, 2)
        spacerItem = QtWidgets.QSpacerItem(20, 561, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.gridLayout_2.addItem(spacerItem, 2, 0, 1, 1)
        self.controlsDockWidget.setWidget(self.controlsDockWidgetContents)
        QSpectrumAnalyzerMainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.controlsDockWidget)
        self.frequencyDockWidget = QtWidgets.QDockWidget(QSpectrumAnalyzerMainWindow)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.frequencyDockWidget.sizePolicy().hasHeightForWidth())
        self.frequencyDockWidget.setSizePolicy(sizePolicy)
        self.frequencyDockWidget.setMinimumSize(QtCore.QSize(197, 166))
        self.frequencyDockWidget.setFeatures(QtWidgets.QDockWidget.DockWidgetFloatable|QtWidgets.QDockWidget.DockWidgetMovable)
        self.frequencyDockWidget.setObjectName("frequencyDockWidget")
        self.frequencyDockWidgetContents = QtWidgets.QWidget()
        self.frequencyDockWidgetContents.setObjectName("frequencyDockWidgetContents")
        self.formLayout = QtWidgets.QFormLayout(self.frequencyDockWidgetContents)
        self.formLayout.setFieldGrowthPolicy(QtWidgets.QFormLayout.ExpandingFieldsGrow)
        self.formLayout.setContentsMargins(0, 0, 0, 0)
        self.formLayout.setObjectName("formLayout")
        self.label_2 = QtWidgets.QLabel(self.frequencyDockWidgetContents)
        self.label_2.setObjectName("label_2")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_2)
        self.startFreqSpinBox = QtWidgets.QDoubleSpinBox(self.frequencyDockWidgetContents)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.startFreqSpinBox.sizePolicy().hasHeightForWidth())
        self.startFreqSpinBox.setSizePolicy(sizePolicy)
        self.startFreqSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.startFreqSpinBox.setProperty("showGroupSeparator", True)
        self.startFreqSpinBox.setDecimals(3)
        self.startFreqSpinBox.setMinimum(0.0)
        self.startFreqSpinBox.setMaximum(2200.0)
        self.startFreqSpinBox.setProperty("value", 87.0)
        self.startFreqSpinBox.setObjectName("startFreqSpinBox")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.startFreqSpinBox)
        self.label_3 = QtWidgets.QLabel(self.frequencyDockWidgetContents)
        self.label_3.setObjectName("label_3")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_3)
        self.stopFreqSpinBox = QtWidgets.QDoubleSpinBox(self.frequencyDockWidgetContents)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.stopFreqSpinBox.sizePolicy().hasHeightForWidth())
        self.stopFreqSpinBox.setSizePolicy(sizePolicy)
        self.stopFreqSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.stopFreqSpinBox.setProperty("showGroupSeparator", True)
        self.stopFreqSpinBox.setDecimals(3)
        self.stopFreqSpinBox.setMinimum(0.0)
        self.stopFreqSpinBox.setMaximum(2200.0)
        self.stopFreqSpinBox.setProperty("value", 108.0)
        self.stopFreqSpinBox.setObjectName("stopFreqSpinBox")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.stopFreqSpinBox)
        self.label = QtWidgets.QLabel(self.frequencyDockWidgetContents)
        self.label.setObjectName("label")
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label)
        self.binSizeSpinBox = QtWidgets.QDoubleSpinBox(self.frequencyDockWidgetContents)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.binSizeSpinBox.sizePolicy().hasHeightForWidth())
        self.binSizeSpinBox.setSizePolicy(sizePolicy)
        self.binSizeSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.binSizeSpinBox.setProperty("showGroupSeparator", True)
        self.binSizeSpinBox.setDecimals(3)
        self.binSizeSpinBox.setMinimum(0.0)
        self.binSizeSpinBox.setMaximum(10000.0)
        self.binSizeSpinBox.setProperty("value", 10.0)
        self.binSizeSpinBox.setObjectName("binSizeSpinBox")
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.binSizeSpinBox)
        spacerItem1 = QtWidgets.QSpacerItem(20, 0, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.formLayout.setItem(3, QtWidgets.QFormLayout.SpanningRole, spacerItem1)
        self.frequencyDockWidget.setWidget(self.frequencyDockWidgetContents)
        QSpectrumAnalyzerMainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.frequencyDockWidget)
        self.settingsDockWidget = QtWidgets.QDockWidget(QSpectrumAnalyzerMainWindow)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.settingsDockWidget.sizePolicy().hasHeightForWidth())
        self.settingsDockWidget.setSizePolicy(sizePolicy)
        self.settingsDockWidget.setFeatures(QtWidgets.QDockWidget.DockWidgetFloatable|QtWidgets.QDockWidget.DockWidgetMovable)
        self.settingsDockWidget.setObjectName("settingsDockWidget")
        self.settingsDockWidgetContents = QtWidgets.QWidget()
        self.settingsDockWidgetContents.setObjectName("settingsDockWidgetContents")
        self.gridLayout = QtWidgets.QGridLayout(self.settingsDockWidgetContents)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setObjectName("gridLayout")
        self.label_4 = QtWidgets.QLabel(self.settingsDockWidgetContents)
        self.label_4.setObjectName("label_4")
        self.gridLayout.addWidget(self.label_4, 0, 0, 1, 1)
        self.label_6 = QtWidgets.QLabel(self.settingsDockWidgetContents)
        self.label_6.setObjectName("label_6")
        self.gridLayout.addWidget(self.label_6, 0, 1, 1, 1)
        self.intervalSpinBox = QtWidgets.QDoubleSpinBox(self.settingsDockWidgetContents)
        self.intervalSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.intervalSpinBox.setMaximum(999.0)
        self.intervalSpinBox.setProperty("value", 1.0)
        self.intervalSpinBox.setObjectName("intervalSpinBox")
        self.gridLayout.addWidget(self.intervalSpinBox, 1, 0, 1, 1)
        self.label_5 = QtWidgets.QLabel(self.settingsDockWidgetContents)
        self.label_5.setObjectName("label_5")
        self.gridLayout.addWidget(self.label_5, 2, 0, 1, 1)
        self.label_7 = QtWidgets.QLabel(self.settingsDockWidgetContents)
        self.label_7.setObjectName("label_7")
        self.gridLayout.addWidget(self.label_7, 2, 1, 1, 1)
        self.ppmSpinBox = QtWidgets.QSpinBox(self.settingsDockWidgetContents)
        self.ppmSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.ppmSpinBox.setMinimum(-999)
        self.ppmSpinBox.setMaximum(999)
        self.ppmSpinBox.setObjectName("ppmSpinBox")
        self.gridLayout.addWidget(self.ppmSpinBox, 3, 0, 1, 1)
        self.mainCurveCheckBox = QtWidgets.QCheckBox(self.settingsDockWidgetContents)
        self.mainCurveCheckBox.setChecked(True)
        self.mainCurveCheckBox.setObjectName("mainCurveCheckBox")
        self.gridLayout.addWidget(self.mainCurveCheckBox, 4, 0, 1, 1)
        self.colorsButton = QtWidgets.QPushButton(self.settingsDockWidgetContents)
        self.colorsButton.setObjectName("colorsButton")
        self.gridLayout.addWidget(self.colorsButton, 4, 1, 1, 2)
        self.peakHoldMaxCheckBox = QtWidgets.QCheckBox(self.settingsDockWidgetContents)
        self.peakHoldMaxCheckBox.setObjectName("peakHoldMaxCheckBox")
        self.gridLayout.addWidget(self.peakHoldMaxCheckBox, 5, 0, 1, 1)
        self.peakHoldMinCheckBox = QtWidgets.QCheckBox(self.settingsDockWidgetContents)
        self.peakHoldMinCheckBox.setObjectName("peakHoldMinCheckBox")
        self.gridLayout.addWidget(self.peakHoldMinCheckBox, 5, 1, 1, 2)
        self.averageCheckBox = QtWidgets.QCheckBox(self.settingsDockWidgetContents)
        self.averageCheckBox.setObjectName("averageCheckBox")
        self.gridLayout.addWidget(self.averageCheckBox, 6, 0, 1, 1)
        self.smoothCheckBox = QtWidgets.QCheckBox(self.settingsDockWidgetContents)
        self.smoothCheckBox.setObjectName("smoothCheckBox")
        self.gridLayout.addWidget(self.smoothCheckBox, 7, 0, 1, 1)
        self.smoothButton = QtWidgets.QToolButton(self.settingsDockWidgetContents)
        self.smoothButton.setAutoRaise(False)
        self.smoothButton.setObjectName("smoothButton")
        self.gridLayout.addWidget(self.smoothButton, 7, 2, 1, 1)
        self.persistenceCheckBox = QtWidgets.QCheckBox(self.settingsDockWidgetContents)
        self.persistenceCheckBox.setObjectName("persistenceCheckBox")
        self.gridLayout.addWidget(self.persistenceCheckBox, 8, 0, 1, 1)
        self.persistenceButton = QtWidgets.QToolButton(self.settingsDockWidgetContents)
        self.persistenceButton.setAutoRaise(False)
        self.persistenceButton.setObjectName("persistenceButton")
        self.gridLayout.addWidget(self.persistenceButton, 8, 2, 1, 1)
        spacerItem2 = QtWidgets.QSpacerItem(20, 1, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.gridLayout.addItem(spacerItem2, 9, 0, 1, 1)
        self.cropSpinBox = QtWidgets.QSpinBox(self.settingsDockWidgetContents)
        self.cropSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.cropSpinBox.setObjectName("cropSpinBox")
        self.gridLayout.addWidget(self.cropSpinBox, 3, 1, 1, 2)
        self.gainSpinBox = QtWidgets.QDoubleSpinBox(self.settingsDockWidgetContents)
        self.gainSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.gainSpinBox.setDecimals(1)
        self.gainSpinBox.setMinimum(-1.0)
        self.gainSpinBox.setMaximum(999.0)
        self.gainSpinBox.setSingleStep(1.0)
        self.gainSpinBox.setProperty("value", -1.0)
        self.gainSpinBox.setObjectName("gainSpinBox")
        self.gridLayout.addWidget(self.gainSpinBox, 1, 1, 1, 2)
        self.settingsDockWidget.setWidget(self.settingsDockWidgetContents)
        QSpectrumAnalyzerMainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.settingsDockWidget)
        self.levelsDockWidget = QtWidgets.QDockWidget(QSpectrumAnalyzerMainWindow)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.levelsDockWidget.sizePolicy().hasHeightForWidth())
        self.levelsDockWidget.setSizePolicy(sizePolicy)
        self.levelsDockWidget.setFeatures(QtWidgets.QDockWidget.DockWidgetFloatable|QtWidgets.QDockWidget.DockWidgetMovable)
        self.levelsDockWidget.setObjectName("levelsDockWidget")
        self.levelsDockWidgetContents = QtWidgets.QWidget()
        self.levelsDockWidgetContents.setObjectName("levelsDockWidgetContents")
        self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.levelsDockWidgetContents)
        self.verticalLayout_6.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_6.setObjectName("verticalLayout_6")
        self.histogramPlotLayout = GraphicsLayoutWidget(self.levelsDockWidgetContents)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.histogramPlotLayout.sizePolicy().hasHeightForWidth())
        self.histogramPlotLayout.setSizePolicy(sizePolicy)
        self.histogramPlotLayout.setObjectName("histogramPlotLayout")
        self.verticalLayout_6.addWidget(self.histogramPlotLayout)
        self.levelsDockWidget.setWidget(self.levelsDockWidgetContents)
        QSpectrumAnalyzerMainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.levelsDockWidget)
        self.action_Settings = QtWidgets.QAction(QSpectrumAnalyzerMainWindow)
        self.action_Settings.setObjectName("action_Settings")
        self.action_Quit = QtWidgets.QAction(QSpectrumAnalyzerMainWindow)
        self.action_Quit.setObjectName("action_Quit")
        self.action_About = QtWidgets.QAction(QSpectrumAnalyzerMainWindow)
        self.action_About.setObjectName("action_About")
        self.menu_File.addAction(self.action_Settings)
        self.menu_File.addSeparator()
        self.menu_File.addAction(self.action_Quit)
        self.menu_Help.addAction(self.action_About)
        self.menubar.addAction(self.menu_File.menuAction())
        self.menubar.addAction(self.menu_Help.menuAction())
        self.label_2.setBuddy(self.startFreqSpinBox)
        self.label_3.setBuddy(self.stopFreqSpinBox)
        self.label.setBuddy(self.binSizeSpinBox)
        self.label_4.setBuddy(self.intervalSpinBox)
        self.label_6.setBuddy(self.gainSpinBox)
        self.label_5.setBuddy(self.ppmSpinBox)
        self.label_7.setBuddy(self.cropSpinBox)

        self.retranslateUi(QSpectrumAnalyzerMainWindow)
        QtCore.QMetaObject.connectSlotsByName(QSpectrumAnalyzerMainWindow)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.startButton, self.stopButton)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.stopButton, self.singleShotButton)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.singleShotButton, self.startFreqSpinBox)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.startFreqSpinBox, self.stopFreqSpinBox)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.stopFreqSpinBox, self.binSizeSpinBox)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.binSizeSpinBox, self.intervalSpinBox)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.intervalSpinBox, self.gainSpinBox)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.gainSpinBox, self.ppmSpinBox)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.ppmSpinBox, self.cropSpinBox)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.cropSpinBox, self.mainCurveCheckBox)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.mainCurveCheckBox, self.colorsButton)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.colorsButton, self.peakHoldMaxCheckBox)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.peakHoldMaxCheckBox, self.peakHoldMinCheckBox)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.peakHoldMinCheckBox, self.averageCheckBox)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.averageCheckBox, self.smoothCheckBox)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.smoothCheckBox, self.smoothButton)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.smoothButton, self.persistenceCheckBox)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.persistenceCheckBox, self.persistenceButton)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.persistenceButton, self.histogramPlotLayout)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.histogramPlotLayout, self.waterfallPlotLayout)
        QSpectrumAnalyzerMainWindow.setTabOrder(self.waterfallPlotLayout, self.mainPlotLayout)
Example #27
0
    def setupUi(self, QSpectrumAnalyzerSettings):
        QSpectrumAnalyzerSettings.setObjectName("QSpectrumAnalyzerSettings")
        QSpectrumAnalyzerSettings.resize(600, 388)
        self.verticalLayout = QtWidgets.QVBoxLayout(QSpectrumAnalyzerSettings)
        self.verticalLayout.setObjectName("verticalLayout")
        self.formLayout = QtWidgets.QFormLayout()
        self.formLayout.setObjectName("formLayout")
        self.label_3 = QtWidgets.QLabel(QSpectrumAnalyzerSettings)
        self.label_3.setObjectName("label_3")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole,
                                  self.label_3)
        self.backendComboBox = QtWidgets.QComboBox(QSpectrumAnalyzerSettings)
        self.backendComboBox.setObjectName("backendComboBox")
        self.backendComboBox.addItem("")
        self.backendComboBox.addItem("")
        self.backendComboBox.addItem("")
        self.backendComboBox.addItem("")
        self.backendComboBox.addItem("")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole,
                                  self.backendComboBox)
        self.label = QtWidgets.QLabel(QSpectrumAnalyzerSettings)
        self.label.setObjectName("label")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole,
                                  self.label)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.executableEdit = QtWidgets.QLineEdit(QSpectrumAnalyzerSettings)
        self.executableEdit.setObjectName("executableEdit")
        self.horizontalLayout.addWidget(self.executableEdit)
        self.executableButton = QtWidgets.QToolButton(
            QSpectrumAnalyzerSettings)
        self.executableButton.setMinimumSize(QtCore.QSize(50, 0))
        self.executableButton.setObjectName("executableButton")
        self.horizontalLayout.addWidget(self.executableButton)
        self.formLayout.setLayout(1, QtWidgets.QFormLayout.FieldRole,
                                  self.horizontalLayout)
        self.label_5 = QtWidgets.QLabel(QSpectrumAnalyzerSettings)
        self.label_5.setObjectName("label_5")
        self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole,
                                  self.label_5)
        self.label_4 = QtWidgets.QLabel(QSpectrumAnalyzerSettings)
        self.label_4.setObjectName("label_4")
        self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole,
                                  self.label_4)
        self.label_2 = QtWidgets.QLabel(QSpectrumAnalyzerSettings)
        self.label_2.setObjectName("label_2")
        self.formLayout.setWidget(7, QtWidgets.QFormLayout.LabelRole,
                                  self.label_2)
        self.waterfallHistorySizeSpinBox = QtWidgets.QSpinBox(
            QSpectrumAnalyzerSettings)
        self.waterfallHistorySizeSpinBox.setMinimum(1)
        self.waterfallHistorySizeSpinBox.setMaximum(10000000)
        self.waterfallHistorySizeSpinBox.setProperty("value", 100)
        self.waterfallHistorySizeSpinBox.setObjectName(
            "waterfallHistorySizeSpinBox")
        self.formLayout.setWidget(7, QtWidgets.QFormLayout.FieldRole,
                                  self.waterfallHistorySizeSpinBox)
        self.label_7 = QtWidgets.QLabel(QSpectrumAnalyzerSettings)
        self.label_7.setObjectName("label_7")
        self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole,
                                  self.label_7)
        self.label_8 = QtWidgets.QLabel(QSpectrumAnalyzerSettings)
        self.label_8.setObjectName("label_8")
        self.formLayout.setWidget(6, QtWidgets.QFormLayout.LabelRole,
                                  self.label_8)
        self.label_6 = QtWidgets.QLabel(QSpectrumAnalyzerSettings)
        self.label_6.setObjectName("label_6")
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole,
                                  self.label_6)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.paramsEdit = QtWidgets.QLineEdit(QSpectrumAnalyzerSettings)
        self.paramsEdit.setObjectName("paramsEdit")
        self.horizontalLayout_2.addWidget(self.paramsEdit)
        self.paramsHelpButton = QtWidgets.QToolButton(
            QSpectrumAnalyzerSettings)
        self.paramsHelpButton.setMinimumSize(QtCore.QSize(50, 0))
        self.paramsHelpButton.setObjectName("paramsHelpButton")
        self.horizontalLayout_2.addWidget(self.paramsHelpButton)
        self.formLayout.setLayout(2, QtWidgets.QFormLayout.FieldRole,
                                  self.horizontalLayout_2)
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.deviceEdit = QtWidgets.QLineEdit(QSpectrumAnalyzerSettings)
        self.deviceEdit.setObjectName("deviceEdit")
        self.horizontalLayout_3.addWidget(self.deviceEdit)
        self.deviceHelpButton = QtWidgets.QToolButton(
            QSpectrumAnalyzerSettings)
        self.deviceHelpButton.setMinimumSize(QtCore.QSize(50, 0))
        self.deviceHelpButton.setObjectName("deviceHelpButton")
        self.horizontalLayout_3.addWidget(self.deviceHelpButton)
        self.formLayout.setLayout(3, QtWidgets.QFormLayout.FieldRole,
                                  self.horizontalLayout_3)
        self.sampleRateSpinBox = QtWidgets.QDoubleSpinBox(
            QSpectrumAnalyzerSettings)
        self.sampleRateSpinBox.setProperty("showGroupSeparator", True)
        self.sampleRateSpinBox.setDecimals(3)
        self.sampleRateSpinBox.setMinimum(0.0)
        self.sampleRateSpinBox.setMaximum(999999.99)
        self.sampleRateSpinBox.setSingleStep(0.01)
        self.sampleRateSpinBox.setProperty("value", 61.44)
        self.sampleRateSpinBox.setObjectName("sampleRateSpinBox")
        self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole,
                                  self.sampleRateSpinBox)
        self.bandwidthSpinBox = QtWidgets.QDoubleSpinBox(
            QSpectrumAnalyzerSettings)
        self.bandwidthSpinBox.setProperty("showGroupSeparator", True)
        self.bandwidthSpinBox.setDecimals(3)
        self.bandwidthSpinBox.setMinimum(0.0)
        self.bandwidthSpinBox.setMaximum(999999.99)
        self.bandwidthSpinBox.setSingleStep(0.01)
        self.bandwidthSpinBox.setProperty("value", 0.0)
        self.bandwidthSpinBox.setObjectName("bandwidthSpinBox")
        self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole,
                                  self.bandwidthSpinBox)
        self.lnbSpinBox = QtWidgets.QDoubleSpinBox(QSpectrumAnalyzerSettings)
        self.lnbSpinBox.setProperty("showGroupSeparator", True)
        self.lnbSpinBox.setDecimals(3)
        self.lnbSpinBox.setMinimum(-999999.999)
        self.lnbSpinBox.setMaximum(999999.999)
        self.lnbSpinBox.setSingleStep(0.01)
        self.lnbSpinBox.setProperty("value", 0.0)
        self.lnbSpinBox.setObjectName("lnbSpinBox")
        self.formLayout.setWidget(6, QtWidgets.QFormLayout.FieldRole,
                                  self.lnbSpinBox)
        self.verticalLayout.addLayout(self.formLayout)
        spacerItem = QtWidgets.QSpacerItem(20, 21,
                                           QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.buttonBox = QtWidgets.QDialogButtonBox(QSpectrumAnalyzerSettings)
        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.label_3.setBuddy(self.backendComboBox)
        self.label.setBuddy(self.executableEdit)
        self.label_5.setBuddy(self.deviceEdit)
        self.label_4.setBuddy(self.sampleRateSpinBox)
        self.label_2.setBuddy(self.waterfallHistorySizeSpinBox)
        self.label_7.setBuddy(self.bandwidthSpinBox)
        self.label_8.setBuddy(self.lnbSpinBox)
        self.label_6.setBuddy(self.paramsEdit)

        self.retranslateUi(QSpectrumAnalyzerSettings)
        self.buttonBox.accepted.connect(QSpectrumAnalyzerSettings.accept)
        self.buttonBox.rejected.connect(QSpectrumAnalyzerSettings.reject)
        QtCore.QMetaObject.connectSlotsByName(QSpectrumAnalyzerSettings)
        QSpectrumAnalyzerSettings.setTabOrder(self.backendComboBox,
                                              self.executableEdit)
        QSpectrumAnalyzerSettings.setTabOrder(self.executableEdit,
                                              self.executableButton)
        QSpectrumAnalyzerSettings.setTabOrder(self.executableButton,
                                              self.paramsEdit)
        QSpectrumAnalyzerSettings.setTabOrder(self.paramsEdit,
                                              self.paramsHelpButton)
        QSpectrumAnalyzerSettings.setTabOrder(self.paramsHelpButton,
                                              self.deviceEdit)
        QSpectrumAnalyzerSettings.setTabOrder(self.deviceEdit,
                                              self.deviceHelpButton)
        QSpectrumAnalyzerSettings.setTabOrder(self.deviceHelpButton,
                                              self.sampleRateSpinBox)
        QSpectrumAnalyzerSettings.setTabOrder(self.sampleRateSpinBox,
                                              self.bandwidthSpinBox)
        QSpectrumAnalyzerSettings.setTabOrder(self.bandwidthSpinBox,
                                              self.lnbSpinBox)
        QSpectrumAnalyzerSettings.setTabOrder(self.lnbSpinBox,
                                              self.waterfallHistorySizeSpinBox)
Example #28
0
    def __init__(self):
        QtWidgets.QWidget.__init__(self)
        self.constructed = False

        self.evaluated = False
        self.test = False

        self.setWindowTitle('Scan Scan - CGRU ' +
                            cgruconfig.VARS['CGRU_VERSION'])
        self.mainLayout = QtWidgets.QVBoxLayout(self)

        self.tabwidget = QtWidgets.QTabWidget(self)
        self.generalwidget = QtWidgets.QWidget(self)
        self.tabwidget.addTab(self.generalwidget, 'General')
        self.generallayout = QtWidgets.QVBoxLayout(self.generalwidget)
        self.parameterswidget = QtWidgets.QWidget(self)
        self.tabwidget.addTab(self.parameterswidget, 'Parameters')
        self.parameterslayout = QtWidgets.QVBoxLayout(self.parameterswidget)
        self.mainLayout.addWidget(self.tabwidget)

        # General:
        self.lFormat = QtWidgets.QHBoxLayout()
        self.tFormat = QtWidgets.QLabel('Format:', self)
        self.tFormat.setToolTip('Movie resolution.\n'
                                'Format presets located in\n' + FormatsPath)
        self.cbFormat = QtWidgets.QComboBox(self)
        i = 0
        for format in FormatValues:
            self.cbFormat.addItem(FormatNames[i], format)
            if format == Options.format:
                self.cbFormat.setCurrentIndex(i)
            i += 1
        self.cbFormat.currentIndexChanged.connect(self.evaluate)
        self.tCodec = QtWidgets.QLabel('Codec:', self)
        self.tCodec.setToolTip('Codec presets located in\n' + CodecsPath)
        self.cbCodec = QtWidgets.QComboBox(self)
        i = 0
        for name in CodecNames:
            self.cbCodec.addItem(name, CodecFiles[i])
            if os.path.basename(CodecFiles[i]) == Options.codec:
                self.cbCodec.setCurrentIndex(i)
            i += 1
        self.cbCodec.currentIndexChanged.connect(self.evaluate)
        self.tFPS = QtWidgets.QLabel('FPS:', self)
        self.tFPS.setToolTip('Frame rate.')
        self.cbFPS = QtWidgets.QComboBox(self)
        self.cbFPS.addItem('24')
        self.cbFPS.addItem('25')
        self.cbFPS.addItem('30')
        self.cbFPS.setCurrentIndex(0)
        self.cbFPS.currentIndexChanged.connect(self.evaluate)
        self.lFormat.addWidget(self.tFormat)
        self.lFormat.addWidget(self.cbFormat)
        self.lFormat.addWidget(self.tFPS)
        self.lFormat.addWidget(self.cbFPS)
        self.lFormat.addWidget(self.tCodec)
        self.lFormat.addWidget(self.cbCodec)
        self.generallayout.addLayout(self.lFormat)

        self.lInput = QtWidgets.QHBoxLayout()
        self.tInput = QtWidgets.QLabel('Scan Folder', self)
        self.lInput.addWidget(self.tInput)
        self.editInput = QtWidgets.QLineEdit(InputFolder, self)
        self.editInput.textEdited.connect(self.evaluate)
        self.lInput.addWidget(self.editInput)
        self.btnInputBrowse = QtWidgets.QPushButton('Browse', self)
        self.btnInputBrowse.pressed.connect(self.inputBrowse)
        self.lInput.addWidget(self.btnInputBrowse)
        self.generallayout.addLayout(self.lInput)

        self.lExtensions = QtWidgets.QHBoxLayout()
        self.tExtensions = QtWidgets.QLabel('Search extensions:', self)
        tooltip = 'Comma separated list.\n' \
                  'Leave empty to find all known:\n'
        for ext in Extensions:
            tooltip += ext + ' '
        self.tExtensions.setToolTip(tooltip)
        self.lExtensions.addWidget(self.tExtensions)
        self.editExtensions = QtWidgets.QLineEdit(Options.extensions, self)
        self.editExtensions.editingFinished.connect(self.evaluate)
        self.lExtensions.addWidget(self.editExtensions)
        self.generallayout.addLayout(self.lExtensions)

        self.lInclude = QtWidgets.QHBoxLayout()
        self.tInclude = QtWidgets.QLabel('Include pattern:', self)
        self.lInclude.addWidget(self.tInclude)
        self.editInclude = QtWidgets.QLineEdit(Options.include, self)
        self.editInclude.textEdited.connect(self.evaluate)
        self.lInclude.addWidget(self.editInclude)
        self.generallayout.addLayout(self.lInclude)

        self.lExclude = QtWidgets.QHBoxLayout()
        self.tExclude = QtWidgets.QLabel('Exclude pattern:', self)
        self.lExclude.addWidget(self.tExclude)
        self.editExclude = QtWidgets.QLineEdit(Options.exclude, self)
        self.editExclude.textEdited.connect(self.evaluate)
        self.lExclude.addWidget(self.editExclude)
        self.generallayout.addLayout(self.lExclude)

        self.lDateTime = QtWidgets.QHBoxLayout()
        self.cDateTime = QtWidgets.QCheckBox('Skip folders ealier than:', self)
        self.cDateTime.stateChanged.connect(self.evaluate)
        self.lDateTime.addWidget(self.cDateTime)
        self.eDateTime = QtWidgets.QDateTimeEdit(
            QtCore.QDateTime.currentDateTime(), self)
        self.eDateTime.setCalendarPopup(True)
        self.eDateTime.setDisplayFormat(DateTimeFormat)
        self.eDateTime.dateTimeChanged.connect(self.evaluate)
        self.lDateTime.addWidget(self.eDateTime)
        self.generallayout.addLayout(self.lDateTime)

        self.lOutput = QtWidgets.QHBoxLayout()
        self.tOutput = QtWidgets.QLabel('Output Folder:', self)
        self.lOutput.addWidget(self.tOutput)
        self.editOutput = QtWidgets.QLineEdit(OutputFolder, self)
        self.editOutput.editingFinished.connect(self.evaluate)
        self.lOutput.addWidget(self.editOutput)
        self.btnOutputBrowse = QtWidgets.QPushButton('Browse', self)
        self.btnOutputBrowse.pressed.connect(self.browseOutput)
        self.lOutput.addWidget(self.btnOutputBrowse)
        self.generallayout.addLayout(self.lOutput)

        # Parameters:
        self.cAbsPath = QtWidgets.QCheckBox(
            'Prefix movies names with images absolute input files path', self)
        self.cAbsPath.setChecked(Options.abspath)
        self.cAbsPath.stateChanged.connect(self.evaluate)
        self.parameterslayout.addWidget(self.cAbsPath)

        self.lTemplates = QtWidgets.QHBoxLayout()
        self.tTemplate = QtWidgets.QLabel('Frame Template:', self)
        self.tTemplate.setToolTip('Frame template.\n'
                                  'Templates are located in\n' + TemplatesPath)
        self.cbTemplate = QtWidgets.QComboBox(self)
        for template in Templates:
            self.cbTemplate.addItem(template)
        self.cbTemplate.setCurrentIndex(Template)
        self.lTemplates.addWidget(self.tTemplate)
        self.lTemplates.addWidget(self.cbTemplate)
        self.cbTemplate.currentIndexChanged.connect(self.evaluate)
        self.parameterslayout.addLayout(self.lTemplates)

        self.lAspect = QtWidgets.QHBoxLayout()
        self.lAspect.addWidget(QtWidgets.QLabel('Input Images Aspect', self))
        self.dsbAspect = QtWidgets.QDoubleSpinBox(self)
        self.dsbAspect.setRange(-1.0, 10.0)
        self.dsbAspect.setDecimals(6)
        self.dsbAspect.setValue(Options.aspect_in)
        self.dsbAspect.valueChanged.connect(self.evaluate)
        self.lAspect.addWidget(self.dsbAspect)
        self.lAspect.addWidget(QtWidgets.QLabel(' (-1 = no changes) ', self))
        self.parameterslayout.addLayout(self.lAspect)

        self.lAutoAspect = QtWidgets.QHBoxLayout()
        self.tAutoAspect = QtWidgets.QLabel('Auto Input Aspect', self)
        self.tAutoAspect.setToolTip(
            'Images with width/height ratio > this value will be '
            'treated as 2:1.')
        self.lAutoAspect.addWidget(self.tAutoAspect)
        self.dsbAutoAspect = QtWidgets.QDoubleSpinBox(self)
        self.dsbAutoAspect.setRange(-1.0, 10.0)
        self.dsbAutoAspect.setDecimals(3)
        self.dsbAutoAspect.setValue(Options.aspect_auto)
        self.dsbAutoAspect.valueChanged.connect(self.evaluate)
        self.lAutoAspect.addWidget(self.dsbAutoAspect)
        self.lAutoAspect.addWidget(
            QtWidgets.QLabel(' (-1 = no changes) ', self))
        self.parameterslayout.addLayout(self.lAutoAspect)

        self.gCorrectionSettings = QtWidgets.QGroupBox('Image Correction')
        self.lCorr = QtWidgets.QHBoxLayout()
        self.gCorrectionSettings.setLayout(self.lCorr)
        self.tGamma = QtWidgets.QLabel('Gamma:', self)
        self.dsbGamma = QtWidgets.QDoubleSpinBox(self)
        self.dsbGamma.setRange(0.1, 10.0)
        self.dsbGamma.setDecimals(1)
        self.dsbGamma.setSingleStep(0.1)
        self.dsbGamma.setValue(1.0)
        self.dsbGamma.valueChanged.connect(self.evaluate)
        self.lCorr.addWidget(self.tGamma)
        self.lCorr.addWidget(self.dsbGamma)
        self.parameterslayout.addWidget(self.gCorrectionSettings)

        # Bottom tab:
        self.cmdField = QtWidgets.QTextEdit(self)
        self.cmdField.setReadOnly(True)
        self.mainLayout.addWidget(self.cmdField)

        self.lProcess = QtWidgets.QHBoxLayout()
        self.btnStart = QtWidgets.QPushButton('Start', self)
        self.btnStart.setEnabled(False)
        self.btnStart.pressed.connect(self.execute)
        self.btnStop = QtWidgets.QPushButton('Stop', self)
        self.btnStop.setEnabled(False)
        self.btnStop.pressed.connect(self.processStop)
        self.btnTest = QtWidgets.QPushButton('Test', self)
        self.btnTest.setEnabled(False)
        self.btnTest.pressed.connect(self.executeTest)
        self.lProcess.addWidget(self.btnTest)
        self.lProcess.addWidget(self.btnStart)
        self.lProcess.addWidget(self.btnStop)
        self.mainLayout.addLayout(self.lProcess)

        self.lAfanasy = QtWidgets.QHBoxLayout()
        self.cAfanasy = QtWidgets.QCheckBox('Afanasy', self)
        self.cAfanasy.setChecked(Options.afanasy != 0)
        self.cAfanasy.stateChanged.connect(self.afanasy)
        self.tAfCapacity = QtWidgets.QLabel('Capacity:', self)
        self.sbAfCapacity = QtWidgets.QSpinBox(self)
        self.sbAfCapacity.setRange(-1, 1000000)
        self.sbAfCapacity.setValue(Options.afanasy)
        self.sbAfCapacity.valueChanged.connect(self.evaluate)
        self.tAfMaxHosts = QtWidgets.QLabel('Maximum Hosts:', self)
        self.sbAfMaxHosts = QtWidgets.QSpinBox(self)
        self.sbAfMaxHosts.setRange(-1, 1000000)
        self.sbAfMaxHosts.setValue(Options.maxhosts)
        self.sbAfMaxHosts.valueChanged.connect(self.evaluate)
        self.cAfPause = QtWidgets.QCheckBox('Pause', self)
        self.lAfanasy.addWidget(self.cAfanasy)
        self.lAfanasy.addWidget(self.tAfCapacity)
        self.lAfanasy.addWidget(self.sbAfCapacity)
        self.lAfanasy.addWidget(self.tAfMaxHosts)
        self.lAfanasy.addWidget(self.sbAfMaxHosts)
        self.lAfanasy.addWidget(self.cAfPause)
        self.mainLayout.addLayout(self.lAfanasy)

        self.constructed = True

        self.afanasy()
        self.evaluate()
    def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(498, 181)
        Form.setMaximumSize(QtCore.QSize(16777215, 195))
        self.mainLayout = QtGui.QVBoxLayout(Form)
        # self.mainLayout.setMargin(2)
        self.mainLayout.setSpacing(2)
        self.mainLayout.setObjectName(_fromUtf8("mainLayout"))
        self.delete_this = QtGui.QPushButton(Form)
        self.delete_this.setMinimumSize(QtCore.QSize(25, 25))
        self.delete_this.setMaximumSize(QtCore.QSize(25, 25))
        self.delete_this.setText(_fromUtf8(""))
        self.delete_this.setObjectName(_fromUtf8("delete_this"))
        self.mainLayout.addWidget(self.delete_this)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.label = QtGui.QLabel(Form)
        self.label.setObjectName(_fromUtf8("label"))
        self.horizontalLayout.addWidget(self.label)
        self.attr_name = QtGui.QLineEdit(Form)
        self.attr_name.setMaximumSize(QtCore.QSize(270, 16777215))
        self.attr_name.setObjectName(_fromUtf8("attr_name"))
        self.horizontalLayout.addWidget(self.attr_name)
        self.mainLayout.addLayout(self.horizontalLayout)
        self.gridLayout = QtGui.QGridLayout()
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.horizontalLayout_3 = QtGui.QHBoxLayout()
        self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
        self.label_3 = QtGui.QLabel(Form)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.horizontalLayout_3.addWidget(self.label_3)
        self.min_x_value = QtGui.QDoubleSpinBox(Form)
        self.min_x_value.setSingleStep(0.1)
        self.min_x_value.setObjectName(_fromUtf8("min_x_value"))
        self.horizontalLayout_3.addWidget(self.min_x_value)
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_3.addItem(spacerItem)
        self.label_7 = QtGui.QLabel(Form)
        self.label_7.setObjectName(_fromUtf8("label_7"))
        self.horizontalLayout_3.addWidget(self.label_7)
        self.min_y_value = QtGui.QDoubleSpinBox(Form)
        self.min_y_value.setSingleStep(0.1)
        self.min_y_value.setObjectName(_fromUtf8("min_y_value"))
        self.horizontalLayout_3.addWidget(self.min_y_value)
        spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                        QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_3.addItem(spacerItem1)
        self.label_8 = QtGui.QLabel(Form)
        self.label_8.setObjectName(_fromUtf8("label_8"))
        self.horizontalLayout_3.addWidget(self.label_8)
        self.min_z_value = QtGui.QDoubleSpinBox(Form)
        self.min_z_value.setSingleStep(0.1)
        self.min_z_value.setObjectName(_fromUtf8("min_z_value"))
        self.horizontalLayout_3.addWidget(self.min_z_value)
        self.gridLayout.addLayout(self.horizontalLayout_3, 1, 1, 1, 1)
        self.label_10 = QtGui.QLabel(Form)
        self.label_10.setObjectName(_fromUtf8("label_10"))
        self.gridLayout.addWidget(self.label_10, 0, 0, 1, 1)
        self.horizontalLayout_5 = QtGui.QHBoxLayout()
        self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5"))
        self.variation = QtGui.QRadioButton(Form)
        self.variation.setChecked(True)
        self.variation.setObjectName(_fromUtf8("variation"))
        self.horizontalLayout_5.addWidget(self.variation)
        self.uniform = QtGui.QRadioButton(Form)
        self.uniform.setObjectName(_fromUtf8("uniform"))
        self.horizontalLayout_5.addWidget(self.uniform)
        self.type = QtGui.QComboBox(Form)
        self.type.setObjectName(_fromUtf8("type"))
        self.type.addItem(_fromUtf8(""))
        self.type.addItem(_fromUtf8(""))
        self.horizontalLayout_5.addWidget(self.type)
        spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                        QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_5.addItem(spacerItem2)
        self.gridLayout.addLayout(self.horizontalLayout_5, 0, 1, 1, 1)
        self.label_2 = QtGui.QLabel(Form)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
        self.horizontalLayout_4 = QtGui.QHBoxLayout()
        self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4"))
        self.label_4 = QtGui.QLabel(Form)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.horizontalLayout_4.addWidget(self.label_4)
        self.max_x_value = QtGui.QDoubleSpinBox(Form)
        self.max_x_value.setSingleStep(0.1)
        self.max_x_value.setProperty("value", 1.0)
        self.max_x_value.setObjectName(_fromUtf8("max_x_value"))
        self.horizontalLayout_4.addWidget(self.max_x_value)
        spacerItem3 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                        QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_4.addItem(spacerItem3)
        self.label_6 = QtGui.QLabel(Form)
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.horizontalLayout_4.addWidget(self.label_6)
        self.max_y_value = QtGui.QDoubleSpinBox(Form)
        self.max_y_value.setSingleStep(0.1)
        self.max_y_value.setProperty("value", 1.0)
        self.max_y_value.setObjectName(_fromUtf8("max_y_value"))
        self.horizontalLayout_4.addWidget(self.max_y_value)
        spacerItem4 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                        QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_4.addItem(spacerItem4)
        self.label_9 = QtGui.QLabel(Form)
        self.label_9.setObjectName(_fromUtf8("label_9"))
        self.horizontalLayout_4.addWidget(self.label_9)
        self.max_z_value = QtGui.QDoubleSpinBox(Form)
        self.max_z_value.setSingleStep(0.1)
        self.max_z_value.setProperty("value", 1.0)
        self.max_z_value.setObjectName(_fromUtf8("max_z_value"))
        self.horizontalLayout_4.addWidget(self.max_z_value)
        self.gridLayout.addLayout(self.horizontalLayout_4, 2, 1, 1, 1)
        self.mainLayout.addLayout(self.gridLayout)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.label_5 = QtGui.QLabel(Form)
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.horizontalLayout_2.addWidget(self.label_5)
        self.primvar_node_name = QtGui.QLineEdit(Form)
        self.primvar_node_name.setMinimumSize(QtCore.QSize(110, 0))
        self.primvar_node_name.setObjectName(_fromUtf8("primvar_node_name"))
        self.horizontalLayout_2.addWidget(self.primvar_node_name)
        self.get_node_name = QtGui.QPushButton(Form)
        self.get_node_name.setObjectName(_fromUtf8("get_node_name"))
        self.horizontalLayout_2.addWidget(self.get_node_name)
        self.create_node = QtGui.QPushButton(Form)
        self.create_node.setObjectName(_fromUtf8("create_node"))
        self.horizontalLayout_2.addWidget(self.create_node)
        self.mainLayout.addLayout(self.horizontalLayout_2)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
Example #30
0
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(419, 737)
        self.verticalLayout = QtWidgets.QVBoxLayout(Form)
        self.verticalLayout.setObjectName("verticalLayout")
        self.groupBox_3 = QtWidgets.QGroupBox(Form)
        self.groupBox_3.setObjectName("groupBox_3")
        self.gridLayout_4 = QtWidgets.QGridLayout(self.groupBox_3)
        self.gridLayout_4.setObjectName("gridLayout_4")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.ikNb_label = QtWidgets.QLabel(self.groupBox_3)
        self.ikNb_label.setObjectName("ikNb_label")
        self.horizontalLayout_2.addWidget(self.ikNb_label)
        self.ikNb_spinBox = QtWidgets.QSpinBox(self.groupBox_3)
        self.ikNb_spinBox.setMinimum(2)
        self.ikNb_spinBox.setMaximum(999)
        self.ikNb_spinBox.setProperty("value", 5)
        self.ikNb_spinBox.setObjectName("ikNb_spinBox")
        self.horizontalLayout_2.addWidget(self.ikNb_spinBox)
        self.gridLayout_4.addLayout(self.horizontalLayout_2, 0, 0, 1, 1)
        self.verticalLayout.addWidget(self.groupBox_3)
        self.overrideNegate_checkBox = QtWidgets.QCheckBox(Form)
        self.overrideNegate_checkBox.setText("Override Negate Axis Direction For \"R\" Side")
        self.overrideNegate_checkBox.setObjectName("overrideNegate_checkBox")
        self.verticalLayout.addWidget(self.overrideNegate_checkBox)
        self.addJoints_checkBox = QtWidgets.QCheckBox(Form)
        self.addJoints_checkBox.setText("Add Joints")
        self.addJoints_checkBox.setChecked(True)
        self.addJoints_checkBox.setObjectName("addJoints_checkBox")
        self.verticalLayout.addWidget(self.addJoints_checkBox)
        self.formLayout = QtWidgets.QFormLayout()
        self.formLayout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow)
        self.formLayout.setObjectName("formLayout")
        self.softness_label = QtWidgets.QLabel(Form)
        self.softness_label.setObjectName("softness_label")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.softness_label)
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.softness_slider = QtWidgets.QSlider(Form)
        self.softness_slider.setMinimumSize(QtCore.QSize(0, 15))
        self.softness_slider.setMaximum(100)
        self.softness_slider.setOrientation(QtCore.Qt.Horizontal)
        self.softness_slider.setObjectName("softness_slider")
        self.horizontalLayout_3.addWidget(self.softness_slider)
        self.softness_spinBox = QtWidgets.QSpinBox(Form)
        self.softness_spinBox.setMaximum(100)
        self.softness_spinBox.setObjectName("softness_spinBox")
        self.horizontalLayout_3.addWidget(self.softness_spinBox)
        self.formLayout.setLayout(0, QtWidgets.QFormLayout.FieldRole, self.horizontalLayout_3)
        self.softness_label_2 = QtWidgets.QLabel(Form)
        self.softness_label_2.setObjectName("softness_label_2")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.softness_label_2)
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.position_slider = QtWidgets.QSlider(Form)
        self.position_slider.setMinimumSize(QtCore.QSize(0, 15))
        self.position_slider.setMaximum(100)
        self.position_slider.setOrientation(QtCore.Qt.Horizontal)
        self.position_slider.setObjectName("position_slider")
        self.horizontalLayout_4.addWidget(self.position_slider)
        self.position_spinBox = QtWidgets.QSpinBox(Form)
        self.position_spinBox.setMaximum(100)
        self.position_spinBox.setObjectName("position_spinBox")
        self.horizontalLayout_4.addWidget(self.position_spinBox)
        self.formLayout.setLayout(1, QtWidgets.QFormLayout.FieldRole, self.horizontalLayout_4)
        self.maxStretch_label = QtWidgets.QLabel(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.maxStretch_label.sizePolicy().hasHeightForWidth())
        self.maxStretch_label.setSizePolicy(sizePolicy)
        self.maxStretch_label.setObjectName("maxStretch_label")
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.maxStretch_label)
        self.maxStretch_spinBox = QtWidgets.QDoubleSpinBox(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.maxStretch_spinBox.sizePolicy().hasHeightForWidth())
        self.maxStretch_spinBox.setSizePolicy(sizePolicy)
        self.maxStretch_spinBox.setMinimum(1.0)
        self.maxStretch_spinBox.setSingleStep(0.1)
        self.maxStretch_spinBox.setProperty("value", 1.0)
        self.maxStretch_spinBox.setObjectName("maxStretch_spinBox")
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.maxStretch_spinBox)
        self.maxSquash_label = QtWidgets.QLabel(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.maxSquash_label.sizePolicy().hasHeightForWidth())
        self.maxSquash_label.setSizePolicy(sizePolicy)
        self.maxSquash_label.setObjectName("maxSquash_label")
        self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.maxSquash_label)
        self.maxSquash_spinBox = QtWidgets.QDoubleSpinBox(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.maxSquash_spinBox.sizePolicy().hasHeightForWidth())
        self.maxSquash_spinBox.setSizePolicy(sizePolicy)
        self.maxSquash_spinBox.setMinimum(0.1)
        self.maxSquash_spinBox.setMaximum(1.0)
        self.maxSquash_spinBox.setSingleStep(0.1)
        self.maxSquash_spinBox.setProperty("value", 1.0)
        self.maxSquash_spinBox.setObjectName("maxSquash_spinBox")
        self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.maxSquash_spinBox)
        self.verticalLayout.addLayout(self.formLayout)
        self.groupBox_4 = QtWidgets.QGroupBox(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.groupBox_4.sizePolicy().hasHeightForWidth())
        self.groupBox_4.setSizePolicy(sizePolicy)
        self.groupBox_4.setObjectName("groupBox_4")
        self.gridLayout_5 = QtWidgets.QGridLayout(self.groupBox_4)
        self.gridLayout_5.setObjectName("gridLayout_5")
        self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.label = QtWidgets.QLabel(self.groupBox_4)
        self.label.setObjectName("label")
        self.horizontalLayout_5.addWidget(self.label)
        self.masterLocal_lineEdit = QtWidgets.QLineEdit(self.groupBox_4)
        self.masterLocal_lineEdit.setObjectName("masterLocal_lineEdit")
        self.horizontalLayout_5.addWidget(self.masterLocal_lineEdit)
        self.masterLocal_pushButton = QtWidgets.QPushButton(self.groupBox_4)
        self.masterLocal_pushButton.setObjectName("masterLocal_pushButton")
        self.horizontalLayout_5.addWidget(self.masterLocal_pushButton)
        self.gridLayout_5.addLayout(self.horizontalLayout_5, 0, 0, 1, 1)
        self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_6.setObjectName("horizontalLayout_6")
        self.label_3 = QtWidgets.QLabel(self.groupBox_4)
        self.label_3.setObjectName("label_3")
        self.horizontalLayout_6.addWidget(self.label_3)
        self.masterGlobal_lineEdit = QtWidgets.QLineEdit(self.groupBox_4)
        self.masterGlobal_lineEdit.setObjectName("masterGlobal_lineEdit")
        self.horizontalLayout_6.addWidget(self.masterGlobal_lineEdit)
        self.masterGlobal_pushButton = QtWidgets.QPushButton(self.groupBox_4)
        self.masterGlobal_pushButton.setObjectName("masterGlobal_pushButton")
        self.horizontalLayout_6.addWidget(self.masterGlobal_pushButton)
        self.gridLayout_5.addLayout(self.horizontalLayout_6, 1, 0, 1, 1)
        self.horizontalLayout_7 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_7.setObjectName("horizontalLayout_7")
        self.jntNb_label_3 = QtWidgets.QLabel(self.groupBox_4)
        self.jntNb_label_3.setObjectName("jntNb_label_3")
        self.horizontalLayout_7.addWidget(self.jntNb_label_3)
        self.cnxOffset_spinBox = QtWidgets.QSpinBox(self.groupBox_4)
        self.cnxOffset_spinBox.setMinimum(0)
        self.cnxOffset_spinBox.setMaximum(9999)
        self.cnxOffset_spinBox.setProperty("value", 0)
        self.cnxOffset_spinBox.setObjectName("cnxOffset_spinBox")
        self.horizontalLayout_7.addWidget(self.cnxOffset_spinBox)
        self.gridLayout_5.addLayout(self.horizontalLayout_7, 2, 0, 1, 1)
        self.isGlobalMaster_checkBox = QtWidgets.QCheckBox(self.groupBox_4)
        self.isGlobalMaster_checkBox.setText("Only IK Global Master (No FK ctl and Joints)")
        self.isGlobalMaster_checkBox.setChecked(False)
        self.isGlobalMaster_checkBox.setObjectName("isGlobalMaster_checkBox")
        self.gridLayout_5.addWidget(self.isGlobalMaster_checkBox, 3, 0, 1, 1)
        self.isBoundFkToCurve_checkBox = QtWidgets.QCheckBox(self.groupBox_4)
        self.isBoundFkToCurve_checkBox.setText("Bound each FK controllers the curve")
        self.isBoundFkToCurve_checkBox.setChecked(True)
        self.isBoundFkToCurve_checkBox.setObjectName("isBoundFkToCurve_checkBox")
        self.gridLayout_5.addWidget(self.isBoundFkToCurve_checkBox, 4, 0, 1, 1)
        self.isSplitHip_checkBox = QtWidgets.QCheckBox(self.groupBox_4)
        self.isSplitHip_checkBox.setText("Split Hip Fk control from others.")
        self.isSplitHip_checkBox.setChecked(True)
        self.isSplitHip_checkBox.setObjectName("isSplitHip_checkBox")
        self.gridLayout_5.addWidget(self.isSplitHip_checkBox, 5, 0, 1, 1)
        self.verticalLayout.addWidget(self.groupBox_4)
        self.ikProfile_pushButton = QtWidgets.QPushButton(Form)
        self.ikProfile_pushButton.setObjectName("ikProfile_pushButton")
        self.verticalLayout.addWidget(self.ikProfile_pushButton)
        self.ik0RefArray_groupBox = QtWidgets.QGroupBox(Form)
        self.ik0RefArray_groupBox.setObjectName("ik0RefArray_groupBox")
        self.gridLayout_3 = QtWidgets.QGridLayout(self.ik0RefArray_groupBox)
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.ik0RefArray_horizontalLayout = QtWidgets.QHBoxLayout()
        self.ik0RefArray_horizontalLayout.setObjectName("ik0RefArray_horizontalLayout")
        self.ik0RefArray_verticalLayout_1 = QtWidgets.QVBoxLayout()
        self.ik0RefArray_verticalLayout_1.setObjectName("ik0RefArray_verticalLayout_1")
        self.ik0RefArray_listWidget = QtWidgets.QListWidget(self.ik0RefArray_groupBox)
        self.ik0RefArray_listWidget.setDragDropOverwriteMode(True)
        self.ik0RefArray_listWidget.setDragDropMode(QtWidgets.QAbstractItemView.InternalMove)
        self.ik0RefArray_listWidget.setDefaultDropAction(QtCore.Qt.MoveAction)
        self.ik0RefArray_listWidget.setAlternatingRowColors(True)
        self.ik0RefArray_listWidget.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
        self.ik0RefArray_listWidget.setSelectionRectVisible(False)
        self.ik0RefArray_listWidget.setObjectName("ik0RefArray_listWidget")
        self.ik0RefArray_verticalLayout_1.addWidget(self.ik0RefArray_listWidget)
        self.ik0RefArray_horizontalLayout.addLayout(self.ik0RefArray_verticalLayout_1)
        self.ik0RefArray_verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.ik0RefArray_verticalLayout_2.setObjectName("ik0RefArray_verticalLayout_2")
        self.ik0RefArrayAdd_pushButton = QtWidgets.QPushButton(self.ik0RefArray_groupBox)
        self.ik0RefArrayAdd_pushButton.setObjectName("ik0RefArrayAdd_pushButton")
        self.ik0RefArray_verticalLayout_2.addWidget(self.ik0RefArrayAdd_pushButton)
        self.ik0RefArrayRemove_pushButton = QtWidgets.QPushButton(self.ik0RefArray_groupBox)
        self.ik0RefArrayRemove_pushButton.setObjectName("ik0RefArrayRemove_pushButton")
        self.ik0RefArray_verticalLayout_2.addWidget(self.ik0RefArrayRemove_pushButton)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.ik0RefArray_verticalLayout_2.addItem(spacerItem)
        self.ik0RefArray_horizontalLayout.addLayout(self.ik0RefArray_verticalLayout_2)
        self.gridLayout_3.addLayout(self.ik0RefArray_horizontalLayout, 0, 0, 1, 1)
        self.verticalLayout.addWidget(self.ik0RefArray_groupBox)
        self.ik1RefArray_groupBox = QtWidgets.QGroupBox(Form)
        self.ik1RefArray_groupBox.setObjectName("ik1RefArray_groupBox")
        self.gridLayout_31 = QtWidgets.QGridLayout(self.ik1RefArray_groupBox)
        self.gridLayout_31.setObjectName("gridLayout_31")
        self.ik1RefArray_horizontalLayout = QtWidgets.QHBoxLayout()
        self.ik1RefArray_horizontalLayout.setObjectName("ik1RefArray_horizontalLayout")
        self.ik1RefArray_verticalLayout_1 = QtWidgets.QVBoxLayout()
        self.ik1RefArray_verticalLayout_1.setObjectName("ik1RefArray_verticalLayout_1")
        self.ik1RefArray_listWidget = QtWidgets.QListWidget(self.ik1RefArray_groupBox)
        self.ik1RefArray_listWidget.setDragDropOverwriteMode(True)
        self.ik1RefArray_listWidget.setDragDropMode(QtWidgets.QAbstractItemView.InternalMove)
        self.ik1RefArray_listWidget.setDefaultDropAction(QtCore.Qt.MoveAction)
        self.ik1RefArray_listWidget.setAlternatingRowColors(True)
        self.ik1RefArray_listWidget.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
        self.ik1RefArray_listWidget.setSelectionRectVisible(False)
        self.ik1RefArray_listWidget.setObjectName("ik1RefArray_listWidget")
        self.ik1RefArray_verticalLayout_1.addWidget(self.ik1RefArray_listWidget)
        self.ik1RefArray_horizontalLayout.addLayout(self.ik1RefArray_verticalLayout_1)
        self.ik1RefArray_verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.ik1RefArray_verticalLayout_2.setObjectName("ik1RefArray_verticalLayout_2")
        self.ik1RefArrayAdd_pushButton = QtWidgets.QPushButton(self.ik1RefArray_groupBox)
        self.ik1RefArrayAdd_pushButton.setObjectName("ik1RefArrayAdd_pushButton")
        self.ik1RefArray_verticalLayout_2.addWidget(self.ik1RefArrayAdd_pushButton)
        self.ik1RefArrayRemove_pushButton = QtWidgets.QPushButton(self.ik1RefArray_groupBox)
        self.ik1RefArrayRemove_pushButton.setObjectName("ik1RefArrayRemove_pushButton")
        self.ik1RefArray_verticalLayout_2.addWidget(self.ik1RefArrayRemove_pushButton)
        spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.ik1RefArray_verticalLayout_2.addItem(spacerItem1)
        self.ik1RefArray_horizontalLayout.addLayout(self.ik1RefArray_verticalLayout_2)
        self.gridLayout_31.addLayout(self.ik1RefArray_horizontalLayout, 0, 0, 1, 1)
        self.verticalLayout.addWidget(self.ik1RefArray_groupBox)
        spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem2)

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