LeechCraft  0.6.70-6645-gcd10d7e
Modular cross-platform feature rich live environment.
LeechCraft::Util::RoleNamesMixin< Model > Class Template Reference

Wraps differences between role names handling in Qt4 and Qt5. More...

#include "rolenamesmixin.h"

+ Inheritance diagram for LeechCraft::Util::RoleNamesMixin< Model >:
+ Collaboration diagram for LeechCraft::Util::RoleNamesMixin< Model >:

Protected Member Functions

 RoleNamesMixin ()=default
 Default constructor. More...
 
template<typename... Args>
 RoleNamesMixin (Args &&...args)
 Constructs the base Model type with the given args. More...
 

Detailed Description

template<typename Model>
class LeechCraft::Util::RoleNamesMixin< Model >

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.

Template Parameters
ModelThe original model type to derive from.

Definition at line 53 of file rolenamesmixin.h.

Constructor & Destructor Documentation

template<typename Model>
LeechCraft::Util::RoleNamesMixin< Model >::RoleNamesMixin ( )
protecteddefault

Default constructor.

Assumes the existence of a default constructor in the Model type.

template<typename Model>
template<typename... Args>
LeechCraft::Util::RoleNamesMixin< Model >::RoleNamesMixin ( Args &&...  args)
inlineprotected

Constructs the base Model type with the given args.

Template Parameters
ArgsThe arguments of the values to pass to the Model constructor.
Parameters
[in]argsThe values to pass to the Model constructor.

Definition at line 75 of file rolenamesmixin.h.


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