Uranium
Application Framework
Loading...
Searching...
No Matches
UM.Settings.Models.DefinitionContainersModel.DefinitionContainersModel Class Reference
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)
 
 setPreferredSections (self, Dict[str, int] weights)
 
 preferredSections (self)
 
 setFilter (self, filter_dict)
 
 filter (self)
 
- Public Member Functions inherited from UM.Qt.ListModel.ListModel
int count (self)
 
int rowCount (self, parent=None)
 
 addRoleName (self, int role, str name)
 
 roleNames (self)
 
 data (self, index, role)
 
Dict[str, Any] getItem (self, int index)
 
List[Dict[str, Any]] items (self)
 
None setItems (self, List[Dict[str, Any]] items)
 
 appendItem (self, Dict[str, Any] item)
 
None insertItem (self, int index, Dict[str, Any] item)
 
None removeItem (self, int index)
 
None clear (self)
 
None setProperty (self, int index, str property, Any value)
 
None sort (self, Callable[[Any], float] fun, Optional[str] key=None, reverse=False)
 
int find (self, str key, Any value)
 

Public Attributes

 NameRole
 
 IdRole
 
 SectionRole
 

Static Public Attributes

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

Protected Member Functions

 _onContainerChanged (self, container)
 
None _update (self)
 
 _sortKey (self, item)
 
 _updateMetaData (self, container)
 

Protected Attributes

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

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

◆ _onContainerChanged()

UM.Settings.Models.DefinitionContainersModel.DefinitionContainersModel._onContainerChanged ( self,
container )
protected
Handler for container change events from registry

◆ _update()

None UM.Settings.Models.DefinitionContainersModel.DefinitionContainersModel._update ( self)
protected
Private convenience function to reset & repopulate the model.

◆ setFilter()

UM.Settings.Models.DefinitionContainersModel.DefinitionContainersModel.setFilter ( self,
filter_dict )
Set the filter of this model based on a string.
:param filter_dict: Dictionary to do the filtering by.

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