4#ifndef QQMLCHANGESET_P_H
5#define QQMLCHANGESET_P_H
18#include <QtQmlIntegration/qqmlintegration.h>
19#include <QtCore/qdebug.h>
20#include <QtCore/qvector.h>
21#include <QtQmlModels/private/qtqmlmodelsglobal_p.h>
60 this->moveId = moveId;
64 bool isMove()
const {
return moveId >= 0; }
79 const QVector<Change> &
removes()
const {
return m_removes; }
80 const QVector<Change> &
inserts()
const {
return m_inserts; }
81 const QVector<Change> &
changes()
const {
return m_changes; }
85 void move(
int from,
int to,
int count,
int moveId);
88 void insert(
const QVector<Change> &inserts);
89 void remove(
const QVector<Change> &removes, QVector<Change> *inserts =
nullptr);
90 void move(
const QVector<Change> &removes,
const QVector<Change> &inserts);
91 void change(
const QVector<Change> &changes);
94 bool isEmpty()
const {
return m_removes.empty() && m_inserts.empty() && m_changes.isEmpty(); }
107 void remove(QVector<Change> *removes, QVector<Change> *inserts);
108 void change(QVector<Change> *changes);
110 QVector<Change> m_removes;
111 QVector<Change> m_inserts;
112 QVector<Change> m_changes;
The QQmlChangeSet class stores an ordered list of notifications about changes to a linear data set.
const QVector< Change > & removes() const
const QVector< Change > & changes() const
const QVector< Change > & inserts() const
cache insert(employee->id(), employee)
Combined button and popup list for selecting options.
GLenum GLenum GLsizei count
GLenum GLuint GLintptr offset
QT_BEGIN_NAMESPACE constexpr decltype(auto) qMakePair(T1 &&value1, T2 &&value2) noexcept(noexcept(std::make_pair(std::forward< T1 >(value1), std::forward< T2 >(value2))))
size_t qHash(const QQmlChangeSet::MoveKey &key)
bool operator==(const QQmlChangeSet::MoveKey &l, const QQmlChangeSet::MoveKey &r)
Q_QMLMODELS_EXPORT QDebug operator<<(QDebug debug, const QQmlChangeSet::Change &change)
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
settings remove("monkey")
MoveKey moveKey(int index) const
Change(int index, int count, int moveId=-1, int offset=0)
MoveKey(int moveId, int offset)