diff options
-rw-r--r-- | src/declarative/qml/qmldom.cpp | 110 | ||||
-rw-r--r-- | src/declarative/qml/qmldom.h | 11 |
2 files changed, 2 insertions, 119 deletions
diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp index bc35f93..dca6bb9 100644 --- a/src/declarative/qml/qmldom.cpp +++ b/src/declarative/qml/qmldom.cpp @@ -80,11 +80,8 @@ QmlDomDocumentPrivate::~QmlDomDocumentPrivate() QmlDomDocument::version(), and a root object, accessible through QmlDomDocument::rootObject(). - The QmlDomDocument class allows the programmer to load a QML document, by - calling QmlDomDocument::load(), manipulate it and save it to textual form - by calling QmlDomDocument::save(). By using the QML DOM API, editors can - non-destructively modify a QML document even if they only understand a - subset of the total QML functionality. + The QmlDomDocument class allows the programmer to inspect a QML document by + calling QmlDomDocument::load(). The following example loads a QML file from disk, and prints out its root object type and the properties assigned in the root object. @@ -417,15 +414,6 @@ QmlDomValue QmlDomProperty::value() const } /*! - Sets the QmlDomValue that is assigned to this property to \a value. -*/ -void QmlDomProperty::setValue(const QmlDomValue &value) -{ - Q_UNUSED(value); - qWarning("QmlDomProperty::setValue(const QmlDomValue &): Not Implemented"); -} - -/*! Returns the position in the input data where the property ID startd, or -1 if the property is invalid. */ @@ -689,11 +677,6 @@ QGraphicsWidget { "opacity" and "size". Obviously QGraphicsWidget has many more properties than just these two, but the QML DOM representation only contains those assigned values (or bindings) in the QML file. - - The DOM tree can be modified to include new property assignments by calling - QmlDomObject::addProperty(). Existing property assignments can be modified - through the QmlDomProperty::setValue() method, or removed entirely by - calling QmlDomObject::removeProperty(). */ /*! @@ -808,17 +791,6 @@ QString QmlDomObject::objectId() const } /*! - Set the object \a id. If any other object within the DOM tree has the same - id, the other object's id will be cleared. -*/ -void QmlDomObject::setObjectId(const QByteArray &id) -{ - Q_UNUSED(id); - qWarning("QmlDomObject::setObjectId(const QByteArray &): Not implemented"); -} - - -/*! Returns the list of assigned properties on this object. In the following example, "text" and "x" properties would be returned. @@ -878,27 +850,6 @@ QmlDomProperty QmlDomObject::property(const QByteArray &name) const return QmlDomProperty(); } -/*! - Remove the property \a name from this object, if it exists. Otherwise does - nothing. -*/ -void QmlDomObject::removeProperty(const QByteArray &name) -{ - Q_UNUSED(name); - qWarning("QmlDomObject::removeProperty(const QByteArray &): Not implemented"); -} - -/*! - Adds the property \a name with the specified \a value to this object. If - a property by \a name already exists, it will be removed. -*/ -void QmlDomObject::addProperty(const QByteArray &name, const QmlDomValue &value) -{ - Q_UNUSED(name); - Q_UNUSED(value); - qWarning("QmlDomObject::addProperty(const QByteArray &, const QmlDomValue &): Not implemented"); -} - QList<QmlDomDynamicProperty> QmlDomObject::dynamicProperties() const { QList<QmlDomDynamicProperty> properties; @@ -950,18 +901,6 @@ bool QmlDomObject::isCustomType() const } /*! - Sets the custom type \a data. If this type is not a custom type, this - method does nothing. - - \sa QmlDomObject::isCustomType() QmlDomObject::customTypeData() -*/ -void QmlDomObject::setCustomTypeData(const QByteArray &data) -{ - Q_UNUSED(data); - qWarning("QmlDomObject::setCustomTypeData(const QByteArray &): Not implemented"); -} - -/*! If this object represents a custom type, returns the data associated with the custom type, otherwise returns an empty QByteArray(). QmlDomObject::isCustomType() can be used to check if this object represents @@ -1116,15 +1055,6 @@ QString QmlDomValueLiteral::literal() const } /*! - Sets the literal \a value. -*/ -void QmlDomValueLiteral::setLiteral(const QString &value) -{ - Q_UNUSED(value); - qWarning("QmlDomValueLiteral::setLiteral(const QString &): Not implemented"); -} - -/*! \class QmlDomValueBinding \internal \brief The QmlDomValueBinding class represents a property binding. @@ -1186,15 +1116,6 @@ QString QmlDomValueBinding::binding() const } /*! - Sets the binding \a expression. -*/ -void QmlDomValueBinding::setBinding(const QString &expression) -{ - Q_UNUSED(expression); - qWarning("QmlDomValueBinding::setBinding(const QString &): Not implemented"); -} - -/*! \class QmlDomValueValueSource \internal \brief The QmlDomValueValueSource class represents a value source assignment value. @@ -1274,14 +1195,6 @@ QmlDomObject QmlDomValueValueSource::object() const return rv; } -/*! - Sets the value source \a object. -*/ -void QmlDomValueValueSource::setObject(const QmlDomObject &object) -{ - Q_UNUSED(object); - qWarning("QmlDomValueValueSource::setObject(const QmlDomObject &): Not implemented"); -} QmlDomValuePrivate::QmlDomValuePrivate() : property(0), value(0) @@ -1659,15 +1572,6 @@ QList<QmlDomValue> QmlDomList::values() const } /*! - Set the list of QmlDomValue's to \a values. -*/ -void QmlDomList::setValues(const QList<QmlDomValue> &values) -{ - Q_UNUSED(values); - qWarning("QmlDomList::setValues(const QList<QmlDomValue> &): Not implemented"); -} - -/*! Returns the position in the input data where the list started, or -1 if the property is invalid. */ @@ -1793,16 +1697,6 @@ QmlDomObject QmlDomComponent::componentRoot() const return rv; } -/*! - Set the component's \a root object. -*/ -void QmlDomComponent::setComponentRoot(const QmlDomObject &root) -{ - Q_UNUSED(root); - qWarning("QmlDomComponent::setComponentRoot(const QmlDomObject &): Not implemented"); -} - - QmlDomImportPrivate::QmlDomImportPrivate() : type(File) { diff --git a/src/declarative/qml/qmldom.h b/src/declarative/qml/qmldom.h index 60e7b38..0366d37 100644 --- a/src/declarative/qml/qmldom.h +++ b/src/declarative/qml/qmldom.h @@ -100,7 +100,6 @@ public: bool isDefaultProperty() const; QmlDomValue value() const; - void setValue(const QmlDomValue &); int position() const; int length() const; @@ -156,20 +155,15 @@ public: int objectTypeMinorVersion() const; QString objectId() const; - void setObjectId(const QByteArray &); QList<QmlDomProperty> properties() const; QmlDomProperty property(const QByteArray &) const; - void removeProperty(const QByteArray &); - void addProperty(const QByteArray &, const QmlDomValue &); - QList<QmlDomDynamicProperty> dynamicProperties() const; QmlDomDynamicProperty dynamicProperty(const QByteArray &) const; bool isCustomType() const; QByteArray customTypeData() const; - void setCustomTypeData(const QByteArray &); bool isComponent() const; QmlDomComponent toComponent() const; @@ -197,7 +191,6 @@ public: QmlDomValueLiteral &operator=(const QmlDomValueLiteral &); QString literal() const; - void setLiteral(const QString &); private: friend class QmlDomValue; @@ -213,7 +206,6 @@ public: QmlDomValueBinding &operator=(const QmlDomValueBinding &); QString binding() const; - void setBinding(const QString &); private: friend class QmlDomValue; @@ -229,7 +221,6 @@ public: QmlDomValueValueSource &operator=(const QmlDomValueValueSource &); QmlDomObject object() const; - void setObject(const QmlDomObject &); private: friend class QmlDomValue; @@ -245,7 +236,6 @@ public: QmlDomComponent &operator=(const QmlDomComponent &); QmlDomObject componentRoot() const; - void setComponentRoot(const QmlDomObject &); }; class Q_DECLARATIVE_EXPORT QmlDomValue @@ -298,7 +288,6 @@ public: QmlDomList &operator=(const QmlDomList &); QList<QmlDomValue> values() const; - void setValues(const QList<QmlDomValue> &); int position() const; int length() const; |