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

Class ServiceItem

source code

PySide.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
 
updateServiceView(self, parent)
Updates the view of the service on changes.
source code
 
type(self) source code
Class Methods
str
toHTML(cls, service_name)
Creates a HTML representation of the service name.
source code
[ServiceItem or PySide.QtGui.QStandardItem, ...]
getItemList(self, service)
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 = QtGui.QStandardItem.UserType+ 37
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:
  • service (master_discovery_fkie.ServiceInfo) - the service object to view

updateServiceView(self, parent)

source code 

Updates the view of the service on changes.

Parameters:
  • parent (PySide.QtGui.QStandardItem) - the item containing this item

toHTML(cls, service_name)
Class Method

source code 

Creates a HTML representation of the service name.

Parameters:
  • service_name (str) - the service name
Returns: str
the HTML representation of the service name

getItemList(self, service)
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.

Parameters:
  • service (master_discovery_fkie.ServiceInfo) - the service data
Returns: [ServiceItem or PySide.QtGui.QStandardItem, ...]
the list for the representation as a row

updateTypeView(cls, service, item)
Class Method

source code 

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

Parameters:
  • service (master_discovery_fkie.ServiceInfo) - the service data
  • item (ServiceItem) - corresponding item in the model