/* SPDX-FileCopyrightText: 2017 Volker Krause SPDX-License-Identifier: MIT */ #ifndef KUSERFEEDBACK_CONSOLE_ROLEMAPPINGPROXYMODEL_H #define KUSERFEEDBACK_CONSOLE_ROLEMAPPINGPROXYMODEL_H #include #include namespace KUserFeedback { namespace Console { /** Proxy model to change roles. */ class RoleMappingProxyModel : public QIdentityProxyModel { Q_OBJECT public: explicit RoleMappingProxyModel(QObject *parent = nullptr); ~RoleMappingProxyModel() override; void addRoleMapping(int fromRole, int toRole); QVariant data(const QModelIndex & index, int role) const override; private: QHash m_roleMapping; }; }} #endif // KUSERFEEDBACK_CONSOLE_ROLEMAPPINGPROXYMODEL_H