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

Class TopicModel

source code

python_qt_binding.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
 
flags(self, index)
:param index: parent of the list :type index: QtCore.QModelIndex<https://srinikom.github.io/pyside-docs/PySide/QtCore/QModelIndex.html> :return: Flag or the requested item :rtype: QtCore.Qt.ItemFlag<https://srinikom.github.io/pyside-docs/PySide/QtCore/Qt.html> :see: http://www.pyside.org/docs/pyside-1.0.1/PySide/QtCore/Qt.html
source code
 
get_cap_group(self, topic_name) source code
 
get_root_group(self) source code
 
updateModelData(self, topics, added_topics, updated_topics, removed_topics)
Updates the topics model.
source code
 
index_from_names(self, publisher, subscriber)
Returns for given topics the list of QModelIndex in this model.
source code
Class Variables
  header = [('Name', 300), ('Publisher', 50), ('Subscriber', 50)...
:ivar: the list with columns [(name, width), ...]
Method Details

updateModelData(self, topics, added_topics, updated_topics, removed_topics)

source code 

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

:param topics: The dictionary with topics :type topics: {topic name : master_discovery_fkie.TopicInfo} :param added_topics: the list of new topics in the :topics: list :type added_topics: list or set :param updated_topics: the list of updated topics in the :topics: list :type updated_topics: list or set :param removed_topics: the list of removed topics in the :topics: list :type removed_topics: list or set

index_from_names(self, publisher, subscriber)

source code 

Returns for given topics the list of QModelIndex in this model.

:param [str] publisher: the list of publisher topics :param [str] subscriber: the list of subscriber topics :return: the list of QModelIndex :rtype: [QtCore.QModelIndex]


Class Variable Details

header

:ivar: the list with columns [(name, width), ...]

Value:
[('Name', 300), ('Publisher', 50), ('Subscriber', 50), ('Type',-1)]