diff options
Diffstat (limited to 'examples/effects')
23 files changed, 337 insertions, 62 deletions
diff --git a/examples/effects/blurpicker/blureffect.cpp b/examples/effects/blurpicker/blureffect.cpp index f9e046e..9046cbd 100644 --- a/examples/effects/blurpicker/blureffect.cpp +++ b/examples/effects/blurpicker/blureffect.cpp @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. @@ -20,10 +21,9 @@ ** 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. +** 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. diff --git a/examples/effects/blurpicker/blureffect.h b/examples/effects/blurpicker/blureffect.h index 7c12ccf..6cfa55a 100644 --- a/examples/effects/blurpicker/blureffect.h +++ b/examples/effects/blurpicker/blureffect.h @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. @@ -20,10 +21,9 @@ ** 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. +** 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. diff --git a/examples/effects/blurpicker/blurpicker.cpp b/examples/effects/blurpicker/blurpicker.cpp index 084605f..1f46444 100644 --- a/examples/effects/blurpicker/blurpicker.cpp +++ b/examples/effects/blurpicker/blurpicker.cpp @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. @@ -20,10 +21,9 @@ ** 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. +** 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. diff --git a/examples/effects/blurpicker/blurpicker.h b/examples/effects/blurpicker/blurpicker.h index 9e91482..b460df4 100644 --- a/examples/effects/blurpicker/blurpicker.h +++ b/examples/effects/blurpicker/blurpicker.h @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. @@ -20,10 +21,9 @@ ** 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. +** 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. diff --git a/examples/effects/blurpicker/main.cpp b/examples/effects/blurpicker/main.cpp index 664099d..dfcdcd2 100644 --- a/examples/effects/blurpicker/main.cpp +++ b/examples/effects/blurpicker/main.cpp @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. @@ -20,10 +21,9 @@ ** 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. +** 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. diff --git a/examples/effects/customshader/blureffect.cpp b/examples/effects/customshader/blureffect.cpp index f9e046e..9046cbd 100644 --- a/examples/effects/customshader/blureffect.cpp +++ b/examples/effects/customshader/blureffect.cpp @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. @@ -20,10 +21,9 @@ ** 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. +** 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. diff --git a/examples/effects/customshader/blureffect.h b/examples/effects/customshader/blureffect.h index 7c12ccf..6cfa55a 100644 --- a/examples/effects/customshader/blureffect.h +++ b/examples/effects/customshader/blureffect.h @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. @@ -20,10 +21,9 @@ ** 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. +** 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. diff --git a/examples/effects/customshader/blurpicker.cpp b/examples/effects/customshader/blurpicker.cpp index 6c3d57d..6cda711 100644 --- a/examples/effects/customshader/blurpicker.cpp +++ b/examples/effects/customshader/blurpicker.cpp @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. @@ -20,10 +21,9 @@ ** 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. +** 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. diff --git a/examples/effects/customshader/blurpicker.h b/examples/effects/customshader/blurpicker.h index 9e91482..b460df4 100644 --- a/examples/effects/customshader/blurpicker.h +++ b/examples/effects/customshader/blurpicker.h @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. @@ -20,10 +21,9 @@ ** 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. +** 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. diff --git a/examples/effects/customshader/customshadereffect.cpp b/examples/effects/customshader/customshadereffect.cpp index e30bc19..73bbf4f 100644 --- a/examples/effects/customshader/customshadereffect.cpp +++ b/examples/effects/customshader/customshadereffect.cpp @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. @@ -20,10 +21,9 @@ ** 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. +** 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. diff --git a/examples/effects/customshader/customshadereffect.h b/examples/effects/customshader/customshadereffect.h index 6892d96..48940db 100644 --- a/examples/effects/customshader/customshadereffect.h +++ b/examples/effects/customshader/customshadereffect.h @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. @@ -20,10 +21,9 @@ ** 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. +** 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. diff --git a/examples/effects/customshader/main.cpp b/examples/effects/customshader/main.cpp index 664099d..dfcdcd2 100644 --- a/examples/effects/customshader/main.cpp +++ b/examples/effects/customshader/main.cpp @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. @@ -20,10 +21,9 @@ ** 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. +** 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. diff --git a/examples/effects/effects.pro b/examples/effects/effects.pro index 60b5baf..01fa293 100644 --- a/examples/effects/effects.pro +++ b/examples/effects/effects.pro @@ -2,7 +2,8 @@ TEMPLATE = \ subdirs SUBDIRS = \ blurpicker \ - lighting + lighting \ + fademessage contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2):SUBDIRS += customshader diff --git a/examples/effects/fademessage/README.txt b/examples/effects/fademessage/README.txt new file mode 100644 index 0000000..f639e76 --- /dev/null +++ b/examples/effects/fademessage/README.txt @@ -0,0 +1,2 @@ +The background is taken from a public domain photo at: +http://www.photos8.com/view/windows_problem_blue-800x600.html diff --git a/examples/effects/fademessage/background.jpg b/examples/effects/fademessage/background.jpg Binary files differnew file mode 100644 index 0000000..9884233 --- /dev/null +++ b/examples/effects/fademessage/background.jpg diff --git a/examples/effects/fademessage/fademessage.cpp b/examples/effects/fademessage/fademessage.cpp new file mode 100644 index 0000000..818d00f --- /dev/null +++ b/examples/effects/fademessage/fademessage.cpp @@ -0,0 +1,124 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples 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 "fademessage.h" + +#include <QtGui> + +FadeMessage::FadeMessage(QWidget *parent): QGraphicsView(parent), m_index(0.0) +{ + setScene(&m_scene); + setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + + setupScene(); + + m_timeLine = new QTimeLine(500, this); + m_timeLine->setCurveShape(QTimeLine::EaseInOutCurve); + connect(m_timeLine, SIGNAL(valueChanged(qreal)), m_effect, SLOT(setStrength(qreal))); + + setRenderHint(QPainter::Antialiasing, true); + setFrameStyle(QFrame::NoFrame); +} + +void FadeMessage::togglePopup() +{ + if (m_message->isVisible()) { + m_message->setVisible(false); + m_timeLine->setDirection(QTimeLine::Backward); + m_timeLine->start(); + } else { + m_message->setVisible(true); + m_timeLine->setDirection(QTimeLine::Forward); + m_timeLine->start(); + } +} + +void FadeMessage::setupScene() +{ + QGraphicsRectItem *parent = m_scene.addRect(0, 0, 400, 600); + parent->setPen(Qt::NoPen); + parent->setZValue(0); + + QGraphicsPixmapItem *bg = m_scene.addPixmap(QPixmap(":/background.jpg")); + bg->setParentItem(parent); + bg->setZValue(-1); + + for (int i = 1; i < 5; ++i) + for (int j = 2; j < 5; ++j) { + QGraphicsRectItem *item = m_scene.addRect(i * 50, j * 50, 38, 38); + item->setParentItem(parent); + item->setZValue(1); + int hue = 12 * (i * 5 + j); + item->setBrush(QColor::fromHsv(hue, 128, 128)); + } + + QFont font; + font.setPointSize(font.pointSize() * 2); + font.setBold(true); + int fh = QFontMetrics(font).height(); + + QGraphicsRectItem *block = m_scene.addRect(50, 300, 300, fh + 3); + block->setPen(Qt::NoPen); + block->setBrush(QColor(102, 153, 51)); + + QGraphicsTextItem *text = m_scene.addText("Qt Everywhere!", font); + text->setDefaultTextColor(Qt::white); + text->setPos(50, 300); + block->setZValue(2); + block->hide(); + + text->setParentItem(block); + m_message = block; + + m_effect = new QGraphicsColorizeEffect; + m_effect->setColor(QColor(122, 193, 66)); + m_effect->setStrength(0); + m_effect->setEnabled(true); + parent->setGraphicsEffect(m_effect); + + QPushButton *press = new QPushButton; + press->setText(tr("Press me")); + connect(press, SIGNAL(clicked()), SLOT(togglePopup())); + m_scene.addWidget(press); + press->move(300, 500); +} + diff --git a/examples/effects/fademessage/fademessage.h b/examples/effects/fademessage/fademessage.h new file mode 100644 index 0000000..34e2fb8 --- /dev/null +++ b/examples/effects/fademessage/fademessage.h @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples 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 FADEMESSAGE_H +#define FADEMESSAGE_H + +#include <QGraphicsEffect> +#include <QGraphicsView> +#include <QTimeLine> + +#include "fademessage.h" + +class FadeMessage: public QGraphicsView +{ + Q_OBJECT + +public: + FadeMessage(QWidget *parent = 0); + +private: + void setupScene(); + +private slots: + void togglePopup(); + +private: + qreal m_index; + QGraphicsScene m_scene; + QGraphicsColorizeEffect *m_effect; + QGraphicsItem *m_message; + QTimeLine *m_timeLine; +}; + +#endif // FADEMESSAGE_H diff --git a/examples/effects/fademessage/fademessage.pro b/examples/effects/fademessage/fademessage.pro new file mode 100644 index 0000000..ed9e53d --- /dev/null +++ b/examples/effects/fademessage/fademessage.pro @@ -0,0 +1,13 @@ +SOURCES += main.cpp fademessage.cpp +HEADERS += fademessage.h +RESOURCES += fademessage.qrc +INSTALLS += target sources + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/effects/fademessage +sources.files = $$SOURCES \ + $$HEADERS \ + $$RESOURCES \ + $$FORMS \ + fademessage.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/effects/fademessage diff --git a/examples/effects/fademessage/fademessage.qrc b/examples/effects/fademessage/fademessage.qrc new file mode 100644 index 0000000..9efea6a --- /dev/null +++ b/examples/effects/fademessage/fademessage.qrc @@ -0,0 +1,5 @@ +<RCC> + <qresource prefix="/" > + <file>background.jpg</file> + </qresource> +</RCC> diff --git a/examples/effects/fademessage/main.cpp b/examples/effects/fademessage/main.cpp new file mode 100644 index 0000000..65a4291 --- /dev/null +++ b/examples/effects/fademessage/main.cpp @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples 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 <QApplication> + +#include "fademessage.h" + +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + + FadeMessage widget; + widget.setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "Popup Message with Effect")); + widget.setFixedSize(400, 600); + widget.show(); + + return app.exec(); +} diff --git a/examples/effects/lighting/lighting.cpp b/examples/effects/lighting/lighting.cpp index e309e2e..7026b66 100644 --- a/examples/effects/lighting/lighting.cpp +++ b/examples/effects/lighting/lighting.cpp @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. @@ -20,10 +21,9 @@ ** 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. +** 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. @@ -96,7 +96,9 @@ void Lighting::setupScene() item->setPen(QPen(Qt::black)); item->setBrush(QBrush(Qt::white)); - item->setGraphicsEffect(new QGraphicsDropShadowEffect); + QGraphicsDropShadowEffect *effect = new QGraphicsDropShadowEffect; + effect->setBlurRadius(8); + item->setGraphicsEffect(effect); item->setZValue(1); item->setPos(i * 80, j * 80); m_scene.addItem(item); diff --git a/examples/effects/lighting/lighting.h b/examples/effects/lighting/lighting.h index eef5cae..f9a1664 100644 --- a/examples/effects/lighting/lighting.h +++ b/examples/effects/lighting/lighting.h @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. @@ -20,10 +21,9 @@ ** 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. +** 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. diff --git a/examples/effects/lighting/main.cpp b/examples/effects/lighting/main.cpp index 20a195f..fe1c896 100644 --- a/examples/effects/lighting/main.cpp +++ b/examples/effects/lighting/main.cpp @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. @@ -20,10 +21,9 @@ ** 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. +** 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. |