#ifndef SBK_FAVORITECOLLECTIONSMODELWRAPPER_H
#define SBK_FAVORITECOLLECTIONSMODELWRAPPER_H

// Workaround to access protected functions
#ifndef protected
#  define protected public
#endif

#include <favoritecollectionsmodel.h>

#include <sbkpython.h>

#include <array>
namespace Shiboken { struct AutoDecRef; class GilState; }

class FavoriteCollectionsModelWrapper : public Akonadi::FavoriteCollectionsModel
{
public:
    FavoriteCollectionsModelWrapper(const FavoriteCollectionsModelWrapper &) = delete;
    FavoriteCollectionsModelWrapper& operator=(const FavoriteCollectionsModelWrapper &) = delete;
    FavoriteCollectionsModelWrapper(FavoriteCollectionsModelWrapper &&) = delete;
    FavoriteCollectionsModelWrapper& operator=(FavoriteCollectionsModelWrapper &&) = delete;
    ~FavoriteCollectionsModelWrapper() override;

    ::QVariant data(const ::QModelIndex & index, int role = Qt::DisplayRole) const override;
    bool dropMimeData(const ::QMimeData * data, ::Qt::DropAction action, int row, int column, const ::QModelIndex & parent) override;
    ::QFlags<Qt::ItemFlag> flags(const ::QModelIndex & index) const override;
    ::QVariant headerData(int section, ::Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
    ::QStringList mimeTypes() const override;
    bool setData(const ::QModelIndex & index, const ::QVariant & value, int role = Qt::EditRole) override;
    static void pysideInitQtMetaTypes();

    void resetPyMethodCache();

private:
    mutable std::array<PyObject *, 6> m_PyMethodCache = {nullptr, nullptr, nullptr, nullptr, nullptr, nullptr};
};

#endif // SBK_FAVORITECOLLECTIONSMODELWRAPPER_H
