本文整理汇总了Python中exe.webui.block.Block.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Block.__init__方法的具体用法?Python Block.__init__怎么用?Python Block.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类exe.webui.block.Block
的用法示例。
在下文中一共展示了Block.__init__方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
def __init__(self, parent, idevice):
Block.__init__(self, parent, idevice)
self.mainElements = idevice.mainFieldSet.makeElementDict()
self.memoryMatchElements = []
for memoryMatchField in idevice.matchPairFields:
memoryMatchElement = MemoryMatchPairElement(memoryMatchField)
self.memoryMatchElements.append(memoryMatchElement)
示例2: __init__
# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
def __init__(self, parent, idevice):
Block.__init__(self, parent, idevice)
self.elements = []
for field in self.idevice:
self.elements.append(g_elementFactory.createElement(field))
if not hasattr(self.idevice,'undo'):
self.idevice.undo = True
示例3: __init__
# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
def __init__(self, parent, idevice):
"""
'parent' is our parent 'Renderable' instance
"""
Block.__init__(self, parent, idevice)
if not hasattr(self.idevice,'undo'):
self.idevice.undo = True
示例4: __init__
# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
def __init__(self, parent, idevice):
"""
Initialize a new Block object
"""
Block.__init__(self, parent, idevice)
self.idevice = idevice
self.questionElements = []
# to compensate for the strange unpickling timing when objects are
# loaded from an elp, ensure that proper idevices are set:
if idevice.storyTextArea.idevice is None:
idevice.storyTextArea.idevice = idevice
self.storyElement = TextAreaElement(idevice.storyTextArea)
self.questionInstruc = idevice.questionInstruc
self.storyInstruc = idevice.storyInstruc
self.feedbackInstruc = idevice.feedbackInstruc
self.previewing = False # In view or preview render
if not hasattr(self.idevice,'undo'):
self.idevice.undo = True
i = 0
for question in idevice.questions:
self.questionElements.append(QuestionElement(i, idevice, question))
i += 1
示例5: __init__
# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
def __init__(self, parent, idevice):
"""
Initialize a new Block object
"""
Block.__init__(self, parent, idevice)
self.idevice = idevice
self.questionElements = []
self.questionInstruc = idevice.questionInstruc
self.keyInstruc = idevice.keyInstruc
self.feedbackInstruc = idevice.feedbackInstruc
self.hintInstruc = idevice.hintInstruc
# to compensate for the strange unpickling timing when objects are
# loaded from an elp, ensure that proper idevices are set:
if idevice.instructionsForLearners.idevice is None:
idevice.instructionsForLearners.idevice = idevice
self.instructionElement = \
TextAreaElement(idevice.instructionsForLearners)
if not hasattr(self.idevice,'undo'):
self.idevice.undo = True
i = 0
for question in idevice.questions:
self.questionElements.append(OpinionElement(i, idevice,
question))
i += 1
示例6: __init__
# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
def __init__(self, parent, idevice):
"""
Pre-create our field ids
"""
Block.__init__(self, parent, idevice)
# to compensate for the strange unpickling timing when objects are
# loaded from an elp, ensure that proper idevices are set:
if idevice.instructionsForLearners.idevice is None:
idevice.instructionsForLearners.idevice = idevice
if idevice.content.idevice is None:
idevice.content.idevice = idevice
if idevice.feedback.idevice is None:
idevice.feedback.idevice = idevice
dT = common.getExportDocType()
sectionTag = "div"
if dT == "HTML5":
sectionTag = "section"
idevice.instructionsForLearners.htmlTag = sectionTag
idevice.instructionsForLearners.class_ = "block instructions"
idevice.feedback.htmlTag = sectionTag
self.instructionElement = TextAreaElement(idevice.instructionsForLearners)
self.instructionElement.field.content_w_resourcePaths = c_(self.instructionElement.field.content_w_resourcePaths)
self.listaElement = ListaElement(idevice.content)
self.feedbackElement = \
TextAreaElement(idevice.feedback)
self.previewing = False # In view or preview render
if not hasattr(self.idevice,'undo'):
self.idevice.undo = True
示例7: __init__
# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
def __init__(self, parent, idevice):
Block.__init__(self, parent, idevice)
self.mainElements = idevice.mainFieldSet.makeElementDict()
self.map_area_elements = []
for area_field in self.idevice.map_areas:
self.map_area_elements.append(ImageMapAreaElement(area_field, self))
示例8: __init__
# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
def __init__(self, parent, idevice):
Block.__init__(self, parent, idevice)
self.mainElements = idevice.mainFieldSet.makeElementDict()
self.sortableItemElements = []
for sortableField in idevice.itemsToSort:
newSortableElement = TextAreaElement(sortableField)
self.sortableItemElements.append(newSortableElement)
示例9: __init__
# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
def __init__(self, parent, idevice):
Block.__init__(self, parent, idevice)
self.fileAttachmentElements = []
for fileField in self.idevice.fileAttachmentFields:
fileElement = FileElement(fileField, False)
self.fileAttachmentElements.append(fileElement)
self.showDescBlock = ChoiceElement(idevice.showDesc)
self.introHTMLElement = TextAreaElement(idevice.introHTML)
示例10: __init__
# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
def __init__(self, parent, idevice):
Block.__init__(self, parent, idevice)
self.idevice = idevice
self.termElements = []
if not hasattr(self.idevice,'undo'):
self.idevice.undo = True
for term in idevice.terms:
self.termElements.append(TermElement(term))
示例11: __init__
# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
def __init__(self, parent, idevice):
Block.__init__(self, parent, idevice)
if idevice.content.idevice is None:
# due to the loading process's timing, idevice wasn't yet set;
# set it here for the TextAreaElement's tinyMCE editor
idevice.content.idevice = idevice
self.contentElement = TextAreaElement(idevice.content)
self.contentElement.height = 250
if not hasattr(self.idevice,'undo'):
self.idevice.undo = True