Uranium
Application Framework
Loading...
Searching...
No Matches
UM.Qt.Bindings.StageModel.StageModel Class Reference

The StageModel is a representation of all stages in QML. More...

Inheritance diagram for UM.Qt.Bindings.StageModel.StageModel:
UM.Qt.ListModel.ListModel

Public Member Functions

 __init__ (self, parent=None)
 
- 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

 IdRole
 
 NameRole
 
 ActiveRole
 
 StageRole
 

Static Public Attributes

int IdRole = Qt.UserRole + 1
 
int NameRole = Qt.UserRole + 2
 
int ActiveRole = Qt.UserRole + 3
 
int StageRole = Qt.UserRole + 4
 
- Static Public Attributes inherited from UM.Qt.ListModel.ListModel
 itemsChanged = pyqtSignal()
 

Protected Member Functions

 _onStagesChanged (self)
 

Protected Attributes

 _controller
 
 _onStagesChanged
 
- Protected Attributes inherited from UM.Qt.ListModel.ListModel
 _items
 
 _role_names
 

Detailed Description

The StageModel is a representation of all stages in QML.

Use it to populate a stage based menu (like top bar).

Constructor & Destructor Documentation

◆ __init__()

UM.Qt.Bindings.StageModel.StageModel.__init__ (   self,
  parent = None 
)

Reimplemented from UM.Qt.ListModel.ListModel.


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