Public Member Functions | |
__init__ (self, visualizer, node_index) | |
Initialize function. | |
add_link (self, link) | |
Add link function. | |
get_position (self) | |
Get position function. | |
has_mobility (self) | |
Has mobility function. | |
on_enter_notify_event (self, view, target, event) | |
On Enter event handle. | |
on_leave_notify_event (self, view, target, event) | |
On Leave event handle. | |
remove_link (self, link) | |
Remove link function. | |
set_color (self, color) | |
Set color function. | |
set_label (self, label) | |
Set a label for the node. | |
set_position (self, x, y) | |
Set position function. | |
set_size (self, size) | |
Set size function. | |
set_svg_icon (self, file_base_name, width=None, height=None, align_x=0.5, align_y=0.5) | |
Set a background SVG icon for the node. | |
tooltip_query (self, tooltip) | |
Query tooltip. | |
Public Attributes | |
canvas_item = GooCanvas.CanvasEllipse() | |
canvas item | |
list | links = [] |
links | |
menu = None | |
menu | |
node_index = node_index | |
node index | |
on_enter_notify_event | |
on_enter_notify_event function | |
on_leave_notify_event | |
on_leave_notify_event function | |
svg_align_x = None | |
svg align X | |
svg_align_y = None | |
svg align Y | |
svg_item = None | |
svg item | |
visualizer = visualizer | |
visualier object | |
Protected Member Functions | |
_get_highlighted (self) | |
Get highlighted function. | |
_get_selected (self) | |
Get selected function. | |
_set_highlighted (self, value) | |
Set highlighted function. | |
_set_selected (self, value) | |
Set selected function. | |
_update_appearance (self) | |
Update the node aspect to reflect the selected/highlighted state. | |
_update_position (self) | |
Update position function. | |
_update_svg_position (self, x, y) | |
Update svg position. | |
Protected Attributes | |
int | _color = 0x808080FF |
color | |
_has_mobility = None | |
has mobility model | |
bool | _highlighted = False |
is highlighted | |
_label = None | |
label | |
_label_canvas_item = None | |
label canvas | |
bool | _selected = False |
is selected | |
_size = DEFAULT_NODE_SIZE | |
size | |
Properties | |
bool | highlighted = property(_get_highlighted, _set_highlighted) |
highlighted property | |
selected = property(_get_selected, _set_selected) | |
selected property | |
Static Private Attributes | |
dict | __gsignals__ |
signal emitted whenever a tooltip is about to be shown for the node the first signal parameter is a python list of strings, to which information can be appended | |
visualizer.core.Node.__init__ | ( | self, | |
visualizer, | |||
node_index ) |
Initialize function.
self | The object pointer. |
visualizer | visualizer object |
node_index | node index |
Definition at line 138 of file core.py.
References __init__().
Referenced by __init__().
|
protected |
Get highlighted function.
self | class object. |
Definition at line 371 of file core.py.
References _highlighted.
|
protected |
|
protected |
Set highlighted function.
self | class object. |
value | selected value |
Definition at line 360 of file core.py.
References _highlighted, and _update_appearance().
|
protected |
Set selected function.
self | class object. |
value | selected value |
Definition at line 338 of file core.py.
References _selected, and _update_appearance().
|
protected |
Update the node aspect to reflect the selected/highlighted state.
self | class object. |
Definition at line 393 of file core.py.
References _color, _label, _label_canvas_item, _selected, _size, _update_position(), canvas_item, highlighted, svg_item, and visualizer.
Referenced by _set_highlighted(), _set_selected(), set_color(), set_label(), set_size(), and set_svg_icon().
|
protected |
Update position function.
self | class object. |
Definition at line 490 of file core.py.
References get_position(), and set_position().
Referenced by _update_appearance().
|
protected |
Update svg position.
self | class object. |
x | x position |
y | y position |
Definition at line 226 of file core.py.
References svg_align_x, svg_align_y, and svg_item.
Referenced by set_position(), and set_svg_icon().
visualizer.core.Node.add_link | ( | self, | |
link ) |
visualizer.core.Node.get_position | ( | self | ) |
Get position function.
self | class object. |
Definition at line 478 of file core.py.
References canvas_item.
Referenced by _update_position().
visualizer.core.Node.has_mobility | ( | self | ) |
Has mobility function.
self | class object. |
Definition at line 542 of file core.py.
References _has_mobility, and node_index.
visualizer.core.Node.on_enter_notify_event | ( | self, | |
view, | |||
target, | |||
event ) |
On Enter event handle.
self | class object. |
view | view |
target | target |
event | event |
Definition at line 312 of file core.py.
References highlighted.
visualizer.core.Node.on_leave_notify_event | ( | self, | |
view, | |||
target, | |||
event ) |
On Leave event handle.
self | class object. |
view | view |
target | target |
event | event |
Definition at line 326 of file core.py.
References highlighted.
visualizer.core.Node.remove_link | ( | self, | |
link ) |
visualizer.core.Node.set_color | ( | self, | |
color ) |
Set color function.
self | class object. |
color | color to set. |
Definition at line 500 of file core.py.
References _color, and _update_appearance().
visualizer.core.Node.set_label | ( | self, | |
label ) |
Set a label for the node.
self | class object. |
label | label to set |
Definition at line 213 of file core.py.
References _label, and _update_appearance().
visualizer.core.Node.set_position | ( | self, | |
x, | |||
y ) |
Set position function.
self | class object. |
x | x position |
y | y position |
Definition at line 438 of file core.py.
References _label_canvas_item, _size, _update_svg_position(), canvas_item, links, svg_item, and visualizer.
Referenced by _update_position().
visualizer.core.Node.set_size | ( | self, | |
size ) |
Set size function.
self | class object. |
size | selected size |
Definition at line 382 of file core.py.
References _size, and _update_appearance().
visualizer.core.Node.set_svg_icon | ( | self, | |
file_base_name, | |||
width = None, | |||
height = None, | |||
align_x = 0.5, | |||
align_y = 0.5 ) |
Set a background SVG icon for the node.
file_base_name | base file name, including .svg extension, of the svg file. Place the file in the folder src/contrib/visualizer/resource. |
width | scale to the specified width, in meters |
height | scale to the specified height, in meters |
align_x | horizontal alignment of the icon relative to the node position, from 0 (icon fully to the left of the node) to 1.0 (icon fully to the right of the node) |
align_y | vertical alignment of the icon relative to the node position, from 0 (icon fully to the top of the node) to 1.0 (icon fully to the bottom of the node) |
Definition at line 167 of file core.py.
References _update_appearance(), _update_svg_position(), canvas_item, svg_align_x, svg_align_y, svg_item, and visualizer.
visualizer.core.Node.tooltip_query | ( | self, | |
tooltip ) |
Query tooltip.
self | class object. |
tooltip | tooltip |
Reimplemented from visualizer.base.PyVizObject.
Definition at line 241 of file core.py.
References node_index, and visualizer.
|
staticprivate |
|
protected |
|
protected |
|
protected |
is highlighted
Definition at line 153 of file core.py.
Referenced by _get_highlighted(), and _set_highlighted().
|
protected |
|
protected |
label canvas
Definition at line 163 of file core.py.
Referenced by _update_appearance(), and set_position().
|
protected |
is selected
Definition at line 152 of file core.py.
Referenced by _get_selected(), _set_selected(), and _update_appearance().
|
protected |
size
Definition at line 155 of file core.py.
Referenced by _update_appearance(), set_position(), and set_size().
visualizer.core.Node.canvas_item = GooCanvas.CanvasEllipse() |
canvas item
Definition at line 148 of file core.py.
Referenced by _update_appearance(), wifi_intrastructure_link.WifiLink.destroy(), visualizer.core.Channel.get_position(), get_position(), wifi_intrastructure_link.WifiLink.set_ap(), visualizer.core.Channel.set_position(), set_position(), set_svg_icon(), and visualizer.core.WiredLink.update_points().
list visualizer.core.Node.links = [] |
links
Definition at line 150 of file core.py.
Referenced by add_link(), remove_link(), visualizer.core.Channel.set_position(), and set_position().
visualizer.core.Node.node_index = node_index |
node index
Definition at line 147 of file core.py.
Referenced by has_mobility(), tooltip_query(), interface_statistics.ShowInterfaceStatistics.update(), ipv4_routing_table.ShowIpv4RoutingTable.update(), and olsr.ShowOlsrRoutingTable.update().
visualizer.core.Node.on_enter_notify_event |
visualizer.core.Node.on_leave_notify_event |
visualizer.core.Node.svg_align_x = None |
svg align X
Definition at line 160 of file core.py.
Referenced by _update_svg_position(), and set_svg_icon().
visualizer.core.Node.svg_align_y = None |
svg align Y
Definition at line 161 of file core.py.
Referenced by _update_svg_position(), and set_svg_icon().
visualizer.core.Node.svg_item = None |
svg item
Definition at line 159 of file core.py.
Referenced by _update_appearance(), _update_svg_position(), set_position(), and set_svg_icon().
visualizer.core.Node.visualizer = visualizer |
visualier object
Definition at line 146 of file core.py.
Referenced by interface_statistics.ShowInterfaceStatistics._response_cb(), ipv4_routing_table.ShowIpv4RoutingTable._response_cb(), olsr.ShowOlsrRoutingTable._response_cb(), show_last_packets.ShowLastPackets._response_cb(), _update_appearance(), interface_statistics.StatisticsCollector.get_interface_statistics(), set_position(), set_svg_icon(), tooltip_query(), and show_last_packets.ShowLastPackets.update().
|
static |
highlighted property
Definition at line 380 of file core.py.
Referenced by _update_appearance(), on_enter_notify_event(), and on_leave_notify_event().
|
static |