Uranium
Application Framework
Loading...
Searching...
No Matches
UM.Settings.Models.DefinitionContainersModel.DefinitionContainersModel Class Reference

Model that holds definition containers. More...

Inheritance diagram for UM.Settings.Models.DefinitionContainersModel.DefinitionContainersModel:
UM.Qt.ListModel.ListModel

Public Member Functions

 __init__ (self, parent=None)
 
 setSectionProperty (self, property_name)
 
 sectionProperty (self)
 
 setPreferredSectionValue (self, value)
 
 preferredSectionValue (self)
 
 setFilter (self, filter_dict)
 Set the filter of this model based on a string.
 
 filter (self)
 
- Public Member Functions inherited from UM.Qt.ListModel.ListModel
 __init__ (self, parent=None)
 
 rowCount (self, parent=None)
 Reimplemented from QAbstractListModel.
 
 addRoleName (self, role, name)
 
 roleNames (self)
 
 data (self, index, role)
 Reimplemented from QAbstractListModel.
 
 getItem (self, index)
 Get an item from the list.
 
 items (self)
 The list of items in this model.
 
 setItems (self, items)
 Replace all items at once.
 
 appendItem (self, item)
 Add an item to the list.
 
 insertItem (self, index, item)
 Insert an item into the list at an index.
 
 removeItem (self, index)
 Remove an item from the list.
 
 clear (self)
 Clear the list.
 
 setProperty (self, index, property, value)
 
 sort (self, fun)
 Sort the list.
 
 find (self, key, value)
 Find a entry by key value pair.
 

Public Attributes

 NameRole
 
 IdRole
 
 SectionRole
 

Static Public Attributes

int NameRole = Qt.UserRole + 1
 
int IdRole = Qt.UserRole + 2
 
int SectionRole = Qt.UserRole + 3
 
 sectionPropertyChanged = pyqtSignal()
 
 preferredSectionValueChanged = pyqtSignal()
 
 filterChanged = pyqtSignal()
 
- Static Public Attributes inherited from UM.Qt.ListModel.ListModel
 itemsChanged = pyqtSignal()
 

Protected Member Functions

 _onContainerChanged (self, container)
 Handler for container change events from registry.
 
 _update (self)
 Private convenience function to reset & repopulate the model.
 
 _sortKey (self, item)
 
 _updateMetaData (self, container)
 

Protected Attributes

 _onContainerChanged
 
 _section_property
 
 _preferred_section_value
 
 _filter_dict
 
- Protected Attributes inherited from UM.Qt.ListModel.ListModel
 _items
 
 _role_names
 

Detailed Description

Model that holds definition containers.

By setting the filter property the definitions held by this model can be changed.

Constructor & Destructor Documentation

◆ __init__()

UM.Settings.Models.DefinitionContainersModel.DefinitionContainersModel.__init__ (   self,
  parent = None 
)

Reimplemented from UM.Qt.ListModel.ListModel.

Member Function Documentation

◆ setFilter()

UM.Settings.Models.DefinitionContainersModel.DefinitionContainersModel.setFilter (   self,
  filter_dict 
)

Set the filter of this model based on a string.

Parameters
filter_dictDictionary to do the filtering by.

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