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

Class TopicModel

source code

         object --+                    
                  |                    
  sip.simplewrapper --+                
                      |                
            sip.wrapper --+            
                          |            
       PyQt5.QtCore.QObject --+        
                              |        
PyQt5.QtCore.QAbstractItemModel --+    
                                  |    
     PyQt5.QtGui.QStandardItemModel --+
                                      |
                                     TopicModel

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

Nested Classes

Inherited from PyQt5.QtCore.QAbstractItemModel: LayoutChangeHint

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

Inherited from PyQt5.QtGui.QStandardItemModel: appendColumn, appendRow, clear, columnCount, data, dropMimeData, findItems, hasChildren, headerData, horizontalHeaderItem, index, indexFromItem, insertColumn, insertColumns, insertRow, insertRows, invisibleRootItem, item, itemChanged, itemData, itemFromIndex, itemPrototype, mimeData, mimeTypes, parent, removeColumns, removeRows, rowCount, setColumnCount, setData, setHeaderData, setHorizontalHeaderItem, setHorizontalHeaderLabels, setItem, setItemData, setItemPrototype, setRowCount, setSortRole, setVerticalHeaderItem, setVerticalHeaderLabels, sibling, sort, sortRole, supportedDropActions, takeColumn, takeHorizontalHeaderItem, takeItem, takeRow, takeVerticalHeaderItem, verticalHeaderItem

Inherited from PyQt5.QtCore.QAbstractItemModel: beginInsertColumns, beginInsertRows, beginMoveColumns, beginMoveRows, beginRemoveColumns, beginRemoveRows, beginResetModel, buddy, canDropMimeData, canFetchMore, changePersistentIndex, changePersistentIndexList, columnsAboutToBeInserted, columnsAboutToBeMoved, columnsAboutToBeRemoved, columnsInserted, columnsMoved, columnsRemoved, createIndex, dataChanged, decodeData, encodeData, endInsertColumns, endInsertRows, endMoveColumns, endMoveRows, endRemoveColumns, endRemoveRows, endResetModel, fetchMore, hasIndex, headerDataChanged, layoutAboutToBeChanged, layoutChanged, match, modelAboutToBeReset, modelReset, moveColumn, moveColumns, moveRow, moveRows, persistentIndexList, removeColumn, removeRow, resetInternalData, revert, roleNames, rowsAboutToBeInserted, rowsAboutToBeMoved, rowsAboutToBeRemoved, rowsInserted, rowsMoved, rowsRemoved, span, submit, supportedDragActions

Inherited from PyQt5.QtCore.QObject: __getattr__, blockSignals, childEvent, children, connectNotify, customEvent, deleteLater, destroyed, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChildren, inherits, installEventFilter, isSignalConnected, isWidgetType, isWindowType, killTimer, metaObject, moveToThread, objectName, objectNameChanged, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr

Inherited from sip.simplewrapper: __new__

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

Class Variables
  header = [('Name', 300), ('Publisher', 50), ('Subscriber', 50)...
:ivar: the list with columns [(name, width), ...]

Inherited from PyQt5.QtCore.QAbstractItemModel: HorizontalSortHint, NoLayoutChangeHint, VerticalSortHint

Inherited from PyQt5.QtCore.QObject: staticMetaObject

Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

source code 

Creates a new list model.

Overrides: object.__init__

flags(self, index)

source code 

: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

Overrides: PyQt5.QtCore.QAbstractItemModel.flags

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)]