42 #ifndef QDECLARATIVELISTMODEL_H 43 #define QDECLARATIVELISTMODEL_H 46 #include <private/qdeclarativecustomparser_p.h> 48 #include <QtCore/QObject> 49 #include <QtCore/QStringList> 50 #include <QtCore/QHash> 51 #include <QtCore/QList> 52 #include <QtCore/QVariant> 53 #include <private/qlistmodelinterface_p.h> 54 #include <QtScript/qscriptvalue.h> 78 virtual int count()
const;
110 bool inWorkerThread()
const;
112 inline bool canMove(
int from,
int to,
int n)
const {
return !(from+n >
count() || to+n >
count() || from < 0 || to < 0 || n < 0); }
145 bool definesEmptyList(
const QString &);
158 #endif // QDECLARATIVELISTMODEL_H The QVariant class acts like a union for the most common Qt data types.
virtual QVariant data(int index, int role) const =0
Returns the data at the given index for the specified roles.
#define QT_END_NAMESPACE
This macro expands to.
#define QML_DECLARE_TYPE(TYPE)
virtual int count() const =0
Returns the number of data entries in the model.
The QByteArray class provides an array of bytes.
bool setProperty(const char *name, const QVariant &value)
Sets the value of the object's name property to value.
static void clear(QVariant::Private *d)
virtual QString toString(int role) const =0
Returns a string description of the specified role.
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
#define QT_BEGIN_NAMESPACE
This macro expands to.
static const char * data(const QByteArray &arr)
The QListModelInterface class can be subclassed to provide C++ models to QDeclarativeGraphics Views...
#define Q_DECLARATIVE_PRIVATE_EXPORT
The QDeclarativeCustomParser class allows you to add new arbitrary types to QML.
QByteArray listElementTypeName
NestedListModel * m_nested
virtual QList< int > roles() const =0
Returns the list of roles for which the list model interface provides data.
QDeclarativeListModelWorkerAgent * m_agent
bool canMove(int from, int to, int n) const
The QScriptValue class acts as a container for the Qt Script data types.