class EE::UI::Models::PersistentModelIndex

Overview

#include <persistentmodelindex.hpp>

class PersistentModelIndex {
public:
    // construction

    PersistentModelIndex();
    PersistentModelIndex(ModelIndex const&);
    PersistentModelIndex(PersistentModelIndex const&);
    PersistentModelIndex(PersistentModelIndex&&);

    // methods

    PersistentModelIndex& operator=(PersistentModelIndex const&);
    PersistentModelIndex& operator=(PersistentModelIndex&&);
    bool isValid() const;
    bool hasValidHandle() const;
    int row() const;
    int column() const;
    PersistentModelIndex parent() const;
    PersistentModelIndex siblingAtColumn(int column) const;
    Variant data(ModelRole = ModelRole::Display) const;
    void* internalData() const;
    operator ModelIndex() const;
    bool operator==(PersistentModelIndex const&) const;
    bool operator!=(PersistentModelIndex const&) const;
    bool operator==(ModelIndex const&) const;
    bool operator!=(ModelIndex const&) const;
    void release();
};

Detailed Documentation

Methods

void release()

Gives back the registration made when this index was constructed from a ModelIndex, and detaches it. The model drops the handle, and stops updating it on every row operation, once all its registrations are released. Indexes that never release keep the handle alive: call this at most once per construction, never on a copy.