本文整理汇总了Python中command_support.EditCommand.EditCommand.init_gui方法的典型用法代码示例。如果您正苦于以下问题:Python EditCommand.init_gui方法的具体用法?Python EditCommand.init_gui怎么用?Python EditCommand.init_gui使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类command_support.EditCommand.EditCommand
的用法示例。
在下文中一共展示了EditCommand.init_gui方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: init_gui
# 需要导入模块: from command_support.EditCommand import EditCommand [as 别名]
# 或者: from command_support.EditCommand.EditCommand import init_gui [as 别名]
def init_gui(self):
"""
Do changes to the GUI while entering this command. This includes opening
the property manager, updating the command toolbar , connecting widget
slots (if any) etc. Note: The slot connection in property manager and
command toolbar is handled in those classes.
Called once each time the command is entered; should be called only
by code in modes.py
@see: L{self.restore_gui}
"""
EditCommand.init_gui(self)
if isinstance(self.graphicsMode, DnaDuplex_GraphicsMode):
self._setParamsForDnaLineGraphicsMode()
self.mouseClickPoints = []
#Clear the segmentList as it may still be maintaining a list of segments
#from the previous run of the command.
self._segmentList = []
prevMode = self.commandSequencer.prevMode
if prevMode.commandName == 'BUILD_DNA':
params = prevMode.provideParamsForTemporaryMode(self.commandName)
self.callback_addSegments, self._parentDnaGroup = params
#@TODO: self.callback_addSegments is not used as of 2008-02-24
#due to change in implementation. Not removing it for now as the
#new implementation (which uses the dnaGroup object of
#BuildDna_EditCommand is still being tested) -- Ninad 2008-02-24
#Following won't be necessary after Command Toolbar is
#properly integrated into the Command/CommandSequencer API
try:
self.flyoutToolbar = prevMode.flyoutToolbar
#Need a better way to deal with changing state of the
#corresponding action in the flyout toolbar. To be revised
#during command toolbar cleanup
self.flyoutToolbar.dnaDuplexAction.setChecked(True)
except AttributeError:
self.flyoutToolbar = None
if self.flyoutToolbar:
if not self.flyoutToolbar.dnaDuplexAction.isChecked():
self.flyoutToolbar.dnaDuplexAction.setChecked(True)
else:
#Should this be an assertion? Should we always kill _parentDnaGroup
#if its not None? ..not a good idea. Lets just make it to None.
self._parentDnaGroup = None
self._createFallbackDnaGroup()
self.updateDrawingPlane(plane = None)
示例2: init_gui
# 需要导入模块: from command_support.EditCommand import EditCommand [as 别名]
# 或者: from command_support.EditCommand.EditCommand import init_gui [as 别名]
def init_gui(self):
"""
Do changes to the GUI while entering this command. This includes opening
the property manager, updating the command toolbar , connecting widget
slots (if any) etc. Note: The slot connection in property manager and
command toolbar is handled in those classes.
Called once each time the command is entered; should be called only
by code in modes.py
@see: L{self.restore_gui}
"""
EditCommand.init_gui(self)
if self.flyoutToolbar is None:
self.flyoutToolbar = ProteinFlyout(self.win, self.propMgr)
self.flyoutToolbar.activateFlyoutToolbar()
示例3: init_gui
# 需要导入模块: from command_support.EditCommand import EditCommand [as 别名]
# 或者: from command_support.EditCommand.EditCommand import init_gui [as 别名]
def init_gui(self):
"""
Do changes to the GUI while entering this command. This includes opening
the property manager, updating the command toolbar , connecting widget
slots (if any) etc. Note: The slot connection in property manager and
command toolbar is handled in those classes.
Called once each time the command is entered; should be called only
by code in modes.py
@see: L{self.restore_gui}
"""
EditCommand.init_gui(self)
if isinstance(self.graphicsMode, NanotubeLine_GM):
self._setParamsForCntLineGraphicsMode()
self.mouseClickPoints = []
#Clear the segmentList as it may still be maintaining a list of segments
#from the previous run of the command.
self._segmentList = []
prevMode = self.commandSequencer.prevMode
if prevMode.commandName == 'BUILD_NANOTUBE':
#Following won't be necessary after Command Toolbar is
#properly integrated into the Command/CommandSequencer API
try:
self.flyoutToolbar = prevMode.flyoutToolbar
#Need a better way to deal with changing state of the
#corresponding action in the flyout toolbar. To be revised
#during command toolbar cleanup
self.flyoutToolbar.insertNanotubeAction.setChecked(True)
except AttributeError:
self.flyoutToolbar = None
if self.flyoutToolbar:
if not self.flyoutToolbar.insertNanotubeAction.isChecked():
self.flyoutToolbar.insertNanotubeAction.setChecked(True)