本文整理汇总了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)
示例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)