Package node_manager_fkie :: Module topic_list_model :: Class TopicModel
[frames] | no frames]

Class TopicModel

source code

PySide.QtGui.QStandardItemModel --+
                                  |
                                 TopicModel

The model to manage the list with topics in ROS network.

Instance Methods
 
__init__(self)
Creates a new list model.
source code
PySide.QtCore.Qt.ItemFlag
flags(self, index)
Returns: Flag or the requested item
source code
 
updateModelData(self, topics)
Updates the topics model.
source code
Instance Variables
  header = [('Name', 300), ('Publisher', 50), ('Subscriber', 50)...
the list with columns [(name, width), ...]
Method Details

flags(self, index)

source code 
Parameters:
  • index (PySide.QtCore.QModelIndex) - parent of the list
Returns: PySide.QtCore.Qt.ItemFlag
Flag or the requested item

updateModelData(self, topics)

source code 

Updates the topics model. New topic will be inserted in sorting order. Not available topics removed from the model.

Parameters:
  • topics (dict(topic name : master_discovery_fkie.TopicInfo, ...)) - The dictionary with topics

Instance Variable Details

header

the list with columns [(name, width), ...]
Value:
[('Name', 300), ('Publisher', 50), ('Subscriber', 50), ('Type',-1)]