A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
visualizer.core.Node Class Reference
+ Inheritance diagram for visualizer.core.Node:
+ Collaboration diagram for visualizer.core.Node:

Public Member Functions

def __init__
 
def add_link
 
def get_position
 
def has_mobility
 
def on_enter_notify_event
 
def on_leave_notify_event
 
def remove_link
 
def set_color
 
def set_label
 
def set_position
 
def set_size
 
def set_svg_icon
 
def tooltip_query
 

Public Attributes

 canvas_item
 
 links
 
 menu
 
 node_index
 
 svg_align_x
 
 svg_align_y
 
 svg_item
 
 visualizer
 

Properties

 highlighted = property(_get_highlighted, _set_highlighted)
 
 selected = property(_get_selected, _set_selected)
 

Private Member Functions

def _get_highlighted
 
def _get_selected
 
def _set_highlighted
 
def _set_selected
 
def _update_appearance
 
def _update_position
 
def _update_svg_position
 

Private Attributes

 _color
 
 _has_mobility
 
 _highlighted
 
 _label
 
 _label_canvas_item
 
 _selected
 
 _size
 

Static Private Attributes

dictionary __gsignals__
 

Detailed Description

Definition at line 69 of file core.py.

Constructor & Destructor Documentation

def visualizer.core.Node.__init__ (   self,
  visualizer,
  node_index 
)

Definition at line 79 of file core.py.

Member Function Documentation

def visualizer.core.Node._get_highlighted (   self)
private

Definition at line 229 of file core.py.

References visualizer.core.Node._highlighted.

def visualizer.core.Node._get_selected (   self)
private

Definition at line 222 of file core.py.

References visualizer.core.Node._selected.

def visualizer.core.Node._set_highlighted (   self,
  value 
)
private

Definition at line 226 of file core.py.

References visualizer.core.Node._highlighted, and visualizer.core.Node._update_appearance().

+ Here is the call graph for this function:

def visualizer.core.Node._set_selected (   self,
  value 
)
private

Definition at line 219 of file core.py.

References visualizer.core.Node._selected, and visualizer.core.Node._update_appearance().

+ Here is the call graph for this function:

def visualizer.core.Node._update_position (   self)
private

Definition at line 288 of file core.py.

References visualizer.core.Node.get_position(), grid.ScaleRenderer.get_position(), and visualizer.core.Node.set_position().

Referenced by visualizer.core.Node._update_appearance().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def visualizer.core.Node._update_svg_position (   self,
  x,
  y 
)
private

Definition at line 152 of file core.py.

References visualizer.core.Node.svg_align_x, and visualizer.core.Node.svg_align_y.

Referenced by visualizer.core.Node.set_position(), and visualizer.core.Node.set_svg_icon().

+ Here is the caller graph for this function:

def visualizer.core.Node.add_link (   self,
  link 
)

Definition at line 299 of file core.py.

def visualizer.core.Node.get_position (   self)

Definition at line 285 of file core.py.

Referenced by visualizer.core.Node._update_position().

+ Here is the caller graph for this function:

def visualizer.core.Node.has_mobility (   self)

Definition at line 308 of file core.py.

References visualizer.core.Node._has_mobility, and visualizer.core.Node.node_index.

def visualizer.core.Node.on_enter_notify_event (   self,
  view,
  target,
  event 
)

Definition at line 214 of file core.py.

References visualizer.core.Node.highlighted.

def visualizer.core.Node.on_leave_notify_event (   self,
  view,
  target,
  event 
)

Definition at line 216 of file core.py.

References visualizer.core.Node.highlighted.

def visualizer.core.Node.remove_link (   self,
  link 
)

Definition at line 303 of file core.py.

def visualizer.core.Node.set_color (   self,
  color 
)

Definition at line 292 of file core.py.

References visualizer.core.Node._color, and visualizer.core.Node._update_appearance().

+ Here is the call graph for this function:

def visualizer.core.Node.set_label (   self,
  label 
)

Definition at line 147 of file core.py.

References visualizer.core.Node._label, and visualizer.core.Node._update_appearance().

+ Here is the call graph for this function:

def visualizer.core.Node.set_position (   self,
  x,
  y 
)

Definition at line 273 of file core.py.

References visualizer.core.Node._label_canvas_item, visualizer.core.Node._size, visualizer.core.Node._update_svg_position(), visualizer.core.Node.links, and visualizer.core.Node.svg_item.

Referenced by visualizer.core.Node._update_position().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def visualizer.core.Node.set_size (   self,
  size 
)

Definition at line 233 of file core.py.

References visualizer.core.Node._size, and visualizer.core.Node._update_appearance().

+ Here is the call graph for this function:

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.

@param file_base_name: base file name, including .svg
extension, of the svg file.  Place the file in the folder
src/contrib/visualizer/resource.

@param width: scale to the specified width, in meters
@param width: scale to the specified height, in meters

@param 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)

@param 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 103 of file core.py.

References visualizer.core.Node._update_appearance(), visualizer.core.Node._update_svg_position(), visualizer.core.Node.svg_align_x, visualizer.core.Node.svg_align_y, visualizer.core.Node.svg_item, and visualizer.base.transform_distance_simulation_to_canvas().

+ Here is the call graph for this function:

def visualizer.core.Node.tooltip_query (   self,
  tooltip 
)

Definition at line 159 of file core.py.

References visualizer.core.Node.node_index.

Member Data Documentation

dictionary visualizer.core.Node.__gsignals__
staticprivate
Initial value:
1 = {
2 
3  # signal emitted whenever a tooltip is about to be shown for the node
4  # the first signal parameter is a python list of strings, to which information can be appended
5  'query-extra-tooltip-info': (gobject.SIGNAL_RUN_LAST, None, (object,)),
6 
7  }

Definition at line 71 of file core.py.

visualizer.core.Node._color
private
visualizer.core.Node._has_mobility
private

Definition at line 87 of file core.py.

Referenced by visualizer.core.Node.has_mobility().

visualizer.core.Node._highlighted
private
visualizer.core.Node._label
private
visualizer.core.Node._label_canvas_item
private
visualizer.core.Node._selected
private
visualizer.core.Node._size
private
visualizer.core.Node.canvas_item

Definition at line 84 of file core.py.

visualizer.core.Node.links
visualizer.core.Node.menu

Definition at line 94 of file core.py.

visualizer.core.Node.svg_align_x
visualizer.core.Node.svg_align_y
visualizer.core.Node.svg_item
visualizer.core.Node.visualizer

Definition at line 82 of file core.py.

Property Documentation

visualizer.core.Node.selected = property(_get_selected, _set_selected)
static

Definition at line 224 of file core.py.


The documentation for this class was generated from the following file: