当前位置: 首页>>代码示例>>Python>>正文


Python CommandGUI.addToolBar方法代码示例

本文整理汇总了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()    
            
开发者ID:MolecularFlipbook,项目名称:FlipbookApp,代码行数:32,代码来源:helpCommands.py

示例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,
开发者ID:MolecularFlipbook,项目名称:FlipbookApp,代码行数:34,代码来源:interactiveCommands.py

示例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))    
    
开发者ID:MolecularFlipbook,项目名称:FlipbookApp,代码行数:32,代码来源:fileCommandsGUI.py


注:本文中的ViewerFramework.VFCommand.CommandGUI.addToolBar方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。