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


Python goocanvas.Group方法代码示例

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


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

示例1: __init__

# 需要导入模块: import goocanvas [as 别名]
# 或者: from goocanvas import Group [as 别名]
def __init__(self, parent_canvas_item, sta, dev):
        self.node1 = sta
        self.dev = dev
        self.node2 = None # ap
        self.canvas_item = goocanvas.Group(parent=parent_canvas_item)
        self.invisible_line = goocanvas.Polyline(parent=self.canvas_item,
                                                 line_width=25.0,
                                                 visibility=goocanvas.ITEM_HIDDEN)
        self.visible_line = goocanvas.Polyline(parent=self.canvas_item,
                                              line_width=1.0,
                                              stroke_color_rgba=0xC00000FF,
                                              line_dash=goocanvas.LineDash([2.0, 2.0 ]))
        self.invisible_line.props.pointer_events = (goocanvas.EVENTS_STROKE_MASK
                                                    |goocanvas.EVENTS_FILL_MASK
                                                    |goocanvas.EVENTS_PAINTED_MASK)
        self.canvas_item.set_data("pyviz-object", self)
        self.canvas_item.lower(None)
        self.set_ap(None) 
开发者ID:ntu-dsi-dcn,项目名称:ntu-dsi-dcn,代码行数:20,代码来源:wifi_intrastructure_link.py

示例2: __init__

# 需要导入模块: import goocanvas [as 别名]
# 或者: from goocanvas import Group [as 别名]
def __init__(self, parent_canvas_item, sta, dev):
        """! Initialize function.
        @param self The object pointer.
        @param parent_canvas_item: parent canvas
        @param sta The STA node
        @param dev The dev
        """
        self.node1 = sta
        self.dev = dev
        self.node2 = None # ap
        self.canvas_item = goocanvas.Group(parent=parent_canvas_item)
        self.invisible_line = goocanvas.Polyline(parent=self.canvas_item,
                                                 line_width=25.0,
                                                 visibility=goocanvas.ITEM_HIDDEN)
        self.visible_line = goocanvas.Polyline(parent=self.canvas_item,
                                              line_width=1.0,
                                              stroke_color_rgba=0xC00000FF,
                                              line_dash=goocanvas.LineDash([2.0, 2.0 ]))
        self.invisible_line.props.pointer_events = (goocanvas.EVENTS_STROKE_MASK
                                                    |goocanvas.EVENTS_FILL_MASK
                                                    |goocanvas.EVENTS_PAINTED_MASK)
        self.canvas_item.set_data("pyviz-object", self)
        self.canvas_item.lower(None)
        self.set_ap(None) 
开发者ID:KTH,项目名称:royal-chaos,代码行数:26,代码来源:wifi_intrastructure_link.py

示例3: __init__

# 需要导入模块: import goocanvas [as 别名]
# 或者: from goocanvas import Group [as 别名]
def __init__(self):
        assert Visualizer.INSTANCE is None
        Visualizer.INSTANCE = self
        super(Visualizer, self).__init__()
        self.nodes =  {} # node index -> Node
        self.channels = {} # id(ns3.Channel) -> Channel
        self.window = None # toplevel window
        self.canvas = None # goocanvas.Canvas
        self.time_label = None # gtk.Label
        self.play_button = None # gtk.ToggleButton
        self.zoom = None # gtk.Adjustment
        self._scrolled_window = None # gtk.ScrolledWindow

        self.links_group = goocanvas.Group()
        self.channels_group = goocanvas.Group()
        self.nodes_group = goocanvas.Group()

        self._update_timeout_id = None
        self.simulation = SimulationThread(self)
        self.selected_node = None # node currently selected
        self.speed = 1.0
        self.information_windows = []
        self._transmission_arrows = []
        self._last_transmissions = []
        self._drop_arrows = []
        self._last_drops = []
        self._show_transmissions_mode = None
        self.set_show_transmissions_mode(ShowTransmissionsMode.ALL)
        self._panning_state = None
        self.node_size_adjustment = None
        self.transmissions_smoothing_adjustment = None
        self.sample_period = SAMPLE_PERIOD
        self.node_drag_state = None
        self.follow_node = None
        self.shell_window = None

        self.create_gui()

        for plugin in plugins:
            plugin(self) 
开发者ID:ntu-dsi-dcn,项目名称:ntu-dsi-dcn,代码行数:42,代码来源:core.py

示例4: __init__

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

        @param self: class object.
        @return none
        """
        assert Visualizer.INSTANCE is None
        Visualizer.INSTANCE = self
        super(Visualizer, self).__init__()
        self.nodes =  {} # node index -> Node
        self.channels = {} # id(ns3.Channel) -> Channel
        self.window = None # toplevel window
        self.canvas = None # goocanvas.Canvas
        self.time_label = None # gtk.Label
        self.play_button = None # gtk.ToggleButton
        self.zoom = None # gtk.Adjustment
        self._scrolled_window = None # gtk.ScrolledWindow

        self.links_group = goocanvas.Group()
        self.channels_group = goocanvas.Group()
        self.nodes_group = goocanvas.Group()

        self._update_timeout_id = None
        self.simulation = SimulationThread(self)
        self.selected_node = None # node currently selected
        self.speed = 1.0
        self.information_windows = []
        self._transmission_arrows = []
        self._last_transmissions = []
        self._drop_arrows = []
        self._last_drops = []
        self._show_transmissions_mode = None
        self.set_show_transmissions_mode(ShowTransmissionsMode.ALL)
        self._panning_state = None
        self.node_size_adjustment = None
        self.transmissions_smoothing_adjustment = None
        self.sample_period = SAMPLE_PERIOD
        self.node_drag_state = None
        self.follow_node = None
        self.shell_window = None

        self.create_gui()

        for plugin in plugins:
            plugin(self) 
开发者ID:KTH,项目名称:royal-chaos,代码行数:48,代码来源:core.py


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