Public Member Functions | |
def | __init__ (self, visualizer, node_index) |
Initialize function. More... | |
def | add_link (self, link) |
Add link function. More... | |
def | get_position (self) |
Get position function. More... | |
def | has_mobility (self) |
Has mobility function. More... | |
def | on_enter_notify_event (self, view, target, event) |
On Enter event handle. More... | |
def | on_leave_notify_event (self, view, target, event) |
On Leave event handle. More... | |
def | remove_link (self, link) |
Remove link function. More... | |
def | set_color (self, color) |
Set color function. More... | |
def | set_label (self, label) |
Set a label for the node. More... | |
def | set_position (self, x, y) |
Set position function. More... | |
def | set_size (self, size) |
Set size function. More... | |
def | 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. More... | |
def | tooltip_query (self, tooltip) |
Query tooltip. More... | |
Public Attributes | |
canvas_item | |
canvas item More... | |
links | |
links More... | |
menu | |
menu More... | |
node_index | |
node index More... | |
svg_align_x | |
svg align X More... | |
svg_align_y | |
svg align Y More... | |
svg_item | |
svg item More... | |
visualizer | |
visualier object More... | |
Properties | |
highlighted = property(_get_highlighted, _set_highlighted) | |
highlighted property More... | |
selected = property(_get_selected, _set_selected) | |
selected property More... | |
Private Member Functions | |
def | _get_highlighted (self) |
Get highlighted function. More... | |
def | _get_selected (self) |
Get selected function. More... | |
def | _set_highlighted (self, value) |
Set highlighted function. More... | |
def | _set_selected (self, value) |
Set selected function. More... | |
def | _update_appearance (self) |
Update the node aspect to reflect the selected/highlighted state. More... | |
def | _update_position (self) |
Update position function. More... | |
def | _update_svg_position (self, x, y) |
Update svg position. More... | |
Private Attributes | |
_color | |
color More... | |
_has_mobility | |
has mobility model More... | |
_highlighted | |
is highlighted More... | |
_label | |
label More... | |
_label_canvas_item | |
label canvas More... | |
_selected | |
is selected More... | |
_size | |
size More... | |
Static Private Attributes | |
dictionary | __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 More... | |
def visualizer.core.Node.__init__ | ( | self, | |
visualizer, | |||
node_index | |||
) |
|
private |
Get highlighted function.
self | class object. |
Definition at line 377 of file core.py.
References visualizer.core.Node._highlighted.
|
private |
Get selected function.
self | class object. |
Definition at line 355 of file core.py.
References visualizer.core.Node._selected.
|
private |
Set highlighted function.
self | class object. |
value | selected value |
Definition at line 366 of file core.py.
References visualizer.core.Node._highlighted, and visualizer.core.Node._update_appearance().
|
private |
Set selected function.
self | class object. |
value | selected value |
Definition at line 344 of file core.py.
References visualizer.core.Node._selected, and visualizer.core.Node._update_appearance().
|
private |
Update the node aspect to reflect the selected/highlighted state.
self | class object. |
Definition at line 399 of file core.py.
References visualizer.core.Node._color, visualizer.core.Node._label, visualizer.core.Node._label_canvas_item, visualizer.core.Node._selected, visualizer.core.Node._size, visualizer.core.Node._update_position(), visualizer.core.Node.canvas_item, visualizer.core.Channel.canvas_item, visualizer.core.WiredLink.canvas_item, wifi_intrastructure_link.WifiLink.canvas_item, visualizer.core.Node.highlighted, visualizer.core.Node.svg_item, visualizer.base.transform_distance_simulation_to_canvas(), visualizer.core.Node.visualizer, interface_statistics.StatisticsCollector.visualizer, interface_statistics.ShowInterfaceStatistics.visualizer, ipv4_routing_table.ShowIpv4RoutingTable.visualizer, olsr.ShowOlsrRoutingTable.visualizer, and show_last_packets.ShowLastPackets.visualizer.
Referenced by visualizer.core.Node._set_highlighted(), visualizer.core.Node._set_selected(), visualizer.core.Node.set_color(), visualizer.core.Node.set_label(), visualizer.core.Node.set_size(), and visualizer.core.Node.set_svg_icon().
|
private |
Update position function.
self | class object. |
Definition at line 496 of file core.py.
References nlohmann::detail::lexer< BasicJsonType, InputAdapterType >.get_position(), visualizer.core.Node.get_position(), visualizer.core.Channel.get_position(), grid.ScaleRenderer.get_position(), visualizer.core.Node.set_position(), and visualizer.core.Channel.set_position().
Referenced by visualizer.core.Node._update_appearance().
|
private |
Update svg position.
self | class object. |
x | x position |
y | y position |
Definition at line 230 of file core.py.
References visualizer.core.Node.svg_align_x, visualizer.core.Node.svg_align_y, and visualizer.core.Node.svg_item.
Referenced by visualizer.core.Node.set_position(), and visualizer.core.Node.set_svg_icon().
def visualizer.core.Node.add_link | ( | self, | |
link | |||
) |
Add link function.
self | class object. |
link | link to add. |
Definition at line 525 of file core.py.
References visualizer.core.Node.links, and visualizer.core.Channel.links.
def visualizer.core.Node.get_position | ( | self | ) |
Get position function.
self | class object. |
Definition at line 484 of file core.py.
References visualizer.core.Node.canvas_item, visualizer.core.Channel.canvas_item, visualizer.core.WiredLink.canvas_item, and wifi_intrastructure_link.WifiLink.canvas_item.
Referenced by visualizer.core.Node._update_position().
def visualizer.core.Node.has_mobility | ( | self | ) |
Has mobility function.
self | class object. |
Definition at line 548 of file core.py.
References visualizer.core.Node._has_mobility, visualizer.core.Node.node_index, interface_statistics.ShowInterfaceStatistics.node_index, ipv4_routing_table.ShowIpv4RoutingTable.node_index, and olsr.ShowOlsrRoutingTable.node_index.
visualizer.core.Node.on_enter_notify_event | ( | self, | |
view, | |||
target, | |||
event | |||
) |
On Enter event handle.
on_enter_notify_event function
self | class object. |
view | view |
target | target |
event | event |
Definition at line 318 of file core.py.
References visualizer.core.Node.highlighted.
visualizer.core.Node.on_leave_notify_event | ( | self, | |
view, | |||
target, | |||
event | |||
) |
On Leave event handle.
on_leave_notify_event function
self | class object. |
view | view |
target | target |
event | event |
Definition at line 332 of file core.py.
References visualizer.core.Node.highlighted.
def visualizer.core.Node.remove_link | ( | self, | |
link | |||
) |
Remove link function.
self | class object. |
link | link to add. |
Definition at line 536 of file core.py.
References visualizer.core.Node.links, and visualizer.core.Channel.links.
def visualizer.core.Node.set_color | ( | self, | |
color | |||
) |
Set color function.
self | class object. |
color | color to set. |
Definition at line 506 of file core.py.
References visualizer.core.Node._color, and visualizer.core.Node._update_appearance().
def visualizer.core.Node.set_label | ( | self, | |
label | |||
) |
Set a label for the node.
self | class object. |
label | label to set |
Definition at line 217 of file core.py.
References visualizer.core.Node._label, and visualizer.core.Node._update_appearance().
def visualizer.core.Node.set_position | ( | self, | |
x, | |||
y | |||
) |
Set position function.
self | class object. |
x | x position |
y | y position |
Definition at line 444 of file core.py.
References visualizer.core.Node._label_canvas_item, visualizer.core.Node._size, visualizer.core.Node._update_svg_position(), visualizer.core.Node.canvas_item, visualizer.core.Channel.canvas_item, visualizer.core.WiredLink.canvas_item, wifi_intrastructure_link.WifiLink.canvas_item, visualizer.core.Node.links, visualizer.core.Channel.links, max, min, visualizer.core.Node.svg_item, visualizer.core.Node.visualizer, interface_statistics.StatisticsCollector.visualizer, interface_statistics.ShowInterfaceStatistics.visualizer, ipv4_routing_table.ShowIpv4RoutingTable.visualizer, olsr.ShowOlsrRoutingTable.visualizer, and show_last_packets.ShowLastPackets.visualizer.
Referenced by visualizer.core.Node._update_position().
def visualizer.core.Node.set_size | ( | self, | |
size | |||
) |
Set size function.
self | class object. |
size | selected size |
Definition at line 388 of file core.py.
References visualizer.core.Node._size, and visualizer.core.Node._update_appearance().
def 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 171 of file core.py.
References visualizer.core.Node._update_appearance(), visualizer.core.Node._update_svg_position(), visualizer.core.Node.canvas_item, visualizer.core.Channel.canvas_item, visualizer.core.WiredLink.canvas_item, wifi_intrastructure_link.WifiLink.canvas_item, visualizer.core.Node.svg_align_x, visualizer.core.Node.svg_align_y, visualizer.core.Node.svg_item, visualizer.base.transform_distance_simulation_to_canvas(), visualizer.core.Node.visualizer, interface_statistics.StatisticsCollector.visualizer, interface_statistics.ShowInterfaceStatistics.visualizer, ipv4_routing_table.ShowIpv4RoutingTable.visualizer, olsr.ShowOlsrRoutingTable.visualizer, and show_last_packets.ShowLastPackets.visualizer.
def visualizer.core.Node.tooltip_query | ( | self, | |
tooltip | |||
) |
Query tooltip.
self | class object. |
tooltip | tooltip |
Reimplemented from visualizer.base.PyVizObject.
Definition at line 245 of file core.py.
References visualizer.core.Node.node_index, interface_statistics.ShowInterfaceStatistics.node_index, ipv4_routing_table.ShowIpv4RoutingTable.node_index, olsr.ShowOlsrRoutingTable.node_index, visualizer.core.Node.visualizer, interface_statistics.StatisticsCollector.visualizer, interface_statistics.ShowInterfaceStatistics.visualizer, ipv4_routing_table.ShowIpv4RoutingTable.visualizer, olsr.ShowOlsrRoutingTable.visualizer, and show_last_packets.ShowLastPackets.visualizer.
|
staticprivate |
|
private |
color
Definition at line 158 of file core.py.
Referenced by visualizer.core.Node._update_appearance(), and visualizer.core.Node.set_color().
|
private |
has mobility model
Definition at line 155 of file core.py.
Referenced by visualizer.core.Node.has_mobility().
|
private |
is highlighted
Definition at line 157 of file core.py.
Referenced by visualizer.core.Node._get_highlighted(), and visualizer.core.Node._set_highlighted().
|
private |
label
Definition at line 166 of file core.py.
Referenced by visualizer.core.Node._update_appearance(), and visualizer.core.Node.set_label().
|
private |
label canvas
Definition at line 167 of file core.py.
Referenced by visualizer.core.Node._update_appearance(), and visualizer.core.Node.set_position().
|
private |
is selected
Definition at line 156 of file core.py.
Referenced by visualizer.core.Node._get_selected(), visualizer.core.Node._set_selected(), and visualizer.core.Node._update_appearance().
|
private |
size
Definition at line 159 of file core.py.
Referenced by visualizer.core.Node._update_appearance(), visualizer.core.Node.set_position(), and visualizer.core.Node.set_size().
visualizer.core.Node.canvas_item |
canvas item
Definition at line 152 of file core.py.
Referenced by visualizer.core.Node._update_appearance(), wifi_intrastructure_link.WifiLink.destroy(), visualizer.core.Node.get_position(), visualizer.core.Channel.get_position(), wifi_intrastructure_link.WifiLink.set_ap(), visualizer.core.Node.set_position(), visualizer.core.Channel.set_position(), visualizer.core.Node.set_svg_icon(), and visualizer.core.WiredLink.update_points().
visualizer.core.Node.links |
links
Definition at line 154 of file core.py.
Referenced by visualizer.core.Node.add_link(), visualizer.core.Node.remove_link(), visualizer.core.Node.set_position(), and visualizer.core.Channel.set_position().
visualizer.core.Node.node_index |
node index
Definition at line 151 of file core.py.
Referenced by visualizer.core.Node.has_mobility(), visualizer.core.Node.tooltip_query(), interface_statistics.ShowInterfaceStatistics.update(), ipv4_routing_table.ShowIpv4RoutingTable.update(), and olsr.ShowOlsrRoutingTable.update().
visualizer.core.Node.svg_align_x |
svg align X
Definition at line 164 of file core.py.
Referenced by visualizer.core.Node._update_svg_position(), and visualizer.core.Node.set_svg_icon().
visualizer.core.Node.svg_align_y |
svg align Y
Definition at line 165 of file core.py.
Referenced by visualizer.core.Node._update_svg_position(), and visualizer.core.Node.set_svg_icon().
visualizer.core.Node.svg_item |
svg item
Definition at line 163 of file core.py.
Referenced by visualizer.core.Node._update_appearance(), visualizer.core.Node._update_svg_position(), visualizer.core.Node.set_position(), and visualizer.core.Node.set_svg_icon().
visualizer.core.Node.visualizer |
visualier object
Definition at line 150 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(), visualizer.core.Node._update_appearance(), interface_statistics.StatisticsCollector.get_interface_statistics(), visualizer.core.Node.set_position(), visualizer.core.Node.set_svg_icon(), visualizer.core.Node.tooltip_query(), and show_last_packets.ShowLastPackets.update().
|
static |
highlighted property
Definition at line 386 of file core.py.
Referenced by visualizer.core.Node._update_appearance(), visualizer.core.Node.on_enter_notify_event(), and visualizer.core.Node.on_leave_notify_event().
|
static |