当前位置: 首页>>代码示例>>Python>>正文


Python ownButton.OwnButton类代码示例

本文整理汇总了Python中ownComponents.ownButton.OwnButton的典型用法代码示例。如果您正苦于以下问题:Python OwnButton类的具体用法?Python OwnButton怎么用?Python OwnButton使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了OwnButton类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: create_input_area

 def create_input_area(self):
     inputArea = GridLayout(cols=6, row_force_default=True,
                          row_default_height=Design.btnHeight, size_hint_y=None,
                          height=2.1 * Design.btnHeight)
     # create and bind btns
     self.lowerStrainBtn = OwnButton(text=self.defaultMaxStrain)
     self.lowerStrainBtn.bind(on_press=self.show_popup)
     self.upperStrainBtn = OwnButton(text=self.defaultMinStrain)
     self.upperStrainBtn.bind(on_press=self.show_popup)
     self.integrationNumberBtn = OwnButton(text=self.defaultNumber)
     self.integrationNumberBtn.bind(on_press=self.show_popup)
     self.normalForceLbl = OwnLabel()
     self.momentLbl = OwnLabel()
     # fill the inputArea
     inputArea.add_widget(OwnLabel(text=self.lowerStrainStr))
     inputArea.add_widget(self.lowerStrainBtn)
     inputArea.add_widget(OwnLabel(text=self.upperStrainStr))
     inputArea.add_widget(self.upperStrainBtn)
     inputArea.add_widget(OwnLabel(text=self.numberStr))
     inputArea.add_widget(self.integrationNumberBtn)
     inputArea.add_widget(OwnLabel(text=self.nfStr))
     inputArea.add_widget(self.normalForceLbl)
     inputArea.add_widget(OwnLabel(text=self.momStr))
     inputArea.add_widget(self.momentLbl)
     self.add_widget(inputArea)
开发者ID:simbtrix,项目名称:mxnix,代码行数:25,代码来源:gui.py

示例2: update

 def update(self):
     self.materialLayout.remove_widget(self.btnMaterialEditor)
     btn_material_A = OwnButton(text=self.allMaterials.allMaterials[-1].name)
     btn_material_A.height = self.h
     btn_material_A.bind(on_press=self.show_material_information)
     self.materialLayout.add_widget(btn_material_A)
     self.materialLayout.add_widget(self.btnMaterialEditor)
开发者ID:simbtrix,项目名称:screenmix,代码行数:7,代码来源:editor.py

示例3: create_btns

 def create_btns(self):
     self.aBtn = OwnButton(text=str(self.editor.a))
     self.aBtn.bind(on_press=self.show_popup)
     self.bBtn = OwnButton(text=str(self.editor.b))
     self.bBtn.bind(on_press=self.show_popup)
     self.btnQuadratic = OwnButton(text=self.quadraticStr)
     self.btnQuadratic.bind(on_press=self.show_type_selection)
     self.create_base_btns()
开发者ID:simbtrix,项目名称:mxnix,代码行数:8,代码来源:quadraticInformation.py

示例4: create_btns

 def create_btns(self):
     self.aBtn = OwnButton(text=str(self.editor.a))
     self.aBtn.bind(on_press=self.show_popup)
     self.bBtn = OwnButton(text=str(self.editor.b))
     self.bBtn.bind(on_press=self.show_popup)
     self.btnExponential = OwnButton(text=self.exponentialStr)
     self.btnExponential.bind(on_press=self.show_type_selection)
     self.create_base_btns()
开发者ID:simbtrix,项目名称:mxnix,代码行数:8,代码来源:exponentialInformation.py

示例5: create_base_btns

 def create_base_btns(self):
     self.btnStrainUL = OwnButton(text=str(self.editor.maxStrain))
     self.btnStrainLL = OwnButton(text=str(self.editor.minStrain))
     self.btnConfirm = OwnButton(text=self.okStr)
     self.btnCancel = OwnButton(text=self.cancelStr)
     self.btnConfirm.bind(on_press=self.editor.confirm)
     self.btnStrainUL.bind(on_press=self.show_popup)
     self.btnStrainLL.bind(on_press=self.show_popup)
     self.btnCancel.bind(on_press=self.editor.cancel)
开发者ID:simbtrix,项目名称:mxnix,代码行数:9,代码来源:ainformation.py

示例6: create_all_btns

 def create_all_btns(self):
     self.topWidth = OwnButton(text=str(self.csShape.tw))
     self.bottomWidth = OwnButton(text=str(self.csShape.bw))
     self.topHeight = OwnButton(text=str(self.csShape.th))
     self.bottomHeight = OwnButton(text=str(self.csShape.bh))
     self.topWidth.bind(on_press=self.show_numpad)
     self.topHeight.bind(on_press=self.show_numpad)
     self.bottomWidth.bind(on_press=self.show_numpad)
     self.bottomHeight.bind(on_press=self.show_numpad)
开发者ID:simbtrix,项目名称:mxnix,代码行数:9,代码来源:shapeTInformation.py

示例7: create_material_information

 def create_material_information(self):
     # create the btns to edit the values or the name
     self.btnName, self.btnPrice = OwnButton(), OwnButton()
     self.btnDensity, self.btnStiffness = OwnButton(), OwnButton()
     self.btnStrenght = OwnButton()
     # bind the values to the methods show_numpad and show_keyboard
     self.btnName.bind(on_press=self.show_keyboard)
     self.btnPrice.bind(on_press=self.show_numpad)
     self.btnDensity.bind(on_press=self.show_numpad)
     self.btnStiffness.bind(on_press=self.show_numpad)
     self.btnStrenght.bind(on_press=self.show_numpad)
     # fill the contentLayout with the components
     self.contentLayout = GridLayout(cols=2, row_force_default=True,
                                 row_default_height=Design.btnHeight,
                                 height=Design.btnHeight,
                                 spacing=Design.spacing)
     self.contentLayout.add_widget(OwnLabel(text=self.nameStr))
     self.contentLayout.add_widget(self.btnName)
     self.contentLayout.add_widget(OwnLabel(text=self.priceStr))
     self.contentLayout.add_widget(self.btnPrice)
     self.contentLayout.add_widget(OwnLabel(text=self.densityStr))
     self.contentLayout.add_widget(self.btnDensity)
     self.contentLayout.add_widget(OwnLabel(text=self.stiffnessStr))
     self.contentLayout.add_widget(self.btnStiffness)
     self.contentLayout.add_widget(OwnLabel(text=self.strengthStr))
     self.contentLayout.add_widget(self.btnStrenght)
     # btn_back=go back to the materials-view
     btn_back = OwnButton(text=self.backStr)
     btn_back.bind(on_press=self.cancel_show)
     # edit the new values
     btn_confirm = OwnButton(text=self.confirmStr)
     btn_confirm.bind(on_press=self.edit_material)
     self.contentLayout.add_widget(btn_confirm)
     self.contentLayout.add_widget(btn_back)
     self.create_popups()
开发者ID:simbtrix,项目名称:screenmix,代码行数:35,代码来源:editor.py

示例8: create_btns

 def create_btns(self):
     self.btnOK = OwnButton(text=self.okStr)
     self.btnOK.bind(on_press=self.finished)
     self.btnCancel = OwnButton(text=self.cancelStr)
     self.btnCancel.bind(on_press=self.cancel)
     # default-shape=rectangle
     self.focusShape = OwnButton(text=self.rectStr)
     self.focusShape.bind(on_press=self.show_shapes_btn)
     # btns
     self.plot = OwnButton(text=self.rectStr)
     self.plot.bind(on_press=self.show_rectangle)
开发者ID:simbtrix,项目名称:screenmix,代码行数:11,代码来源:shapeSelection.py

示例9: CircleInformation

class CircleInformation(GridLayout):
    
    '''
    create the component, where you can change the diameter
    of the cross-section-circle
    '''
    
    # circle-shape
    csShape = ObjectProperty()
    
    diameter = StringProperty('diameter [m]')
    
    '''
    constructor
    '''
    
    def __init__(self, **kwargs):
        super(CircleInformation, self).__init__(**kwargs)
        self.cols, self.spacing = 2, Design.spacing
        self.height, self.size_hint_y = Design.btnHeight, None
    
    '''
    create the gui of the circle-information
    '''
    
    def create_gui(self):
        # create the popup where you can set the diamter
        self.numpad = Numpad(p=self)
        self.popup = OwnPopup(title=self.diameter, content=self.numpad)
        # create the information        
        self.add_widget(OwnLabel(text=self.diameter))
        self.btnDiameter = OwnButton(text=str(self.csShape.d))
        self.btnDiameter.bind(on_press=self.popup.open)
        self.add_widget(self.btnDiameter)
    
    '''
    close the numpad. this method will be call by the numpad-component
    '''
    
    def close_numpad(self):
        self.popup.dismiss()
        
    '''
    set the text of the button
    '''
    
    def finished_numpad(self):
        d = float(self.numpad.lblTextinput.text)
        self.btnDiameter.text = str(d)
        self.csShape.d = d
        self.csShape.view.update_circle(d)
        self.popup.dismiss()
开发者ID:simbtrix,项目名称:mxnix,代码行数:52,代码来源:circleInformation.py

示例10: create_base_btns

 def create_base_btns(self):
     # materialname
     self.nameBtn = OwnButton(text=self.nameStr)
     self.nameBtn.bind(on_press=self.show_keyboard)
     # materialprice
     self.priceBtn = OwnButton(text=self.defaultValueStr)
     self.priceBtn.bind(on_press=self.show_numpad)
     # materialdensity
     self.densityBtn = OwnButton(text=self.defaultValueStr)
     self.densityBtn.bind(on_press=self.show_numpad)
     # material law
     self.materialLaw = OwnButton(text=self.defaultFStr)
     self.materialLaw.bind(on_press=self.show_material_law_editor)
开发者ID:simbtrix,项目名称:mxnix,代码行数:13,代码来源:aeditor.py

示例11: create_btns

 def create_btns(self):
     # create the btns
     self.materialBtn = OwnButton(text=self.steelStr)
     self.yCoordinateBtn = OwnButton(text=self.defaultValueStr)
     self.csAreaBtn = OwnButton(text=self.defaultValueStr)
     self.confirmBtn = OwnButton(text=self.confirmStr)
     self.cancelBtn = OwnButton(text=self.cancelStr)
     # bind the btns
     self.materialBtn.bind(on_press=self.show_material_selection)
     self.confirmBtn.bind(on_press=self.confirm_input)
     self.cancelBtn.bind(on_press=self.cancel_input)
     self.yCoordinateBtn.bind(on_press=self.show_numpad)
     self.csAreaBtn.bind(on_press=self.show_numpad)
开发者ID:simbtrix,项目名称:mxnix,代码行数:13,代码来源:editLayer.py

示例12: create_limit_area

 def create_limit_area(self):
     self.limitArea = GridLayout(cols=2, spacing=Design.spacing)
     self.limitArea.add_widget(OwnLabel(text=self.stressULStr))
     self.limitArea.add_widget(self.btnStressUL)
     self.limitArea.add_widget(OwnLabel(text=self.stressLLStr))
     self.limitArea.add_widget(self.btnStressLL)
     self.limitArea.add_widget(OwnLabel(text=self.strainULStr))
     self.limitArea.add_widget(self.btnStrainUL)
     self.limitArea.add_widget(OwnLabel(text=self.strainLLStr))
     self.limitArea.add_widget(self.btnStrainLL)
     btnConfirm = OwnButton(text='ok')
     btnConfirm.bind(on_press=self.hide_limit_area)
     self.limitArea.add_widget(btnConfirm)
开发者ID:simbtrix,项目名称:mxnix,代码行数:13,代码来源:mulitlinearInformation.py

示例13: create_gui

 def create_gui(self):
     # self.create_material_information()
     self.materialLayout = GridLayout(cols=1, spacing=2, size_hint_y=None)
     # Make sure the height is such that there is something to scroll.
     self.materialLayout.bind(minimum_height=self.materialLayout.setter('height'))
     for i in self.allMaterials.allMaterials:
         btn = OwnButton(text=i.name)
         btn.bind(on_press=self.show_material_information)
         self.materialLayout.add_widget(btn)
     self.btnMaterialEditor = OwnButton(text=self.createStr)
     self.btnMaterialEditor.bind(on_press=self.show_creater)
     self.materialLayout.add_widget(self.btnMaterialEditor)
     self.add_widget(self.materialLayout)
开发者ID:simbtrix,项目名称:mxnix,代码行数:13,代码来源:editor.py

示例14: create_gui

 def create_gui(self):
     # create the area where you can scale the height
     # and the width of the cross section
     self.btnheight = OwnButton(text=str(self.cs.h))
     self.btnwidth = OwnButton(text=str(self.cs.w))
     self.add_widget(OwnLabel(text=self.heightStr))
     self.add_widget(self.btnheight)
     self.add_widget(OwnLabel(text=self.widthStr))
     self.add_widget(self.btnwidth)
     self.btnheight.bind(on_press=self.show_numpad)
     self.btnwidth.bind(on_press=self.show_numpad)
     # create the numpad, where you can input values
     self.numpad = Numpad(p=self)
     self.popupNumpad = OwnPopup(content=self.numpad)
开发者ID:simbtrix,项目名称:screenmix,代码行数:14,代码来源:rectInformation.py

示例15: create_gui

 def create_gui(self):
     # create Numpad
     self.numpad = Numpad(p=self)
     self.popUp = OwnPopup(content=self.numpad)
     self.heightValue = OwnLabel(text=self.heightStr)
     self.btnHeight = OwnButton(text=str(self.csShape.ch))
     self.btnHeight.bind(on_press=self.show_numpad)
     self.add_widget(self.heightValue)
     self.add_widget(self.btnHeight)
     self.widthValue = OwnLabel(text=self.widthStr)
     self.btnWidth = OwnButton(text=str(self.csShape.cw))
     self.btnWidth.bind(on_press=self.show_numpad)
     self.add_widget(self.widthValue)
     self.add_widget(self.btnWidth)
开发者ID:simbtrix,项目名称:mxnix,代码行数:14,代码来源:rectangleInformation.py


注:本文中的ownComponents.ownButton.OwnButton类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。