• QSPatchable
  • QSPatchable Class

    Header: #include <QSPatchable>
    Inherited By:

    QSListModel

    Public Functions

    virtual void insert(int index, const QVariantList & value) = 0
    virtual void move(int from, int to, int n) = 0
    virtual void remove(int i, int count = 1) = 0
    virtual void set(int index, QVariantMap changes) = 0

    Detailed Description

    QSPatchahble is an interface for classes that could apply the patches generated by QSDiffRunner. (e.g QSListModel)

    Member Function Documentation

    [pure virtual] void QSPatchable::insert(int index, const QVariantList & value)

    Inserts value at index position in the list model.

    [pure virtual] void QSPatchable::move(int from, int to, int n)

    Moves n items from one position to another.

    [pure virtual] void QSPatchable::remove(int i, int count = 1)

    Deletes the content at index from the model. You may specific the no. of items to be removed by count argument.

    [pure virtual] void QSPatchable::set(int index, QVariantMap changes)

    Changes the item at index in the list model with the values in changes. Properties not appearing in changes are left unchanged.

    If index is equal to count() then a new item is appended to the list. Otherwise, index must be an element in the list.