42 #ifndef QDECLARATIVEVISUALDATAMODEL_H 43 #define QDECLARATIVEVISUALDATAMODEL_H 47 #include <QtCore/qobject.h> 48 #include <QtCore/qabstractitemmodel.h> 75 virtual int count()
const = 0;
76 virtual bool isValid()
const = 0;
79 virtual bool completePending()
const = 0;
80 virtual void completeItem() = 0;
88 void itemsInserted(
int index,
int count);
89 void itemsRemoved(
int index,
int count);
90 void itemsMoved(
int from,
int to,
int count);
91 void itemsChanged(
int index,
int count);
118 virtual int count()
const;
134 void childrenChanged();
155 virtual ~QDeclarativeVisualDataModel();
163 QVariant rootIndex() const;
164 void setRootIndex(const QVariant &root);
173 bool isValid()
const {
return delegate() != 0; }
189 void rootIndexChanged();
192 void _q_itemsChanged(
int,
int,
const QList<int> &);
193 void _q_itemsInserted(
int index,
int count);
194 void _q_itemsRemoved(
int index,
int count);
195 void _q_itemsMoved(
int from,
int to,
int count);
200 void _q_layoutChanged();
201 void _q_modelReset();
215 :
QObject(parent), m_index(0) {}
217 attachedProperties.remove(parent());
221 int index()
const {
return m_index; }
223 if (m_index != idx) {
233 attachedProperties.insert(obj, rv);
257 #endif // QDECLARATIVEVISUALDATAMODEL_H The QVariant class acts like a union for the most common Qt data types.
virtual bool isValid() const =0
virtual ReleaseFlags release(QDeclarativeItem *item)=0
#define Q_CLASSINFO(name, value)
This macro associates extra information to the class, which is available using QObject::metaObject()...
#define QT_END_NAMESPACE
This macro expands to.
#define QML_DECLARE_TYPE(TYPE)
#define Q_DECLARE_FLAGS(Flags, Enum)
The Q_DECLARE_FLAGS() macro expands to.
The QByteArray class provides an array of bytes.
virtual bool completePending() const =0
virtual int indexOf(QDeclarativeItem *item, QObject *objectContext) const =0
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
virtual QString stringValue(int, const QString &)=0
The QString class provides a Unicode character string.
The QHash class is a template class that provides a hash-table-based dictionary.
virtual void setWatchedRoles(QList< QByteArray >)
The QObject class is the base class of all Qt objects.
#define QML_DECLARE_TYPEINFO(TYPE, FLAGS)
virtual ~QDeclarativeVisualModel()
QDeclarativeVisualModel(QObjectPrivate &dd, QObject *parent=0)
#define QT_BEGIN_NAMESPACE
This macro expands to.
~QDeclarativeVisualItemModelAttached()
The QDeclarativeComponent class encapsulates a QML component definition.
The QDeclarativeItem class provides the most basic of all visual items in QML.
QDeclarativeVisualItemModelAttached(QObject *parent)
static QHash< QObject *, QDeclarativeVisualItemModelAttached * > attachedProperties
virtual QDeclarativeItem * item(int index, bool complete=true)=0
virtual void setWatchedRoles(QList< QByteArray > roles)=0
The QModelIndex class is used to locate data in a data model.
virtual int count() const =0
#define Q_AUTOTEST_EXPORT
const QObjectList & children() const
Returns a list of child objects.
The QDeclarativeContext class defines a context within a QML engine.
#define Q_DECLARE_PRIVATE(Class)
static QDeclarativeVisualItemModelAttached * properties(QObject *obj)
virtual void completeItem()=0
The QDeclarativeListProperty class allows applications to expose list-like properties to QML...