本文整理汇总了Python中ViewerFramework.VFCommand.CommandGUI.addToolBar方法的典型用法代码示例。如果您正苦于以下问题:Python CommandGUI.addToolBar方法的具体用法?Python CommandGUI.addToolBar怎么用?Python CommandGUI.addToolBar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ViewerFramework.VFCommand.CommandGUI
的用法示例。
在下文中一共展示了CommandGUI.addToolBar方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: orderModelsCommand
# 需要导入模块: from ViewerFramework.VFCommand import CommandGUI [as 别名]
# 或者: from ViewerFramework.VFCommand.CommandGUI import addToolBar [as 别名]
\nPackage : Pmv
\nModule : helpCommands
\nClass : orderModelsCommand
\nCommand : orderModelsCommand
\nSynopsis:\n
None <--- orderModelsCommand()
"""
def guiCallback(self, evt=None):
webbrowser.open_new('http://models.scripps.edu/?source=Pmv')
orderModelsGUI = CommandGUI()
msg = 'Opens http://models.scripps.edu\n 3D Molecular Model Printing Service.'
from moleculeViewer import ICONPATH
orderModelsGUI.addToolBar('orderModels', icon1='handmolecule.gif',
balloonhelp=msg, index=14.,
type = 'ToolBarButton', icon_dir=ICONPATH)
orderModelsCommandGUI = CommandGUI()
orderModelsCommandGUI.addMenuCommand(
'menuRoot', 'File', 'Order Physical Models', after='Save')
# image=ICONPATH+'/32x32/handmoleculeMenu.gif')
class BugReportCommand(Command):
def __init__(self, func=None):
Command.__init__(self, func)
def doit(self):
self.show_upload_page()
示例2: TkColor
# 需要导入模块: from ViewerFramework.VFCommand import CommandGUI [as 别名]
# 或者: from ViewerFramework.VFCommand.CommandGUI import addToolBar [as 别名]
c = (col[level][0]/1.5,col[level][1]/1.5,col[level][2]/1.5)
self.LevelOption._menubutton.configure(
background = TkColor(c),
activebackground = TkColor(col[level]))
if level=='Atom':
self.vf.setIcomLevel(Atom)
elif level=='Residue':
self.vf.setIcomLevel(Residue)
elif level=='Chain':
self.vf.setIcomLevel(Chain)
elif level=='Molecule':
self.vf.setIcomLevel(Molecule)
PCOMGUI = CommandGUI()
from moleculeViewer import ICONPATH
PCOMGUI.addToolBar('PCOM', icon1 = 'mouse.gif', icon_dir=ICONPATH,
balloonhelp = 'Picking COMmands', index = 0)
class MVBindCmdToKey(MVCommand):
def __init__(self, func=None):
MVCommand.__init__(self, func=None)
otherKeys = ['Escape', 'F1', 'F2', 'F3', 'F4', 'F5', 'F6', 'F7', 'F8',
'F9', 'Tab', 'space', 'Return', 'Insert', 'Delete',
'Home', 'End', 'Prior', 'Next', 'Up', 'Down', 'Left',
'Right', 'Caps_Lock', 'Num_Lock', 'BackSpace']
self.bindings = {}
for key in string.letters+string.digits:
self.bindings[key] = {'None':None, 'Shift_L':None,\
'Control_L':None, 'Alt_L':None,
示例3: CommandGUI
# 需要导入模块: from ViewerFramework.VFCommand import CommandGUI [as 别名]
# 或者: from ViewerFramework.VFCommand.CommandGUI import addToolBar [as 别名]
command = loaded
self.command = command
self.command.guiCallback(**kw)
STLWriterGUI = CommandGUI()
STLWriterGUI.addMenuCommand('menuRoot', 'File', 'Write STL',
cascadeName='Save', index=11,separatorBelow=1)
class ReadSourceMoleculeProxy(CommandProxy):
def __init__(self, vf, gui):
from Pmv.fileCommands import ReadSourceMolecule
command =ReadSourceMolecule()
vf.addCommand(command, 'readSourceMolecule', gui)
CommandProxy.__init__(self, vf, gui)
ReadSourceMoleculeGUI = CommandGUI()
ReadSourceMoleculeGUI.addToolBar('Read Molecule or Python Script', icon1='fileopen.gif',
type='ToolBarButton', balloonhelp='Read Molecule or Python Script', index=0)
def initGUI(viewer):
viewer.addCommandProxy(fetchCommandProxy(viewer, fetchGUI))
viewer.addCommandProxy(PDBWriterProxy(viewer, PDBWriterGUI))
viewer.addCommandProxy(PDBQWriterProxy(viewer, PDBQWriterGUI))
viewer.addCommandProxy(PDBQTWriterProxy(viewer, PDBQTWriterGUI))
viewer.addCommandProxy(PDBQSWriterProxy(viewer, PDBQSWriterGUI))
viewer.addCommandProxy(SaveMMCIFProxy(viewer, SaveMMCIFGUI))
viewer.addCommandProxy(PQRWriterProxy(viewer, PQRWriterGUI))
viewer.addCommandProxy(MoleculeReaderProxy(viewer, MoleculeReaderGUI))
viewer.addCommandProxy(VRML2WriterProxy(viewer, VRML2WriterGUI))
viewer.addCommandProxy(STLWriterProxy(viewer, STLWriterGUI))
viewer.addCommandProxy(ReadSourceMoleculeProxy(viewer, ReadSourceMoleculeGUI))