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


Python WidgetFactory.buildCheckSizer方法代码示例

本文整理汇总了Python中WidgetFactory.buildCheckSizer方法的典型用法代码示例。如果您正苦于以下问题:Python WidgetFactory.buildCheckSizer方法的具体用法?Python WidgetFactory.buildCheckSizer怎么用?Python WidgetFactory.buildCheckSizer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WidgetFactory的用法示例。


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

示例1: buildControls

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildCheckSizer [as 别名]
  def buildControls(self,parameters):
    mainSizer = wx.BoxSizer(wx.VERTICAL)
    associationSizer = wx.BoxSizer(wx.HORIZONTAL)
    mainSizer.Add(WidgetFactory.buildCheckSizer(self,'Alternative',GOALASSOCIATION_CHECKALTERNATIVE_ID,False),0,wx.EXPAND)
    mainSizer.Add(associationSizer,0,wx.EXPAND)
    environments = self.dbProxy.getDimensionNames('environment')
    goals = []
    associationTypes = ['and','or','conflict','responsible','obstruct','resolve']
    goalDimensions = ['goal','requirement','countermeasure','obstacle']
    subGoalDimensions = ['goal','requirement','role','task','usecase','countermeasure','domainproperty','obstacle','threat','vulnerability']

    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'Environment',(87,30),GOALASSOCIATION_COMBOENVIRONMENT_ID,environments),0,wx.EXPAND)
    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'Dimension',(87,30),GOALASSOCIATION_COMBOGOALDIM_ID,goalDimensions),0,wx.EXPAND)
    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'Goal',(87,30),GOALASSOCIATION_COMBOGOAL_ID,goals),0,wx.EXPAND)
    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'Type',(87,30),GOALASSOCIATION_COMBOATYPE_ID,associationTypes),0,wx.EXPAND)
    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'Dimension',(87,30),GOALASSOCIATION_COMBOSUBGOALDIM_ID,subGoalDimensions),0,wx.EXPAND)
    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'Sub-Goal',(87,30),GOALASSOCIATION_COMBOSUBGOAL_ID,goals),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildMLTextSizer(self,'Rationale',(87,60),GOALASSOCIATION_TEXTRATIONALE_ID),1,wx.EXPAND,1,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildAddCancelButtonSizer(self,GOALASSOCIATION_BUTTONCOMMIT_ID),0,wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)

    wx.EVT_BUTTON(self,GOALASSOCIATION_BUTTONCOMMIT_ID,self.onCommit)
    wx.EVT_COMBOBOX(self,GOALASSOCIATION_COMBOENVIRONMENT_ID,self.onEnvironmentChange)
    wx.EVT_COMBOBOX(self,GOALASSOCIATION_COMBOGOALDIM_ID,self.onGoalDimChange)
    wx.EVT_COMBOBOX(self,GOALASSOCIATION_COMBOSUBGOALDIM_ID,self.onSubGoalDimChange)
开发者ID:AntonP1337,项目名称:cairis,代码行数:27,代码来源:GoalAssociationDialog.py

示例2: buildControls

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildCheckSizer [as 别名]
    def buildControls(self, parameters):
        mainSizer = wx.BoxSizer(wx.VERTICAL)
        associationSizer = wx.BoxSizer(wx.HORIZONTAL)
        mainSizer.Add(
            WidgetFactory.buildCheckSizer(self, "Alternative", GOALASSOCIATION_CHECKALTERNATIVE_ID, False), 0, wx.EXPAND
        )
        mainSizer.Add(associationSizer, 0, wx.EXPAND)
        environments = self.dbProxy.getDimensionNames("environment")
        goals = []
        associationTypes = ["and", "or", "conflict", "responsible", "obstruct", "resolve"]
        goalDimensions = ["goal", "requirement", "countermeasure", "obstacle"]
        subGoalDimensions = [
            "goal",
            "requirement",
            "role",
            "task",
            "usecase",
            "countermeasure",
            "domainproperty",
            "obstacle",
            "threat",
            "vulnerability",
        ]

        associationSizer.Add(
            WidgetFactory.buildComboSizerList(
                self, "Environment", (87, 30), GOALASSOCIATION_COMBOENVIRONMENT_ID, environments
            ),
            0,
            wx.EXPAND,
        )
        associationSizer.Add(
            WidgetFactory.buildComboSizerList(
                self, "Dimension", (87, 30), GOALASSOCIATION_COMBOGOALDIM_ID, goalDimensions
            ),
            0,
            wx.EXPAND,
        )
        associationSizer.Add(
            WidgetFactory.buildComboSizerList(self, "Goal", (87, 30), GOALASSOCIATION_COMBOGOAL_ID, goals), 0, wx.EXPAND
        )
        associationSizer.Add(
            WidgetFactory.buildComboSizerList(self, "Type", (87, 30), GOALASSOCIATION_COMBOATYPE_ID, associationTypes),
            0,
            wx.EXPAND,
        )
        associationSizer.Add(
            WidgetFactory.buildComboSizerList(
                self, "Dimension", (87, 30), GOALASSOCIATION_COMBOSUBGOALDIM_ID, subGoalDimensions
            ),
            0,
            wx.EXPAND,
        )
        associationSizer.Add(
            WidgetFactory.buildComboSizerList(self, "Sub-Goal", (87, 30), GOALASSOCIATION_COMBOSUBGOAL_ID, goals),
            0,
            wx.EXPAND,
        )
        mainSizer.Add(
            WidgetFactory.buildMLTextSizer(self, "Rationale", (87, 60), GOALASSOCIATION_TEXTRATIONALE_ID),
            1,
            wx.EXPAND,
            1,
            wx.EXPAND,
        )
        mainSizer.Add(
            WidgetFactory.buildAddCancelButtonSizer(self, GOALASSOCIATION_BUTTONCOMMIT_ID), 0, wx.ALIGN_CENTER
        )
        self.SetSizer(mainSizer)

        wx.EVT_BUTTON(self, GOALASSOCIATION_BUTTONCOMMIT_ID, self.onCommit)
        wx.EVT_COMBOBOX(self, GOALASSOCIATION_COMBOENVIRONMENT_ID, self.onEnvironmentChange)
        wx.EVT_COMBOBOX(self, GOALASSOCIATION_COMBOGOALDIM_ID, self.onGoalDimChange)
        wx.EVT_COMBOBOX(self, GOALASSOCIATION_COMBOSUBGOALDIM_ID, self.onSubGoalDimChange)
开发者ID:failys,项目名称:cairis,代码行数:76,代码来源:GoalAssociationDialog.py


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