Пример #1
0
    def createContent(self):

        self.contentLayout = guitk.BCGridLayoutCreate(self.frame, 5, 3)

        # clip type selector
        label = guitk.BCLabelCreate(self.contentLayout,
                                    'Select CLIP geometrical type')
        clipTypeOptions = list(comp_items.CLIP_GEOM_TYPES.keys())
        self.clipGeomTypeComboBox = guitk.BCComboBoxCreate(
            self.contentLayout, clipTypeOptions)

        guitk.BCGridLayoutAddWidget(self.contentLayout, label, 0, 0,
                                    guitk.constants.BCAlignLeft)
        guitk.BCGridLayoutAddWidget(self.contentLayout,
                                    self.clipGeomTypeComboBox, 0, 1,
                                    guitk.constants.BCAlignLeft)

        # entity info
        self._addContentLine('Geomerical type Info:', 'geomTypeInfo')

        # manufacturer selector
        label = guitk.BCLabelCreate(self.contentLayout,
                                    'Select CLIP beam type')
        clipTypeOptions = list(comp_items.CLIP_BEAM_TYPES.keys())
        self.clipBeamTypeComboBox = guitk.BCComboBoxCreate(
            self.contentLayout, clipTypeOptions)

        guitk.BCGridLayoutAddWidget(self.contentLayout, label, 2, 0,
                                    guitk.constants.BCAlignLeft)
        guitk.BCGridLayoutAddWidget(self.contentLayout,
                                    self.clipBeamTypeComboBox, 2, 1,
                                    guitk.constants.BCAlignLeft)

        # entity info
        self._addContentLine('Beam type Info:', 'beamTypeInfo')

        # setup connections
        guitk.BCComboBoxSetCurrentIndexChangedFunction(
            self.clipBeamTypeComboBox, self.beamTypeChanged, None)
        guitk.BCComboBoxSetCurrentIndexChangedFunction(
            self.clipGeomTypeComboBox, self.geomTypeChanged, None)

        # set initial values
        guitk.BCComboBoxSetCurrentItem(self.clipBeamTypeComboBox,
                                       self.parentApplication.DFT_TYPE_BEAM)
        guitk.BCComboBoxSetCurrentItem(self.clipGeomTypeComboBox,
                                       self.parentApplication.DFT_TYPE_GEOM)

        #TODO: this will be replaced with other geometrical types loaded from comp_items
        self.geomTypeChanged(self.clipGeomTypeComboBox,
                             self.parentApplication.DFT_TYPE_GEOM, None)
        self.beamTypeChanged(self.clipBeamTypeComboBox,
                             self.parentApplication.DFT_TYPE_BEAM, None)
def Isolate_face_area():
	TopWindow = guitk.BCWindowCreate("Display faces Less than", guitk.constants.BCOnExitDestroy)
	BCGridLayout_1 = guitk.BCGridLayoutCreate(TopWindow, 1, 2)
	BCLabel_1 = guitk.BCLabelCreate(TopWindow, "Input")
	BCLineEdit_1 = guitk.BCLineEditCreate(TopWindow, "1")
	bclist=[BCLineEdit_1]
	BCDialogButtonBox_1 = guitk.BCDialogButtonBoxCreate(TopWindow)
Пример #3
0
    def _addContentLine(self, label, valueAttrName):

        rowCount = guitk.BCGridLayoutRows(self.contentLayout)

        labelWidget = guitk.BCLabelCreate(self.contentLayout, label)
        valueWidget = guitk.BCLabelTickerCreate(self.contentLayout, '-')

        setattr(self, valueAttrName + '_label', labelWidget)
        setattr(self, valueAttrName, valueWidget)
        self.infoAttributeNames.append(valueAttrName)

        guitk.BCGridLayoutAddWidget(self.contentLayout, labelWidget, rowCount,
                                    0, guitk.constants.BCAlignLeft)
        guitk.BCGridLayoutAddWidget(self.contentLayout, valueWidget, rowCount,
                                    1, guitk.constants.BCAlignLeft)
Пример #4
0
    def __init__(self):

        revision, modifiedBy, lastModified = util.getVersionInfo()

        self.dialog = guitk.BCWindowCreate("%s (%s)" % (self.TITLE, revision),
                                           guitk.constants.BCOnExitDestroy)

        self.creator = SchutzKlasseSetsCreator()

        guitk.BCWindowSetInitSize(self.dialog, self.WIDTH, self.HEIGTH)
        guitk.BCWindowSetSaveSettings(self.dialog, False)

        self.mainLayout = guitk.BCBoxLayoutCreate(self.dialog,
                                                  guitk.constants.BCVertical)

        # input path
        configFileLayout = guitk.BCBoxLayoutCreate(
            self.dialog, guitk.constants.BCHorizontal)
        guitk.BCLabelCreate(configFileLayout, 'Input configuration file')

        self.inputConfigFileLineEdit = guitk.BCLineEditPathCreate(
            configFileLayout, guitk.constants.BCHistoryFiles,
            os.path.dirname(base.DataBaseName()),
            guitk.constants.BCHistorySelect, 'schutzKlasseInputConfigFile')
        guitk.BCLineEditPathSetFilter(self.inputConfigFileLineEdit,
                                      'MS Excel files (*.xlsx)')

        #		# output path
        #		configFileLayout = guitk.BCBoxLayoutCreate(self.dialog, guitk.constants.BCHorizontal)
        #		guitk.BCLabelCreate(configFileLayout, 'Output include file')
        #		self.outputIncludeFileLineEdit = guitk.BCLineEditPathCreate(configFileLayout, guitk.constants.BCHistoryFiles,
        #			os.path.dirname(base.DataBaseName()), guitk.constants.BCHistorySaveAs, 'schutzKlasseOutInclude')
        #		guitk.BCLineEditPathSetFilter(self.outputIncludeFileLineEdit, 'ABAQUS (*.inc)')

        dbb = guitk.BCDialogButtonBoxCreate(self.dialog)
        acceptButton = guitk.BCDialogButtonBoxGetAcceptButton(dbb)
        guitk.BCButtonSetText(acceptButton, 'Create sets')
        b = guitk.BCPushButtonCreate(dbb, 'Export include', self.exportInclude,
                                     None)
        guitk.BCDialogButtonBoxAddButton(dbb, b)

        guitk.BCWindowSetAcceptFunction(self.dialog, self.createSets, None)

        guitk.BCShow(self.dialog)
Пример #5
0
    def createContent(self):
        ''' This is a space for the code where page widget definition should/can be done.
		
		Please keep "self.contentLayout" attribute name for main page layout.'''

        #		self.contentLayout = guitk.BCBoxLayoutCreate(self.frame, guitk.constants.BCVertical)
        self.contentLayout = guitk.BCGridLayoutCreate(self.frame, 3, 4)

        self._addContentLine('Select CON', 'selectedCONid')

        self.pushButtonSelectCon = guitk.BCPushButtonCreate(
            self.contentLayout, "Select", self.conSelect, None)
        guitk.BCGridLayoutAddWidget(self.contentLayout,
                                    self.pushButtonSelectCon, 1, 2,
                                    guitk.constants.BCAlignLeft)

        # rotate coor sys
        labelWidget = guitk.BCLabelCreate(self.contentLayout,
                                          'Rotate coor sys')
        guitk.BCGridLayoutAddWidget(self.contentLayout, labelWidget, 2, 0,
                                    guitk.constants.BCAlignLeft)

        #		self.coorSysIdLabelWidget = guitk.BCLabelCreate(gridLayout, 'Count: -')
        #		guitk.BCGridLayoutAddWidget(gridLayout, self.coorSysIdLabelWidget, 0, 1, guitk.constants.BCAlignHCenter)
        #
        #		self.pushButtonSelectCoorSys = guitk.BCPushButtonCreate(gridLayout, "", self.selectCoorSys, None)
        #		guitk.BCButtonSetIconFileName(self.pushButtonSelectCoorSys, self.PICK_ICON_PATH)
        #		guitk.BCGridLayoutAddWidget(gridLayout, self.pushButtonSelectCoorSys, 0, 2, guitk.constants.BCAlignLeft)

        # rotate X
        self.pushButtonRotXminus = guitk.BCPushButtonCreate(
            self.contentLayout, "-X", self.rotateXminus, None)
        guitk.BCGridLayoutAddWidget(self.contentLayout,
                                    self.pushButtonRotXminus, 2, 1,
                                    guitk.constants.BCAlignLeft)

        self.pushButtonRotXplus = guitk.BCPushButtonCreate(
            self.contentLayout, "+X", self.rotateXplus, None)
        guitk.BCGridLayoutAddWidget(self.contentLayout,
                                    self.pushButtonRotXplus, 2, 2,
                                    guitk.constants.BCAlignLeft)

        self.rotXspinBox = guitk.BCSpinBoxCreate(self.contentLayout)
        guitk.BCGridLayoutAddWidget(self.contentLayout, self.rotXspinBox, 2, 3,
                                    guitk.constants.BCAlignLeft)
        guitk.BCSpinBoxSetValue(self.rotXspinBox, 5)

        # rotate Y
        self.pushButtonRotYminus = guitk.BCPushButtonCreate(
            self.contentLayout, "-Y", self.rotateYminus, None)
        guitk.BCGridLayoutAddWidget(self.contentLayout,
                                    self.pushButtonRotYminus, 3, 1,
                                    guitk.constants.BCAlignLeft)

        self.pushButtonRotYplus = guitk.BCPushButtonCreate(
            self.contentLayout, "+Y", self.rotateYplus, None)
        guitk.BCGridLayoutAddWidget(self.contentLayout,
                                    self.pushButtonRotYplus, 3, 2,
                                    guitk.constants.BCAlignLeft)

        self.rotYspinBox = guitk.BCSpinBoxCreate(self.contentLayout)
        guitk.BCGridLayoutAddWidget(self.contentLayout, self.rotYspinBox, 3, 3,
                                    guitk.constants.BCAlignLeft)
        guitk.BCSpinBoxSetValue(self.rotYspinBox, 5)

        # rotate Z
        self.pushButtonRotZminus = guitk.BCPushButtonCreate(
            self.contentLayout, "-Z", self.rotateZminus, None)
        guitk.BCGridLayoutAddWidget(self.contentLayout,
                                    self.pushButtonRotZminus, 4, 1,
                                    guitk.constants.BCAlignLeft)

        self.pushButtonRotZplus = guitk.BCPushButtonCreate(
            self.contentLayout, "+Z", self.rotateZplus, None)
        guitk.BCGridLayoutAddWidget(self.contentLayout,
                                    self.pushButtonRotZplus, 4, 2,
                                    guitk.constants.BCAlignLeft)

        self.rotZspinBox = guitk.BCSpinBoxCreate(self.contentLayout)
        guitk.BCGridLayoutAddWidget(self.contentLayout, self.rotZspinBox, 4, 3,
                                    guitk.constants.BCAlignLeft)
        guitk.BCSpinBoxSetValue(self.rotZspinBox, 5)

        self._setRotationButtonsEnabled(False)