summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-04-22 02:08:33 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-04-22 02:25:05 (GMT)
commit5bcf21e6bbbfa2c990197695963caba25530827c (patch)
treeb88475e69a35d4e98754fe7b18f78b0cba6ce82a
parentf9062c44fc21da110fcfae68b19c70d4da7b3fc0 (diff)
downloadQt-5bcf21e6bbbfa2c990197695963caba25530827c.zip
Qt-5bcf21e6bbbfa2c990197695963caba25530827c.tar.gz
Qt-5bcf21e6bbbfa2c990197695963caba25530827c.tar.bz2
Remove (undocumented) QML bindings for effects.
Support for effects will be introduced in a future release, when we can make better guarantees about performance.
-rw-r--r--examples/declarative/effects/effects.qml65
-rw-r--r--examples/declarative/effects/effects.qmlproject16
-rw-r--r--examples/declarative/effects/pic.pngbin12933 -> 0 bytes
-rw-r--r--src/declarative/graphicsitems/graphicsitems.pri2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeeffects.cpp174
-rw-r--r--src/declarative/graphicsitems/qdeclarativeeffects_p.h67
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp12
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp14
8 files changed, 2 insertions, 348 deletions
diff --git a/examples/declarative/effects/effects.qml b/examples/declarative/effects/effects.qml
deleted file mode 100644
index feb7c69..0000000
--- a/examples/declarative/effects/effects.qml
+++ /dev/null
@@ -1,65 +0,0 @@
-import Qt 4.7
-
-Rectangle {
- width: 400; height: 200
-
- Image {
- id: blur
- x: 5
- source: "pic.png"
-
- effect: Blur {
- NumberAnimation on blurRadius {
- id: blurEffect
- running: false
- from: 0; to: 10
- duration: 1000
- loops: Animation.Infinite
- }
- }
-
- MouseArea { anchors.fill: parent; onClicked: blurEffect.running = !blurEffect.running }
- }
-
- Text { text: "Blur"; anchors.top: blur.bottom; anchors.horizontalCenter: blur.horizontalCenter }
-
- Image {
- id: dropShadow
- source: "pic.png"
- x: 135
-
- effect: DropShadow {
- blurRadius: 3
- offset.x: 3
-
- NumberAnimation on offset.y {
- id: dropShadowEffect
- from: 0; to: 10
- duration: 1000
- running: false
- loops: Animation.Infinite
- }
- }
-
- MouseArea { anchors.fill: parent; onClicked: dropShadowEffect.running = !dropShadowEffect.running }
- }
-
- Image {
- id: colorize
- source: "pic.png"
- x: 265
-
- effect: Colorize { color: "blue" }
- }
-
- Text { text: "Colorize"; anchors.top: colorize.bottom; anchors.horizontalCenter: colorize.horizontalCenter }
-
- Text { text: "Drop Shadow"; anchors.top: dropShadow.bottom; anchors.horizontalCenter: dropShadow.horizontalCenter }
-
- Text {
- y: 155; anchors.horizontalCenter: parent.horizontalCenter
- text: "Clicking Blur or Drop Shadow will \ntoggle animation."
- color: "black"
- }
-
-}
diff --git a/examples/declarative/effects/effects.qmlproject b/examples/declarative/effects/effects.qmlproject
deleted file mode 100644
index d4909f8..0000000
--- a/examples/declarative/effects/effects.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.0
-
-Project {
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
- /* List of plugin directories passed to QML runtime */
- // importPaths: [ " ../exampleplugin " ]
-}
diff --git a/examples/declarative/effects/pic.png b/examples/declarative/effects/pic.png
deleted file mode 100644
index 051e738..0000000
--- a/examples/declarative/effects/pic.png
+++ /dev/null
Binary files differ
diff --git a/src/declarative/graphicsitems/graphicsitems.pri b/src/declarative/graphicsitems/graphicsitems.pri
index ad7ccb5..d420595 100644
--- a/src/declarative/graphicsitems/graphicsitems.pri
+++ b/src/declarative/graphicsitems/graphicsitems.pri
@@ -5,7 +5,6 @@ HEADERS += \
$$PWD/qdeclarativeanchors_p.h \
$$PWD/qdeclarativeanchors_p_p.h \
$$PWD/qdeclarativeevents_p_p.h \
- $$PWD/qdeclarativeeffects_p.h \
$$PWD/qdeclarativeflickable_p.h \
$$PWD/qdeclarativeflickable_p_p.h \
$$PWD/qdeclarativeflipable_p.h \
@@ -50,7 +49,6 @@ HEADERS += \
$$PWD/qdeclarativelistview_p.h \
$$PWD/qdeclarativelayoutitem_p.h \
$$PWD/qdeclarativeitemchangelistener_p.h \
- $$PWD/qdeclarativeeffects.cpp \
$$PWD/qdeclarativegraphicswidget_p.h
SOURCES += \
diff --git a/src/declarative/graphicsitems/qdeclarativeeffects.cpp b/src/declarative/graphicsitems/qdeclarativeeffects.cpp
deleted file mode 100644
index ea1f9cc..0000000
--- a/src/declarative/graphicsitems/qdeclarativeeffects.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <qdeclarative.h>
-
-#include <QtGui/qgraphicseffect.h>
-
-/*!
- \qmlclass Blur QGraphicsBlurEffect
- \since 4.7
- \brief The Blur object provides a blur effect.
-
- A blur effect blurs the source item. This effect is useful for reducing details;
- for example, when the a source loses focus and attention should be drawn to other
- elements. Use blurRadius to control the level of detail and blurHint to control
- the quality of the blur.
-
- By default, the blur radius is 5 pixels.
-
- \img graphicseffect-blur.png
-*/
-
-/*!
- \qmlproperty real Blur::blurRadius
-
- This controls how blurry an item will appear.
-
- A smaller radius produces a sharper appearance, and a larger radius produces
- a more blurred appearance.
-
- The default radius is 5 pixels.
-*/
-/*!
- \qmlproperty enumeration Blur::blurHint
-
- Use Qt.PerformanceHint to specify a faster blur or Qt.QualityHint hint
- to specify a higher quality blur.
-
- If the blur radius is animated, it is recommended you use Qt.PerformanceHint.
-
- The default hint is Qt.PerformanceHint.
-*/
-
-/*!
- \qmlclass Colorize QGraphicsColorizeEffect
- \since 4.7
- \brief The Colorize object provides a colorize effect.
-
- A colorize effect renders the source item with a tint of its color.
-
- By default, the color is light blue.
-
- \img graphicseffect-colorize.png
-*/
-
-/*!
- \qmlproperty color Colorize::color
- The color of the effect.
-
- By default, the color is light blue.
-*/
-
-/*!
- \qmlproperty real Colorize::strength
-
- To what extent the source item is "colored". A strength of 0.0 is equal to no effect,
- while 1.0 means full colorization. By default, the strength is 1.0.
-*/
-
-
-/*!
- \qmlclass DropShadow QGraphicsDropShadowEffect
- \since 4.7
- \brief The DropShadow object provides a drop shadow effect.
-
- A drop shadow effect renders the source item with a drop shadow. The color of
- the drop shadow can be modified using the color property. The drop
- shadow offset can be modified using the xOffset and yOffset properties and the blur
- radius of the drop shadow can be changed with the blurRadius property.
-
- By default, the drop shadow is a semi-transparent dark gray shadow,
- blurred with a radius of 1 at an offset of 8 pixels towards the lower right.
-
- \img graphicseffect-drop-shadow.png
-*/
-
-/*!
- \qmlproperty real DropShadow::xOffset
- \qmlproperty real DropShadow::yOffset
- The shadow offset in pixels.
-
- By default, xOffset and yOffset are 8 pixels.
-*/
-
-/*!
- \qmlproperty real DropShadow::blurRadius
- The blur radius in pixels of the drop shadow.
-
- Using a smaller radius results in a sharper shadow, whereas using a bigger
- radius results in a more blurred shadow.
-
- By default, the blur radius is 1 pixel.
-*/
-
-/*!
- \qmlproperty color DropShadow::color
- The color of the drop shadow.
-
- By default, the drop color is a semi-transparent dark gray.
-*/
-
-
-/*!
- \qmlclass Opacity QGraphicsOpacityEffect
- \since 4.7
- \brief The Opacity object provides an opacity effect.
-
- An opacity effect renders the source with an opacity. This effect is useful
- for making the source semi-transparent, similar to a fade-in/fade-out
- sequence. The opacity can be modified using the opacity property.
-
- By default, the opacity is 0.7.
-
- \img graphicseffect-opacity.png
-*/
-
-/*!
- \qmlproperty real Opacity::opacity
- This property specifies how opaque an item should appear.
-
- The value should be in the range of 0.0 to 1.0, where 0.0 is
- fully transparent and 1.0 is fully opaque.
-
- By default, the opacity is 0.7.
-*/
-
diff --git a/src/declarative/graphicsitems/qdeclarativeeffects_p.h b/src/declarative/graphicsitems/qdeclarativeeffects_p.h
deleted file mode 100644
index 0de5854..0000000
--- a/src/declarative/graphicsitems/qdeclarativeeffects_p.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QDECLARATIVEEFFECTS_P_H
-#define QDECLARATIVEEFFECTS_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#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.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index bdd24b6..bc0c65e 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -61,7 +61,6 @@
#include <QtCore/qnumeric.h>
#include <QtScript/qscriptengine.h>
#include <QtGui/qgraphicstransform.h>
-#include <QtGui/qgraphicseffect.h>
#include <qlistmodelinterface_p.h>
QT_BEGIN_NAMESPACE
@@ -70,8 +69,6 @@ QT_BEGIN_NAMESPACE
#define FLT_MAX 1E+37
#endif
-#include "qdeclarativeeffects.cpp"
-
/*!
\qmlclass Transform QGraphicsTransform
\since 4.7
@@ -234,11 +231,6 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \group group_effects
- \title Effects
-*/
-
-/*!
\group group_layouts
\title Layouts
*/
@@ -2154,8 +2146,8 @@ void QDeclarativeItem::setBaselineOffset(qreal offset)
Opacity is an \e inherited attribute. That is, the opacity is
also applied individually to child items. In almost all cases this
- is what you want. If you can spot the issue in the following
- example, you might need to use an \l Opacity effect instead.
+ is what you want, but in some cases (like the following example)
+ it may produce undesired results.
\table
\row
diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
index 8e34472..4238c53 100644
--- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
@@ -46,7 +46,6 @@
#include <QtGui/qgraphicseffect.h>
#include "private/qdeclarativeevents_p_p.h"
-#include "private/qdeclarativeeffects_p.h"
#include "private/qdeclarativescalegrid_p_p.h"
#include "private/qdeclarativeanimatedimage_p.h"
#include "private/qdeclarativeborderimage_p.h"
@@ -144,19 +143,6 @@ void QDeclarativeItemModule::defineModule()
qmlRegisterType<QAction>();
qmlRegisterType<QDeclarativePen>();
qmlRegisterType<QDeclarativeFlickableVisibleArea>();
-#ifdef QT_NO_GRAPHICSEFFECT
- QString no_graphicseffect = qApp->translate("QGraphicsBlurEffect","Qt was built without support for graphicseffects");
- qmlRegisterTypeNotAvailable("Qt",4,7,"Blur",no_graphicseffect);
- qmlRegisterTypeNotAvailable("Qt",4,7,"Colorize",no_graphicseffect);
- qmlRegisterTypeNotAvailable("Qt",4,7,"DropShadow",no_graphicseffect);
- qmlRegisterTypeNotAvailable("Qt",4,7,"Opacity",no_graphicseffect);
-#else
- qmlRegisterType<QGraphicsEffect>();
- qmlRegisterType<QGraphicsBlurEffect>("Qt",4,7,"Blur");
- qmlRegisterType<QGraphicsColorizeEffect>("Qt",4,7,"Colorize");
- qmlRegisterType<QGraphicsDropShadowEffect>("Qt",4,7,"DropShadow");
- qmlRegisterType<QGraphicsOpacityEffect>("Qt",4,7,"Opacity");
-#endif
qmlRegisterUncreatableType<QDeclarativeKeyNavigationAttached>("Qt",4,7,"KeyNavigation",QDeclarativeKeyNavigationAttached::tr("KeyNavigation is only available via attached properties"));
qmlRegisterUncreatableType<QDeclarativeKeysAttached>("Qt",4,7,"Keys",QDeclarativeKeysAttached::tr("Keys is only available via attached properties"));