Exemplo n.º 1
0
    def setupUI(self):
        mainLayout = QtGui.QVBoxLayout()
        self.attrlayout = utils.VertBox()

        self.moduleNameEdit = utils.LabelEdit(label='Module Name:')

        separator = QtGui.QFrame()
        separator.setFrameShape(QtGui.QFrame.HLine)
        separator.setFrameShadow(QtGui.QFrame.Sunken)

        self.createModuleBtn = QtGui.QPushButton('Create')

        self.attrlayout.addWidget(self.moduleNameEdit)

        mainLayout.addLayout(self.attrlayout)
        mainLayout.addWidget(separator)
        mainLayout.addWidget(self.createModuleBtn)

        # self.createModuleBtn.clicked.connect(self.createModule)
        self.setLayout(mainLayout)
Exemplo n.º 2
0
    def setupUI(self):
        centralWidget = QtGui.QWidget()
        mainLayout = QtGui.QVBoxLayout()
        self.attrlayout = QtGui.QVBoxLayout()

        self.box = utils.TitledBox(title='Attributes', settings=1)

        self.moduleNameEdit = utils.LabelEdit(label='Module Name:')
        self.moduleNameEdit.edit.setText(self.moduleName.capitalize())

        self.jointNumberWidget = QtGui.QWidget()
        self.jointNumberLayout = QtGui.QHBoxLayout()
        self.jointNumberLayout.setContentsMargins(10, 0, 10, 0)
        jointNumberLabel = QtGui.QLabel('Joint Number: ')
        self.jointNumberSpin = QtGui.QSpinBox()
        self.jointNumberSpin.setMinimum(1)
        self.jointNumberLayout.addWidget(jointNumberLabel)
        self.jointNumberLayout.addWidget(self.jointNumberSpin)
        self.jointNumberWidget.setLayout(self.jointNumberLayout)

        separator = QtGui.QFrame()
        separator.setFrameShape(QtGui.QFrame.HLine)
        separator.setFrameShadow(QtGui.QFrame.Sunken)

        createModuleBtn = QtGui.QPushButton('Create')

        # self.attrlayout.addLayout(templateNameLayout)
        self.attrlayout.addWidget(self.moduleNameEdit)
        self.attrlayout.addWidget(self.jointNumberWidget)
        self.box.groupBoxLayout.addLayout(self.attrlayout)

        self.box.groupBoxLayout.addWidget(separator)
        self.box.groupBoxLayout.addWidget(createModuleBtn)

        mainLayout.addWidget(self.box)

        createModuleBtn.clicked.connect(self.createModule)
        centralWidget.setLayout(mainLayout)

        self.setCentralWidget(centralWidget)