本文整理汇总了Python中Base.getDatabaser4CurrentStage方法的典型用法代码示例。如果您正苦于以下问题:Python Base.getDatabaser4CurrentStage方法的具体用法?Python Base.getDatabaser4CurrentStage怎么用?Python Base.getDatabaser4CurrentStage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Base
的用法示例。
在下文中一共展示了Base.getDatabaser4CurrentStage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: action
# 需要导入模块: import Base [as 别名]
# 或者: from Base import getDatabaser4CurrentStage [as 别名]
def action(self, arg):
"scene event handler"
if arg["Type"] == "SoKeyboardEvent":
if arg["CtrlDown"] and arg["Key"] == 'z':
if arg['State'] == 'DOWN' and not self.zDown:
print 'ctrl z'
import Base
database = Base.getDatabaser4CurrentStage()
self.RedrawObject(database.undo())
if arg["CtrlDown"] and arg["Key"] == 'y':
if arg['State'] == 'DOWN' and not self.yDown:
print 'ctrl y'
import Base
database = Base.getDatabaser4CurrentStage()
self.RedrawObject(database.redo())
if arg["Key"] == 'DELETE':
if arg['State'] == 'UP':
print 'Delete pressed'
# self.handleDelete()
if arg["Key"] == 'z':
if arg['State'] == 'DOWN': self.zDown = True
elif arg['State'] == 'UP': self.zDown = False
if arg["Key"] == 'y':
if arg['State'] == 'DOWN': self.yDown = True
elif arg['State'] == 'UP': self.yDown = False
示例2: Activated
# 需要导入模块: import Base [as 别名]
# 或者: from Base import getDatabaser4CurrentStage [as 别名]
def Activated(self):
self.parse()
import Base
Base.changeStep4Stage('SpecialStep')
import Base
database = Base.getDatabaser4CurrentStage()
database.clearRedoUndoList()
示例3: handleDelete
# 需要导入模块: import Base [as 别名]
# 或者: from Base import getDatabaser4CurrentStage [as 别名]
def handleDelete(self):
import Base
sels=FreeCADGui.Selection.getSelectionEx()
sel = sels[0]
objName = sel.ObjectName
assert len(sel.SubElementNames)==1
type , idx = Base.getRealTypeAndIndex(sel.SubElementNames[0])
database = Base.getDatabaser4CurrentStage()
database.remove(objName, [idx], args=None, ifRecord=True)
示例4: refreshBlocksData
# 需要导入模块: import Base [as 别名]
# 或者: from Base import getDatabaser4CurrentStage [as 别名]
def refreshBlocksData(self):
import Base
self.graph = Base.getDatabaser4CurrentStage()
self.graph.reset()
self.blocksNum = 0
self.blockVerticesNum = 0
self.fixedPointsNum = 0
self.loadingPointsNum = 0
self.measuredPointsNum = 0
self.boltElementsNum = 0