diff options
author | Tasuku Suzuki <tasuku.suzuki@nokia.com> | 2010-04-11 10:22:08 (GMT) |
---|---|---|
committer | Tasuku Suzuki <tasuku.suzuki@nokia.com> | 2010-04-13 12:44:11 (GMT) |
commit | c6483baf226e9e698983aa596761825ad4a8a698 (patch) | |
tree | 3606cac0c91f013d38e1851c7adb95aba6418999 /src/declarative | |
parent | e9a0067ef4b272f1893522959dc15561970590ea (diff) | |
download | Qt-c6483baf226e9e698983aa596761825ad4a8a698.zip Qt-c6483baf226e9e698983aa596761825ad4a8a698.tar.gz Qt-c6483baf226e9e698983aa596761825ad4a8a698.tar.bz2 |
Fix QT_NO_GRAPHICSEFFECT
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeeffects_p.h | 2 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeitem.h | 2 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp | 12 |
3 files changed, 11 insertions, 5 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeeffects_p.h b/src/declarative/graphicsitems/qdeclarativeeffects_p.h index 73eec6a..0de5854 100644 --- a/src/declarative/graphicsitems/qdeclarativeeffects_p.h +++ b/src/declarative/graphicsitems/qdeclarativeeffects_p.h @@ -56,10 +56,12 @@ #include <qdeclarative.h> #include <QtGui/qgraphicseffect.h> +#ifndef QT_NO_GRAPHICSEFFECT QML_DECLARE_TYPE(QGraphicsEffect) QML_DECLARE_TYPE(QGraphicsBlurEffect) QML_DECLARE_TYPE(QGraphicsColorizeEffect) QML_DECLARE_TYPE(QGraphicsDropShadowEffect) QML_DECLARE_TYPE(QGraphicsOpacityEffect) +#endif #endif // QDECLARATIVEEFFECTS_P_H diff --git a/src/declarative/graphicsitems/qdeclarativeitem.h b/src/declarative/graphicsitems/qdeclarativeitem.h index 917e480..0e03e6d 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.h +++ b/src/declarative/graphicsitems/qdeclarativeitem.h @@ -91,7 +91,9 @@ class Q_DECLARATIVE_EXPORT QDeclarativeItem : public QGraphicsObject, public QDe Q_PROPERTY(QDeclarativeListProperty<QGraphicsTransform> transform READ transform DESIGNABLE false FINAL) Q_PROPERTY(TransformOrigin transformOrigin READ transformOrigin WRITE setTransformOrigin NOTIFY transformOriginChanged) Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged) +#ifndef QT_NO_GRAPHICSEFFECT Q_PROPERTY(QGraphicsEffect *effect READ graphicsEffect WRITE setGraphicsEffect) +#endif Q_ENUMS(TransformOrigin) Q_CLASSINFO("DefaultProperty", "data") diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp index 7989a27..ab57860 100644 --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp @@ -83,12 +83,9 @@ void QDeclarativeItemModule::defineModule() { qmlRegisterType<QDeclarativeAnimatedImage>("Qt",4,6,"AnimatedImage"); - qmlRegisterType<QGraphicsBlurEffect>("Qt",4,6,"Blur"); qmlRegisterType<QDeclarativeBorderImage>("Qt",4,6,"BorderImage"); - qmlRegisterType<QGraphicsColorizeEffect>("Qt",4,6,"Colorize"); qmlRegisterType<QDeclarativeColumn>("Qt",4,6,"Column"); qmlRegisterType<QDeclarativeDrag>("Qt",4,6,"Drag"); - qmlRegisterType<QGraphicsDropShadowEffect>("Qt",4,6,"DropShadow"); qmlRegisterType<QDeclarativeFlickable>("Qt",4,6,"Flickable"); qmlRegisterType<QDeclarativeFlipable>("Qt",4,6,"Flipable"); qmlRegisterType<QDeclarativeFlow>("Qt",4,6,"Flow"); @@ -107,7 +104,6 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType<QDeclarativeListView>("Qt",4,6,"ListView"); qmlRegisterType<QDeclarativeLoader>("Qt",4,6,"Loader"); qmlRegisterType<QDeclarativeMouseArea>("Qt",4,6,"MouseArea"); - qmlRegisterType<QGraphicsOpacityEffect>("Qt",4,6,"Opacity"); qmlRegisterType<QDeclarativePath>("Qt",4,6,"Path"); qmlRegisterType<QDeclarativePathAttribute>("Qt",4,6,"PathAttribute"); qmlRegisterType<QDeclarativePathCubic>("Qt",4,6,"PathCubic"); @@ -134,7 +130,6 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType<QDeclarativeVisualItemModel>("Qt",4,6,"VisualItemModel"); qmlRegisterType<QDeclarativeAnchors>(); - qmlRegisterType<QGraphicsEffect>(); qmlRegisterType<QDeclarativeKeyEvent>(); qmlRegisterType<QDeclarativeMouseEvent>(); qmlRegisterType<QGraphicsObject>(); @@ -148,6 +143,13 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType<QAction>(); qmlRegisterType<QDeclarativePen>(); qmlRegisterType<QDeclarativeFlickableVisibleArea>(); +#ifndef QT_NO_GRAPHICSEFFECT + qmlRegisterType<QGraphicsEffect>(); + qmlRegisterType<QGraphicsBlurEffect>("Qt",4,6,"Blur"); + qmlRegisterType<QGraphicsColorizeEffect>("Qt",4,6,"Colorize"); + qmlRegisterType<QGraphicsDropShadowEffect>("Qt",4,6,"DropShadow"); + qmlRegisterType<QGraphicsOpacityEffect>("Qt",4,6,"Opacity"); +#endif #ifdef QT_WEBKIT_LIB qmlRegisterType<QDeclarativeWebSettings>(); #endif |