class EE::UI::Models::SortingProxyModel

#include <sortingproxymodel.hpp>

class SortingProxyModel:
    public EE::UI::Models::Model,
    private EE::UI::Models::Model::Client {
public:
    // structs

    struct Mapping;

    // construction

    virtual ~SortingProxyModel();

    // methods

    template <typename T>
    static std::shared_ptr<SortingProxyModel> New(std::shared_ptr<T> model);

    virtual size_t rowCount(const ModelIndex& = ModelIndex()) const;
    virtual size_t columnCount(const ModelIndex& = ModelIndex()) const;
    virtual std::string columnName(const size_t&) const;
    virtual Variant data(const ModelIndex& proxyIndex, ModelRole role = ModelRole::Display) const;
    virtual ModelIndex parentIndex(const ModelIndex&) const;
    virtual ModelIndex index(int row, int column = 0, const ModelIndex& = ModelIndex()) const;
    virtual void update();
    virtual int keyColumn() const;
    virtual size_t treeColumn() const;
    virtual bool isSortable();
    virtual SortOrder sortOrder() const;
    virtual void sort(const size_t& column, const SortOrder&);
    virtual bool isColumnSortable(const size_t& columnIndex) const;
    ModelIndex mapToSource(const ModelIndex&) const;
    ModelIndex mapToProxy(const ModelIndex& sourceIndex) const;
    ModelRole sortRole() const;
    void setSortRrole(ModelRole role);
    bool lessThan(const ModelIndex& index1, const ModelIndex& index2) const;
    std::shared_ptr<Model> getSource() const;
    virtual bool classModelRoleEnabled();
};

Inherited Members

public:
    // typedefs

    typedef std::function<Variant(const ModelIndex&, const void*data)> ModelStyler;

    // enums

    enum UpdateFlag;

    // structs

    struct Operation;

    // classes

    class Client;

    // methods

    virtual size_t rowCount(const ModelIndex& = ModelIndex()) const = 0;
    virtual size_t columnCount(const ModelIndex& = ModelIndex()) const = 0;
    virtual std::string columnName(const size_t&) const;
    virtual std::string rowName(const size_t&) const;
    virtual Variant data(const ModelIndex&, ModelRole = ModelRole::Display) const = 0;
    virtual void update();
    virtual ModelIndex parentIndex(const ModelIndex&) const;
    virtual ModelIndex index(int row, int column = 0, const ModelIndex& = ModelIndex()) const;
    virtual ModelIndex sibling(int row, int column, const ModelIndex& parent) const;
    virtual void setData(const ModelIndex&, const Variant&);
    virtual size_t treeColumn() const;
    virtual bool acceptsDrag(const ModelIndex&, const std::string& dataType);
    virtual bool isColumnSortable(const size_t&) const;
    virtual std::string dragDataType() const;
    virtual bool isEditable(const ModelIndex&) const;
    bool isValid(const ModelIndex& index) const;
    virtual int keyColumn() const;
    virtual SortOrder sortOrder() const;
    virtual bool isSortable();
    virtual void sort(const size_t&, const SortOrder&);
    virtual bool classModelRoleEnabled();
    void registerView(UIAbstractView*);
    void unregisterView(UIAbstractView*);
    void registerClient(Client*);
    void unregisterClient(Client*);
    void refreshView();
    void setOnUpdate(const std::function<void()>& onUpdate);
    void invalidate(unsigned int flags = Model::UpdateFlag::InvalidateAllIndexes);
    std::weak_ptr<PersistentHandle> registerPersistentIndex(ModelIndex const&);
    void beginInsertRows(ModelIndex const& parent, int first, int last);
    void beginInsertColumns(ModelIndex const& parent, int first, int last);
    void beginMoveRows(ModelIndex const& sourceParent, int first, int last, ModelIndex const& targetParent, int target_index);
    void beginMoveColumns(ModelIndex const& sourceParent, int first, int last, ModelIndex const& targetParent, int target_index);
    bool beginDeleteRows(ModelIndex const& parent, int first, int last);
    bool beginDeleteColumns(ModelIndex const& parent, int first, int last);
    void endInsertRows();
    void endInsertColumns();
    void endMoveRows();
    void endMoveColumns();
    void endDeleteRows();
    void endDeleteColumns();
    Mutex& resourceMutex();
    void acquireResourceMutex();
    void releaseResourceMutex();
    Uint32 subsribeModelStyler(const ModelStyler& styler);
    void unsubsribeModelStyler(Uint32 id);
    virtual void onModelUpdated(unsigned flags) = 0;
    virtual void modelDidInsertRows(] ModelIndex const& parent, ] int first, ] int last);
    virtual void modelDidInsertColumns(] ModelIndex const& parent, ] int first, ] int last);
    virtual void modelDidMoveRows(] ModelIndex const& source_parent, ] int first, ] int last, ] ModelIndex const& target_parent, ] int target_index);
    virtual void modeldidMoveColumns(] ModelIndex const& source_parent, ] int first, ] int last, ] ModelIndex const& target_parent, ] int target_index);
    virtual void modelDidDeleteRows(] ModelIndex const& parent, ] int first, ] int last);
    virtual void modelDidDeleteColumns(] ModelIndex const& parent, ] int first, ] int last);