Uranium
Application Framework
UM.Qt.ListModel.ListModel Class Reference
Inheritance diagram for UM.Qt.ListModel.ListModel:
UM.Qt.Bindings.OutputDevicesModel.OutputDevicesModel UM.Qt.Bindings.ProjectOutputDevicesModel.ProjectOutputDevicesModel UM.Qt.Bindings.StageModel.StageModel UM.Settings.Models.ContainerStacksModel.ContainerStacksModel UM.Settings.Models.DefinitionContainersModel.DefinitionContainersModel UM.Settings.Models.InstanceContainersModel.InstanceContainersModel

Public Member Functions

def __init__
 
def count (self)
 
def rowCount
 
def addRoleName
 
def roleNames (self)
 
def data (self, index, role)
 
def getItem
 
def items (self)
 
def setItems
 
def appendItem
 
def insertItem
 
def removeItem
 
def clear (self)
 
def setProperty
 
def sort
 
def find
 

Static Public Attributes

tuple itemsChanged = pyqtSignal()
 

Detailed Description

Convenience base class for models of a list of items.

This class represents a list of dictionary objects that
can be exposed to QML. It is intended primarily as a read-only
convenience class but supports removing elements so can also be
used for limited writing.

Member Function Documentation

def UM.Qt.ListModel.ListModel.clear (   self,
  None 
)
Clear the list.
def UM.Qt.ListModel.ListModel.data (   self,
  index,
  role 
)
Reimplemented from QAbstractListModel
def UM.Qt.ListModel.ListModel.items (   self,
  List,
  Dict,
  str,
  Any 
)
The list of items in this model.
def UM.Qt.ListModel.ListModel.rowCount (   self,
  parent = None,
  int 
)
This function is necessary because it is abstract in QAbstractListModel.

Under the hood, Qt will call this function when it needs to know how
many items are in the model.
This pyqtSlot will not be linked to the itemsChanged signal, so please
use the normal count() function instead.

The documentation for this class was generated from the following file: