Uranium
Application Framework
UM.Settings.Models.InstanceContainersModel.InstanceContainersModel Class Reference

Model that holds instance containers. More...

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

Public Member Functions

None __init__ (self, parent=None)
 
None setSectionProperty (self, str property_name)
 
str sectionProperty (self)
 
None setFilter (self, Dict[str, str] filter_dict)
 Set the filter of this model based on a string. More...
 
Dict[str, strfilter (self)
 
None setFilterList (self, List[Dict] filter_list)
 Set a list of filters to use when fetching containers. More...
 
List[Dict[str, str]] filterList (self)
 
List[strgetFileNameFilters (self, str io_type)
 
QUrl getDefaultPath (self)
 
- Public Member Functions inherited from UM.Qt.ListModel.ListModel
int count (self)
 
int rowCount (self, parent=None)
 
def addRoleName (self, int role, str name)
 
def roleNames (self)
 
def data (self, index, role)
 Reimplemented from QAbstractListModel.
 
Dict[str, Any] getItem (self, int index)
 
List[Dict[str, Any]] items (self)
 
None setItems (self, List[Dict[str, Any]] items)
 Replace all items at once. More...
 
def appendItem (self, Dict[str, Any] item)
 Add an item to the list. More...
 
None insertItem (self, int index, Dict[str, Any] item)
 Insert an item into the list at an index. More...
 
None removeItem (self, int index)
 Remove an item from the list. More...
 
None clear (self)
 Clear the list.
 
None setProperty (self, int index, str property, Any value)
 
None sort (self, Callable[[Any], float] fun)
 Sort the list. More...
 
int find (self, str key, Any value)
 

Static Public Attributes

int NameRole = Qt.UserRole + 1
 
int IdRole = Qt.UserRole + 2
 
int MetaDataRole = Qt.UserRole + 3
 
int ReadOnlyRole = Qt.UserRole + 4
 
int SectionRole = Qt.UserRole + 5
 
 sectionPropertyChanged = pyqtSignal()
 
 str
 Gets a list of the possible file filters that the plugins have registered they can read or write. More...
 
 fset
 
 setSectionProperty
 
 notify
 
 filterChanged = pyqtSignal()
 
 setFilter
 
 setFilterList
 
 result
 
- Static Public Attributes inherited from UM.Qt.ListModel.ListModel
 itemsChanged = pyqtSignal()
 
 int
 Get an item from the list.
 
 notify
 The list of items in this model.
 
 result
 This function is necessary because it is abstract in QAbstractListModel. More...
 
 str
 Find a entry by key value pair. More...
 
 QVariant
 

Detailed Description

Model that holds instance containers.

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

Member Function Documentation

◆ setFilter()

None UM.Settings.Models.InstanceContainersModel.InstanceContainersModel.setFilter (   self,
Dict[str, str filter_dict 
)

Set the filter of this model based on a string.

Parameters
filter_dictDict Dictionary to do the filtering by.

◆ setFilterList()

None UM.Settings.Models.InstanceContainersModel.InstanceContainersModel.setFilterList (   self,
List[Dict]  filter_list 
)

Set a list of filters to use when fetching containers.

Parameters
filter_listList of filter dicts to fetch multiple sets of containers. The final result is the union of these sets.

Member Data Documentation

◆ str

UM.Settings.Models.InstanceContainersModel.InstanceContainersModel.str
static

Gets a list of the possible file filters that the plugins have registered they can read or write.

The convenience meta-filters "All Supported Types" and "All Files" are added when listing readers, but not when listing writers.

Parameters
io_typeName of the needed IO type
Returns
A list of strings indicating file name filters for a file dialog.

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