42 #include "private/qdeclarativelistmodelworkeragent_p.h" 43 #include "private/qdeclarativelistmodel_p_p.h" 44 #include "private/qdeclarativedata_p.h" 45 #include "private/qdeclarativeengine_p.h" 48 #include <QtCore/qcoreevent.h> 49 #include <QtCore/qcoreapplication.h> 50 #include <QtCore/qdebug.h> 219 if (!orig || !copy) {
229 for (
int ii = 0; ii < changes.
count(); ++ii) {
230 const Change &change = changes.
at(ii);
231 switch (change.
type) {
249 for (
int ii = 0; ii < changes.
count(); ++ii) {
250 const Change &change = changes.
at(ii);
251 switch (change.
type) {
The QVariant class acts like a union for the most common Qt data types.
~QDeclarativeListModelWorkerAgent()
#define QT_END_NAMESPACE
This macro expands to.
void lock()
Locks the mutex.
virtual bool event(QEvent *)
This virtual function receives events to an object and should return true if the event e was recogniz...
void moveNodes(int from, int to, int n)
static void postEvent(QObject *receiver, QEvent *event)
Adds the event event, with the object receiver as the receiver of the event, to an event queue and re...
void changedData(int index, int count, const QList< int > &roles)
void unlock()
Unlocks this mutex locker.
void removeChange(int index, int count)
QDeclarativeListModel * list
int count(const T &t) const
Returns the number of occurrences of value in the list.
bool ref()
Atomically increments the value of this QAtomicInt.
void moveChange(int index, int count, int to)
Q_INVOKABLE void move(int from, int to, int count)
The QString class provides a Unicode character string.
enum QDeclarativeListModelWorkerAgent::Change::@153 type
void insertChange(int index, int count)
virtual bool event(QEvent *)
This virtual function receives events to an object and should return true if the event e was recogniz...
void itemsRemoved(int index, int count)
Emit this signal when count items are removed at index.
void insertedNode(int index)
Q_INVOKABLE void move(int from, int to, int count)
QScriptEngine * scriptEngine() const
Q_INVOKABLE void setProperty(int index, const QString &property, const QVariant &value)
Q_INVOKABLE void set(int index, const QScriptValue &)
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
The QScriptEngine class provides an environment for evaluating Qt Script code.
Q_INVOKABLE void remove(int index)
#define QT_BEGIN_NAMESPACE
This macro expands to.
Q_INVOKABLE void set(int index, const QScriptValue &)
Q_INVOKABLE void append(const QScriptValue &)
Q_INVOKABLE QScriptValue get(int index) const
const T & at(int i) const
Returns the item at index position i in the list.
bool deref()
Atomically decrements the value of this QAtomicInt.
QDeclarativeListModelWorkerAgent(QDeclarativeListModel *)
QList< QHash< int, QVariant > > m_values
Q_INVOKABLE void setProperty(int index, const QString &property, const QVariant &value)
void removedNode(int index)
QHash< int, QString > m_roles
QDeclarativeListModel * m_copy
void unlock()
Unlocks the mutex.
bool wait(QMutex *mutex, unsigned long time=ULONG_MAX)
void itemsChanged(int index, int count, const QList< int > &roles)
Emit this signal when count items at index have had their roles changed.
QHash< QString, int > m_strings
The QMutexLocker class is a convenience class that simplifies locking and unlocking mutexes...
Q_INVOKABLE void insert(int index, const QScriptValue &)
void itemsInserted(int index, int count)
Emit this signal when count items are inserted at index.
QDeclarativeListModel * m_orig
void setScriptEngine(QScriptEngine *eng)
QVariant property(const char *name) const
Returns the value of the object's name property.
void itemsMoved(int from, int to, int count)
Emit this signal when count items are moved from index from to index to.
QScriptEngine * m_scriptEngine
Q_INVOKABLE void insert(int index, const QScriptValue &)
void changedChange(int index, int count, const QList< int > &roles)
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.
The QScriptValue class acts as a container for the Qt Script data types.
Q_INVOKABLE QScriptValue get(int index) const
Q_INVOKABLE void append(const QScriptValue &)
Q_INVOKABLE void remove(int index)