diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeeffects_p.h | 2 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp | 12 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.h | 2 |
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/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp index eb055da..731b1aa 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"); @@ -104,7 +101,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"); @@ -129,7 +125,6 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType<QDeclarativeVisualItemModel>("Qt",4,6,"VisualItemModel"); qmlRegisterType<QDeclarativeAnchors>(); - qmlRegisterType<QGraphicsEffect>(); qmlRegisterType<QDeclarativeKeyEvent>(); qmlRegisterType<QDeclarativeMouseEvent>(); qmlRegisterType<QGraphicsObject>(); @@ -144,6 +139,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 diff --git a/src/gui/graphicsview/qgraphicsitem.h b/src/gui/graphicsview/qgraphicsitem.h index 5a65232..9891af3 100644 --- a/src/gui/graphicsview/qgraphicsitem.h +++ b/src/gui/graphicsview/qgraphicsitem.h @@ -554,7 +554,9 @@ class Q_GUI_EXPORT QGraphicsObject : public QObject, public QGraphicsItem Q_PROPERTY(qreal rotation READ rotation WRITE setRotation NOTIFY rotationChanged) Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged) Q_PROPERTY(QPointF transformOriginPoint READ transformOriginPoint WRITE setTransformOriginPoint) +#ifndef QT_NO_GRAPHICSEFFECT Q_PROPERTY(QGraphicsEffect *effect READ graphicsEffect WRITE setGraphicsEffect) +#endif Q_PRIVATE_PROPERTY(QGraphicsItem::d_func(), QDeclarativeListProperty<QGraphicsObject> children READ childrenList DESIGNABLE false NOTIFY childrenChanged) Q_PRIVATE_PROPERTY(QGraphicsItem::d_func(), qreal width READ width WRITE setWidth NOTIFY widthChanged RESET resetWidth FINAL) Q_PRIVATE_PROPERTY(QGraphicsItem::d_func(), qreal height READ height WRITE setHeight NOTIFY heightChanged RESET resetHeight FINAL) |