summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h')
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h b/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
index d34bcaf..edfd387 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
@@ -82,6 +82,7 @@ public:
virtual bool isValid() const = 0;
virtual QDeclarativeItem *item(int index, bool complete=true) = 0;
virtual ReleaseFlags release(QDeclarativeItem *item) = 0;
+ virtual bool completePending() const = 0;
virtual void completeItem() = 0;
virtual QVariant evaluate(int index, const QString &expression, QObject *objectContext) = 0;
virtual QString stringValue(int, const QString &) { return QString(); }
@@ -123,6 +124,7 @@ public:
virtual bool isValid() const;
virtual QDeclarativeItem *item(int index, bool complete=true);
virtual ReleaseFlags release(QDeclarativeItem *item);
+ virtual bool completePending() const;
virtual void completeItem();
virtual QString stringValue(int index, const QString &role);
virtual QVariant evaluate(int index, const QString &expression, QObject *objectContext);
@@ -150,7 +152,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeVisualDataModel : public QDeclarativeVisu
Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate)
Q_PROPERTY(QString part READ part WRITE setPart)
Q_PROPERTY(QObject *parts READ parts CONSTANT)
- Q_PROPERTY(QModelIndex rootIndex READ rootIndex WRITE setRootIndex NOTIFY rootIndexChanged)
+ Q_PROPERTY(QVariant rootIndex READ rootIndex WRITE setRootIndex NOTIFY rootIndexChanged)
Q_CLASSINFO("DefaultProperty", "delegate")
public:
QDeclarativeVisualDataModel();
@@ -163,8 +165,11 @@ public:
QDeclarativeComponent *delegate() const;
void setDelegate(QDeclarativeComponent *);
- QModelIndex rootIndex() const;
- void setRootIndex(const QModelIndex &root);
+ QVariant rootIndex() const;
+ void setRootIndex(const QVariant &root);
+
+ Q_INVOKABLE QVariant modelIndex(int idx) const;
+ Q_INVOKABLE QVariant parentModelIndex() const;
QString part() const;
void setPart(const QString &);
@@ -174,6 +179,7 @@ public:
QDeclarativeItem *item(int index, bool complete=true);
QDeclarativeItem *item(int index, const QByteArray &, bool complete=true);
ReleaseFlags release(QDeclarativeItem *item);
+ bool completePending() const;
void completeItem();
virtual QString stringValue(int index, const QString &role);
QVariant evaluate(int index, const QString &expression, QObject *objectContext);