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


Python goocanvas.ITEM_VISIBLE属性代码示例

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


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

示例1: set_visible

# 需要导入模块: import goocanvas [as 别名]
# 或者: from goocanvas import ITEM_VISIBLE [as 别名]
def set_visible(self, visible):
        """!
        Set visible function
        
        @param self: this object
        @param visible: visible indicator
        @return none
        """
        self.visible = visible
        if self.visible:
            self.hlines.props.visibility = goocanvas.ITEM_VISIBLE
            self.vlines.props.visibility = goocanvas.ITEM_VISIBLE
        else:
            self.hlines.props.visibility = goocanvas.ITEM_HIDDEN
            self.vlines.props.visibility = goocanvas.ITEM_HIDDEN
            for label in self.labels:
                label.props.visibility = goocanvas.ITEM_HIDDEN 
开发者ID:KTH,项目名称:royal-chaos,代码行数:19,代码来源:hud.py

示例2: __init__

# 需要导入模块: import goocanvas [as 别名]
# 或者: from goocanvas import ITEM_VISIBLE [as 别名]
def __init__(self, channel):
        """!
        Initializer function.

        @param self: class object.
        @param channel: channel.
        @return none
        """
        self.channel = channel
        self.canvas_item = goocanvas.Ellipse(radius_x=30, radius_y=30,
                                             fill_color="white",
                                             stroke_color="grey", line_width=2.0,
                                             line_dash=goocanvas.LineDash([10.0, 10.0 ]),
                                             visibility=goocanvas.ITEM_VISIBLE)
        self.canvas_item.set_data("pyviz-object", self)
        self.links = [] 
开发者ID:KTH,项目名称:royal-chaos,代码行数:18,代码来源:core.py

示例3: set_ap

# 需要导入模块: import goocanvas [as 别名]
# 或者: from goocanvas import ITEM_VISIBLE [as 别名]
def set_ap(self, ap):
        """! Set AP.
        @param self The object pointer.
        @param ap The AP node
        @return none
        """
        if ap is self.node2:
            return
        if self.node2 is not None:
            self.node2.remove_link(self)
        self.node2 = ap
        if self.node2 is None:
            self.canvas_item.set_property("visibility", goocanvas.ITEM_HIDDEN)
        else:
            self.node2.add_link(self)
            self.canvas_item.set_property("visibility", goocanvas.ITEM_VISIBLE)
        self.update_points() 
开发者ID:KTH,项目名称:royal-chaos,代码行数:19,代码来源:wifi_intrastructure_link.py

示例4: set_visible

# 需要导入模块: import goocanvas [as 别名]
# 或者: from goocanvas import ITEM_VISIBLE [as 别名]
def set_visible(self, visible):
        self.visible = visible
        if self.visible:
            self.hlines.props.visibility = goocanvas.ITEM_VISIBLE
            self.vlines.props.visibility = goocanvas.ITEM_VISIBLE
        else:
            self.hlines.props.visibility = goocanvas.ITEM_HIDDEN
            self.vlines.props.visibility = goocanvas.ITEM_HIDDEN
            for label in self.labels:
                label.props.visibility = goocanvas.ITEM_HIDDEN 
开发者ID:ntu-dsi-dcn,项目名称:ntu-dsi-dcn,代码行数:12,代码来源:hud.py

示例5: __init__

# 需要导入模块: import goocanvas [as 别名]
# 或者: from goocanvas import ITEM_VISIBLE [as 别名]
def __init__(self, channel):
        self.channel = channel
        self.canvas_item = goocanvas.Ellipse(radius_x=30, radius_y=30,
                                             fill_color="white",
                                             stroke_color="grey", line_width=2.0,
                                             line_dash=goocanvas.LineDash([10.0, 10.0 ]),
                                             visibility=goocanvas.ITEM_VISIBLE)
        self.canvas_item.set_data("pyviz-object", self)
        self.links = [] 
开发者ID:ntu-dsi-dcn,项目名称:ntu-dsi-dcn,代码行数:11,代码来源:core.py

示例6: set_ap

# 需要导入模块: import goocanvas [as 别名]
# 或者: from goocanvas import ITEM_VISIBLE [as 别名]
def set_ap(self, ap):
        if ap is self.node2:
            return
        if self.node2 is not None:
            self.node2.remove_link(self)
        self.node2 = ap
        if self.node2 is None:
            self.canvas_item.set_property("visibility", goocanvas.ITEM_HIDDEN)
        else:
            self.node2.add_link(self)
            self.canvas_item.set_property("visibility", goocanvas.ITEM_VISIBLE)
        self.update_points() 
开发者ID:ntu-dsi-dcn,项目名称:ntu-dsi-dcn,代码行数:14,代码来源:wifi_intrastructure_link.py


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