Package node_manager_fkie :: Module topic_list_model :: Class TopicItem
[frames] | no frames]

Class TopicItem

source code

python_qt_binding.QtGui.QStandardItem --+
                                        |
                                       TopicItem

The topic item stored in the topic model. This class stores the topic as master_discovery_fkie.TopicInfo. The name of the topic represented in HTML.

Instance Methods
 
__init__(self, name, topic=None, parent=None)
Initialize the topic item.
source code
 
name(self, new_name) source code
 
topic_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, topic_info=None)
Updates the view
source code
 
updatePublisherView(self)
Updates the representation of the column contains the publisher state.
source code
 
updateSubscriberView(self)
Updates the representation of the column contains the subscriber state.
source code
 
updateTypeView(self)
Updates the representation of the column contains the type of the topic.
source code
 
show_error_msg(self, msg) source code
 
type(self) source code
 
data(self, role) source code
 
__eq__(self, item)
Compares the name of topic.
source code
Class Methods
 
create_item_list(self, topic, root)
Creates the list of the items from topic.
source code
Class Variables
  ITEM_TYPE = QStandardItem.UserType+ 36
  NAME_ROLE = Qt.UserRole+ 1
  NODENAMES_ROLE = Qt.UserRole+ 2
  COL_PUB = 1
  COL_SUB = 2
  COL_TYPE = 3
Instance Variables
  topic
topic as master_discovery_fkie.TopicInfo.
Method Details

__init__(self, name, topic=None, parent=None)
(Constructor)

source code 

Initialize the topic item. :param str name: the topic name :param topic: the topic info :type topic: master_discovery_fkie.TopicInfo

name(self, new_name)

source code 
Decorators:
  • @name.setter

topic_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

create_item_list(self, topic, root)
Class Method

source code 

Creates the list of the items from topic. This list is used for the visualization of topic data as a table row. :param str topic: the topic name :param root: The parent QStandardItem :type root: QStandardItem :return: the list for the representation as a row :rtype: [TopicItem or QStandardItem, ...]