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


Python Plugins.transportInstalled方法代码示例

本文整理汇总了Python中Plugins.transportInstalled方法的典型用法代码示例。如果您正苦于以下问题:Python Plugins.transportInstalled方法的具体用法?Python Plugins.transportInstalled怎么用?Python Plugins.transportInstalled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Plugins的用法示例。


在下文中一共展示了Plugins.transportInstalled方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: initPalette

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import transportInstalled [as 别名]
    def initPalette(self, inspector, editor):
        self.inspector = inspector
        self.editor = editor

        if Preferences.paletteStyle == 'menu':
            mb = self.menuBar
        else:
            mb = None

        # XXX Set these from class
        if not hasattr(sys, 'cyclops'):
            # 'New' page
            palettePage = NewPalettePage(self.palette, PaletteStore.newPalette[0],
                  'Images/Palette/', self, self.widgetSet, self)

            for modelName in PaletteStore.paletteLists['New']:
                palettePage.addButton2(modelName,
                    PaletteStore.newControllers[modelName],
                    wx.lib.buttons.GenBitmapButton)
            if mb: mb.Append(menu=palettePage.menu, title=PaletteStore.newPalette[0])
            self.palettePages.append(palettePage)

            # Normal control pages
            for palette in PaletteStore.palette:
                palettePage = PalettePage(self.palette, palette[0],
                      'Images/Palette/', self, self.widgetSet,
                      self.componentSB, self)
                palettePage.addToggleBitmaps(palette[2], None, None)
                self.palettePages.append(palettePage)
                if mb: mb.Append(menu=palettePage.menu, title=palette[0])

            # Dialog page
##            if PaletteStore.dialogPalette[2]:
##                self.dialogPalettePage = PanelPalettePage(self.palette,
##                      PaletteStore.dialogPalette[0],
##                      'Images/Palette/', self, self.widgetSet,
##                      self.componentSB, self)
##                for dialog in PaletteStore.dialogPalette[2]:
##                    self.dialogPalettePage.addButton(
##                          PaletteStore.compInfo[dialog][0],
##                          dialog, PaletteStore.compInfo[dialog][1],
##                          self.OnDialogPaletteClick, None, None,
##                          wx.lib.buttons.GenBitmapButton)
##                self.palettePages.append(self.dialogPalettePage)
##                if mb: mb.Append(menu=self.dialogPalettePage.menu, 
##                                 title=PaletteStore.dialogPalette[0])

            # Zope page
            if Plugins.transportInstalled('ZopeLib.ZopeExplorer'):
                self.zopePalettePage = ZopePalettePage(self.palette,
                      PaletteStore.zopePalette[0], 'Images/Palette/',
                      self, self.widgetSet, self.componentSB, self)
                self.zopePalettePage.addToggleBitmaps(
                      PaletteStore.zopePalette[2], None, None)
                self.palettePages.append(self.zopePalettePage)
                if mb: mb.Append(menu=self.zopePalettePage.menu, 
                                 title=PaletteStore.zopePalette[0])
        else:
            palettePage = None
开发者ID:cbaeseman,项目名称:boa-constructor,代码行数:61,代码来源:Palette.py

示例2: FormulatorFormModel

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import transportInstalled [as 别名]
import os, sys, string

import Preferences, Utils, Plugins

if not Plugins.transportInstalled('ZopeLib.ZopeExplorer'):
    raise Plugins.SkipPlugin, 'Zope support is not enabled'

#---Model-----------------------------------------------------------------------

# Define new zope image and a Model for opening in the Editor
from ZopeLib.ZopeEditorModels import addZOAImage, ZOAIcons, ZopeBlankEditorModel, ZopeController

addZOAImage('Formulator Form', 'Images/ZOA/FormulatorForm.png')

field_meta_types = ['FileField', 'MultiCheckBoxField', 'LinesField',
      'ListField', 'TextAreaField', 'MultiListField', 'EmailField',
      'CheckBoxField', 'PasswordField', 'FloatField', 'PatternField',
      'LinkField', 'StringField', 'RawTextAreaField', 'IntegerField',
      'RadioField', 'DateTimeField']
for field in field_meta_types:
    addZOAImage(field, 'Images/ZOA/FormulatorField.png')

class FormulatorFormModel(ZopeBlankEditorModel):
    imgIdx = ZOAIcons['Formulator Form']

#---Controller------------------------------------------------------------------

# Connect controller to the model
from Models import Controllers

Controllers.modelControllerReg[FormulatorFormModel] = ZopeController
开发者ID:aricsanders,项目名称:boa,代码行数:33,代码来源:ProdFormulator.plug-in.py

示例3:

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import transportInstalled [as 别名]
    from Companions.DateTimeCompanions import *
    from Companions.ButtonCompanions import *
    from Companions.ListCompanions import *
    from Companions.GizmoCompanions import *
    from Companions.LibCompanions import *

    if Utils.IsComEnabled():
        from Companions.ComCompanions import *
    # Define and add a User page to the palette
    PaletteStore.paletteLists["User"] = upl = []
    PaletteStore.palette.append([_("User"), "Editor/Tabs/User", upl])
    from Companions.UtilCompanions import *
    from Companions.DialogCompanions import *

# Zope requires spesific support
if Plugins.transportInstalled("ZopeLib.ZopeExplorer"):
    from ZopeLib.ZopeCompanions import *

# -Controller imports which auto-registers themselves on the Palette-------------

from Models import EditorHelper

if Preferences.csPythonSupport:
    import Models.PythonControllers

if Preferences.csWxPythonSupport:
    import Models.wxPythonControllers

if Preferences.csPythonSupport and not Preferences.csWxPythonSupport:
    # useful hack to alias wx.App modules to PyApp modules when wxPython support
    # is not loaded
开发者ID:nyimbi,项目名称:boa-constructor,代码行数:33,代码来源:PaletteMapping.py


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