Package node_manager_fkie :: Module master_list_model :: Class MasterModel
[frames] | no frames]

Class MasterModel

source code

         object --+                    
                  |                    
  sip.simplewrapper --+                
                      |                
            sip.wrapper --+            
                          |            
       PyQt4.QtCore.QObject --+        
                              |        
PyQt4.QtCore.QAbstractItemModel --+    
                                  |    
     PyQt4.QtGui.QStandardItemModel --+
                                      |
                                     MasterModel

The model to manage the list with masters in ROS network.

Instance Methods
 
__init__(self, local_masteruri=None)
Creates a new list model.
source code
PySide.QtCore.Qt.ItemFlag
flags(self, index)
Returns: Flag or the requestet item
source code
 
updateMaster(self, master)
Updates the information of the ros master.
source code
 
updateMasterStat(self, master, quality)
Updates the information of the ros master.
source code
 
setChecked(self, master, state)
Set the master to checked state
source code
 
removeMaster(self, master)
Remove the master with given name.
source code
 
updateDescription(self, master, descr)
Updates the description of the master with given name.
source code

Inherited from PyQt4.QtGui.QStandardItemModel: appendColumn, appendRow, clear, columnCount, data, dropMimeData, findItems, hasChildren, headerData, horizontalHeaderItem, index, indexFromItem, insertColumn, insertColumns, insertRow, insertRows, invisibleRootItem, item, itemChanged, itemData, itemFromIndex, itemPrototype, mimeData, mimeTypes, parent, removeColumns, removeRows, rowCount, setColumnCount, setData, setHeaderData, setHorizontalHeaderItem, setHorizontalHeaderLabels, setItem, setItemData, setItemPrototype, setRowCount, setSortRole, setVerticalHeaderItem, setVerticalHeaderLabels, sort, sortRole, supportedDropActions, takeColumn, takeHorizontalHeaderItem, takeItem, takeRow, takeVerticalHeaderItem, verticalHeaderItem

Inherited from PyQt4.QtCore.QAbstractItemModel: beginInsertColumns, beginInsertRows, beginMoveColumns, beginMoveRows, beginRemoveColumns, beginRemoveRows, beginResetModel, buddy, canFetchMore, changePersistentIndex, changePersistentIndexList, columnsAboutToBeInserted, columnsAboutToBeMoved, columnsAboutToBeRemoved, columnsInserted, columnsMoved, columnsRemoved, createIndex, dataChanged, decodeData, encodeData, endInsertColumns, endInsertRows, endMoveColumns, endMoveRows, endRemoveColumns, endRemoveRows, endResetModel, fetchMore, hasIndex, headerDataChanged, layoutAboutToBeChanged, layoutChanged, match, modelAboutToBeReset, modelReset, persistentIndexList, removeColumn, removeRow, reset, resetInternalData, revert, roleNames, rowsAboutToBeInserted, rowsAboutToBeMoved, rowsAboutToBeRemoved, rowsInserted, rowsMoved, rowsRemoved, setRoleNames, setSupportedDragActions, sibling, span, submit, supportedDragActions

Inherited from PyQt4.QtCore.QObject: __getattr__, blockSignals, childEvent, children, connect, connectNotify, customEvent, deleteLater, destroyed, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, emit, event, eventFilter, findChild, findChildren, inherits, installEventFilter, isWidgetType, killTimer, metaObject, moveToThread, objectName, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr, trUtf8

Inherited from sip.simplewrapper: __new__

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

Class Variables
  COL_SYNC = 0
  COL_NAME = 1

Inherited from PyQt4.QtCore.QObject: staticMetaObject

Instance Variables
  header = [('Sync', 22), ('Name', -1)]
the list with columns [(name, width), ...]
Properties

Inherited from object: __class__

Method Details

__init__(self, local_masteruri=None)
(Constructor)

source code 

Creates a new list model.

Overrides: object.__init__

flags(self, index)

source code 
Parameters:
  • index (PySide.QtCore.QModelIndex) - parent of the list
Returns: PySide.QtCore.Qt.ItemFlag
Flag or the requestet item
Overrides: PyQt4.QtCore.QAbstractItemModel.flags

updateMaster(self, master)

source code 

Updates the information of the ros master. If the ROS master not exists, it will be added.

Parameters:
  • master (master_discovery_fkie.msg.ROSMaster) - the ROS master to update

updateMasterStat(self, master, quality)

source code 

Updates the information of the ros master.

Parameters:
  • master (str) - the ROS master to update
  • quality (float) - the quality of the connection to master

setChecked(self, master, state)

source code 

Set the master to checked state

Parameters:
  • master (str) - the ROS master to update
  • state (bool) - new state

removeMaster(self, master)

source code 

Remove the master with given name.

Parameters:
  • master (str) - the ROS master to add

updateDescription(self, master, descr)

source code 

Updates the description of the master with given name.

Parameters:
  • master (str) - the ROS master to add
  • descr (str) - the description of the master coded as HTML