![]() |
LeechCraft 0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
|
Wraps differences between role names handling in Qt4 and Qt5. More...
#include "rolenamesmixin.h"
Inheritance diagram for LC::Util::RoleNamesMixin< Model >:
Collaboration diagram for LC::Util::RoleNamesMixin< Model >:Protected Member Functions | |
| void | setRoleNames (const QHash< int, QByteArray > &roleNames) |
| Sets the role names to roleNames. | |
| QHash< int, QByteArray > | roleNames () const override |
| Returns the role names. | |
Wraps differences between role names handling in Qt4 and Qt5.
Qt4 uses QAbstractItemModel::setRoleNames() to set role names for a (non-virtual) QAbstractItemModel::roleNames() method. Qt5, on the other hand, just suggests overriding the (virtual) roleNames() method. This class provides an uniform interface. This class provides an uniform interface for role names setting.
| Model | The original model type to derive from. |
Definition at line 30 of file rolenamesmixin.h.
|
inlineoverrideprotected |
Returns the role names.
Returns the mapping from the role value to its name that was previously set via setRoleNames().
Definition at line 56 of file rolenamesmixin.h.
Referenced by setRoleNames().
Here is the caller graph for this function:
|
inlineprotected |
Sets the role names to roleNames.
| [in] | roleNames | The mapping from role value to its name. |
Definition at line 42 of file rolenamesmixin.h.
References roleNames().
Here is the call graph for this function: