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

Class ServiceItem

source code

       object --+            
                |            
sip.simplewrapper --+        
                    |        
          sip.wrapper --+    
                        |    
PyQt5.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.

Nested Classes

Inherited from PyQt5.QtGui.QStandardItem: ItemType

Instance Methods
 
__init__(self, service, parent=None)
Initialize the service item.
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

Inherited from PyQt5.QtGui.QStandardItem: __ge__, __gt__, __le__, __lt__, __ne__, accessibleDescription, accessibleText, appendColumn, appendRow, appendRows, background, checkState, child, clone, column, columnCount, emitDataChanged, flags, font, foreground, hasChildren, icon, index, insertColumn, insertColumns, insertRow, insertRows, isCheckable, isDragEnabled, isDropEnabled, isEditable, isEnabled, isSelectable, isTristate, model, parent, read, removeColumn, removeColumns, removeRow, removeRows, row, rowCount, setAccessibleDescription, setAccessibleText, setBackground, setCheckState, setCheckable, setChild, setColumnCount, setData, setDragEnabled, setDropEnabled, setEditable, setEnabled, setFlags, setFont, setForeground, setIcon, setRowCount, setSelectable, setSizeHint, setStatusTip, setText, setTextAlignment, setToolTip, setTristate, setWhatsThis, sizeHint, sortChildren, statusTip, takeChild, takeColumn, takeRow, text, textAlignment, toolTip, whatsThis, write

Inherited from sip.simplewrapper: __new__

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

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 = 1037
  NAME_ROLE = 257
  TYPE_ROLE = 258
  NODENAMES_ROLE = 259

Inherited from PyQt5.QtGui.QStandardItem: Type, UserType

Instance Variables
  service
service info as master_discovery_fkie.ServiceInfo.
Properties
  name
  service_type_str
  parent_item
  with_namespace
Returns `True` if the topic name contains a '/' in his name

Inherited from object: __class__

Method Details

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

source code 

Initialize the service item.

Parameters:
Overrides: object.__init__

updateServiceView(self)

source code 

Updates the view of the service on changes.

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

type(self)

source code 
Overrides: PyQt5.QtGui.QStandardItem.type

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:

data(self, role)

source code 
Overrides: PyQt5.QtGui.QStandardItem.data

__eq__(self, item)
(Equality operator)

source code 

Compares the name of service.

Overrides: PyQt5.QtGui.QStandardItem.__eq__

Property Details

name

Get Method:
unreachable.name(self)
Set Method:
unreachable.name(self, new_name)

service_type_str

Get Method:
unreachable.service_type_str(self)

parent_item

Get Method:
unreachable.parent_item(self)
Set Method:
unreachable.parent_item(self, parent_item)

with_namespace

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

:rtype: bool

Get Method:
unreachable.with_namespace(self) - Returns `True` if the topic name contains a '/' in his name