當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。