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

Class MasterModel

source code

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

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

Nested Classes

Inherited from PyQt5.QtCore.QAbstractItemModel: LayoutChangeHint

Instance Methods
 
sync_start(...) source code
 
sync_stop(...) source code
 
__init__(self, local_masteruri=None)
Creates a new list model.
source code
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
[MasterItem or QtGui.QStandardItem, ...]
addRow(self, master, local, root, index)
Creates the list of the items from 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
 
updateMasterErrors(self, master, errors)
Updates the errors reported by master_discovery.
source code
 
updateTimeDiff(self, master, timediff)
Updates the time difference reported by master_discovery.
source code
 
updateDescription(self, master, descr)
Updates the description of the master with given name.
source code
 
on_sync_clicked(self, checked, masteruri) source code

Inherited from PyQt5.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, sibling, sort, sortRole, supportedDropActions, takeColumn, takeHorizontalHeaderItem, takeItem, takeRow, takeVerticalHeaderItem, verticalHeaderItem

Inherited from PyQt5.QtCore.QAbstractItemModel: beginInsertColumns, beginInsertRows, beginMoveColumns, beginMoveRows, beginRemoveColumns, beginRemoveRows, beginResetModel, buddy, canDropMimeData, 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, moveColumn, moveColumns, moveRow, moveRows, persistentIndexList, removeColumn, removeRow, resetInternalData, revert, roleNames, rowsAboutToBeInserted, rowsAboutToBeMoved, rowsAboutToBeRemoved, rowsInserted, rowsMoved, rowsRemoved, span, submit, supportedDragActions

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

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
  COL_SYNCBTN = 2

Inherited from PyQt5.QtCore.QAbstractItemModel: HorizontalSortHint, NoLayoutChangeHint, VerticalSortHint

Inherited from PyQt5.QtCore.QObject: staticMetaObject

Instance Variables
  header = [('Sync', 28), ('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:
Returns: QtCore.Qt.ItemFlag
Flag or the requestet item
Overrides: PyQt5.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:

addRow(self, master, local, root, index)

source code 

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

Parameters:
  • master (master_discovery_fkie.ROSMaster) - the master data
  • local (bool) - whether the master is local or not
Returns: [MasterItem or QtGui.QStandardItem, ...]
the list for the representation as a row

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

updateMasterErrors(self, master, errors)

source code 

Updates the errors reported by master_discovery.

Parameters:
  • master (str) - the ROS master to update
  • errors ([str]) - the list with errors

updateTimeDiff(self, master, timediff)

source code 

Updates the time difference reported by master_discovery.

Parameters:
  • master (str) - the ROS master to update
  • timediff (float) - the time difference to the host

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