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

Class NodeItem

source code

python_qt_binding.QtGui.QStandardItem --+
                                        |
                                       NodeItem

The NodeItem stores the information about the node using the ExtendedNodeInfo class and represents it in a QTreeView using the QStandardItemModel

Instance Methods
 
__init__(self, node_info)
Initialize the NodeItem instance.
source code
 
state(self) source code
 
name(self, new_name) source code
 
masteruri(self) source code
 
published(self) source code
 
subscribed(self) source code
 
services(self) source code
 
parent_item(self, parent_item) 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 of this item.
source code
 
is_ghost(self, state)
Sets however other node with the same name is running (on other hosts) and and the host showing this node the master_sync is running, but the node is not synchronized.
source code
 
with_namespace(self)
Returns `True` if the node name contains a '/' in his name
source code
 
append_diagnostic_status(self, diagnostic_status) source code
 
data(self, role) 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
 
has_configs(self) source code
 
is_running(self) source code
 
has_std_cfg(self) source code
 
count_launch_cfgs(self) source code
 
count_default_cfgs(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, QtGui.QStandardItem(Cofigurations), 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
Class Variables
  ITEM_TYPE = QStandardItem.UserType+ 35
  NAME_ROLE = Qt.UserRole+ 1
  COL_CFG = 1
  STATE_OFF = 0
  STATE_RUN = 1
  STATE_WARNING = 2
  STATE_GHOST = 3
  STATE_DUPLICATE = 4
  STATE_PARTS = 5
Method Details

__init__(self, node_info)
(Constructor)

source code 

Initialize the NodeItem instance.

Parameters:

state(self)

source code 
Decorators:
  • @property

name(self, new_name)

source code 
Decorators:
  • @name.setter

masteruri(self)

source code 
Decorators:
  • @property

published(self)

source code 
Decorators:
  • @property

subscribed(self)

source code 
Decorators:
  • @property

services(self)

source code 
Decorators:
  • @property

parent_item(self, parent_item)

source code 
Decorators:
  • @parent_item.setter

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 of this item.

Decorators:
  • @has_running.setter

is_ghost(self, state)

source code 

Sets however other node with the same name is running (on other hosts) and and the host showing this node the master_sync is running, but the node is not synchronized.

Decorators:
  • @is_ghost.setter

with_namespace(self)

source code 

Returns `True` if the node name contains a '/' in his name

:rtype: bool

Decorators:
  • @property

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, QtGui.QStandardItem(Cofigurations), QtGui.QStandardItem(Node URI)]
the list for the representation as a row