Uranium
Application Framework
UM.Settings.Models.InstanceContainersModel.InstanceContainersModel Class Reference
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)
 
Dict[str, str] filter (self)
 
None setFilterList (self, List[Dict[str, str]] filter_list)
 
List[Dict[str, str]] filterList (self)
 
List[str] getFileNameFilters (self, str io_type)
 
QUrl getDefaultPath (self)
 
- Public Member Functions inherited from UM.Qt.ListModel.ListModel
None __init__ (self, parent=None)
 
int count (self)
 
int rowCount (self, parent=None)
 
def addRoleName (self, int role, str name)
 
def roleNames (self)
 
def 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)
 
def 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)
 
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()
 
 filterChanged = pyqtSignal()
 
- Static Public Attributes inherited from UM.Qt.ListModel.ListModel
 itemsChanged = pyqtSignal()
 

Detailed Description

Model that holds instance containers. By setting the filter property the instances held by this model can be
changed.

Constructor & Destructor Documentation

◆ __init__()

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

Reimplemented from UM.Qt.ListModel.ListModel.

Member Function Documentation

◆ getFileNameFilters()

List[str] UM.Settings.Models.InstanceContainersModel.InstanceContainersModel.getFileNameFilters (   self,
str  io_type 
)
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.

:param io_type: Name of the needed IO type
:return: A list of strings indicating file name filters for a file dialog.

◆ setFilter()

None UM.Settings.Models.InstanceContainersModel.InstanceContainersModel.setFilter (   self,
Dict[str, str]  filter_dict 
)
Set the filter of this model based on a string.

:param filter_dict: :type{Dict} Dictionary to do the filtering by.

◆ setFilterList()

None UM.Settings.Models.InstanceContainersModel.InstanceContainersModel.setFilterList (   self,
List[Dict[str, str]]  filter_list 
)
Set a list of filters to use when fetching containers.

:param filter_list: List of filter dicts to fetch multiple sets of
containers. The final result is the union of these sets.

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