|
Krita Source Code Documentation
|
#include <kis_model_index_converter_show_all.h>
Inheritance diagram for KisModelIndexConverterShowAll:Public Member Functions | |
| KisNodeDummy * | dummyFromIndex (QModelIndex index) override |
| KisNodeDummy * | dummyFromRow (int row, QModelIndex parent) override |
| bool | indexFromAddedDummy (KisNodeDummy *parentDummy, int index, const QString &newNodeMetaObjectType, QModelIndex &parentIndex, int &row) override |
| QModelIndex | indexFromDummy (KisNodeDummy *dummy) override |
| KisModelIndexConverterShowAll (KisDummiesFacadeBase *dummiesFacade, KisNodeModel *model) | |
| int | rowCount (QModelIndex parent) override |
Public Member Functions inherited from KisModelIndexConverterBase | |
| virtual | ~KisModelIndexConverterBase () |
Private Attributes | |
| KisDummiesFacadeBase * | m_dummiesFacade |
| KisNodeModel * | m_model |
The class for converting to/from QModelIndex and KisNodeDummy when the root node is shown (ShowRootLayer == true). The selection masks owned by the root layer are shown as well.
Definition at line 22 of file kis_model_index_converter_show_all.h.
| KisModelIndexConverterShowAll::KisModelIndexConverterShowAll | ( | KisDummiesFacadeBase * | dummiesFacade, |
| KisNodeModel * | model ) |
Definition at line 14 of file kis_model_index_converter_show_all.cpp.
|
overridevirtual |
Returns the dummy associated with the index WARNING: index must be valid
Implements KisModelIndexConverterBase.
Definition at line 34 of file kis_model_index_converter_show_all.cpp.
|
overridevirtual |
Returns the dummy staying in the specified row of a parent May return null in case of inconsistency
Implements KisModelIndexConverterBase.
Definition at line 21 of file kis_model_index_converter_show_all.cpp.
References KisNodeDummy::at(), KisNodeDummy::childCount(), dummyFromIndex(), m_dummiesFacade, KisDummiesFacadeBase::rootDummy(), and rowCount().
|
overridevirtual |
Calculates the parent and the position in the model for newly created dummy
| parentDummy | the dummy parent |
| index | the dummy index |
| newNodeMetaObjectType | is a class name of a newly added node This name is got from Qt's meta object system so you must compare this value against a corresponding staticMetaObject object only. We do not pass a pointer to a real node to limit the access to real nodes. |
| parentIndex | the parent index |
| row | the dummy row |
Implements KisModelIndexConverterBase.
Definition at line 56 of file kis_model_index_converter_show_all.cpp.
References KisNodeDummy::childCount(), indexFromDummy(), and rowCount().
|
overridevirtual |
Returns the index corresponding to the position of the dummy in the model. Will return invalid index if the dummy should be hidden
Implements KisModelIndexConverterBase.
Definition at line 41 of file kis_model_index_converter_show_all.cpp.
References KisNodeDummy::childCount(), KisNodeDummy::indexOf(), m_model, KisNodeDummy::parent(), and rowCount().
|
overridevirtual |
Returns the number of children of the given index of the model
Implements KisModelIndexConverterBase.
Definition at line 78 of file kis_model_index_converter_show_all.cpp.
References KisNodeDummy::childCount(), and dummyFromIndex().
|
private |
Definition at line 39 of file kis_model_index_converter_show_all.h.
|
private |
Definition at line 40 of file kis_model_index_converter_show_all.h.