diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-08-27 05:51:46 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-08-27 05:51:46 (GMT) |
commit | 09c662b1c3440d7ff0b151d1fd10fc19ef75725f (patch) | |
tree | dd7d64120aaa4d0ca0caba7bd76e5c4eacabd80c /src/declarative/qml/qmlengine_p.h | |
parent | 59511a43beb04cd4341b2f99c0385daef120c122 (diff) | |
download | Qt-09c662b1c3440d7ff0b151d1fd10fc19ef75725f.zip Qt-09c662b1c3440d7ff0b151d1fd10fc19ef75725f.tar.gz Qt-09c662b1c3440d7ff0b151d1fd10fc19ef75725f.tar.bz2 |
Start adding convenience functions for value types.
Allows you to write things like "geometry: Qt.rect(0,0,100,100)" and
"color: Qt.hsla(.7,.5,.2)"
Diffstat (limited to 'src/declarative/qml/qmlengine_p.h')
-rw-r--r-- | src/declarative/qml/qmlengine_p.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlengine_p.h b/src/declarative/qml/qmlengine_p.h index 53b2967..c2de72b 100644 --- a/src/declarative/qml/qmlengine_p.h +++ b/src/declarative/qml/qmlengine_p.h @@ -214,6 +214,11 @@ public: static QScriptValue createComponent(QScriptContext*, QScriptEngine*); static QScriptValue createQmlObject(QScriptContext*, QScriptEngine*); static QScriptValue vector(QScriptContext*, QScriptEngine*); + static QScriptValue rgba(QScriptContext*, QScriptEngine*); + static QScriptValue hsla(QScriptContext*, QScriptEngine*); + static QScriptValue point(QScriptContext*, QScriptEngine*); + static QScriptValue size(QScriptContext*, QScriptEngine*); + static QScriptValue rect(QScriptContext*, QScriptEngine*); static QScriptEngine *getScriptEngine(QmlEngine *e) { return &e->d_func()->scriptEngine; } static QmlEnginePrivate *get(QmlEngine *e) { return e->d_func(); } |