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

Class ServiceModel

source code

python_qt_binding.QtGui.QStandardItemModel --+
                                             |
                                            ServiceModel

The model to manage the list with services 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 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
Instance Variables
  header = [('Name', 300), ('Type',-1)]
the list with columns [(name, width), ...]
Method Details

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