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


Python ViewColumn.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from gui.viewColumn import ViewColumn [as 别名]
# 或者: from gui.viewColumn.ViewColumn import __init__ [as 别名]
 def __init__(self, fittingView, params):
     ViewColumn.__init__(self, fittingView)
     self.size = 16
     self.maxsize = self.size
     self.mask = wx.LIST_MASK_TEXT
     self.columnText = ""
     self.shipImage = fittingView.imageList.Add(bitmapLoader.getBitmap("ship_small", "icons"))
开发者ID:blitzmann,项目名称:Pyfa-skel,代码行数:9,代码来源:baseIcon.py

示例2: __init__

# 需要导入模块: from gui.viewColumn import ViewColumn [as 别名]
# 或者: from gui.viewColumn.ViewColumn import __init__ [as 别名]
 def __init__(self, fittingView, params):
     ViewColumn.__init__(self, fittingView)
     self.size = 16
     self.maxsize = self.size
     self.mask = wx.LIST_MASK_IMAGE
     self.columnText = ""
     self.shipImage = fittingView.imageList.GetImageIndex("ship_small", "icons")
开发者ID:nharring,项目名称:Pyfa,代码行数:9,代码来源:baseIcon.py

示例3: __init__

# 需要导入模块: from gui.viewColumn import ViewColumn [as 别名]
# 或者: from gui.viewColumn.ViewColumn import __init__ [as 别名]
    def __init__(self, fittingView, params):
        ViewColumn.__init__(self, fittingView)
        cAttribute = service.Attribute.getInstance()
        attributeSlave = params["attributeSlave"] or params["property"]
        # This function can throw an exception if the database isn't sane
        # We need to do a sanity check before this runs
        info = cAttribute.getAttributeInfo(attributeSlave)

        self.mask = 0
        self.propertyName = params["property"]
        self.info = info
        if params["showIcon"]:
            if info.name == "power":
                iconFile = "pg_small"
                iconType = "icons"
            else:
                iconFile = info.icon.iconFile if info.icon else None
                iconType = "pack"
            if iconFile:
                self.imageId = fittingView.imageList.GetImageIndex(iconFile, iconType)
            else:
                self.imageId = -1
        else:
            self.imageId = -1

        if params["displayName"] or self.imageId == -1:
            self.columnText = info.displayName if info.displayName != "" else info.name
开发者ID:DaManDOH,项目名称:Pyfa,代码行数:29,代码来源:propertyDisplay.py

示例4: __init__

# 需要导入模块: from gui.viewColumn import ViewColumn [as 别名]
# 或者: from gui.viewColumn.ViewColumn import __init__ [as 别名]
 def __init__(self, fittingView, params):
     ViewColumn.__init__(self, fittingView)
     self.mainFrame = gui.mainFrame.MainFrame.getInstance()
     self.resizable = False
     self.size = 16
     self.maxsize = self.size
     self.mask = wx.LIST_MASK_IMAGE
开发者ID:Blinker,项目名称:Pyfa,代码行数:9,代码来源:state.py

示例5: __init__

# 需要导入模块: from gui.viewColumn import ViewColumn [as 别名]
# 或者: from gui.viewColumn.ViewColumn import __init__ [as 别名]
    def __init__(self, fittingView, params):
        ViewColumn.__init__(self, fittingView)
        cAttribute = service.Attribute.getInstance()
        info = cAttribute.getAttributeInfo(params["attribute"])
        self.info = info
        if params["showIcon"]:
            if info.name == "power":
                iconFile = "pg_small"
                iconType = "icons"
            else:
                iconFile = info.icon.iconFile if info.icon else None
                iconType = "pack"
            if iconFile:
                bitmap = bitmapLoader.getBitmap(iconFile, iconType)
                if bitmap:
                    self.imageId = fittingView.imageList.Add(bitmap)
                else:
                    self.imageId = -1
            else:
                self.imageId = -1
            self.mask = wx.LIST_MASK_IMAGE
        else:
            self.imageId = -1

        if params["displayName"] or self.imageId == -1:
            self.columnText = info.displayName if info.displayName != "" else info.name
            self.mask |= wx.LIST_MASK_IMAGE
开发者ID:blitzmann,项目名称:Pyfa-skel,代码行数:29,代码来源:attributeDisplay.py

示例6: __init__

# 需要导入模块: from gui.viewColumn import ViewColumn [as 别名]
# 或者: from gui.viewColumn.ViewColumn import __init__ [as 别名]
    def __init__(self, fittingView, params=None):
        if params == None:
            params = {"showIcon": True, "displayName": False}
        ViewColumn.__init__(self, fittingView)
        cAttribute = service.Attribute.getInstance()
        info = cAttribute.getAttributeInfo("trackingSpeed")
        self.info = info
        if params["showIcon"]:
            iconFile = info.icon.iconFile if info.icon else None
            if iconFile:
                bitmap = bitmapLoader.getBitmap(iconFile, "pack")
                if bitmap:
                    self.imageId = fittingView.imageList.Add(bitmap)
                else:
                    self.imageId = -1
            else:
                self.imageId = -1

            self.mask = wx.LIST_MASK_IMAGE

        else:
            self.imageId = -1

        if params["displayName"] or self.imageId == -1:
            self.columnText = info.displayName if info.displayName != "" else info.name
            self.mask |= wx.LIST_MASK_TEXT
开发者ID:blitzmann,项目名称:Pyfa-skel,代码行数:28,代码来源:tracking.py

示例7: __init__

# 需要导入模块: from gui.viewColumn import ViewColumn [as 别名]
# 或者: from gui.viewColumn.ViewColumn import __init__ [as 别名]
    def __init__(self, fittingView, params):
        ViewColumn.__init__(self, fittingView)
        cAttribute = service.Attribute.getInstance()
        attributeSlave = params["attributeSlave"] or params["property"]
        try:
            info = cAttribute.getAttributeInfo(attributeSlave)
        except:
            info = None

        self.mask = 0
        self.propertyName = params["property"]
        self.info = info
        if params["showIcon"]:
            if info.name == "power":
                iconFile = "pg_small"
                iconType = "icons"
            else:
                iconFile = info.icon.iconFile if info.icon else None
                iconType = "pack"
            if iconFile:
                bitmap = bitmapLoader.getBitmap(iconFile, iconType)
                if bitmap:
                    self.imageId = fittingView.imageList.Add(bitmap)
                else:
                    self.imageId = -1
            else:
                self.imageId = -1
        else:
            self.imageId = -1

        if params["displayName"] or self.imageId == -1:
            self.columnText = info.displayName if info.displayName != "" else info.name
开发者ID:blitzmann,项目名称:Pyfa-skel,代码行数:34,代码来源:propertyDisplay.py

示例8: __init__

# 需要导入模块: from gui.viewColumn import ViewColumn [as 别名]
# 或者: from gui.viewColumn.ViewColumn import __init__ [as 别名]
    def __init__(self, fittingView, params):
        ViewColumn.__init__(self, fittingView)

        self.mainFrame = gui.mainFrame.MainFrame.getInstance()
        self.columnText = "Name"
        self.shipImage = fittingView.imageList.GetImageIndex("ship_small", "gui")
        self.mask = wx.LIST_MASK_TEXT
        self.projectedView = isinstance(fittingView, gui.builtinAdditionPanes.projectedView.ProjectedView)
开发者ID:blitzmann,项目名称:Pyfa,代码行数:10,代码来源:baseName.py

示例9: __init__

# 需要导入模块: from gui.viewColumn import ViewColumn [as 别名]
# 或者: from gui.viewColumn.ViewColumn import __init__ [as 别名]
    def __init__(self, fittingView, params):
        ViewColumn.__init__(self, fittingView)

        self.mask = wx.LIST_MASK_IMAGE

        Attribute.getInstance().getAttributeInfo("capacitorNeed")
        self.imageId = fittingView.imageList.GetImageIndex("capacitorRecharge_small", "gui")
        self.bitmap = BitmapLoader.getBitmap("capacitorRecharge_small", "gui")
开发者ID:PaulKPetersonCO,项目名称:Pyfa,代码行数:10,代码来源:capacitorUse.py

示例10: __init__

# 需要导入模块: from gui.viewColumn import ViewColumn [as 别名]
# 或者: from gui.viewColumn.ViewColumn import __init__ [as 别名]
 def __init__(self, fittingView, params):
     ViewColumn.__init__(self, fittingView)
     self.mask = wx.LIST_MASK_IMAGE
     bitmap = bitmapLoader.getBitmap("totalPrice_small", "icons")
     if bitmap:
         self.imageId = fittingView.imageList.Add(bitmap)
     else:
         self.imageId = -1
开发者ID:blitzmann,项目名称:Pyfa-skel,代码行数:10,代码来源:price.py

示例11: __init__

# 需要导入模块: from gui.viewColumn import ViewColumn [as 别名]
# 或者: from gui.viewColumn.ViewColumn import __init__ [as 别名]
    def __init__(self, fittingView, params):
        ViewColumn.__init__(self, fittingView)

        self.mask = wx.LIST_MASK_IMAGE

        sAttr = service.Attribute.getInstance()
        info = sAttr.getAttributeInfo("capacitorNeed")
        self.imageId = fittingView.imageList.GetImageIndex(info.icon.iconFile, "pack")
        self.bitmap = bitmapLoader.getBitmap(info.icon.iconFile, "pack")
开发者ID:Headpigeon,项目名称:Pyfa,代码行数:11,代码来源:capacitorUse.py

示例12: __init__

# 需要导入模块: from gui.viewColumn import ViewColumn [as 别名]
# 或者: from gui.viewColumn.ViewColumn import __init__ [as 别名]
    def __init__(self, fittingView, params):
        ViewColumn.__init__(self, fittingView)

        self.mask = wx.LIST_MASK_IMAGE

        cAttribute = service.Attribute.getInstance()
        info = cAttribute.getAttributeInfo("capacitorNeed")
        bitmap = bitmapLoader.getBitmap(info.icon.iconFile, "pack")
        if bitmap:
            self.imageId = fittingView.imageList.Add(bitmap)
        else:
            self.imageId = -1
开发者ID:blitzmann,项目名称:Pyfa-skel,代码行数:14,代码来源:capacitorUse.py

示例13: __init__

# 需要导入模块: from gui.viewColumn import ViewColumn [as 别名]
# 或者: from gui.viewColumn.ViewColumn import __init__ [as 别名]
    def __init__(self, fittingView, params=None):
        if params == None:
            params = {"showIcon": True, "displayName": False}
        ViewColumn.__init__(self, fittingView)
        if params["showIcon"]:
            self.imageId = fittingView.imageList.GetImageIndex("column_misc", "icons")
            self.bitmap = bitmapLoader.getBitmap("column_misc", "icons")
            self.mask = wx.LIST_MASK_IMAGE
        else:
            self.imageId = -1

        if params["displayName"] or self.imageId == -1:
            self.columnText = "Misc data"
            self.mask |= wx.LIST_MASK_TEXT
开发者ID:copyliu,项目名称:pyfa-l10n,代码行数:16,代码来源:misc.py

示例14: __init__

# 需要导入模块: from gui.viewColumn import ViewColumn [as 别名]
# 或者: from gui.viewColumn.ViewColumn import __init__ [as 别名]
 def __init__(self, fittingView, params):
     ViewColumn.__init__(self, fittingView)
     self.resizable = False
     self.size = 16
     self.maxsize = self.size
     self.mask = wx.LIST_MASK_IMAGE
     for name, state in (("checked", wx.CONTROL_CHECKED), ("unchecked", 0)):
         bitmap = wx.EmptyBitmap(16, 16)
         dc = wx.MemoryDC()
         dc.SelectObject(bitmap)
         dc.SetBackground(wx.TheBrushList.FindOrCreateBrush(fittingView.GetBackgroundColour(), wx.SOLID))
         dc.Clear()
         wx.RendererNative.Get().DrawCheckBox(fittingView, dc, wx.Rect(0, 0, 16, 16), state)
         dc.Destroy()
         setattr(self, "%sId" % name, fittingView.imageList.Add(bitmap))
开发者ID:MRACHINI,项目名称:Pyfa,代码行数:17,代码来源:state.py

示例15: __init__

# 需要导入模块: from gui.viewColumn import ViewColumn [as 别名]
# 或者: from gui.viewColumn.ViewColumn import __init__ [as 别名]
    def __init__(self, fittingView, params):
        ViewColumn.__init__(self, fittingView)
        sAttr = Attribute.getInstance()
        info = sAttr.getAttributeInfo(params["attribute"])
        self.info = info
        if params["showIcon"]:
            if info.name == "power":
                iconFile = "pg_small"
                iconType = "gui"
            else:
                iconFile = info.icon.iconFile if info.icon else None
                iconType = "icons"
            if iconFile:
                self.imageId = fittingView.imageList.GetImageIndex(iconFile, iconType)
                self.bitmap = BitmapLoader.getBitmap(iconFile, iconType)
            else:
                self.imageId = -1

            self.mask = wx.LIST_MASK_IMAGE
        else:
            self.imageId = -1

        if params["displayName"] or self.imageId == -1:
            self.columnText = info.displayName if info.displayName != "" else info.name
            self.mask |= wx.LIST_MASK_IMAGE

        if params["direct"]:
            self.direct = True
            self.view = fittingView
            originalRefresh = fittingView.refresh
            sMkt = Market.getInstance()

            def refresh(stuff):
                # Hack into our master view and add a callback for ourselves to know when to query
                self.directInfo = sMkt.directAttrRequest(stuff, info) if stuff else None
                originalRefresh(stuff)

            fittingView.refresh = refresh
开发者ID:Ebag333,项目名称:Pyfa,代码行数:40,代码来源:attributeDisplay.py


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