LeechCraft
0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
|
Wraps differences between role names handling in Qt4 and Qt5. More...
#include "rolenamesmixin.h"
Protected Member Functions | |
void | setRoleNames (const QHash< int, QByteArray > &roleNames) |
Sets the role names to roleNames. More... | |
QHash< int, QByteArray > | roleNames () const override |
Returns the role names. More... | |
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 36 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 68 of file rolenamesmixin.h.
|
inlineprotected |
Sets the role names to roleNames.
[in] | roleNames | The mapping from role value to its name. |
Definition at line 54 of file rolenamesmixin.h.