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

Class NodeItem

source code

       object --+            
                |            
sip.simplewrapper --+        
                    |        
          sip.wrapper --+    
                        |    
PyQt4.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

Nested Classes

Inherited from PyQt4.QtGui.QStandardItem: ItemType

Instance Methods
 
__init__(self, node_info)
Initialize the NodeItem instance.
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
 
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
 
__eq__(self, item)
Compares the name of the node.
source code
 
__gt__(self, item)
Compares the name of the node.
source code

Inherited from PyQt4.QtGui.QStandardItem: __ge__, __le__, __lt__, __ne__, accessibleDescription, accessibleText, appendColumn, appendRow, appendRows, background, checkState, child, clone, column, columnCount, emitDataChanged, flags, font, foreground, hasChildren, icon, index, insertColumn, insertColumns, insertRow, insertRows, isCheckable, isDragEnabled, isDropEnabled, isEditable, isEnabled, isSelectable, isTristate, model, parent, read, removeColumn, removeColumns, removeRow, removeRows, row, rowCount, setAccessibleDescription, setAccessibleText, setBackground, setCheckState, setCheckable, setChild, setColumnCount, setData, setDragEnabled, setDropEnabled, setEditable, setEnabled, setFlags, setFont, setForeground, setIcon, setRowCount, setSelectable, setSizeHint, setStatusTip, setText, setTextAlignment, setToolTip, setTristate, setWhatsThis, sizeHint, sortChildren, statusTip, takeChild, takeColumn, takeRow, text, textAlignment, toolTip, whatsThis, write

Inherited from sip.simplewrapper: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

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
Class Variables
  ITEM_TYPE = 1035
  NAME_ROLE = 33
  COL_CFG = 1
  STATE_OFF = 0
  STATE_RUN = 1
  STATE_WARNING = 2
  STATE_GHOST = 3
  STATE_DUPLICATE = 4

Inherited from PyQt4.QtGui.QStandardItem: Type, UserType

Properties
  state
  name
  masteruri
  published
  subscribed
  services
master_discovery_fkie.NodeInfo node_info
Returns the NodeInfo instance of this node.
  uri
  pid
bool has_running
Returns True, if there are exists other nodes with the same name.
bool is_ghost
Returns True, if there are exists other runnig nodes with the same name.
[str] cfgs
Returns the list with all launch configurations assigned to this item.

Inherited from object: __class__

Method Details

__init__(self, node_info)
(Constructor)

source code 

Initialize the NodeItem instance.

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

data(self, role)

source code 
Overrides: PyQt4.QtGui.QStandardItem.data

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.

type(self)

source code 
Overrides: PyQt4.QtGui.QStandardItem.type

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

__eq__(self, item)
(Equality operator)

source code 

Compares the name of the node.

Overrides: PyQt4.QtGui.QStandardItem.__eq__

__gt__(self, item)
(Greater-than operator)

source code 

Compares the name of the node.

Overrides: PyQt4.QtGui.QStandardItem.__gt__

Property Details

state

Get Method:
unreachable.state(self)

name

Get Method:
unreachable.name(self)

masteruri

Get Method:
unreachable.masteruri(self)

published

Get Method:
unreachable.published(self)

subscribed

Get Method:
unreachable.subscribed(self)

services

Get Method:
unreachable.services(self)

node_info

Returns the NodeInfo instance of this node.

Get Method:
unreachable.node_info(self) - Returns the NodeInfo instance of this node.
Set Method:
unreachable.node_info(self, node_info) - Sets the NodeInfo and updates the view, if needed.
Type:
master_discovery_fkie.NodeInfo

uri

Get Method:
unreachable.uri(self)

pid

Get Method:
unreachable.pid(self)

has_running

Returns True, if there are exists other nodes with the same name. This variable must be set manually!

Get Method:
unreachable.has_running(self) - Returns True, if there are exists other nodes with the same name.
Set Method:
unreachable.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.
Type:
bool

is_ghost

Returns True, if there are exists other runnig nodes with the same name. This variable must be set manually!

Get Method:
unreachable.is_ghost(self) - Returns True, if there are exists other runnig nodes with the same name.
Set Method:
unreachable.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.
Type:
bool

cfgs

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

Get Method:
unreachable.cfgs(self) - Returns the list with all launch configurations assigned to this item.
Type:
[str]