4#ifndef QQMLLISTCOMPOSITOR_P_H
5#define QQMLLISTCOMPOSITOR_P_H
18#include <QtCore/qglobal.h>
19#include <QtCore/qvector.h>
21#include <private/qqmlchangeset_p.h>
23#include <QtCore/qdebug.h>
30 enum { MinimumGroupCount = 3, MaximumGroupCount = 11 };
43 PersistedFlag = 1 << Persisted,
44 PrependFlag = 0x10000000,
45 AppendFlag = 0x20000000,
46 UnresolvedFlag = 0x40000000,
47 MovedFlag = 0x80000000,
48 GroupMask = ~(PrependFlag | AppendFlag | UnresolvedFlag | MovedFlag | CacheFlag)
57 next->previous =
this; previous->next =
this; }
99 template<
typename T> T *
list()
const {
return static_cast<T *
>(
range->list); }
106 inline void decrementIndexes(
int difference,
uint flags);
115 int index[MaximumGroupCount] = { 0 };
144 int index[MaximumGroupCount] = { 0 };
154 inline bool isMove()
const {
return moveId >= 0; }
184 void setGroupCount(
int count);
189 insert_iterator findInsertPosition(Group
group,
int index);
200 setFlags(fromGroup, from,
count, fromGroup,
flags, inserts); }
207 clearFlags(fromGroup, from,
count, fromGroup,
flags, removals); }
211 bool verifyMoveTo(Group fromGroup,
int from, Group toGroup,
int to,
int count, Group
group)
const;
256 void listItemsRemoved(
262 void listItemsInserted(
267 void listItemsChanged(
288 , groupFlag(1 <<
group)
289 , groupCount(groupCount)
291 for (
int i = 0;
i < groupCount; ++
i)
305 for (
int i = 0;
i < groupCount; ++
i) {
bool inGroup(int group) const
bool isUnresolved() const
Range(Range *next, void *list, int index, int count, uint flags)
insert_iterator(const iterator &it)
void setCacheIndex(int cacheIndex)
void decrementIndexes(int difference)
void incrementIndexes(int difference)
The QQmlListCompositor class provides a lookup table for filtered, or re-ordered list indexes.
void setRemoveGroups(int groups)
void clearFlags(Group fromGroup, int from, int count, uint flags, QVector< Remove > *removals=nullptr)
void setDefaultGroup(Group group)
void setDefaultGroups(int groups)
int defaultGroups() const
friend Q_AUTOTEST_EXPORT QDebug operator<<(QDebug debug, const QQmlListCompositor &list)
void setFlags(const iterator from, int count, uint flags, QVector< Insert > *inserts=nullptr)
void clearFlags(const iterator &from, int count, uint flags, QVector< Remove > *removals=nullptr)
void clearDefaultGroup(Group group)
void setFlags(Group fromGroup, int from, int count, uint flags, QVector< Insert > *inserts=nullptr)
void insert(Group group, int before, void *list, int index, int count, uint flags, QVector< Insert > *inserts=nullptr)
Inserts a range of count indexes starting at index from a list with the given flags into a group at i...
list append(new Employee("Blackpool", "Stephen"))
cache insert(employee->id(), employee)
QSet< QString >::iterator it
Combined button and popup list for selecting options.
qsizetype erase(QByteArray &ba, const T &t)
#define QT_WARNING_DISABLE_GCC(text)
constexpr bool operator!=(const timespec &t1, const timespec &t2)
constexpr timespec operator*(const timespec &t1, int mul)
constexpr timespec & operator+=(timespec &t1, const timespec &t2)
GLenum GLenum GLsizei count
GLenum GLuint GLintptr offset
static void incrementIndexes(QQmlDelegateModelItem *cacheItem, int count, const int *deltas)
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
static QT_BEGIN_NAMESPACE const uint Default
#define Q_AUTOTEST_EXPORT
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
settings remove("monkey")
void setCacheIndex(int cacheIndex)
bool inGroup(int group) const
Insert(const iterator &it, int count, uint flags, int moveId=-1)
Remove(const iterator &it, int count, uint flags, int moveId=-1)