class EE::UI::Models::ModelEditingDelegate

#include <modeleditingdelegate.hpp>

class ModelEditingDelegate {
public:
    // enums

    enum SelectionBehavior;

    // fields

    std::function<void()> onCommit;
    std::function<void()> onRollback;
    std::function<void()> onChange;
    std::function<void()> onWillBeginEditing;
    std::function<void()> onValueSet;

    // construction

    virtual ~ModelEditingDelegate();

    // methods

    void bind(std::shared_ptr<Model> model, const ModelIndex& index);
    UIWidget* getWidget();
    UIWidget* getWidget() const;
    virtual Variant getValue() const = 0;
    virtual void setValue(const Variant&) = 0;
    virtual void willBeginEditing();
    ModelIndex const& index() const;
    ModelEditingDelegate::SelectionBehavior getSelectionBehavior() const;
    void setSelectionBehavior(SelectionBehavior selectionBehavior);
    ModelRole pullDataFrom() const;
    void setPullDataFrom(ModelRole newPullDataFrom);
};