• QSPatch
  • QSPatch Class

    Header: #include <QSPatch>

    Public Types

    enum Type { Null, Insert, Remove, Update, Move }

    Public Functions

    QSPatch()
    QSPatch(Type type, int from = 0, int to = 0, int count = 0)
    QSPatch(Type type, int from, int to, int count, const QVariantMap & data)
    QSPatch(Type type, int from, int to, int count, const QVariantList & data)
    QSPatch(const QSPatch &)
    ~QSPatch()
    bool canMerge(const QSPatch & other) const
    int count() const
    QVariantList data() const
    int from() const
    bool isNull() const
    QSPatch & merge(const QSPatch & other)
    QSPatch merged(const QSPatch & other) const
    void setCount(int count)
    void setData(const QVariantList & data)
    void setData(const QVariantMap & data)
    void setFrom(int from)
    void setTo(int to)
    void setType(const QSPatch::Type & type)
    int to() const
    QSPatch::Type type() const
    QSPatch & operator=(const QSPatch &)
    bool operator==(const QSPatch & rhs) const

    Static Public Members

    QSPatch createRemove(int from, int to)
    QSPatch createUpdate(int index, const QVariantMap & diff)
    typedef QSPatchSet

    Detailed Description

    QSPatch is a data structure to hold the changes to be applied on other QSPatchable object. Usually you don't need to manipulate this object directly.

    Member Type Documentation

    enum QSPatch::Type

    Member Function Documentation

    QSPatch::QSPatch()

    QSPatch::QSPatch(Type type, int from = 0, int to = 0, int count = 0)

    QSPatch::QSPatch(Type type, int from, int to, int count, const QVariantMap & data)

    QSPatch::QSPatch(Type type, int from, int to, int count, const QVariantList & data)

    QSPatch::QSPatch(const QSPatch &)

    QSPatch::~QSPatch()

    bool QSPatch::canMerge(const QSPatch & other) const

    int QSPatch::count() const

    See also setCount().

    [static] QSPatch QSPatch::createRemove(int from, int to)

    [static] QSPatch QSPatch::createUpdate(int index, const QVariantMap & diff)

    QVariantList QSPatch::data() const

    See also setData().

    int QSPatch::from() const

    See also setFrom().

    bool QSPatch::isNull() const

    QSPatch & QSPatch::merge(const QSPatch & other)

    QSPatch QSPatch::merged(const QSPatch & other) const

    void QSPatch::setCount(int count)

    See also count().

    void QSPatch::setData(const QVariantList & data)

    See also data().

    void QSPatch::setData(const QVariantMap & data)

    void QSPatch::setFrom(int from)

    See also from().

    void QSPatch::setTo(int to)

    See also to().

    void QSPatch::setType(const QSPatch::Type & type)

    See also type().

    int QSPatch::to() const

    See also setTo().

    QSPatch::Type QSPatch::type() const

    See also setType().

    QSPatch & QSPatch::operator=(const QSPatch &)

    bool QSPatch::operator==(const QSPatch & rhs) const

    Related Non-Members

    typedef QSPatchSet

    Synonym for QList<QSPatch>.