Package node_manager_fkie :: Module node_tree_model :: Class NodeItem
[frames] | no frames]

Class NodeItem

source code

PySide.QtGui.QStandardItem --+
                             |
                            NodeItem

The NodeItem stores the information about the node using the ExtendedNodeInfo class and represents it in a PySide.QtGui.QTreeModel using the PySide.QtGui.QStandardItemModel

Instance Methods
 
__init__(self, node_info)
Initialize the NodeItem instance.
source code
 
state(self) source code
bool
is_valid(self)
Returns True if the node has no configuration and is not running, so the pid and node URI are None
source code
 
name(self) source code
 
masteruri(self) source code
 
published(self) source code
 
subscribed(self) source code
 
services(self) source code
 
node_info(self, node_info)
Sets the NodeInfo and updates the view, if needed.
source code
 
uri(self) source code
 
pid(self) source code
 
has_running(self, state)
Sets however other node with the same name are running or not (on other hosts) and updates the view oth this item.
source code
 
updateDispayedName(self)
Updates the name representation of the Item
source code
 
updateDisplayedURI(self)
Updates the URI representation in other column.
source code
[str]
cfgs(self)
Returns the list with all launch configurations assigned to this item.
source code
 
addConfig(self, cfg)
Add the given configurations to the node.
source code
 
remConfig(self, cfg)
Remove the given configurations from the node.
source code
 
updateDisplayedConfig(self)
Updates the configuration representation in other column.
source code
 
type(self) source code
 
__eq__(self, item)
Compares the name of the node.
source code
 
__gt__(self, item)
Compares the name of the node.
source code
Class Methods
[NodeItem, PySide.QtGui.QStandardItem(Cofigurations), PySide.QtGui.QStandardItem(Node URI)]
newNodeRow(self, name, masteruri)
Creates a new node row and returns it as a list with items.
source code
 
has_launch_cfgs(cls, cfgs) source code
 
has_default_cfgs(cls, cfgs) source code
 
is_default_cfg(cls, cfg) source code
str
toHTML(cls, node_name)
Creates a HTML representation of the node name.
source code
Class Variables
  ITEM_TYPE = QtGui.QStandardItem.UserType+ 35
  COL_CFG = 1
  STATE_OFF = 0
  STATE_RUN = 1
  STATE_WARNING = 2
  STATE_DUPLICATE = 3
Method Details

__init__(self, node_info)
(Constructor)

source code 

Initialize the NodeItem instance.

Parameters:
  • node_info (master_discovery_fkie.NodeInfo) - the node information

state(self)

source code 
Decorators:
  • @property

name(self)

source code 
Decorators:
  • @property

masteruri(self)

source code 
Decorators:
  • @property

published(self)

source code 
Decorators:
  • @property

subscribed(self)

source code 
Decorators:
  • @property

services(self)

source code 
Decorators:
  • @property

node_info(self, node_info)

source code 

Sets the NodeInfo and updates the view, if needed.

Decorators:
  • @node_info.setter

uri(self)

source code 
Decorators:
  • @property

pid(self)

source code 
Decorators:
  • @property

has_running(self, state)

source code 

Sets however other node with the same name are running or not (on other hosts) and updates the view oth this item.

Decorators:
  • @has_running.setter

cfgs(self)

source code 

Returns the list with all launch configurations assigned to this item.

Returns: [str]
Decorators:
  • @property

addConfig(self, cfg)

source code 

Add the given configurations to the node.

Parameters:
  • cfg (str) - the loaded configuration, which contains this node.

remConfig(self, cfg)

source code 

Remove the given configurations from the node.

Parameters:
  • cfg (str) - the loaded configuration, which contains this node.

newNodeRow(self, name, masteruri)
Class Method

source code 

Creates a new node row and returns it as a list with items. This list is used for the visualization of node data as a table row.

Parameters:
  • name (str) - the node name
  • masteruri (str) - the URI or the ROS master assigned to this node.
Returns: [NodeItem, PySide.QtGui.QStandardItem(Cofigurations), PySide.QtGui.QStandardItem(Node URI)]
the list for the representation as a row

toHTML(cls, node_name)
Class Method

source code 

Creates a HTML representation of the node name.

Parameters:
  • node_name (str) - the name of the node
Returns: str
the HTML representation of the name of the node