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

Class ServiceItem

source code

python_qt_binding.QtGui.QStandardItem --+
                                        |
                                       ServiceItem

The service item stored in the service model. This class stores the service as master_discovery_fkie.ServiceInfo. The name of the service is represented in HTML.

Instance Methods
 
__init__(self, service, parent=None)
Initialize the service item.
source code
 
name(self, new_name) source code
 
service_type_str(self) source code
 
parent_item(self, parent_item) source code
 
with_namespace(self)
Returns `True` if the topic name contains a '/' in his name
source code
 
update_view(self, service_info=None)
Updates the view
source code
 
updateServiceView(self)
Updates the view of the service on changes.
source code
 
type(self) source code
 
data(self, role) source code
 
__eq__(self, item)
Compares the name of service.
source code
Class Methods
 
create_item_list(self, service, root)
Creates the list of the items from service.
source code
 
updateTypeView(cls, service, item)
Updates the representation of the column contains the type of the service.
source code
Class Variables
  ITEM_TYPE = QStandardItem.UserType+ 37
  NAME_ROLE = Qt.UserRole+ 1
  TYPE_ROLE = Qt.UserRole+ 2
  NODENAMES_ROLE = Qt.UserRole+ 3
Instance Variables
  service
service info as master_discovery_fkie.ServiceInfo.
Method Details

__init__(self, service, parent=None)
(Constructor)

source code 

Initialize the service item.

Parameters:

name(self, new_name)

source code 
Decorators:
  • @name.setter

service_type_str(self)

source code 
Decorators:
  • @property

parent_item(self, parent_item)

source code 
Decorators:
  • @parent_item.setter

with_namespace(self)

source code 

Returns `True` if the topic name contains a '/' in his name

:rtype: bool

Decorators:
  • @property

updateServiceView(self)

source code 

Updates the view of the service on changes.

:param parent: the item containing this item :type parent: QtGui.QStandardItem

create_item_list(self, service, root)
Class Method

source code 

Creates the list of the items from service. This list is used for the visualization of service data as a table row.

:param service: the service data :type service: master_discovery_fkie.ServiceInfo :return: the list for the representation as a row :rtype: [ServiceItem or QtGui.QStandardItem, ...]

updateTypeView(cls, service, item)
Class Method

source code 

Updates the representation of the column contains the type of the service.

Parameters: