Package node_manager_fkie :: Module service_list_model :: Class ServiceModel
[frames] | no frames]

Class ServiceModel

source code

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

The model to manage the list with services 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 requestet 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, services, added_srvs, updated_srvs, removed_srvs)
Updates the service list model.
source code
 
index_from_names(self, services)
Returns for given services 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

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

Inherited from PyQt5.QtCore.QObject: staticMetaObject

Instance Variables
  header = [('Name', 300), ('Type', -1)]
the list with columns [(name, width), ...]
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 requestet 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, services, added_srvs, updated_srvs, removed_srvs)

source code 

Updates the service list model. New services will be inserted in sorting order. Not available services removed from the model.

:param services: The dictionary with services :type services: dict(service name : master_discovery_fkie.ServiceInfo) :param added_srvs: the list of new services in the :service: list :type added_srvs: list or set :param updated_srvs: the list of updated services in the :service: list :type updated_srvs: list or set :param removed_srvs: the list of removed services in the :service: list :type removed_srvs: list or set

index_from_names(self, services)

source code 

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

:param [str] services: the list of service names
:return: the list of QModelIndex
:rtype: [QtCore.QModelIndex<https://srinikom.github.io/pyside-docs/PySide/QtCore/QModelIndex.html>}]