summaryrefslogtreecommitdiffstats
path: root/demos/embedded/fluidlauncher
diff options
context:
space:
mode:
Diffstat (limited to 'demos/embedded/fluidlauncher')
-rw-r--r--demos/embedded/fluidlauncher/config_s60/config.xml27
-rw-r--r--demos/embedded/fluidlauncher/demoapplication.cpp8
-rw-r--r--demos/embedded/fluidlauncher/demoapplication.h8
-rw-r--r--demos/embedded/fluidlauncher/fluidlauncher.cpp134
-rw-r--r--demos/embedded/fluidlauncher/fluidlauncher.h12
-rw-r--r--demos/embedded/fluidlauncher/fluidlauncher.pro124
-rw-r--r--demos/embedded/fluidlauncher/main.cpp8
-rw-r--r--demos/embedded/fluidlauncher/pictureflow.cpp336
-rw-r--r--demos/embedded/fluidlauncher/pictureflow.h36
-rw-r--r--demos/embedded/fluidlauncher/screenshots/anomaly_s60.pngbin0 -> 39093 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/context2d_s60.pngbin0 -> 39405 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/desktopservices_s60.pngbin0 -> 31757 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/digiflip.pngbin0 -> 3508 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/drilldown_s60.pngbin0 -> 47687 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/embeddedsvgviewer_s60.pngbin0 -> 29917 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/flickable.pngbin0 -> 21107 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/flightinfo_s60.pngbin0 -> 24473 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/fridgemagnets_s60.pngbin0 -> 39865 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/ftp_s60.pngbin0 -> 32534 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/lightmaps.pngbin0 -> 114178 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/raycasting.pngbin0 -> 43006 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/saxbookmarks_s60.pngbin0 -> 47182 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/softkeys_s60.pngbin0 -> 28562 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/styledemo_s60.pngbin0 -> 51957 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/weatherinfo.pngbin0 -> 38521 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/wiggly_s60.pngbin0 -> 5549 bytes
-rw-r--r--demos/embedded/fluidlauncher/slideshow.cpp8
-rw-r--r--demos/embedded/fluidlauncher/slideshow.h8
28 files changed, 452 insertions, 257 deletions
diff --git a/demos/embedded/fluidlauncher/config_s60/config.xml b/demos/embedded/fluidlauncher/config_s60/config.xml
new file mode 100644
index 0000000..192a2e3
--- /dev/null
+++ b/demos/embedded/fluidlauncher/config_s60/config.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<demolauncher>
+ <demos>
+ <example filename="embeddedsvgviewer" name="SVG Viewer" image="screenshots/embeddedsvgviewer_s60.png" args="/data/images/qt/demos/embeddedsvgviewer/shapes.svg"/>
+ <example filename="styledemo" name="Stylesheets" image="screenshots/styledemo_s60.png"/>
+ <example filename="deform" name="Vector Deformation" image="screenshots/deform.png" args="-small-screen"/>
+ <example filename="pathstroke" name="Path Stroking" image="screenshots/pathstroke.png" args="-small-screen"/>
+ <example filename="wiggly" name="Wiggly Text" image="screenshots/wiggly_s60.png" args="-small-screen"/>
+ <example filename="ftp" name="Ftp Client" image="screenshots/ftp_s60.png"/>
+ <example filename="context2d" name="Context2d" image="screenshots/context2d_s60.png"/>
+ <example filename="saxbookmarks" name="SaxBookmarks" image="screenshots/saxbookmarks_s60.png"/>
+ <example filename="desktopservices" name="Desktop Services" image="screenshots/desktopservices_s60.png"/>
+ <example filename="fridgemagnets" name="Fridge Magnets" image="screenshots/fridgemagnets_s60.png" args="-small-screen"/>
+ <example filename="drilldown" name="Drilldown" image="screenshots/drilldown_s60.png"/>
+ <example filename="softkeys" name="Softkeys" image="screenshots/softkeys_s60.png"/>
+ <example filename="anomaly" name="Anomaly Browser" image="screenshots/anomaly_s60.png"/>
+ <example filename="raycasting" name="Ray casting" image="screenshots/raycasting.png"/>
+ <example filename="lightmaps" name="OpenStreetMap" image="screenshots/lightmaps.png"/>
+ <example filename="flightinfo" name="Flight Info" image="screenshots/flightinfo_s60.png"/>
+ <example filename="weatherinfo" name="Weather Info" image="screenshots/weatherinfo.png"/>
+ <example filename="flickable" name="Kinetic Scrolling" image="screenshots/flickable.png"/>
+ <example filename="digiflip" name="Flipping Clock" image="screenshots/digiflip.png"/>
+ </demos>
+ <slideshow timeout="60000" interval="10000">
+ <imagedir dir="slides"/>
+ </slideshow>
+</demolauncher>
diff --git a/demos/embedded/fluidlauncher/demoapplication.cpp b/demos/embedded/fluidlauncher/demoapplication.cpp
index 864ef91..8e6279d 100644
--- a/demos/embedded/fluidlauncher/demoapplication.cpp
+++ b/demos/embedded/fluidlauncher/demoapplication.cpp
@@ -1,7 +1,6 @@
/****************************************************************************
**
** 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 demonstration applications of the Qt Toolkit.
@@ -21,9 +20,10 @@
** 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/demos/embedded/fluidlauncher/demoapplication.h b/demos/embedded/fluidlauncher/demoapplication.h
index 0fa67c0..ae24980 100644
--- a/demos/embedded/fluidlauncher/demoapplication.h
+++ b/demos/embedded/fluidlauncher/demoapplication.h
@@ -1,7 +1,6 @@
/****************************************************************************
**
** 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 demonstration applications of the Qt Toolkit.
@@ -21,9 +20,10 @@
** 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/demos/embedded/fluidlauncher/fluidlauncher.cpp b/demos/embedded/fluidlauncher/fluidlauncher.cpp
index 7fec87a..3655f27 100644
--- a/demos/embedded/fluidlauncher/fluidlauncher.cpp
+++ b/demos/embedded/fluidlauncher/fluidlauncher.cpp
@@ -1,7 +1,6 @@
/****************************************************************************
**
** 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 demonstration applications of the Qt Toolkit.
@@ -21,9 +20,10 @@
** 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.
@@ -39,12 +39,14 @@
**
****************************************************************************/
-#include <QtXml>
+#include <QXmlStreamReader>
#include "fluidlauncher.h"
#define DEFAULT_INPUT_TIMEOUT 10000
+#define SIZING_FACTOR_HEIGHT 6/10
+#define SIZING_FACTOR_WIDTH 6/10
FluidLauncher::FluidLauncher(QStringList* args)
{
@@ -62,7 +64,11 @@ FluidLauncher::FluidLauncher(QStringList* args)
inputTimer->setSingleShot(true);
inputTimer->setInterval(DEFAULT_INPUT_TIMEOUT);
- pictureFlowWidget->setSlideSize(QSize( (screen_size.width()*2)/5, (screen_size.height()*2)/5 ));
+ const int h = screen_size.height() * SIZING_FACTOR_HEIGHT;
+ const int w = screen_size.width() * SIZING_FACTOR_WIDTH;
+ const int hh = qMin(h, w);
+ const int ww = hh / 3 * 2;
+ pictureFlowWidget->setSlideSize(QSize(ww, hh));
bool success;
int configIndex = args->indexOf("-config");
@@ -100,61 +106,97 @@ bool FluidLauncher::loadConfig(QString configPath)
slideShowWidget->clearImages();
- QDomDocument xmlDoc;
- xmlDoc.setContent(&xmlFile, true);
+ xmlFile.open(QIODevice::ReadOnly);
+ QXmlStreamReader reader(&xmlFile);
+ while (!reader.atEnd()) {
+ reader.readNext();
- QDomElement rootElement = xmlDoc.documentElement();
-
- // Process the demos node:
- QDomNodeList demoNodes = rootElement.firstChildElement("demos").elementsByTagName("example");
- for (int i=0; i<demoNodes.size(); i++) {
- QDomElement element = demoNodes.item(i).toElement();
-
- if (element.hasAttribute("filename")) {
- DemoApplication* newDemo = new DemoApplication(
- element.attribute("filename"),
- element.attribute("name", "Unamed Demo"),
- element.attribute("image"),
- element.attribute("args").split(" "));
- demoList.append(newDemo);
+ if (reader.isStartElement()) {
+ if (reader.name() == "demos")
+ parseDemos(reader);
+ else if(reader.name() == "slideshow")
+ parseSlideshow(reader);
}
}
+ if (reader.hasError()) {
+ qDebug() << QString("Error parsing %1 on line %2 column %3: \n%4")
+ .arg(configPath)
+ .arg(reader.lineNumber())
+ .arg(reader.columnNumber())
+ .arg(reader.errorString());
+ }
- // Process the slideshow node:
- QDomElement slideshowElement = rootElement.firstChildElement("slideshow");
+ // Append an exit Item
+ DemoApplication* exitItem = new DemoApplication(QString(), QLatin1String("Exit Embedded Demo"), QString(), QStringList());
+ demoList.append(exitItem);
- if (slideshowElement.hasAttribute("timeout")) {
- bool valid;
- int timeout = slideshowElement.attribute("timeout").toInt(&valid);
- if (valid)
- inputTimer->setInterval(timeout);
- }
+ return true;
+}
- if (slideshowElement.hasAttribute("interval")) {
- bool valid;
- int interval = slideshowElement.attribute("interval").toInt(&valid);
- if (valid)
- slideShowWidget->setSlideInterval(interval);
+
+void FluidLauncher::parseDemos(QXmlStreamReader& reader)
+{
+ while (!reader.atEnd()) {
+ reader.readNext();
+ if (reader.isStartElement() && reader.name() == "example") {
+ QXmlStreamAttributes attrs = reader.attributes();
+ QStringRef filename = attrs.value("filename");
+ if (!filename.isEmpty()) {
+ QStringRef name = attrs.value("name");
+ QStringRef image = attrs.value("image");
+ QStringRef args = attrs.value("args");
+
+ DemoApplication* newDemo = new DemoApplication(
+ filename.toString(),
+ name.isEmpty() ? "Unamed Demo" : name.toString(),
+ image.toString(),
+ args.toString().split(" "));
+ demoList.append(newDemo);
+ }
+ } else if(reader.isEndElement() && reader.name() == "demos") {
+ return;
+ }
}
+}
- for (QDomNode node=slideshowElement.firstChild(); !node.isNull(); node=node.nextSibling()) {
- QDomElement element = node.toElement();
+void FluidLauncher::parseSlideshow(QXmlStreamReader& reader)
+{
+ QXmlStreamAttributes attrs = reader.attributes();
+
+ QStringRef timeout = attrs.value("timeout");
+ bool valid;
+ if (!timeout.isEmpty()) {
+ int t = timeout.toString().toInt(&valid);
+ if (valid)
+ inputTimer->setInterval(t);
+ }
- if (element.tagName() == "imagedir")
- slideShowWidget->addImageDir(element.attribute("dir"));
- else if (element.tagName() == "image")
- slideShowWidget->addImage(element.attribute("image"));
+ QStringRef interval = attrs.value("interval");
+ if (!interval.isEmpty()) {
+ int i = interval.toString().toInt(&valid);
+ if (valid)
+ slideShowWidget->setSlideInterval(i);
}
- // Append an exit Item
- DemoApplication* exitItem = new DemoApplication(QString(), QLatin1String("Exit Embedded Demo"), QString(), QStringList());
- demoList.append(exitItem);
+ while (!reader.atEnd()) {
+ reader.readNext();
+ if (reader.isStartElement()) {
+ QXmlStreamAttributes attrs = reader.attributes();
+ if (reader.name() == "imagedir") {
+ QStringRef dir = attrs.value("dir");
+ slideShowWidget->addImageDir(dir.toString());
+ } else if(reader.name() == "image") {
+ QStringRef image = attrs.value("image");
+ slideShowWidget->addImage(image.toString());
+ }
+ } else if(reader.isEndElement() && reader.name() == "slideshow") {
+ return;
+ }
+ }
- return true;
}
-
void FluidLauncher::populatePictureFlow()
{
pictureFlowWidget->setSlideCount(demoList.count());
diff --git a/demos/embedded/fluidlauncher/fluidlauncher.h b/demos/embedded/fluidlauncher/fluidlauncher.h
index 0fc665c..a280a2e 100644
--- a/demos/embedded/fluidlauncher/fluidlauncher.h
+++ b/demos/embedded/fluidlauncher/fluidlauncher.h
@@ -1,7 +1,6 @@
/****************************************************************************
**
** 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 demonstration applications of the Qt Toolkit.
@@ -21,9 +20,10 @@
** 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.
@@ -44,6 +44,7 @@
#include <QtGui>
#include <QTimer>
+#include <QStringRef>
#include "pictureflow.h"
#include "slideshow.h"
@@ -73,7 +74,8 @@ private:
bool loadConfig(QString configPath);
void populatePictureFlow();
void switchToSlideshow();
-
+ void parseDemos(QXmlStreamReader& reader);
+ void parseSlideshow(QXmlStreamReader& reader);
};
diff --git a/demos/embedded/fluidlauncher/fluidlauncher.pro b/demos/embedded/fluidlauncher/fluidlauncher.pro
index 76d12ad..3ed4f31 100644
--- a/demos/embedded/fluidlauncher/fluidlauncher.pro
+++ b/demos/embedded/fluidlauncher/fluidlauncher.pro
@@ -1,8 +1,7 @@
TEMPLATE = app
-TARGET =
+TARGET =
DEPENDPATH += .
INCLUDEPATH += .
-QT += xml
# Input
HEADERS += \
@@ -40,7 +39,8 @@ wince*{
$$QT_BUILD_TREE/demos/pathstroke/$${BUILD_DIR}/pathstroke.exe \
$$QT_BUILD_TREE/examples/graphicsview/elasticnodes/$${BUILD_DIR}/elasticnodes.exe \
$$QT_BUILD_TREE/examples/widgets/wiggly/$${BUILD_DIR}/wiggly.exe \
- $$QT_BUILD_TREE/examples/painting/concentriccircles/$${BUILD_DIR}/concentriccircles.exe
+ $$QT_BUILD_TREE/examples/painting/concentriccircles/$${BUILD_DIR}/concentriccircles.exe \
+ $$QT_BUILD_TREE/examples/draganddrop/$${BUILD_DIR}/fridgemagnets.exe
executables.path = .
@@ -54,3 +54,121 @@ wince*{
DEPLOYMENT_PLUGIN += qgif qjpeg qmng qsvg
}
+
+symbian {
+ load(data_caging_paths)
+
+ TARGET.UID3 = 0xA000A641
+
+ executables.sources = \
+ styledemo.exe \
+ deform.exe \
+ pathstroke.exe \
+ wiggly.exe \
+ ftp.exe \
+ saxbookmarks.exe \
+ desktopservices.exe \
+ fridgemagnets.exe \
+ drilldown.exe \
+ softkeys.exe \
+ raycasting.exe \
+ flickable.exe \
+ digiflip.exe \
+ lightmaps.exe \
+ flightinfo.exe
+
+ executables.path = /sys/bin
+
+ reg_resource.sources = \
+ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/styledemo_reg.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/deform_reg.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/pathstroke_reg.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/wiggly_reg.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/ftp_reg.rsc\
+ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/saxbookmarks_reg.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/desktopservices_reg.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/fridgemagnets_reg.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/drilldown_reg.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/softkeys_reg.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/raycasting_reg.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/flickable_reg.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/digiflip_reg.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/lightmaps_reg.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/flightinfo_reg.rsc
+
+ reg_resource.path = $$REG_RESOURCE_IMPORT_DIR
+
+ resource.sources = \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/styledemo.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/deform.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/pathstroke.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/wiggly.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/ftp.rsc\
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/saxbookmarks.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/desktopservices.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/fridgemagnets.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/drilldown.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/softkeys.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/raycasting.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/flickable.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/digiflip.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/lightmaps.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/flightinfo.rsc
+
+
+ resource.path = $$APP_RESOURCE_DIR
+
+ contains(QT_CONFIG, svg) {
+ executables.sources += \
+ embeddedsvgviewer.exe \
+ weatherinfo.exe
+
+ reg_resource.sources += \
+ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/embeddedsvgviewer_reg.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/weatherinfo_reg.rsc
+
+ resource.sources += \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/embeddedsvgviewer.rsc \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/weatherinfo.rsc
+ }
+ contains(QT_CONFIG, webkit) {
+ executables.sources += anomaly.exe
+ reg_resource.sources += $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/anomaly_reg.rsc
+ resource.sources += $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/anomaly.rsc
+ }
+ contains(QT_CONFIG, script) {
+ executables.sources += context2d.exe
+ reg_resource.sources += $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/context2d_reg.rsc
+ resource.sources += $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/context2d.rsc
+ }
+
+ mifs.sources = \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/0xA000C611.mif
+ mifs.path = $$APP_RESOURCE_DIR
+
+ files.sources = $$PWD/screenshots $$PWD/slides
+ files.path = .
+
+ config.sources = $$PWD/config_s60/config.xml
+ config.path = .
+
+ viewerimages.sources = $$PWD/../embeddedsvgviewer/shapes.svg
+ viewerimages.path = /data/images/qt/demos/embeddedsvgviewer
+
+ desktopservices_music.sources = \
+ $$PWD/../desktopservices/data/*.mp3 \
+ $$PWD/../desktopservices/data/*.wav
+ desktopservices_music.path = /data/sounds
+
+ desktopservices_images.sources = $$PWD/../desktopservices/data/*.png
+ desktopservices_images.path = /data/images
+
+ saxbookmarks.sources = $$PWD/../../../examples/xml/saxbookmarks/frank.xbel
+ saxbookmarks.sources += $$PWD/../../../examples/xml/saxbookmarks/jennifer.xbel
+ saxbookmarks.path = /data/qt/saxbookmarks
+
+ DEPLOYMENT += config files executables viewerimages saxbookmarks reg_resource resource \
+ mifs desktopservices_music desktopservices_images
+
+ TARGET.EPOCHEAPSIZE = 100000 20000000
+}
diff --git a/demos/embedded/fluidlauncher/main.cpp b/demos/embedded/fluidlauncher/main.cpp
index 4fa5565..af693cc 100644
--- a/demos/embedded/fluidlauncher/main.cpp
+++ b/demos/embedded/fluidlauncher/main.cpp
@@ -1,7 +1,6 @@
/****************************************************************************
**
** 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 demonstration applications of the Qt Toolkit.
@@ -21,9 +20,10 @@
** 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/demos/embedded/fluidlauncher/pictureflow.cpp b/demos/embedded/fluidlauncher/pictureflow.cpp
index 52cb25d..293ef99 100644
--- a/demos/embedded/fluidlauncher/pictureflow.cpp
+++ b/demos/embedded/fluidlauncher/pictureflow.cpp
@@ -1,7 +1,6 @@
/****************************************************************************
**
** 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 ActiveQt framework of the Qt Toolkit.
@@ -83,6 +82,14 @@
#include <QDebug>
+static const int captionFontSize =
+#ifdef Q_WS_S60
+ 8;
+#else
+ 14;
+#endif
+
+
// uncomment this to enable bilinear filtering for texture mapping
// gives much better rendering, at the cost of memory space
// #define PICTUREFLOW_BILINEAR_FILTER
@@ -135,134 +142,134 @@ inline PFreal floatToFixed(float val)
// warning: regenerate the table if IANGLE_MAX and PFREAL_SHIFT are changed!
static const PFreal sinTable[IANGLE_MAX] = {
- 3, 9, 15, 21, 28, 34, 40, 47,
- 53, 59, 65, 72, 78, 84, 90, 97,
- 103, 109, 115, 122, 128, 134, 140, 147,
- 153, 159, 165, 171, 178, 184, 190, 196,
- 202, 209, 215, 221, 227, 233, 239, 245,
- 251, 257, 264, 270, 276, 282, 288, 294,
- 300, 306, 312, 318, 324, 330, 336, 342,
- 347, 353, 359, 365, 371, 377, 383, 388,
- 394, 400, 406, 412, 417, 423, 429, 434,
- 440, 446, 451, 457, 463, 468, 474, 479,
- 485, 491, 496, 501, 507, 512, 518, 523,
- 529, 534, 539, 545, 550, 555, 561, 566,
- 571, 576, 581, 587, 592, 597, 602, 607,
- 612, 617, 622, 627, 632, 637, 642, 647,
- 652, 656, 661, 666, 671, 675, 680, 685,
- 690, 694, 699, 703, 708, 712, 717, 721,
- 726, 730, 735, 739, 743, 748, 752, 756,
- 760, 765, 769, 773, 777, 781, 785, 789,
- 793, 797, 801, 805, 809, 813, 816, 820,
- 824, 828, 831, 835, 839, 842, 846, 849,
- 853, 856, 860, 863, 866, 870, 873, 876,
- 879, 883, 886, 889, 892, 895, 898, 901,
- 904, 907, 910, 913, 916, 918, 921, 924,
- 927, 929, 932, 934, 937, 939, 942, 944,
- 947, 949, 951, 954, 956, 958, 960, 963,
- 965, 967, 969, 971, 973, 975, 977, 978,
- 980, 982, 984, 986, 987, 989, 990, 992,
- 994, 995, 997, 998, 999, 1001, 1002, 1003,
- 1004, 1006, 1007, 1008, 1009, 1010, 1011, 1012,
- 1013, 1014, 1015, 1015, 1016, 1017, 1018, 1018,
- 1019, 1019, 1020, 1020, 1021, 1021, 1022, 1022,
- 1022, 1023, 1023, 1023, 1023, 1023, 1023, 1023,
- 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1022,
- 1022, 1022, 1021, 1021, 1020, 1020, 1019, 1019,
- 1018, 1018, 1017, 1016, 1015, 1015, 1014, 1013,
- 1012, 1011, 1010, 1009, 1008, 1007, 1006, 1004,
- 1003, 1002, 1001, 999, 998, 997, 995, 994,
- 992, 990, 989, 987, 986, 984, 982, 980,
- 978, 977, 975, 973, 971, 969, 967, 965,
- 963, 960, 958, 956, 954, 951, 949, 947,
- 944, 942, 939, 937, 934, 932, 929, 927,
- 924, 921, 918, 916, 913, 910, 907, 904,
- 901, 898, 895, 892, 889, 886, 883, 879,
- 876, 873, 870, 866, 863, 860, 856, 853,
- 849, 846, 842, 839, 835, 831, 828, 824,
- 820, 816, 813, 809, 805, 801, 797, 793,
- 789, 785, 781, 777, 773, 769, 765, 760,
- 756, 752, 748, 743, 739, 735, 730, 726,
- 721, 717, 712, 708, 703, 699, 694, 690,
- 685, 680, 675, 671, 666, 661, 656, 652,
- 647, 642, 637, 632, 627, 622, 617, 612,
- 607, 602, 597, 592, 587, 581, 576, 571,
- 566, 561, 555, 550, 545, 539, 534, 529,
- 523, 518, 512, 507, 501, 496, 491, 485,
- 479, 474, 468, 463, 457, 451, 446, 440,
- 434, 429, 423, 417, 412, 406, 400, 394,
- 388, 383, 377, 371, 365, 359, 353, 347,
- 342, 336, 330, 324, 318, 312, 306, 300,
- 294, 288, 282, 276, 270, 264, 257, 251,
- 245, 239, 233, 227, 221, 215, 209, 202,
- 196, 190, 184, 178, 171, 165, 159, 153,
- 147, 140, 134, 128, 122, 115, 109, 103,
- 97, 90, 84, 78, 72, 65, 59, 53,
- 47, 40, 34, 28, 21, 15, 9, 3,
- -4, -10, -16, -22, -29, -35, -41, -48,
- -54, -60, -66, -73, -79, -85, -91, -98,
- -104, -110, -116, -123, -129, -135, -141, -148,
- -154, -160, -166, -172, -179, -185, -191, -197,
- -203, -210, -216, -222, -228, -234, -240, -246,
- -252, -258, -265, -271, -277, -283, -289, -295,
- -301, -307, -313, -319, -325, -331, -337, -343,
- -348, -354, -360, -366, -372, -378, -384, -389,
- -395, -401, -407, -413, -418, -424, -430, -435,
- -441, -447, -452, -458, -464, -469, -475, -480,
- -486, -492, -497, -502, -508, -513, -519, -524,
- -530, -535, -540, -546, -551, -556, -562, -567,
- -572, -577, -582, -588, -593, -598, -603, -608,
- -613, -618, -623, -628, -633, -638, -643, -648,
- -653, -657, -662, -667, -672, -676, -681, -686,
- -691, -695, -700, -704, -709, -713, -718, -722,
- -727, -731, -736, -740, -744, -749, -753, -757,
- -761, -766, -770, -774, -778, -782, -786, -790,
- -794, -798, -802, -806, -810, -814, -817, -821,
- -825, -829, -832, -836, -840, -843, -847, -850,
- -854, -857, -861, -864, -867, -871, -874, -877,
- -880, -884, -887, -890, -893, -896, -899, -902,
- -905, -908, -911, -914, -917, -919, -922, -925,
- -928, -930, -933, -935, -938, -940, -943, -945,
- -948, -950, -952, -955, -957, -959, -961, -964,
- -966, -968, -970, -972, -974, -976, -978, -979,
- -981, -983, -985, -987, -988, -990, -991, -993,
- -995, -996, -998, -999, -1000, -1002, -1003, -1004,
- -1005, -1007, -1008, -1009, -1010, -1011, -1012, -1013,
- -1014, -1015, -1016, -1016, -1017, -1018, -1019, -1019,
- -1020, -1020, -1021, -1021, -1022, -1022, -1023, -1023,
- -1023, -1024, -1024, -1024, -1024, -1024, -1024, -1024,
- -1024, -1024, -1024, -1024, -1024, -1024, -1024, -1023,
- -1023, -1023, -1022, -1022, -1021, -1021, -1020, -1020,
- -1019, -1019, -1018, -1017, -1016, -1016, -1015, -1014,
- -1013, -1012, -1011, -1010, -1009, -1008, -1007, -1005,
- -1004, -1003, -1002, -1000, -999, -998, -996, -995,
- -993, -991, -990, -988, -987, -985, -983, -981,
- -979, -978, -976, -974, -972, -970, -968, -966,
- -964, -961, -959, -957, -955, -952, -950, -948,
- -945, -943, -940, -938, -935, -933, -930, -928,
- -925, -922, -919, -917, -914, -911, -908, -905,
- -902, -899, -896, -893, -890, -887, -884, -880,
- -877, -874, -871, -867, -864, -861, -857, -854,
- -850, -847, -843, -840, -836, -832, -829, -825,
- -821, -817, -814, -810, -806, -802, -798, -794,
- -790, -786, -782, -778, -774, -770, -766, -761,
- -757, -753, -749, -744, -740, -736, -731, -727,
- -722, -718, -713, -709, -704, -700, -695, -691,
- -686, -681, -676, -672, -667, -662, -657, -653,
- -648, -643, -638, -633, -628, -623, -618, -613,
- -608, -603, -598, -593, -588, -582, -577, -572,
- -567, -562, -556, -551, -546, -540, -535, -530,
- -524, -519, -513, -508, -502, -497, -492, -486,
- -480, -475, -469, -464, -458, -452, -447, -441,
- -435, -430, -424, -418, -413, -407, -401, -395,
- -389, -384, -378, -372, -366, -360, -354, -348,
- -343, -337, -331, -325, -319, -313, -307, -301,
- -295, -289, -283, -277, -271, -265, -258, -252,
- -246, -240, -234, -228, -222, -216, -210, -203,
- -197, -191, -185, -179, -172, -166, -160, -154,
- -148, -141, -135, -129, -123, -116, -110, -104,
- -98, -91, -85, -79, -73, -66, -60, -54,
- -48, -41, -35, -29, -22, -16, -10, -4
+ 3, 9, 15, 21, 28, 34, 40, 47,
+ 53, 59, 65, 72, 78, 84, 90, 97,
+ 103, 109, 115, 122, 128, 134, 140, 147,
+ 153, 159, 165, 171, 178, 184, 190, 196,
+ 202, 209, 215, 221, 227, 233, 239, 245,
+ 251, 257, 264, 270, 276, 282, 288, 294,
+ 300, 306, 312, 318, 324, 330, 336, 342,
+ 347, 353, 359, 365, 371, 377, 383, 388,
+ 394, 400, 406, 412, 417, 423, 429, 434,
+ 440, 446, 451, 457, 463, 468, 474, 479,
+ 485, 491, 496, 501, 507, 512, 518, 523,
+ 529, 534, 539, 545, 550, 555, 561, 566,
+ 571, 576, 581, 587, 592, 597, 602, 607,
+ 612, 617, 622, 627, 632, 637, 642, 647,
+ 652, 656, 661, 666, 671, 675, 680, 685,
+ 690, 694, 699, 703, 708, 712, 717, 721,
+ 726, 730, 735, 739, 743, 748, 752, 756,
+ 760, 765, 769, 773, 777, 781, 785, 789,
+ 793, 797, 801, 805, 809, 813, 816, 820,
+ 824, 828, 831, 835, 839, 842, 846, 849,
+ 853, 856, 860, 863, 866, 870, 873, 876,
+ 879, 883, 886, 889, 892, 895, 898, 901,
+ 904, 907, 910, 913, 916, 918, 921, 924,
+ 927, 929, 932, 934, 937, 939, 942, 944,
+ 947, 949, 951, 954, 956, 958, 960, 963,
+ 965, 967, 969, 971, 973, 975, 977, 978,
+ 980, 982, 984, 986, 987, 989, 990, 992,
+ 994, 995, 997, 998, 999, 1001, 1002, 1003,
+ 1004, 1006, 1007, 1008, 1009, 1010, 1011, 1012,
+ 1013, 1014, 1015, 1015, 1016, 1017, 1018, 1018,
+ 1019, 1019, 1020, 1020, 1021, 1021, 1022, 1022,
+ 1022, 1023, 1023, 1023, 1023, 1023, 1023, 1023,
+ 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1022,
+ 1022, 1022, 1021, 1021, 1020, 1020, 1019, 1019,
+ 1018, 1018, 1017, 1016, 1015, 1015, 1014, 1013,
+ 1012, 1011, 1010, 1009, 1008, 1007, 1006, 1004,
+ 1003, 1002, 1001, 999, 998, 997, 995, 994,
+ 992, 990, 989, 987, 986, 984, 982, 980,
+ 978, 977, 975, 973, 971, 969, 967, 965,
+ 963, 960, 958, 956, 954, 951, 949, 947,
+ 944, 942, 939, 937, 934, 932, 929, 927,
+ 924, 921, 918, 916, 913, 910, 907, 904,
+ 901, 898, 895, 892, 889, 886, 883, 879,
+ 876, 873, 870, 866, 863, 860, 856, 853,
+ 849, 846, 842, 839, 835, 831, 828, 824,
+ 820, 816, 813, 809, 805, 801, 797, 793,
+ 789, 785, 781, 777, 773, 769, 765, 760,
+ 756, 752, 748, 743, 739, 735, 730, 726,
+ 721, 717, 712, 708, 703, 699, 694, 690,
+ 685, 680, 675, 671, 666, 661, 656, 652,
+ 647, 642, 637, 632, 627, 622, 617, 612,
+ 607, 602, 597, 592, 587, 581, 576, 571,
+ 566, 561, 555, 550, 545, 539, 534, 529,
+ 523, 518, 512, 507, 501, 496, 491, 485,
+ 479, 474, 468, 463, 457, 451, 446, 440,
+ 434, 429, 423, 417, 412, 406, 400, 394,
+ 388, 383, 377, 371, 365, 359, 353, 347,
+ 342, 336, 330, 324, 318, 312, 306, 300,
+ 294, 288, 282, 276, 270, 264, 257, 251,
+ 245, 239, 233, 227, 221, 215, 209, 202,
+ 196, 190, 184, 178, 171, 165, 159, 153,
+ 147, 140, 134, 128, 122, 115, 109, 103,
+ 97, 90, 84, 78, 72, 65, 59, 53,
+ 47, 40, 34, 28, 21, 15, 9, 3,
+ -4, -10, -16, -22, -29, -35, -41, -48,
+ -54, -60, -66, -73, -79, -85, -91, -98,
+ -104, -110, -116, -123, -129, -135, -141, -148,
+ -154, -160, -166, -172, -179, -185, -191, -197,
+ -203, -210, -216, -222, -228, -234, -240, -246,
+ -252, -258, -265, -271, -277, -283, -289, -295,
+ -301, -307, -313, -319, -325, -331, -337, -343,
+ -348, -354, -360, -366, -372, -378, -384, -389,
+ -395, -401, -407, -413, -418, -424, -430, -435,
+ -441, -447, -452, -458, -464, -469, -475, -480,
+ -486, -492, -497, -502, -508, -513, -519, -524,
+ -530, -535, -540, -546, -551, -556, -562, -567,
+ -572, -577, -582, -588, -593, -598, -603, -608,
+ -613, -618, -623, -628, -633, -638, -643, -648,
+ -653, -657, -662, -667, -672, -676, -681, -686,
+ -691, -695, -700, -704, -709, -713, -718, -722,
+ -727, -731, -736, -740, -744, -749, -753, -757,
+ -761, -766, -770, -774, -778, -782, -786, -790,
+ -794, -798, -802, -806, -810, -814, -817, -821,
+ -825, -829, -832, -836, -840, -843, -847, -850,
+ -854, -857, -861, -864, -867, -871, -874, -877,
+ -880, -884, -887, -890, -893, -896, -899, -902,
+ -905, -908, -911, -914, -917, -919, -922, -925,
+ -928, -930, -933, -935, -938, -940, -943, -945,
+ -948, -950, -952, -955, -957, -959, -961, -964,
+ -966, -968, -970, -972, -974, -976, -978, -979,
+ -981, -983, -985, -987, -988, -990, -991, -993,
+ -995, -996, -998, -999, -1000, -1002, -1003, -1004,
+ -1005, -1007, -1008, -1009, -1010, -1011, -1012, -1013,
+ -1014, -1015, -1016, -1016, -1017, -1018, -1019, -1019,
+ -1020, -1020, -1021, -1021, -1022, -1022, -1023, -1023,
+ -1023, -1024, -1024, -1024, -1024, -1024, -1024, -1024,
+ -1024, -1024, -1024, -1024, -1024, -1024, -1024, -1023,
+ -1023, -1023, -1022, -1022, -1021, -1021, -1020, -1020,
+ -1019, -1019, -1018, -1017, -1016, -1016, -1015, -1014,
+ -1013, -1012, -1011, -1010, -1009, -1008, -1007, -1005,
+ -1004, -1003, -1002, -1000, -999, -998, -996, -995,
+ -993, -991, -990, -988, -987, -985, -983, -981,
+ -979, -978, -976, -974, -972, -970, -968, -966,
+ -964, -961, -959, -957, -955, -952, -950, -948,
+ -945, -943, -940, -938, -935, -933, -930, -928,
+ -925, -922, -919, -917, -914, -911, -908, -905,
+ -902, -899, -896, -893, -890, -887, -884, -880,
+ -877, -874, -871, -867, -864, -861, -857, -854,
+ -850, -847, -843, -840, -836, -832, -829, -825,
+ -821, -817, -814, -810, -806, -802, -798, -794,
+ -790, -786, -782, -778, -774, -770, -766, -761,
+ -757, -753, -749, -744, -740, -736, -731, -727,
+ -722, -718, -713, -709, -704, -700, -695, -691,
+ -686, -681, -676, -672, -667, -662, -657, -653,
+ -648, -643, -638, -633, -628, -623, -618, -613,
+ -608, -603, -598, -593, -588, -582, -577, -572,
+ -567, -562, -556, -551, -546, -540, -535, -530,
+ -524, -519, -513, -508, -502, -497, -492, -486,
+ -480, -475, -469, -464, -458, -452, -447, -441,
+ -435, -430, -424, -418, -413, -407, -401, -395,
+ -389, -384, -378, -372, -366, -360, -354, -348,
+ -343, -337, -331, -325, -319, -313, -307, -301,
+ -295, -289, -283, -277, -271, -265, -258, -252,
+ -246, -240, -234, -228, -222, -216, -210, -203,
+ -197, -191, -185, -179, -172, -166, -160, -154,
+ -148, -141, -135, -129, -123, -116, -110, -104,
+ -98, -91, -85, -79, -73, -66, -60, -54,
+ -48, -41, -35, -29, -22, -16, -10, -4
};
// this is the program the generate the above table
@@ -305,7 +312,7 @@ inline PFreal fsin(int iangle)
while(iangle < 0)
iangle += IANGLE_MAX;
return sinTable[iangle & IANGLE_MASK];
-}
+}
inline PFreal fcos(int iangle)
{
@@ -421,7 +428,7 @@ PictureFlowPrivate::PictureFlowPrivate(PictureFlow* w)
triggerTimer.setSingleShot(true);
triggerTimer.setInterval(0);
QObject::connect(&triggerTimer, SIGNAL(timeout()), widget, SLOT(render()));
-
+
recalc(200, 200);
resetSlides();
}
@@ -480,7 +487,7 @@ void PictureFlowPrivate::setSlide(int index, const QImage& image)
slideImages[index] = image;
surfaceCache.remove(index);
triggerRender();
- }
+ }
}
int PictureFlowPrivate::getTarget() const
@@ -491,7 +498,7 @@ int PictureFlowPrivate::getTarget() const
int PictureFlowPrivate::currentSlide() const
{
return centerIndex;
-}
+}
void PictureFlowPrivate::setCurrentSlide(int index)
{
@@ -600,7 +607,7 @@ static QImage prepareSurface(QImage img, int w, int h)
int hofs = h / 3;
// offscreen buffer: black is sweet
- QImage result(hs, w, QImage::Format_RGB16);
+ QImage result(hs, w, QImage::Format_RGB16);
result.fill(0);
// transpose the image, this is to speed-up the rendering
@@ -677,7 +684,7 @@ QImage* PictureFlowPrivate::surface(int slideIndex)
}
-// Schedules rendering the slides. Call this function to avoid immediate
+// Schedules rendering the slides. Call this function to avoid immediate
// render and thus cause less flicker.
void PictureFlowPrivate::triggerRender()
{
@@ -705,7 +712,7 @@ void PictureFlowPrivate::render()
QRect rs = renderSlide(leftSlides[index], alpha, 0, c1-1);
if(!rs.isEmpty())
c1 = rs.left();
- }
+ }
for(int index = 0; index < nright-1; index++)
{
int alpha = (index < nright-2) ? 256 : 128;
@@ -717,14 +724,14 @@ void PictureFlowPrivate::render()
QPainter painter;
painter.begin(&buffer);
- QFont font("Arial", 14);
+ QFont font("Arial", captionFontSize);
font.setBold(true);
painter.setFont(font);
painter.setPen(Qt::white);
//painter.setPen(QColor(255,255,255,127));
if (!captions.isEmpty())
- painter.drawText( QRect(0,0, buffer.width(), (buffer.height() - slideSize().height())/2),
+ painter.drawText( QRect(0,0, buffer.width(), (buffer.height() - slideSize().height())/4),
Qt::AlignCenter, captions[centerIndex]);
painter.end();
@@ -747,7 +754,7 @@ void PictureFlowPrivate::render()
c1 = rs.left();
alpha = (step > 0) ? 256-fade/2 : 256;
- }
+ }
for(int index = 0; index < nright; index++)
{
int alpha = (index < nright-2) ? 256 : 128;
@@ -762,26 +769,23 @@ void PictureFlowPrivate::render()
c2 = rs.right();
}
-
-
QPainter painter;
painter.begin(&buffer);
- QFont font("Arial", 14);
+ QFont font("Arial", captionFontSize);
font.setBold(true);
painter.setFont(font);
int leftTextIndex = (step>0) ? centerIndex : centerIndex-1;
painter.setPen(QColor(255,255,255, (255-fade) ));
- painter.drawText( QRect(0,0, buffer.width(), (buffer.height() - slideSize().height())/2),
+ painter.drawText( QRect(0,0, buffer.width(), (buffer.height() - slideSize().height())/4),
Qt::AlignCenter, captions[leftTextIndex]);
painter.setPen(QColor(255,255,255, fade));
- painter.drawText( QRect(0,0, buffer.width(), (buffer.height() - slideSize().height())/2),
+ painter.drawText( QRect(0,0, buffer.width(), (buffer.height() - slideSize().height())/4),
Qt::AlignCenter, captions[leftTextIndex+1]);
-
painter.end();
}
}
@@ -811,8 +815,8 @@ int col1, int col2)
if(!src)
return QRect();
- QRect rect(0, 0, 0, 0);
-
+ QRect rect(0, 0, 0, 0);
+
#ifdef PICTUREFLOW_BILINEAR_FILTER
int sw = src->height() / BILINEAR_STRETCH_HOR;
int sh = src->width() / BILINEAR_STRETCH_VER;
@@ -877,10 +881,10 @@ int col1, int col2)
if(column < 0)
continue;
- rect.setRight(x);
+ rect.setRight(x);
if(!flag)
rect.setLeft(x);
- flag = true;
+ flag = true;
int y1 = h/2;
int y2 = y1+ 1;
@@ -910,7 +914,7 @@ int col1, int col2)
y2++;
pixel1 -= pixelstep;
pixel2 += pixelstep;
- }
+ }
else
while((y1 >= 0) && (y2 < h) && (p1 >= 0))
{
@@ -936,8 +940,8 @@ int col1, int col2)
y2++;
pixel1 -= pixelstep;
pixel2 += pixelstep;
- }
- }
+ }
+ }
rect.setTop(0);
rect.setBottom(h-1);
@@ -1015,7 +1019,7 @@ void PictureFlowPrivate::updateAnimation()
const int max = 2 * 65536;
int fi = slideFrame;
- fi -= (target << 16);
+ fi -= (target << 16);
if(fi < 0)
fi = -fi;
fi = qMin(fi, max);
@@ -1030,7 +1034,7 @@ void PictureFlowPrivate::updateAnimation()
int pos = slideFrame & 0xffff;
int neg = 65536 - pos;
int tick = (step < 0) ? neg : pos;
- PFreal ftick = (tick * PFREAL_ONE) >> 16;
+ PFreal ftick = (tick * PFREAL_ONE) >> 16;
// the leftmost and rightmost slide must fade away
fade = pos / 256;
@@ -1060,7 +1064,7 @@ void PictureFlowPrivate::updateAnimation()
step = 0;
fade = 256;
return;
- }
+ }
for(int i = 0; i < leftSlides.count(); i++)
{
@@ -1091,7 +1095,7 @@ void PictureFlowPrivate::updateAnimation()
leftSlides[0].angle = (pos * itilt) >> 16;
leftSlides[0].cx = -fmul(offsetX, ftick);
leftSlides[0].cy = fmul(offsetY, ftick);
- }
+ }
// must change direction ?
if(target < index) if(step > 0)
@@ -1127,7 +1131,7 @@ PictureFlow::PictureFlow(QWidget* parent): QWidget(parent)
PictureFlow::~PictureFlow()
{
delete d;
-}
+}
int PictureFlow::slideCount() const
{
@@ -1227,7 +1231,7 @@ void PictureFlow::keyPressEvent(QKeyEvent* event)
{
if(event->modifiers() == Qt::ControlModifier)
showSlide(currentSlide()-10);
- else
+ else
showPrevious();
event->accept();
return;
@@ -1243,6 +1247,12 @@ void PictureFlow::keyPressEvent(QKeyEvent* event)
return;
}
+ if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Select) {
+ emit itemActivated(d->getTarget());
+ event->accept();
+ return;
+ }
+
event->ignore();
}
@@ -1277,7 +1287,7 @@ void PictureFlow::mouseMoveEvent(QMouseEvent* event)
{
speed = ((qAbs(event->pos().x()-d->previousPos.x())*1000) / d->previousPosTimestamp.elapsed())
/ (d->buffer.width() / 10);
-
+
if (speed < SPEED_LOWER_THRESHOLD)
speed = SPEED_LOWER_THRESHOLD;
else if (speed > SPEED_UPPER_LIMIT)
@@ -1285,19 +1295,17 @@ void PictureFlow::mouseMoveEvent(QMouseEvent* event)
else {
speed = SPEED_LOWER_THRESHOLD + (speed / 3);
// qDebug() << "ACCELERATION ENABLED Speed = " << speed << ", Distance = " << distanceMovedSinceLastEvent;
-
}
}
-
// qDebug() << "Speed = " << speed;
// int incr = ((event->pos().x() - d->previousPos.x())/10) * speed;
-
+
// qDebug() << "Incremented by " << incr;
int incr = (distanceMovedSinceLastEvent * speed);
-
+
//qDebug() << "(distanceMovedSinceLastEvent * speed) = " << incr;
if (incr > d->pixelsToMovePerSlide*2) {
@@ -1327,8 +1335,6 @@ void PictureFlow::mouseMoveEvent(QMouseEvent* event)
d->pixelDistanceMoved = 0;
*/
}
-
-
}
d->previousPos = event->pos();
diff --git a/demos/embedded/fluidlauncher/pictureflow.h b/demos/embedded/fluidlauncher/pictureflow.h
index 5df0e5c..8fc145c 100644
--- a/demos/embedded/fluidlauncher/pictureflow.h
+++ b/demos/embedded/fluidlauncher/pictureflow.h
@@ -1,7 +1,6 @@
/****************************************************************************
**
** 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 ActiveQt framework of the Qt Toolkit.
@@ -36,6 +35,7 @@
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
+**
****************************************************************************/
/*
@@ -72,15 +72,15 @@
class PictureFlowPrivate;
/*!
- Class PictureFlow implements an image show widget with animation effect
- like Apple's CoverFlow (in iTunes and iPod). Images are arranged in form
- of slides, one main slide is shown at the center with few slides on
- the left and right sides of the center slide. When the next or previous
- slide is brought to the front, the whole slides flow to the right or
- the right with smooth animation effect; until the new slide is finally
+ Class PictureFlow implements an image show widget with animation effect
+ like Apple's CoverFlow (in iTunes and iPod). Images are arranged in form
+ of slides, one main slide is shown at the center with few slides on
+ the left and right sides of the center slide. When the next or previous
+ slide is brought to the front, the whole slides flow to the right or
+ the right with smooth animation effect; until the new slide is finally
placed at the center.
- */
+ */
class PictureFlow : public QWidget
{
Q_OBJECT
@@ -93,7 +93,7 @@ Q_OBJECT
public:
/*!
Creates a new PictureFlow widget.
- */
+ */
PictureFlow(QWidget* parent = 0);
/*!
@@ -113,17 +113,17 @@ public:
/*!
Returns the dimension of each slide (in pixels).
- */
+ */
QSize slideSize() const;
/*!
Sets the dimension of each slide (in pixels).
- */
+ */
void setSlideSize(QSize size);
/*!
Sets the zoom factor (in percent).
- */
+ */
void setZoomFactor(int zoom);
/*!
@@ -140,13 +140,13 @@ public:
Returns QImage of specified slide.
This function will be called only whenever necessary, e.g. the 100th slide
will not be retrived when only the first few slides are visible.
- */
+ */
virtual QImage slide(int index) const;
/*!
Sets an image for specified slide. If the slide already exists,
it will be replaced.
- */
+ */
virtual void setSlide(int index, const QImage& image);
virtual void setSlideCaption(int index, QString caption);
@@ -154,20 +154,20 @@ public:
/*!
Sets a pixmap for specified slide. If the slide already exists,
it will be replaced.
- */
+ */
virtual void setSlide(int index, const QPixmap& pixmap);
/*!
Returns the index of slide currently shown in the middle of the viewport.
- */
+ */
int currentSlide() const;
public slots:
/*!
- Sets slide to be shown in the middle of the viewport. No animation
+ Sets slide to be shown in the middle of the viewport. No animation
effect will be produced, unlike using showSlide.
- */
+ */
void setCurrentSlide(int index);
/*!
diff --git a/demos/embedded/fluidlauncher/screenshots/anomaly_s60.png b/demos/embedded/fluidlauncher/screenshots/anomaly_s60.png
new file mode 100644
index 0000000..8d537f4
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/anomaly_s60.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/context2d_s60.png b/demos/embedded/fluidlauncher/screenshots/context2d_s60.png
new file mode 100644
index 0000000..c7225c7
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/context2d_s60.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/desktopservices_s60.png b/demos/embedded/fluidlauncher/screenshots/desktopservices_s60.png
new file mode 100644
index 0000000..a429be3
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/desktopservices_s60.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/digiflip.png b/demos/embedded/fluidlauncher/screenshots/digiflip.png
new file mode 100644
index 0000000..117b61b
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/digiflip.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/drilldown_s60.png b/demos/embedded/fluidlauncher/screenshots/drilldown_s60.png
new file mode 100644
index 0000000..d4fd44f
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/drilldown_s60.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/embeddedsvgviewer_s60.png b/demos/embedded/fluidlauncher/screenshots/embeddedsvgviewer_s60.png
new file mode 100644
index 0000000..74f4ad1
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/embeddedsvgviewer_s60.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/flickable.png b/demos/embedded/fluidlauncher/screenshots/flickable.png
new file mode 100644
index 0000000..7080fc1
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/flickable.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/flightinfo_s60.png b/demos/embedded/fluidlauncher/screenshots/flightinfo_s60.png
new file mode 100644
index 0000000..8a304eb
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/flightinfo_s60.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/fridgemagnets_s60.png b/demos/embedded/fluidlauncher/screenshots/fridgemagnets_s60.png
new file mode 100644
index 0000000..d31875d
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/fridgemagnets_s60.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/ftp_s60.png b/demos/embedded/fluidlauncher/screenshots/ftp_s60.png
new file mode 100644
index 0000000..5858daf
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/ftp_s60.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/lightmaps.png b/demos/embedded/fluidlauncher/screenshots/lightmaps.png
new file mode 100644
index 0000000..7cbe2e4
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/lightmaps.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/raycasting.png b/demos/embedded/fluidlauncher/screenshots/raycasting.png
new file mode 100644
index 0000000..d3c86e9
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/raycasting.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/saxbookmarks_s60.png b/demos/embedded/fluidlauncher/screenshots/saxbookmarks_s60.png
new file mode 100644
index 0000000..54b6321
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/saxbookmarks_s60.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/softkeys_s60.png b/demos/embedded/fluidlauncher/screenshots/softkeys_s60.png
new file mode 100644
index 0000000..df090e2
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/softkeys_s60.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/styledemo_s60.png b/demos/embedded/fluidlauncher/screenshots/styledemo_s60.png
new file mode 100644
index 0000000..57480fb
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/styledemo_s60.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/weatherinfo.png b/demos/embedded/fluidlauncher/screenshots/weatherinfo.png
new file mode 100644
index 0000000..b18608d
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/weatherinfo.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/wiggly_s60.png b/demos/embedded/fluidlauncher/screenshots/wiggly_s60.png
new file mode 100644
index 0000000..9c4cab3
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/wiggly_s60.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/slideshow.cpp b/demos/embedded/fluidlauncher/slideshow.cpp
index a397c2b..6c2ab40 100644
--- a/demos/embedded/fluidlauncher/slideshow.cpp
+++ b/demos/embedded/fluidlauncher/slideshow.cpp
@@ -1,7 +1,6 @@
/****************************************************************************
**
** 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 demonstration applications of the Qt Toolkit.
@@ -21,9 +20,10 @@
** 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/demos/embedded/fluidlauncher/slideshow.h b/demos/embedded/fluidlauncher/slideshow.h
index 6d51662..874aa5e 100644
--- a/demos/embedded/fluidlauncher/slideshow.h
+++ b/demos/embedded/fluidlauncher/slideshow.h
@@ -1,7 +1,6 @@
/****************************************************************************
**
** 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 demonstration applications of the Qt Toolkit.
@@ -21,9 +20,10 @@
** 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.