# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1272878699 -10800 # Node ID 4e8ebe173323145343555c5edcc4623d5d4d0064 # Parent cdae8c6c3876d27efdb3132e1a2f9f9a8f28e0a9 Revision: 201015 Kit: 201018 diff -r cdae8c6c3876 -r 4e8ebe173323 homescreen.pro --- a/homescreen.pro Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreen.pro Mon May 03 12:24:59 2010 +0300 @@ -17,8 +17,6 @@ TEMPLATE = subdirs SUBDIRS = homescreenapp -SUBDIRS += taskswitcherapp - -screensaver:SUBDIRS += screensaverapp +symbian:SUBDIRS += taskswitcherapp CONFIG += ordered diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/common.pri --- a/homescreenapp/common.pri Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/common.pri Mon May 03 12:24:59 2010 +0300 @@ -103,7 +103,12 @@ message(Remove "contains(MOBILITY, serviceframework)" after the QtSF refactorig is done!) !contains(MOBILITY, serviceframework):qtplugins.sources += resource/$${TARGET}.manifest - contains(MOBILITY, serviceframework):BLD_INF_RULES.prj_exports += "resource/$${TARGET}.xml z:$$qtplugins.path/$${TARGET}.xml" + + hs_public_plugin { + contains(MOBILITY, serviceframework):BLD_INF_RULES.prj_exports += "resource/$${TARGET}.xml z:/private/20022F35/$${TARGET}.xml" + } else { + contains(MOBILITY, serviceframework):BLD_INF_RULES.prj_exports += "resource/$${TARGET}.xml z:$$qtplugins.path/$${TARGET}.xml" + } for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin z:$$qtplugins.path/$$basename(qtplugin)" } diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/contentpublishclient/contentpublishclient.pro --- a/homescreenapp/examples/contentpublishclient/contentpublishclient.pro Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/examples/contentpublishclient/contentpublishclient.pro Mon May 03 12:24:59 2010 +0300 @@ -36,6 +36,12 @@ TARGET.CAPABILITY = CAP_APPLICATION AllFiles TrustedUI TARGET.EPOCHEAPSIZE = 0x20000 0x1000000 // 128kB - 16MB LIBS += -lefsrv + + testwallpaperimages.path = /data/images/kqtihswallpapers + testwallpaperimages.sources += ./resource/*.jpg + + DEPLOYMENT += testwallpaperimages + } else { error("Only Symbian supported!") } \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/contentpublishclient/inc/contentpublishclient.h --- a/homescreenapp/examples/contentpublishclient/inc/contentpublishclient.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/examples/contentpublishclient/inc/contentpublishclient.h Mon May 03 12:24:59 2010 +0300 @@ -31,9 +31,16 @@ bool load(); public slots: - void addWidget(); + void addHelloworldWidget(); + void addClockWidget(); + void setWallpaper1(); + void setWallpaper2(); +protected: + bool addWidget(QString widgetUri); + bool setWallpaper(QString fileName); + private: QObject* mService; QServiceManager* mManager; -}; \ No newline at end of file +}; diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/contentpublishclient/resource/testwallpaper.jpg Binary file homescreenapp/examples/contentpublishclient/resource/testwallpaper.jpg has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/contentpublishclient/resource/testwallpaper2.jpg Binary file homescreenapp/examples/contentpublishclient/resource/testwallpaper2.jpg has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/contentpublishclient/sis/contentpublishclient.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/contentpublishclient/sis/contentpublishclient.bat Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,30 @@ +@rem +@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +@rem All rights reserved. +@rem This component and the accompanying materials are made available +@rem under the terms of "Eclipse Public License v1.0" +@rem which accompanies this distribution, and is available +@rem at the URL "http://www.eclipse.org/legal/epl-v10.html". +@rem +@rem Initial Contributors: +@rem Nokia Corporation - initial contribution. +@rem +@rem Contributors: +@rem +@rem Description: +@rem +@echo off + +if exist contentpublishclient.sisx del contentpublishclient.sisx + +makesis contentpublishclient.pkg +signsis contentpublishclient.sis contentpublishclient.sisx ../../../sis/rd.cer ../../../sis/rd-key.pem + +if exist contentpublishclient.sisx ( +echo contentpublishclient.sisx creation SUCCEEDED +del contentpublishclient.sis +) + +if not exist contentpublishclient.sisx ( +echo contentpublishclient.sisx creation FAILED +) \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/contentpublishclient/src/contentpublishclient.cpp --- a/homescreenapp/examples/contentpublishclient/src/contentpublishclient.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/examples/contentpublishclient/src/contentpublishclient.cpp Mon May 03 12:24:59 2010 +0300 @@ -26,7 +26,7 @@ /*! \ingroup group_content_publish_client \class ContentPublishClient - \brief Example implementation for home screen content publish client. + \brief Example implementation for home screen client api usage. ContentPublishClient is derived from QObject and implements needed functions for the home screen content publish client. @@ -63,7 +63,7 @@ } qDebug() << interfaces.first().interfaceName() << interfaces.first().serviceName() - << interfaces.first().isValid(); + << interfaces.first().isValid(); mService = mManager->loadInterface(interfaces.first()); @@ -71,27 +71,118 @@ } /*! - Adds widget utilizing service interface and invoke call + Adds hello world widget +*/ +void ContentPublishClient::addHelloworldWidget() +{ + if ( addWidget("helloworldwidgetplugin")) { + qDebug() << "HelloWorld added"; + } else { + qDebug() << "adding HelloWorld failed"; + } +} + +/*! + Adds clock world widget +*/ +void ContentPublishClient::addClockWidget() +{ + if ( addWidget("hsclockwidgetplugin")) { + qDebug() << "Clock widget added"; + } else { + qDebug() << "adding Clock widget failed"; + } +} + +/*! + Adds widget \a widgetUri utilizing service interface and invokeMethod call */ -void ContentPublishClient::addWidget() +// Start of snippet 1 +bool ContentPublishClient::addWidget(QString widgetUri) { - QByteArray signature = QMetaObject::normalizedSignature("addWidget(QString,QVariantHash)"); + // find interface IHomeScreenClient from service hshomescreenclientplugin + QServiceManager manager; + QServiceFilter filter("com.nokia.symbian.IHomeScreenClient"); + filter.setServiceName("hshomescreenclientplugin"); + QList interfaces = manager.findInterfaces(filter); + + if(interfaces.isEmpty()) { + QServiceManager::Error error = manager.error(); + return false; + } + + QObject* service = manager.loadInterface(interfaces.first()); + + // access service's addWidget function + bool retVal = false; + bool ret = QMetaObject::invokeMethod( + service, + "addWidget", + Qt::DirectConnection, + Q_RETURN_ARG(bool, retVal), + Q_ARG(QString,widgetUri), + Q_ARG(QVariantHash,QVariantHash())); + + if(!ret){ + // invokeMethod returned error + return false; + } + if(!retVal){ + // addWidget returned error + return false; + } + return true; +} +// End of snippet 1 + +/*! + Sets home screen wallpaper as testwallpaper.png +*/ +void ContentPublishClient::setWallpaper1() +{ + QString wallpaper = "c:/data/images/kqtihswallpapers/testwallpaper.jpg"; + setWallpaper(wallpaper); +} + +/*! + Sets home screen wallpaper as testwallpaper2.png +*/ +void ContentPublishClient::setWallpaper2() +{ + QString wallpaper = "c:/data/images/kqtihswallpapers/testwallpaper2.jpg"; + setWallpaper(wallpaper); +} + +/*! + Changes home screen wallpaper to \a wallpaper image. + Note. load function needs to be called before this, it creates mService object. + +*/ +// Start of snippet 2 +bool ContentPublishClient::setWallpaper(QString wallpaper) +{ + QByteArray signature = QMetaObject::normalizedSignature("setWallpaper(QString)"); int methodIndex = mService->metaObject()->indexOfMethod(signature); + if (methodIndex<0) { + return false; + } QMetaMethod method = mService->metaObject()->method(methodIndex); bool retVal(false); - QString widget = "hsclockwidgetplugin"; - bool ret = method.invoke( mService, Qt::DirectConnection, Q_RETURN_ARG(bool, retVal), - Q_ARG(QString,widget), - Q_ARG(QVariantHash,QVariantHash())); + Q_ARG(QString,wallpaper)); if(!ret){ - qDebug()<< "method invoke failed!"; + // invokeMethod returned error + return false; } if(!retVal){ - qDebug() << "addWidget() failed!!"; + // setWallpaper returned error + return false; } + return true; } + +// End of snippet 2 diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/contentpublishclient/src/main.cpp --- a/homescreenapp/examples/contentpublishclient/src/main.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/examples/contentpublishclient/src/main.cpp Mon May 03 12:24:59 2010 +0300 @@ -19,46 +19,59 @@ #include #include #include - +#include #include #include "contentpublishclient.h" int main(int argc, char *argv[]) { - // Initialization + // Initialization HbApplication app(argc, argv); - - QString path = QDir::toNativeSeparators(QDir("z:\\hsresources\\plugins\\homescreenclientplugin\\").absolutePath()); - QString fullFileName = path + "\\hshomescreenclientplugin.xml"; - + QServiceManager manager; - if(QFile::exists(fullFileName)) { - QCoreApplication::addLibraryPath(path); - manager.addService(fullFileName); - } - // Create main window. - HbMainWindow* mainWindow = new HbMainWindow(); + HbMainWindow mainWindow; // Create content publisher client ContentPublishClient contentPublishClient(manager); - - QString buttonString = "Create widget"; - if(!contentPublishClient.load()) { + + QString buttonString = "Add HelloWorld"; + bool clientOk = contentPublishClient.load(); + if (!clientOk) { buttonString = "Open failed"; } - HbPushButton* button = new HbPushButton(buttonString); + HbWidget *myView = new HbWidget(); + QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical); + + HbPushButton* button1 = new HbPushButton(buttonString); + layout->addItem(button1); + contentPublishClient.connect(button1, SIGNAL(pressed()), SLOT(addHelloworldWidget())); + + if (clientOk) { + HbPushButton* button2 = new HbPushButton("Add Clock widget"); + HbPushButton* button3 = new HbPushButton("Set wallpaper1"); + HbPushButton* button4 = new HbPushButton("Set wallpaper2"); + + layout->addItem(button2); + layout->addItem(button3); + layout->addItem(button4); + + contentPublishClient.connect(button2, SIGNAL(pressed()), SLOT(addClockWidget())); + contentPublishClient.connect(button3, SIGNAL(pressed()), SLOT(setWallpaper1())); + contentPublishClient.connect(button4, SIGNAL(pressed()), SLOT(setWallpaper2())); + } + + + myView->setLayout(layout); // Add view - mainWindow->addView(button); - - contentPublishClient.connect(button, SIGNAL(pressed()), SLOT(addWidget())); + mainWindow.addView(myView); // Show main window - mainWindow->show(); + mainWindow.show(); return app.exec(); } diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/helloworldwidgetplugin.pro --- a/homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/helloworldwidgetplugin.pro Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/helloworldwidgetplugin.pro Mon May 03 12:24:59 2010 +0300 @@ -52,7 +52,7 @@ SUBDIRPART = release } - PLUGIN_SUBDIR = /hsresources/import/widgetregistry/20022F7E + PLUGIN_SUBDIR = /private/20022F35/import/widgetregistry/20022F7E DESTDIR = $$PWD/../../../../../bin/$${SUBDIRPART}/$${PLUGIN_SUBDIR} diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/inc/helloworldwidget.h --- a/homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/inc/helloworldwidget.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/inc/helloworldwidget.h Mon May 03 12:24:59 2010 +0300 @@ -20,8 +20,6 @@ #include -class QPushButton; - class HelloWorldWidget : public HbWidget { Q_OBJECT @@ -40,7 +38,6 @@ private: Q_DISABLE_COPY(HelloWorldWidget) - QPushButton *mButton; }; #endif // HELLOWORLDWIDGET_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/src/helloworldwidget.cpp --- a/homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/src/helloworldwidget.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/examples/helloworldwidgetplugin/helloworldwidgetplugin/src/helloworldwidget.cpp Mon May 03 12:24:59 2010 +0300 @@ -15,8 +15,8 @@ * */ -#include -#include +#include +#include #include "helloworldwidget.h" /*! @@ -32,12 +32,14 @@ Constructs a widget which is a child of \a parent, with widget flags set to \a flags. */ HelloWorldWidget::HelloWorldWidget(QGraphicsItem* parent, Qt::WindowFlags flags) - : HbWidget(parent, flags), - mButton(0) + : HbWidget(parent, flags) { - QGraphicsProxyWidget *proxy = new QGraphicsProxyWidget(this); - mButton = new QPushButton("Hello World"); - proxy->setWidget(mButton); + QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical); + setLayout(layout); + HbLabel *helloWorld = new HbLabel("Hello World!"); + helloWorld->setPreferredSize(QSizeF(130.0,20.0)); + layout->setContentsMargins(0.0, 0.0, 0.0, 0.0); + layout->addItem(helloWorld); } /*! diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/helloworldwidgetplugin/sis/helloworldwidgetplugin.bat --- a/homescreenapp/examples/helloworldwidgetplugin/sis/helloworldwidgetplugin.bat Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/examples/helloworldwidgetplugin/sis/helloworldwidgetplugin.bat Mon May 03 12:24:59 2010 +0300 @@ -1,5 +1,5 @@ @rem -@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). @rem All rights reserved. @rem This component and the accompanying materials are made available @rem under the terms of "Eclipse Public License v1.0" diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin.pro Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,19 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: Example of home screen widget +# + +TEMPLATE = subdirs +SUBDIRS = localisedhellowidgetplugin \ + localisedhellowidgetplugininstaller diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/inc/localisedhellowidget.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/inc/localisedhellowidget.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,58 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Example of home screen widget +* +*/ + +#ifndef HELLOWORLDWIDGET_H +#define HELLOWORLDWIDGET_H + +#include + + +class HbPushButton; +class QGraphicsPixmapItem; +class HbIconItem; + +class LocalisedHelloWidget : public HbWidget +{ + Q_OBJECT + Q_PROPERTY(QString rootPath READ rootPath WRITE setRootPath) +public: + LocalisedHelloWidget(QGraphicsItem *parent = 0, Qt::WindowFlags flags = 0); + ~LocalisedHelloWidget(); + +public: + QRectF boundingRect() const; + QPainterPath shape() const; + + QString rootPath()const; + void setRootPath(const QString &rootPath); +public slots: + void onInitialize(); + void onShow(); + void onHide(); +private slots: + void onButtonPressed(); + +private: + Q_DISABLE_COPY(LocalisedHelloWidget) + + HbPushButton *mButton; + QString mText; + QString mRootPath; + HbIconItem *mIcon; +}; + +#endif // HELLOWORLDWIDGET_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/inc/localisedhellowidgetplugin.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/inc/localisedhellowidgetplugin.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,36 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Example of localised home screen widget +* +*/ + +#ifndef LOCALISEDHELLOWIDGETPLUGIN_H +#define LOCALISEDHELLOWIDGETPLUGIN_H + +#include +#include + +QTM_USE_NAMESPACE +class LocalisedHelloWidgetPlugin : public QObject, public QServicePluginInterface +{ + Q_OBJECT + Q_INTERFACES(QtMobility::QServicePluginInterface) + +public: + QObject *createInstance(const QServiceInterfaceDescriptor &descriptor, + QServiceContext *context, + QAbstractSecuritySession *session); +}; + +#endif // LOCALISEDHELLOWIDGETPLUGIN_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/locales/localisedhellowidgetplugin.qm Binary file homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/locales/localisedhellowidgetplugin.qm has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/locales/localisedhellowidgetplugin.ts --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/locales/localisedhellowidgetplugin.ts Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,26 @@ + + + + + + Hello World title + Hello World + Hello World + + helloview + title + he + False + + + Hello text + Hello! + Hello! + + helloview + info + he + False + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/locales/localisedhellowidgetplugin_en_gb.qm Binary file homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/locales/localisedhellowidgetplugin_en_gb.qm has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/locales/localisedhellowidgetplugin_en_gb.ts --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/locales/localisedhellowidgetplugin_en_gb.ts Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,26 @@ + + + + + + Hello World title + Hello World + Hello World + + helloview + title + he + False + + + Hello text + Hello! + How do you do! + + helloview + info + he + False + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/locales/localisedhellowidgetplugin_en_us.qm Binary file homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/locales/localisedhellowidgetplugin_en_us.qm has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/locales/localisedhellowidgetplugin_en_us.ts --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/locales/localisedhellowidgetplugin_en_us.ts Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,26 @@ + + + + + + Hello World title + Hello World + Hi World + + helloview + title + he + False + + + Hello text + Hello! + Hi dude! + + helloview + info + he + False + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/locales/localisedhellowidgetplugin_fi.qm Binary file homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/locales/localisedhellowidgetplugin_fi.qm has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/locales/localisedhellowidgetplugin_fi.ts --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/locales/localisedhellowidgetplugin_fi.ts Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,26 @@ + + + + + + Hello World title + Hello World + Hei maa! + + helloview + title + he + False + + + Hello text + Hello! + No moro! + + helloview + info + he + False + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/localisedhellowidgetplugin.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/localisedhellowidgetplugin.pro Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,71 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: Example of home screen widget +# + +TEMPLATE = lib +CONFIG += plugin mobility hb +MOBILITY = serviceframework + +HEADERS += ./inc/*.h +SOURCES += ./src/*.cpp + +INCLUDEPATH += ./inc + +symbian: { + + INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE + + TARGET.UID3 = 0x20022F80 + TARGET.EPOCALLOWDLLDATA=1 + TARGET.CAPABILITY = ALL -TCB + + DESTDIR = /private/20022F35/import/widgetregistry/20022F80 + + plugins.path = $${DESTDIR} + plugins.sources = $${TARGET}.dll + + widgetResources.path = $${DESTDIR} + widgetResources.sources += resource/$${TARGET}.xml + widgetResources.sources += resource/$${TARGET}.manifest + widgetResources.sources += resource/$${TARGET}.png + + localisedFiles.path = /resource/qt/translations + localisedFiles.sources += ./locales/*.qm + + DEPLOYMENT += plugins \ + widgetResources \ + localisedFiles +} + +win32: { + + CONFIG(debug, debug|release) { + SUBDIRPART = debug + } else { + SUBDIRPART = release + } + + PLUGIN_SUBDIR = /private/20022F35/import/widgetregistry/20022F80 + + DESTDIR = $$PWD/../../../../../bin/$${SUBDIRPART}/$${PLUGIN_SUBDIR} + + manifest.path = $${DESTDIR} + manifest.files = ./resource/*.manifest ./resource/*.xml ./resource/*.png + + widgetLocalisation.path = $$PWD/../../../../../bin/$${SUBDIRPART}/resource/qt/translations + widgetLocalisation.files += ./locales/*.qm + + INSTALLS += manifest widgetLocalisation +} diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/resource/localisedhellowidgetplugin.manifest --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/resource/localisedhellowidgetplugin.manifest Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,8 @@ + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/resource/localisedhellowidgetplugin.png Binary file homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/resource/localisedhellowidgetplugin.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/resource/localisedhellowidgetplugin.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/resource/localisedhellowidgetplugin.xml Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,14 @@ + + + localisedhellowidgetplugin + localisedhellowidgetplugin + Example widget + + com.nokia.symbian.IHomeScreenWidget + 1.0 + Example of localised widget + + localisedhellowidgetplugin.png + Hello + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/resource/localisedhellowidgetplugin.xml_for_sisx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/resource/localisedhellowidgetplugin.xml_for_sisx Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,14 @@ + + + localisedhellowidgetplugin + c:/private/20022F35/import/widgetregistry/20022F80/localisedhellowidgetplugin.qtplugin + Localisation example widget + + com.nokia.symbian.IHomeScreenWidget + 1.0 + Example of localised widget + + localisedhellowidgetplugin.png + Hello + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/src/localisedhellowidget.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/src/localisedhellowidget.cpp Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,121 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Example of home screen widget +* +*/ + +#include +#include +#include +#include +#include +#include +#include "localisedhellowidget.h" + +/*! + \ingroup group_helloworld_widget + \class LocalisedHelloWidget + \brief Example implementation for home screen widget. + + LocalisedHelloWidget derived from the HbWidget and implements + needed functions for the home screen widget. +*/ + +/*! + Constructs a widget which is a child of \a parent, with widget flags set to \a flags. +*/ +LocalisedHelloWidget::LocalisedHelloWidget(QGraphicsItem* parent, Qt::WindowFlags flags) + : HbWidget(parent, flags),mIcon(0) +{ + QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical); + setPreferredSize(200,100); + setLayout(layout); + mButton = new HbPushButton(); + layout->addItem(mButton); + + connect(mButton,SIGNAL(pressed()),SLOT(onButtonPressed())); + + + +} + +/*! + Destructor +*/ +LocalisedHelloWidget::~LocalisedHelloWidget() +{ + +} + +/*! + Return bounding rect +*/ +QRectF LocalisedHelloWidget::boundingRect() const +{ + return childrenBoundingRect(); +} + +/*! + Return shape +*/ +QPainterPath LocalisedHelloWidget::shape() const +{ + QPainterPath path; + path.addRect(boundingRect()); + return path; +} +QString LocalisedHelloWidget::rootPath()const +{ + return mRootPath; +} + +void LocalisedHelloWidget::setRootPath(const QString &rootPath) +{ + mRootPath = rootPath; +} + +void LocalisedHelloWidget::onInitialize() +{ + // localisation can be used now + mText = hbTrId("localisedhellowidgetplugin_txt_helloview_info_hello"); + mButton->setText(hbTrId("localisedhellowidgetplugin_txt_helloview_title_hello_world")); + // roothPath is set thus we can use it + QString iconPath = QDir::toNativeSeparators(mRootPath + "/localisedhellowidgetplugin.png"); + mIcon = new HbIconItem(iconPath); + static_cast(layout())->addItem(mIcon); + + +} + +/*! + Called when widget is shown in the home screen +*/ +void LocalisedHelloWidget::onShow() +{ +} + +/*! + Called when widget is hidden from the home screen +*/ +void LocalisedHelloWidget::onHide() +{ +} + +void LocalisedHelloWidget::onButtonPressed() +{ + QString tmp = mButton->text(); + mButton->setText(mText); + mText = tmp; +} + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/src/localisedhellowidgettplugin.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/src/localisedhellowidgettplugin.cpp Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,146 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Example of localised home screen widget +* +*/ + +#include +#include +#include + +#include "localisedhellowidgetplugin.h" +#include "localisedhellowidget.h" + +/** + @page page_creating_widget_plugin Creating Home Screen Widget Plugin + + Widgets are exposed to the home screen through QT Service Framework. + Widget plugins are implemented according to + Qt service framework plugin model. + + See @ref page_nativewidgetmodel for the instructions how to create widget for the home screen. + + The steps to create a widget plugin are: +
    +
  1. Declare a plugin class that inherits from QObject and from the \c QServicePluginInterface interface. + +
  2. Use the Q_INTERFACES() macro to tell Qt's meta-object system about the \c QServicePluginInterface interface. + +
  3. Export the plugin using the Q_EXPORT_PLUGIN2() macro. + +
  4. Build the plugin using an suitable .pro file. See @ref page_deploying_widget_plugin +
+ + An example (full example source code can be found from section @ref page_nativewidgetmodel): + + Each widget plugin has a XML file that allows searching widgets through QT service framework without first loading it. + The XML file contains information on widgets inside the plugin: + + \li \c name The name of the plugin binary. + \li \c filepath The absolute path and name of plugin without suffix + \li \c interface name Uniquely identifies the widget. + \li \c title Widget's human-readable name. + \li \c iconuri URI of the widget's icon image file. + + Example: XML for a widget plugin. + + @code + + + helloworldwidgetplugin + helloworldwidgetplugin + Example widget + + com.nokia.symbian.IHomeScreenWidget + 1.0 + Example of home screen widget + + helloworldwidgetplugin.png + HelloWorld + + + @endcode +*/ + +/** + @page page_deploying_widget_plugin Deploying Home Screen Widget Plugin + + Widget's binaries and xml file(s) must be deployed to correct folders on emulator and in target. + Below are the needed .pro file for the \c helloworldwidgetplugin. + + For example: + + @code + # helloworldwidgetplugin.pro + + TEMPLATE = lib + CONFIG += plugin mobility hb + MOBILITY = serviceframework + + HEADERS += ./inc/ .h + SOURCES += ./src/ .cpp + + DESTDIR = $${EPOCROOT}epoc32/data/c/private/20022F35/import/widgetregistry/20022F7E + + INCLUDEPATH += ./inc + + symbian: { + INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE + + TARGET.UID3 = 0x20022F7E + TARGET.EPOCALLOWDLLDATA=1 + TARGET.CAPABILITY = ALL -TCB + + plugins.path = $${DESTDIR} + plugins.sources = $${TARGET}.dll + + widgetResources.path = $${DESTDIR} + widgetResources.sources += resource/$${TARGET}.xml + widgetResources.sources += resource/$${TARGET}.manifest + widgetResources.sources += resource/$${TARGET}.png + + DEPLOYMENT += plugins \ + widgetResources + } + + @endcode + + For detailed information on DEPLOYMENT macro, see here. +*/ + +/*! + \ingroup group_helloworld_widget + \class HelloWorldWidgetPlugin + \brief Example implementation for home screen widget plugin. +*/ + +/*! + Initialize plugin for hello world widget. Contains necessary information about + the hello world widget that it can be loaded through QT Service Framework. +*/ +QObject *LocalisedHelloWidgetPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor, + QServiceContext *context, + QAbstractSecuritySession *session) +{ + Q_UNUSED(context); + Q_UNUSED(session); + + if (descriptor.interfaceName() == QLatin1String("com.nokia.symbian.IHomeScreenWidget")) { + return new LocalisedHelloWidget(); + } else { + return 0; + } +} + +Q_EXPORT_PLUGIN2(localisedhellowidgetplugin, LocalisedHelloWidgetPlugin) diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugininstaller/localisedhellowidgetplugininstaller.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugininstaller/localisedhellowidgetplugininstaller.cpp Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,37 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Example of home screen widget +* +*/ + +#include +#include +#include + +QTM_USE_NAMESPACE + +const char xml[] = "C:/data/widgets/servicefw/localisedhellowidgetplugin.xml"; + +int main(int argc, char *argv[]) +{ + QCoreApplication app(argc, argv); + + QServiceManager s; + + if (QFile::exists(xml)) { + s.addService(xml); + } else { + s.removeService("localisedhellowidgetplugin"); + } +} diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugininstaller/localisedhellowidgetplugininstaller.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugininstaller/localisedhellowidgetplugininstaller.pro Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,29 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: Example of home screen widget +# + +TEMPLATE = app + +QT = core +CONFIG += no_icon + +CONFIG += mobility +MOBILITY = serviceframework + +SOURCES += localisedhellowidgetplugininstaller.cpp + +symbian { + TARGET.CAPABILITY = ALL -TCB +} diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/sis/localisedhellowidgetplugin.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/localisedhellowidgetplugin/sis/localisedhellowidgetplugin.bat Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,30 @@ +@rem +@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +@rem All rights reserved. +@rem This component and the accompanying materials are made available +@rem under the terms of "Eclipse Public License v1.0" +@rem which accompanies this distribution, and is available +@rem at the URL "http://www.eclipse.org/legal/epl-v10.html". +@rem +@rem Initial Contributors: +@rem Nokia Corporation - initial contribution. +@rem +@rem Contributors: +@rem +@rem Description: +@rem +@echo off + +if exist localisedhellowidgetplugin.sisx del localisedhellowidgetplugin.sisx + +makesis localisedhellowidgetplugin.pkg +signsis localisedhellowidgetplugin.sis localisedhellowidgetplugin.sisx ../../../sis/rd.cer ../../../sis/rd-key.pem + +if exist localisedhellowidgetplugin.sisx ( +echo localisedhellowidgetplugin.sisx creation SUCCEEDED +del localisedhellowidgetplugin.sis +) + +if not exist localisedhellowidgetplugin.sisx ( +echo localisedhellowidgetplugin.sisx creation FAILED +) \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/examples/localisedhellowidgetplugin/sis/localisedhellowidgetplugin.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/examples/localisedhellowidgetplugin/sis/localisedhellowidgetplugin.pkg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,47 @@ +; +; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +; All rights reserved. +; This component and the accompanying materials are made available +; under the terms of "Eclipse Public License v1.0" +; which accompanies this distribution, and is available +; at the URL "http://www.eclipse.org/legal/epl-v10.html". +; +; Initial Contributors: +; Nokia Corporation - initial contribution. +; +; Contributors: +; +; Description: +; + +; Language +&EN + +; SIS header: name, uid, version +#{"localisedhellowidgetplugin"},(0x20022F80),1,0,0 + +; Localised Vendor name +%{"Vendor"} + +; Unique Vendor name +:"Vendor" + +; Manual PKG pre-rules from PRO files +; Default HW/platform dependencies +[0x101F7961],0,0,0,{"S60ProductID"} +[0x102032BE],0,0,0,{"S60ProductID"} +[0x102752AE],0,0,0,{"S60ProductID"} +[0x1028315F],0,0,0,{"S60ProductID"} + +"/epoc32/release/armv5/urel/localisedhellowidgetplugin.dll" - "!:/sys/bin/localisedhellowidgetplugin.dll" +"/epoc32/data/z/private/20022F35/import/widgetregistry/20022F80/localisedhellowidgetplugin.qtplugin" - "!:/private/20022F35/import/widgetregistry/20022F80/localisedhellowidgetplugin.qtplugin" +"/epoc32/data/z/private/20022F35/import/widgetregistry/20022F80/localisedhellowidgetplugin.manifest" - "!:/private/20022F35/import/widgetregistry/20022F80/localisedhellowidgetplugin.manifest" +"../localisedhellowidgetplugin/resource/localisedhellowidgetplugin.xml_for_sisx" - "C:/data/widgets/servicefw/localisedhellowidgetplugin.xml" +"/epoc32/data/z/private/20022F35/import/widgetregistry/20022F80/localisedhellowidgetplugin.png" - "!:/private/20022F35/import/widgetregistry/20022F80/localisedhellowidgetplugin.png" + +"/epoc32/data/z/resource/qt/translations/localisedhellowidgetplugin.qm" - "!:/resource/qt/translations/localisedhellowidgetplugin.qm" +"/epoc32/data/z/resource/qt/translations/localisedhellowidgetplugin_fi.qm" - "!:/resource/qt/translations/localisedhellowidgetplugin_fi.qm" +"/epoc32/data/z/resource/qt/translations/localisedhellowidgetplugin_en_us.qm" - "!:/resource/qt/translations/localisedhellowidgetplugin_en_us.qm" +"/epoc32/data/z/resource/qt/translations/localisedhellowidgetplugin_en_gb.qm" - "!:/resource/qt/translations/localisedhellowidgetplugin_en_gb.qm" + +"/epoc32/release/armv5/urel/localisedhellowidgetplugininstaller.exe" - "!:/sys/bin/localisedhellowidgetplugininstaller.exe", FR, RB, RW diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/homescreenapp.pro --- a/homescreenapp/homescreenapp.pro Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/homescreenapp.pro Mon May 03 12:24:59 2010 +0300 @@ -23,7 +23,7 @@ stateplugins \ widgetplugins \ hsapplication \ - hsmenucontentpublish + hsmenuclientplugin symbian:SUBDIRS += hshomescreenclientplugin diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/conf/base/confml/data.confml --- a/homescreenapp/hsapplication/conf/base/confml/data.confml Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - - - - - - - 8 - - 1hsclockwidgetplugin1 - 2hsdialerwidgetplugin1 - 10 - 21 - 32 - portrait15801501500.0 - landscape15801501500.0 - portrait13627681810.0 - landscape13617681810.0 - clockTypeAnalog1 - - - \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/conf/base/confml/homescreen_view.confml --- a/homescreenapp/hsapplication/conf/base/confml/homescreen_view.confml Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsapplication/conf/base/confml/homescreen_view.confml Mon May 03 12:24:59 2010 +0300 @@ -8,7 +8,11 @@ - + + + + + Sample Description diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/conf/base/confml/homescreendb.confml --- a/homescreenapp/hsapplication/conf/base/confml/homescreendb.confml Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsapplication/conf/base/confml/homescreendb.confml Mon May 03 12:24:59 2010 +0300 @@ -4,7 +4,12 @@ - + + + + + + @@ -21,8 +26,6 @@ - - @@ -36,4 +39,29 @@ + + + + + 8 + 40 + 51 + 3 + 3 + + 1hsclockwidgetplugin1 + 2hsdialerwidgetplugin1 + 3ftuhswidget1 + portrait15800.0 + landscape15800.0 + portrait1362760.0 + landscape1361760.0 + portrait154000.0 + landscape3001500.0 + clockTypeAnalog1 + 10 + 21 + 32 + + \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/conf/base/implml/homescreendb_templates/create.sql --- a/homescreenapp/hsapplication/conf/base/implml/homescreendb_templates/create.sql Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsapplication/conf/base/implml/homescreendb_templates/create.sql Mon May 03 12:24:59 2010 +0300 @@ -4,7 +4,11 @@ portraitWallpaper TEXT, landscapeWallpaper TEXT, defaultPageId INTEGER, - maximumPageCount INTEGER); + maximumPageCount INTEGER, + maximumWidgetHeight INTEGER, + maximumWidgetWidth INTEGER, + minimumWidgetHeight INTEGER, + minimumWidgetWidth INTEGER); DROP TABLE IF EXISTS Pages; CREATE TABLE Pages ( @@ -22,8 +26,6 @@ key TEXT, x REAL, y REAL, - width REAL, - height REAL, zValue REAL, widgetId INTEGER, UNIQUE(widgetId, key) ON CONFLICT REPLACE, diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/conf/base/implml/homescreendb_templates/fill.sql --- a/homescreenapp/hsapplication/conf/base/implml/homescreendb_templates/fill.sql Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsapplication/conf/base/implml/homescreendb_templates/fill.sql Mon May 03 12:24:59 2010 +0300 @@ -2,7 +2,11 @@ {%- set landscapeWallpaper = feat_tree.HomeScreenDbSettings.landscapeWallpaper._value or '' -%} {%- set defaultPageId = feat_tree.HomeScreenDbSettings.defaultPageId._value -%} {%- set maximumPageCount = feat_tree.HomeScreenDbSettings.maximumPageCount._value -%} -INSERT INTO Scene (portraitWallpaper, landscapeWallpaper, defaultPageId, maximumPageCount) VALUES ('{{portraitWallpaper}}', '{{landscapeWallpaper}}', {{defaultPageId}}, {{maximumPageCount}}); +{%- set maximumWidgetHeight = feat_tree.HomeScreenDbSettings.maximumWidgetHeight._value -%} +{%- set maximumWidgetWidth = feat_tree.HomeScreenDbSettings.maximumWidgetWidth._value -%} +{%- set minimumWidgetHeight = feat_tree.HomeScreenDbSettings.minimumWidgetHeight._value -%} +{%- set minimumWidgetWidth = feat_tree.HomeScreenDbSettings.minimumWidgetWidth._value -%} +INSERT INTO Scene (portraitWallpaper, landscapeWallpaper, defaultPageId, maximumPageCount, maximumWidgetHeight, maximumWidgetWidth, minimumWidgetHeight, minimumWidgetWidth) VALUES ('{{portraitWallpaper}}', '{{landscapeWallpaper}}', {{defaultPageId}}, {{maximumPageCount}}, {{maximumWidgetHeight}}, {{maximumWidgetWidth}}, {{minimumWidgetHeight}}, {{minimumWidgetWidth}}); {% for index in range(feat_tree.HomeScreenDbSettings.Pages._value|length) -%} {%- set id = feat_tree.HomeScreenDbSettings.Pages.id._value[index] -%} @@ -22,12 +26,10 @@ {%- set key = feat_tree.HomeScreenDbSettings.WidgetPresentations.key._value[index] or '' -%} {%- set x = feat_tree.HomeScreenDbSettings.WidgetPresentations.x._value[index] -%} {%- set y = feat_tree.HomeScreenDbSettings.WidgetPresentations.y._value[index] -%} - {%- set width = feat_tree.HomeScreenDbSettings.WidgetPresentations.width._value[index] -%} - {%- set height = feat_tree.HomeScreenDbSettings.WidgetPresentations.height._value[index] -%} {%- set zValue = feat_tree.HomeScreenDbSettings.WidgetPresentations.zValue._value[index] -%} {%- set widgetId = feat_tree.HomeScreenDbSettings.WidgetPresentations.widgetId._value[index] -%} - INSERT INTO WidgetPresentations (key, x, y, width, height, zValue, widgetId) VALUES ('{{key}}', {{x}}, {{y}}, {{width}}, {{height}}, {{zValue}}, {{widgetId}}); + INSERT INTO WidgetPresentations (key, x, y, zValue, widgetId) VALUES ('{{key}}', {{x}}, {{y}}, {{zValue}}, {{widgetId}}); {% endfor %} {% for index in range(feat_tree.HomeScreenDbSettings.WidgetPreferences._value|length) -%} diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/conf/base/root.confml --- a/homescreenapp/hsapplication/conf/base/root.confml Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsapplication/conf/base/root.confml Mon May 03 12:24:59 2010 +0300 @@ -2,5 +2,4 @@ - \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/homescreen.qm Binary file homescreenapp/hsapplication/homescreen.qm has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/homescreen.ts --- a/homescreenapp/hsapplication/homescreen.ts Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsapplication/homescreen.ts Mon May 03 12:24:59 2010 +0300 @@ -2,123 +2,183 @@ - - Home screen canvas menu item for opening Application library - Add content - Add content - qtl_menu_set + + User adds a new page to home screen + Add page + Add page + qtl_menu_pri homescreen - list + opt ho False - - User adds a new page to home screen - Add page - Add page + + Options menu item for opening picture gallery + Change wallpaper + Change wallpaper qtl_menu_pri homescreen opt ho False - - User removes page from home screen - Remove page - Remove page + + Offline text in home screen view title + Offline + Offline + qtl_chrome_title + homescreen + title + ho + False + + + Options menu item for arranging home screen content automatically + Clean up page + Clean up page qtl_menu_pri homescreen opt ho False - - Home screen canvas menu item for opening picture gallery - Change wallpaper - Change wallpaper + + Heading text in confirmation dialog + Remove page + Remove page + qtl_dialog_pri_heading + homescreen + title + ho + False + + + Sends request to all widgets to disable data connections + Home screen to offline + Home screen to offline + qtl_menu_pri + homescreen + opt + ho + False + + + Home screen canvas menu item for opening Application library + Add content + Add content qtl_menu_set homescreen list ho False - - Options menu item for opening picture gallery - Change wallpaper - Change wallpaper + + User removes page from home screen + Remove page + Remove page qtl_menu_pri homescreen opt ho False - - Home screen canvas menu item for adding new Homescreen page next currently active one - Add page - Add page + + Text in home screen view title when SIM access profile is active. While this mode is active, SIM card is controlled by car kit. + In car control + In car control + qtl_chrome_title + homescreen + title + ho + False + + + Home screen canvas menu item for opening picture gallery + Change wallpaper + Change wallpaper qtl_menu_set homescreen list ho False - - Offline text in home screen view title - Offline - Offline - qtl_chrome_title + + Text in confirmation dialog + Page and content will be removed + Page and content will be removed + qtl_dialog_pri5 homescreen - title + info ho False - - Options menu item for arranging home screen content automatically - Clean up page - Clean up page + + Home screen canvas menu item for adding new Homescreen page next currently active one + Add page + Add page + qtl_menu_set + homescreen + list + ho + False + + + Button in confirmation dialog + OK + OK + qtl_dialog_softkey_1 + homescreen + button + ho + False + + + Sends request to all widgets to enable data connections + Home screen to online + Home screen to online qtl_menu_pri homescreen opt ho False - - Sends request to all widgets to disable data connections - Home screen to offline - Home screen to offline - qtl_menu_pri + + Button in confirmation dialog + Cancel + Cancel + qtl_dialog_softkey_2 homescreen - opt + button ho False - - Sends request to all widgets to enable data connections - Home screen to online - Home screen to online + + Options menu item for opening Task switcher + Task switcher + Task switcher qtl_menu_pri homescreen opt ho False - + Sends request to all running widgets to query their respective servers to refresh their displays. Refresh - Refresh + Refresh qtl_menu_pri homescreen opt ho False - - Options menu item for opening Task switcher - Task switcher - Task switcher - qtl_menu_pri + + Text in home screen view title, when device is out of network coverage or no SIM card present + No service + No service + qtl_chrome_title homescreen - opt + title ho False diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/hsapplication.pro --- a/homescreenapp/hsapplication/hsapplication.pro Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsapplication/hsapplication.pro Mon May 03 12:24:59 2010 +0300 @@ -41,14 +41,19 @@ RESOURCES += hsapplication_fallbacktheme.qrc +LIBS += -lhsutils \ + -lhsdomainmodel + + symbian: { TARGET.UID3 = 0x20022F35 TARGET.CAPABILITY = CAP_APPLICATION AllFiles TrustedUI TARGET.EPOCHEAPSIZE = 0x20000 0x1600000 // 128kB - 23MB ICON = resource_s60/qgn_menu_appsgrid.svg - appkey:DEFINES += S60APP_KEY - LIBS += -lefsrv + LIBS += -lapgrfx \ + -lcone \ + -lefsrv include(installs_symbian.pri) CONFIG += service diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/hsapplication_fallbacktheme.qrc --- a/homescreenapp/hsapplication/hsapplication_fallbacktheme.qrc Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsapplication/hsapplication_fallbacktheme.qrc Mon May 03 12:24:59 2010 +0300 @@ -7,8 +7,7 @@ themes/icons/hbdefault/scalable/qtg_large_applications_download.svg themes/icons/hbdefault/scalable/qtg_large_applications_user.svg themes/icons/hbdefault/scalable/qtg_large_super_new.svg - - + themes/icons/hbdefault/scalable/qtg_graf_hspage_normal.svg themes/icons/hbdefault/scalable/qtg_graf_hspage_highlight.svg themes/icons/hbdefault/scalable/hs_shortcut_bg.svg @@ -21,5 +20,36 @@ themes/icons/hbdefault/scalable/qtg_graf_clock_day_hour.svg themes/icons/hbdefault/scalable/qtg_graf_clock_day_min.svg themes/icons/hbdefault/scalable/qtg_graf_hs_dialer.svg + + themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_b.svg + themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_bl.svg + themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_br.svg + themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_c.svg + themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_l.svg + themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_r.svg + themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_t.svg + themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_tl.svg + themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_tr.svg + + themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_b.svg + themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_bl.svg + themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_br.svg + themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_c.svg + themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_l.svg + themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_r.svg + themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_t.svg + themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_tl.svg + themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_tr.svg + + themes/icons/hbdefault/scalable/qtg_anim_longtap_0.svg + themes/icons/hbdefault/scalable/qtg_anim_longtap_1.svg + themes/icons/hbdefault/scalable/qtg_anim_longtap_2.svg + themes/icons/hbdefault/scalable/qtg_anim_longtap_3.svg + themes/icons/hbdefault/scalable/qtg_anim_longtap_4.svg + themes/icons/hbdefault/scalable/qtg_anim_longtap_5.svg + themes/icons/hbdefault/scalable/qtg_anim_longtap_6.svg + themes/icons/hbdefault/scalable/qtg_anim_longtap_7.svg + themes/icons/hbdefault/scalable/qtg_anim_longtap_8.svg + themes/icons/hbdefault/scalable/qtg_anim_longtap_9.svg diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/inc/hshomescreenclientserviceprovider.h --- a/homescreenapp/hsapplication/inc/hshomescreenclientserviceprovider.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsapplication/inc/hshomescreenclientserviceprovider.h Mon May 03 12:24:59 2010 +0300 @@ -18,22 +18,21 @@ #ifndef HSHOMESCREENCLIENTSERVICEPROVIDER_H #define HSHOMESCREENCLIENTSERVICEPROVIDER_H +#include + #include -#include class HsHomeScreenClientServiceProvider : public XQServiceProvider { Q_OBJECT + public: - HsHomeScreenClientServiceProvider( QObject *parent = 0 ); + HsHomeScreenClientServiceProvider(QObject *parent = 0); ~HsHomeScreenClientServiceProvider(); - public slots: bool addWidget(const QString &uri,const QVariantHash &preferences); - -private: - + bool setWallpaper(const QString &fileName); }; -#endif +#endif // HSHOMESCREENCLIENTSERVICEPROVIDER_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/installs_symbian.pri --- a/homescreenapp/hsapplication/installs_symbian.pri Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsapplication/installs_symbian.pri Mon May 03 12:24:59 2010 +0300 @@ -24,9 +24,3 @@ exports2.sources += resource_s60/d_landscape.png exports2.sources += resource_s60/d_portrait.png for(export2, exports2.sources):BLD_INF_RULES.prj_exports += "./$$export2 $$deploy.path$$exports2.path/$$basename(export2)" - -exports3.path = /data/images/kqtihswallpapers -exports3.sources += resource_s60/bg_1.png -exports3.sources += resource_s60/bg_2.png -exports3.sources += resource_s60/bg_3.png -for(export3, exports3.sources):BLD_INF_RULES.prj_exports += "./$$export3 $$deploy.path$$exports3.path/$$basename(export3)" diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/installs_win.pri --- a/homescreenapp/hsapplication/installs_win.pri Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsapplication/installs_win.pri Mon May 03 12:24:59 2010 +0300 @@ -21,29 +21,13 @@ ./resource_win/bg_3.png homescreendb.CONFIG += no_build -homescreendb.path = $$DESTDIR +homescreendb.path = $$DESTDIR/private/20022f35 homescreendb.files = ./resource_win/homescreen.db wallpapers.CONFIG += no_build -wallpapers.path = $$DESTDIR/wallpapers +wallpapers.path = $$DESTDIR/private/20022f35/wallpapers wallpapers.files = ./resource_win/d_landscape.png \ ./resource_win/d_portrait.png -themeableimagesfortheme11.path = "$$(USERPROFILE)/Application Data/hb/themes/icons/redtheme/scalable" -themeableimagesfortheme11.files = ./themes/theme1/hs_pageindicatoritem_active.svg \ - ./themes/theme1/hs_pageindicatoritem_nonactive.svg \ - ./themes/theme1/hs_shortcut_bg.svg - -themeableimagesfortheme12.path = "$$(USERPROFILE)/Application Data/hb/themes/icons/redtheme/pixmap" -themeableimagesfortheme12.files = ./themes/theme1/hs_trashbin_active.png \ - ./themes/theme1/hs_trashbin_nonactive.png - -themeableimagesfortheme2.path = "$$(USERPROFILE)/Application Data/hb/themes/icons/bluetheme/scalable" -themeableimagesfortheme2.files = ./themes/theme2/hs_pageindicatoritem_active.svg \ - ./themes/theme2/hs_pageindicatoritem_nonactive.svg \ - ./themes/theme2/hs_shortcut_bg.svg \ - ./themes/theme2/hs_trashbin_active.svg \ - ./themes/theme2/hs_trashbin_nonactive.svg - -INSTALLS += kqtihswallpapers homescreendb wallpapers themeableimagesfortheme11 themeableimagesfortheme12 themeableimagesfortheme2 +INSTALLS += kqtihswallpapers homescreendb wallpapers PRE_TARGETDEPS += install_kqtihswallpapers install_homescreendb install_wallpapers diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/loc/homescreen.xls Binary file homescreenapp/hsapplication/loc/homescreen.xls has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/resource_s60/bg_1.png Binary file homescreenapp/hsapplication/resource_s60/bg_1.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/resource_s60/bg_2.png Binary file homescreenapp/hsapplication/resource_s60/bg_2.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/resource_s60/bg_3.png Binary file homescreenapp/hsapplication/resource_s60/bg_3.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/resource_s60/d_landscape.png Binary file homescreenapp/hsapplication/resource_s60/d_landscape.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/resource_s60/d_portrait.png Binary file homescreenapp/hsapplication/resource_s60/d_portrait.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/resource_s60/homescreen.db Binary file homescreenapp/hsapplication/resource_s60/homescreen.db has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/resource_win/bg_1.png Binary file homescreenapp/hsapplication/resource_win/bg_1.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/resource_win/bg_2.png Binary file homescreenapp/hsapplication/resource_win/bg_2.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/resource_win/bg_3.png Binary file homescreenapp/hsapplication/resource_win/bg_3.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/resource_win/d_landscape.png Binary file homescreenapp/hsapplication/resource_win/d_landscape.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/resource_win/d_portrait.png Binary file homescreenapp/hsapplication/resource_win/d_portrait.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/resource_win/homescreen.db Binary file homescreenapp/hsapplication/resource_win/homescreen.db has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/src/hshomescreen.cpp --- a/homescreenapp/hsapplication/src/hshomescreen.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsapplication/src/hshomescreen.cpp Mon May 03 12:24:59 2010 +0300 @@ -158,13 +158,9 @@ { HSTEST_FUNC_ENTRY("HS::HsHomeScreen::registerServicePlugins()"); QStringList pluginPaths; - + + pluginPaths << "private/20022F35"; pluginPaths << "hsresources/plugins"; -#ifdef Q_OS_SYMBIAN - pluginPaths << "private/20022F35/import/widgetregistry"; -#else - pluginPaths << "hsresources/import/widgetregistry"; -#endif QFileInfoList drives = QDir::drives(); foreach(const QString pluginPath, pluginPaths) { diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/src/hshomescreenclientserviceprovider.cpp --- a/homescreenapp/hsapplication/src/hshomescreenclientserviceprovider.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsapplication/src/hshomescreenclientserviceprovider.cpp Mon May 03 12:24:59 2010 +0300 @@ -11,25 +11,41 @@ * * Contributors: * -* Description: Main class for HsHomeScreenClientServiceProvider library. +* Description: * */ +#include +#include + #include "hshomescreenclientserviceprovider.h" +#include "hscontentservice.h" #include "hsscene.h" -#include "hspage.h" #include "hsdomainmodeldatastructures.h" -#include "hswidgethost.h" +#include "hswallpaper.h" +#include "hsdatabase.h" +#include "hswallpaperhelper.h" + +#define HSBOUNDARYEFFECT 20 // amount of extra pixels in wallpaper width reserved for boundary effect -const char INTERFACE_NAME[] = "com.nokia.services.hsapplication.IHomeScreenClient"; +namespace +{ + const char gInterfaceName[] = "com.nokia.services.hsapplication.IHomeScreenClient"; +} -HsHomeScreenClientServiceProvider::HsHomeScreenClientServiceProvider(QObject* parent) -: XQServiceProvider(INTERFACE_NAME,parent) +/*! + Constructor. +*/ +HsHomeScreenClientServiceProvider::HsHomeScreenClientServiceProvider(QObject *parent) + : XQServiceProvider(gInterfaceName, parent) { publishAll(); } +/*! + Destructor. +*/ HsHomeScreenClientServiceProvider::~HsHomeScreenClientServiceProvider() { } @@ -38,33 +54,78 @@ #pragma CTC SKIP #endif //COVERAGE_MEASUREMENT -// this should be moved to HsContentService class - -bool HsHomeScreenClientServiceProvider::addWidget(const QString &uri,const QVariantHash &preferences) +/*! + Adds new widget, with the give \a uri and \a preferences, + to the active home screen page. +*/ +bool HsHomeScreenClientServiceProvider::addWidget(const QString &uri, const QVariantHash &preferences) { + return HsContentService::instance()->addWidget(uri, preferences); +} - HsWidgetData widgetData; - widgetData.uri = uri; - - QScopedPointer widget(HsWidgetHost::createInstance(widgetData,preferences)); - - if (!widget.data()) { +/*! + Changes \a fileName image to the active home screen page's wallpaper. +*/ +bool HsHomeScreenClientServiceProvider::setWallpaper(const QString &fileName) +{ + HsScene *scene = HsScene::instance(); + + HsDatabase *db = HsDatabase::instance(); + Q_ASSERT(db); + + HsSceneData sceneData; + if (!db->scene(sceneData)) { return false; } - HsPage* activePage = HsScene::instance()->activePage(); - if (!widget->load() || !activePage->addNewWidget(widget.data())) { - widget->deleteFromDatabase(); - return false; + + QFileInfo fileInfo(fileName); + QString fileExtension(""); + if (!fileInfo.suffix().isEmpty()) { + fileExtension = fileInfo.suffix(); + } + + QFile::remove(sceneData.portraitWallpaper); + QFile::remove(sceneData.landscapeWallpaper); + + QString wallpaperDir = HsWallpaper::wallpaperDirectory(); + QDir dir(wallpaperDir); + if (!dir.exists()) { + dir.mkpath(wallpaperDir); } - HsWidgetHost* taken = widget.take(); - taken->initializeWidget(); - taken->showWidget(); - activePage->layoutNewWidgets(); + + QString portraitPath = HsWallpaper::wallpaperPath( + Qt::Vertical, QString(), fileExtension); + QString landscapePath = HsWallpaper::wallpaperPath( + Qt::Horizontal, QString(), fileExtension); + + QRect portraitRect = QRect(0, 0, (2 * 360) + HSBOUNDARYEFFECT, 640); + QRect landscapeRect = QRect(0, 0, (2 * 640) + HSBOUNDARYEFFECT, 360); + QRect sourceRect; // left empty to signal we want to use full size image as source + + QImage portraitImage = HsWallpaperHelper::processImage(fileName, + portraitRect, sourceRect); + QImage landscapeImage = HsWallpaperHelper::processImage(fileName, + landscapeRect, sourceRect); + + if (!portraitImage.isNull() && !landscapeImage.isNull()) { + portraitImage.save(portraitPath); + sceneData.portraitWallpaper = portraitPath; + + landscapeImage.save(landscapePath); + sceneData.landscapeWallpaper = landscapePath; + + if (db->updateScene(sceneData)) { + scene->wallpaper()->setImagesById(QString(), fileInfo.suffix()); + } + } + else { + // display some error note here + } return true; } + #ifdef COVERAGE_MEASUREMENT #pragma CTC ENDSKIP #endif //COVERAGE_MEASUREMENT - diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/src/main.cpp --- a/homescreenapp/hsapplication/src/main.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsapplication/src/main.cpp Mon May 03 12:24:59 2010 +0300 @@ -20,7 +20,6 @@ #include #include #include "hshomescreen.h" -#include "hsapptranslator.h" #include "hstest_global.h" namespace @@ -38,25 +37,13 @@ #include -void loadTranslationFilesOnSymbian(QTranslator &hsTranslator, QTranslator &alTranslator); +void loadTranslationFilesOnSymbian(QTranslator &commonTranslator, + QTranslator &hsTranslator, + QTranslator &alTranslator); void copyWallpapersFromRom(); void copyHsDatabaseFileFromRom(); void createPrivateFolder(); -// it is temporary class used for getting notifcation about APA messages -// it is used for processing message send by AVKON to activate Menu -class HsMessageObserver: public MCoeMessageObserver { - -TMessageResponse HandleMessageL(TUint32 /*aClientHandleOfTargetWindowGroup*/, - TUid /*aMessageUid*/, - const TDesC8& /*aMessageParameters*/) - { - // move application to foreground - QApplication::topLevelAt(0,0)->raise(); - return EMessageHandled; - } -}; - void setHomescreenAsSystemAppL(CEikonEnv* eikonEnv) { CApaWindowGroupName* wgName = CApaWindowGroupName::NewLC(eikonEnv->WsSession()); @@ -111,15 +98,13 @@ HSDEBUG(debugMsg); #endif //Q_OS_SYMBIAN - HsAppTranslator *appTranslator = HsAppTranslator::instance(); - appTranslator->setLanguage(); - // add translator for homescreen and application library QTranslator hsTranslator; QTranslator alTranslator; + QTranslator commonTranslator; #ifdef Q_OS_SYMBIAN // TRAP is must here, otherwise it crashes - TRAP_IGNORE( loadTranslationFilesOnSymbian(hsTranslator, alTranslator) ); + TRAP_IGNORE( loadTranslationFilesOnSymbian(commonTranslator, hsTranslator, alTranslator) ); #else QString locale = QLocale::system().name(); QString hsTrFile = QString("homescreen_") + locale; @@ -127,6 +112,7 @@ QString alTrFile = QString("hsapplibrary_") + locale; alTranslator.load(alTrFile, QString(TR_FILE_PATH) ); #endif //Q_OS_SYMBIAN + qApp->installTranslator(&commonTranslator); qApp->installTranslator(&hsTranslator); qApp->installTranslator(&alTranslator); @@ -143,16 +129,9 @@ QObject::connect(&hs, SIGNAL(exit()), &app, SLOT(quit()),Qt::QueuedConnection); hs.start(); - app.installEventFilter(appTranslator); - #ifdef Q_OS_SYMBIAN CEikonEnv * env = CEikonEnv::Static(); -#ifdef S60APP_KEY - env->RootWin().CaptureKeyUpAndDowns( EStdKeyApplication0, 0, 0 ); -#endif //S60APP_KEY TRAP_IGNORE(setHomescreenAsSystemAppL(env)); - HsMessageObserver observer; - TRAP_IGNORE( env->AddMessageObserverL(observer)); #endif //Q_OS_SYMBIAN HSTEST("HS::main() call app.exec"); @@ -251,10 +230,18 @@ /*! * Load translation files. */ -void loadTranslationFilesOnSymbian(QTranslator &hsTranslator, QTranslator &alTranslator) +void loadTranslationFilesOnSymbian(QTranslator &commonTranslator, + QTranslator &hsTranslator, + QTranslator &alTranslator) { + QString locale = QLocale::system().name(); + bool commonLoaded(false); + QString commonTrFile = QString("common_") + locale; + commonLoaded = commonTranslator.load(commonTrFile, QString("z:/") + TR_FILE_PATH); + if (!commonLoaded) { + commonTranslator.load(commonTrFile, QString("c:/") + TR_FILE_PATH); + } bool hsLoaded(false); - QString locale = QLocale::system().name(); QString hsTrFile = QString("homescreen_") + locale; hsLoaded = hsTranslator.load(hsTrFile, QString("z:/") + TR_FILE_PATH); if (!hsLoaded) { diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_anim_longtap_0.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_anim_longtap_0.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,1316 @@ + + + + + + + + + + +]> + + + + + + + + + + + + eJzsvWuPHElyIPidAP9D3QcBMx+6FP4I94jBYoF86uaupWnMY3cO2kWDmubMcLdJNtjd0ul+/dnb +zSMis7JYNVKPVOXNZtEy0sMf5ub2tr/5P776zRe7bz7+09sv0v1w9/rV3/zN4dPbNz98/PSLOwLf +/fLbb3/8/odPCPrZr39+F+AxfGr3y+lrefK/vf30/buPH35Bn/GnZ/z+z3779tPHD28/3P3fb959 +/+Y+3P2Pn51+/9svfvvu7Q8f//ZXP3774//4+c/vfvZzfP6373749i1843cffsDfvvki/NyGAl0f +3/wAn6a/TeFv4xCGu/yLkO6++nt8ZP/xxw/fvPvwp/3H//cXd1+kQn/CMOEf/Pz/fPfrt98/9NDx +4x9+fP/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hYPIoFY9F0IdwIpUCH9LhSDopDETY6n6+AZRX62UX +9vHVg0bn8QlWIxV5/Bd+OwOffsDbCes/1rj1wvr8GrYOLOApoBZIg4e/4N9YEo6j5c8tfAP8+ov+ +Bb8Kv91Z/qStbo/18QG1FxQ4ikrvgU/Si6mI8GIknCK/CAoIL8IS8ovgg/Am+MB6NSy9GVZeFNoK +PxAbi3/+X+voU5w0MIvilB0etrpfw/ayO5rAxfa16v5naO1OwUx118M5eGT9Wg5X69lyaF19z/6B +v8CX5BfA0r2qWv78P8LvWtk= + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_anim_longtap_1.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_anim_longtap_1.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_anim_longtap_2.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_anim_longtap_2.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_anim_longtap_3.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_anim_longtap_3.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_anim_longtap_4.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_anim_longtap_4.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_anim_longtap_5.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_anim_longtap_5.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_anim_longtap_6.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_anim_longtap_6.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_anim_longtap_7.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_anim_longtap_7.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_anim_longtap_8.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_anim_longtap_8.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_anim_longtap_9.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_anim_longtap_9.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_b.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_b.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_bl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_bl.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_br.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_br.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_c.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_c.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_l.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_l.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_r.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_r.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_t.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_t.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_tl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_tl.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_tr.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_tr.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_b.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_b.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,22 @@ + + + +]> + + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_bl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_bl.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,22 @@ + + + +]> + + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_br.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_br.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,22 @@ + + + +]> + + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_c.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_c.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,21 @@ + + + +]> + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_l.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_l.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,22 @@ + + + +]> + + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_r.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_r.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,22 @@ + + + +]> + + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_t.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_t.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,22 @@ + + + +]> + + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_tl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_tl.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,22 @@ + + + +]> + + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_tr.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_fr_hsshortcut_normal_tr.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,22 @@ + + + +]> + + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_graf_clock_day_bg.svg --- a/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_graf_clock_day_bg.svg Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_graf_clock_day_bg.svg Mon May 03 12:24:59 2010 +0300 @@ -1,23 +1,623 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_graf_clock_day_hour.svg --- a/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_graf_clock_day_hour.svg Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_graf_clock_day_hour.svg Mon May 03 12:24:59 2010 +0300 @@ -1,8 +1,17 @@ - - - - - + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_graf_clock_day_min.svg --- a/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_graf_clock_day_min.svg Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_graf_clock_day_min.svg Mon May 03 12:24:59 2010 +0300 @@ -1,8 +1,7 @@ - - - - - + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_graf_clock_day_sec.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsapplication/themes/icons/hbdefault/scalable/qtg_graf_clock_day_sec.svg Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsdomainmodel/hsdomainmodel.pri --- a/homescreenapp/hsdomainmodel/hsdomainmodel.pri Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsdomainmodel/hsdomainmodel.pri Mon May 03 12:24:59 2010 +0300 @@ -23,14 +23,19 @@ ./inc/hsshortcutservice.h \ ./inc/hsshortcutservice_p.h \ ./inc/hswallpaper.h \ - ./inc/hswidgethost.h - + ./inc/hswidgethost.h \ + ./inc/hswidgetcomponentregistry.h \ + ./inc/hswidgetcomponent.h + SOURCES += ./src/hscontentservice.cpp \ ./src/hsdatabase.cpp \ ./src/hspage.cpp \ ./src/hsscene.cpp \ ./src/hsshortcutservice.cpp \ ./src/hswallpaper.cpp \ - ./src/hswidgethost.cpp + ./src/hswidgethost.cpp \ + ./src/hswidgetcomponentregistry.cpp \ + ./src/hswidgetcomponent.cpp + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsdomainmodel/inc/hscontentservice.h --- a/homescreenapp/hsdomainmodel/inc/hscontentservice.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsdomainmodel/inc/hscontentservice.h Mon May 03 12:24:59 2010 +0300 @@ -37,9 +37,14 @@ bool createWidget(const QVariantHash ¶ms); HsWidgetHost *createWidgetForPreview(const QVariantHash ¶ms); + bool addWidget(const QString &uri, const QVariantHash &preferences); + + static HsContentService *instance(); + private: + static QScopedPointer mInstance; + Q_DISABLE_COPY(HsContentService) - }; Q_DECLARE_METATYPE(HsContentService*) diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsdomainmodel/inc/hsdomainmodeldatastructures.h --- a/homescreenapp/hsdomainmodel/inc/hsdomainmodeldatastructures.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsdomainmodel/inc/hsdomainmodeldatastructures.h Mon May 03 12:24:59 2010 +0300 @@ -25,7 +25,9 @@ { public: HsSceneData() - : id(-1), defaultPageId(-1), maximumPageCount(-1) + : id(-1), defaultPageId(-1), maximumPageCount(-1), + maximumWidgetHeight(-1), maximumWidgetWidth(-1), + minimumWidgetHeight(-1), minimumWidgetWidth(-1) {} int id; @@ -33,6 +35,10 @@ QString landscapeWallpaper; int defaultPageId; int maximumPageCount; + int maximumWidgetHeight; + int maximumWidgetWidth; + int minimumWidgetHeight; + int minimumWidgetWidth; }; class HSDOMAINMODEL_EXPORT HsPageData @@ -63,40 +69,19 @@ { public: HsWidgetPresentationData() - : x(0), y(0), width(0), height(0), zValue(0), + : x(0), y(0), zValue(0), widgetId(-1) {} - QRectF geometry() const - { - return QRectF(x, y, width, height); - } - - void setGeometry(const QRectF &geometry) - { - x = geometry.x(); - y = geometry.y(); - width = geometry.width(); - height = geometry.height(); - } - void setPos(const QPointF &pos) { x = pos.x(); y = pos.y(); } - void setSize(const QSizeF &size) - { - width = size.width(); - height = size.height(); - } - QString key; qreal x; qreal y; - qreal width; - qreal height; qreal zValue; int widgetId; }; diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsdomainmodel/inc/hspage.h --- a/homescreenapp/hsdomainmodel/inc/hspage.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsdomainmodel/inc/hspage.h Mon May 03 12:24:59 2010 +0300 @@ -47,16 +47,13 @@ QList newWidgets(); bool addNewWidget(HsWidgetHost *widgetHost); void layoutNewWidgets(); - void resetNewWidgets(); bool deleteFromDatabase(); QList widgets() const; bool isRemovable() const; void setRemovable(bool removable); - - bool updateZValues(); - + static HsPage *createInstance(const HsPageData &pageData); public slots: @@ -64,6 +61,8 @@ void hideWidgets(); void setOnline(bool online = true); + void updateZValues(); + private: void connectWidget(HsWidgetHost *widget); void disconnectWidget(HsWidgetHost *widget); @@ -76,7 +75,6 @@ bool mRemovable; QList mWidgets; QList mNewWidgets; - QMap mStartPoint; HOMESCREEN_TEST_FRIEND_CLASS(TestRuntimeServices) }; diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsdomainmodel/inc/hsscene.h --- a/homescreenapp/hsdomainmodel/inc/hsscene.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsdomainmodel/inc/hsscene.h Mon May 03 12:24:59 2010 +0300 @@ -20,6 +20,8 @@ #include #include +#include + #include "hsdomainmodel_global.h" #include "hstest_global.h" @@ -30,7 +32,7 @@ class HsWallpaper; class HsPage; class HsWidgetHost; - +class HsSceneData; class HSDOMAINMODEL_EXPORT HsScene : public QObject { @@ -55,7 +57,10 @@ HsPage *activePage() const; int activePageIndex() const; int maximumPageCount() const; - + QSizeF maximumWidgetSizeInPixels() const; + QSizeF minimumWidgetSizeInPixels() const; + QSizeF maximumWidgetSizeInUnits() const; + QSizeF minimumWidgetSizeInUnits() const; void setActiveWidget(HsWidgetHost *widget); HsWidgetHost *activeWidget() const; @@ -66,20 +71,26 @@ static HbMainWindow *mainWindow(); static Qt::Orientation orientation(); +protected: + bool eventFilter(QObject *watched, QEvent *event); + private: HsScene(QObject *parent = 0); + void calculateWidgetSizeLimitations(HsSceneData &sceneData); Q_DISABLE_COPY(HsScene) private: - int mDatabaseId; - bool mIsOnline; + int mDatabaseId; HsWallpaper *mWallpaper; QList mPages; - int mMaximumPageCount; HsPage *mActivePage; HsWidgetHost *mActiveWidget; - - + bool mIsOnline; + int mMaximumPageCount; + QSizeF mMaximumWidgetSizeInPixels; + QSizeF mMinimumWidgetSizeInPixels; + QSizeF mMaximumWidgetSizeInUnits; + QSizeF mMinimumWidgetSizeInUnits; static QScopedPointer mInstance; HOMESCREEN_TEST_FRIEND_CLASS(TestRuntimeServices) diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsdomainmodel/inc/hswallpaper.h --- a/homescreenapp/hsdomainmodel/inc/hswallpaper.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsdomainmodel/inc/hswallpaper.h Mon May 03 12:24:59 2010 +0300 @@ -25,7 +25,6 @@ HOMESCREEN_TEST_CLASS(TestRuntimeServices) -class HsWallpaperPrivate; class HSDOMAINMODEL_EXPORT HsWallpaper : public HbWidget { Q_OBJECT diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsdomainmodel/inc/hswidgetcomponent.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsdomainmodel/inc/hswidgetcomponent.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,69 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#ifndef HSWIDGETCOMPONENT_H +#define HSWIDGETCOMPONENT_H + +#include +#include + +#include "hsdomainmodel_global.h" + +#include "hstest_global.h" +HOMESCREEN_TEST_CLASS(TestRuntimeServices) + +#include "cadefs.h" + +class CaEntry; + +class HSDOMAINMODEL_EXPORT HsWidgetComponent : public QObject +{ + Q_OBJECT + Q_PROPERTY(QString rootPath READ rootPath) + Q_PROPERTY(QString uri READ uri) + +public: + ~HsWidgetComponent(); + + QString rootPath() const; + QString uri() const; + +signals: + void aboutToUninstall(); + +private: + Q_DISABLE_COPY(HsWidgetComponent) + HsWidgetComponent(const QString &uri, QObject *parent = 0); + void listenChangeEvents(); + void resolveRootPath(); + void installTranslator(); + void uninstallTranslator(); + +private slots: + void onEntryChanged(const CaEntry &entry, ChangeType changeType); + +private: + QTranslator mTranslator; + QString mUri; + QString mRootPath; + + friend class HsWidgetComponentRegistry; + + HOMESCREEN_TEST_FRIEND_CLASS(TestRuntimeServices) +}; + +#endif // HSWIDGETCOMPONENT_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsdomainmodel/inc/hswidgetcomponentregistry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsdomainmodel/inc/hswidgetcomponentregistry.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,56 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#ifndef HSWIDGETCOMPONENTREGISTRY_H +#define HSWIDGETCOMPONENTREGISTRY_H + +#include + +#include "hsdomainmodeldatastructures.h" +#include "hsdomainmodel_global.h" + +#include "hstest_global.h" +HOMESCREEN_TEST_CLASS(TestRuntimeServices) + +class HsWidgetComponent; +class QSignalMapper; + +class HSDOMAINMODEL_EXPORT HsWidgetComponentRegistry : public QObject +{ + Q_OBJECT + +public: + static HsWidgetComponentRegistry *instance(); + ~HsWidgetComponentRegistry(); + + HsWidgetComponent *component(const QString &uri); + +private: + Q_DISABLE_COPY(HsWidgetComponentRegistry) + HsWidgetComponentRegistry(QObject *parent = 0); + +private slots: + void onAboutToUninstall(const QString &uri); + +private: + QHash mRegistry; + static QScopedPointer mInstance; + QScopedPointer mSignalMapper; + HOMESCREEN_TEST_FRIEND_CLASS(TestRuntimeServices) +}; + +#endif // HSWIDGETCOMPONENTREGISTRY_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsdomainmodel/inc/hswidgethost.h --- a/homescreenapp/hsdomainmodel/inc/hswidgethost.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsdomainmodel/inc/hswidgethost.h Mon May 03 12:24:59 2010 +0300 @@ -28,10 +28,10 @@ #include "hsdomainmodel_global.h" #include "hstest_global.h" -#include "cadefs.h" +class HbIconItem; class HsPage; -class CaEntry; + HOMESCREEN_TEST_CLASS(TestRuntimeServices) @@ -93,18 +93,27 @@ void startDragAnimation(); void startDropAnimation(); + void startTapAndHoldAnimation(); + void stopTapAndHoldAnimation(); + +protected: + void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) { Q_UNUSED(event) } + void mouseMoveEvent(QGraphicsSceneMouseEvent *event) { Q_UNUSED(event) } + void mousePressEvent(QGraphicsSceneMouseEvent *event) { Q_UNUSED(event) } + void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { Q_UNUSED(event) } + bool eventFilter(QObject *obj, QEvent *event); + private: bool setProperty(const char *name, QMetaProperty &property); bool setMethod(const char *signature, QMetaMethod &method); bool hasSignal(const char *signature); bool setPreferencesToWidget(); + void setNewSize(const QSizeF &newSize); private slots: void onSetPreferences(const QStringList &names); void onFinished(); void onError(); - - void onEntryChanged(const CaEntry &entry, ChangeType changeType); private: Q_DISABLE_COPY(HsWidgetHost) @@ -115,10 +124,12 @@ QMetaMethod mOnHideMethod; QMetaMethod mOnUninitializeMethod; QMetaProperty mIsOnlineProperty; + QMetaProperty mRootPathProperty; State mState; - + QString mUri; int mDatabaseId; - QString mUri; + + HbIconItem *mTapAndHoldIcon; HOMESCREEN_TEST_FRIEND_CLASS(TestRuntimeServices) }; diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsdomainmodel/src/hscontentservice.cpp --- a/homescreenapp/hsdomainmodel/src/hscontentservice.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsdomainmodel/src/hscontentservice.cpp Mon May 03 12:24:59 2010 +0300 @@ -64,3 +64,45 @@ return widget; } + +/*! + +*/ +bool HsContentService::addWidget(const QString &uri, const QVariantHash &preferences) +{ + HsWidgetData widgetData; + widgetData.uri = uri; + + QScopedPointer widget(HsWidgetHost::createInstance(widgetData, preferences)); + if (!widget.data()) { + return false; + } + + HsPage *activePage = HsScene::instance()->activePage(); + if (!widget->load() || !activePage->addNewWidget(widget.data())) { + widget->deleteFromDatabase(); + return false; + } + + HsWidgetHost *taken = widget.take(); + taken->initializeWidget(); + taken->showWidget(); + activePage->layoutNewWidgets(); + return true; +} + +/*! + +*/ +HsContentService *HsContentService::instance() +{ + if (!mInstance) { + mInstance.reset(new HsContentService); + } + return mInstance.data(); +} + +/*! + Points to the content service instance. +*/ +QScopedPointer HsContentService::mInstance(0); diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsdomainmodel/src/hsdatabase.cpp --- a/homescreenapp/hsdomainmodel/src/hsdatabase.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsdomainmodel/src/hsdatabase.cpp Mon May 03 12:24:59 2010 +0300 @@ -30,7 +30,8 @@ QVariantList toVariantList(const QList &list) { QVariantList vlist; - foreach (T item, list) { + for (int i=0; i deleteKeys = data.keys(QVariant()); QVariantHash insertOrReplaceData(data); - foreach (QString key, deleteKeys) { - insertOrReplaceData.remove(key); + for (int i=0; iwidgetPresentationData(key, presentation)) { presentation.key = key; presentation.setPos(QPointF()); - presentation.setSize(widgetHost->preferredSize()); presentation.zValue = 0; widgetHost->setWidgetPresentationData(presentation); } widgetHost->hide(); - widgetHost->setGeometry(presentation.geometry()); + widgetHost->setPos(presentation.x, presentation.y); widgetHost->setZValue(presentation.zValue); connectWidget(widgetHost); @@ -208,7 +204,7 @@ HsWidgetPositioningOnWidgetAdd::instance(); QList calculatedRects = - algorithm->convert(HsScene::mainWindow()->layoutRect(), rects, mStartPoint[key]); + algorithm->convert(HsScene::mainWindow()->layoutRect(), rects, QPointF()); updateZValues(); @@ -221,18 +217,10 @@ widget->setParentItem(this); widget->show(); } - mStartPoint[key] = widget->geometry().bottomRight(); mWidgets << mNewWidgets; mNewWidgets.clear(); } -/*! - Resets the new widgets list -*/ -void HsPage::resetNewWidgets() -{ - mNewWidgets.clear(); -} bool HsPage::deleteFromDatabase() { @@ -273,40 +261,6 @@ mRemovable = removable; } -bool HsPage::updateZValues() -{ - int z = 0; - - if (!mWidgets.isEmpty()) { - QMultiMap map; - foreach (HsWidgetHost *widget, mWidgets) { - map.insert(widget->zValue(), widget); - } - - QList sortedWidgets = map.values(); - - HsWidgetHost *activeWidget = HsScene::instance()->activeWidget(); - if (sortedWidgets.contains(activeWidget)) { - sortedWidgets.removeOne(activeWidget); - sortedWidgets.append(activeWidget); - } - - foreach (HsWidgetHost *widget, sortedWidgets) { - widget->setZValue(z++); - widget->setWidgetPresentation(); - } - } - - if (!mNewWidgets.isEmpty()) { - foreach (HsWidgetHost *widget, mNewWidgets) { - widget->setZValue(z++); - widget->setWidgetPresentation(); - } - } - - return true; -} - HsPage *HsPage::createInstance(const HsPageData &pageData) { HsDatabase *db = HsDatabase::instance(); @@ -359,6 +313,38 @@ } } +void HsPage::updateZValues() +{ + int z = 0; + + if (!mWidgets.isEmpty()) { + QMultiMap map; + foreach (HsWidgetHost *widget, mWidgets) { + map.insert(widget->zValue(), widget); + } + + QList sortedWidgets = map.values(); + + HsWidgetHost *activeWidget = HsScene::instance()->activeWidget(); + if (sortedWidgets.contains(activeWidget)) { + sortedWidgets.removeOne(activeWidget); + sortedWidgets.append(activeWidget); + } + + foreach (HsWidgetHost *widget, sortedWidgets) { + widget->setZValue(z++); + widget->setWidgetPresentation(); + } + } + + if (!mNewWidgets.isEmpty()) { + foreach (HsWidgetHost *widget, mNewWidgets) { + widget->setZValue(z++); + widget->setWidgetPresentation(); + } + } +} + void HsPage::connectWidget(HsWidgetHost *widget) { connect(widget, SIGNAL(widgetFinished(HsWidgetHost*)), diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsdomainmodel/src/hsscene.cpp --- a/homescreenapp/hsdomainmodel/src/hsscene.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsdomainmodel/src/hsscene.cpp Mon May 03 12:24:59 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -15,15 +15,18 @@ * */ +#include + #include +#include +#include + #include "hsdomainmodeldatastructures.h" #include "hsscene.h" #include "hspage.h" #include "hswidgethost.h" #include "hsdatabase.h" #include "hswallpaper.h" -#include "hsdatabase.h" - /*! Destructor. @@ -54,6 +57,10 @@ return false; } + mMaximumPageCount = sceneData.maximumPageCount; + + calculateWidgetSizeLimitations(sceneData); + if (sceneData.portraitWallpaper.isEmpty()) { mWallpaper->setImagesById(); } else { @@ -81,12 +88,31 @@ mActivePage->setRemovable(false); } } - - mMaximumPageCount = sceneData.maximumPageCount; + + QApplication::instance()->installEventFilter(this); + return true; } /*! + Calculate maximum and minimum widget sizes +*/ +void HsScene::calculateWidgetSizeLimitations(HsSceneData &sceneData) +{ + // 1un = 6.7px = 2mm + mMaximumWidgetSizeInUnits = QSizeF(sceneData.maximumWidgetWidth, + sceneData.maximumWidgetHeight); + mMinimumWidgetSizeInUnits = QSizeF(sceneData.minimumWidgetWidth, + sceneData.minimumWidgetHeight); + HbDeviceProfile profile; + qreal unitToPixelFactor = profile.unitValue(); + mMaximumWidgetSizeInPixels = QSizeF(sceneData.maximumWidgetWidth * unitToPixelFactor, + sceneData.maximumWidgetHeight * unitToPixelFactor); + mMinimumWidgetSizeInPixels = QSizeF(sceneData.minimumWidgetWidth * unitToPixelFactor, + sceneData.minimumWidgetHeight * unitToPixelFactor); +} + +/*! Return wallpaper. */ HsWallpaper *HsScene::wallpaper() const @@ -245,6 +271,38 @@ } /*! + Return maximum widget size in pixels. +*/ +QSizeF HsScene::maximumWidgetSizeInPixels() const +{ + return mMaximumWidgetSizeInPixels; +} + +/*! + Return minimum widget size in pixels. +*/ +QSizeF HsScene::minimumWidgetSizeInPixels() const +{ + return mMinimumWidgetSizeInPixels; +} + +/*! + Return maximum widget size in units. +*/ +QSizeF HsScene::maximumWidgetSizeInUnits() const +{ + return mMaximumWidgetSizeInUnits; +} + +/*! + Return minimum widget size in units. +*/ +QSizeF HsScene::minimumWidgetSizeInUnits() const +{ + return mMinimumWidgetSizeInUnits; +} + +/*! Set active widget \a widget. */ void HsScene::setActiveWidget(HsWidgetHost *widget) @@ -284,13 +342,21 @@ */ HsScene *HsScene::instance() { - if (mInstance.isNull()) { + if (!mInstance) { mInstance.reset(new HsScene); } return mInstance.data(); } /*! + Return main window. +*/ +HbMainWindow *HsScene::mainWindow() +{ + return hbInstance->allMainWindows().first(); +} + +/*! Return current orientation. */ Qt::Orientation HsScene::orientation() @@ -299,11 +365,21 @@ } /*! - Return main window. + Listens for application background/foreground changes. */ -HbMainWindow *HsScene::mainWindow() +bool HsScene::eventFilter(QObject *watched, QEvent *event) { - return hbInstance->allMainWindows().first(); + switch (event->type()) { + case QEvent::ApplicationActivate: + mActivePage->showWidgets(); + break; + case QEvent::ApplicationDeactivate: + mActivePage->hideWidgets(); + break; + default: + break; + } + return QObject::eventFilter(watched, event); } /*! @@ -311,13 +387,16 @@ */ HsScene::HsScene(QObject *parent) : QObject(parent), - mDatabaseId(-1), + mDatabaseId(-1), + mWallpaper(0), + mActivePage(0), + mActiveWidget(0), mIsOnline(true), - mWallpaper(0), mMaximumPageCount(1), - mActivePage(0), - mActiveWidget(0) - + mMaximumWidgetSizeInPixels(341, 268), + mMinimumWidgetSizeInPixels(20, 20), + mMaximumWidgetSizeInUnits(51, 40), + mMinimumWidgetSizeInUnits(3, 3) { mWallpaper = new HsWallpaper; } diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsdomainmodel/src/hswallpaper.cpp --- a/homescreenapp/hsdomainmodel/src/hswallpaper.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsdomainmodel/src/hswallpaper.cpp Mon May 03 12:24:59 2010 +0300 @@ -95,7 +95,7 @@ QDir::toNativeSeparators("c:/private/20022f35/wallpapers/"); #else static QString directory = - QDir::toNativeSeparators(QDir::currentPath() + "/wallpapers/"); + QDir::toNativeSeparators(QDir::currentPath() + "/private/20022f35/wallpapers/"); #endif return directory; diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsdomainmodel/src/hswidgetcomponent.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsdomainmodel/src/hswidgetcomponent.cpp Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,153 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#include +#include + +#include "hswidgetcomponentregistry.h" +#include "hswidgetcomponent.h" +#include "hsapp_defs.h" +#include "caservice.h" +#include "caquery.h" +#include "canotifier.h" + +/*! + +*/ +HsWidgetComponent::~HsWidgetComponent() +{ +} + +/*! + +*/ +QString HsWidgetComponent::rootPath() const +{ + return mRootPath; +} + +/*! + +*/ +QString HsWidgetComponent::uri() const +{ + return mUri; +} + +/*! + +*/ +HsWidgetComponent::HsWidgetComponent(const QString &uri, QObject *parent) + : QObject(parent), + mUri(uri) +{ + listenChangeEvents(); + resolveRootPath(); + installTranslator(); +} + +/*! + +*/ +void HsWidgetComponent::listenChangeEvents() +{ + CaQuery query; + query.setEntryTypeNames(QStringList(widgetTypeName())); + CaNotifierFilter filter(query); + CaNotifier *notifier = CaService::instance()->createNotifier(filter); + notifier->setParent(this); + connect(notifier, + SIGNAL(entryChanged(CaEntry,ChangeType)), + SLOT(onEntryChanged(CaEntry,ChangeType))); +} + +/*! + +*/ +void HsWidgetComponent::resolveRootPath() +{ + CaQuery query; + query.setEntryTypeNames(QStringList(widgetTypeName())); + query.setAttribute(widgetUriAttributeName(), mUri); + QList< QSharedPointer > widgetEntries = CaService::instance()->getEntries(query); + + if (widgetEntries.isEmpty()) { + return; + } + QSharedPointer entry = widgetEntries.first(); + mRootPath = entry->attribute(widgetPathAttributeName()); +} + +/*! + +*/ +void HsWidgetComponent::installTranslator() +{ + QStringList possiblePaths; +#ifdef Q_OS_WIN32 + possiblePaths << "resource/qt/translations"; +#else + + QDir currentDir(mRootPath); + if (!currentDir.exists() || mRootPath.isEmpty()) { + return; + } + while (currentDir.cdUp()) {} + QString drive = currentDir.path(); + drive.append("resource/qt/translations"); + possiblePaths << drive; + // if it is not in installed,then check z drive + possiblePaths << "z:/resource/qt/translations"; +#endif + + for(int i=0; i +QScopedPointer HsWidgetComponentRegistry::mInstance(0); + +/*! + +*/ +HsWidgetComponentRegistry* HsWidgetComponentRegistry::instance() +{ + if (!mInstance) { + mInstance.reset(new HsWidgetComponentRegistry); + } + return mInstance.data(); +} + +/*! + +*/ +HsWidgetComponentRegistry::~HsWidgetComponentRegistry() +{ + qDeleteAll(mRegistry); +} + +/*! + +*/ +HsWidgetComponent *HsWidgetComponentRegistry::component(const QString &uri) +{ + if (mRegistry.contains(uri)) { + return mRegistry.value(uri); + } + + QScopedPointer c(new HsWidgetComponent(uri)); + mRegistry.insert(uri, c.data()); + connect(c.data(), SIGNAL(aboutToUninstall()), mSignalMapper.data(), + SLOT(map())); + mSignalMapper->setMapping(c.data(),uri); + return c.take(); +} + +/*! + +*/ +HsWidgetComponentRegistry::HsWidgetComponentRegistry(QObject *parent) + : QObject(parent),mSignalMapper(new QSignalMapper()) +{ + connect(mSignalMapper.data(),SIGNAL(mapped(QString)),SLOT(onAboutToUninstall(QString))); +} + +/*! + +*/ +void HsWidgetComponentRegistry::onAboutToUninstall(const QString &uri) +{ + if (mRegistry.contains(uri)) { + mRegistry.take(uri)->deleteLater(); + } +} diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsdomainmodel/src/hswidgethost.cpp --- a/homescreenapp/hsdomainmodel/src/hswidgethost.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsdomainmodel/src/hswidgethost.cpp Mon May 03 12:24:59 2010 +0300 @@ -20,6 +20,8 @@ #include #include #include +#include + #include #include #include @@ -32,12 +34,8 @@ #include "hspage.h" #include "hsapp_defs.h" #include "hsscene.h" -#include "cadefs.h" -#include "canotifier.h" -#include "canotifierfilter.h" -#include "caservice.h" -#include "caquery.h" -#include "caentry.h" +#include "hswidgetcomponentregistry.h" +#include "hswidgetcomponent.h" QTM_USE_NAMESPACE @@ -71,16 +69,10 @@ mWidget(0), mPage(0), mState(Constructed), - mDatabaseId(databaseId) + mDatabaseId(databaseId), + mTapAndHoldIcon(0) { - CaQuery query; - query.setEntryTypeNames(QStringList(widgetTypeName())); - CaNotifierFilter filter(query); - CaNotifier *notifier = CaService::instance()->createNotifier(filter); - notifier->setParent(this); - connect(notifier, - SIGNAL(entryChanged(CaEntry,ChangeType)), - SLOT(onEntryChanged(CaEntry,ChangeType)), Qt::QueuedConnection); + setFlags(QGraphicsItem::ItemClipsChildrenToShape); /* TODO: Uncomment after the Qt bug has been fixed. QGraphicsDropShadowEffect *effect = @@ -98,6 +90,7 @@ HsWidgetHost::~HsWidgetHost() { } + /*! Load hosted widget from plugin and validate it. Returns true if widget construction is successfull. @@ -117,8 +110,7 @@ return false; } - mUri = data.uri; - + mUri = data.uri; // Create the hosted widget. QServiceManager manager; QServiceFilter filter("com.nokia.symbian.IHomeScreenWidget"); @@ -140,6 +132,8 @@ } setProperty("isOnline", mIsOnlineProperty); + setProperty("rootPath", mRootPathProperty); + setMethod("onInitialize()", mOnInitializeMethod); setMethod("onUninitialize()", mOnUninitializeMethod); @@ -155,13 +149,18 @@ connect(mWidget, SIGNAL(error()), SLOT(onError())); } + + mWidget->installEventFilter(this); - loadWidgetPresentation(); + loadWidgetPresentation(); - QGraphicsLinearLayout *layout = new QGraphicsLinearLayout; - layout->setContentsMargins(0, 0, 0, 0); - layout->addItem(mWidget); - setLayout(layout); + HsScene *scene = HsScene::instance(); + setMaximumSize(scene->maximumWidgetSizeInPixels()); + setMinimumSize(scene->minimumWidgetSizeInPixels()); + + mWidget->setParentItem(this); + + setNewSize(mWidget->size()); return true; } @@ -243,7 +242,6 @@ HsWidgetPresentationData data; data.key = key; data.setPos(pos()); - data.setSize(size()); data.zValue = zValue(); data.widgetId = databaseId(); @@ -251,8 +249,7 @@ } /*! - Set widget presentation data. Return true if successfull - + Set widget presentation data. Return true if successfull. */ bool HsWidgetHost::setWidgetPresentationData(HsWidgetPresentationData &presentationData) { @@ -316,7 +313,7 @@ return false; } - setGeometry(data.geometry()); + setPos(data.x, data.y); setZValue(data.zValue); return true; @@ -358,7 +355,12 @@ if (mState != Constructed) { return; } - + // bind component to instance + HsWidgetComponent *component = HsWidgetComponentRegistry::instance()->component(mUri); + Q_ASSERT(component); + connect(component, SIGNAL(aboutToUninstall()), SLOT(onFinished()),Qt::QueuedConnection); + mRootPathProperty.write(mWidget, component->rootPath()); + setPreferencesToWidget(); setOnline(HsScene::instance()->isOnline()); mOnInitializeMethod.invoke(mWidget); @@ -405,7 +407,8 @@ void HsWidgetHost::uninitializeWidget() { if (mState != Visible && - mState != Hidden) { + mState != Hidden && + mState != Finished) { return; } @@ -480,6 +483,40 @@ } /*! + Starts the tap-and-hold animation. +*/ +void HsWidgetHost::startTapAndHoldAnimation() +{ + mTapAndHoldIcon = new HbIconItem("tapandhold_animation"); + mTapAndHoldIcon->setZValue(1e6); + mTapAndHoldIcon->setParentItem(this); +} + +/*! + Stops the tap-and-hold animation. +*/ +void HsWidgetHost::stopTapAndHoldAnimation() +{ + delete mTapAndHoldIcon; + mTapAndHoldIcon = 0; +} + +/*! + Filters resize events from widgets and resizes inside max/min size boundaries if needed. +*/ +bool HsWidgetHost::eventFilter(QObject *obj, QEvent *event) +{ + if (event->type() == QEvent::GraphicsSceneResize ) { + QGraphicsSceneResizeEvent *resizeEvent = static_cast(event); + setNewSize(resizeEvent->newSize()); + return true; + } else { + // standard event processing + return HbWidget::eventFilter(obj, event); + } +} + +/*! Checks if a property with the given \a name in the contained widget. If the property exists the \a metaProperty is made to reference to it. Returns true if @@ -544,6 +581,15 @@ } /*! + Resizes and sets preferred size for widget layouts +*/ +void HsWidgetHost::setNewSize(const QSizeF &newSize) +{ + resize(newSize); + setPreferredSize(newSize); +} + +/*! This slot is connected to the contained widget's setPreferences() signal, if it was defined for the widget. The widget emits the signal for persisting @@ -595,18 +641,4 @@ emit widgetError(this); } -/*! - This slot reacts to \a entry change that is described with - \a changeType. On remove change type, onFinished() signal is - emitted. -*/ -void HsWidgetHost::onEntryChanged(const CaEntry &entry, - ChangeType changeType) -{ - if (changeType == RemoveChangeType) { - QString uri = entry.attribute(widgetUriAttributeName()); - if (uri == mUri) { - onFinished(); - } - } -} + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hshomescreenclientplugin/hshomescreenclientplugin.pro --- a/homescreenapp/hshomescreenclientplugin/hshomescreenclientplugin.pro Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hshomescreenclientplugin/hshomescreenclientplugin.pro Mon May 03 12:24:59 2010 +0300 @@ -16,11 +16,11 @@ TEMPLATE = lib -CONFIG += plugin hb mobility console +CONFIG += plugin hb mobility console hs_public_plugin MOBILITY = serviceframework -PLUGIN_SUBDIR = /hsresources/plugins/homescreenclientplugin - +PLUGIN_SUBDIR = /resource/qt/plugins + include (../common.pri) DEPENDPATH += ./inc \ @@ -31,6 +31,7 @@ symbian: { TARGET.UID3 = 0x20022F72 LIBS += -lxqservice + LIBS += -lxqserviceutil } win32: { diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hshomescreenclientplugin/inc/hshomescreenclient.h --- a/homescreenapp/hshomescreenclientplugin/inc/hshomescreenclient.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hshomescreenclientplugin/inc/hshomescreenclient.h Mon May 03 12:24:59 2010 +0300 @@ -37,10 +37,12 @@ public slots: bool addWidget(const QString &uri, const QVariantHash &preferences); + bool setWallpaper(const QString &fileName); private slots: void onRequestCompleted(const QVariant &result); void onRequestError(int error); void doAddWidget(const QString &uri, const QVariantHash &preferences); + void doSetWallpaper(const QString &fileName); signals: void requestFinished(); private: diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hshomescreenclientplugin/resource/hshomescreenclientplugin.s60xml --- a/homescreenapp/hshomescreenclientplugin/resource/hshomescreenclientplugin.s60xml Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - hshomescreenclientplugin - z:/hsresources/plugins/homescreenclientplugin/hshomescreenclientplugin.qtplugin - Homescreen client plugin - - com.nokia.symbian.IHomeScreenClient - 1.0 - Homescreen exposed service interface - - - diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hshomescreenclientplugin/src/hshomescreenclient.cpp --- a/homescreenapp/hshomescreenclientplugin/src/hshomescreenclient.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hshomescreenclientplugin/src/hshomescreenclient.cpp Mon May 03 12:24:59 2010 +0300 @@ -16,9 +16,24 @@ */ #include "hshomescreenclient.h" #include +#include #include const char INTERFACE_NAME[] = "com.nokia.services.hsapplication.IHomeScreenClient"; + + +/*! + \class HsHomescreenClient + \ingroup group_hshomescreenclient + \brief Implements home screen client api, see @page_homescreenclientapi for + usage details. + +*/ + + +/*! + Constructor +*/ HsHomescreenClient::HsHomescreenClient(QObject *parent) :QObject(parent), mAsyncRequest(0), @@ -26,11 +41,20 @@ { } +/*! + Destructor +*/ HsHomescreenClient::~HsHomescreenClient() { delete mAsyncRequest; } +/*! + Adds new widget, with the given \a uri and \a preferences, + to the active home screen page. + Note that \a preferences is dependent on the + widget implementation and it can be empty if widget does not have any preferences see @ref sssection_setpreferences. + */ bool HsHomescreenClient::addWidget( const QString &uri, const QVariantHash &preferences) @@ -43,19 +67,46 @@ return mRequestResult; } + +/*! + Sets wallpaper \a fileName. Filename should include full path to the image file. + */ +bool HsHomescreenClient::setWallpaper(const QString &fileName) +{ + QEventLoop eventLoop; + connect(this, SIGNAL(requestFinished()), &eventLoop, SLOT(quit())); + QMetaObject::invokeMethod( + this, + "doSetWallpaper", + Qt::QueuedConnection, + Q_ARG(QString,fileName)); + eventLoop.exec(); + + return mRequestResult; +} +/*! + Called when request is completed. + */ void HsHomescreenClient::onRequestCompleted(const QVariant &result) { mRequestResult = result.toBool(); emit requestFinished(); } +/*! + Called when request has some errors. + */ void HsHomescreenClient::onRequestError(int error) { Q_UNUSED(error) emit requestFinished(); } +/*! + * Uses Qt Highway to send 'addWidget' request to home screen application. + * \a uri and \a preferences as in widget model. + */ void HsHomescreenClient::doAddWidget( const QString &uri, const QVariantHash &preferences) @@ -63,18 +114,49 @@ delete mAsyncRequest; mAsyncRequest = 0; mAsyncRequest = new XQServiceRequest(INTERFACE_NAME, - "addWidget(QString,QVariantHash)",false); + "addWidget(QString,QVariantHash)", false); + + XQRequestInfo requestInfo = mAsyncRequest->info(); + requestInfo.setBackground(true); + mAsyncRequest->setInfo(requestInfo); + *mAsyncRequest << uri; *mAsyncRequest << preferences; connect(mAsyncRequest, SIGNAL(requestCompleted(QVariant)), - SLOT(onRequestCompleted(QVariant))); + SLOT(onRequestCompleted(QVariant))); connect(mAsyncRequest, SIGNAL(requestError(int)), - SLOT(onRequestError(int))); + SLOT(onRequestError(int))); mRequestResult = false; - bool res=mAsyncRequest->send(); - if(!res){ + if (!mAsyncRequest->send()) { + emit requestFinished(); + } +} + +/*! + * Uses Qt Highway to send 'setWallpaper' request to home screen application. + * \a fileName full path to the image file. + */ +void HsHomescreenClient::doSetWallpaper(const QString &fileName) +{ + delete mAsyncRequest; + mAsyncRequest = 0; + mAsyncRequest = new XQServiceRequest(INTERFACE_NAME, + "setWallpaper(QString)", false); + XQRequestInfo requestInfo = mAsyncRequest->info(); + requestInfo.setBackground(true); + mAsyncRequest->setInfo(requestInfo); + + *mAsyncRequest << fileName; + + connect(mAsyncRequest, SIGNAL(requestCompleted(QVariant)), + SLOT(onRequestCompleted(QVariant))); + connect(mAsyncRequest, SIGNAL(requestError(int)), + SLOT(onRequestError(int))); + + mRequestResult = false; + if (!mAsyncRequest->send()) { emit requestFinished(); } diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hshomescreenclientplugin/tsrc/t_hshomescreenclientplugin/decision_cov_emulator.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hshomescreenclientplugin/tsrc/t_hshomescreenclientplugin/decision_cov_emulator.pl Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,54 @@ +# +# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: Script for running branch coverage test +# + +#USAGE: +# Usage: decision_cov.pl [-make=command] +# -make=instrument || run || ctcpost + +# import module +use Getopt::Long; + +# read options +my $make = "all"; +my $success = GetOptions ("make=s" => \$make); + +if($make) { + if (($make eq "instrument") || ($make eq "all")) { + system("del mon.sym"); + system("del mon.dat"); + system("del profile.txt"); + system("rmdir /s /q CTCFUNCTION"); + system("rmdir /s /q CTCDECISION"); + system("call qmake -config coverage"); + system("call sbs -c winscw_udeb.test"); + system("call sbs -c winscw_udeb.test clean"); + system("call sbs -c winscw_udeb clean"); + system("call sbs -c winscw_udeb"); + system("call ctcwrap -i fd -2comp -no-conf-check -C EXCLUDE=* -C NO_EXCLUDE=./../../src/* sbs -c winscw_udeb.test"); + } + if (($make eq "run") || ($make eq "all")) { + system("call \\epoc32\\release\\winscw\\udeb\\t_hshomescreenclientplugin.exe -o c:\\t_hshomescreenclientplugin.log"); + } + if (($make eq "ctcpost") || ($make eq "all")) { + system("call ctcpost -ff -p profile.txt"); + system("call ctc2html -nsb -i profile.txt -o CTCFUNCTION"); + system("call del profile.txt"); + system("call ctcpost -fd -p profile.txt"); + system("call ctc2html -nsb -i profile.txt -o CTCDECISION"); + system("call del profile.txt"); + } +} +print "END.\n"; diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hshomescreenclientplugin/tsrc/t_hshomescreenclientplugin/inc/t_hshomescreenclientplugin.h --- a/homescreenapp/hshomescreenclientplugin/tsrc/t_hshomescreenclientplugin/inc/t_hshomescreenclientplugin.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hshomescreenclientplugin/tsrc/t_hshomescreenclientplugin/inc/t_hshomescreenclientplugin.h Mon May 03 12:24:59 2010 +0300 @@ -39,6 +39,8 @@ void testConstruction(); void testAddWidget(); void testAddInvalidWidget(); + void testSetWallpaper(); + void testOnRequestError(); signals: void onRequestCompletedTest(const QVariant &result); diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hshomescreenclientplugin/tsrc/t_hshomescreenclientplugin/src/t_hshomescreenclientplugin.cpp --- a/homescreenapp/hshomescreenclientplugin/tsrc/t_hshomescreenclientplugin/src/t_hshomescreenclientplugin.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hshomescreenclientplugin/tsrc/t_hshomescreenclientplugin/src/t_hshomescreenclientplugin.cpp Mon May 03 12:24:59 2010 +0300 @@ -85,4 +85,43 @@ delete client; } +// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- +// +void HsHomescreenClientPluginTest::testSetWallpaper() +{ + HsHomescreenClient *client = new HsHomescreenClient; + + QSignalSpy requestFinishedSpy(client, SIGNAL(requestFinished())); + + bool result = client->setWallpaper("wallpaper"); + + // but emit correct signals + connect(this, SIGNAL(onRequestCompletedTest(QVariant)), client, SLOT(onRequestCompleted(QVariant))); + emit onRequestCompletedTest(true); + + QVERIFY(requestFinishedSpy.count()); + QVERIFY(client->mRequestResult); + + delete client; +} + +// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- +// +void HsHomescreenClientPluginTest::testOnRequestError() +{ + HsHomescreenClient *client = new HsHomescreenClient; + + QSignalSpy requestFinishedSpy(client, SIGNAL(requestFinished())); + + client->onRequestError(-1); + + QVERIFY(requestFinishedSpy.count()); + QVERIFY(!client->mRequestResult); + + delete client; +} + + QTEST_MAIN(HsHomescreenClientPluginTest) diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hshomescreenclientplugin/tsrc/t_hshomescreenclientplugin/t_hshomescreenclientplugin.pro --- a/homescreenapp/hshomescreenclientplugin/tsrc/t_hshomescreenclientplugin/t_hshomescreenclientplugin.pro Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hshomescreenclientplugin/tsrc/t_hshomescreenclientplugin/t_hshomescreenclientplugin.pro Mon May 03 12:24:59 2010 +0300 @@ -50,6 +50,7 @@ TARGET.CAPABILITY = CAP_APPLICATION AllFiles TARGET.EPOCHEAPSIZE = 0x20000 0x1000000 // 128kB - 16MB LIBS += -lxqservice + LIBS += -lxqserviceutil } else { error("Only Symbian supported!") } diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsmenuclientplugin/hsmenuclientplugin.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsmenuclientplugin/hsmenuclientplugin.pro Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,44 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +TEMPLATE = lib + +CONFIG += plugin mobility hs_public_plugin +MOBILITY = serviceframework + +PLUGIN_SUBDIR = /resource/qt/plugins + +LIBS += -lcaclient + +INCLUDEPATH += inc + +HEADERS += inc/hsmenuclient.h \ + inc/hsmenuclientplugin.h \ + +SOURCES += src/hsmenuclient.cpp \ + src/hsmenuclientplugin.cpp \ + +symbian: { + TARGET.UID3 = 0x20028715 +#export interface header to platform +BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include " +BLD_INF_RULES.prj_exports += "inc/hsmenuclient.h \ + APP_LAYER_PLATFORM_EXPORT_PATH(hsmenuclient.h)" +} + +include(../common.pri) + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsmenuclientplugin/inc/hsmenuclient.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsmenuclientplugin/inc/hsmenuclient.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: hsmenuclient.h + * + */ + +#ifndef HSMENUCLIENT_H +#define HSMENUCLIENT_H + +#include +#include +#include + +QTM_USE_NAMESPACE + +//mandatory keys +const QString hsItemName("item:name"); +const QString hsitemLaunchUri("item:launchuri"); +const QString hsitemPublisherId("item:publisherId"); + +//not mandatory +const QString hsItemWidgetUri("widget:uri"); +const QString hsItemDescription("item:description"); + +//for icon - not mandatory +const QString hsIconFileName("icon:filename");//to display specific icon from file +const QString hsIconName("icon:name");// HbIcon +const QString hsIconApplicationId("icon:applicationid"); // icon from associated application + + +class HsMenuClientPrivate; + +class HsMenuClient : public QObject +{ + Q_OBJECT + +public: + HsMenuClient(QObject *parent = 0); + ~HsMenuClient(); +public slots: + bool add(const QVariantMap &entryPreference = QVariantMap()); + bool remove(const QVariantMap &queryPreference = QVariantMap()) const; + + QList getList(const QVariantMap &queryPreference = QVariantMap()); + +private: + Q_DISABLE_COPY(HsMenuClient) + /** + * Pointer to a private implementation. + */ + HsMenuClientPrivate * const m_d; +}; + + + +#endif // HSMENUCLIENT_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsmenuclientplugin/inc/hsmenuclient_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsmenuclientplugin/inc/hsmenuclient_p.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: hsmenuclient_p.h + * + */ + +#ifndef HSMENUCLIENT_PRIVATE_H +#define HSMENUCLIENT_PRIVATE_H + +// hidden +const QString hsItemId("id"); + +class HsMenuClient; + +class HsMenuClientPrivate +{ + +public: + + explicit HsMenuClientPrivate(HsMenuClient *publishPublic); + ~HsMenuClientPrivate(); + bool add(const QVariantMap &entryPreference = QVariantMap()); + bool remove(const QVariantMap &queryPreference = QVariantMap()) const; + QList getList(const QVariantMap &queryPreference = QVariantMap()); + +private: + /** + * Points to the HsMenuClient instance that uses this private implementation. + */ + HsMenuClient *const m_q; +}; + +#endif //HSMENUCLIENT_PRIVATE_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsmenuclientplugin/inc/hsmenuclientplugin.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsmenuclientplugin/inc/hsmenuclientplugin.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,37 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Plugin factory. +* +*/ + +#ifndef HSMENUCLIENTPLUGIN_H +#define HSMENUCLIENTPLUGIN_H + +#include +#include + +QTM_USE_NAMESPACE + +class HsMenuClientPlugin : public QObject, public QServicePluginInterface +{ + Q_OBJECT + Q_INTERFACES(QtMobility::QServicePluginInterface) + +public: + QObject *createInstance(const QServiceInterfaceDescriptor &descriptor, + QServiceContext *context, + QAbstractSecuritySession *session); +}; + +#endif //HSMENUCLIENTPLUGIN_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsmenuclientplugin/resource/hsmenuclientplugin.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsmenuclientplugin/resource/hsmenuclientplugin.xml Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,12 @@ + + + hsmenuclientplugin + hsmenuclient + HsMenu Client plugin + + com.nokia.symbian.IMenuClient + 1.0 + HsMenu Client exposed service interface + + + \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsmenuclientplugin/src/hsmenuclient.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsmenuclientplugin/src/hsmenuclient.cpp Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,220 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: hsmenuclient.cpp + * + */ + +#include +#include + +#include "hsapp_defs.h" +#include "caquery.h" +#include "caentry.h" +#include "caicondescription.h" +#include "caservice.h" + +#include "hsmenuclient.h" +#include "hsmenuclient_p.h" + + +/*! + \class HsMenuClient + \ingroup group_hsmenuclient + \brief Implements home screen menu api, see \ref page_hsmenuclient for + usage details. + +*/ + +HsMenuClient::HsMenuClient(QObject *parent) + :QObject(parent), m_d(new HsMenuClientPrivate(this)) +{ + +} + +HsMenuClient::~HsMenuClient() +{ + delete m_d; +} + +/*! + Add an Templated Application Entry or Update if entryPreferences contains paramter id see + \ref page_hsmenuclient for exmaple usages + \param entryPreference entry prefereneces + \retval true if operation was successful + */ +bool HsMenuClient::add(const QVariantMap &entryPreference) +{ + return m_d->add(entryPreference); +} +/*! + Remove an Templated Application Entry see + \ref page_gsmenuclient for exmaple usages + \param entry entry prefereneces + \retval true if operation was successful + */ +bool HsMenuClient::remove(const QVariantMap &entry) const +{ + return m_d->remove(entry); +} +/*! + Get list of Templated Application Entrys see + \ref page_hsmenuclient for exmaple usages + \param queryPreference prefereneces for query db + \retval QList + */ +QList HsMenuClient::getList(const QVariantMap &queryPreference) +{ + return m_d->getList(queryPreference); +} + +/*! + Constructor + \param publishPublic pointer to public contentPublish + */ +HsMenuClientPrivate::HsMenuClientPrivate(HsMenuClient *publishPublic) : + m_q(publishPublic) +{ + +} + +/*! + destructor + */ +HsMenuClientPrivate::~HsMenuClientPrivate() +{ + +} + +bool HsMenuClientPrivate::add(const QVariantMap &entryPreference) +{ + bool result = false; + QMap pref = entryPreference; + + CaIconDescription iconDesc; + if(pref.contains(hsItemId)) + { + QSharedPointer update_entry = CaService::instance()->getEntry(pref.take(hsItemId).toInt()); + + update_entry->setText(pref.take(hsItemName).toString()); + + update_entry->setDescription(pref.take(hsItemDescription).toString()); + + iconDesc.setFilename(pref.take(hsIconFileName).toString()); + iconDesc.setSkinId(pref.take(hsIconName).toString()); + iconDesc.setApplicationId(pref.take(hsIconApplicationId).toString()); + update_entry->setIconDescription(iconDesc); + QMapIterator k(pref); + while (k.hasNext()) { + k.next(); + update_entry->setAttribute(k.key(),k.value().toString()); + } + + result = CaService::instance()->updateEntry(*update_entry); + } + else if (pref.contains(hsItemName) && pref.contains(hsitemLaunchUri) && pref.contains(hsitemPublisherId)) + { + CaEntry add_entry(ItemEntryRole); + add_entry.setEntryTypeName(templatedApplicationTypeName()); + // mandatory values + add_entry.setText(pref.take(hsItemName).toString()); + + iconDesc.setFilename(pref.take(hsIconFileName).toString()); + iconDesc.setSkinId(pref.take(hsIconName).toString()); + iconDesc.setApplicationId(pref.take(hsIconApplicationId).toString()); + add_entry.setIconDescription(iconDesc); + + add_entry.setDescription(pref.take(hsItemDescription).toString()); + QMapIterator k(pref); + while (k.hasNext()) { + k.next(); + add_entry.setAttribute(k.key(),k.value().toString()); + } + + add_entry.setFlags(add_entry.flags() & ~RemovableEntryFlag); + + QSharedPointer entry = CaService::instance()->createEntry(add_entry); + if (!entry.isNull()) { + result = true; + } + } + else + { + return false; + } + return result; + + +} +bool HsMenuClientPrivate::remove(const QVariantMap &entry) const +{ + bool result = false; + if (entry.contains(hsItemId)) + { + result = CaService::instance()->removeEntry(entry.value(hsItemId).toInt()); + } + return result; +} + +QList HsMenuClientPrivate::getList(const QVariantMap &queryPreference) +{ + QList list; + QMap map = queryPreference; + + map.remove(hsItemName); + map.remove(hsItemDescription); + + CaQuery query; + // define query + query.setFlagsOn(VisibleEntryFlag); + query.setEntryRoles(ItemEntryRole); + query.setEntryTypeNames(QStringList(templatedApplicationTypeName())); + + + // add atributes to caquery + QMapIterator k(map); + while (k.hasNext()) { + k.next(); + query.setAttribute(k.key(),k.value().toString()); + } + QList< QSharedPointer > entries = CaService::instance()->getEntries(query); + map.clear(); + if (entries.count()) { + QMap attrMap; + QMapIterator k(attrMap); + //walk trought entrys and extract keys into map + for (int i = 0; i < entries.count(); ++i) { + map[hsItemId] = entries.at(i)->id(); + map[hsItemName] = entries.at(i)->text(); + map[hsItemDescription] = entries.at(i)->description(); + CaIconDescription iconDesc = entries.at(i)->iconDescription(); + map[hsIconFileName] = iconDesc.filename(); + map[hsIconName] = iconDesc.skinId(); + map[hsIconApplicationId] = iconDesc.applicationId(); + + // extract entry atributes + attrMap = entries.at(i)->attributes(); + QMapIterator k(attrMap); + // insert entrys attr into map + while (k.hasNext()) { + k.next(); + map.insert(k.key(),k.value()); + } + list.append(map); //append entry map to list + // clean used maps + map.clear(); + attrMap.clear(); + } + } + return list; +} diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsmenuclientplugin/src/hsmenuclientplugin.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsmenuclientplugin/src/hsmenuclientplugin.cpp Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,47 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Plugin factory. +* +*/ + +#include +#include +#include + +#include "hsmenuclientplugin.h" +#include "hsmenuclient.h" + +#ifdef COVERAGE_MEASUREMENT +#pragma CTC SKIP +#endif //COVERAGE_MEASUREMENT + +QObject *HsMenuClientPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor, + QServiceContext *context, + QAbstractSecuritySession *session) +{ + Q_UNUSED(context); + Q_UNUSED(session); + + if (descriptor.interfaceName() == QLatin1String("com.nokia.symbian.IMenuClient")) { + return new HsMenuClient(this); + } else { + return 0; + } +} + +Q_EXPORT_PLUGIN2(hsmenuclientplugin, HsMenuClientPlugin) + +#ifdef COVERAGE_MEASUREMENT +#pragma CTC ENDSKIP +#endif //COVERAGE_MEASUREMENT diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsmenucontentpublish/hsmenucontentpublish.pro --- a/homescreenapp/hsmenucontentpublish/hsmenucontentpublish.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -# -# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -TEMPLATE = lib - -CONFIG += plugin mobility -MOBILITY = serviceframework - -PLUGIN_SUBDIR = /hsresources/plugins/hsmenucontentpublishplugin - -LIBS += -lcaclient - -INCLUDEPATH += inc - -HEADERS += inc/hsmenucontentpublish.h \ - inc/hsmenucontentpublishplugin.h \ - -SOURCES += src/hsmenucontentpublish.cpp \ - src/hsmenucontentpublishplugin.cpp \ - -symbian: { - TARGET.UID3 = 0x20028715 -#export interface header to platform -BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include " -BLD_INF_RULES.prj_exports += "inc/hsmenucontentpublish.h \ - APP_LAYER_PLATFORM_EXPORT_PATH(hsmenucontentpublish.h)" -} - -include(../common.pri) - - diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsmenucontentpublish/inc/hsmenucontentpublish.h --- a/homescreenapp/hsmenucontentpublish/inc/hsmenucontentpublish.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: hsmenucontentpublish.h - * - */ - -#ifndef HSMENUCONTENTPUBLISH_H -#define HSMENUCONTENTPUBLISH_H - -#include -#include -#include - -QTM_USE_NAMESPACE - -//mandatory keys -const QString hsItemName("item:name"); -const QString hsitemLaunchUri("item:launchuri"); -const QString hsitemPublisherId("item:publisherId"); - -//not mandatory -const QString hsItemWidgetUri("widget:uri"); -const QString hsItemDescription("item:description"); - -//for icon - not mandatory -const QString hsIconFileName("icon:filename");//to display specific icon from file -const QString hsIconName("icon:name");// it is used in similar way in HbIcon -const QString hsIconApplicationId("icon:applicationid"); //publisherid makes rest - - -class HsMenuContentPublishPrivate; - -class HsMenuContentPublish : public QObject -{ - Q_OBJECT - -public: - HsMenuContentPublish(QObject *parent = 0); - ~HsMenuContentPublish(); -public slots: - bool add(const QVariantMap &entryPreference = QVariantMap()); - bool remove(const QVariantMap &queryPreference = QVariantMap()) const; - - QList getList(const QVariantMap &queryPreference = QVariantMap()); - -private: - Q_DISABLE_COPY(HsMenuContentPublish) - /** - * Pointer to a private implementation. - */ - HsMenuContentPublishPrivate * const m_d; -}; - - - -#endif // HSMENUCONTENTPUBLISH_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsmenucontentpublish/inc/hsmenucontentpublish_p.h --- a/homescreenapp/hsmenucontentpublish/inc/hsmenucontentpublish_p.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: hsmenucontentpublish_p.h - * - */ - -#ifndef HSMENUCONTENTPUBLISH_PRIVATE_H -#define HSMENUCONTENTPUBLISH_PRIVATE_H - -// hidden -const QString hsItemId("id"); - -class HsMenuContentPublish; - -class HsMenuContentPublishPrivate -{ - -public: - - explicit HsMenuContentPublishPrivate(HsMenuContentPublish *publishPublic); - ~HsMenuContentPublishPrivate(); - bool add(const QVariantMap &entryPreference = QVariantMap()); - bool remove(const QVariantMap &queryPreference = QVariantMap()) const; - QList getList(const QVariantMap &queryPreference = QVariantMap()); - -private: - /** - * Points to the HsMenuContentPublish instance that uses this private implementation. - */ - HsMenuContentPublish *const m_q; -}; - -#endif //HSMENUCONTENTPUBLISH_PRIVATE_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsmenucontentpublish/inc/hsmenucontentpublishplugin.h --- a/homescreenapp/hsmenucontentpublish/inc/hsmenucontentpublishplugin.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Plugin factory. -* -*/ - -#ifndef HSMENUCONTENTPUBLISHPLUGIN_H -#define HSMENUCONTENTPUBLISHPLUGIN_H - -#include -#include - -QTM_USE_NAMESPACE - -class HsMenuContentPublishPlugin : public QObject, public QServicePluginInterface -{ - Q_OBJECT - Q_INTERFACES(QtMobility::QServicePluginInterface) - -public: - QObject *createInstance(const QServiceInterfaceDescriptor &descriptor, - QServiceContext *context, - QAbstractSecuritySession *session); -}; - -#endif //HSMENUCONTENTPUBLISHPLUGIN_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsmenucontentpublish/resource/hsmenucontentpublish.s60xml --- a/homescreenapp/hsmenucontentpublish/resource/hsmenucontentpublish.s60xml Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - hsmenucontentpublishplugin - z:/hsresources/plugins/hsmenucontentpublishplugin/hsmenucontentpublish.qtplugin - HsMenu Client plugin - - com.nokia.symbian.IMenuClient - 1.0 - HsMenu Client exposed service interface - - - diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsmenucontentpublish/resource/hsmenucontentpublish.xml --- a/homescreenapp/hsmenucontentpublish/resource/hsmenucontentpublish.xml Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - hsmenucontentpublishplugin - hsmenucontentpublish - HsMenu Client plugin - - com.nokia.symbian.IMenuClient - 1.0 - HsMenu Client exposed service interface - - - \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsmenucontentpublish/src/hsmenucontentpublish.cpp --- a/homescreenapp/hsmenucontentpublish/src/hsmenucontentpublish.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,196 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: hsmenucontentpublish.cpp - * - */ - -#include -#include - -#include "hsapp_defs.h" -#include "caquery.h" -#include "caentry.h" -#include "caicondescription.h" -#include "caservice.h" - -#include "hsmenucontentpublish.h" -#include "hsmenucontentpublish_p.h" - -HsMenuContentPublish::HsMenuContentPublish(QObject *parent) - :QObject(parent), m_d(new HsMenuContentPublishPrivate(this)) -{ - -} - -HsMenuContentPublish::~HsMenuContentPublish() -{ - delete m_d; -} - -bool HsMenuContentPublish::add(const QVariantMap &entryPreference) -{ - return m_d->add(entryPreference); -} -bool HsMenuContentPublish::remove(const QVariantMap &entry) const -{ - return m_d->remove(entry); -} - -QList HsMenuContentPublish::getList(const QVariantMap &queryPreference) -{ - return m_d->getList(queryPreference); -} - -/*! - Constructor - \param publishPublic pointer to public contentPublish - */ -HsMenuContentPublishPrivate::HsMenuContentPublishPrivate(HsMenuContentPublish *publishPublic) : - m_q(publishPublic) -{ - -} - -/*! - destructor - */ -HsMenuContentPublishPrivate::~HsMenuContentPublishPrivate() -{ - -} - -bool HsMenuContentPublishPrivate::add(const QVariantMap &entryPreference) -{ - bool result = false; - QMap pref = entryPreference; - - CaIconDescription iconDesc; - if(pref.contains(hsItemId)) - { - CaEntry *update_entry = CaService::instance()->getEntry(pref.take(hsItemId).toInt()); - - update_entry->setText(pref.take(hsItemName).toString()); - - update_entry->setDescription(pref.take(hsItemDescription).toString()); - - iconDesc.setFilename(pref.take(hsIconFileName).toString()); - iconDesc.setSkinId(pref.take(hsIconName).toString()); - iconDesc.setApplicationId(pref.take(hsIconApplicationId).toString()); - update_entry->setIconDescription(iconDesc); - QMapIterator k(pref); - while (k.hasNext()) { - k.next(); - update_entry->setAttribute(k.key(),k.value().toString()); - } - - result = CaService::instance()->updateEntry(*update_entry); - } - else if (pref.contains(hsItemName) && pref.contains(hsitemLaunchUri) && pref.contains(hsitemPublisherId)) - { - CaEntry add_entry(ItemEntryRole); - add_entry.setEntryTypeName(templatedApplicationTypeName()); - // mandatory values - add_entry.setText(pref.take(hsItemName).toString()); - - iconDesc.setFilename(pref.take(hsIconFileName).toString()); - iconDesc.setSkinId(pref.take(hsIconName).toString()); - iconDesc.setApplicationId(pref.take(hsIconApplicationId).toString()); - add_entry.setIconDescription(iconDesc); - - add_entry.setDescription(pref.take(hsItemDescription).toString()); - QMapIterator k(pref); - while (k.hasNext()) { - k.next(); - add_entry.setAttribute(k.key(),k.value().toString()); - } - - add_entry.setFlags(add_entry.flags() & ~RemovableEntryFlag); - - CaEntry *entry = CaService::instance()->createEntry(add_entry); - if (entry) { - result = true; - delete entry; - } - } - else - { - return false; - } - return result; - - -} -bool HsMenuContentPublishPrivate::remove(const QVariantMap &entry) const -{ - bool result = false; - if (entry.contains(hsItemId)) - { - result = CaService::instance()->removeEntry(entry.value(hsItemId).toInt()); - } - return result; -} - -QList HsMenuContentPublishPrivate::getList(const QVariantMap &queryPreference) -{ - QList list; - QMap map = queryPreference; - - map.remove(hsItemName); - map.remove(hsItemDescription); - - CaQuery query; - // define query - query.setFlagsOn(VisibleEntryFlag); - query.setEntryRoles(ItemEntryRole); - query.setEntryTypeNames(QStringList(templatedApplicationTypeName())); - - - // add atributes to caquery - QMapIterator k(map); - while (k.hasNext()) { - k.next(); - query.setAttribute(k.key(),k.value().toString()); - } - QList entries = CaService::instance()->getEntries(query); - map.clear(); - if (entries.count()) { - QMap attrMap; - QMapIterator k(attrMap); - //walk trought entrys and extract keys into map - for (int i = 0; i < entries.count(); ++i) { - map[hsItemId] = entries.at(i)->id(); - map[hsItemName] = entries.at(i)->text(); - map[hsItemDescription] = entries.at(i)->description(); - CaIconDescription iconDesc = entries.at(i)->iconDescription(); - map[hsIconFileName] = iconDesc.filename(); - map[hsIconName] = iconDesc.skinId(); - map[hsIconApplicationId] = iconDesc.applicationId(); - - // extract entry atributes - attrMap = entries.at(i)->attributes(); - QMapIterator k(attrMap); - // insert entrys attr into map - while (k.hasNext()) { - k.next(); - map.insert(k.key(),k.value()); - } - list.append(map); //append entry map to list - // clean used maps - map.clear(); - attrMap.clear(); - } - } - qDeleteAll(entries); - return list; -} diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsmenucontentpublish/src/hsmenucontentpublishplugin.cpp --- a/homescreenapp/hsmenucontentpublish/src/hsmenucontentpublishplugin.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Plugin factory. -* -*/ - -#include -#include -#include - -#include "hsmenucontentpublishplugin.h" -#include "hsmenucontentpublish.h" - -#ifdef COVERAGE_MEASUREMENT -#pragma CTC SKIP -#endif //COVERAGE_MEASUREMENT - -QObject *HsMenuContentPublishPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor, - QServiceContext *context, - QAbstractSecuritySession *session) -{ - Q_UNUSED(context); - Q_UNUSED(session); - - if (descriptor.interfaceName() == QLatin1String("com.nokia.symbian.IMenuClient")) { - return new HsMenuContentPublish(this); - } else { - return 0; - } -} - -Q_EXPORT_PLUGIN2(hsmenucontentpublishplugin, HsMenuContentPublishPlugin) - -#ifdef COVERAGE_MEASUREMENT -#pragma CTC ENDSKIP -#endif //COVERAGE_MEASUREMENT diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsutils/hsutils.pro --- a/homescreenapp/hsutils/hsutils.pro Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsutils/hsutils.pro Mon May 03 12:24:59 2010 +0300 @@ -18,7 +18,8 @@ include (../common.pri) -CONFIG += hb +CONFIG += hb mobility +MOBILITY = systeminfo QT += sql DEFINES += HSUTILS_LIB @@ -32,6 +33,7 @@ symbian: { TARGET.UID3 = 0x20022F3C + LIBS+=-lxqservice -lxqserviceutil } include(hsutils.pri) diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsutils/inc/hsapptranslator.h --- a/homescreenapp/hsutils/inc/hsapptranslator.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Homescreen application translator class. -* -*/ - -#ifndef HSAPPTRANSLATOR_H -#define HSAPPTRANSLATOR_H - -#include -#include -#include "hsutils_global.h" -#include "hstest_global.h" - -HOMESCREEN_TEST_CLASS(t_hsUtils) - -class QEvent; -class QTranslator; - -class HSUTILS_EXPORT HsAppTranslator : public QObject -{ - Q_OBJECT - -public: - ~HsAppTranslator(); - static HsAppTranslator *instance(); - -protected: - bool eventFilter(QObject *watched, QEvent *event); - -public: - void setLanguage(); - -private: - void loadTranslators(const QString &locale); - void removeTranslators(); - -signals: - - void languageChanged(); - -private: - HsAppTranslator(QObject* aParent = 0); - Q_DISABLE_COPY(HsAppTranslator) - static HsAppTranslator *mInstance; - QList mTranslatorList; - - HOMESCREEN_TEST_FRIEND_CLASS(t_hsUtils) -}; - -#endif diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsutils/inc/hsdeviceinfolistener.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsutils/inc/hsdeviceinfolistener.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,78 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#ifndef HSDEVICEINFOLISTENER_H +#define HSDEVICEINFOLISTENER_H + +#include +//#include +//#include +#ifdef HSUTILS_TEST +#include "mocksysteminfo.h" +#else +#include +QTM_USE_NAMESPACE +#endif + +#include "hstest_global.h" +HOMESCREEN_TEST_CLASS(t_hsUtils) + +class HsDeviceInfoListener : public QObject +{ + Q_OBJECT + + Q_ENUMS(HsDeviceInfoStatus) + +public: + enum HsDeviceInfoStatus { + NoService = 0, // no sim or out of coverage + OfflineProfile, + ServiceAvailable + }; + +public: + HsDeviceInfoListener(QObject *parent = 0); + ~HsDeviceInfoListener(); + +public: + QString operatorName() const; + HsDeviceInfoStatus status() const; + +signals: + void networkNameChanged(const QString &name); + void statusChanged(HsDeviceInfoListener::HsDeviceInfoStatus status); + +private slots: + void onNetworkStatusChanged(QSystemNetworkInfo::NetworkMode networkMode, QSystemNetworkInfo::NetworkStatus networkStatus); + void onNetworkNameChanged(QSystemNetworkInfo::NetworkMode networkMode,const QString &networkName); + void onCurrentProfileChanged(QSystemDeviceInfo::Profile profile); + +private: + QSystemNetworkInfo::NetworkStatus networkStatus(); + void updateCurrentNetworkMode(); + bool isConnected(QSystemNetworkInfo::NetworkMode mode); + void updateStatus(); + QSystemDeviceInfo::SimStatus simStatus() const; +private: + + QSystemNetworkInfo *mNetworkInfo; + QSystemDeviceInfo *mDeviceInfo; + QSystemNetworkInfo::NetworkMode mCurrentNetworkMode; + HsDeviceInfoStatus mStatus; + HOMESCREEN_TEST_FRIEND_CLASS(t_hsUtils) +}; + +#endif // diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsutils/inc/hsimagefetcherclient.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsutils/inc/hsimagefetcherclient.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,59 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#ifndef HSIMAGEFETCHERCLIENT_H +#define HSIMAGEFETCHERCLIENT_H + +#include + +#ifdef Q_OS_SYMBIAN +#include +#include +#endif // Q_OS_SYMBIAN + +#include "hsutils_global.h" + +class HSUTILS_EXPORT HsImageFetcherClient : public QObject +{ + Q_OBJECT + +public: + HsImageFetcherClient(QObject *parent = 0); + ~HsImageFetcherClient(); + +public slots: + void fetch(); + +private slots: + // Aiw request responses + void handleOk(const QVariant &result); + void handleError(int errorCode, const QString &errorMessage); + +signals: + void fetchCompleted(const QString &imageFile); + void fetchFailed(int errorCode, const QString &errorMessage); + +private: + Q_DISABLE_COPY(HsImageFetcherClient) + +#ifdef Q_OS_SYMBIAN + XQApplicationManager mAppMgr; + XQAiwRequest *mReq; +#endif // Q_OS_SYMBIAN +}; + +#endif // HSIMAGEFETCHERCLIENT_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsutils/inc/hsmenuevent.h --- a/homescreenapp/hsutils/inc/hsmenuevent.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsutils/inc/hsmenuevent.h Mon May 03 12:24:59 2010 +0300 @@ -41,10 +41,12 @@ AddAppsToCollection, RemoveAppFromCollection, OpenApplicationLibrary, + OpenInstalledView, OpenHomeScreen, ArrangeCollection, CreateCollection, PreviewHSWidget, + ShowAppSettings, Unknown }; diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsutils/inc/hsmenueventfactory.h --- a/homescreenapp/hsutils/inc/hsmenueventfactory.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsutils/inc/hsmenueventfactory.h Mon May 03 12:24:59 2010 +0300 @@ -38,13 +38,7 @@ public: - static QEvent *createAddToHomeScreenEvent( - int entryId, - const QString &entryTypeName = QString(), - const QString &uri = QString(), - const QString &library = QString(), - QMap* attributes = NULL - ); + static QEvent *createAddToHomeScreenEvent(int entryId); static QEvent *createOpenCollectionEvent(int itemId, const QString &collectionType); @@ -58,6 +52,8 @@ static QEvent *createOpenAppLibraryEvent( HsMenuMode menuMode = NormalHsMenuMode); + static QEvent *createOpenInstalledViewEvent(); + static QEvent *createOpenHomeScreenEvent(); static QEvent *createCollectionDeletedEvent(); @@ -82,6 +78,8 @@ const QString &uri = QString(), const QString &library = QString() ); + + static QEvent *createAppSettingsViewEvent(int entryId); static QEvent *createUnknownEvent(); diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsutils/inc/hstitleresolver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsutils/inc/hstitleresolver.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,49 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#ifndef HSTITLERESOLVER_H +#define HSTITLERESOLVER_H + +#include +#include "hsdeviceinfolistener.h" +#include "hsutils_global.h" +#include "hstest_global.h" +HOMESCREEN_TEST_CLASS(t_hsUtils) + +class HSUTILS_EXPORT HsTitleResolver : public QObject +{ + Q_OBJECT + +public: + HsTitleResolver(QObject *parent = 0); + ~HsTitleResolver(); +public: + QString title(); +signals: + void titleChanged(const QString &name); +private slots: + void onNetworkNameChanged(const QString &name); + void onStatusChanged(HsDeviceInfoListener::HsDeviceInfoStatus status); +private: + QString mOperatorName; + QString mOfflineText; + QString mNoServiceText; + HsDeviceInfoListener *mDeviceInfoListener; + HsDeviceInfoListener::HsDeviceInfoStatus mCurrentStatus; + HOMESCREEN_TEST_FRIEND_CLASS(t_hsUtils) +}; + +#endif // HSTITLERESOLVER_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsutils/inc/hswallpaperhelper.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsutils/inc/hswallpaperhelper.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,38 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Homescreen wallpaper helper class. +* +*/ + +#ifndef HSWALLPAPERHELPER_H +#define HSWALLPAPERHELPER_H + +#include "hsutils_global.h" +#include "hstest_global.h" + +HOMESCREEN_TEST_CLASS(t_hsUtils) + +class HSUTILS_EXPORT HsWallpaperHelper +{ +public: + static QImage processImage(const QString &sourcePath, + const QRect &targetRect, + const QRect &sourceRect, + bool centerTarget = true); + +private: + HOMESCREEN_TEST_FRIEND_CLASS(t_hsUtils) +}; + +#endif // HSWALLPAPERHELPER_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsutils/inc/hswidgetpositioningonorientationchange.h --- a/homescreenapp/hsutils/inc/hswidgetpositioningonorientationchange.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsutils/inc/hswidgetpositioningonorientationchange.h Mon May 03 12:24:59 2010 +0300 @@ -38,16 +38,6 @@ static HsWidgetPositioningOnOrientationChange *mInstance; }; - -class HSUTILS_EXPORT HsSimpleWidgetPositioningOnOrientationChange : public HsWidgetPositioningOnOrientationChange -{ -public: - QList convert(const QRectF &fromRect, - const QList &fromGeometries, - const QRectF &toRect); -}; - - class HSUTILS_EXPORT HsAdvancedWidgetPositioningOnOrientationChange : public HsWidgetPositioningOnOrientationChange { public: @@ -56,20 +46,4 @@ const QRectF &toRect); }; -class HSUTILS_EXPORT HsRelativePositionWidgetPositioningOnOrientationChange : public HsWidgetPositioningOnOrientationChange -{ -public: - QList convert(const QRectF &fromRect, - const QList &fromGeometries, - const QRectF &toRect); -}; - -class HSUTILS_EXPORT HsKeepCornerPositionWidgetPositioningOnOrientationChange : public HsWidgetPositioningOnOrientationChange -{ -public: - QList convert(const QRectF &fromRect, - const QList &fromGeometries, - const QRectF &toRect); -}; - #endif // HSWIDGETPOSITIONINGONORIENTATIONCHANGE_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsutils/src/hsapptranslator.cpp --- a/homescreenapp/hsutils/src/hsapptranslator.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,170 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Homescreen application translator class. -* -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "hsapptranslator.h" - -#ifdef Q_OS_SYMBIAN -#include -#endif //Q_OS_SYMBIAN - -/*! - \class HsAppTranslator - \ingroup group_hsapplication - \brief Homescreen application main class. - Loads a runtime from a runtime provider plugin. Manages - the runtime execution. -*/ - -#ifdef COVERAGE_MEASUREMENT -#pragma CTC SKIP -#endif //COVERAGE_MEASUREMENT - -/*! - Stores the translator instance. -*/ -HsAppTranslator *HsAppTranslator::mInstance = 0; - -/*! - Constructor. - \a parent Parent object. -*/ -HsAppTranslator::HsAppTranslator(QObject *parent) - : QObject(parent) -{ -} - -/*! - Returns the hstranlator instance. -*/ -HsAppTranslator *HsAppTranslator::instance() -{ - if (!mInstance) { - mInstance = new HsAppTranslator(); - } - return mInstance; -} - -/*! - Destructor. -*/ -HsAppTranslator::~HsAppTranslator() -{ - removeTranslators(); -} - -/*! - \copydoc QObject::eventFilter(QObject *watched, QEvent *event) -*/ -bool HsAppTranslator::eventFilter(QObject *watched, QEvent *event) -{ - Q_UNUSED(watched); - if (event->type() == QEvent::LocaleChange) { - setLanguage(); - emit languageChanged(); - return true; - } - - return false; -} - -void HsAppTranslator::setLanguage() -{ - removeTranslators(); - -#ifdef Q_OS_SYMBIAN - QString locale = QLocale::system().name(); -#else - QString locale; - QFile file("hslocale.txt"); - QTextStream stream(&file); - if (file.open(QIODevice::ReadWrite | QIODevice::Text)) { - QString word; - stream >> word; - if (!word.isEmpty()) { - locale = word; - } else { - locale = "en_US"; - file.seek(0); - stream << locale; - file.close(); - } - } else { - locale = QLocale::system().name(); - } -#endif //Q_OS_SYMBIAN - - loadTranslators(locale); -} - -void HsAppTranslator::loadTranslators(const QString &locale) -{ - QString path = QDir::currentPath() + QString("/hsresources/loc"); - QDir currentDir = QDir(path); - - QString localeLowerCase = locale.toLower(); - QString localeUpperCase = locale.toUpper(); - QString language = locale.left(2); - QString languageUpperCase = language.toUpper(); - QStringList nameFilters; - nameFilters << "*_" + locale + ".qm" - << "*_" + localeLowerCase + ".qm" - << "*_" + localeUpperCase + ".qm" - << "*_" + language + ".qm" - << "*_" + languageUpperCase + ".qm"; - - QStringList locFiles = currentDir.entryList(nameFilters, QDir::Files | QDir::NoSymLinks); - - for (int i = 0; i < locFiles.size(); ++i) { - QString locFile = locFiles[i]; - bool loaded = false; - QTranslator *translator = new QTranslator(); -#ifdef Q_OS_SYMBIAN - TRAP_IGNORE(loaded = translator->load(locFile, path)); -#else - loaded = translator->load(locFile, path); -#endif //Q_OS_SYMBIAN - if (!loaded) { - QString debugMsg = "ERROR: QTranslator::load() failed for " + locFile; - HSDEBUG(debugMsg); - } - qApp->installTranslator(translator); - mTranslatorList << translator; - } -} - -void HsAppTranslator::removeTranslators() -{ - while (!mTranslatorList.isEmpty()) { - QTranslator *translator = mTranslatorList.takeFirst(); - qApp->removeTranslator(translator); - delete translator; - translator = 0; - } -} - -#ifdef COVERAGE_MEASUREMENT -#pragma CTC ENDSKIP -#endif //COVERAGE_MEASUREMENT diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsutils/src/hsdeviceinfolistener.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsutils/src/hsdeviceinfolistener.cpp Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,220 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#include "hsdeviceinfolistener.h" +#include + +#ifdef Q_OS_SYMBIAN +#include +#include +#endif +/*! + +*/ +HsDeviceInfoListener::HsDeviceInfoListener(QObject *parent) + : QObject(parent), + mCurrentNetworkMode(QSystemNetworkInfo::UnknownMode), + mStatus(NoService) +{ + mNetworkInfo = new QSystemNetworkInfo(this); + mDeviceInfo = new QSystemDeviceInfo(this); + + connect(mNetworkInfo, SIGNAL(networkStatusChanged(QSystemNetworkInfo::NetworkMode, QSystemNetworkInfo::NetworkStatus)), SLOT(onNetworkStatusChanged(QSystemNetworkInfo::NetworkMode, QSystemNetworkInfo::NetworkStatus))); + connect(mNetworkInfo, SIGNAL(networkNameChanged(QSystemNetworkInfo::NetworkMode,const QString &)), SLOT(onNetworkNameChanged(QSystemNetworkInfo::NetworkMode,const QString &))); + connect(mDeviceInfo, SIGNAL(currentProfileChanged(QSystemDeviceInfo::Profile)), SLOT(onCurrentProfileChanged(QSystemDeviceInfo::Profile))); + + updateCurrentNetworkMode(); + updateStatus(); +} + +/*! + +*/ +HsDeviceInfoListener::~HsDeviceInfoListener() +{ +} + +/*! + +*/ +QString HsDeviceInfoListener::operatorName() const +{ + return QSystemNetworkInfo::networkName(mCurrentNetworkMode); +} + +/*! + +*/ +HsDeviceInfoListener::HsDeviceInfoStatus HsDeviceInfoListener::status() const +{ + return mStatus; +} + +/*! + +*/ +void HsDeviceInfoListener::onNetworkStatusChanged(QSystemNetworkInfo::NetworkMode networkMode, QSystemNetworkInfo::NetworkStatus networkStatus) +{ + Q_UNUSED(networkMode); + Q_UNUSED(networkStatus); + updateCurrentNetworkMode(); + updateStatus(); +} + +/*! + +*/ +void HsDeviceInfoListener::onNetworkNameChanged(QSystemNetworkInfo::NetworkMode networkMode,const QString &networkName) +{ + Q_UNUSED(networkMode); + updateCurrentNetworkMode(); + if(mCurrentNetworkMode != QSystemNetworkInfo::UnknownMode) { + qDebug() << "HsDeviceInfoListener::onNetworkNameChanged() - " << networkName; + emit networkNameChanged(networkName); + } + updateStatus(); +} + +/*! + +*/ +void HsDeviceInfoListener::onCurrentProfileChanged(QSystemDeviceInfo::Profile profile) +{ + Q_UNUSED(profile); + updateStatus(); +} + +/*! + +*/ +QSystemNetworkInfo::NetworkStatus HsDeviceInfoListener::networkStatus() +{ + return mNetworkInfo->networkStatus(mCurrentNetworkMode); +} + +/*! + +*/ +void HsDeviceInfoListener::updateCurrentNetworkMode() +{ + //We are keen only GSM and WCDMA network connections. + //Other networks (WLAN etc.) are treated as UnknowMode. + qDebug() << "HsDeviceInfoListener::updateCurrentNetworkMode() - Entry: mCurrentNetworkMode == " + << mCurrentNetworkMode; + if(isConnected(QSystemNetworkInfo::GsmMode)) { + mCurrentNetworkMode = QSystemNetworkInfo::GsmMode; + } else if (isConnected(QSystemNetworkInfo::WcdmaMode)) { + mCurrentNetworkMode = QSystemNetworkInfo::WcdmaMode; + } else { + mCurrentNetworkMode = QSystemNetworkInfo::UnknownMode; + } + qDebug() << "HsDeviceInfoListener::updateCurrentNetworkMode() - Exit: mCurrentNetworkMode == " + << mCurrentNetworkMode; +} + +/*! + +*/ +bool HsDeviceInfoListener::isConnected(QSystemNetworkInfo::NetworkMode mode) +{ + bool connected = false; + + qDebug() << "HsDeviceInfoListener::isConnected():"; + qDebug() << " - Mode:" << (mode == QSystemNetworkInfo::WcdmaMode ? "WcdmaMode" : "GsmMode"); + QSystemNetworkInfo::NetworkStatus status = mNetworkInfo->networkStatus(mode); + switch (status) { + case QSystemNetworkInfo::Connected: + qDebug() << " - Status: Connected"; + //Fall through + case QSystemNetworkInfo::HomeNetwork: + qDebug() << " - Status: HomeNetwork"; + //Fall through + case QSystemNetworkInfo::Roaming: + qDebug() << " - Status: Roaming"; + connected = true; + break; + default: + qDebug() << " - Status: " << status; + break; + }; + + qDebug() << " - Is connected:" << connected; + + return connected; +} + +/*! + +*/ +void HsDeviceInfoListener::updateStatus() +{ + qDebug() << "HsDeviceInfoListener::updateStatus() - Entry: mStatus == " + << mStatus; + + HsDeviceInfoStatus currentStatus; + if ( mDeviceInfo->currentProfile() == QSystemDeviceInfo::OfflineProfile && + simStatus() != QSystemDeviceInfo::SimNotAvailable) { + currentStatus = OfflineProfile; + } else if (mCurrentNetworkMode == QSystemNetworkInfo::UnknownMode) { + currentStatus = NoService; + } else { + currentStatus = ServiceAvailable; + } + + if(mStatus != currentStatus) { + mStatus = currentStatus; + emit statusChanged(mStatus); + } + qDebug() << "HsDeviceInfoListener::updateStatus() - Exit: mStatus == " + << mStatus; +} + +/*! + +*/ +QSystemDeviceInfo::SimStatus HsDeviceInfoListener::simStatus() const +{ + QSystemDeviceInfo::SimStatus qtSimStatus = QSystemDeviceInfo::SimNotAvailable; + +#ifdef Q_OS_SYMBIAN + TInt simCardStatus(ESimNotPresent); + RProperty symbianSimStatus; + qt_symbian_throwIfError( symbianSimStatus.Attach( KPSUidStartup, KPSSimStatus ) ); + qt_symbian_throwIfError( symbianSimStatus.Get( simCardStatus ) ); + symbianSimStatus.Close(); + + switch (simCardStatus) { + case ESimUsable: + // The Sim card is fully usable. + qtSimStatus = QSystemDeviceInfo::SingleSimAvailable; + qDebug() << "HsDeviceInfoListener::simStatus() - SingleSimAvailable"; + break; + default: + //ESimReadable == The SIM card is not fully usable, but the emergency number can be read. + //ESimNotReady == The Sim card is present but not ready or usable. + //ESimNotPresent == The Sim card is not present. + //ESimNotSupported == SIM/RUIM is not supported. Some CDMA phones do not support a SIM/RUIM at all. + qtSimStatus = QSystemDeviceInfo::SimNotAvailable; + qDebug() << "HsDeviceInfoListener::simStatus() - SimNotAvailable"; + break; + }; +#else + qtSimStatus = mDeviceInfo->simStatus(); +#endif + + return qtSimStatus; +} diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsutils/src/hsimagefetcherclient.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsutils/src/hsimagefetcherclient.cpp Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,157 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Photos image fetcher client. +* +*/ + + +#include "hsimagefetcherclient.h" + +#include +#include +#include +#ifdef Q_OS_SYMBIAN +#include +#endif // Q_OS_SYMBIAN + +namespace +{ + const char gFetcherService[] = "com.nokia.services.media"; + const char gFetcherInterface[] = "image"; + const char gFetcherOperation[] = "fetch(QVariantMap,QVariant)"; +} + +#ifdef COVERAGE_MEASUREMENT +#pragma CTC SKIP +#endif //COVERAGE_MEASUREMENT + +// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- +// +#ifdef Q_OS_SYMBIAN +HsImageFetcherClient::HsImageFetcherClient(QObject *parent) + : QObject(parent), + mReq(0) +{ +} +#else +HsImageFetcherClient::HsImageFetcherClient(QObject *parent) + : QObject(parent) +{ +} +#endif // Q_OS_SYMBIAN + +// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- +// +HsImageFetcherClient::~HsImageFetcherClient() +{ +#ifdef Q_OS_SYMBIAN + delete mReq; +#endif // Q_OS_SYMBIAN +} + +// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- +// +void HsImageFetcherClient::fetch() +{ +#ifdef Q_OS_SYMBIAN + qDebug() << "HsImageFetcherClient::fetch START"; + + if (mReq) { + delete mReq; + mReq = 0; + } + + mReq = mAppMgr.create(gFetcherInterface, gFetcherOperation, false); + if (mReq) { + // Connect signals once + connect(mReq, SIGNAL(requestOk(const QVariant&)), this, SLOT(handleOk(const QVariant&))); + connect(mReq, SIGNAL(requestError(int,const QString&)), this, SLOT(handleError(int,const QString&))); + } else { + qCritical() << "HsImageFetcherClient::fetch -> Create request failed"; + return; + } + + if (!(mReq)->send()) { + qCritical() << "HsImageFetcherClient::fetch -> Send failed" << mReq->lastErrorMessage();; + } + + qDebug() << "HsImageFetcherClient::fetch END"; +#endif // Q_OS_SYMBIAN +} + + + +// Aiw request responses +void HsImageFetcherClient::handleOk(const QVariant &result) +{ +#ifdef Q_OS_SYMBIAN + // disconnect error signal as it will give -4999 (EConnectionClosed) error afterwards even though image + // is fetched successfully + disconnect(mReq, SIGNAL(requestError(int,const QString&)), this, SLOT(handleError(int,const QString&))); + + XQAiwRequest *request = static_cast(sender()); + int implementationId=-1; + implementationId = (request->descriptor().property(XQAiwInterfaceDescriptor::ImplementationId)).toInt(); + + if (result.canConvert()) { + qDebug("HsImageFetcherClient::%x:handleOk result=%s,%s", + implementationId, + result.typeName(), + qPrintable(result.value())); + + emit fetchCompleted(result.value()); + } else if (result.canConvert()) { + QStringList resultList = result.value(); + if (resultList.size() > 0) { + //for debug + QString msg = QString("HsImageFetcherClient::handleOk, size=")+QString::number( resultList.size() )+QString("\n"); + for (int i(0), size(resultList.size()); i < size; ++i) { + msg += QString::number(i) + QString(":") + resultList[i] + QString("\n"); + } + qDebug()<(sender()); + int implementationId = -1; + implementationId = (request->descriptor().property(XQAiwInterfaceDescriptor::ImplementationId)).toInt(); + + qCritical("HsImageFetcherClient::%x:handleError code=%d, errorMessage:%s", + implementationId, errorCode, qPrintable(errorMessage)); + emit fetchFailed(errorCode, errorMessage); +#else + Q_UNUSED(errorCode) + Q_UNUSED(errorMessage) +#endif // Q_OS_SYMBIAN +} + +#ifdef COVERAGE_MEASUREMENT +#pragma CTC ENDSKIP +#endif //COVERAGE_MEASUREMENT diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsutils/src/hsmenuevent.cpp --- a/homescreenapp/hsutils/src/hsmenuevent.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsutils/src/hsmenuevent.cpp Mon May 03 12:24:59 2010 +0300 @@ -20,7 +20,7 @@ /*! \class HsMenuEvent - \ingroup group_hsmenustateplugin + \ingroup group_hsutils \brief Represents class of events in menu application state machine. \sa HsMenuEventFactory diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsutils/src/hsmenueventfactory.cpp --- a/homescreenapp/hsutils/src/hsmenueventfactory.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsutils/src/hsmenueventfactory.cpp Mon May 03 12:24:59 2010 +0300 @@ -22,7 +22,7 @@ /*! \class HsMenuEventFactory - \ingroup group_hsmenustateplugin + \ingroup group_hsutils \brief Menu event factory class. @@ -44,44 +44,11 @@ \param attributes Widget params. \return Event for adding the widget to homescreen. */ -QEvent *HsMenuEventFactory::createAddToHomeScreenEvent( - int entryId, - const QString &entryTypeName, - const QString &uri, - const QString &library, - QMap* attributes) +QEvent *HsMenuEventFactory::createAddToHomeScreenEvent(int entryId) { // get CaEntry type, and if widget get uri and library stored as properties... QVariantMap params; - QVariantMap widgetParams; - params.insert(itemIdKey(), entryId); - - if (entryTypeName == widgetTypeName() || entryTypeName == templatedApplicationTypeName()) { - params.insert( - widgetUriAttributeName(), - uri); - - params.insert( - widgetLibraryAttributeName(), - library); - - params.insert(entryTypeNameKey(), entryTypeName); - - if (entryTypeName == templatedApplicationTypeName()) { - QMapIterator i(*attributes); - while (i.hasNext()) { - i.next(); - QString key(i.key()); - QString value(i.value()); - if (key.contains(widgetParam())) { - widgetParams.insert(key,value); - } - } - params.insert(widgetParam(),widgetParams); - } - } - return new HsMenuEvent(HsMenuEvent::AddToHomeScreen, params); } @@ -153,6 +120,16 @@ } /*! + Creates an HsMenuEvent::OpenApplicationLibrary event. + + \return Open Applications Library event. + */ +QEvent *HsMenuEventFactory::createOpenInstalledViewEvent() +{ + return new HsMenuEvent(HsMenuEvent::OpenInstalledView); +} + +/*! Creates an HsMenuEvent::OpenHomeScreen event. \return Open HomeScreen event. @@ -274,6 +251,19 @@ } /*! + Creates an HsMenuEvent::ShowAppSettings event. + \param entryId Id of an item. + \return Event for view the Application Settings. +*/ +QEvent *HsMenuEventFactory::createAppSettingsViewEvent(int entryId) +{ + QVariantMap params; + params.insert(itemIdKey(), entryId); + + return new HsMenuEvent(HsMenuEvent::ShowAppSettings, params); +} + +/*! Creates an HsMenuEvent::Unknown event. \return Unknown event. diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsutils/src/hsmenueventtransition.cpp --- a/homescreenapp/hsutils/src/hsmenueventtransition.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsutils/src/hsmenueventtransition.cpp Mon May 03 12:24:59 2010 +0300 @@ -21,7 +21,7 @@ /*! \class HsMenuEventTransition - \ingroup group_hsmenustateplugin + \ingroup group_hsutils \brief Transition that happens when specifc event occurs. \sa HsMenuEvent diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsutils/src/hspageindicator.cpp --- a/homescreenapp/hsutils/src/hspageindicator.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsutils/src/hspageindicator.cpp Mon May 03 12:24:59 2010 +0300 @@ -136,8 +136,9 @@ layout->setSpacing(8); layout->addStretch(); foreach (HsPageIndicatorItem *item, mItems) { + item->setPreferredSize(preferredHeight(), preferredHeight()); layout->addItem(item); - } + } layout->addStretch(); setLayout(layout); } diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsutils/src/hspageindicatoritem.cpp --- a/homescreenapp/hsutils/src/hspageindicatoritem.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsutils/src/hspageindicatoritem.cpp Mon May 03 12:24:59 2010 +0300 @@ -87,7 +87,6 @@ return mIsActive; } - /*! */ diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsutils/src/hstitleresolver.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsutils/src/hstitleresolver.cpp Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,112 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#include +#include +#include + +#include "hstitleresolver.h" +#include "hsdeviceinfolistener.h" +#include + +namespace +{ + //Offline text in home screen view title + const char hsLocTextId_Title_Offline[] = "txt_homescreen_title_offline"; + + //Text in home screen view title, when device is out of network coverage or no SIM card present + const char hsLocTextId_Title_NoService[] = "txt_homescreen_title_no_service"; +} + +/*! + +*/ +HsTitleResolver::HsTitleResolver(QObject *parent) + : QObject(parent), + mCurrentStatus(HsDeviceInfoListener::NoService) +{ + mDeviceInfoListener = new HsDeviceInfoListener(this); + mOperatorName = mDeviceInfoListener->operatorName(); + mOfflineText = hbTrId(hsLocTextId_Title_Offline); + mNoServiceText = hbTrId(hsLocTextId_Title_NoService); + + connect(mDeviceInfoListener, SIGNAL(networkNameChanged(QString)), SLOT(onNetworkNameChanged(QString))); + connect(mDeviceInfoListener, SIGNAL(statusChanged(HsDeviceInfoListener::HsDeviceInfoStatus)), SLOT(onStatusChanged(HsDeviceInfoListener::HsDeviceInfoStatus))); + mCurrentStatus = mDeviceInfoListener->status(); +} + +/*! + +*/ +HsTitleResolver::~HsTitleResolver() +{ +} + +/*! + +*/ +QString HsTitleResolver::title() +{ + QString titleText; + switch (mCurrentStatus) { + case HsDeviceInfoListener::NoService: + titleText = mNoServiceText; + break; + case HsDeviceInfoListener::OfflineProfile: + titleText = mOfflineText; + break; + default: + if(mOperatorName.isEmpty()) { + //Sometimes devicelistener has not get operatorNameChanged signal when + //profile is changed from Offline to another which has active connections. + mOperatorName = mDeviceInfoListener->operatorName(); + } + titleText = mOperatorName; + break; + }; + qDebug() << "HsTitleResolver::title() - " << titleText; + return titleText; +} + +/*! + +*/ +void HsTitleResolver::onNetworkNameChanged(const QString& name) +{ + qDebug() << "HsTitleResolver::onNetworkNameChanged() - Entry"; + if (mOperatorName != name && (mCurrentStatus == HsDeviceInfoListener::ServiceAvailable)) { + qDebug() << "HsTitleResolver::onNetworkNameChanged() - Emitting: " << name; + mOperatorName = name; + emit titleChanged(name); + } + qDebug() << "HsTitleResolver::onNetworkNameChanged() - Exit"; +} + +/*! + +*/ +void HsTitleResolver::onStatusChanged(HsDeviceInfoListener::HsDeviceInfoStatus status) +{ + qDebug() << "HsTitleResolver::onStatusChanged() - Entry"; + if (mCurrentStatus != status) { + mCurrentStatus = status; + qDebug() << "HsTitleResolver::onStatusChanged() - Emitting: " << title(); + emit titleChanged(title()); + } + qDebug() << "HsTitleResolver::onStatusChanged() - Exit"; +} + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsutils/src/hswallpaperhelper.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/hsutils/src/hswallpaperhelper.cpp Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,66 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Homescreen wallpaper helper class. +* +*/ + +#include +#include + +#include "hswallpaperhelper.h" + + +/*! + \class HsWallpaperHelper + \ingroup group_hsapplication + \brief Homescreen wallpaper helper class. + Implements image scaling and cropping services. +*/ + +/*! + \internal + Scales and crops (if needed) \a sourcePath image using \a targetRect. + Centers target rect automatically if a\ centerTarget is true. + Pass empty a\ sourceRect to use full size source image as starting point. + Returns processed image or null image if operation fails. +*/ +QImage HsWallpaperHelper::processImage(const QString &sourcePath, + const QRect &targetRect, + const QRect &sourceRect, + bool centerTarget) +{ + QImageReader imageReader(sourcePath); + + QRect tempTargetRect = targetRect; + QRect tempSourceRect = sourceRect; + + if (imageReader.canRead()) { + QSize sourceSize = imageReader.size(); + if (tempSourceRect.isEmpty()) { + // If sourceRect not defined, uses full size image as source. + tempSourceRect.setRect(0, 0, sourceSize.width(), sourceSize.height()); + } + sourceSize.scale(tempTargetRect.width(), tempTargetRect.height(), + Qt::KeepAspectRatioByExpanding); + imageReader.setScaledSize(sourceSize); + + if (centerTarget) { + tempTargetRect.moveCenter(QPoint(sourceSize.width() / 2, sourceSize.height() / 2)); + } + imageReader.setScaledClipRect(tempTargetRect); + + return imageReader.read(); + } + return QImage(); // returns null QImage +} diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/hsutils/src/hswidgetpositioningonorientationchange.cpp --- a/homescreenapp/hsutils/src/hswidgetpositioningonorientationchange.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/hsutils/src/hswidgetpositioningonorientationchange.cpp Mon May 03 12:24:59 2010 +0300 @@ -59,45 +59,6 @@ */ /*! - \class HsSimpleWidgetPositioningOnOrientationChange - \brief Simpe widget positioning algorithm. - - Bounds center points of \a fromGeometries to the - \a toRect. \a fromRect is not used by the algorithm. - \verbatim - ------ - | A | - | | - | | - | | - ------ - \endverbatim - and after conversion widgets from A are moved to A': - \verbatim - |----------| - |A' | - |----------| - \endverbatim - and vice versa. -*/ -QList HsSimpleWidgetPositioningOnOrientationChange::convert( - const QRectF &fromRect, - const QList &fromGeometries, - const QRectF &toRect) -{ - Q_UNUSED(fromRect) - QList toGeometries; - foreach (QRectF g, fromGeometries) { - QPointF c(g.center()); - qreal x = qBound(toRect.left(), c.x(), toRect.right()); - qreal y = qBound(toRect.top(), c.y(), toRect.bottom()); - g.moveCenter(QPointF(x, y)); - toGeometries << g; - } - return toGeometries; -} - -/*! \class HsAdvancedWidgetPositioningOnOrientationChange \brief More advanced widget positioning algorithm. @@ -127,151 +88,59 @@ const QRectF &toRect) { QList toGeometries; - // check if moving from landscape to portrait - if ( fromRect.width() > fromRect.height() ) { + + // Portrait -> Landscape + if (fromRect.width() < fromRect.height()) { foreach (QRectF g, fromGeometries) { - QRectF leftHalf = QRectF(fromRect.x(), fromRect.y(), fromRect.width()/2, fromRect.height()); - QPointF c(g.center()); - qreal x = 0; - qreal y = 0; - if ( leftHalf.contains(c) ) { - x = qBound(toRect.left(), c.x(), toRect.right()); - y = qBound(toRect.top(), c.y(), toRect.bottom()); + + QRectF tg(g.topLeft() - fromRect.topLeft(), g.size()); + + qreal x = tg.center().x() / fromRect.width(); + qreal y = tg.center().y() / (fromRect.height() / 2); + + if (y < 1) { + x *= toRect.width() / 2; + y *= toRect.height(); } else { - QRectF lowerHalf = QRectF(toRect.x(), toRect.y()+toRect.height()/2, toRect.width(), toRect.height()/2); - x = qBound(toRect.left(), c.x()-leftHalf.width(), toRect.right()); - y = qBound(lowerHalf.top(), c.y()+leftHalf.height(), lowerHalf.bottom()); + x *= toRect.width() / 2; + x += toRect.width() / 2; + y -= 1; + y *= toRect.height(); } - g.moveCenter(QPointF(x, y)); - toGeometries << g; + + x = qBound(g.width() / 2, x, toRect.width() - g.width() / 2); + y = qBound(g.height() / 2, y, toRect.height() - g.height() / 2); + + g.moveCenter(QPointF(x, y) + toRect.topLeft()); + + toGeometries.append(g); } - } - else { // moving from portrait to landscape + } else { // Landscape -> Portrait foreach (QRectF g, fromGeometries) { - QRectF upperHalf = QRectF(fromRect.x(), fromRect.y(), fromRect.width(), fromRect.height()/2); - QPointF c(g.center()); - qreal x = 0; - qreal y = 0; - if ( upperHalf.contains(c) ) { - x = qBound(toRect.left(), c.x(), toRect.right()); - y = qBound(toRect.top(), c.y(), toRect.bottom()); + + QRectF tg(g.topLeft() - fromRect.topLeft(), g.size()); + + qreal x = tg.center().x() / (fromRect.width() / 2); + qreal y = tg.center().y() / fromRect.height(); + + if (x < 1) { + x *= toRect.width(); + y *= toRect.height() / 2; } else { - QRectF rightHalf = QRectF(toRect.x()+toRect.width()/2, toRect.y(), toRect.width()/2, toRect.height()); - x = qBound(rightHalf.left(), c.x()+rightHalf.width(), rightHalf.right()); - y = qBound(toRect.top(), c.y()-upperHalf.height(), toRect.bottom()); + x -= 1; + x += toRect.width(); + y *= toRect.height() / 2; + y += toRect.height() / 2; } - g.moveCenter(QPointF(x, y)); - toGeometries << g; + + x = qBound(g.width() / 2, x, toRect.width() - g.width() / 2); + y = qBound(g.height() / 2, y, toRect.height() - g.height() / 2); + + g.moveCenter(QPointF(x, y) + toRect.topLeft()); + + toGeometries.append(g); } } return toGeometries; } - -/*! - \class HsRelativePositionWidgetPositioningOnOrientationChange - \brief More advanced widget positioning algorithm. - - Calculates new center points of - \a fromGeometries when moving from \a fromRect to \a toRect. - It calculates widget's relative position on the screen and then calculates new position on the target rect: - \verbatim - w - ------- - | A | - |(x,y)| h - | | - | | - ------- - \endverbatim - \verbatim - w' - |----------| - |A'(x',y') | h' - |----------| - \endverbatim - A(x,y) -> A'(x',y') where x'=x*w'/w and y'=y*h'/h and w=width of original rect and h=height of original rect and - w'=width of target rect and h=height of target rect. -*/ -#ifdef COVERAGE_MEASUREMENT -#pragma CTC SKIP -#endif //COVERAGE_MEASUREMENT -QList HsRelativePositionWidgetPositioningOnOrientationChange::convert( - const QRectF &fromRect, - const QList &fromGeometries, - const QRectF &toRect) -{ - qreal xTransformation = toRect.width()/fromRect.width(); - qreal yTransformation= toRect.height()/fromRect.height(); - QList toGeometries; - foreach (QRectF g, fromGeometries) { - QPointF c(g.center()); - qreal x = qBound(toRect.left(), c.x()*xTransformation, toRect.right()); - qreal y = qBound(toRect.top(), c.y()*yTransformation, toRect.bottom()); - g.moveCenter(QPointF(x, y)); - toGeometries << g; - } - return toGeometries; -} -#ifdef COVERAGE_MEASUREMENT -#pragma CTC ENDSKIP -#endif //COVERAGE_MEASUREMENT - - -/*! - \class HsKeepCornerPositionWidgetPositioningOnOrientationChange - \brief More advanced widget positioning algorithm. - - Calculates new center points of - \a fromGeometries when moving from \a fromRect to \a toRect. - It checks if left or right edge is closer to widget's center and keeps that distance same on the target rect. - And same with upper and lower edges. - \verbatim - w - ------- - | A | - |(x,y)| h - | | - | | - ------- - \endverbatim - \verbatim - w' - |----------| - |A'(x',y') | h' - |----------| - \endverbatim -*/ -#ifdef COVERAGE_MEASUREMENT -#pragma CTC SKIP -#endif //COVERAGE_MEASUREMENT -QList HsKeepCornerPositionWidgetPositioningOnOrientationChange::convert( - const QRectF &fromRect, - const QList &fromGeometries, - const QRectF &toRect) -{ - QList toGeometries; - foreach (QRectF g, fromGeometries) { - QPointF c(g.center()); - qreal x = 0; - qreal y = 0; - if ( c.x()-fromRect.x() < fromRect.right() - c.x() ) { - x = qBound(toRect.left(), c.x(), toRect.right()); - } - else { - x = qBound(toRect.left(), toRect.right() - fromRect.right() + c.x(), toRect.right()); - } - if ( c.y()-fromRect.y() < fromRect.bottom() - c.y() ) { - y = qBound(toRect.top(), c.y(), toRect.bottom()); - } - else { - y = qBound(toRect.top(), toRect.bottom() - fromRect.bottom() + c.y(), toRect.bottom()); - } - g.moveCenter(QPointF(x, y)); - toGeometries << g; - } - return toGeometries; -} -#ifdef COVERAGE_MEASUREMENT -#pragma CTC ENDSKIP -#endif //COVERAGE_MEASUREMENT diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/inc/hsapp_defs.h --- a/homescreenapp/inc/hsapp_defs.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/inc/hsapp_defs.h Mon May 03 12:24:59 2010 +0300 @@ -40,6 +40,11 @@ inline const QString urlEntryKey(); inline const QString defaultCollectionIconId(); inline const QString menuModeType(); +inline const QString swTypeKey(); +inline const QString javaSwType(); +inline const QString packageTypeName(); +inline const QString appSettingsPlugin(); +inline const QString groupNameAttributeName(); // Sort attribute enum HsSortAttribute { @@ -56,13 +61,15 @@ AddHsMenuMode }; -const int taskSwitcherUid = 0x2002677D; -const int taskSwitcherPropertyValue = 1; +const char TS_DEVICE_DIALOG_URI[] = + "com.nokia.taskswitcher.tsdevicedialogplugin/1.0"; const char LIBRARY[] = "library"; const char URI[] = "uri"; const char PREFERENCES[] = "preferences"; +const int softwareUpdateApplicationUid = 0x2001FE2F; + #include "hsapp_defs.inl" #endif diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/inc/hsapp_defs.inl --- a/homescreenapp/inc/hsapp_defs.inl Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/inc/hsapp_defs.inl Mon May 03 12:24:59 2010 +0300 @@ -226,4 +226,50 @@ return name; } +/*! + \return sw type key +*/ +inline const QString swTypeKey() +{ + static const QString key("apptype"); + return key; +} + +/*! + \return package entry type name +*/ +inline const QString packageTypeName() +{ + static const QString name("package"); + return name; +} + +/*! + \return java sw type +*/ +inline const QString javaSwType() +{ + static const QString value("java"); + return value; +} + +/*! + \return application settings plugin +*/ +inline const QString appSettingsPlugin() +{ + static const QString key("app_settings_plugin"); + return key; +} + +/*! + \return application group name +*/ +inline const QString groupNameAttributeName() +{ + static const QString key("appgroup_name"); + return key; +} + + #endif diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/rom/homescreenapp_core.iby --- a/homescreenapp/rom/homescreenapp_core.iby Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/rom/homescreenapp_core.iby Mon May 03 12:24:59 2010 +0300 @@ -20,93 +20,84 @@ // ---- hsapplication -------------------------------------------- -file=ABI_DIR\BUILD_DIR\hsapplication.exe PROGRAMS_DIR\hsapplication.exe -data=ZPRIVATE\10003a3f\import\apps\hsapplication_reg.rsc private\10003a3f\import\apps\hsapplication_reg.rsc -data=\epoc32\data\z\resource\apps\hsapplication.rsc resource\apps\hsapplication.rsc -data=\epoc32\data\z\resource\apps\hsapplication.mif resource\apps\hsapplication.mif -data=ZPRIVATE\20022f35\homescreen.db private\20022f35\homescreen.db -data=ZPRIVATE\20022f35\wallpapers\d_portrait.png private\20022f35\wallpapers\d_portrait.png -data=ZPRIVATE\20022f35\wallpapers\d_landscape.png private\20022f35\wallpapers\d_landscape.png -data=\epoc32\data\z\data\images\kqtihswallpapers\bg_1.png data\images\kqtihswallpapers\bg_1.png -data=\epoc32\data\z\data\images\kqtihswallpapers\bg_2.png data\images\kqtihswallpapers\bg_2.png -data=\epoc32\data\z\data\images\kqtihswallpapers\bg_3.png data\images\kqtihswallpapers\bg_3.png +file=ABI_DIR\BUILD_DIR\hsapplication.exe PROGRAMS_DIR\hsapplication.exe +data=ZPRIVATE\10003a3f\import\apps\hsapplication_reg.rsc private\10003a3f\import\apps\hsapplication_reg.rsc +data=\epoc32\data\z\resource\apps\hsapplication.rsc resource\apps\hsapplication.rsc +data=\epoc32\data\z\resource\apps\hsapplication.mif resource\apps\hsapplication.mif +data=ZPRIVATE\20022f35\homescreen.db private\20022f35\homescreen.db +data=ZPRIVATE\20022f35\wallpapers\d_portrait.png private\20022f35\wallpapers\d_portrait.png +data=ZPRIVATE\20022f35\wallpapers\d_landscape.png private\20022f35\wallpapers\d_landscape.png // ---- hsutils -------------------------------------------- -file=ABI_DIR\BUILD_DIR\hsutils.dll SHARED_LIB_DIR\hsutils.dll +file=ABI_DIR\BUILD_DIR\hsutils.dll SHARED_LIB_DIR\hsutils.dll // ---- hsdomainmodel -------------------------------------------- -file=ABI_DIR\BUILD_DIR\hsdomainmodel.dll SHARED_LIB_DIR\hsdomainmodel.dll +file=ABI_DIR\BUILD_DIR\hsdomainmodel.dll SHARED_LIB_DIR\hsdomainmodel.dll // -------- hshomescreenclientplugin -file=ABI_DIR\BUILD_DIR\hshomescreenclientplugin.dll SHARED_LIB_DIR\hshomescreenclientplugin.dll -data=\epoc32\data\z\hsresources\plugins\homescreenclientplugin\hshomescreenclientplugin.qtplugin hsresources\plugins\homescreenclientplugin\hshomescreenclientplugin.qtplugin -data=\epoc32\data\z\hsresources\plugins\homescreenclientplugin\hshomescreenclientplugin.xml hsresources\plugins\homescreenclientplugin\hshomescreenclientplugin.xml +file=ABI_DIR\BUILD_DIR\hshomescreenclientplugin.dll SHARED_LIB_DIR\hshomescreenclientplugin.dll +data=\epoc32\data\z\resource\qt\plugins\hshomescreenclientplugin.qtplugin resource\qt\plugins\hshomescreenclientplugin.qtplugin +data=ZPRIVATE\20022f35\hshomescreenclientplugin.xml private\20022f35\hshomescreenclientplugin.xml // ---- runtimeplugins -------------------------------------------- // -------- hsdefaultruntimeplugin -file=ABI_DIR\BUILD_DIR\hsdefaultruntimeplugin.dll SHARED_LIB_DIR\hsdefaultruntimeplugin.dll -data=\epoc32\data\z\hsresources\plugins\runtimeplugins\hsdefaultruntimeplugin.qtplugin hsresources\plugins\runtimeplugins\hsdefaultruntimeplugin.qtplugin -data=\epoc32\data\z\hsresources\plugins\runtimeplugins\hsdefaultruntimeplugin.xml hsresources\plugins\runtimeplugins\hsdefaultruntimeplugin.xml +file=ABI_DIR\BUILD_DIR\hsdefaultruntimeplugin.dll SHARED_LIB_DIR\hsdefaultruntimeplugin.dll +data=ZPRIVATE\20022f35\plugins\runtimeplugins\hsdefaultruntimeplugin.qtplugin private\20022f35\plugins\runtimeplugins\hsdefaultruntimeplugin.qtplugin +data=ZPRIVATE\20022f35\plugins\runtimeplugins\hsdefaultruntimeplugin.xml private\20022f35\plugins\runtimeplugins\hsdefaultruntimeplugin.xml // ---- serviceproviders -------------------------------------------- // -------- hsmenuserviceprovider -file=ABI_DIR\BUILD_DIR\hsmenuserviceprovider.dll SHARED_LIB_DIR\hsmenuserviceprovider.dll +file=ABI_DIR\BUILD_DIR\hsmenuserviceprovider.dll SHARED_LIB_DIR\hsmenuserviceprovider.dll // ---- stateplugins -------------------------------------------- // -------- hsapplibrarystateplugin -file=ABI_DIR\BUILD_DIR\hsapplibrarystateplugin.dll SHARED_LIB_DIR\hsapplibrarystateplugin.dll -data=\epoc32\data\z\hsresources\plugins\stateplugins\hsapplibrarystateplugin.qtplugin hsresources\plugins\stateplugins\hsapplibrarystateplugin.qtplugin -data=\epoc32\data\z\hsresources\plugins\stateplugins\hsapplibrarystateplugin.xml hsresources\plugins\stateplugins\hsapplibrarystateplugin.xml +file=ABI_DIR\BUILD_DIR\hsapplibrarystateplugin.dll SHARED_LIB_DIR\hsapplibrarystateplugin.dll +data=ZPRIVATE\20022f35\plugins\stateplugins\hsapplibrarystateplugin.qtplugin private\20022f35\plugins\stateplugins\hsapplibrarystateplugin.qtplugin +data=ZPRIVATE\20022f35\plugins\stateplugins\hsapplibrarystateplugin.xml private\20022f35\plugins\stateplugins\hsapplibrarystateplugin.xml // -------- hshomescreenstateplugin -file=ABI_DIR\BUILD_DIR\hshomescreenstateplugin.dll SHARED_LIB_DIR\hshomescreenstateplugin.dll -data=\epoc32\data\z\hsresources\plugins\stateplugins\hshomescreenstateplugin.qtplugin hsresources\plugins\stateplugins\hshomescreenstateplugin.qtplugin -data=\epoc32\data\z\hsresources\plugins\stateplugins\hshomescreenstateplugin.xml hsresources\plugins\stateplugins\hshomescreenstateplugin.xml +file=ABI_DIR\BUILD_DIR\hshomescreenstateplugin.dll SHARED_LIB_DIR\hshomescreenstateplugin.dll +data=ZPRIVATE\20022f35\plugins\stateplugins\hshomescreenstateplugin.qtplugin private\20022f35\plugins\stateplugins\hshomescreenstateplugin.qtplugin +data=ZPRIVATE\20022f35\plugins\stateplugins\hshomescreenstateplugin.xml private\20022f35\plugins\stateplugins\hshomescreenstateplugin.xml // -------- hsmenuworkerstateplugin -file=ABI_DIR\BUILD_DIR\hsmenuworkerstateplugin.dll SHARED_LIB_DIR\hsmenuworkerstateplugin.dll -data=\epoc32\data\z\hsresources\plugins\stateplugins\hsmenuworkerstateplugin.qtplugin hsresources\plugins\stateplugins\hsmenuworkerstateplugin.qtplugin -data=\epoc32\data\z\hsresources\plugins\stateplugins\hsmenuworkerstateplugin.xml hsresources\plugins\stateplugins\hsmenuworkerstateplugin.xml +file=ABI_DIR\BUILD_DIR\hsmenuworkerstateplugin.dll SHARED_LIB_DIR\hsmenuworkerstateplugin.dll +data=ZPRIVATE\20022f35\plugins\stateplugins\hsmenuworkerstateplugin.qtplugin private\20022f35\plugins\stateplugins\hsmenuworkerstateplugin.qtplugin +data=ZPRIVATE\20022f35\plugins\stateplugins\hsmenuworkerstateplugin.xml private\20022f35\plugins\stateplugins\hsmenuworkerstateplugin.xml // ---- widgetplugins -------------------------------------------- // -------- hsshortcutwidgetplugin -file=ABI_DIR\BUILD_DIR\hsshortcutwidgetplugin.dll SHARED_LIB_DIR\hsshortcutwidgetplugin.dll -data=ZPRIVATE\20022F35\import\widgetregistry\20022F46\hsshortcutwidgetplugin.qtplugin private\20022f35\import\widgetregistry\20022F46\hsshortcutwidgetplugin.qtplugin -data=ZPRIVATE\20022F35\import\widgetregistry\20022F46\hsshortcutwidgetplugin.manifest private\20022f35\import\widgetregistry\20022F46\hsshortcutwidgetplugin.manifest -data=ZPRIVATE\20022F35\import\widgetregistry\20022F46\hsshortcutwidgetplugin.xml private\20022f35\import\widgetregistry\20022F46\hsshortcutwidgetplugin.xml +file=ABI_DIR\BUILD_DIR\hsshortcutwidgetplugin.dll SHARED_LIB_DIR\hsshortcutwidgetplugin.dll +data=ZPRIVATE\20022F35\import\widgetregistry\20022F46\hsshortcutwidgetplugin.qtplugin private\20022f35\import\widgetregistry\20022F46\hsshortcutwidgetplugin.qtplugin +data=ZPRIVATE\20022F35\import\widgetregistry\20022F46\hsshortcutwidgetplugin.manifest private\20022f35\import\widgetregistry\20022F46\hsshortcutwidgetplugin.manifest +data=ZPRIVATE\20022F35\import\widgetregistry\20022F46\hsshortcutwidgetplugin.xml private\20022f35\import\widgetregistry\20022F46\hsshortcutwidgetplugin.xml // -------- hsclockwidgetplugin -file=ABI_DIR\BUILD_DIR\hsclockwidgetplugin.dll SHARED_LIB_DIR\hsclockwidgetplugin.dll -data=ZPRIVATE\20022f35\import\widgetregistry\20022F6C\hsclockwidgetplugin.qtplugin private\20022f35\import\widgetregistry\20022F6C\hsclockwidgetplugin.qtplugin -data=ZPRIVATE\20022f35\import\widgetregistry\20022F6C\hsclockwidgetplugin.manifest private\20022f35\import\widgetregistry\20022F6C\hsclockwidgetplugin.manifest -data=ZPRIVATE\20022f35\import\widgetregistry\20022F6C\tclock.png private\20022f35\import\widgetregistry\20022F6C\tclock.png -data=ZPRIVATE\20022f35\import\widgetregistry\20022F6C\hsclockwidgetplugin.xml private\20022f35\import\widgetregistry\20022F6C\hsclockwidgetplugin.xml +file=ABI_DIR\BUILD_DIR\hsclockwidgetplugin.dll SHARED_LIB_DIR\hsclockwidgetplugin.dll +data=ZPRIVATE\20022f35\import\widgetregistry\20022F6C\hsclockwidgetplugin.qtplugin private\20022f35\import\widgetregistry\20022F6C\hsclockwidgetplugin.qtplugin +data=ZPRIVATE\20022f35\import\widgetregistry\20022F6C\hsclockwidgetplugin.manifest private\20022f35\import\widgetregistry\20022F6C\hsclockwidgetplugin.manifest +data=ZPRIVATE\20022f35\import\widgetregistry\20022F6C\tclock.png private\20022f35\import\widgetregistry\20022F6C\tclock.png +data=ZPRIVATE\20022f35\import\widgetregistry\20022F6C\hsclockwidgetplugin.xml private\20022f35\import\widgetregistry\20022F6C\hsclockwidgetplugin.xml // -------- hsdialerwidgetplugin -file=ABI_DIR\BUILD_DIR\hsdialerwidgetplugin.dll SHARED_LIB_DIR\hsdialerwidgetplugin.dll -data=ZPRIVATE\20022f35\import\widgetregistry\20022F44\hsdialerwidgetplugin.qtplugin private\20022f35\import\widgetregistry\20022F44\hsdialerwidgetplugin.qtplugin -data=ZPRIVATE\20022f35\import\widgetregistry\20022F44\hsdialerwidgetplugin.manifest private\20022f35\import\widgetregistry\20022F44\hsdialerwidgetplugin.manifest -data=ZPRIVATE\20022f35\import\widgetregistry\20022F44\qtg_graf_hs_dialer.svg private\20022f35\import\widgetregistry\20022F44\qtg_graf_hs_dialer.svg -data=ZPRIVATE\20022f35\import\widgetregistry\20022F44\hsdialerwidgetplugin.xml private\20022f35\import\widgetregistry\20022F44\hsdialerwidgetplugin.xml - -// ---- style plugins -------------------------------------------------- - -// -------- hsanalogclockstyleplugin -file=ABI_DIR\BUILD_DIR\hsanalogclockstyleplugin.dll SHARED_LIB_DIR\hsanalogclockstyleplugin.dll -data=\epoc32\data\z\hsresources\plugins\styleplugins\hsanalogclockstyleplugin.qtplugin hsresources\plugins\styleplugins\hsanalogclockstyleplugin.qtplugin +file=ABI_DIR\BUILD_DIR\hsdialerwidgetplugin.dll SHARED_LIB_DIR\hsdialerwidgetplugin.dll +data=ZPRIVATE\20022f35\import\widgetregistry\20022F44\hsdialerwidgetplugin.qtplugin private\20022f35\import\widgetregistry\20022F44\hsdialerwidgetplugin.qtplugin +data=ZPRIVATE\20022f35\import\widgetregistry\20022F44\hsdialerwidgetplugin.manifest private\20022f35\import\widgetregistry\20022F44\hsdialerwidgetplugin.manifest +data=ZPRIVATE\20022f35\import\widgetregistry\20022F44\qtg_graf_hs_dialer.svg private\20022f35\import\widgetregistry\20022F44\qtg_graf_hs_dialer.svg +data=ZPRIVATE\20022f35\import\widgetregistry\20022F44\hsdialerwidgetplugin.xml private\20022f35\import\widgetregistry\20022F44\hsdialerwidgetplugin.xml // ---- IMenuClient -------------------------------------------- -// -------- hsmenucontentpublish -file=ABI_DIR\BUILD_DIR\hsmenucontentpublish.dll SHARED_LIB_DIR\hsmenucontentpublish.dll -data=\epoc32\data\z\hsresources\plugins\hsmenucontentpublishplugin\hsmenucontentpublish.qtplugin hsresources\plugins\hsmenucontentpublishplugin\hsmenucontentpublish.qtplugin -data=\epoc32\data\z\hsresources\plugins\hsmenucontentpublishplugin\hsmenucontentpublish.xml hsresources\plugins\hsmenucontentpublishplugin\hsmenucontentpublish.xml +// -------- hsmenuclientplugin +file=ABI_DIR\BUILD_DIR\hsmenuclientplugin.dll SHARED_LIB_DIR\hsmenuclientplugin.dll +data=\epoc32\data\z\resource\qt\plugins\hsmenuclientplugin.qtplugin resource\qt\plugins\hsmenuclientplugin.qtplugin +data=ZPRIVATE\20022f35\hsmenuclientplugin.xml private\20022f35\hsmenuclientplugin.xml #endif //__HOMESCREENAPP_CORE_IBY__ diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/runtimeplugins/hsdefaultruntimeplugin/hsdefaultruntimeplugin.pro --- a/homescreenapp/runtimeplugins/hsdefaultruntimeplugin/hsdefaultruntimeplugin.pro Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/runtimeplugins/hsdefaultruntimeplugin/hsdefaultruntimeplugin.pro Mon May 03 12:24:59 2010 +0300 @@ -18,13 +18,15 @@ CONFIG += plugin hb mobility MOBILITY = serviceframework publishsubscribe -PLUGIN_SUBDIR = /hsresources/plugins/runtimeplugins +RESOURCES += hsdefaultruntimeplugin.qrc + +PLUGIN_SUBDIR = /private/20022F35/plugins/runtimeplugins include (../../common.pri) LIBS += -lhsdomainmodel \ -lhsutils - + QT += xml sql DEPENDPATH += ./inc \ @@ -35,7 +37,7 @@ symbian: { TARGET.UID3 = 0x20022F3E - appkey:DEFINES += S60APP_KEY + LIBS += -lxqkeycapture } diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/runtimeplugins/hsdefaultruntimeplugin/hsdefaultruntimeplugin.qrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/runtimeplugins/hsdefaultruntimeplugin/hsdefaultruntimeplugin.qrc Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,5 @@ + + + resource/tapandhold.axml + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/runtimeplugins/hsdefaultruntimeplugin/inc/hsdefaultruntime.h --- a/homescreenapp/runtimeplugins/hsdefaultruntimeplugin/inc/hsdefaultruntime.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/runtimeplugins/hsdefaultruntimeplugin/inc/hsdefaultruntime.h Mon May 03 12:24:59 2010 +0300 @@ -21,6 +21,10 @@ #include #include +#ifdef Q_OS_SYMBIAN +#include +#endif + #ifndef HSDEFAULTRUNTIMEPLUGIN_UNITTEST #define TEST_CLASS_FWD #define TEST_FRIEND @@ -55,6 +59,8 @@ private: Q_DISABLE_COPY(HsDefaultRuntime) + void registerAnimations(); + void createStatePublisher(); void createContentServiceParts(); void createStates(); @@ -72,6 +78,10 @@ bool mIdleStateActive; QValueSpacePublisher *mPublisher; + +#ifdef Q_OS_SYMBIAN + XqKeyCapture keyCapture; +#endif TEST_FRIEND }; diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/runtimeplugins/hsdefaultruntimeplugin/resource/hsdefaultruntimeplugin.s60xml --- a/homescreenapp/runtimeplugins/hsdefaultruntimeplugin/resource/hsdefaultruntimeplugin.s60xml Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - hsdefaultruntimeplugin - z:/hsresources/plugins/runtimeplugins/hsdefaultruntimeplugin.qtplugin - Homescreen Runtime Plugin - - com.nokia.symbian.IHomeScreenRuntime - 1.0 - Default implementation for homescreen runtime - - - diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/runtimeplugins/hsdefaultruntimeplugin/resource/tapandhold.axml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/runtimeplugins/hsdefaultruntimeplugin/resource/tapandhold.axml Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/runtimeplugins/hsdefaultruntimeplugin/src/hsdefaultruntime.cpp --- a/homescreenapp/runtimeplugins/hsdefaultruntimeplugin/src/hsdefaultruntime.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/runtimeplugins/hsdefaultruntimeplugin/src/hsdefaultruntime.cpp Mon May 03 12:24:59 2010 +0300 @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -26,6 +27,8 @@ #include #include +#include +#include #include "homescreendomainpskeys.h" #include "hsdefaultruntime.h" @@ -39,12 +42,22 @@ QTM_USE_NAMESPACE -#ifdef S60APP_KEY -int applicationKey = Qt::Key_Launch0; + +#ifdef Q_OS_SYMBIAN +const static Qt::Key applicationKey = Qt::Key_Menu; #else -int applicationKey = Qt::Key_Any; +const static Qt::Key applicationKey = Qt::Key_Home; #endif +namespace +{ + const char KHsLoadSceneStateInterface[] = "com.nokia.homescreen.state.HsLoadSceneState"; + const char KHsIdleStateInterface[] = "com.nokia.homescreen.state.HsIdleState"; + const char KHsAppLibraryStateInterface[] = "com.nokia.homescreen.state.HsAppLibraryState"; + const char KHsMenuWorkerStateInterface[] = "com.nokia.homescreen.state.HsMenuWorkerState"; +} + + /*! \class HsDefaultRuntime \ingroup group_hsdefaultruntimeplugin @@ -65,6 +78,9 @@ mHomeScreenActive(false), mIdleStateActive(false), mPublisher(NULL) +#ifdef Q_OS_SYMBIAN + ,keyCapture() +#endif { HSTEST_FUNC_ENTRY("HS::HsDefaultRuntime::HsDefaultRuntime"); @@ -73,7 +89,7 @@ #ifdef Q_OS_SYMBIAN db->setDatabaseName("c:/private/20022f35/homescreen.db"); #else - db->setDatabaseName("homescreen.db"); + db->setDatabaseName("private/20022f35/homescreen.db"); #endif db->open(); HsDatabase::setInstance(db); @@ -83,6 +99,8 @@ HsWidgetPositioningOnWidgetAdd::setInstance( new HsAnchorPointInBottomRight); + + registerAnimations(); createStatePublisher(); createContentServiceParts(); @@ -116,22 +134,42 @@ switch (event->type()) { case QEvent::ApplicationActivate: - { - qDebug() << "HsDefaultRuntime::eventFilter: QEvent::ApplicationActivate"; - mHomeScreenActive = true; - updatePSKeys(); - } - break; + qDebug() << "HsDefaultRuntime::eventFilter: QEvent::ApplicationActivate"; +#ifdef Q_OS_SYMBIAN + keyCapture.captureKey(applicationKey); +#endif + mHomeScreenActive = true; + updatePSKeys(); + break; case QEvent::ApplicationDeactivate: - { - qDebug() << "HsDefaultRuntime::eventFilter: QEvent::ApplicationDeactivate"; + qDebug() << "HsDefaultRuntime::eventFilter: QEvent::ApplicationDeactivate"; +#ifdef Q_OS_SYMBIAN + keyCapture.cancelCaptureKey(applicationKey); +#endif mHomeScreenActive = false; - updatePSKeys(); - } - break; + updatePSKeys(); + break; + default: + break; } - - return QStateMachine::eventFilter(watched, event); + + bool result = QStateMachine::eventFilter(watched, event); + // temporary hack as we should not register twice for events + if (event->type() == QEvent::KeyPress ) { + QKeyEvent* ke = static_cast(event); + // Key_Launch0 should be removed when QT starts to send Key_Menu + result = (ke->key() == applicationKey) || ke->key() == Qt::Key_Launch0; + } + return result; +} + +/*! + Registers framework animations. +*/ +void HsDefaultRuntime::registerAnimations() +{ + HbIconAnimationManager *manager = HbIconAnimationManager::global(); + manager->addDefinitionFile(QLatin1String(":/resource/tapandhold.axml")); } /*! @@ -178,25 +216,16 @@ QServiceManager manager; - QServiceFilter filter; - - filter.setInterface("com.nokia.homescreen.state.HsLoadSceneState"); -#ifdef HSDEFAULTRUNTIMEPLUGIN_UNITTEST - filter.setServiceName("mockstateplugins"); -#endif - QList interfaces = manager.findInterfaces(filter); - - QObject *loadSceneStateObj = manager.loadInterface(interfaces.first()); + + QObject *loadSceneStateObj = manager.loadInterface(KHsLoadSceneStateInterface); QState *loadSceneState = qobject_cast(loadSceneStateObj); loadSceneState->setParent(guiRootState); - loadSceneState->setObjectName(interfaces.first().interfaceName()); + loadSceneState->setObjectName(KHsLoadSceneStateInterface); - filter.setInterface("com.nokia.homescreen.state.HsIdleState"); - interfaces = manager.findInterfaces(filter); - QObject *idleStateObj = manager.loadInterface(interfaces.first()); + QObject *idleStateObj = manager.loadInterface(KHsIdleStateInterface); QState *idleState = qobject_cast(idleStateObj); idleState->setParent(guiRootState); - idleState->setObjectName(interfaces.first().interfaceName()); + idleState->setObjectName(KHsIdleStateInterface); connect(idleState, SIGNAL(entered()), SLOT(onIdleStateEntered())); connect(idleState, SIGNAL(exited()), SLOT(onIdleStateExited())); @@ -208,20 +237,16 @@ QState::ParallelStates, guiRootState); QState *menuRootState = new QState(menuParallelState); - filter.setInterface("com.nokia.homescreen.state.HsAppLibraryState"); - interfaces = manager.findInterfaces(filter); - QObject *appLibraryStateObj = manager.loadInterface(interfaces.first()); + QObject *appLibraryStateObj = manager.loadInterface(KHsAppLibraryStateInterface); QState *appLibraryState = qobject_cast(appLibraryStateObj); appLibraryState->setParent(menuRootState); - appLibraryState->setObjectName(interfaces.first().interfaceName()); + appLibraryState->setObjectName(KHsAppLibraryStateInterface); menuRootState->setInitialState(appLibraryState); - filter.setInterface("com.nokia.homescreen.state.HsMenuWorkerState"); - interfaces = manager.findInterfaces(filter); - QObject *menuWorkerStateObj = manager.loadInterface(interfaces.first()); + QObject *menuWorkerStateObj = manager.loadInterface(KHsMenuWorkerStateInterface); QState *menuWorkerState = qobject_cast(menuWorkerStateObj); menuWorkerState->setParent(menuParallelState); - menuWorkerState->setObjectName(interfaces.first().interfaceName()); + menuWorkerState->setObjectName(KHsMenuWorkerStateInterface); // root state transitions idleState->addTransition(idleState, SIGNAL(event_applicationLibrary()), menuRootState); @@ -243,15 +268,29 @@ // key driven transition from idle to menu QKeyEventTransition *idleToMenuRootTransition = new QKeyEventTransition( - window, QEvent::KeyRelease, applicationKey, idleState); + window, QEvent::KeyPress, applicationKey); idleToMenuRootTransition->setTargetState(menuRootState); idleState->addTransition(idleToMenuRootTransition); // key driven transition from menu to idle QKeyEventTransition *menuToIdleTransition = new QKeyEventTransition( - window, QEvent::KeyRelease, applicationKey, idleState); + window, QEvent::KeyPress, applicationKey); menuToIdleTransition->setTargetState(idleState); menuRootState->addTransition(menuToIdleTransition); + + // transition for Key_Launch0 should be removed + // when OT starts to send Key_Menu (maybe wk14) + QKeyEventTransition *idleToMenuRootTransition2 = + new QKeyEventTransition( + window, QEvent::KeyPress, Qt::Key_Launch0); + idleToMenuRootTransition2->setTargetState(menuRootState); + idleState->addTransition(idleToMenuRootTransition2); + // key driven transition from menu to idle + QKeyEventTransition *menuToIdleTransition2 = + new QKeyEventTransition( + window, QEvent::KeyPress, Qt::Key_Launch0); + menuToIdleTransition2->setTargetState(idleState); + menuRootState->addTransition(menuToIdleTransition2); // transitions to child states // opening shortcut to a colleciton diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsmenucollectionsitemmodel.h --- a/homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsmenucollectionsitemmodel.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsmenucollectionsitemmodel.h Mon May 03 12:24:59 2010 +0300 @@ -42,7 +42,7 @@ private: // Function declarations - QString getSecondLine(CaEntry *entry) const; + QString getSecondLine(const CaEntry *entry) const; }; diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsmenuservice.h --- a/homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsmenuservice.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsmenuservice.h Mon May 03 12:24:59 2010 +0300 @@ -42,6 +42,8 @@ HsSortAttribute sortAttribute = DescendingNameHsSortAttribute); static HsMenuItemModel *getAllCollectionsModel( HsSortAttribute sortAttribute = LatestOnTopHsSortAttribute); + static HsMenuItemModel *getInstalledModel( + HsSortAttribute sortAttribute = DescendingNameHsSortAttribute); static HsMenuItemModel *getCollectionModel(int collectionId, HsSortAttribute sortAttribute = LatestOnTopHsSortAttribute, const QString &collectionType = collectionTypeName()); @@ -65,6 +67,8 @@ static int allCollectionsId(); static bool touch(int entryId); + + static bool launchSoftwareUpdate(); private: // data diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsmenucollectionsitemmodel.cpp --- a/homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsmenucollectionsitemmodel.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsmenucollectionsitemmodel.cpp Mon May 03 12:24:59 2010 +0300 @@ -52,8 +52,9 @@ QVariant variant; if (role == Qt::DisplayRole && secondLineVisibility()) { QList text; - text << entry(index)->text(); - text << getSecondLine(entry(index)); + QSharedPointer item = entry(index); + text << item->text(); + text << getSecondLine(item.data()); variant = QVariant(text); } else { variant = CaItemModel::data(index, role); @@ -70,7 +71,7 @@ \retval string with applications names separated by ',' no longer than 256 bytes */ -QString HsMenuCollectionsItemModel::getSecondLine(CaEntry *entry) const +QString HsMenuCollectionsItemModel::getSecondLine(const CaEntry *entry) const { HSMENUTEST_FUNC_ENTRY("HsMenuCollectionsItemModel::getSecondLine"); QString result; @@ -87,7 +88,7 @@ query.setFlagsOff(MissingEntryFlag); - QList entries = CaService::instance()->getEntries(query); + QList< QSharedPointer > entries = CaService::instance()->getEntries(query); if (!entries.count()) { result = QString(hbTrId("txt_applib_dblist_downloaded_val_empty")); @@ -118,7 +119,6 @@ } } } - qDeleteAll(entries); HSMENUTEST_FUNC_EXIT("HsMenuCollectionsItemModel::getSecondLine"); return result; } diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsmenuservice.cpp --- a/homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsmenuservice.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsmenuservice.cpp Mon May 03 12:24:59 2010 +0300 @@ -18,6 +18,7 @@ #include #include #include +#include #include "hsapp_defs.h" #include "hsmenuservice.h" @@ -84,6 +85,29 @@ } /*! + Returns native and java applications. + \param sortAttribute :: SortAttribute + \retval HsMenuItemModel: installed model + */ +HsMenuItemModel *HsMenuService::getInstalledModel( + HsSortAttribute sortAttribute) +{ + //TODO get proper items + qDebug() << "HsMenuService::getInstalledModel" << "sortAttribute:" + << sortAttribute; + HSMENUTEST_FUNC_ENTRY("HsMenuService::getInstalledModel"); + CaQuery query; + query.addEntryTypeName(packageTypeName()); + query.setFlagsOn(VisibleEntryFlag | RemovableEntryFlag); + query.setFlagsOff(MissingEntryFlag); + query.setSort(HsMenuServiceUtils::sortBy(sortAttribute), + HsMenuServiceUtils::sortOrder(sortAttribute)); + HsMenuItemModel *model = new HsMenuItemModel(query); + HSMENUTEST_FUNC_EXIT("HsMenuService::getInstalledModel"); + return model; +} + +/*! Returns collection model \param collectionId :: id of this collection \param sortAttribute :: SortAttribute @@ -122,12 +146,10 @@ query.setParentId(allCollectionsId()); query.setFlagsOn(VisibleEntryFlag); query.setFlagsOff(MissingEntryFlag); - QList collections = CaService::instance()->getEntries(query); + QList< QSharedPointer > collections = CaService::instance()->getEntries(query); QStringList resultList; - while (!collections.isEmpty()) { - CaEntry *entry = collections.takeFirst(); + foreach(QSharedPointer entry, collections) { resultList << entry->text(); - delete entry; } qDebug() << "HsMenuService::getCollectionNames resultList:" @@ -145,12 +167,11 @@ { qDebug() << "HsMenuService::getName entryId:" << entryId; HSMENUTEST_FUNC_ENTRY("HsMenuService::getName"); - CaEntry *entry = CaService::instance()->getEntry(entryId); + QSharedPointer entry = CaService::instance()->getEntry(entryId); QString name; - if (entry) { + if (!entry.isNull()) { name = entry->text(); - delete entry; } qDebug() << "HsMenuService::getName name: " << name; HSMENUTEST_FUNC_EXIT("HsMenuService::getName"); @@ -177,18 +198,10 @@ */ bool HsMenuService::launchTaskSwitcher() { - qDebug() << "HsMenuService::launchTS"; - QScopedPointer tsEntry(new CaEntry); - tsEntry->setEntryTypeName(applicationTypeName()); - tsEntry->setAttribute( - applicationUidEntryKey(), QString::number(taskSwitcherUid)); - int retval = CaService::instance()->executeCommand(*tsEntry, - openActionIdentifier()); - if(retval) { - QValueSpacePublisher publisher("/TaskSwitcher"); - publisher.setValue("Activation", taskSwitcherPropertyValue); - } - return retval; + qDebug() << "HsMenuService::launchTaskSwitcher"; + HbDeviceDialog deviceDialog; + QVariantMap params; + return deviceDialog.show(TS_DEVICE_DIALOG_URI, params); } /*! @@ -204,14 +217,14 @@ CaEntry collection(GroupEntryRole); collection.setEntryTypeName(collectionTypeName()); collection.setText(name); + collection.setAttribute(groupNameAttributeName(),name); CaIconDescription iconDescription; iconDescription.setFilename(defaultCollectionIconId()); collection.setIconDescription(iconDescription); - CaEntry *entry = CaService::instance()->createEntry(collection); - if (entry) { + QSharedPointer entry = CaService::instance()->createEntry(collection); + if (!entry.isNull()) { qDebug() << "HsMenuService::addCollection entry" << entry; entryId = entry->id(); - delete entry; CaService::instance()->appendEntryToGroup(allCollectionsId(), entryId); } @@ -232,14 +245,13 @@ << collectionId << "newCollectionName" << newCollectionName; HSMENUTEST_FUNC_ENTRY("HsMenuService::renameCollection"); bool result(false); - CaEntry *collection = CaService::instance()->getEntry(collectionId); + QSharedPointer collection = CaService::instance()->getEntry(collectionId); if (collection) { qDebug() << "HsMenuService::renameCollection collection" << collection; collection->setText(newCollectionName); result = CaService::instance()->updateEntry(*collection); - delete collection; } HSMENUTEST_FUNC_EXIT("HsMenuService::renameCollection"); return result; @@ -341,6 +353,22 @@ */ bool HsMenuService::touch(int entryId) { - CaEntry *entry = CaService::instance()->getEntry(entryId); + QSharedPointer entry = CaService::instance()->getEntry(entryId); return CaService::instance()->touch(* entry); } + +/*! + Launch SoftwareUpdateApplication + \retval boolean launching status + */ +bool HsMenuService::launchSoftwareUpdate() +{ + qDebug() << "HsMenuService::launchSoftwareUpdate"; + QScopedPointer tsEntry(new CaEntry); + tsEntry->setEntryTypeName(applicationTypeName()); + tsEntry->setAttribute( + applicationUidEntryKey(), QString::number(softwareUpdateApplicationUid)); + int retval = CaService::instance()->executeCommand(*tsEntry, + openActionIdentifier()); + return retval; +} diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/sis/homescreenapp_ut_hs.pkg --- a/homescreenapp/sis/homescreenapp_ut_hs.pkg Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/sis/homescreenapp_ut_hs.pkg Mon May 03 12:24:59 2010 +0300 @@ -56,7 +56,7 @@ "/epoc32/release/armv5/urel/mockwidgetplugin.dll" - "c:/sys/bin/mockwidgetplugin.dll" "/epoc32/data/z/private/20022F59/hsresources/plugins/widgetplugins/mockwidgetplugin.qtplugin" - "c:/private/20022F59/hsresources/plugins/widgetplugins/mockwidgetplugin.qtplugin" -"/epoc32/data/z/private/20022F59/hsresources/plugins/widgetplugins/mockwidgetplugin.s60xml" - "c:/private/20022F59/hsresources/plugins/widgetplugins/mockwidgetplugin.s60xml" +"/epoc32/data/z/private/20022F59/hsresources/plugins/widgetplugins/mockwidgetplugin.xml" - "c:/private/20022F59/hsresources/plugins/widgetplugins/mockwidgetplugin.xml" ;--------------- runtimeplugins --------------- @@ -66,7 +66,7 @@ "/epoc32/data/z/resource/apps/t_hsdefaultruntimeplugin.rsc" - "c:/resource/apps/t_hsdefaultruntimeplugin.rsc" "/epoc32/release/armv5/urel/mockstateplugins.dll" - "c:/sys/bin/mockstateplugins.dll" "/epoc32/data/z/private/20022f63/hsresources/plugins/stateplugins/mockstateplugins.qtplugin" - "c:/private/20022f63/hsresources/plugins/stateplugins/mockstateplugins.qtplugin" -"/epoc32/data/z/private/20022f63/hsresources/plugins/stateplugins/mockstateplugins.s60xml" - "c:/private/20022f63/hsresources/plugins/stateplugins/mockstateplugins.s60xml" +"/epoc32/data/z/private/20022f63/hsresources/plugins/stateplugins/mockstateplugins.xml" - "c:/private/20022f63/hsresources/plugins/stateplugins/mockstateplugins.xml" ;--------------- serviceproviders --------------- @@ -84,15 +84,9 @@ "/epoc32/release/armv5/urel/t_hsshortcutwidget.exe" - "c:/sys/bin/t_hsshortcutwidget.exe" "/epoc32/data/z/private/10003a3f/import/apps/t_hsshortcutwidget_reg.rsc" - "c:/private/10003a3f/import/apps/t_hsshortcutwidget_reg.rsc" "/epoc32/data/z/resource/apps/t_hsshortcutwidget.rsc" - "c:/resource/apps/t_hsshortcutwidget.rsc" -"../widgetplugins/hsshortcutwidgetplugin/tsrc/t_hsshortcutwidget/foundicon.png" - "c:/private/20022F64/foundicon.png" ;hsclockwidgetplugin ;t_hsclockwidgetplugin: "/epoc32/release/armv5/urel/t_hsclockwidgetplugin.exe" - "c:/sys/bin/t_hsclockwidgetplugin.exe" "/epoc32/data/z/private/10003a3f/import/apps/t_hsclockwidgetplugin_reg.rsc" - "c:/private/10003a3f/import/apps/t_hsclockwidgetprovider_reg.rsc" "/epoc32/data/z/resource/apps/t_hsclockwidgetplugin.rsc" - "c:/resource/apps/t_hsclockwidgetprovider.rsc" - -;t_hsanalogclockstyleplugin -"/epoc32/release/armv5/urel/t_hsanalogclockstyleplugin.exe" - "c:/sys/bin/t_hsanalogclockstyleplugin.exe" -"/epoc32/data/z/private/10003a3f/import/apps/t_hsanalogclockstyleplugin_reg.rsc" - "c:/private/10003a3f/import/apps/t_hsanalogclockstyleplugin_reg.rsc" -"/epoc32/data/z/resource/apps/t_hsanalogclockstyleplugin.rsc" - "c:/resource/apps/t_hsanalogclockstyleplugin.rsc" diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsapplibrarystateplugin/hsapplibrarystateplugin.pro --- a/homescreenapp/stateplugins/hsapplibrarystateplugin/hsapplibrarystateplugin.pro Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/hsapplibrarystateplugin.pro Mon May 03 12:24:59 2010 +0300 @@ -12,7 +12,7 @@ CONFIG += plugin hb mobility MOBILITY = serviceframework -PLUGIN_SUBDIR = /hsresources/plugins/stateplugins +PLUGIN_SUBDIR = /private/20022F35/plugins/stateplugins include(../../common.pri) LIBS += -lhsdomainmodel \ -lhsutils \ diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsallappsstate.h --- a/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsallappsstate.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsallappsstate.h Mon May 03 12:24:59 2010 +0300 @@ -51,144 +51,49 @@ HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest) public: - - /** - * Constructor. - * - * @since S60 ?S60_version. - * @param containerView Container view. - * @param parent Owner. - */ HsAllAppsState(HsMenuView &menuView, QState *parent = 0); - - /** - * Destructor. - * - * @since S60 ?S60_version. - */ ~HsAllAppsState(); public slots: - /** - * Populates all applications - * - * @since S60 ?S60_version. - */ void scrollToBeginning(); - - /** - * Sets collections sort order - * - * @since S60 ?S60_version. - * @param sortOrder sort order. - */ void collectionsSortOrder(HsSortAttribute sortAttribute); private slots: bool openTaskSwitcher(); - /** - * Slot connected to List widget in normal mode. - * - * @since S60 ?S60_version. - * @param index Model index of the activated item. - */ + bool checkSoftwareUpdates(); + void listItemActivated(const QModelIndex &index); - /** - * Slot connected to List widget in add mode. - * - * @since S60 ?S60_version. - * @param index Model index of the activated item. - */ void addActivated(const QModelIndex &index); - /** - * Slot connected to List widget in normal mode. - * Called when item long pressed. - * - * @since S60 ?S60_version. - * @param item View item. - * @param coords Press point coordinates. - */ void listItemLongPressed(HbAbstractViewItem *item, const QPointF &coords); - /** - * Slot connected to List widget in add mode. - * Called when item long pressed. - * - * @since S60 ?S60_version. - * @param item View item. - * @param coords Press point coordinates. - */ void addLongPressed(HbAbstractViewItem *item, const QPointF &coords); - /** - * Slot called when application is adding to collection. - * - * @since S60 ?S60_version. - */ void addToCollection(); - /** - * Menu ascending sort action slot. - * - * @since S60 ?S60_version. - */ + void openInstalledView(); + void ascendingMenuAction(); - /** - * Menu descending sort action slot. - * - * @since S60 ?S60_version. - */ void descendingMenuAction(); - /** - * Slot invoked when a state is entered. - * - * @since S60 ?S60_version. - */ void stateEntered(); - /** - * Slot invoked when add mode entered. - * - * @since S60 ?S60_version. - */ void addModeEntered(); - /** - * Slot invoked when normal mode entered. - * - * @since S60 ?S60_version. - */ void normalModeEntered(); - /** - * Slot invoked when a state is exited. - * - * @since S60 ?S60_version. - */ void stateExited(); private: - /** - * Constructs contained objects. - * - * @since S60 ?S60_version. - */ void construct(); - /** - * Creates and installs menu options for the view - * - * @since S60 ?S60_version. - */ void setMenuOptions(); void addToHomeScreen(const QModelIndex &index); @@ -207,7 +112,6 @@ /** * The View widget. - * Own. */ HsMenuView &mMenuView; diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsallcollectionsstate.h --- a/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsallcollectionsstate.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsallcollectionsstate.h Mon May 03 12:24:59 2010 +0300 @@ -54,166 +54,56 @@ public: - /** - * Constructor. - * - * @since S60 ?S60_version. - * @param containerView Container view. - * @param parent Owner. - */ HsAllCollectionsState(HsMenuView &menuView, QState *parent = 0); - - /** - * Destructor. - * - * @since S60 ?S60_version. - */ ~HsAllCollectionsState(); signals: - /** - * Signal emitted when sort order is changed. - * - * @since S60 ?S60_version. - * @param sortOrder new sort order. - */ void sortOrderChanged(HsSortAttribute sortAttribute); public slots: - /** - * Populates all folders - * - * @since S60 ?S60_version. - */ + void scrollToBeginning(); private slots: bool openTaskSwitcher(); - /** - * Slot connected to List widget in normal mode. - * - * @since S60 ?S60_version. - * @param index Model index of the activated item. - */ void listItemActivated(const QModelIndex &index); - /** - * Slot connected to List widget in add mode. - * - * @since S60 ?S60_version. - * @param index Model index of the activated item. - */ void addActivated(const QModelIndex &index); - /** - * Slot connected to List widget in normal mode. - * Called when item long pressed. - * - * @since S60 ?S60_version. - * @param item View item. - * @param coords Press point coordinates. - */ void listItemLongPressed(HbAbstractViewItem *item, const QPointF &coords); - /** - * Slot connected to List widget in add mode. - * Called when item long pressed. - * - * @since S60 ?S60_version. - * @param item View item. - * @param coords Press point coordinates. - */ void addLongPressed(HbAbstractViewItem *item, const QPointF &coords); - /** - * Slot connected to constructMenu. - * - * @since S60 ?S60_version. - */ void createNewCollection(); - /** - * Slot connected to constructMenu. - * - * @since S60 ?S60_version. - */ void createArrangeCollection(); - /** - * Menu custom sort action slot. - * - * @since S60 ?S60_version. - */ void customMenuAction(); - /** - * Menu ascending sort action slot. - * - * @since S60 ?S60_version. - */ void ascendingMenuAction(); - /** - * Menu descending sort action slot. - * - * @since S60 ?S60_version. - */ void descendingMenuAction(); - /** - * Slot invoked when a state is entered. - * - * @since S60 ?S60_version. - */ void stateEntered(); - /** - * Slot invoked when add mode is entered. - * - * @since S60 ?S60_version. - */ void addModeEntered(); - /** - * Slot invoked when normal mode is entered. - * - * @since S60 ?S60_version. - */ void normalModeEntered(); - /** - * Slot invoked when normal mode is exited. - * - * @since S60 ?S60_version. - */ void normalModeExited(); - /** - * Slot invoked when a state is exited. - * - * @since S60 ?S60_version. - */ void stateExited(); private: - /** - * Constructs contained objects. - * - * @since S60 ?S60_version. - */ void construct(); - /** - * Creates and installs menu options for the view - * - * @since S60 ?S60_version. - */ + void setMenuOptions(); private: @@ -225,7 +115,6 @@ /** * The List View widget. - * Own. */ HsMenuView &mMenuView; diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsapplibrarystate.h --- a/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsapplibrarystate.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsapplibrarystate.h Mon May 03 12:24:59 2010 +0300 @@ -56,68 +56,28 @@ public: - /** - * Constructor. - * - * @since S60 ?S60_version. - * @param parent Owner. - */ HsAppLibraryState(QState *parent = 0); - /** - * Destructor. - * - * @since S60 ?S60_version. - */ virtual ~HsAppLibraryState(); signals: - /** - * Signal emitted when leaving the state, - * i.e when the back softkey is pressed. - * - * @since S60 ?S60_version. - */ void toHomescreenState(); - /** - * Signal emitted when entering the state - * - * @since S60 ?S60_version. - */ void initialize(); public slots: void clearToolbarLatch(); - /** - * All apps stete entered. - * @since S60 ?S60_version. - */ void allAppsStateEntered(); - /** - * All collections state entered. - * @since S60 ?S60_version. - */ void allCollectionsStateEntered(); private slots: - /** - * Slot invoked when a state is entered. - * - * @since S60 ?S60_version. - */ void stateEntered(); - /** - * Slot invoked when a state is exited. - * - * @since S60 ?S60_version. - */ void stateExited(); @@ -127,18 +87,8 @@ private: - /** - * Constructs contained objects. - * - * @since S60 ?S60_version. - */ void construct(); - /** - * Sets up Toolbar. - * - * @since S60 ?S60_version. - */ void constructToolbar(); private: diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hscollectionstate.h --- a/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hscollectionstate.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hscollectionstate.h Mon May 03 12:24:59 2010 +0300 @@ -53,30 +53,12 @@ public: - /** - * Constructor. - * - * @since S60 ?S60_version. - * @param containerView Container view. - * @param parent Owner. - */ HsCollectionState(HsMenuView &menuView, QState *parent = 0); - /** - * Destructor. - * - * @since S60 ?S60_version. - */ ~HsCollectionState(); public slots: - /** - * Sets collections sort order - * - * @since S60 ?S60_version. - * @param sortOrder sort order. - */ void collectionsSortOrder(HsSortAttribute sortAttribute); protected: @@ -91,81 +73,25 @@ bool openTaskSwitcher(); - /** - * Slot connected to List widget. - * - * @since S60 ?S60_version. - * @param index Model index of the activated item. - */ void listItemActivated(const QModelIndex &index); - /** - * Slot connected to List widget. - * Called when item long pressed. - * - * @since S60 ?S60_version. - * @param item View item. - * @param coords Press point coordinates. - */ void listItemLongPressed(HbAbstractViewItem *item, const QPointF &coords); - - /** - * Menu add applications action slot - * - * @since S60 ?S60_version. - */ void addAppsAction(); - /** - * Menu add shortcut action slot - * - * @since S60 ?S60_version. - */ void addCollectionShortcutToHomeScreenAction(); - /** - * Menu rename action slot - * - * @since S60 ?S60_version. - */ void renameAction(); - /** - * Menu delete action slot - * - * @since S60 ?S60_version. - */ void deleteAction(); - /** - * Menu softkey back action slot - * - * @since S60 ?S60_version. - */ void backSteppingAction(); - /** - * Updates label - * - * @since S60 ?S60_version. - */ void updateLabel(); - - /** - * Slot invoked when a state is entered. - * - * @since S60 ?S60_version. - */ void stateEntered(); - /** - * Slot invoked when a state is exited. - * - * @since S60 ?S60_version. - */ void stateExited(); void latestOnTopMenuAction(); @@ -174,11 +100,6 @@ private: - /** - * Constructs contained objects. - * - * @since S60 ?S60_version. - */ void construct(); /** @@ -189,18 +110,8 @@ */ void constructMenu(bool isDynamic); - /** - * Perform all signal connections. - * - * @since S60 ?S60_version. - */ void makeConnect(); - /** - * Perform all signal disconnections. - * - * @since S60 ?S60_version. - */ void makeDisconnect(); void addElementToHomeScreen(const QModelIndex &index); @@ -229,7 +140,6 @@ /** * The List View widget. - * Own. */ HsMenuView &mMenuView; diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsinstalledappsstate.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsinstalledappsstate.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: Menu Installed state. + * + */ + +#ifndef HSINSTALLEDAPPSSTATE_H +#define HSINSTALLEDAPPSSTATE_H + +#include +#include + +#include "hsmenustates_global.h" +#include "hsmenuservice.h" + +HS_STATES_TEST_CLASS(MenuStatesTest) + +class HbView; +class HbAction; +class HbMenu; +class HbAbstractViewItem; +class QPointF; +class HsMenuView; +class HsMenuItemModel; +/** + * @ingroup group_hsmenustateplugin + * @brief All Applications State. + * + * Displays all installed packages present on the device. + * + * @see StateMachine + * + * @lib ?library + * @since S60 ?S60_version + */ +class HsInstalledAppsState: public QState +{ + Q_OBJECT + + HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest) + +public: + + HsInstalledAppsState(HsMenuView &menuView, QState *parent = 0); + + ~HsInstalledAppsState(); + +private slots: + + bool openTaskSwitcher(); + + void listItemActivated(const QModelIndex &index); + + void listItemLongPressed(HbAbstractViewItem *item, + const QPointF &coords); + + void backAction(); + + void stateEntered(); + + void stateExited(); + +private: + + void construct(); + + void setMenuOptions(); + +private: + + /** + * The View widget. + * Own. + */ + HsMenuView &mMenuView; + + /** + * Item Model for the List. + * Own. + */ + HsMenuItemModel *mInstalledAppsModel; + + /** + * Secondary Softkey action. + * Backstepping functionality. + * Own. + */ + HbAction *mSecondarySoftkeyAction; + + /** + * Old navigation icon. + * Not own. + */ + HbAction *mOldNavigationAction; + +}; + +#endif // HSINSTALLEDAPPSSTATE_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsmenusearch.h --- a/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsmenusearch.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: Menu search panel. - * - */ - -#ifndef HSMENUSEARCH_H -#define HSMENUSEARCH_H - -#include -#include "hsmenustates_global.h" - -class HsMenuView; - -HS_STATES_TEST_CLASS(MenuStatesTest) - -class HsMenuSearch: public QObject -{ - Q_OBJECT - - HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest) -public: - HsMenuSearch(HsMenuView *menuView); -public slots: - - void findItem(QString criteriaStr); - -private: - HsMenuView *const mMenuView;//not own -}; - -#endif // HSMENUSEARCH_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsmenuview.h --- a/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsmenuview.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsmenuview.h Mon May 03 12:24:59 2010 +0300 @@ -21,11 +21,12 @@ #include #include #include +#include #include #include "hsmenustates_global.h" #include "hsapp_defs.h" #include "hsmenuviewbuilder.h" -#include "hsmenusearch.h" + class QPointF; class QActionGroup; @@ -44,21 +45,17 @@ Q_OBJECT public: - HsMenuView(HbMainWindow *window); + HsMenuView(); ~HsMenuView(); void setModel(HsMenuItemModel *model); - const HsMenuItemModel *model() const; + void setModelToView(QAbstractItemModel *model); + void setLabel(const QString &label); void scrollTo(const QModelIndex &index, HbAbstractItemView::ScrollHint hint = HbAbstractItemView::EnsureVisible); - void scrollToWithoutHidingSearchPanel( - const QModelIndex &index, - HbAbstractItemView::ScrollHint hint = - HbAbstractItemView::EnsureVisible); - void setLabelVisible(bool visible); void setSearchPanelVisible(bool visible); @@ -73,32 +70,48 @@ HsMenuMode getHsMenuMode(); void setHsMenuMode(HsMenuMode menuMode); + void hideToolBar(); + void showToolBar(); signals: void activated(const QModelIndex &index); void longPressed(HbAbstractViewItem *item, const QPointF &coords); public slots: + void activatedProxySlot(const QModelIndex &index); + void longPressedProxySlot(HbAbstractViewItem *item, + const QPointF &coords); + void showSearchPanel(); void hideSearchPanel(); + + private slots: void scrollToRow(int row, QAbstractItemView::ScrollHint hint = QAbstractItemView::PositionAtTop); + void findItem(QString criteriaStr); + private: HbAbstractItemView::ScrollHint convertScrollHint( - QAbstractItemView::ScrollHint hint); + QAbstractItemView::ScrollHint hint); + void connectItemViewsSignals(); void disconnectItemViewsSignals(); + void connectSearchItemViewsSignals(); + void disconnectSearchItemViewsSignals(); + + void connectModelSignals(); void disconnectModelSignals(); void connectSearchPanelSignals(); void disconnectSearchPanelSignals(); - void hideSearchPanelOnScrolling(bool); + void searchFinished(); + void searchBegins(); void setUpToolBar(); @@ -106,14 +119,18 @@ HsMenuViewBuilder mBuilder; - HbMainWindow *const mWindow; HsMenuItemModel *mModel; - HsMenuSearch mMenuSearch; + + QModelIndex mFirstVisibleIndex; + QModelIndex mLastVisibleIndex; + QModelIndex mSearchIndex; QActionGroup *mToolBarActionGroup; HsMenuMode mMenuMode; + QSortFilterProxyModel *mProxyModel; // owned + HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest) }; diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsapplibrarystateplugin/resource/hsapplibrarystateplugin.s60xml --- a/homescreenapp/stateplugins/hsapplibrarystateplugin/resource/hsapplibrarystateplugin.s60xml Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - hsapplibrarystateplugin - z:/hsresources/plugins/stateplugins/hsapplibrarystateplugin.qtplugin - - - com.nokia.homescreen.state.HsAppLibraryState - 1.0 - - - - diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsallappsstate.cpp --- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsallappsstate.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsallappsstate.cpp Mon May 03 12:24:59 2010 +0300 @@ -33,10 +33,14 @@ #include "hsaddappstocollectionstate.h" #include "hsapp_defs.h" #include "hsmenumodetransition.h" +#include "caentry.h" +#include "caservice.h" -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Constructor. + \param menuView Menu view. + \param parent Owner. + */ HsAllAppsState::HsAllAppsState(HsMenuView &menuView, QState *parent) : QState(parent), mSortAttribute(AscendingNameHsSortAttribute), mCollectionsSortAttribute(LatestOnTopHsSortAttribute), @@ -45,9 +49,9 @@ construct(); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Constructs contained objects. + */ void HsAllAppsState::construct() { HSMENUTEST_FUNC_ENTRY("HsAllAppsState::construct"); @@ -66,26 +70,29 @@ initialState->addTransition(new HsMenuModeTransition( mMenuView, AddHsMenuMode, addModeState)); - setObjectName(this->parent()->objectName() + "/allappsstate"); + const QString parentName = + parent() != 0 ? parent()->objectName() : QString(""); + setObjectName(parentName + "/allappsstate"); + connect(this, SIGNAL(entered()),SLOT(stateEntered())); connect(this, SIGNAL(exited()),SLOT(stateExited())); mAllAppsModel = HsMenuService::getAllApplicationsModel(mSortAttribute); HSMENUTEST_FUNC_EXIT("HsAllAppsState::construct"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Creates and installs menu options for the view + */ void HsAllAppsState::setMenuOptions() { HSMENUTEST_FUNC_ENTRY("HsAllAppsState::setMenuOptions"); HbMenu *const mOptions = new HbMenu(); mOptions->addAction(hbTrId("txt_applib_opt_task_switcher"), - this, - SLOT(openTaskSwitcher())); + this, SLOT(openTaskSwitcher())); mOptions->addAction(hbTrId("txt_applib_opt_add_to_collection"), - this, - SLOT(addToCollection())); + this, SLOT(addToCollection())); + mOptions->addAction(hbTrId("txt_applib_opt_check_software_updates"), + this, SLOT(checkSoftwareUpdates())); HbMenu *const sortMenu = mOptions->addMenu(hbTrId( "txt_applib_opt_sort_by")); @@ -94,12 +101,14 @@ sortGroup->addAction( sortMenu->addAction(hbTrId("txt_applib_opt_sub_ascending"), - this, - SLOT(ascendingMenuAction()))); + this, SLOT(ascendingMenuAction()))); sortGroup->addAction( sortMenu->addAction(hbTrId("txt_applib_opt_sub_descending"), - this, - SLOT(descendingMenuAction()))); + this, SLOT(descendingMenuAction()))); + + mOptions->addAction(hbTrId("txt_applib_subtitle_installed"), + this, SLOT(openInstalledView())); + mOptions->setParent(this); foreach(QAction *action, sortMenu->actions()) { action->setCheckable(true); @@ -122,26 +131,25 @@ HSMENUTEST_FUNC_EXIT("HsAllAppsState::setMenuOptions"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Destructor. + */ HsAllAppsState::~HsAllAppsState() { delete mAllAppsModel; } - -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Populates all applications + */ void HsAllAppsState::scrollToBeginning() { mBookmark = mAllAppsModel->index(0); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot invoked when a state is entered. + */ void HsAllAppsState::stateEntered() { qDebug("AllAppsState::stateEntered()"); @@ -152,9 +160,9 @@ HSMENUTEST_FUNC_EXIT("HsAllAppsState::stateEntered"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot invoked when add mode entered. + */ void HsAllAppsState::normalModeEntered() { setMenuOptions(); @@ -176,12 +184,14 @@ SLOT(addLongPressed(HbAbstractViewItem *, QPointF))); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot invoked when a state is exited. + */ void HsAllAppsState::stateExited() { HSMENUTEST_FUNC_ENTRY("HsAllAppsState::stateExited"); + mMenuView.setSearchPanelVisible(false); + mBookmark = mMenuView.firstVisibleItemIndex(); mMenuView.disconnect(this); @@ -200,14 +210,24 @@ return HsMenuService::launchTaskSwitcher(); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Check software updates. + \retval true if operation is successful. + */ +bool HsAllAppsState::checkSoftwareUpdates() +{ + return HsMenuService::launchSoftwareUpdate(); +} + +/*! + Slot connected to List widget in normal mode. + \param index Model index of the activated item. + */ void HsAllAppsState::listItemActivated(const QModelIndex &index) { HSMENUTEST_FUNC_ENTRY("HsAllAppsState::listItemActivated"); - const CaEntry *entry = mAllAppsModel->entry(index); + QSharedPointer entry = mAllAppsModel->entry(index); if (entry->entryTypeName() == widgetTypeName()) { machine()->postEvent( @@ -228,13 +248,14 @@ HSMENUTEST_FUNC_EXIT("HsAllAppsState::listItemActivated"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot connected to List widget in add mode. + + \param index Model index of the activated item. + */ void HsAllAppsState::addActivated(const QModelIndex &index) { HSMENUTEST_FUNC_ENTRY("HsAllAppsState::addActivated"); - mMenuView.setSearchPanelVisible(false); addToHomeScreen(index); machine()->postEvent( HsMenuEventFactory::createOpenHomeScreenEvent()); @@ -243,15 +264,14 @@ /*! Handles long-item-pressed event in all apps view by showing context menu - \param item the event pertains to - \param position at which context menu is shown + \param item View item + \param coords Press point coordinates */ void HsAllAppsState::listItemLongPressed(HbAbstractViewItem *item, const QPointF &coords) { HSMENUTEST_FUNC_ENTRY("HsAllAppsState::listItemLongPressed"); - mMenuView.setSearchPanelVisible(false); // create context menu HbMenu *menu = new HbMenu(); @@ -264,9 +284,16 @@ HbAction *uninstallAction = menu->addAction(hbTrId( "txt_common_menu_delete")); + HbAction *appSettingsAction(NULL); // check conditions and hide irrelevant menu items + QSharedPointer entry = mAllAppsModel->entry(item->modelIndex()); + + if (!(entry->attribute(appSettingsPlugin()).isEmpty())) { + appSettingsAction = menu->addAction(hbTrId( + "txt_common_menu_settings")); + } EntryFlags flags = item->modelIndex().data( CaItemModel::FlagsRole).value (); @@ -275,6 +302,7 @@ } // choose proper action if (HbAction *selectedAction = menu->exec(coords)) { + if (selectedAction == addToHomeScreenAction) { addToHomeScreen(item->modelIndex()); } else if (selectedAction == addToCollectionAction) { @@ -285,26 +313,35 @@ machine()->postEvent( HsMenuEventFactory::createAddAppsFromApplicationsViewEvent( mSortAttribute, mCollectionsSortAttribute, itemId)); - } else if (selectedAction == uninstallAction) { const int itemId = item->modelIndex().data(CaItemModel::IdRole).toInt(); HsMenuService::executeAction(itemId, removeActionIdentifier()); + } else if (selectedAction == appSettingsAction) { + const int itemId = + item->modelIndex().data(CaItemModel::IdRole).toInt(); + QMap attributes = entry->attributes(); + machine()->postEvent( + HsMenuEventFactory::createAppSettingsViewEvent(itemId)); } + mMenuView.setSearchPanelVisible(false); + } delete menu; HSMENUTEST_FUNC_EXIT("HsAllAppsState::listItemLongPressed"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot connected to List widget in add mode. + Called when item long pressed. + \param item View item. + \param coords Press point coordinates. + */ void HsAllAppsState::addLongPressed(HbAbstractViewItem *item, const QPointF &coords) { Q_UNUSED(coords); HSMENUTEST_FUNC_ENTRY("HsAllAppsState::addLongPressed"); - mMenuView.setSearchPanelVisible(false); addToHomeScreen(item->modelIndex()); machine()->postEvent( HsMenuEventFactory::createOpenHomeScreenEvent()); @@ -312,9 +349,9 @@ } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot called when application is adding to collection. + */ void HsAllAppsState::addToCollection() { // Add one/many applications to @@ -325,6 +362,21 @@ } /*! + Triggers event so that a installed applications state is entered. + \retval void + */ +#ifdef COVERAGE_MEASUREMENT +#pragma CTC SKIP +#endif //COVERAGE_MEASUREMENT +void HsAllAppsState::openInstalledView() +{ + machine()->postEvent(HsMenuEventFactory::createOpenInstalledViewEvent()); +} +#ifdef COVERAGE_MEASUREMENT +#pragma CTC ENDSKIP +#endif //COVERAGE_MEASUREMENT + +/*! Triggers event so that a state adding to Home Screen is reached \param index of an item to be added to homescreen \retval void @@ -332,23 +384,17 @@ void HsAllAppsState::addToHomeScreen(const QModelIndex &index) { HSMENUTEST_FUNC_ENTRY("HsAllAppsState::addToHomeScreen"); - const CaEntry *entry = mAllAppsModel->entry(index); - - QMap attributes = entry->attributes(); - + QSharedPointer entry = mAllAppsModel->entry(index); + machine()-> postEvent(HsMenuEventFactory::createAddToHomeScreenEvent( - entry->id(), - entry->entryTypeName(), - entry->attribute(widgetUriAttributeName()), - entry->attribute(widgetLibraryAttributeName()), - &attributes)); + entry->id())); HSMENUTEST_FUNC_EXIT("HsAllAppsState::addToHomeScreen"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Menu ascending sort action slot. + */ void HsAllAppsState::ascendingMenuAction() { HSMENUTEST_FUNC_ENTRY("HsAllAppsState::ascendingMenuAction"); @@ -357,18 +403,21 @@ HSMENUTEST_FUNC_EXIT("HsAllAppsState::ascendingMenuAction"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/** + * Sets collections sort order + * + * @since S60 ?S60_version. + * @param sortOrder sort order. + */ void HsAllAppsState::collectionsSortOrder( HsSortAttribute sortOrder) { mCollectionsSortAttribute = sortOrder; } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Menu descending sort action slot. + */ void HsAllAppsState::descendingMenuAction() { HSMENUTEST_FUNC_ENTRY("HsAllAppsState::descendingMenuAction"); diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsallcollectionsstate.cpp --- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsallcollectionsstate.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsallcollectionsstate.cpp Mon May 03 12:24:59 2010 +0300 @@ -32,9 +32,11 @@ #include "hsaddappstocollectionstate.h" #include "hsmenumodetransition.h" -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Constructor. + \param menuView Menu view. + \param parent Owner. + */ HsAllCollectionsState::HsAllCollectionsState( HsMenuView &menuView, QState *parent) : QState(parent), mSortAttribute(CustomHsSortAttribute), @@ -43,9 +45,9 @@ construct(); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Constructs contained objects. + */ void HsAllCollectionsState::construct() { HSMENUTEST_FUNC_ENTRY("HsAllCollectionsState::construct"); @@ -65,7 +67,9 @@ initialState->addTransition(new HsMenuModeTransition( mMenuView, AddHsMenuMode, addModeState)); - setObjectName(this->parent()->objectName() + "/allcollectionsstate"); + const QString parentName = + parent() != 0 ? parent()->objectName() : QString(""); + setObjectName(parentName + "/allcollectionsstate"); connect(this, SIGNAL(entered()),SLOT(stateEntered())); connect(this, SIGNAL(exited()),SLOT(stateExited())); mAllCollectionsModel = HsMenuService::getAllCollectionsModel( @@ -73,16 +77,16 @@ HSMENUTEST_FUNC_EXIT("HsAllCollectionsState::construct"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Creates and installs menu options for the view + */ void HsAllCollectionsState::setMenuOptions() { HSMENUTEST_FUNC_ENTRY("HsAllCollectionsState::setMenuOptions"); HbMenu *const options = new HbMenu(); options->addAction(hbTrId("txt_applib_opt_task_switcher"), - this, - SLOT(openTaskSwitcher())); + this, + SLOT(openTaskSwitcher())); options->addAction(hbTrId("txt_applib_opt_new_collection"), this, SLOT(createNewCollection())); @@ -129,25 +133,25 @@ HSMENUTEST_FUNC_EXIT("HsAllCollectionsState::setMenuOptions"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Destructor. + */ HsAllCollectionsState::~HsAllCollectionsState() { delete mAllCollectionsModel; } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Populates all folders + */ void HsAllCollectionsState::scrollToBeginning() { mBookmark = mAllCollectionsModel->index(0); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot invoked when a state is entered. + */ void HsAllCollectionsState::stateEntered() { qDebug("AllCollectionsState::stateEntered()"); @@ -159,9 +163,9 @@ HSMENUTEST_FUNC_EXIT("HsAllCollectionsState::stateEntered"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot invoked when normal mode is entered. +*/ void HsAllCollectionsState::normalModeEntered() { setMenuOptions(); @@ -172,17 +176,17 @@ SLOT(listItemLongPressed(HbAbstractViewItem *, QPointF))); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot invoked when normal mode is exited. +*/ void HsAllCollectionsState::normalModeExited() { mMenuView.view()->setMenu(NULL); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot invoked when add mode is entered. + */ void HsAllCollectionsState::addModeEntered() { connect(&mMenuView, SIGNAL(activated(QModelIndex)), @@ -191,13 +195,15 @@ SLOT(addLongPressed(HbAbstractViewItem *, QPointF))); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot invoked when a state is exited. + */ void HsAllCollectionsState::stateExited() { HSMENUTEST_FUNC_ENTRY("HsAllCollectionsState::stateExited"); + mMenuView.setSearchPanelVisible(false); + mMenuView.disconnect(this); mBookmark = mMenuView.firstVisibleItemIndex(); @@ -215,9 +221,10 @@ return HsMenuService::launchTaskSwitcher(); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot connected to List widget in normal mode. + \param index Model index of the activated item. + */ void HsAllCollectionsState::listItemActivated(const QModelIndex &index) { HSMENUTEST_FUNC_ENTRY("HsAllCollectionsState::listItemActivated"); @@ -235,12 +242,12 @@ HSMENUTEST_FUNC_EXIT("HsAllCollectionsState::listItemActivated"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot connected to List widget in add mode. + \param index Model index of the activated item. + */ void HsAllCollectionsState::addActivated(const QModelIndex &index) { - mMenuView.setSearchPanelVisible(false); const int itemId = index.data(CaItemModel::IdRole).toInt(); machine()->postEvent( HsMenuEventFactory::createAddToHomeScreenEvent(itemId)); @@ -248,14 +255,16 @@ HsMenuEventFactory::createOpenHomeScreenEvent()); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot connected to List widget in add mode. + Called when item long pressed. + \param item View item. + \param coords Press point coordinates. + */ void HsAllCollectionsState::addLongPressed(HbAbstractViewItem *item, const QPointF &coords) { Q_UNUSED(coords); - mMenuView.setSearchPanelVisible(false); const int itemId = item->modelIndex().data(CaItemModel::IdRole).toInt(); machine()->postEvent( HsMenuEventFactory::createAddToHomeScreenEvent(itemId)); @@ -263,15 +272,17 @@ HsMenuEventFactory::createOpenHomeScreenEvent()); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot connected to List widget in normal mode. + Called when item long pressed. + \param item View item. + \param coords Press point coordinates. + */ void HsAllCollectionsState::listItemLongPressed(HbAbstractViewItem *item, const QPointF &coords) { HSMENUTEST_FUNC_ENTRY("HsAllCollectionsState::listItemLongPressed"); - mMenuView.setSearchPanelVisible(false); const int itemId = item->modelIndex().data(CaItemModel::IdRole).toInt(); HbMenu *menu = new HbMenu(); @@ -293,6 +304,7 @@ // choose proper action if (HbAction *selectedAction = menu->exec(coords)) { + if (selectedAction == addShortcutAction) { machine()->postEvent( HsMenuEventFactory::createAddToHomeScreenEvent(itemId)); @@ -303,23 +315,25 @@ machine()->postEvent( HsMenuEventFactory::createDeleteCollectionEvent(itemId)); } + + mMenuView.setSearchPanelVisible(false); } delete menu; HSMENUTEST_FUNC_EXIT("HsAllCollectionsState::listItemLongPressed"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot connected to constructMenu. + */ void HsAllCollectionsState::createNewCollection() { // Adding a new collection via the Collections view machine()->postEvent(HsMenuEventFactory::createNewCollectionEvent()); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot connected to constructMenu. + */ void HsAllCollectionsState::createArrangeCollection() { // Arrange collection via the Arrange view @@ -329,9 +343,9 @@ HsMenuEventFactory::createArrangeCollectionEvent(topItemId)); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Menu custom sort action slot. + */ void HsAllCollectionsState::customMenuAction() { HSMENUTEST_FUNC_ENTRY("HsAllCollectionsState::customMenuAction"); @@ -342,9 +356,9 @@ HSMENUTEST_FUNC_EXIT("HsAllCollectionsState::customMenuAction"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Menu ascending sort action slot. + */ void HsAllCollectionsState::ascendingMenuAction() { HSMENUTEST_FUNC_ENTRY("HsAllCollectionsState::ascendingMenuAction"); @@ -355,9 +369,9 @@ HSMENUTEST_FUNC_EXIT("HsAllCollectionsState::ascendingMenuAction"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Menu descending sort action slot. + */ void HsAllCollectionsState::descendingMenuAction() { HSMENUTEST_FUNC_ENTRY("HsAllCollectionsState::descendingMenuAction"); diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsapplibrarystate.cpp --- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsapplibrarystate.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsapplibrarystate.cpp Mon May 03 12:24:59 2010 +0300 @@ -31,24 +31,25 @@ #include "hsallappsstate.h" #include "hsallcollectionsstate.h" #include "hscollectionstate.h" +#include "hsinstalledappsstate.h" #include "hsovistorehandler.h" #include "hsmenuview.h" #include "hsmenumodetransition.h" -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Constructor. + \param parent Owner. + */ HsAppLibraryState::HsAppLibraryState(QState *parent) : QState(parent), mSecondarySoftkeyAction(0), mAllAppsState(0), - mHistoryTransaction(0), mAllCollectionsState(0), mCollectionState(0), - mMenuView(HbInstance::instance()->allMainWindows().value(0)) + mHistoryTransaction(0), mAllCollectionsState(0), mCollectionState(0) { construct(); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Destructor. + */ HsAppLibraryState::~HsAppLibraryState() { HbMainWindow *const hbW = @@ -60,9 +61,9 @@ } } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Constructs contained objects. + */ void HsAppLibraryState::construct() { HSMENUTEST_FUNC_ENTRY("HsAppLibraryState::construct"); @@ -107,6 +108,19 @@ mCollectionState, mAllCollectionsState); mCollectionState->addTransition(collectionToAppLibTransition); + HsInstalledAppsState *installedAppsState = new HsInstalledAppsState( + mMenuView, this); + + HsMenuEventTransition *installedToAppLibTransition = + new HsMenuEventTransition(HsMenuEvent::OpenApplicationLibrary, + installedAppsState, mAllAppsState); + installedAppsState->addTransition(installedToAppLibTransition); + + HsMenuEventTransition *allViewToInstalledTransition = + new HsMenuEventTransition(HsMenuEvent::OpenInstalledView, + mAllAppsState, installedAppsState); + mAllAppsState->addTransition(allViewToInstalledTransition); + constructToolbar(); connect(this, SIGNAL(entered()),SLOT(stateEntered())); @@ -124,9 +138,10 @@ HSMENUTEST_FUNC_EXIT("HsAppLibraryState::construct"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Sets entry event. + \param event entry event. + */ void HsAppLibraryState::onEntry(QEvent *event) { qDebug("HsCollectionState::onEntry()"); @@ -145,9 +160,9 @@ HSMENUTEST_FUNC_EXIT("HsAppLibraryState::onEntry"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot invoked when a state is entered. + */ void HsAppLibraryState::stateEntered() { HSTEST_FUNC_ENTRY("AppLibraryState::stateEntered"); @@ -155,23 +170,23 @@ if (!hbW->views().contains(mMenuView.view())) { hbW->addView(mMenuView.view()); mMenuView.view()->setNavigationAction(mSecondarySoftkeyAction); - } + } hbW->setCurrentView(mMenuView.view()); HSTEST_FUNC_EXIT("AppLibraryState::stateEntered"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot invoked when a state is exited. + */ void HsAppLibraryState::stateExited() { - HSTEST_FUNC_ENTRY("AppLibraryState::stateExited"); + HSTEST_FUNC_ENTRY("AppLibraryState::stateExited"); HSTEST_FUNC_EXIT("AppLibraryState::stateExited"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Sets up Toolbar. + */ void HsAppLibraryState::constructToolbar() { HSMENUTEST_FUNC_ENTRY("HsAppLibraryState::constructToolbar"); @@ -205,9 +220,9 @@ HSMENUTEST_FUNC_EXIT("HsAppLibraryState::constructToolbar"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Clear toolbar latch +*/ void HsAppLibraryState::clearToolbarLatch() { HSMENUTEST_FUNC_ENTRY("HsAppLibraryState::clearToolbarLatch"); @@ -220,9 +235,9 @@ HSMENUTEST_FUNC_EXIT("HsAppLibraryState::clearToolbarLatch"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + All apps stete entered. + */ void HsAppLibraryState::allAppsStateEntered() { if (mMenuView.getHsMenuMode() == NormalHsMenuMode) { @@ -230,9 +245,9 @@ } } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + All collections state entered. + */ void HsAppLibraryState::allCollectionsStateEntered() { if (mMenuView.getHsMenuMode() == NormalHsMenuMode) { diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsapplibrarystateplugin/src/hscollectionstate.cpp --- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hscollectionstate.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hscollectionstate.cpp Mon May 03 12:24:59 2010 +0300 @@ -34,9 +34,11 @@ #include "hsaddappstocollectionstate.h" #include "hsapp_defs.h" -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Constructor. + \param menuView Menu view. + \param parent Owner. +*/ HsCollectionState::HsCollectionState(HsMenuView &menuView, QState *parent) : QState(parent), mSortAttribute(LatestOnTopHsSortAttribute), @@ -47,13 +49,15 @@ construct(); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Constructs contained objects. + */ void HsCollectionState::construct() { HSMENUTEST_FUNC_ENTRY("HsCollectionState::construct"); - setObjectName(this->parent()->objectName() + "/collectionstate"); + const QString parentName = + parent() != 0 ? parent()->objectName() : QString(""); + setObjectName(parentName + "/collectionstate"); //new action for backstepping mSecondarySoftkeyAction = new HbAction(Hb::BackAction, this); @@ -62,18 +66,19 @@ HSMENUTEST_FUNC_EXIT("HsCollectionState::construct"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Destructor. + */ HsCollectionState::~HsCollectionState() { delete mCollectionModel; } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Sets entry event. + \param event entry event. + */ void HsCollectionState::onEntry(QEvent *event) { qDebug("HsCollectionState::onEntry()"); @@ -90,9 +95,9 @@ HSMENUTEST_FUNC_EXIT("HsCollectionState::onEntry"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot invoked when a state is entered. + */ void HsCollectionState::stateEntered() { HSMENUTEST_FUNC_ENTRY("HsCollectionState::stateEntered"); @@ -175,17 +180,19 @@ } mOldNavigationAction = mMenuView.view()->navigationAction(); mMenuView.view()->setNavigationAction(mSecondarySoftkeyAction); - + makeConnect(); HSMENUTEST_FUNC_EXIT("HsCollectionState::stateEntered"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot invoked when a state is exited. + */ void HsCollectionState::stateExited() { HSMENUTEST_FUNC_ENTRY("HsCollectionState::stateExited"); + mMenuView.setSearchPanelVisible(false); + makeDisconnect(); mOptions = NULL; @@ -200,9 +207,9 @@ qDebug("CollectionState::stateExited()"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Perform all signal connections. + */ void HsCollectionState::makeConnect() { connect(mSecondarySoftkeyAction, SIGNAL(triggered()), @@ -214,9 +221,9 @@ connect(mCollectionModel, SIGNAL(modelReset()),SLOT(updateLabel())); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Perform all signal disconnections. + */ void HsCollectionState::makeDisconnect() { disconnect(mSecondarySoftkeyAction, SIGNAL(triggered()), @@ -241,14 +248,15 @@ return HsMenuService::launchTaskSwitcher(); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Slot connected to List widget. + \param index Model index of the activated item. + */ void HsCollectionState::listItemActivated(const QModelIndex &index) { HSMENUTEST_FUNC_ENTRY("HsCollectionState::listItemActivated"); - const CaEntry *entry = mCollectionModel->entry(index); + QSharedPointer entry = mCollectionModel->entry(index); if (entry->entryTypeName() == widgetTypeName()) { machine()->postEvent( @@ -271,7 +279,7 @@ /*! Handles long-item-pressed event in all apps view by showing context menu \param item the event pertains to - \param position at which context menu is shown + \param coords press point coordinates. \retval void */ void HsCollectionState::listItemLongPressed(HbAbstractViewItem *item, @@ -279,7 +287,6 @@ { Q_UNUSED(item); HSMENUTEST_FUNC_ENTRY("HsCollectionState::listItemLongPressed"); - mMenuView.setSearchPanelVisible(false); int itemId = item->modelIndex().data(CaItemModel::IdRole).toInt(); // create context menu HbMenu *menu = new HbMenu(); @@ -290,6 +297,7 @@ "txt_applib_menu_add_to_collection")); HbAction *removeAction(NULL); HbAction *uninstallAction(NULL); + HbAction *appSettingsAction(NULL); // we do not add remove option in collection download menu // check conditions and hide irrelevant menu items if (mCollectionType != collectionDownloadedTypeName()) { @@ -303,9 +311,15 @@ if ((flags & RemovableEntryFlag)) { uninstallAction = menu->addAction(hbTrId("txt_common_menu_delete")); } + QSharedPointer entry = mCollectionModel->entry(item->modelIndex()); + if (!(entry->attribute(appSettingsPlugin()).isEmpty())) { + appSettingsAction = menu->addAction(hbTrId( + "txt_common_menu_settings")); + } // choose proper action if (HbAction *selectedAction = menu->exec(coords)) { + if (selectedAction == addShortcutAction) { addElementToHomeScreen(item->modelIndex()); } else if (selectedAction == addToCollection) { @@ -318,15 +332,23 @@ machine()->postEvent( HsMenuEventFactory::createRemoveAppFromCollectionEvent( itemId, mCollectionId)); + } else if (selectedAction == appSettingsAction) { + const int itemId = + item->modelIndex().data(CaItemModel::IdRole).toInt(); + QMap attributes = entry->attributes(); + machine()->postEvent( + HsMenuEventFactory::createAppSettingsViewEvent(itemId)); } + + mMenuView.setSearchPanelVisible(false); } delete menu; HSMENUTEST_FUNC_EXIT("HsCollectionState::listItemLongPressed"); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Menu add applications action slot + */ void HsCollectionState::addAppsAction() { // Add applications @@ -335,44 +357,44 @@ mCollectionId)); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Menu add shortcut action slot + */ void HsCollectionState::addCollectionShortcutToHomeScreenAction() { machine()->postEvent(HsMenuEventFactory::createAddToHomeScreenEvent( mCollectionId)); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Menu rename action slot + */ void HsCollectionState::renameAction() { machine()->postEvent(HsMenuEventFactory::createRenameCollectionEvent( mCollectionId)); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Menu delete action slot + */ void HsCollectionState::deleteAction() { machine()->postEvent(HsMenuEventFactory::createDeleteCollectionEvent( mCollectionId)); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Menu softkey back action slot + */ void HsCollectionState::backSteppingAction() { machine()->postEvent(HsMenuEventFactory::createOpenAppLibraryEvent()); } -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// +/*! + Updates label + */ void HsCollectionState::updateLabel() { HSMENUTEST_FUNC_ENTRY("HsCollectionState::updateLabel"); @@ -390,17 +412,13 @@ */ void HsCollectionState::addElementToHomeScreen(const QModelIndex &index) { - const CaEntry *entry = mCollectionModel->entry(index); - + QSharedPointer entry = mCollectionModel->entry(index); + QMap attributes = entry->attributes(); machine()->postEvent( HsMenuEventFactory::createAddToHomeScreenEvent( - entry->id(), - entry->entryTypeName(), - entry->attribute(widgetUriAttributeName()), - entry->attribute(widgetLibraryAttributeName()), - &attributes)); + entry->id())); } /*! diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsinstalledappsstate.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsinstalledappsstate.cpp Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,219 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: Menu All Applications state. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "hsmenuitemmodel.h" +#include "hsmenuview.h" +#include "cadefs.h" +#include "hsinstalledappsstate.h" +#include "hsaddappstocollectionstate.h" +#include "hsapp_defs.h" +#include "hsmenumodetransition.h" + +/*! + \class HsInstalledAppsState + \ingroup group_hsapplibrarystateplugin + \brief Manages displaying installed applications + */ + +/*! + Constructor. + \param menuView menu view. + \param parent Pwner. + */ +HsInstalledAppsState::HsInstalledAppsState(HsMenuView &menuView, QState *parent) : + QState(parent), mMenuView(menuView), mInstalledAppsModel(0) +{ + construct(); +} + +/*! + Constructor part. + */ +void HsInstalledAppsState::construct() +{ + HSMENUTEST_FUNC_ENTRY("HsInstalledAppsState::construct"); + + const QString parentName = + parent() != 0 ? parent()->objectName() : QString(""); + setObjectName(parentName + "/installedappsstate"); + connect(this, SIGNAL(entered()),SLOT(stateEntered())); + connect(this, SIGNAL(exited()),SLOT(stateExited())); + + mSecondarySoftkeyAction = new HbAction(Hb::BackAction, this); + + HSMENUTEST_FUNC_EXIT("HsInstalledAppsState::construct"); +} + +/*! + Method seting menu options. + */ +void HsInstalledAppsState::setMenuOptions() +{ + HSMENUTEST_FUNC_ENTRY("HsInstalledAppsState::setMenuOptions"); + HbMenu *const mOptions = new HbMenu(); + mOptions->setParent(this); + + mOptions->addAction(hbTrId("txt_applib_opt_task_switcher"), + this, SLOT(openTaskSwitcher())); + + mMenuView.view()->setMenu(mOptions); + HSMENUTEST_FUNC_EXIT("HsInstalledAppsState::setMenuOptions"); +} + +/*! + Destructor. + */ +HsInstalledAppsState::~HsInstalledAppsState() +{ + delete mInstalledAppsModel; +} + +/*! + Slot connected to entered() signal. + Invoked when a state is entered. + */ +void HsInstalledAppsState::stateEntered() +{ + qDebug("AllAppsState::stateEntered()"); + HSMENUTEST_FUNC_ENTRY("HsInstalledAppsState::stateEntered"); + + if (!mInstalledAppsModel) { + mInstalledAppsModel + = HsMenuService::getInstalledModel(AscendingNameHsSortAttribute); + } + mMenuView.setModel(mInstalledAppsModel); + mMenuView.scrollTo(mInstalledAppsModel->index(0)); + setMenuOptions(); + + connect(&mMenuView, SIGNAL(activated(QModelIndex)), + SLOT(listItemActivated(QModelIndex))); + connect(&mMenuView, SIGNAL(longPressed(HbAbstractViewItem *, QPointF)), + SLOT(listItemLongPressed(HbAbstractViewItem *, QPointF))); + connect(mSecondarySoftkeyAction, SIGNAL(triggered()), + SLOT(backAction())); + mMenuView.hideToolBar(); + mOldNavigationAction = mMenuView.view()->navigationAction(); + mMenuView.view()->setNavigationAction(mSecondarySoftkeyAction); + mMenuView.setLabelVisible(true); + mMenuView.setLabel(hbTrId("txt_applib_subtitle_installed")); + HSMENUTEST_FUNC_EXIT("HsInstalledAppsState::stateEntered"); +} + +/*! + Slot invoked when a state is exited. + */ +void HsInstalledAppsState::stateExited() +{ + HSMENUTEST_FUNC_ENTRY("HsInstalledAppsState::stateExited"); + mMenuView.setSearchPanelVisible(false); + // revert navigation action + mMenuView.view()->setNavigationAction(mOldNavigationAction); + mMenuView.showToolBar(); + mMenuView.setLabelVisible(false); + mMenuView.disconnect(this); + mMenuView.view()->setMenu(NULL); + + disconnect(mSecondarySoftkeyAction, SIGNAL(triggered()), + this, SLOT(backAction())); + + HSMENUTEST_FUNC_EXIT("HsInstalledAppsState::stateExited"); + qDebug("AllAppsState::stateExited()"); +} + +/*! + Open task switcher. + \retval true if operation is successful. + */ +bool HsInstalledAppsState::openTaskSwitcher() +{ + return HsMenuService::launchTaskSwitcher(); +} + +/*! + Method invoked when a list item is activated. + \param index indec of activated item. + */ +#ifdef COVERAGE_MEASUREMENT +#pragma CTC SKIP +#endif //COVERAGE_MEASUREMENT +void HsInstalledAppsState::listItemActivated(const QModelIndex &/*index*/) +{ + //no implementation yet +} +#ifdef COVERAGE_MEASUREMENT +#pragma CTC ENDSKIP +#endif //COVERAGE_MEASUREMENT + +/*! + Handles long-item-pressed event in all apps view by showing context menu + \param item the event pertains to + \param coords press point coordinates. + */ +#ifdef COVERAGE_MEASUREMENT +#pragma CTC SKIP +#endif //COVERAGE_MEASUREMENT +void HsInstalledAppsState::listItemLongPressed(HbAbstractViewItem *item, + const QPointF &coords) +{ + HSMENUTEST_FUNC_ENTRY("HsInstalledAppsState::listItemLongPressed"); + + // create context menu + HbMenu *menu = new HbMenu(); + + HbAction *uninstallAction = menu->addAction( + hbTrId("txt_common_menu_delete")); + + // choose proper action + if (HbAction *selectedAction = menu->exec(coords)) { + if (selectedAction == uninstallAction) { + const int itemId = item->modelIndex().data( + CaItemModel::IdRole).toInt(); + HsMenuService::executeAction(itemId, removeActionIdentifier()); + } + mMenuView.setSearchPanelVisible(false); + } + delete menu; + HSMENUTEST_FUNC_EXIT("HsInstalledAppsState::listItemLongPressed"); +} +#ifdef COVERAGE_MEASUREMENT +#pragma CTC ENDSKIP +#endif //COVERAGE_MEASUREMENT + +/*! + Slot invoked when a back action is triggered. + */ +#ifdef COVERAGE_MEASUREMENT +#pragma CTC SKIP +#endif //COVERAGE_MEASUREMENT +void HsInstalledAppsState::backAction() +{ + machine()->postEvent(HsMenuEventFactory::createOpenAppLibraryEvent()); +} +#ifdef COVERAGE_MEASUREMENT +#pragma CTC ENDSKIP +#endif //COVERAGE_MEASUREMENT diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmenumodetransition.cpp --- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmenumodetransition.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmenumodetransition.cpp Mon May 03 12:24:59 2010 +0300 @@ -20,7 +20,7 @@ /*! \class HsMenuModeTransition - \ingroup group_applibrarystateplugin + \ingroup group_hsmenustateplugin \brief Transition to normal or add mode */ diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmenusearch.cpp --- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmenusearch.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: Menu search. - * - */ - -#include -#include "hsmenuitemmodel.h" -#include "hsmenuview.h" -#include "hsmenusearch.h" - -/*! - \class Menu Search - \ingroup group_hsmenustateplugin - - \brief Menu View - - Provides handler for \a criteriaChanged signal emited - by menu view search panel - - \sa HsMenuView -*/ - -/*! - Constructor - \param menuView Menu view the object is doing search job for. - */ -HsMenuSearch::HsMenuSearch(HsMenuView *menuView): mMenuView(menuView) -{ -} - -/*! - Looks up for item and if found scrolls to it. - \param criteriaStr The item name to find. - */ -void HsMenuSearch::findItem(QString criteriaStr) -{ - qDebug() << QString("HsMenuSearch::findItem: %1").arg(criteriaStr); - HSMENUTEST_FUNC_ENTRY("HsMenuSearch::findItem"); - - if ("" != criteriaStr) { - const HsMenuItemModel *const model = mMenuView->model(); - - const QModelIndexList list = - model->match( - model->index(0, 0), - CaItemModel::TextRole, - criteriaStr); - - if (list.count() > 0) { - qDebug() << QString("HsMenuSearch::findItem:row %1"). arg( - list.at(0).row()); - - mMenuView->scrollToWithoutHidingSearchPanel( - list.at(0), - HbAbstractItemView::PositionAtTop); - } - } - - HSMENUTEST_FUNC_EXIT("HsMenuSearch::findItem"); -} diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmenuview.cpp --- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmenuview.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmenuview.cpp Mon May 03 12:24:59 2010 +0300 @@ -52,16 +52,21 @@ \param window Main window. */ -HsMenuView::HsMenuView(HbMainWindow *window): +HsMenuView::HsMenuView(): mBuilder(), - mWindow(window), mModel(NULL), - mMenuSearch(this), + mFirstVisibleIndex(), + mLastVisibleIndex(), mToolBarActionGroup(new QActionGroup(mBuilder.toolBar())), - mMenuMode(NormalHsMenuMode) + mMenuMode(NormalHsMenuMode), + mProxyModel(new QSortFilterProxyModel(this)) { setUpToolBar(); connectItemViewsSignals(); + + mProxyModel->setFilterRole(CaItemModel::TextRole); + mProxyModel->setFilterKeyColumn(1); + mProxyModel->setSortRole(CaItemModel::TextRole); } /*! @@ -98,13 +103,17 @@ } /*! - Sets model for item view. + Sets model for item view without connecting scroll signals - \return Model shown by item view. + \param model Model to show by item view */ -const HsMenuItemModel *HsMenuView::model() const +void HsMenuView::setModelToView(QAbstractItemModel *model) { - return mModel; + HSMENUTEST_FUNC_ENTRY("HsMenuView::setModelToView"); + + mBuilder.listView()->setModel(model); + + HSMENUTEST_FUNC_EXIT("HsMenuView::setModelToView"); } /*! @@ -136,22 +145,6 @@ HSMENUTEST_FUNC_EXIT("HsAllCollectionsState::scrollTo"); } -/*! - Scrolls item view to requested item. - Does not close search panel. - \param index The index of the item the view is to be scrolled. - \param hint Where the target item should be positioned in visible area - after scroll. - */ -void HsMenuView::scrollToWithoutHidingSearchPanel(const QModelIndex &index, - HbAbstractItemView::ScrollHint hint) -{ - HSMENUTEST_FUNC_ENTRY("HsMenuView::scrollToWithoutHidingSearchPanel"); - hideSearchPanelOnScrolling(false); - scrollTo(index, hint); - hideSearchPanelOnScrolling(true); - HSMENUTEST_FUNC_EXIT("HsMenuView::scrollToWithoutHidingSearchPanel"); -} /*! Makes the UI to show or hide view label. @@ -176,20 +169,18 @@ { HSMENUTEST_FUNC_ENTRY("HsMenuView::setSearchPanelVisible"); if (mBuilder.searchPanel()->isVisible() != visible) { - const static Hb::SceneItems statusPaneItems( - Hb::SecondarySoftKeyItem - | Hb::TitlePaneItem - | Hb::IndicatorItems); + if (visible) { + mFirstVisibleIndex = firstVisibleItemIndex(); + mBuilder.setSearchPanelVisible(visible); + mBuilder.view()->hideItems(Hb::AllItems); + connectSearchPanelSignals(); - if (visible) { - mWindow->hideItems(statusPaneItems); - connectSearchPanelSignals(); } else { - mWindow->showItems(statusPaneItems); + mLastVisibleIndex = firstVisibleItemIndex(); + mBuilder.view()->showItems(Hb::AllItems); + mBuilder.setSearchPanelVisible(visible); disconnectSearchPanelSignals(); } - - mBuilder.setSearchPanelVisible(visible); } HSMENUTEST_FUNC_EXIT("HsMenuView::setSearchPanelVisible"); } @@ -267,6 +258,9 @@ setSearchPanelVisible(true); HSMENUTEST_FUNC_EXIT("HsMenuView::showSearchPanel"); } +#ifdef COVERAGE_MEASUREMENT +#pragma CTC SKIP +#endif //COVERAGE_MEASUREMENT skipped: it doubles other method /*! * Makes search panel visible. @@ -278,6 +272,9 @@ setSearchPanelVisible(false); HSMENUTEST_FUNC_EXIT("HsMenuView::hideSearchPanel"); } +#ifdef COVERAGE_MEASUREMENT +#pragma CTC ENDSKIP +#endif //COVERAGE_MEASUREMENT /*! Scrolls item view to requested row. @@ -294,8 +291,8 @@ /*! Converts scroll hints. - \param Qt hint Where the target item should be positioned in visible area - after scroll. + \param Qt hint Where the target item should be positioned in + visible area after scroll. \return Qrbit version of hint */ HbAbstractItemView::ScrollHint HsMenuView::convertScrollHint( @@ -343,6 +340,36 @@ } /*! + Connects \a activated and \a longPressed signals coming from search list + view to emit corresponding signal of this object with translated model index +*/ +void HsMenuView::connectSearchItemViewsSignals() +{ + const HbListView *const listView = mBuilder.listView(); + + connect(listView, SIGNAL(activated(QModelIndex)), + this, SLOT(activatedProxySlot(QModelIndex))); + connect(listView, SIGNAL(longPressed(HbAbstractViewItem *, QPointF)), + this, SLOT(longPressedProxySlot(HbAbstractViewItem *, QPointF))); + +} + +/*! + Disconnects \a activated and \a longPressed signals coming from list + view from to emit corresponding signal + of this object with translated model index +*/ +void HsMenuView::disconnectSearchItemViewsSignals() +{ + const HbListView *const listView = mBuilder.listView(); + + disconnect(listView, SIGNAL(activated(QModelIndex)), + this, SLOT(activatedProxySlot(QModelIndex))); + disconnect(listView, SIGNAL(longPressed(HbAbstractViewItem *, QPointF)), + this, SLOT(longPressedProxySlot(HbAbstractViewItem *, QPointF))); +} + +/*! Connects model's \a scrollTo signal with the object \a scrollToRow slot. */ void HsMenuView::connectModelSignals() @@ -366,47 +393,39 @@ */ void HsMenuView::connectSearchPanelSignals() { + disconnectModelSignals(); + disconnectItemViewsSignals(); + + searchBegins(); + connectSearchItemViewsSignals(); + connect(mBuilder.searchPanel(), SIGNAL(exitClicked()), this, SLOT(hideSearchPanel())); + connect(mBuilder.searchPanel(), SIGNAL(criteriaChanged(QString)), + this, SLOT(findItem(QString))); + scrollTo(mProxyModel->mapFromSource(mFirstVisibleIndex), + HbAbstractItemView::PositionAtTop); - connect(mBuilder.searchPanel(), SIGNAL(criteriaChanged(QString)), - &mMenuSearch, SLOT(findItem(QString))); - - hideSearchPanelOnScrolling(true); } /*! Disconnects signals \a exitClicked and \a criteriaChanged emitted by search panel from handling slots of the object or its members + Scrolls view to state before connections */ void HsMenuView::disconnectSearchPanelSignals() { + disconnectSearchItemViewsSignals(); + disconnect(mBuilder.searchPanel(), SIGNAL(exitClicked()), this, SLOT(hideSearchPanel())); disconnect(mBuilder.searchPanel(), SIGNAL(criteriaChanged(QString)), - &mMenuSearch, SLOT(findItem(QString))); - - hideSearchPanelOnScrolling(false); -} + this, SLOT(findItem(QString))); -/*! - Connects or disconnects item views' (list) \a scrollingStarted - signal with the object \a hideSearchPanel slot. - \param hide When true connects the signals with the slots, otherwise - disconnects them. - */ -void HsMenuView::hideSearchPanelOnScrolling(bool hide) -{ - const HbListView *const listView = mBuilder.listView(); - - if (hide) { - connect(listView, SIGNAL(scrollingStarted()), - this, SLOT(hideSearchPanel())); - } else { - disconnect(listView, SIGNAL(scrollingStarted()), - this, SLOT(hideSearchPanel())); - } + searchFinished(); + connectModelSignals(); + connectItemViewsSignals(); } /*! @@ -427,6 +446,20 @@ HSMENUTEST_FUNC_EXIT("HsMenuView::construct()"); } +void HsMenuView::hideToolBar() +{ + HSMENUTEST_FUNC_ENTRY("HsMenuView::hideToolBar()"); + mBuilder.view()->hideItems(Hb::ToolBarItem); + HSMENUTEST_FUNC_EXIT("HsMenuView::hideToolBar()"); +} + +void HsMenuView::showToolBar() +{ + HSMENUTEST_FUNC_ENTRY("HsMenuView::showToolBar()"); + mBuilder.view()->showItems(Hb::ToolBarItem); + HSMENUTEST_FUNC_EXIT("HsMenuView::showToolBar()"); +} + HsMenuMode HsMenuView::getHsMenuMode() { return mMenuMode; @@ -436,3 +469,80 @@ { mMenuMode = menuMode; } +/*! + Looks up for item and if found scrolls to it. + \param criteriaStr The item name to find. + */ +void HsMenuView::findItem(QString criteriaStr) +{ + qDebug + () << QString("hsmenuview::findItem: %1").arg(criteriaStr); + HSMENUTEST_FUNC_ENTRY("hsmenuview::findItem"); + + if ("" != criteriaStr) { + mProxyModel->setFilterRegExp(QRegExp(criteriaStr, + Qt::CaseInsensitive, QRegExp::FixedString)); + } + else { + mProxyModel->setFilterRegExp(QRegExp(QString(".*"), + Qt::CaseInsensitive, QRegExp::RegExp)); + // scroll to first item in model + mBuilder.listView()->scrollTo( + mProxyModel->mapFromSource(mModel->index(0)), + HbAbstractItemView::PositionAtTop); + } + HSMENUTEST_FUNC_EXIT("hsmenuview::findItem"); +} + +/*! + Initializes search. + */ +void HsMenuView::searchBegins() +{ + HSMENUTEST_FUNC_ENTRY("hsmenuview::searchBegins"); + mProxyModel->invalidate(); + mProxyModel->setSourceModel(mModel); + mProxyModel->setFilterRegExp(QRegExp(QString(".*"), Qt::CaseInsensitive, + QRegExp::RegExp)); + setModelToView(mProxyModel); + HSMENUTEST_FUNC_EXIT("hsmenuview::searchBegins"); +} + +/*! + Ends search, scrolls view to last visible item in search view + */ +void HsMenuView::searchFinished() +{ + HSMENUTEST_FUNC_ENTRY("hsmenuview::searchFinished"); + QModelIndex temp = mProxyModel->mapToSource(mLastVisibleIndex); + setModel(mModel); + mBuilder.listView()->scrollTo(temp, HbAbstractItemView::PositionAtTop); + HSMENUTEST_FUNC_EXIT("hsmenuview::searchFinished"); +} + +/*! + * Slot used to translate activated signal from proxy model to normal model + */ +void HsMenuView::activatedProxySlot(const QModelIndex &index) +{ + emit activated(mProxyModel->mapToSource(index)); +} + +/*! + * Slot used to translate longPressed signal from proxy model to normal model + */ +void HsMenuView::longPressedProxySlot(HbAbstractViewItem *item, + const QPointF &coords) +{ + /* + this is a kind of hack, introduced for reasons: + item object should be reusable later, but orbit (or qt) prevents setting + its index model to previous state + */ + mSearchIndex = mProxyModel->mapToSource(item->modelIndex()); + HbAbstractViewItem* itemNew = item->createItem(); + itemNew->setModelIndex(mSearchIndex); + emit longPressed(itemNew, coords); + delete itemNew; +} + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmenuviewbuilder.cpp --- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmenuviewbuilder.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmenuviewbuilder.cpp Mon May 03 12:24:59 2010 +0300 @@ -25,10 +25,41 @@ #include #include #include +#include +#include +#include #include "hsmenuviewbuilder.h" #include "hsmenustates_global.h" +// TODO this class is temprary solution, proper one should come from Orbit +class HsVkbHost : public HbStaticVkbHost { +public: + explicit HsVkbHost(HbWidget *target): + HbStaticVkbHost(target), mWidget(target) {} + +#ifdef COVERAGE_MEASUREMENT +#pragma CTC SKIP +#endif //COVERAGE_MEASUREMENT skipped: its very temporary TODO + void openFinished() { + updateViewHeight(applicationArea().height()); + } + + void closeFinished(){ + updateViewHeight(-1); + } + + void updateViewHeight(qreal height) { + HbView* view = mWidget->mainWindow()->currentView(); + view->setMaximumHeight(height); + } +#ifdef COVERAGE_MEASUREMENT +#pragma CTC ENDSKIP +#endif //COVERAGE_MEASUREMENT + + HbWidget * mWidget; +}; + /*! \class HsMenuViewBuilder \ingroup group_hsmenustateplugin @@ -72,12 +103,22 @@ result = parseSection(mSections[mViewOptions]); if (visible) { + // TODO this is temprary solution, proper solution should come from Orbit + if (!HbVkbHost::getVkbHost(searchPanel())) + { + new HsVkbHost(searchPanel()); + } HbLineEdit *const lineEdit(searchPanelLineEdit()); lineEdit->setText(""); } + else { + if (static_cast(HbVkbHost::getVkbHost(searchPanel()))) { + static_cast(HbVkbHost::getVkbHost(searchPanel()))-> + updateViewHeight(-1); + } + } } - return result; } diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsovistorehandler.cpp --- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsovistorehandler.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsovistorehandler.cpp Mon May 03 12:24:59 2010 +0300 @@ -25,6 +25,14 @@ const QString DefaultOviStoreLink("https://store.ovi.com/applications"); #endif +/*! + \class HsOviStoreHandler + \ingroup group_hsmenustateplugin + + \brief + + \sa +*/ /*! Constructor diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hshomescreenstateplugin/hshomescreenstateplugin.pro --- a/homescreenapp/stateplugins/hshomescreenstateplugin/hshomescreenstateplugin.pro Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hshomescreenstateplugin/hshomescreenstateplugin.pro Mon May 03 12:24:59 2010 +0300 @@ -22,20 +22,21 @@ INCLUDEPATH += ./inc \ ../../hsutils/inc \ ../../hsdomainmodel/inc \ - ../../hsapplication/inc + ../../hsapplication/inc \ + ../../serviceproviders/hsmenuserviceprovider/inc QT += xml sql CONFIG += plugin hb mobility MOBILITY = serviceframework -PLUGIN_SUBDIR = /hsresources/plugins/stateplugins +PLUGIN_SUBDIR = /private/20022F35/plugins/stateplugins include(../../common.pri) LIBS += -lhsutils \ -lhsdomainmodel \ - -lhswidgetmodel + -lhsmenuserviceprovider RESOURCES += hshomescreenstateplugin.qrc @@ -44,5 +45,3 @@ } include(hshomescreenstateplugin.pri) - -win32:exportResources(./tsrc/loc_win/*.qm, hsresources/loc) diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hshomescreenstateplugin/hshomescreenstateplugin.ts --- a/homescreenapp/stateplugins/hshomescreenstateplugin/hshomescreenstateplugin.ts Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,146 +0,0 @@ - - - - - - Sort widget gallery list from a to z - A-Z - A-Z - - hs - opt - hs - False - - - Add new page to the homescreen - Add page - Add page - - hs - opt - hs - False - - - Check for updates - Download widgets - Download widgets - - hs - opt - hs - False - - - Hint text for the Collections toolbar - Collections - Collections - - hs - button - hs - False - - - Hint text for the Download widgets toolbar - Download widgets - Download widgets - - hs - button - hs - False - - - Manage pages state title text - Manage pages - Manage pages - - hs - title - hs - False - - - Info note if uninstall failed - Uninstall failed - Uninstall failed - - hs - info - hs - False - - - Delete current page from the homescreen - Remove page - Remove page - - hs - opt - hs - False - - - Confirmation query before selected widget is installed - Uninstall2 - Uninstall2 - - hs - dialog - hs - False - - - Sort widget gallery list from z to a - Z-A - Z-A - - hs - opt - hs - False - - - Menu item to open widget gallery - Add widget - Add widget - - hs - opt - hs - False - - - Info note after uninstall is succeeded. - Uninstall successful - Uninstall successful - - hs - info - hs - False - - - Context specific menu option to add widget to homescreen - Add - Add - - hs - menu - hs - False - - - Hint text for the All toolbar - All - All - - hs - button - hs - False - - - diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hshomescreenstateplugin/inc/hsidlestate.h --- a/homescreenapp/stateplugins/hshomescreenstateplugin/inc/hsidlestate.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hshomescreenstateplugin/inc/hsidlestate.h Mon May 03 12:24:59 2010 +0300 @@ -27,9 +27,12 @@ class QGraphicsItem; class QGraphicsSceneMouseEvent; +class QPropertyAnimation; class HbView; class HbAction; class HsIdleWidget; +class HsTitleResolver; +class QParallelAnimationGroup; class HsIdleState : public QState { @@ -51,12 +54,16 @@ void event_addPage(); void event_removePage(); void event_toggleConnection(); + +protected: + bool eventFilter(QObject *watched, QEvent *event); private: Q_DISABLE_COPY(HsIdleState) void setupStates(); qreal pageLayerXPos(int pageIndex) const; void startPageChangeAnimation(int targetPageIndex, int duration); + void startPageChangeZoneAnimation(int duration); bool isInPageChangeZone(); bool isInLeftPageChangeZone(); bool isInRightPageChangeZone(); @@ -70,8 +77,10 @@ void action_idle_layoutNewWidgets(); void action_idle_showActivePage(); void action_idle_connectOrientationChangeEventHandler(); + void action_idle_installEventFilter(); void action_idle_cleanupView(); void action_idle_disconnectOrientationChangeEventHandler(); + void action_idle_uninstallEventFilter(); void action_waitInput_updateOptionsMenu(); void action_waitInput_connectMouseEventHandlers(); void action_waitInput_disconnectMouseEventHandlers(); @@ -86,18 +95,18 @@ void action_moveWidget_reparentToControlLayer(); void action_moveWidget_startWidgetDragAnimation(); void action_moveWidget_connectMouseEventHandlers(); - void action_moveWidget_connectGestureTimers(); void action_moveWidget_reparentToPage(); void action_moveWidget_startWidgetDropAnimation(); void action_moveWidget_disconnectMouseEventHandlers(); - void action_moveWidget_disconnectGestureTimers(); void action_moveScene_connectMouseEventHandlers(); void action_moveScene_disconnectMouseEventHandlers(); void action_sceneMenu_showMenu(); void action_addPage_addPage(); void action_removePage_removePage(); void action_toggleConnection_toggleConnection(); + void action_idle_setupTitle(); + void action_idle_cleanupTitle(); void waitInput_onMousePressed( QGraphicsItem *watched, QGraphicsSceneMouseEvent *event, bool &filtered); @@ -122,12 +131,13 @@ void widgetInteraction_onTapAndHoldTimeout(); void sceneInteraction_onTapAndHoldTimeout(); - void moveWidget_onHoldTimeout(); + + void onTitleChanged(QString title); -#ifndef Q_OS_SYMBIAN - void switchLanguage(); - void translateUi(); -#endif + void onAddContentActionTriggered(); + + bool openTaskSwitcher(); + void zoneAnimationFinished(); private: HbView *mView; @@ -139,7 +149,11 @@ qreal mPageChangeZoneWidth; QPointF mSceneMenuPos; - + HsTitleResolver *mTitleResolver; + QPropertyAnimation *mZoneAnimation; + bool mPageChanged; + bool mAllowZoneAnimation; + QParallelAnimationGroup *mPageChangeAnimation; HOMESCREEN_TEST_FRIEND_CLASS(HomeScreenStatePluginTest) }; diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hshomescreenstateplugin/inc/hsselectbackgroundstate.h --- a/homescreenapp/stateplugins/hshomescreenstateplugin/inc/hsselectbackgroundstate.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hshomescreenstateplugin/inc/hsselectbackgroundstate.h Mon May 03 12:24:59 2010 +0300 @@ -26,7 +26,11 @@ class QImage; class HbView; +#ifdef Q_OS_SYMBIAN +class HsImageFetcherClient; +#else class XQAIWGetImageClient; +#endif class HsSelectBackgroundState : public QState { @@ -41,17 +45,28 @@ private: Q_DISABLE_COPY(HsSelectBackgroundState) - bool saveImage(QImage &image, const QString &path, Qt::Orientation orientation); private slots: void action_selectWallpaper(); void action_disconnectImageFetcher(); - + void onFetchComplete(QStringList imageStringList); void onFetchFailed(int error); + // for S60 API +#ifdef Q_OS_SYMBIAN + void fetchCompleted(const QString&); + void fetchFailed(int, const QString&); +#endif + private: + +#ifdef Q_OS_SYMBIAN + HsImageFetcherClient *mImageFetcher; +#else XQAIWGetImageClient *mImageFetcher; +#endif + HbView *mSourceView; HOMESCREEN_TEST_FRIEND_CLASS(HomeScreenStatePluginTest) diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hshomescreenstateplugin/resource/hshomescreenstateplugin.s60xml --- a/homescreenapp/stateplugins/hshomescreenstateplugin/resource/hshomescreenstateplugin.s60xml Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - hshomescreenstateplugin - z:/hsresources/plugins/stateplugins/hshomescreenstateplugin.qtplugin - - - com.nokia.homescreen.state.HsLoadSceneState - 1.0 - - - - - com.nokia.homescreen.state.HsIdleState - 1.0 - - - - diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hshomescreenstateplugin/src/hsidlestate.cpp --- a/homescreenapp/stateplugins/hshomescreenstateplugin/src/hsidlestate.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hshomescreenstateplugin/src/hsidlestate.cpp Mon May 03 12:24:59 2010 +0300 @@ -28,6 +28,8 @@ #include #include #include +#include +#include #include "hsidlestate.h" #include "hsidlewidget.h" @@ -39,10 +41,11 @@ #include "hsselectbackgroundstate.h" #include "hstrashbinwidget.h" #include "hspageindicator.h" -#include "hsapptranslator.h" #include "hswidgetpositioningonorientationchange.h" #include "hsmenueventfactory.h" #include "hshomescreenstatecommon.h" +#include "hstitleresolver.h" +#include "hsmenuservice.h" // Helper macros for connecting state entry and exit actions. #define ENTRY_ACTION(state, action) \ @@ -62,13 +65,39 @@ namespace { const char gApplicationLibraryIconName[] = "qtg_mono_applications_all"; - const char gAddPageTextName[] = "txt_homescreen_opt_add_page"; - const char gRemovePageTextName[] = "txt_homescreen_opt_remove_page"; - const char gToOnlineTextName[] = "txt_homescreen_opt_home_screen_to_online"; - const char gToOfflineTextName[] = "txt_homescreen_opt_home_screen_to_offline"; - const char gChangeWallpaperTextName[] = "txt_homescreen_list_change_wallpaper"; - const char gAddContentTextName[] = "txt_homescreen_list_add_content"; - //const char gTitleOfflineTextName[] = "txt_homescreen_title_offline"; + + //User adds a new page to home screen + const char hsLocTextId_OptionsMenu_AddPage[] = "txt_homescreen_opt_add_page"; + + //User removes page from home screen + const char hsLocTextId_OptionsMenu_RemovePage[] = "txt_homescreen_opt_remove_page"; + + //Sends request to all widgets to enable data connections + const char hsLocTextId_OptionsMenu_HsToOnline[] = "txt_homescreen_opt_home_screen_to_online"; + + //Sends request to all widgets to disable data connections + const char hsLocTextId_OptionsMenu_HsToOffline[] = "txt_homescreen_opt_home_screen_to_offline"; + + //Home screen canvas menu item for opening picture gallery + const char hsLocTextId_ContextMenu_ChangeWallpaper[] = "txt_homescreen_list_change_wallpaper"; + + //Home screen canvas menu item for opening Application library + const char hsLocTextId_ContextMenu_AddContent[] = "txt_homescreen_list_add_content"; + + //Home screen options menu item for opening Task switcher + const char hsLocTextId_OptionsMenu_TaskSwitcher[] = "txt_homescreen_opt_task_switcher"; + + //Heading text in confirmation dialog while removing page with content + const char hsLocTextId_Title_RemovePage[] = "txt_homescreen_title_remove_page"; + + //Text in confirmation dialog while removing page with content + const char hsLocTextId_Confirmation_RemovePage[] = "txt_homescreen_info_page_and_content_will_be_remov"; + + //Button in confirmation dialog while removing page with content + const char hsLocTextId_ConfirmationButton_Ok[] = "txt_homescreen_button_ok"; + + //Button in confirmation dialog while removing page with content + const char hsLocTextId_ConfirmationButton_Cancel[] = "txt_homescreen_button_cancel"; } /*! @@ -89,10 +118,16 @@ : QState(parent), mView(0), mNavigationAction(0), mUiWidget(0), mTapAndHoldDistance(16), - mPageChangeZoneWidth(60) + mPageChangeZoneWidth(60), + mTitleResolver(0), + mZoneAnimation(0), + mPageChanged(false), + mAllowZoneAnimation(true), + mPageChangeAnimation(0) { setupStates(); mTimer.setSingleShot(true); + mTitleResolver = new HsTitleResolver(this); } /*! @@ -100,6 +135,22 @@ */ HsIdleState::~HsIdleState() { + delete mZoneAnimation; +} + +/*! + \copydoc QObject::eventFilter(QObject *watched, QEvent *event) +*/ +bool HsIdleState::eventFilter(QObject *watched, QEvent *event) +{ + switch (event->type()) { + case QEvent::ApplicationActivate: + action_idle_layoutNewWidgets(); + break; + default: + break; + } + return QState::eventFilter(watched, event); } /*! @@ -201,6 +252,8 @@ this, SIGNAL(event_removePage()), state_removePage); state_waitInput->addTransition( this, SIGNAL(event_toggleConnection()), state_toggleConnection); + state_waitInput->addTransition( + this, SIGNAL(event_selectSceneWallpaper()), state_selectSceneWallpaper); state_widgetInteraction->addTransition( this, SIGNAL(event_waitInput()), state_waitInput); @@ -224,6 +277,8 @@ this, SIGNAL(event_waitInput()), state_waitInput); state_sceneMenu->addTransition( this, SIGNAL(event_selectSceneWallpaper()), state_selectSceneWallpaper); + state_sceneMenu->addTransition( + this, SIGNAL(event_addPage()), state_addPage); state_selectSceneWallpaper->addTransition( state_selectSceneWallpaper, SIGNAL(event_waitInput()), state_waitInput); @@ -240,8 +295,12 @@ ENTRY_ACTION(this, action_idle_layoutNewWidgets) ENTRY_ACTION(this, action_idle_showActivePage) ENTRY_ACTION(this, action_idle_connectOrientationChangeEventHandler) + ENTRY_ACTION(this, action_idle_setupTitle) + ENTRY_ACTION(this, action_idle_installEventFilter) + EXIT_ACTION(this, action_idle_cleanupTitle) EXIT_ACTION(this, action_idle_cleanupView) EXIT_ACTION(this, action_idle_disconnectOrientationChangeEventHandler) + EXIT_ACTION(this, action_idle_uninstallEventFilter) ENTRY_ACTION(state_waitInput, action_waitInput_updateOptionsMenu) ENTRY_ACTION(state_waitInput, action_waitInput_connectMouseEventHandlers) @@ -260,12 +319,10 @@ ENTRY_ACTION(state_moveWidget, action_moveWidget_reparentToControlLayer) ENTRY_ACTION(state_moveWidget, action_moveWidget_startWidgetDragAnimation) ENTRY_ACTION(state_moveWidget, action_moveWidget_connectMouseEventHandlers) - ENTRY_ACTION(state_moveWidget, action_moveWidget_connectGestureTimers) EXIT_ACTION(state_moveWidget, action_moveWidget_reparentToPage) EXIT_ACTION(state_moveWidget, action_moveWidget_startWidgetDropAnimation) EXIT_ACTION(state_moveWidget, action_moveWidget_disconnectMouseEventHandlers) - EXIT_ACTION(state_moveWidget, action_moveWidget_disconnectGestureTimers) ENTRY_ACTION(state_moveScene, action_moveScene_connectMouseEventHandlers) EXIT_ACTION(state_moveScene, action_moveScene_disconnectMouseEventHandlers) @@ -299,25 +356,82 @@ */ void HsIdleState::startPageChangeAnimation(int targetPageIndex, int duration) { - QParallelAnimationGroup *animationGroup = new QParallelAnimationGroup; + if (!mPageChangeAnimation) { + mPageChangeAnimation = new QParallelAnimationGroup(this); - QPropertyAnimation *animation = new QPropertyAnimation(mUiWidget->pageLayer(), "x"); - animation->setEndValue(pageLayerXPos(targetPageIndex)); - animation->setDuration(duration); - animationGroup->addAnimation(animation); + QPropertyAnimation *animation = new QPropertyAnimation(mUiWidget->pageLayer(), "x"); + animation->setEndValue(pageLayerXPos(targetPageIndex)); + animation->setDuration(duration); + mPageChangeAnimation->addAnimation(animation); - animation = new QPropertyAnimation(mUiWidget->sceneLayer(), "x"); - animation->setEndValue((parallaxFactor() * pageLayerXPos(targetPageIndex)) - HSBOUNDARYEFFECT / 2); - animation->setDuration(duration); - animationGroup->addAnimation(animation); + animation = new QPropertyAnimation(mUiWidget->sceneLayer(), "x"); + animation->setEndValue((parallaxFactor() * pageLayerXPos(targetPageIndex)) - HSBOUNDARYEFFECT / 2); + animation->setDuration(duration); + mPageChangeAnimation->addAnimation(animation); + } + else { + if (QAbstractAnimation::Stopped != mPageChangeAnimation->state()) { + mPageChangeAnimation->stop(); + } + QAbstractAnimation *animation = mPageChangeAnimation->animationAt(0); - animationGroup->start(QAbstractAnimation::DeleteWhenStopped); + qobject_cast(animation)->setEndValue(pageLayerXPos(targetPageIndex)); + qobject_cast(animation)->setDuration(duration); + animation = mPageChangeAnimation->animationAt(1); + qobject_cast(animation)->setEndValue((parallaxFactor() * pageLayerXPos(targetPageIndex)) - HSBOUNDARYEFFECT / 2); + qobject_cast(animation)->setDuration(duration); + } + mPageChangeAnimation->start(); mUiWidget->showPageIndicator(); mUiWidget->setActivePage(targetPageIndex); } /*! + Starts the page change zone animation based on the given a\ duration +*/ +void HsIdleState::startPageChangeZoneAnimation(int duration) +{ + HsScene *scene = HsScene::instance(); + + int targetPageIndex = scene->activePageIndex(); + + if (isInLeftPageChangeZone() && 0 < targetPageIndex) { + --targetPageIndex; + } else if (isInRightPageChangeZone() && + targetPageIndex < scene->pages().count()) { + ++targetPageIndex; + } else { + mAllowZoneAnimation = true; + return; + } + + if (targetPageIndex == scene->pages().count() + && scene->pages().last()->widgets().isEmpty()) { + mAllowZoneAnimation = true; + return; + } + + if (!mZoneAnimation) { + mZoneAnimation = new QPropertyAnimation(mUiWidget->sceneLayer(), "x"); + } + + if (isInLeftPageChangeZone()) { + mZoneAnimation->setEndValue(((parallaxFactor() * pageLayerXPos(scene->activePageIndex()))-HSBOUNDARYEFFECT/2)+HSBOUNDARYEFFECT/2); + } else { + mZoneAnimation->setEndValue(((parallaxFactor() * pageLayerXPos(scene->activePageIndex()))-HSBOUNDARYEFFECT/2)-HSBOUNDARYEFFECT/2); + } + mZoneAnimation->setDuration(duration); + mZoneAnimation->setDirection(QAbstractAnimation::Forward); + + connect(mZoneAnimation, + SIGNAL(finished()), + SLOT(zoneAnimationFinished())); + mZoneAnimation->start(); + mPageChanged = true; +} + +/*! Checks if the active widget is located inside the left or right page change zone. */ @@ -406,17 +520,12 @@ mUiWidget = new HsIdleWidget; mView = HsScene::mainWindow()->addView(mUiWidget); mView->setContentFullScreen(); - mView->setTitle("Home Screen"/*hbTrId(gTitleOfflineTextName)*/); mNavigationAction = new HbAction(this); mNavigationAction->setIcon(HbIcon(gApplicationLibraryIconName)); connect(mNavigationAction, SIGNAL(triggered()), SIGNAL(event_applicationLibrary())); mView->setNavigationAction(mNavigationAction); -#ifndef Q_OS_SYMBIAN - connect(HsAppTranslator::instance(), - SIGNAL(languageChanged()), SLOT(translateUi())); -#endif // TODO: Workaround to Qt/Hb layouting bugs. QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } @@ -425,6 +534,43 @@ } /*! + Sets the idle view's title. +*/ +void HsIdleState::action_idle_setupTitle() +{ + qDebug() << "HsIdleState::action_idle_setupTitle() - ENTRY"; + onTitleChanged(mTitleResolver->title()); + connect(mTitleResolver, SIGNAL(titleChanged(QString)), SLOT(onTitleChanged(QString))); + qDebug() << "HsIdleState::action_idle_setupTitle() - EXIT"; +} + +/*! + Updates the idle view's title. +*/ +void HsIdleState::onTitleChanged(QString title) +{ + qDebug() << "HsIdleState::onTitleChanged() to title: " << title; + mView->setTitle(title); +} + +/*! + +*/ +void HsIdleState::onAddContentActionTriggered() +{ + machine()->postEvent( + HsMenuEventFactory::createOpenAppLibraryEvent(AddHsMenuMode)); +} + +/*! + Disconnects the idle view's title. +*/ +void HsIdleState::action_idle_cleanupTitle() +{ + mTitleResolver->disconnect(this); +} + +/*! Lays out the active page's new widgets that were added from the application library. */ @@ -471,10 +617,21 @@ } /*! + Installs the event filter. +*/ +void HsIdleState::action_idle_installEventFilter() +{ + QCoreApplication::instance()->installEventFilter(this); +} + +/*! Cleans up the idle view. */ void HsIdleState::action_idle_cleanupView() { + if (mUiWidget){ + mUiWidget->clearDelayedPress(); + } } /*! @@ -488,6 +645,14 @@ } /*! + Disconnects the event filter. +*/ +void HsIdleState::action_idle_uninstallEventFilter() +{ + QCoreApplication::instance()->removeEventFilter(this); +} + +/*! Updates the options menu content. */ void HsIdleState::action_waitInput_updateOptionsMenu() @@ -495,33 +660,40 @@ HsScene *scene = HsScene::instance(); HbMenu *menu = new HbMenu(); - + + // Task switcher + menu->addAction(hbTrId(hsLocTextId_OptionsMenu_TaskSwitcher), + this, SLOT(openTaskSwitcher())); + + // Add content + menu->addAction(hbTrId(hsLocTextId_ContextMenu_AddContent), + this, SLOT(onAddContentActionTriggered())); + // Add page if (scene->pages().count() < scene->maximumPageCount()) { - menu->addAction(hbTrId(gAddPageTextName), + menu->addAction(hbTrId(hsLocTextId_OptionsMenu_AddPage), this, SIGNAL(event_addPage())); } + // Change wallpaper + menu->addAction(hbTrId(hsLocTextId_ContextMenu_ChangeWallpaper), + this, SIGNAL(event_selectSceneWallpaper())); + // Remove page if (scene->activePage()->isRemovable()) { - menu->addAction(hbTrId(gRemovePageTextName), + menu->addAction(hbTrId(hsLocTextId_OptionsMenu_RemovePage), this, SIGNAL(event_removePage())); } // Online / Offline if (scene->isOnline()) { - menu->addAction(hbTrId(gToOfflineTextName), + menu->addAction(hbTrId(hsLocTextId_OptionsMenu_HsToOffline), this, SIGNAL(event_toggleConnection())); } else { - menu->addAction(hbTrId(gToOnlineTextName), + menu->addAction(hbTrId(hsLocTextId_OptionsMenu_HsToOnline), this, SIGNAL(event_toggleConnection())); } -#ifndef Q_OS_SYMBIAN - menu->addAction(hbTrId("txt_homescreen_opt_switch_language"), - this, SLOT(switchLanguage())); -#endif - mView->setMenu(menu); } @@ -559,6 +731,9 @@ connect(&mTimer, SIGNAL(timeout()), SLOT(widgetInteraction_onTapAndHoldTimeout())); mTimer.start(); + + HsWidgetHost *widget = HsScene::instance()->activeWidget(); + widget->startTapAndHoldAnimation(); } /*! @@ -577,6 +752,9 @@ { disconnect(&mTimer, SIGNAL(timeout()), this, SLOT(widgetInteraction_onTapAndHoldTimeout())); + + HsWidgetHost *widget = HsScene::instance()->activeWidget(); + widget->stopTapAndHoldAnimation(); } /*! @@ -649,16 +827,6 @@ } /*! - Connects the moveWidget state's gesture timers. -*/ -void HsIdleState::action_moveWidget_connectGestureTimers() -{ - mTimer.setInterval(800); - connect(&mTimer, SIGNAL(timeout()), - SLOT(moveWidget_onHoldTimeout())); -} - -/*! Reparents the active widget to the active page. */ void HsIdleState::action_moveWidget_reparentToPage() @@ -692,15 +860,6 @@ } /*! - Disconnects the moveWidget state's gesture timers. -*/ -void HsIdleState::action_moveWidget_disconnectGestureTimers() -{ - disconnect(&mTimer, SIGNAL(timeout()), - this, SLOT(moveWidget_onHoldTimeout())); -} - -/*! Connects the moveScene state's mouse event handlers. */ void HsIdleState::action_moveScene_connectMouseEventHandlers() @@ -727,18 +886,26 @@ void HsIdleState::action_sceneMenu_showMenu() { HbMenu menu; + + HbAction *addContentAction = + menu.addAction(hbTrId(hsLocTextId_ContextMenu_AddContent)); + + HbAction *addPageAction = 0; + HsScene *scene = HsScene::instance(); + if (scene->pages().count() < scene->maximumPageCount()) { + addPageAction = menu.addAction(hbTrId(hsLocTextId_OptionsMenu_AddPage)); + } HbAction *changeWallpaperAction = - menu.addAction(hbTrId(gChangeWallpaperTextName)); - HbAction *addContentAction = - menu.addAction(hbTrId(gAddContentTextName)); + menu.addAction(hbTrId(hsLocTextId_ContextMenu_ChangeWallpaper)); - HbAction *action = menu.exec(mSceneMenuPos); - if (action == changeWallpaperAction) { + HbAction *action = menu.exec(mSceneMenuPos); + if (action == addContentAction) { + onAddContentActionTriggered(); + } else if (addPageAction && action == addPageAction) { + emit event_addPage(); + } else if (action == changeWallpaperAction) { emit event_selectSceneWallpaper(); - } else if (action == addContentAction) { - machine()->postEvent( - HsMenuEventFactory::createOpenAppLibraryEvent(AddHsMenuMode)); } else { emit event_waitInput(); } @@ -767,21 +934,42 @@ void HsIdleState::action_removePage_removePage() { HsScene *scene = HsScene::instance(); - HsPage *page = scene->activePage(); - int pageIndex = scene->activePageIndex(); + HsPage *page = scene->activePage(); + bool deletePage(true); - mUiWidget->removePage(pageIndex); - scene->removePage(page); - delete page; +#ifndef HOMESCREEN_TEST //We don't want to test message box. + if (!page->widgets().isEmpty()) { + HbMessageBox box(HbMessageBox::MessageTypeQuestion); + box.setHeadingWidget(new HbLabel + (hbTrId(hsLocTextId_Title_RemovePage))); + box.setText(hbTrId(hsLocTextId_Confirmation_RemovePage)); + box.setPrimaryAction(new HbAction(hbTrId(hsLocTextId_ConfirmationButton_Ok))); + box.setSecondaryAction(new HbAction(hbTrId(hsLocTextId_ConfirmationButton_Cancel))); - pageIndex = pageIndex == 0 ? 0 : pageIndex - 1; - scene->setActivePageIndex(pageIndex); + HsScene::mainWindow()->setInteractive(true); + HbAction *action = box.exec(); + if (action != box.primaryAction()) { + deletePage = false; + } + } +#endif //HOMESCREEN_TEST + + if (deletePage) { + int pageIndex = scene->activePageIndex(); - startPageChangeAnimation(pageIndex, 200); + mUiWidget->removePage(pageIndex); + scene->removePage(page); + delete page; + + pageIndex = pageIndex == 0 ? 0 : pageIndex - 1; + scene->setActivePageIndex(pageIndex); - mUiWidget->pageIndicator()->removeItem(pageIndex); - mUiWidget->setActivePage(pageIndex); - mUiWidget->showPageIndicator(); + startPageChangeAnimation(pageIndex, 200); + + mUiWidget->pageIndicator()->removeItem(pageIndex); + mUiWidget->setActivePage(pageIndex); + mUiWidget->showPageIndicator(); + } } /*! @@ -849,6 +1037,7 @@ if (mTapAndHoldDistance < point.manhattanLength()) { mTimer.stop(); mUiWidget->sendDelayedPress(); + HsScene::instance()->activeWidget()->stopTapAndHoldAnimation(); } } @@ -870,7 +1059,8 @@ mUiWidget->sendDelayedPress(); } - HsScene::instance()->activePage()->updateZValues(); + HsPage *page = HsScene::instance()->activePage(); + QMetaObject::invokeMethod(page, "updateZValues", Qt::QueuedConnection); emit event_waitInput(); } @@ -933,30 +1123,63 @@ QGraphicsItem *watched, QGraphicsSceneMouseEvent *event, bool &filtered) { Q_UNUSED(watched) - Q_UNUSED(filtered) - HsWidgetHost *widget = HsScene::instance()->activeWidget(); - Q_ASSERT(widget); - + HsScene *scene = HsScene::instance(); + HsWidgetHost *widget = scene->activeWidget(); + HsPage *page = scene->activePage(); + QPointF delta(event->scenePos() - event->lastScenePos()); - QRectF region = mView->rect().adjusted(10, 55, -10, -10); - QPointF position = widget->geometry().center() + delta; - if (!region.contains(position)) { - position.setX(qBound(region.left(), position.x(), region.right())); - position.setY(qBound(region.top(), position.y(), region.bottom())); + + QRectF widgetRect = widget->geometry(); + widgetRect.moveTopLeft(widgetRect.topLeft() + delta); + + QRectF pageRect = mView->rect(); + + qreal lowerBoundX = -widgetRect.width() / 2 + 10; + if (page == scene->pages().first()) { + lowerBoundX = 0; + } + qreal upperBoundX = pageRect.width() - widgetRect.width() / 2 - 10; + if (page == scene->pages().last() && scene->pages().count() == scene->maximumPageCount()) { + upperBoundX = pageRect.width() - widgetRect.width(); } - widget->setPos(position - widget->rect().center()); + qreal widgetX = qBound(lowerBoundX, widgetRect.x(), upperBoundX); + qreal widgetY = qBound(qreal(64), widgetRect.y(), pageRect.height() - widgetRect.height()); + + /* if using ItemClipsChildrenToShape-flag in widgethost then + setPos does not update position here, however setGeometry does it, QT bug? + */ + widget->setGeometry(widgetX, widgetY, widgetRect.width(), widgetRect.height()); - if (mTimer.isActive()) { - if (mTapAndHoldDistance < delta.manhattanLength()) { - mTimer.stop(); + if (isInPageChangeZone() && mAllowZoneAnimation) { + if (!mZoneAnimation) { + /* We don't want to create another animation + before previous is finished */ + mAllowZoneAnimation = false; + startPageChangeZoneAnimation(800); } - } else { - if (isInPageChangeZone()) { - mTimer.start(); + } + else if (mZoneAnimation && !isInPageChangeZone()) { + if (mZoneAnimation->state() == QAbstractAnimation::Running) { + if (mZoneAnimation->direction() == QAbstractAnimation::Forward) { + mPageChanged = false; + mZoneAnimation->setDuration(200); + mZoneAnimation->setDirection(QAbstractAnimation::Backward); + } + } + else { + // Out of the page change zone. Delete animation. + delete mZoneAnimation; + mZoneAnimation = NULL; + mAllowZoneAnimation = true; } } + else if (!isInPageChangeZone()) { + /* Zone animation finished and deleted. + New animation can be launched. */ + mAllowZoneAnimation = true; + } if (mUiWidget->trashBin()->isUnderMouse()) { mUiWidget->trashBin()->activate(); @@ -967,6 +1190,7 @@ if (!mUiWidget->pageIndicator()->isAnimationRunning()) { mUiWidget->showTrashBin(); } + filtered = true; } /*! @@ -983,6 +1207,14 @@ mTimer.stop(); + if (mZoneAnimation + && mZoneAnimation->state() == QAbstractAnimation::Running + && mZoneAnimation->direction() == QAbstractAnimation::Forward) { + mPageChanged = false; + mZoneAnimation->setDuration(200); + mZoneAnimation->setDirection(QAbstractAnimation::Backward); + } + HsScene *scene = HsScene::instance(); HsPage *page = scene->activePage(); HsWidgetHost *widget = scene->activeWidget(); @@ -1003,10 +1235,17 @@ widget->deleteWidgetPresentation(Qt::Horizontal); } } + + QRectF widgetRect = widget->geometry(); + QRectF pageRect = page->rect(); + qreal widgetX = qBound(qreal(0), widgetRect.x(), pageRect.width() - widgetRect.width()); + qreal widgetY = qBound(qreal(64), widgetRect.y(), pageRect.height() - widgetRect.height()); + widget->setPos(widgetX, widgetY); + widget->setWidgetPresentation(); page->updateZValues(); } - + mAllowZoneAnimation = true; filtered = true; emit event_waitInput(); } @@ -1077,9 +1316,18 @@ QList widgets; HsWidgetHost *widget = 0; - const int KChromeHeight = 64; // TODO: get this somewhere - const int KWidgetAdjust = 10; // TODO: get this somewhere - + QRectF pageRect = HsScene::mainWindow()->layoutRect(); + + // TODO: Temporary workaround for the Orbit bug. + if (orientation == Qt::Horizontal) { + pageRect = QRectF(0, 0, 640, 360); + } else { + pageRect = QRectF(0, 0, 360, 640); + } + // End of the workaround. + + const int chromeHeight = 64; // TODO: get this somewhere + for (int i = 0; i < pages.count(); ++i) { widgets = pages[i]->widgets(); for (int j = 0; j < widgets.count(); ++j) { @@ -1088,13 +1336,17 @@ if (presentation.widgetId < 0) { QList geometries = HsWidgetPositioningOnOrientationChange::instance()->convert( - QRectF(0, KChromeHeight, pages[i]->rect().height(), pages[i]->rect().width()-KChromeHeight).adjusted(KWidgetAdjust, KWidgetAdjust, -KWidgetAdjust, -KWidgetAdjust), + QRectF(0, chromeHeight, + pageRect.height(), + pageRect.width() - chromeHeight), QList() << widget->geometry(), - QRectF(0, KChromeHeight, pages[i]->rect().width(), pages[i]->rect().height()-KChromeHeight).adjusted(KWidgetAdjust, KWidgetAdjust, -KWidgetAdjust, -KWidgetAdjust)); + QRectF(0, chromeHeight, + pageRect.width(), + pageRect.height() - chromeHeight)); widget->setGeometry(geometries.first()); widget->setWidgetPresentation(); } else { - widget->setGeometry(presentation.geometry()); + widget->setPos(presentation.x, presentation.y); widget->setZValue(presentation.zValue); } } @@ -1121,92 +1373,77 @@ emit event_sceneMenu(); } -/*! - Handles page change zone hold events for the moveWidget state. -*/ -void HsIdleState::moveWidget_onHoldTimeout() -{ - HsScene *scene = HsScene::instance(); - - int pageIndex = scene->activePageIndex(); - - if (isInLeftPageChangeZone() && - 0 < pageIndex) { - --pageIndex; - } else if (isInRightPageChangeZone() && - pageIndex < scene->pages().count()) { - ++pageIndex; - } else { - return; - } - - if (pageIndex == scene->pages().count()) { - if (scene->pages().last()->widgets().isEmpty()) { - return; - } else if (scene->pages().count() < scene->maximumPageCount()) { - addPageToScene(pageIndex); - mUiWidget->showPageIndicator(); - mUiWidget->pageIndicator()->addItem(pageIndex); - } else { - return; - } - } - - scene->setActivePageIndex(pageIndex); - startPageChangeAnimation(pageIndex, 200); -} - -#ifndef Q_OS_SYMBIAN #ifdef COVERAGE_MEASUREMENT #pragma CTC SKIP #endif //COVERAGE_MEASUREMENT -/*! - Switch the home screen language. -*/ -void HsIdleState::switchLanguage() -{ - QString locale; - QFile file("hslocale.txt"); - QTextStream stream(&file); - if (file.open(QIODevice::ReadWrite | QIODevice::Text)) { - QString word; - stream >> word; - if (!word.isEmpty()) { - locale = word; - } else { - locale = "en_US"; - } - } else { - locale = QLocale::system().name(); - } - - if (locale == "en_US") { - locale = "fi_FI"; - } else { - locale = "en_US"; - } - - file.seek(0); - stream << locale; - file.close(); - - QEvent event(QEvent::LocaleChange); - QApplication::sendEvent(qApp, &event); -} /*! - Translates the home screen ui. -*/ -void HsIdleState::translateUi() + Open task switcher. + \retval true if operation is successful. + */ +bool HsIdleState::openTaskSwitcher() { - mView->setTitle("Home Screen"/*hbTrId(gTitleOfflineTextName)*/); - action_waitInput_updateOptionsMenu(); + return HsMenuService::launchTaskSwitcher(); } #ifdef COVERAGE_MEASUREMENT #pragma CTC ENDSKIP #endif //COVERAGE_MEASUREMENT -#endif // Q_OS_SYMBIAN + +/*! + Page change zone animation has been finished. + */ +void HsIdleState::zoneAnimationFinished() +{ + HsScene *scene = HsScene::instance(); + int pageIndex = scene->activePageIndex(); + + if (mPageChanged) { + if (isInLeftPageChangeZone() && + 0 < pageIndex) { + --pageIndex; + } + else if (isInRightPageChangeZone() && + pageIndex < scene->pages().count()) { + ++pageIndex; + } + else { + delete mZoneAnimation; + mZoneAnimation = NULL; + mAllowZoneAnimation = true; + return; + } + if (pageIndex == scene->pages().count()) { + if (scene->pages().last()->widgets().isEmpty()) { + delete mZoneAnimation; + mZoneAnimation = NULL; + mAllowZoneAnimation = true; + return; + } + else if (scene->pages().count() < scene->maximumPageCount()) { + addPageToScene(pageIndex); + mUiWidget->showPageIndicator(); + mUiWidget->pageIndicator()->addItem(pageIndex); + } + else { + delete mZoneAnimation; + mZoneAnimation = NULL; + mAllowZoneAnimation = true; + return; + } + } + scene->setActivePageIndex(pageIndex); + startPageChangeAnimation(pageIndex, 200); + } + else { + scene->setActivePageIndex(pageIndex); + mUiWidget->setActivePage(pageIndex); + mAllowZoneAnimation = true; + } + + delete mZoneAnimation; + mZoneAnimation = NULL; +} // Undefine the helper macros. #undef ENTRY_ACTION #undef EXIT_ACTION diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hshomescreenstateplugin/src/hsselectbackgroundstate.cpp --- a/homescreenapp/stateplugins/hshomescreenstateplugin/src/hsselectbackgroundstate.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hshomescreenstateplugin/src/hsselectbackgroundstate.cpp Mon May 03 12:24:59 2010 +0300 @@ -17,6 +17,7 @@ #include #include +#include #include #include @@ -27,10 +28,14 @@ #include "hswallpaper.h" #include "hsdatabase.h" #include "hshomescreenstatecommon.h" +#include "hswallpaperhelper.h" +#ifdef Q_OS_SYMBIAN +#include "hsimagefetcherclient.h" +#else #include "xqaiwgetimageclient.h" #include "xqaiwcommon.h" - +#endif /*! \class HsSelectBackgroundState \ingroup group_hshomescreenstateprovider @@ -48,7 +53,11 @@ mImageFetcher(0), mSourceView(0) { +#ifdef Q_OS_SYMBIAN + mImageFetcher = new HsImageFetcherClient(this); +#else mImageFetcher = new XQAIWGetImageClient; +#endif connect(this, SIGNAL(entered()), SLOT(action_selectWallpaper())); connect(this, SIGNAL(exited()), SLOT(action_disconnectImageFetcher())); } @@ -64,30 +73,6 @@ /*! \internal - Scales and crops (if needed) \a image for given \a orientation - and saves it to \a path. Return true on successful. -*/ -bool HsSelectBackgroundState::saveImage(QImage &image, const QString &path, Qt::Orientation orientation) -{ - QRect rect; - if (orientation == Qt::Vertical) { - rect.setRect(0, 0, (2* 360) + HSBOUNDARYEFFECT, 640); - } else { - rect.setRect(0, 0, (2 * 640) + HSBOUNDARYEFFECT, 360); - } - - if (image.rect().contains(rect)) { - rect.moveCenter(image.rect().center()); - return image.copy(rect).save(path); - } else { - QImage scaledImage = image.scaledToWidth(rect.width()); - rect.moveCenter(scaledImage.rect().center()); - return scaledImage.copy(rect).save(path); - } -} - -/*! - \internal Connects to image fetcher and launches "remote" ui from photos from which user can select background image */ @@ -95,12 +80,19 @@ { mSourceView = HsScene::mainWindow()->currentView(); +#ifdef Q_OS_SYMBIAN + connect(mImageFetcher, SIGNAL(fetchCompleted(const QString&)), + this, SLOT(fetchCompleted(const QString&))); + connect(mImageFetcher, SIGNAL(fetchFailed(int, const QString&)), + this, SLOT(fetchFailed(int, const QString&))); + mImageFetcher->fetch(); +#else connect(mImageFetcher, SIGNAL(fetchComplete(QStringList)), SLOT(onFetchComplete(QStringList))); connect(mImageFetcher, SIGNAL(fetchFailed(int)), SLOT(onFetchFailed(int))); - mImageFetcher->fetch(QVariantMap(), SelectionSingle); +#endif } /*! @@ -116,7 +108,19 @@ /*! \internal - Called when user has selected an image + Called when user has selected an image on emulator or HW +*/ +#ifdef Q_OS_SYMBIAN +void HsSelectBackgroundState::fetchCompleted(const QString& imageFileName) +{ + QStringList imageFileNameAsList(imageFileName); + onFetchComplete(imageFileNameAsList); +} +#endif + +/*! + \internal + Called when user has selected an image */ void HsSelectBackgroundState::onFetchComplete(QStringList imageStringList) { @@ -151,17 +155,31 @@ QString landscapePath = HsWallpaper::wallpaperPath( Qt::Horizontal, QString(), fileExtension); - QImage image(imageStringList.first()); + QRect portraitRect = QRect(0, 0, (2 * 360) + HSBOUNDARYEFFECT, 640); + QRect landscapeRect = QRect(0, 0, (2 * 640) + HSBOUNDARYEFFECT, 360); + QRect sourceRect; // left empty to signal we want to use full size image as source + + QImage portraitImage = HsWallpaperHelper::processImage(imageStringList.first(), + portraitRect, sourceRect); - if (saveImage(image, portraitPath, Qt::Vertical) && - saveImage(image, landscapePath, Qt::Horizontal)) { + QImage landscapeImage = HsWallpaperHelper::processImage(imageStringList.first(), + landscapeRect, sourceRect); + + if (!portraitImage.isNull() && !landscapeImage.isNull()) { + portraitImage.save(portraitPath); sceneData.portraitWallpaper = portraitPath; + + landscapeImage.save(landscapePath); sceneData.landscapeWallpaper = landscapePath; + if (db->updateScene(sceneData)) { scene->wallpaper()->setImagesById(QString(), fileInfo.suffix()); } } - + else { + // display some error note here + } + emit event_waitInput(); } @@ -174,3 +192,15 @@ Q_UNUSED(error) emit event_waitInput(); } + +/*! + \internal + Called when selection of background image fails on emulator or HW +*/ +#ifdef Q_OS_SYMBIAN +void HsSelectBackgroundState::fetchFailed(int error, const QString& errorString) +{ + Q_UNUSED(errorString) + onFetchFailed(error); +} +#endif \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hshomescreenstateplugin/tsrc/loc_win/hslanguageswitch_en.qm Binary file homescreenapp/stateplugins/hshomescreenstateplugin/tsrc/loc_win/hslanguageswitch_en.qm has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hshomescreenstateplugin/tsrc/loc_win/hslanguageswitch_en.ts --- a/homescreenapp/stateplugins/hshomescreenstateplugin/tsrc/loc_win/hslanguageswitch_en.ts Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - - - - - - Language switch - Switch language - Switch language (en_GB) - - Homescreen_01 - title - Ho - False - - - diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hshomescreenstateplugin/tsrc/loc_win/hslanguageswitch_en_us.qm Binary file homescreenapp/stateplugins/hshomescreenstateplugin/tsrc/loc_win/hslanguageswitch_en_us.qm has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hshomescreenstateplugin/tsrc/loc_win/hslanguageswitch_en_us.ts --- a/homescreenapp/stateplugins/hshomescreenstateplugin/tsrc/loc_win/hslanguageswitch_en_us.ts Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - - - - - - Language switch - Switch language - Switch language (en_US) - - Homescreen_01 - title - Ho - False - - - diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hshomescreenstateplugin/tsrc/loc_win/hslanguageswitch_fi.qm Binary file homescreenapp/stateplugins/hshomescreenstateplugin/tsrc/loc_win/hslanguageswitch_fi.qm has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hshomescreenstateplugin/tsrc/loc_win/hslanguageswitch_fi.ts --- a/homescreenapp/stateplugins/hshomescreenstateplugin/tsrc/loc_win/hslanguageswitch_fi.ts Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - - - - - - Language switch - Switch language - Vaihda kieltä - - Homescreen_01 - title - Ho - False - - - diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsmenuworkerstateplugin/hsmenuworkerstateplugin.pro --- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/hsmenuworkerstateplugin.pro Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/hsmenuworkerstateplugin.pro Mon May 03 12:24:59 2010 +0300 @@ -18,7 +18,7 @@ CONFIG += plugin hb mobility MOBILITY = serviceframework -PLUGIN_SUBDIR = /hsresources/plugins/stateplugins +PLUGIN_SUBDIR = /private/20022F35/plugins/stateplugins include(../../common.pri) diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsaddappstocollectionstate.h --- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsaddappstocollectionstate.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsaddappstocollectionstate.h Mon May 03 12:24:59 2010 +0300 @@ -28,7 +28,7 @@ class HsAppsCheckList; /** - * @ingroup group_hsmenustateplugin + * @ingroup group_hsworkerstateplugin * @brief Application Library State. * * State responsible for adding new applications to collections. diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsaddtohomescreenstate.h --- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsaddtohomescreenstate.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsaddtohomescreenstate.h Mon May 03 12:24:59 2010 +0300 @@ -25,9 +25,11 @@ HS_STATES_TEST_CLASS(MenuStatesTest) +class CaEntry; + /** - * @ingroup group_hsmenustateplugin + * @ingroup group_hsworkerstateplugin * @brief Application Library State. * * Parent state for Application Library functionality (browsing applications and collections) @@ -78,8 +80,7 @@ void addShortcut(HsContentService &contentService, int entryId); - void addTApplication(HsContentService &contentService, int entryId, - QVariantMap &data); + void addApplication(HsContentService &contentService, CaEntry &entryId); void logActionResult(QString operationName, int entryId, bool operationSucceded); diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsmenubasestate.h --- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsmenubasestate.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsmenubasestate.h Mon May 03 12:24:59 2010 +0300 @@ -28,7 +28,7 @@ class HsContentService; /** - * @ingroup group_hsmenustateplugin + * @ingroup group_hsworkerstateplugin * @brief Menu Base State * * Menu Base state is the base class for states used in Menu. diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hspreviewhswidgetstate.h --- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hspreviewhswidgetstate.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hspreviewhswidgetstate.h Mon May 03 12:24:59 2010 +0300 @@ -27,10 +27,11 @@ class HbDialog; class HsWidgetHost; class CaNotifier; - +class HbAction; +class HbScrollArea; /** - * @ingroup group_hsmenustateprovider + * @ingroup group_hsworkerstateplugin * @brief Application Library State. * * Parent state for Application Library functionality (browsing applications and collections) @@ -66,6 +67,19 @@ private slots: /** + * Slot invoked when preview dialog is dismissed. + * + * @since S60 ?S60_version. + */ + void previewDialogFinished(HbAction* finishedAction); + + /** + * Slot invoked when message for corrupted widget is dismissed + * + * @since S60 ?S60_version. + */ + void messageWidgetCorruptedFinished(HbAction* finishedAction); + /** * Inherited from HsMenuBaseState. * * @since S60 ?S60_version. @@ -73,41 +87,39 @@ void onEntry(QEvent *event); /** - * Slot invoked when a state is exited. - * - * @since S60 ?S60_version. - */ - void stateExited(); - - /** * Memory card removed. */ void memoryCardRemoved(); + private: /** * Show message widget corrupted. * - * @param itemId Widget id. */ - void showMessageWidgetCorrupted(int itemId); + void showMessageWidgetCorrupted(); /** * Subscribe for memory card remove. * - * @param entryId Widget id. */ - void subscribeForMemoryCardRemove(int entryId); + void subscribeForMemoryCardRemove(); private: HbDialog *mPopupDialog; CaNotifier *mNotifier; - + + HbScrollArea *mScrollArea; + + HsWidgetHost *mWidget; + QObjectList mObjectList; + int mEntryId; + }; diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsviewappsettingsstate.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsviewappsettingsstate.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,115 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Menu Application Library state. +* +*/ + + +#ifndef HSVIEWAPPSETTINGSSTATE_H +#define HSVIEWAPPSETTINGSSTATE_H + +#include + +#include "hsmenustates_global.h" +#include "hbmainwindow.h" + +HS_STATES_TEST_CLASS(MenuStatesTest) + +class HsMenuService; +class HbView; +class HbAction; +class CaNotifier; + +class HsViewAppSettingsState : public QState +{ + Q_OBJECT + + HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest) + +public: + + /** + * Constructor. + * + * @since S60 ?S60_version. + * @param parent Owner. + */ + HsViewAppSettingsState(QState *parent = 0); + + /** + * Destructor. + * + * @since S60 ?S60_version. + */ + virtual ~HsViewAppSettingsState(); + +private slots: + + /** + * Slot connected trrigger action of secondary soft key of check list box. + * It is called when done button is selected. + * + * @since S60 ?S60_version. + */ + void settingsDone(); + +signals: + void initialize(const QString &aUid); + +protected: + + void onEntry(QEvent *event); + +private: + + /** + * Constructs contained objects. + * + * @since S60 ?S60_version. + */ + void construct(); + + /** + * Returns pointer to tha main window. + * + * @since S60 ?S60_version. + * @return Pointer to the main window. + */ + HbMainWindow *mainWindow() const; + + void subscribeForMemoryCardRemove(int entryId); + +private: + /** + * View. Owned. + */ + HbView *mView; + + /** + * Previous view. Not owned. + */ + HbView *mPreviousView; + + /** + * Confirm action. Owned. + */ + HbAction *mActionConfirm; + + CaNotifier *mNotifier; + +}; + + + +#endif //HSVIEWAPPSETTINGSSTATE_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsmenuworkerstateplugin/resource/hsmenuworkerstateplugin.s60xml --- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/resource/hsmenuworkerstateplugin.s60xml Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - hsmenuworkerstateplugin - z:/hsresources/plugins/stateplugins/hsmenuworkerstateplugin.qtplugin - - - com.nokia.homescreen.state.HsMenuWorkerState - 1.0 - - - - diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsaddappstocollectionstate.cpp --- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsaddappstocollectionstate.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsaddappstocollectionstate.cpp Mon May 03 12:24:59 2010 +0300 @@ -160,28 +160,28 @@ // Add a specific item to a collection via collection specific menu. // Adding a new collection via the Collections view. mSelectCollectionState->addTransition(this, - SIGNAL(transitToNewCollectionState()), mNewCollectionState); + SIGNAL(transitToNewCollectionState()), mNewCollectionState); mSelectCollectionState->addTransition(this, - SIGNAL(transitToSaveState(int)), saveState); + SIGNAL(transitToSaveState(int)), saveState); mNewCollectionState->addTransition(this, - SIGNAL(transitToSaveState(QString)), saveState); + SIGNAL(transitToSaveState(QString)), saveState); // Add one/many applications to an existing/a new collection // via the All view options menu. // Add items to a collection via the collection's view options menu. mSelectCollectionState->addTransition(this, - SIGNAL(transitToAppsCheckListState(int)), mAppsCheckListState); + SIGNAL(transitToAppsCheckListState(int)), mAppsCheckListState); mNewCollectionState->addTransition(this, - SIGNAL(transitToAppsCheckListState(QString)), mAppsCheckListState); + SIGNAL(transitToAppsCheckListState(QString)), mAppsCheckListState); mAppsCheckListState->addTransition(this, - SIGNAL(transitToSaveState(QList)), saveState); + SIGNAL(transitToSaveState(QList)), saveState); mSelectCollectionState->addTransition(this, - SIGNAL(transitToFinalState()),finalState); + SIGNAL(transitToFinalState()),finalState); mNewCollectionState->addTransition(this, - SIGNAL(transitToFinalState()), finalState); + SIGNAL(transitToFinalState()), finalState); mAppsCheckListState->addTransition(this, - SIGNAL(transitToFinalState()), finalState); + SIGNAL(transitToFinalState()), finalState); //transition to final state after save saveState->addTransition(finalState); diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsaddtohomescreenstate.cpp --- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsaddtohomescreenstate.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsaddtohomescreenstate.cpp Mon May 03 12:24:59 2010 +0300 @@ -78,19 +78,16 @@ HsMenuEvent *menuEvent = static_cast(event); QVariantMap data = menuEvent->data(); - const QString entryTypeName = data.value(entryTypeNameKey()).toString(); - const int entryId = data.value(itemIdKey()).toInt(); + QSharedPointer entry = CaService::instance()->getEntry(entryId); + const QString entryTypeName = entry->entryTypeName(); if (entryTypeName == widgetTypeName()) { - const QString uri = data.value(widgetUriAttributeName()).toString(); + const QString uri = entry->attribute(widgetUriAttributeName()); addWidget(*contentService(), uri, entryId); - HsMenuService::touch(entryId); - } else if (entryTypeName==templatedApplicationTypeName()) { - addTApplication(*contentService(), entryId, data); - HsMenuService::touch(entryId); + HsMenuService::touch(entryId); } else { - addShortcut(*contentService(), entryId); + addApplication(*contentService(), *entry); } HSMENUTEST_FUNC_EXIT("HsAddToHomeScreenState::onEntry"); @@ -151,34 +148,14 @@ void HsAddToHomeScreenState::addShortcut(HsContentService &contentService, int entryId) { - //ShortcutData item_id; - //item_id.mShortcutId = entryId; - HSMENUTEST_FUNC_ENTRY("HsAddToHomeScreenState::addShortcut"); - CaQuery query; - query.setEntryTypeNames(QStringList(widgetTypeName())); - QList entries = CaService::instance()->getEntries(query); - - if (mLibraryPath.isEmpty()) { - foreach(CaEntry *entry,entries) { - QString uri = entry->attribute(widgetUriAttributeName()); - if (uri == SHORTCUT_WIDGET_URI) { - mLibraryPath = entry->attribute( - widgetLibraryAttributeName()); - break; - } - } - } - if (!mLibraryPath.isEmpty()) { - QVariantHash params; - params[LIBRARY] = mLibraryPath; - params[URI] = SHORTCUT_WIDGET_URI; - QVariantHash preferences; - preferences[SHORTCUT_ID] = QString::number(entryId); - params[PREFERENCES] = preferences; - const bool result = contentService.createWidget(params); - logActionResult("Adding shortcut", entryId, result); - } + QVariantHash params; + params[URI] = SHORTCUT_WIDGET_URI; + QVariantHash preferences; + preferences[SHORTCUT_ID] = QString::number(entryId); + params[PREFERENCES] = preferences; + const bool result = contentService.createWidget(params); + logActionResult("Adding shortcut", entryId, result); HSMENUTEST_FUNC_EXIT("HsAddToHomeScreenState::addShortcut"); } @@ -189,34 +166,33 @@ \param data: data from event \retval void */ -void HsAddToHomeScreenState::addTApplication(HsContentService &contentService, - int entryId, QVariantMap &data) -{ - CaEntry* entry = CaService::instance()->getEntry(entryId); - - - if (entry->attributes().contains(widgetUriAttributeName())) { +void HsAddToHomeScreenState::addApplication(HsContentService &contentService, + CaEntry& entry) +{ + if (entry.attributes().contains(widgetUriAttributeName())) { QVariantHash params; - const QString uri = entry->attribute(widgetUriAttributeName()); - params[URI] = uri; + const QString uri = entry.attribute(widgetUriAttributeName()); + params[URI] = uri; QVariantHash preferences; - QVariantMap widgetParams = data.value(widgetParam()).toMap(); - QMapIterator i(widgetParams); + QMap attributes = entry.attributes(); + QMapIterator i(attributes); while (i.hasNext()) { i.next(); QString key(i.key()); - QString value = i.value().toString(); - preferences.insert(key.remove(widgetParam()), value); + QString value(i.value()); + if (key.contains(widgetParam())) { + preferences.insert(key.remove(widgetParam()),value); + } } params[PREFERENCES] = preferences; bool ok = contentService.createWidget(params); if (!ok) { - addShortcut(contentService, entryId); + addShortcut(contentService, entry.id()); } } else { - addShortcut(contentService, entryId); + addShortcut(contentService, entry.id()); } } diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsappschecklist.cpp --- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsappschecklist.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsappschecklist.cpp Mon May 03 12:24:59 2010 +0300 @@ -27,7 +27,7 @@ /*! \class HsAppsCheckList - \ingroup group_hsmenustateplugin + \ingroup group_hsworkerstateplugin \brief Application Library State. State responsible for selecting a group of applications to be added to a collection. diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsarrangestate.cpp --- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsarrangestate.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsarrangestate.cpp Mon May 03 12:24:59 2010 +0300 @@ -31,7 +31,7 @@ /*! \class HsArrangeState - \ingroup group_hsmenustateplugin + \ingroup group_hsworkerstateplugin \brief Application Library State. State responsible for arrange collection's entries. */ @@ -82,14 +82,9 @@ HSMENUTEST_FUNC_ENTRY("HsArrangeState::save"); getArrangedEntriesIds(listWidget); - if (mArrangedCollIdList.count() == mCollIdList.count()) { - for (int i(0); i < mArrangedCollIdList.count(); i++) { - if (mArrangedCollIdList.at(i) != mCollIdList.at(i)) { - HsMenuService::organizeCollection( - HsMenuService::allCollectionsId(), mArrangedCollIdList); - break; - } - } + if (mArrangedCollIdList != mCollIdList) { + HsMenuService::organizeCollection( + HsMenuService::allCollectionsId(), mArrangedCollIdList); } HSMENUTEST_FUNC_EXIT("HsArrangeState::save"); @@ -129,6 +124,9 @@ if (mEntriesList != NULL && mDialog != NULL) { mItemModel = HsMenuService::getAllCollectionsModel(); + // as we copy the model contents to the list widget + // we do not need the model to auto update + mItemModel->setAutoUpdate(false); fulfillEntriesList(*mEntriesList); diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionnamedialog.cpp --- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionnamedialog.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionnamedialog.cpp Mon May 03 12:24:59 2010 +0300 @@ -26,7 +26,7 @@ /*! \class HsCollectionNameDialog - \ingroup group_hsmenustateplugin + \ingroup group_hsworkerstateplugin \brief Rename Collection State. Collection name state */ diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionnamestate.cpp --- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionnamestate.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionnamestate.cpp Mon May 03 12:24:59 2010 +0300 @@ -25,7 +25,7 @@ /*! \class HsCollectionNameState - \ingroup group_hsmenustateplugin + \ingroup group_hsworkerstateplugin \brief Rename Collection State. Collection name state */ diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionslistdialog.cpp --- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionslistdialog.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionslistdialog.cpp Mon May 03 12:24:59 2010 +0300 @@ -27,7 +27,7 @@ /*! \class HsCollectionsListDialog - \ingroup group_hsmenustateplugin + \ingroup group_hsworkerstateplugin \brief Hs List Dialog Hs List Dialog */ diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsdeletecollectionitemstate.cpp --- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsdeletecollectionitemstate.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsdeletecollectionitemstate.cpp Mon May 03 12:24:59 2010 +0300 @@ -24,7 +24,7 @@ /*! \class HsDeleteCollectionItemState - \ingroup group_hsmenustateplugin + \ingroup group_hsworkerstateplugin \brief Delete Collection Item State. Deletes app from collection. */ diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsdeletecollectionstate.cpp --- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsdeletecollectionstate.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsdeletecollectionstate.cpp Mon May 03 12:24:59 2010 +0300 @@ -26,7 +26,7 @@ /*! \class HsDeleteCollectionState - \ingroup group_hsmenustateplugin + \ingroup group_hsworkerstateplugin \brief Delete Collection State. Deletes collections. */ diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsmenuworkerstate.cpp --- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsmenuworkerstate.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsmenuworkerstate.cpp Mon May 03 12:24:59 2010 +0300 @@ -25,9 +25,10 @@ #include "hscollectionnamestate.h" #include "hsarrangestate.h" #include "hspreviewhswidgetstate.h" +#include "hsviewappsettingsstate.h" /*! \class HsMenuWorkerState - \ingroup group_hsmenustateplugin + \ingroup group_hsworkerstateplugin \brief Menu Worker State. */ @@ -97,6 +98,7 @@ SIGNAL(finished()), mInitialState); createChildState (HsMenuEvent::PreviewHSWidget); + createChildState (HsMenuEvent::ShowAppSettings); HSMENUTEST_FUNC_EXIT("HsMenuWorkerState::construct"); } diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hspreviewhswidgetstate.cpp --- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hspreviewhswidgetstate.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hspreviewhswidgetstate.cpp Mon May 03 12:24:59 2010 +0300 @@ -55,10 +55,12 @@ HsPreviewHSWidgetState::HsPreviewHSWidgetState(QState *parent) : HsMenuBaseState(HS_PREVIEW_HS_WIDGET_STATE, parent), mPopupDialog(0), - mNotifier(0) + mNotifier(0), + mScrollArea(0), + mWidget(0), + mEntryId(0) { requestServices(QList () << CONTENT_SERVICE_KEY); - connect(this, SIGNAL(exited()),SLOT(stateExited())); } /*! @@ -93,13 +95,13 @@ HsMenuEvent *menuEvent = static_cast(event); QVariantMap data = menuEvent->data(); - const int entryId = data.value(itemIdKey()).toInt(); + mEntryId = data.value(itemIdKey()).toInt(); QVariantHash widgetData; widgetData.insert(LIBRARY, data.value(widgetLibraryAttributeName()).toString()); widgetData.insert(URI, data.value(widgetUriAttributeName()).toString()); - QScopedPointer widget( - contentService()->createWidgetForPreview(widgetData)); + + QScopedPointer widget(contentService()->createWidgetForPreview(widgetData)); if (widget) { widget->setMinimumSize(widget->preferredWidth(),widget->preferredHeight()); @@ -116,41 +118,33 @@ mPopupDialog = qobject_cast( loader.findWidget(HS_WIDGET_PREVIEW_DIALOG_NAME)); - - HbScrollArea *const scrollArea( + + mScrollArea = qobject_cast( - loader.findWidget(HS_WIDGET_PREVIEW_SCROLL_AREA_NAME))); - - if (mPopupDialog != NULL && scrollArea != NULL) { - mPopupDialog->setContentWidget(scrollArea); //ownership transferred + loader.findWidget(HS_WIDGET_PREVIEW_SCROLL_AREA_NAME)); + + // set parent to actions to delete them together with dialog + mPopupDialog->primaryAction()->setParent(mPopupDialog); + mPopupDialog->secondaryAction()->setParent(mPopupDialog); + + if (mPopupDialog != NULL && mScrollArea != NULL) { + mPopupDialog->setContentWidget(mScrollArea); // ownership transferred mPopupDialog->setTimeout(HbPopup::NoTimeout); - scrollArea->verticalScrollBar()->setInteractive(true); - scrollArea->horizontalScrollBar()->setInteractive(true); - scrollArea->setContentWidget(widget.data()); - scrollArea->takeContentWidget(); + mPopupDialog->setAttribute(Qt::WA_DeleteOnClose, true); + mScrollArea->verticalScrollBar()->setInteractive(true); + mScrollArea->horizontalScrollBar()->setInteractive(true); + mWidget = widget.take(); // ownership transfered + mScrollArea->setContentWidget(mWidget); // ownership transferred - subscribeForMemoryCardRemove(entryId); - widget->initializeWidget(); - widget->showWidget(); - // Launch popup syncronously - const HbAction *const action(mPopupDialog->exec()); - - disconnect(mNotifier, - SIGNAL(entryChanged(CaEntry,ChangeType)), - this, SLOT(memoryCardRemoved())); - - if (action == mPopupDialog->primaryAction()) { - widget->hideWidget(); - HsScene::instance()->activePage()->addNewWidget( - widget.take()); // ownership transferred - } else { - widget->uninitializeWidget(); - widget->deleteFromDatabase(); - } + subscribeForMemoryCardRemove(); + mWidget->initializeWidget(); + mWidget->showWidget(); + // Launch popup asyncronously + mPopupDialog->open(this, SLOT(previewDialogFinished(HbAction*))); } } else { - showMessageWidgetCorrupted(entryId); + showMessageWidgetCorrupted(); } HSMENUTEST_FUNC_EXIT("HsPreviewHSWidgetState::onEntry"); @@ -159,26 +153,6 @@ #pragma CTC ENDSKIP #endif //COVERAGE_MEASUREMENT -/*! - State exited. - \retval void - */ -void HsPreviewHSWidgetState::stateExited() -{ - HSMENUTEST_FUNC_ENTRY("HsPreviewHSWidgetState::stateExited"); - - - delete mNotifier; - mNotifier = NULL; - - qDeleteAll(mObjectList); - mObjectList.clear(); - - mPopupDialog = NULL; - - HSMENUTEST_FUNC_EXIT("HsPreviewHSWidgetState::stateExited"); - qDebug("HsPreviewHSWidgetState::stateExited()"); -} /*! Memory card with instaled widget was removed. @@ -192,15 +166,50 @@ } /*! - Subscribe for memory card remove. - \param entryId: HSWidget id. + Slot launched on dismissing the preview dialog \retval void */ -void HsPreviewHSWidgetState::subscribeForMemoryCardRemove(int entryId) +void HsPreviewHSWidgetState::previewDialogFinished(HbAction* finishedAction) +{ + if (mPopupDialog != NULL) { + // (work-around for crash if more then one action is selected in HbDialog) + disconnect(mNotifier, + SIGNAL(entryChanged(CaEntry,ChangeType)), + this, SLOT(memoryCardRemoved())); + + if (finishedAction == mPopupDialog->primaryAction()) { + mWidget->hideWidget(); + mScrollArea->takeContentWidget(); + HsScene::instance()->activePage()->addNewWidget( + mWidget); // ownership transferred + } else { + mWidget->uninitializeWidget(); + mWidget->deleteFromDatabase(); + } + mPopupDialog = NULL; + mScrollArea = NULL; + mWidget = NULL; + + delete mNotifier; + mNotifier = NULL; + + } else { + // (work-around for crash if more then one action is selected in HbDialog) + qWarning("Another signal finished was emited."); + } +} + + + +/*! + Subscribe for memory card remove. + \retval void + */ +void HsPreviewHSWidgetState::subscribeForMemoryCardRemove() { CaNotifierFilter filter; QList entryIds; - entryIds.append(entryId); + entryIds.append(mEntryId); filter.setIds(entryIds); mNotifier = CaService::instance()->createNotifier(filter); mNotifier->setParent(this); @@ -212,23 +221,34 @@ /*! Shows message about corrupted widget library. Deletes widget eventually - \param itemId entryId of widget (needed to delete it) \retval void */ #ifdef COVERAGE_MEASUREMENT #pragma CTC SKIP #endif //COVERAGE_MEASUREMENT -void HsPreviewHSWidgetState::showMessageWidgetCorrupted(int itemId) +void HsPreviewHSWidgetState::showMessageWidgetCorrupted() { HSMENUTEST_FUNC_ENTRY("HsCollectionState::showMessageWidgetCorrupted"); + QString message(hbTrId("txt_applib_dialog_file_corrupted_unable_to_use_wi")); - if (HbMessageBox::question(message,hbTrId( - "txt_common_button_ok"), hbTrId("txt_common_button_cancel"))) { - HsMenuService::executeAction(itemId, removeActionIdentifier()); - } + HbMessageBox::question(message, this, + SLOT(messageWidgetCorruptedFinished(HbAction*)), + hbTrId("txt_common_button_ok"), hbTrId("txt_common_button_cancel")); + HSMENUTEST_FUNC_EXIT("HsCollectionState::showMessageWidgetCorrupted"); } #ifdef COVERAGE_MEASUREMENT #pragma CTC ENDSKIP #endif //COVERAGE_MEASUREMENT + +/*! + Slot launched on dismissing the corrupted widget error note + \retval void + */ +void HsPreviewHSWidgetState::messageWidgetCorruptedFinished(HbAction* finishedAction) +{ + if (finishedAction && qobject_cast(finishedAction->parent())->primaryAction() == finishedAction) { + HsMenuService::executeAction(mEntryId, removeActionIdentifier()); + } +} diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsviewappsettingsstate.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsviewappsettingsstate.cpp Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,180 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Menu Application Library state. + * +*/ + +#include +#include +#include +#include +#include +#include + +#include "hsdomainmodel_global.h" +#include "hsapp_defs.h" +#include "hsmenuevent.h" +#include "hsviewappsettingsstate.h" +#include "caentry.h" +#include "canotifier.h" +#include "canotifierfilter.h" + +#include "hsmenuservice.h" + +/*! + \class HsCollectionNameDialog + \ingroup HsViewAppSettingsState + \brief State for showing Application Settings HbView from provided plugin + */ + +/*! + Constructor + \param parent: parent state + \retval void + */ +HsViewAppSettingsState::HsViewAppSettingsState(QState *parent) : + QState(parent), + mView(0), + mPreviousView(0), + mActionConfirm(0), + mNotifier(0) + +{ + construct(); +} + +// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- +// +void HsViewAppSettingsState::construct() +{ + setObjectName(this->parent()->objectName() + + "/ViewAppSettingsState"); +} + +/*! + Destructor. + */ +HsViewAppSettingsState::~HsViewAppSettingsState() +{ + if (mNotifier) { + delete mNotifier; + } +} + +/*! + onEntry method invoked on entering the state + \param event: event + \retval void + */ +void HsViewAppSettingsState::onEntry(QEvent *event) +{ + HSMENUTEST_FUNC_ENTRY("HsViewAppSettingsState::onEntry"); + QState::onEntry(event); + qDebug("CollectionState::onEntry()"); + HsMenuEvent *menuEvent = static_cast(event); + QVariantMap data = menuEvent->data(); + + const int entryId = data.value(itemIdKey()).toInt(); + QSharedPointer entry = CaService::instance()->getEntry(entryId); + + if(mView) + { + + delete mActionConfirm; + mActionConfirm = NULL; + + delete mView; + mView = NULL; + + } + + QString pluginPath(entry->attribute(appSettingsPlugin())); + QPluginLoader loader(pluginPath); + mView = qobject_cast(loader.instance()); + + mActionConfirm = new HbAction(Hb::ConfirmNaviAction, mView); + connect(mActionConfirm, SIGNAL(triggered()),SLOT(settingsDone())); + + if(mView) + { + subscribeForMemoryCardRemove(entryId); + QObject::connect(this, SIGNAL(initialize(QString)), mView, SLOT(initialize(QString))); + mView->setParent(this); + emit initialize(entry->attribute(applicationUidEntryKey())); + // Add View to main window + HbMainWindow *hbMainWindow = mainWindow(); + // add confirm action + mView->setNavigationAction(mActionConfirm); + + hbMainWindow->addView(mView); + // record the current view in order to activate it once done + mPreviousView = hbMainWindow->currentView(); + hbMainWindow->setCurrentView(mView); + hbMainWindow->show(); + } + + + HSMENUTEST_FUNC_EXIT("HsViewAppSettingsState::onEntry"); +} + + +#ifdef COVERAGE_MEASUREMENT +#pragma CTC SKIP +#endif //COVERAGE_MEASUREMENT +HbMainWindow *HsViewAppSettingsState::mainWindow() const +{ + return HbInstance::instance()->allMainWindows().value(0); +} +#ifdef COVERAGE_MEASUREMENT +#pragma CTC ENDSKIP +#endif //COVERAGE_MEASUREMENT + + +#ifdef COVERAGE_MEASUREMENT +#pragma CTC SKIP +#endif //COVERAGE_MEASUREMENT +void HsViewAppSettingsState::settingsDone() +{ + // Remove mView from main window and restore previous view. + HbMainWindow *hbMainWindow = mainWindow(); + hbMainWindow->setCurrentView(mPreviousView); + hbMainWindow->removeView(mView); + delete mActionConfirm; + mActionConfirm = NULL; + delete mView; + mView = NULL; +} +#ifdef COVERAGE_MEASUREMENT +#pragma CTC ENDSKIP +#endif //COVERAGE_MEASUREMENT + +/*! + Subscribe for memory card remove. + \param entryId: entry id. + \retval void + */ +void HsViewAppSettingsState::subscribeForMemoryCardRemove(int entryId) +{ + CaNotifierFilter filter; + QList entryIds; + entryIds.append(entryId); + filter.setIds(entryIds); + mNotifier = CaService::instance()->createNotifier(filter); + mNotifier->setParent(this); + connect(mNotifier, + SIGNAL(entryChanged(CaEntry,ChangeType)), + SLOT(settingsDone())); +} + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/hsclockwidgetplugin.pro --- a/homescreenapp/widgetplugins/hsclockwidgetplugin/hsclockwidgetplugin.pro Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/widgetplugins/hsclockwidgetplugin/hsclockwidgetplugin.pro Mon May 03 12:24:59 2010 +0300 @@ -17,12 +17,9 @@ TEMPLATE = lib CONFIG += plugin hb mobility MOBILITY = serviceframework -win32: PLUGIN_SUBDIR = /hsresources/import/widgetregistry/20022F6C -symbian: PLUGIN_SUBDIR = /private/20022F35/import/widgetregistry/20022F6C +PLUGIN_SUBDIR = /private/20022F35/import/widgetregistry/20022F6C include(../../common.pri) -LIBS += -lhswidgetmodel - DEPENDPATH += ./inc \ ./src @@ -30,7 +27,7 @@ symbian: { TARGET.UID3 = 0x20022F6C - LIBS += -lbafl + LIBS += -lbafl -lapgrfx -lcone } diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/hsclockwidgetplugin.qrc --- a/homescreenapp/widgetplugins/hsclockwidgetplugin/hsclockwidgetplugin.qrc Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/widgetplugins/hsclockwidgetplugin/hsclockwidgetplugin.qrc Mon May 03 12:24:59 2010 +0300 @@ -1,6 +1,6 @@ - - resource/hsdigitalclockwidget.docml - resource/hsanalogclockwidget.docml + + resource/hsanalogclockwidget.css + resource/hsanalogclockwidget.widgetml diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/hsclockwidgetplugin_win.pri --- a/homescreenapp/widgetplugins/hsclockwidgetplugin/hsclockwidgetplugin_win.pri Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/widgetplugins/hsclockwidgetplugin/hsclockwidgetplugin_win.pri Mon May 03 12:24:59 2010 +0300 @@ -14,17 +14,13 @@ # Description: # -HEADERS += ./inc/hsanalogclockstyleoption.h \ - ./inc/hsanalogclockwidget.h \ +HEADERS += ./inc/hsanalogclockwidget.h \ ./inc/hsclockwidget.h \ - ./inc/hsclockwidgetdocumentloader.h \ ./inc/hsclockwidgetplugin.h \ ./inc/hsdigitalclockwidget.h -SOURCES += ./src/hsanalogclockstyleoption.cpp \ - ./src/hsanalogclockwidget.cpp \ +SOURCES += ./src/hsanalogclockwidget.cpp \ ./src/hsclockwidget.cpp \ - ./src/hsclockwidgetdocumentloader.cpp \ ./src/hsclockwidgetplugin.cpp \ ./src/hsdigitalclockwidget.cpp diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/inc/hsanalogclockstyleoption.h --- a/homescreenapp/widgetplugins/hsclockwidgetplugin/inc/hsanalogclockstyleoption.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Style option for analog clock widget. -* -*/ - -#ifndef HSANALOGCLOCKSTYLEOPTION_H -#define HSANALOGCLOCKSTYLEOPTION_H - -#include - -const int backgroundItemIndex = 0; -const int hourHandItemIndex = 1; -const int minuteHandItemIndex = 2; - -class HsAnalogClockStyleOption : public HbStyleOption -{ -public: - HsAnalogClockStyleOption(); - HsAnalogClockStyleOption(const HsAnalogClockStyleOption &other); - ~HsAnalogClockStyleOption(); - - enum StyleOptionType { Type = HbSO_Widget+1000}; - enum StyleOptionVersion { Version = 1 }; - - qreal mM; - qreal mH; -}; - -#endif // HSANALOGCLOCKSTYLEOPTION_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/inc/hsanalogclockwidget.h --- a/homescreenapp/widgetplugins/hsclockwidgetplugin/inc/hsanalogclockwidget.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/widgetplugins/hsclockwidgetplugin/inc/hsanalogclockwidget.h Mon May 03 12:24:59 2010 +0300 @@ -20,18 +20,19 @@ #include #include -#include "hsanalogclockstyleoption.h" #include HOMESCREEN_TEST_CLASS(TestClockWidget) +class HbIconItem; + class HsAnalogClockWidget : public HbWidget { Q_OBJECT public: - explicit HsAnalogClockWidget(const QString &stylePluginName = QString(), QGraphicsItem *parent = 0); + explicit HsAnalogClockWidget(QGraphicsItem *parent = 0); virtual ~HsAnalogClockWidget(); public slots: @@ -45,21 +46,17 @@ private: - void createPrimitives(); void updatePrimitives(); private: - QGraphicsItem *mClockBackground; - QGraphicsItem *mClockHourHand; - QGraphicsItem *mClockMinuteHand; + HbIconItem *mClockBackground; + HbIconItem *mClockHourHand; + HbIconItem *mClockMinuteHand; - QString mStylePluginName; - Q_DISABLE_COPY(HsAnalogClockWidget) HOMESCREEN_TEST_FRIEND_CLASS(TestClockWidget) - }; diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/inc/hsclockwidget.h --- a/homescreenapp/widgetplugins/hsclockwidgetplugin/inc/hsclockwidget.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/widgetplugins/hsclockwidgetplugin/inc/hsclockwidget.h Mon May 03 12:24:59 2010 +0300 @@ -25,7 +25,6 @@ #include #include #include -#include "hsanalogclockstyleoption.h" HOMESCREEN_TEST_CLASS(TestClockWidget) diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/inc/hsclockwidgetdocumentloader.h --- a/homescreenapp/widgetplugins/hsclockwidgetplugin/inc/hsclockwidgetdocumentloader.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Screensaver custom document loader. -* -*/ - -#ifndef HSCLOCKWIDGETDOCUMENTLOADER_H -#define HSCLOCKWIDGETDOCUMENTLOADER_H - -#include - -#include - -HOMESCREEN_TEST_CLASS(TestClockWidget) - -class HsClockWidgetDocumentLoader : public HbDocumentLoader -{ - -private: - - virtual QObject *createObject(const QString &type, const QString &name); - - HOMESCREEN_TEST_FRIEND_CLASS(TestClockWidget) - -}; - -#endif // HSCLOCKWIDGETDOCUMENTLOADER_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/resource/hsanalogclockwidget.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/widgetplugins/hsclockwidgetplugin/resource/hsanalogclockwidget.css Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,21 @@ +HsAnalogClockWidget { + layout: layout_1; +} + +HsAnalogClockWidget::clock_background { + fixed-width: 25.0un; + fixed-height: 25.0un; + zvalue: 0; +} + +HsAnalogClockWidget::clock_minute_hand { + fixed-width: 25.0un; + fixed-height: 25.0un; + zvalue: 1; +} + +HsAnalogClockWidget::clock_hour_hand { + fixed-width: 25.0un; + fixed-height: 25.0un; + zvalue: 2; +} diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/resource/hsanalogclockwidget.widgetml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/widgetplugins/hsclockwidgetplugin/resource/hsanalogclockwidget.widgetml Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,10 @@ + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/resource/hsclockwidgetplugin.s60xml --- a/homescreenapp/widgetplugins/hsclockwidgetplugin/resource/hsclockwidgetplugin.s60xml Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - - hsclockwidgetplugin - z:/private/20022F35/import/widgetregistry/20022F6C/hsclockwidgetplugin.qtplugin - Themable clock widget. - - com.nokia.symbian.IHomeScreenWidget - 1.0 - The clock widget displays current time. - - tclock.png - Clock - - diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/resource/tclock.png Binary file homescreenapp/widgetplugins/hsclockwidgetplugin/resource/tclock.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/src/hsanalogclockstyleoption.cpp --- a/homescreenapp/widgetplugins/hsclockwidgetplugin/src/hsanalogclockstyleoption.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Style option for analog clock widget. -* -*/ - -#include "hsanalogclockstyleoption.h" - -HsAnalogClockStyleOption::HsAnalogClockStyleOption(): - HbStyleOption(), mM(0), mH(0) -{ - type = Type; - version = Version; -} - -HsAnalogClockStyleOption::HsAnalogClockStyleOption(const HsAnalogClockStyleOption &other) : - HbStyleOption(other), mM(other.mM), mH(other.mH) -{ - type = Type; - version = Version; -} - -HsAnalogClockStyleOption::~HsAnalogClockStyleOption() -{ -} diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/src/hsanalogclockwidget.cpp --- a/homescreenapp/widgetplugins/hsclockwidgetplugin/src/hsanalogclockwidget.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/widgetplugins/hsclockwidgetplugin/src/hsanalogclockwidget.cpp Mon May 03 12:24:59 2010 +0300 @@ -19,11 +19,8 @@ #include #include #include - -namespace -{ - const char PLUGIN_PATH[] = "/hsresources/plugins/styleplugins/hsanalogclockstyleplugin.dll"; -} +#include +#include /*! \class HsAnalogClockWidget @@ -37,20 +34,15 @@ Constructs widget. */ -HsAnalogClockWidget::HsAnalogClockWidget(const QString &stylePluginName, QGraphicsItem *parent) +HsAnalogClockWidget::HsAnalogClockWidget(QGraphicsItem *parent) : HbWidget(parent), mClockBackground(0), mClockHourHand(0), mClockMinuteHand(0) { - if (stylePluginName.isEmpty()) { - mStylePluginName = QDir::currentPath() + PLUGIN_PATH; - } else { - mStylePluginName = stylePluginName; - } - setPluginBaseId(style()->registerPlugin(mStylePluginName)); + HbStyleLoader::registerFilePath(":/hsanalogclockwidget.widgetml"); + HbStyleLoader::registerFilePath(":/hsanalogclockwidget.css"); - createPrimitives(); updatePrimitives(); } @@ -65,7 +57,8 @@ delete mClockHourHand; delete mClockMinuteHand; - style()->unregisterPlugin(mStylePluginName); + HbStyleLoader::registerFilePath(":/hsanalogclockwidget.widgetml"); + HbStyleLoader::registerFilePath(":/hsanalogclockwidget.css"); } /*! @@ -78,52 +71,47 @@ } /*! - Creates all widget primitives. - */ -void HsAnalogClockWidget::createPrimitives() -{ - if (pluginBaseId()==-1) { - return; - } - if (!mClockBackground) { - mClockBackground = style()->createPrimitive((HbStyle::Primitive)(pluginBaseId()), this); - } - if (!mClockHourHand) { - mClockHourHand = style()->createPrimitive((HbStyle::Primitive)(pluginBaseId()+hourHandItemIndex), this); - } - if (!mClockMinuteHand) { - mClockMinuteHand = style()->createPrimitive((HbStyle::Primitive)(pluginBaseId()+minuteHandItemIndex), this); - } -} - -/*! @copydoc HbWidget::updatePrimitives() */ void HsAnalogClockWidget::updatePrimitives() { - if (pluginBaseId()==-1) { - return; + if (!mClockBackground) { + mClockBackground = new HbIconItem(QLatin1String("qtg_graf_clock_day_bg"), this); + HbStyle::setItemName(mClockBackground, QLatin1String("clock_background")); } // Calculate angles for clock hands. QTime time = QTime::currentTime(); qreal s = 6 * time.second(); qreal m = 6 * (time.minute() + s/360); - qreal h = 30 * ((time.hour() % 12) + m/360)-90; - HsAnalogClockStyleOption option; - initStyleOption(&option); - option.mM = m; - option.mH = h; + qreal h = 30 * ((time.hour() % 12) + m/360); + + if (!mClockHourHand) { + mClockHourHand = new HbIconItem(QLatin1String("qtg_graf_clock_day_hour"), this); + HbStyle::setItemName(mClockHourHand, QLatin1String("clock_hour_hand")); + } - if (mClockBackground) { - style()->updatePrimitive(mClockBackground, (HbStyle::Primitive)(pluginBaseId()), &option); + // these should work but don't + //int x = mClockHourHand->iconItemSize().width()/2; + //int y = mClockHourHand->iconItemSize().height()/2; + // workaround + int x = mClockHourHand->preferredSize().width()/2; + int y = mClockHourHand->preferredSize().height()/2; + mClockHourHand->setTransform(QTransform().translate(x, y).rotate(h).translate(-x, -y)); + + if (!mClockMinuteHand) { + mClockMinuteHand = new HbIconItem(QLatin1String("qtg_graf_clock_day_min"), this); + HbStyle::setItemName(mClockMinuteHand, QLatin1String("clock_minute_hand")); } - if (mClockHourHand) { - style()->updatePrimitive(mClockHourHand, (HbStyle::Primitive)(pluginBaseId()+hourHandItemIndex), &option); - } - if (mClockMinuteHand) { - style()->updatePrimitive(mClockMinuteHand, (HbStyle::Primitive)(pluginBaseId()+minuteHandItemIndex), &option); - } + + // these should work but don't + //int x = mClockMinuteHand->iconItemSize().width()/2; + //int y = mClockMinuteHand->iconItemSize().height()/2; + // workaround + x = mClockMinuteHand->preferredSize().width()/2; + y = mClockMinuteHand->preferredSize().height()/2; + mClockMinuteHand->setTransform(QTransform().translate(x, y).rotate(m).translate(-x, -y)); + } /*! diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/src/hsclockwidget.cpp --- a/homescreenapp/widgetplugins/hsclockwidgetplugin/src/hsclockwidget.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/widgetplugins/hsclockwidgetplugin/src/hsclockwidget.cpp Mon May 03 12:24:59 2010 +0300 @@ -21,30 +21,31 @@ #include #include #include +#include // temp #include "hsclockwidget.h" #include "hsanalogclockwidget.h" #include "hsdigitalclockwidget.h" -#include "hsclockwidgetdocumentloader.h" #ifdef Q_OS_SYMBIAN #include "hsclockwidgettype_symbian.h" -#endif +#include +#include +#endif //Q_OS_SYMBIAN namespace { const char ANALOG[] = "analog"; const char DIGITAL[] = "digital"; - const char DIGITAL_CLOCK_DOCML[] = ":/xml/hsdigitalclockwidget.docml"; - const char ANALOG_CLOCK_DOCML[] = ":/xml/hsanalogclockwidget.docml"; - - const char DIGITAL_CLOCK_WIDGET[] = "timeLabel"; - const char ANALOG_CLOCK_WIDGET[] = "analogClockWidget"; - const int clockUpdateInterval = 1000; // msec } +#ifdef Q_OS_SYMBIAN +#define KClockAppUid TUid::Uid(0x10005903) +_LIT (KClockAppExe, "clock.exe"); +#endif //Q_OS_SYMBIAN + /*! \class HsClockWidget \ingroup group_hsclockwidgetplugin @@ -201,9 +202,26 @@ update(); mTimer->start(clockUpdateInterval); -#endif +#else //Q_OS_SYMBIAN + TApaTaskList taskList(CEikonEnv::Static()->WsSession()); + TApaTask task = taskList.FindApp(KClockAppUid); + if (task.Exists()){ + task.BringToForeground(); + } + else { + RProcess process; + TInt error = process.Create(KClockAppExe, KNullDesC, EOwnerThread); + + if (error == KErrNone){ + // start the process running. + process.Resume(); + process.Close(); + } + } +#endif //Q_OS_SYMBIAN } + /*! Toggles the clock type. */ @@ -223,35 +241,22 @@ { HbWidget *clockWidget = 0; - QString docmlFile; if (mClockType == DIGITAL) { - docmlFile = DIGITAL_CLOCK_DOCML; + clockWidget = new HsDigitalClockWidget(); + clockWidget->setBackgroundItem(HbStyle::P_Fade_background); } else { - docmlFile = ANALOG_CLOCK_DOCML; + clockWidget = new HsAnalogClockWidget(); } - HsClockWidgetDocumentLoader loader; - bool loaded = false; - loader.load(docmlFile, &loaded); - - if (loaded) { - if (mClockType == DIGITAL) { - clockWidget = qobject_cast(loader.findWidget(DIGITAL_CLOCK_WIDGET)); - clockWidget->setBackgroundItem(HbStyle::P_Fade_background); - } else { - clockWidget = qobject_cast(loader.findWidget(ANALOG_CLOCK_WIDGET)); - } - - } else { - qWarning() << "Unable to load clock widget from docml: " << docmlFile; - // TODO: We must handle this error situation once error handling strategy is clear! - } + qreal unit = HbDeviceProfile::current().unitValue(); + clockWidget->setPreferredSize(QSizeF(25 * unit, 25 * unit)); // TODO: temp workaround return clockWidget; } void HsClockWidget::onTypeChanged(QString type) { + Q_UNUSED(type); #if 0 if (mClockType != type) { mTimer->stop(); diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/src/hsclockwidgetdocumentloader.cpp --- a/homescreenapp/widgetplugins/hsclockwidgetplugin/src/hsclockwidgetdocumentloader.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Clock widget -* -*/ - -#include "hsclockwidgetdocumentloader.h" - -#include "hsanalogclockwidget.h" -#include "hsdigitalclockwidget.h" - -/*! - \class HsClockWidgetDocumentLoader - \ingroup group_hsclockwidgetplugin - \brief Custom homescreen themable clock docml layout loader. - */ - -/*! - Creates the homescreen themable clock custom docml objects. - \param type Static type name. - \param name Object name. - \retval Created object. - */ -QObject *HsClockWidgetDocumentLoader::createObject(const QString &type, const QString &name) -{ - if (type == HsAnalogClockWidget::staticMetaObject.className()) { - QObject *object = new HsAnalogClockWidget(); - object->setObjectName(name); - return object; - } - else if (type == HsDigitalClockWidget::staticMetaObject.className()) { - QObject *object = new HsDigitalClockWidget(); - object->setObjectName(name); - return object; - } - - return HbDocumentLoader::createObject(type, name); -} diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/styles/hsanalogclockstyleplugin/hsanalogclockstyleplugin.pri --- a/homescreenapp/widgetplugins/hsclockwidgetplugin/styles/hsanalogclockstyleplugin/hsanalogclockstyleplugin.pri Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: hsanalogclockstyleplugin.pri -# - -HEADERS += ./inc/*.h - -SOURCES += ./src/*.cpp - -DEPENDPATH += ./inc \ - ./src \ - ./resource - -INCLUDEPATH += ./inc \ - ./../../inc - - diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/styles/hsanalogclockstyleplugin/hsanalogclockstyleplugin.pro --- a/homescreenapp/widgetplugins/hsclockwidgetplugin/styles/hsanalogclockstyleplugin/hsanalogclockstyleplugin.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: hsanalogclockstyleplugin.pro -# - -TEMPLATE = lib -CONFIG += plugin hb -win32: PLUGIN_SUBDIR = /hsresources/plugins/styleplugins -symbian: PLUGIN_SUBDIR = /hsresources/plugins/styleplugins - -include (../../../../common.pri) - -symbian: { -TARGET.UID3 = 0x20022F6E -} - -include(hsanalogclockstyleplugin.pri) - -RESOURCES += hsanalogclockstyleplugin.qrc diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/styles/hsanalogclockstyleplugin/hsanalogclockstyleplugin.qrc --- a/homescreenapp/widgetplugins/hsclockwidgetplugin/styles/hsanalogclockstyleplugin/hsanalogclockstyleplugin.qrc Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - resource/hsanalogclockwidget.css - resource/hsanalogclockwidget.widgetml - - diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/styles/hsanalogclockstyleplugin/inc/hsanalogclockstyleplugin.h --- a/homescreenapp/widgetplugins/hsclockwidgetplugin/styles/hsanalogclockstyleplugin/inc/hsanalogclockstyleplugin.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Analog clock style plugin. -* -*/ - -#ifndef HSANALOGCLOCKSTYLEPLUGIN_H -#define HSANALOGCLOCKSTYLEPLUGIN_H - -#include - -#include -#include - -#include - -HOMESCREEN_TEST_CLASS(T_HsAnalogClockStylePlugin) - -class HsAnalogClockStylePlugin: public QObject, public HbStyleInterface -{ - Q_OBJECT - Q_INTERFACES(HbStyleInterface) - -public: - int primitiveCount() const; - QGraphicsItem *createPrimitive(HbStyle::Primitive primitive, QGraphicsItem *parent = 0) const; - void updatePrimitive(QGraphicsItem *item, HbStyle::Primitive primitive, const QStyleOption *option) const; - QString layoutPath() const; - - HOMESCREEN_TEST_FRIEND_CLASS(T_HsAnalogClockStylePlugin) - -}; - -#endif // HSANALOGCLOCKSTYLEPLUGIN_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/styles/hsanalogclockstyleplugin/resource/hsanalogclockstyleplugin.manifest --- a/homescreenapp/widgetplugins/hsclockwidgetplugin/styles/hsanalogclockstyleplugin/resource/hsanalogclockstyleplugin.manifest Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -common.pri currently requires manifest file \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/styles/hsanalogclockstyleplugin/resource/hsanalogclockwidget.css --- a/homescreenapp/widgetplugins/hsclockwidgetplugin/styles/hsanalogclockstyleplugin/resource/hsanalogclockwidget.css Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -HsAnalogClockWidget { - layout: layout_1; -} - -HsAnalogClockWidget::clock_background { - fixed-width: 25.0un; - fixed-height: 25.0un; - zvalue: 0; -} - -HsAnalogClockWidget::clock_minute_hand { - fixed-width: 25.0un; - fixed-height: 25.0un; - zvalue: 1; -} - -HsAnalogClockWidget::clock_hour_hand { - fixed-width: 25.0un; - fixed-height: 25.0un; - zvalue: 2; -} diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/styles/hsanalogclockstyleplugin/resource/hsanalogclockwidget.widgetml --- a/homescreenapp/widgetplugins/hsclockwidgetplugin/styles/hsanalogclockstyleplugin/resource/hsanalogclockwidget.widgetml Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ - - - - - - - - - - diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsclockwidgetplugin/styles/hsanalogclockstyleplugin/src/hsanalogclockstyleplugin.cpp --- a/homescreenapp/widgetplugins/hsclockwidgetplugin/styles/hsanalogclockstyleplugin/src/hsanalogclockstyleplugin.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Analog clock style plugin. -* -*/ - -#include "hsanalogclockstyleplugin.h" - -#include -#include - -#include "hsanalogclockstyleoption.h" - -/*! - \class HsAnalogClockStylePlugin - \brief Screensaver analog clock style plugin. - */ - -/*! - @copydoc HbStyleInterface::primitiveCount() - */ -int HsAnalogClockStylePlugin::primitiveCount() const -{ - return 3; -} - -/*! - @copydoc HbStyleInterface::createPrimitive() - */ -QGraphicsItem* HsAnalogClockStylePlugin::createPrimitive(HbStyle::Primitive primitive, QGraphicsItem *parent) const -{ - if (primitive == backgroundItemIndex) { - HbIconItem *item = new HbIconItem("qtg_graf_clock_day_bg", parent); - HbStyle::setItemName(item, "clock_background"); - return item; - } - else if (primitive == hourHandItemIndex) { - HbIconItem *item = new HbIconItem("qtg_graf_clock_day_hour", parent); - HbStyle::setItemName(item, "clock_hour_hand"); - return item; - } - else if (primitive == minuteHandItemIndex) { - HbIconItem *item = new HbIconItem("qtg_graf_clock_day_min", parent); - HbStyle::setItemName(item, "clock_minute_hand"); - return item; - } - return 0; -} - -/*! - @copydoc HbStyleInterface::updatePrimitive() - */ -void HsAnalogClockStylePlugin::updatePrimitive(QGraphicsItem *item, HbStyle::Primitive primitive, const QStyleOption *option ) const -{ - const HsAnalogClockStyleOption *opt = qstyleoption_cast(option); - if (!opt || !item) { - return; - } - - HbIconItem *iconItem = static_cast(item); - - // these should work but don't - //int x = iconItem->iconItemSize().width()/2; - //int y = iconItem->iconItemSize().height()/2; - - // workaround - int x = iconItem->preferredSize().width()/2; - int y = iconItem->preferredSize().height()/2; - - if (primitive == hourHandItemIndex) { - iconItem->setTransform(QTransform().translate(x, y).rotate(opt->mH).translate(-x, -y)); - } - else if (primitive == minuteHandItemIndex) { - iconItem->setTransform(QTransform().translate(x, y).rotate(opt->mM).translate(-x, -y)); - } -} - -/*! - @copydoc HbStyleInterface::layoutPath() - */ -QString HsAnalogClockStylePlugin::layoutPath() const -{ - return QString(":/"); -} - -#ifndef COVERAGE_MEASUREMENT -Q_EXPORT_PLUGIN2(hsanalogclockstyleplugin, HsAnalogClockStylePlugin) -#endif //COVERAGE_MEASUREMENT diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsshortcutwidgetplugin/hsshortcutwidgetplugin.pri --- a/homescreenapp/widgetplugins/hsshortcutwidgetplugin/hsshortcutwidgetplugin.pri Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -HEADERS += ./inc/*.h - -SOURCES += ./src/*.cpp diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsshortcutwidgetplugin/hsshortcutwidgetplugin.pro --- a/homescreenapp/widgetplugins/hsshortcutwidgetplugin/hsshortcutwidgetplugin.pro Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/widgetplugins/hsshortcutwidgetplugin/hsshortcutwidgetplugin.pro Mon May 03 12:24:59 2010 +0300 @@ -18,11 +18,15 @@ CONFIG += plugin hb mobility MOBILITY = serviceframework -win32: PLUGIN_SUBDIR = /hsresources/import/widgetregistry/20022F46 -symbian: PLUGIN_SUBDIR = /private/20022F35/import/widgetregistry/20022F46 +PLUGIN_SUBDIR = /private/20022F35/import/widgetregistry/20022F46 include(../../common.pri) +RESOURCES += hsshortcutwidgetplugin.qrc + +HEADERS += ./inc/*.h +SOURCES += ./src/*.cpp + LIBS += -lhsdomainmodel \ -lcaclient @@ -36,7 +40,4 @@ TARGET.UID3 = 0x20022F46 } - -include(hsshortcutwidgetplugin.pri) - exportResources(./resource/*.manifest, $$PLUGIN_SUBDIR) diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsshortcutwidgetplugin/hsshortcutwidgetplugin.qrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/widgetplugins/hsshortcutwidgetplugin/hsshortcutwidgetplugin.qrc Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,6 @@ + + + resource/hsshortcutwidget.css + resource/hsshortcutwidget.widgetml + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsshortcutwidgetplugin/inc/hsshortcutwidget.h --- a/homescreenapp/widgetplugins/hsshortcutwidgetplugin/inc/hsshortcutwidget.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/widgetplugins/hsshortcutwidgetplugin/inc/hsshortcutwidget.h Mon May 03 12:24:59 2010 +0300 @@ -11,25 +11,24 @@ * * Contributors: * -* Description: Shortcut widget +* Description: Home screen shortcut widget. * */ #ifndef HSSHORTCUTWIDGET_H #define HSSHORTCUTWIDGET_H -#include -#include +#include -#include +#include "cadefs.h" #include "hstest_global.h" -#include "cadefs.h" - HOMESCREEN_TEST_CLASS(TestShortcutWidget) +class HbFrameItem; class HbIconItem; class HbTextItem; +class HbTouchArea; class CaEntry; class HsShortcutWidget : public HbWidget @@ -41,41 +40,41 @@ HsShortcutWidget(QGraphicsItem *parent = 0, Qt::WindowFlags flags = 0); ~HsShortcutWidget(); + void setMcsId(int mcsId); int mcsId() const; - void setMcsId(int mcsId); + + bool eventFilter(QObject *watched, QEvent *event); signals: void finished(); public slots: - void onEntryChanged(const CaEntry &entry, ChangeType changeType); - void onInitialize(); void onShow(); void onHide(); -protected: - void mousePressEvent(QGraphicsSceneMouseEvent *event) { Q_UNUSED(event) } - void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); + void onEntryChanged(const CaEntry &entry, ChangeType changeType); private: - void constructUI(); + Q_DISABLE_COPY(HsShortcutWidget) + + void handleMousePressEvent(QGraphicsSceneMouseEvent *event); + void handleMouseReleaseEvent(QGraphicsSceneMouseEvent *event); - HbIcon fetchIcon(int aShortcutId); - QString fetchText(int aShortcutId); + void updatePrimitives(); + void createCaNotifier(); + void updateVisibility(); - void executeCollectionAction(int shortcutId, const QString& collectionType); - void createCaNotifier(int aShortcutId); +private: + HbFrameItem *mBackground; + HbIconItem *mIcon; + HbTextItem *mText; + HbTouchArea *mTouchArea; - void hideOrShowWidget(EntryFlags aEntryFlags); - EntryFlags fetchEntryFlags(int aShortcutId); - -private: - HbIconItem *mShortcutBackgroundItem; - HbIconItem *mShortcutIconItem; - HbTextItem *mShortcutTextItem; + bool mIsPressed; int mMcsId; + QSharedPointer mCaEntry; HOMESCREEN_TEST_FRIEND_CLASS(TestShortcutWidget) }; diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsshortcutwidgetplugin/inc/hsshortcutwidgetplugin.h --- a/homescreenapp/widgetplugins/hsshortcutwidgetplugin/inc/hsshortcutwidgetplugin.h Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/widgetplugins/hsshortcutwidgetplugin/inc/hsshortcutwidgetplugin.h Mon May 03 12:24:59 2010 +0300 @@ -11,21 +11,18 @@ * * Contributors: * -* Description: Homescreen widget plugin +* Description: Homescreen shortcut widget plugin. * */ - #ifndef HSSHORTCUTWIDGETPLUGIN_H #define HSSHORTCUTWIDGETPLUGIN_H #include #include -#include QTM_USE_NAMESPACE -HOMESCREEN_TEST_CLASS(TestShortcutWidgetPlugin) class HsShortcutWidgetPlugin : public QObject, public QServicePluginInterface { Q_OBJECT @@ -35,7 +32,6 @@ QObject *createInstance(const QServiceInterfaceDescriptor &descriptor, QServiceContext *context, QAbstractSecuritySession *session); -HOMESCREEN_TEST_FRIEND_CLASS(TestShortcutWidgetPlugin) }; #endif //HSSHORTCUTWIDGETPLUGIN_H diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/calculator.png Binary file homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/calculator.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/email.png Binary file homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/email.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/globe.png Binary file homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/globe.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/hsshortcutwidget.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/hsshortcutwidget.css Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,60 @@ +HsShortcutWidget { + layout: icon_text_shortcut; +} + +HsShortcutWidget[icon][text] { + layout: icon_text_shortcut; +} + +HsShortcutWidget[icon][!text] { + layout: icon_shortcut; +} + +HsShortcutWidget::background { + border-width: 0.0un; + fixed-width: 12un; + fixed-height: expr(12.5un + var(hb-param-text-height-tiny)); + zvalue: 0; +} + +HsShortcutWidget[icon][text]::background { + border-width: 0.0un; + fixed-width: 12un; + fixed-height: expr(12.5un + var(hb-param-text-height-tiny)); + zvalue: 0; +} + +HsShortcutWidget[icon][!text]::background { + border-width: 0.0un; + fixed-width: 12un; + fixed-height: 12un; + zvalue: 0; +} + +HsShortcutWidget::icon{ + left: -0.5un; + right: 0.5un; + top: -0.5un; + bottom: 0.5un; + fixed-width: 11.0un; + fixed-height: 11.0un; + zvalue: 1; +} + +HsShortcutWidget::text{ + left: -0.5un; + right: 0.5un; + top: 0.0un; + bottom: 0.5un; + fixed-width: 11.0un; + font-variant: secondary; + text-align: center center; + text-height: var(hb-param-text-height-tiny); + text-line-count-max: 1; + color: var(qtc_hs_list_item_title_normal); + zvalue: 2; +} + +HsShortcutWidget::toucharea { + zvalue: 3; +} diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/hsshortcutwidget.widgetml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/hsshortcutwidget.widgetml Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/hsshortcutwidgetplugin.s60xml --- a/homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/hsshortcutwidgetplugin.s60xml Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ - - - hsshortcutwidgetplugin - z:/private/20022F35/import/widgetregistry/20022F46/hsshortcutwidgetplugin.qtplugin - Shortcut widget. - - com.nokia.symbian.IHomeScreenWidget - 1.0 - - - shortcut.png - true - Shortcut - - diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/note.png Binary file homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/note.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/shortcuticon.png Binary file homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/shortcuticon.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsshortcutwidgetplugin/src/hsshortcutwidget.cpp --- a/homescreenapp/widgetplugins/hsshortcutwidgetplugin/src/hsshortcutwidget.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/widgetplugins/hsshortcutwidgetplugin/src/hsshortcutwidget.cpp Mon May 03 12:24:59 2010 +0300 @@ -11,16 +11,18 @@ * * Contributors: * -* Description: Shortcut widget +* Description: Home screen shortcut widget. * */ -#include #include -#include +#include +#include +#include #include #include +#include #include "hsshortcutwidget.h" #include "hsshortcutservice.h" @@ -30,52 +32,37 @@ /*! \class HsShortcutWidget - \ingroup group_hsshortcutwidgetprovider + \ingroup group_hsshortcutwidgetplugin \brief Implementation for the homescreen shortcut widget. Shortcut can be defined to launch different applications or applications with parameters, for example browser with certain url. - - \section how_to_use_shortcut_plugin How to use HsShortcutWidget - - At the moment code is compiled with homescreen core implementation. - */ /*! - - Constructs shortcut widget object + Constructor. */ HsShortcutWidget::HsShortcutWidget(QGraphicsItem *parent, Qt::WindowFlags flags) : HbWidget(parent, flags), - mShortcutBackgroundItem(0), - mShortcutIconItem(0), - mShortcutTextItem(0), - mMcsId(-1) + mBackground(0), mIcon(0), mText(0), mTouchArea(0), + mIsPressed(false), + mMcsId(-1), mCaEntry() { - setPreferredSize(QSizeF(82,82)); - resize(82,82); + HbStyleLoader::registerFilePath(":/hsshortcutwidget.widgetml"); + HbStyleLoader::registerFilePath(":/hsshortcutwidget.css"); } /*! - \fn HsShortcutWidget::~HsShortcutWidget() - - Destructor + Destructor. */ HsShortcutWidget::~HsShortcutWidget() { + HbStyleLoader::unregisterFilePath(":/hsshortcutwidget.widgetml"); + HbStyleLoader::unregisterFilePath(":/hsshortcutwidget.css"); } /*! - Getter for menu content service id -*/ -int HsShortcutWidget::mcsId() const -{ - return mMcsId; -} - -/*! - Sets menu content service id to \a mcsId + Sets the menu content service id. */ void HsShortcutWidget::setMcsId(int mcsId) { @@ -83,194 +70,186 @@ } /*! - \fn void HsShortcutWidget::onEntryChanged(const CaEntry &entry, ChangeType changeType) - - Invoked when \a entry has changed with a \a changeType event. + Returns the menu content service id. */ -void HsShortcutWidget::onEntryChanged(const CaEntry &entry, ChangeType changeType) +int HsShortcutWidget::mcsId() const { + return mMcsId; +} - switch(changeType) { - case RemoveChangeType: { - emit finished(); +/*! + Filters touch area events. +*/ +bool HsShortcutWidget::eventFilter(QObject *watched, QEvent *event) +{ + Q_UNUSED(watched) + + switch (event->type()) { + case QEvent::GraphicsSceneMousePress: + handleMousePressEvent(static_cast(event)); break; - } - case UpdateChangeType: { - hideOrShowWidget(entry.flags()); - mShortcutIconItem->setIcon(fetchIcon(mMcsId)); + + case QEvent::GraphicsSceneMouseRelease: + handleMouseReleaseEvent(static_cast(event)); + break; + + default: + break; + } + + return true; +} - QString text = fetchText(mMcsId); - mShortcutTextItem->setText(text); - break; - } - default: - break; +/*! + Initializes this widget. +*/ +void HsShortcutWidget::onInitialize() +{ + mCaEntry = CaService::instance()->getEntry(mMcsId); + if (!mCaEntry.isNull()) { + createCaNotifier(); + updatePrimitives(); + } else { + emit finished(); } } /*! - \fn void HsShortcutWidget::onInitialize() - - Initializes shortcut + Wakes up this widget. */ -void HsShortcutWidget::onInitialize() +void HsShortcutWidget::onShow() { - constructUI(); - - if (!HsShortcutService::instance() || mMcsId < 0) { - emit finished(); - } - - createCaNotifier(mMcsId); - - mShortcutIconItem->setIcon(fetchIcon(mMcsId)); - - QString text = fetchText(mMcsId); - mShortcutTextItem->setText(text); - - setEnabled(true); + updateVisibility(); } /*! - \fn void HsClockWidget::show() - - Shows the widget -*/ -void HsShortcutWidget::onShow() -{ - hideOrShowWidget(fetchEntryFlags(mMcsId)); -} - -/*! - \fn void HsClockWidget::show() - - Hides the widget + Puts this widget in quiescent state. */ void HsShortcutWidget::onHide() { } /*! - \fn void HsShortcutWidget::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) - - Executes configured action + Invoked when \a entry has changed with a \a changeType. */ -void HsShortcutWidget::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) -{ - if (!contains(event->pos())) { - return; - } +void HsShortcutWidget::onEntryChanged(const CaEntry &entry, ChangeType changeType) +{ + Q_UNUSED(entry) + + mCaEntry = CaService::instance()->getEntry(mMcsId); - CaEntry *entry = CaService::instance()->getEntry(mMcsId); - if (!entry) { - return; - } - - if (entry->role() == ItemEntryRole) { - CaService::instance()->executeCommand(mMcsId); - } else { - executeCollectionAction(mMcsId, entry->entryTypeName()); + switch(changeType) { + case RemoveChangeType: + emit finished(); + break; + case UpdateChangeType: + updateVisibility(); + updatePrimitives(); + break; + default: + break; } } /*! - \fn void HsShortcutWidget::constructUI() - - Constructs and initializes ui parts + Mouse press handler. */ -void HsShortcutWidget::constructUI() -{ - mShortcutBackgroundItem = new HbIconItem("hs_shortcut_bg"); - mShortcutBackgroundItem->setAlignment(Qt::AlignCenter); - mShortcutIconItem = new HbIconItem; - mShortcutIconItem->setAlignment(Qt::AlignCenter); - mShortcutTextItem = new HbTextItem; - mShortcutTextItem->setAlignment(Qt::AlignCenter); +void HsShortcutWidget::handleMousePressEvent(QGraphicsSceneMouseEvent *event) +{ + Q_UNUSED(event) - HbStackedLayout *mainLayout = new HbStackedLayout; - mainLayout->addItem(mShortcutBackgroundItem); - - QGraphicsLinearLayout *contentLayout = - new QGraphicsLinearLayout(Qt::Vertical); - contentLayout->setContentsMargins(4, 4, 4, 4); - contentLayout->addItem(mShortcutIconItem); - contentLayout->addItem(mShortcutTextItem); - mainLayout->addItem(contentLayout); - - setLayout(mainLayout); -} - -/*! - \internal -*/ -HbIcon HsShortcutWidget::fetchIcon(int aShortcutId) -{ - CaEntry *entry = CaService::instance()->getEntry(aShortcutId); - if (!entry) { - return HbIcon(); - } - return entry->makeIcon(); + mIsPressed = true; + updatePrimitives(); } /*! - \internal + Mouse release handler. */ -QString HsShortcutWidget::fetchText(int aShortcutId) +void HsShortcutWidget::handleMouseReleaseEvent(QGraphicsSceneMouseEvent *event) { - CaEntry *entry = CaService::instance()->getEntry(aShortcutId); - if (!entry) { - return QString(); - } - return entry->text(); -} - -/*! - \internal -*/ -void HsShortcutWidget::executeCollectionAction( - int shortcutId, const QString& collectionType) -{ - HsShortcutService::instance()->executeCollectionAction( - shortcutId, collectionType); -} + mIsPressed = false; + updatePrimitives(); -/*! - \internal -*/ -void HsShortcutWidget::createCaNotifier(int aShortcutId) -{ - CaNotifierFilter filter; - filter.setIds(QList() << aShortcutId); - - CaNotifier *itemNotifier = CaService::instance()->createNotifier(filter); - itemNotifier->setParent(this); + if (!contains(event->pos())) { + return; + } - connect(itemNotifier, - SIGNAL(entryChanged(CaEntry,ChangeType)), - SLOT(onEntryChanged(CaEntry,ChangeType)),Qt::QueuedConnection); -} - -/*! - \internal -*/ -void HsShortcutWidget::hideOrShowWidget(EntryFlags aEntryFlags) -{ - if (aEntryFlags.testFlag(MissingEntryFlag)) { - hide(); + if (mCaEntry->role() == ItemEntryRole) { + CaService::instance()->executeCommand(mMcsId); } else { - show(); + HsShortcutService::instance()->executeCollectionAction(mMcsId, mCaEntry->entryTypeName()); } } /*! \internal */ -EntryFlags HsShortcutWidget::fetchEntryFlags(int aShortcutId) +void HsShortcutWidget::updatePrimitives() +{ + // Background + if (!mBackground) { + HbFrameDrawer *drawer = new HbFrameDrawer( + QLatin1String("qtg_fr_hsshortcut_normal"), HbFrameDrawer::NinePieces); + mBackground = new HbFrameItem(drawer, this); + HbStyle::setItemName(mBackground, QLatin1String("background")); + } + if (mIsPressed) { + mBackground->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_hsitems_pressed")); + } else { + mBackground->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_hsshortcut_normal")); + } + + // Icon + if (!mIcon) { + mIcon = new HbIconItem(this); + HbStyle::setItemName(mIcon, QLatin1String("icon")); + } + mIcon->setIcon(mCaEntry->makeIcon()); + + // Text + QString text = mCaEntry->text(); + if (!text.isNull()) { + if (!mText) { + mText = new HbTextItem(this); + HbStyle::setItemName(mText, QLatin1String("text")); + } + mText->setText(text); + } else { + if (mText) { + delete mText; + mText = 0; + } + } + + // Touch Area + if (!mTouchArea) { + mTouchArea = new HbTouchArea(this); + mTouchArea->installEventFilter(this); + HbStyle::setItemName(mTouchArea, QLatin1String("toucharea")); + } +} + +/*! + \internal +*/ +void HsShortcutWidget::createCaNotifier() { - CaEntry *entry = CaService::instance()->getEntry(aShortcutId); - EntryFlags entryFlags = 0; - if (entry) { - entryFlags = entry->flags(); - } - return entryFlags; + CaNotifierFilter filter; + filter.setIds(QList() << mMcsId); + + CaNotifier *notifier = CaService::instance()->createNotifier(filter); + notifier->setParent(this); + + connect(notifier, + SIGNAL(entryChanged(CaEntry,ChangeType)), + SLOT(onEntryChanged(CaEntry,ChangeType)), + Qt::QueuedConnection); } + +/*! + \internal +*/ +void HsShortcutWidget::updateVisibility() +{ + setVisible(!mCaEntry->flags().testFlag(MissingEntryFlag)); +} diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/hsshortcutwidgetplugin/src/hsshortcutwidgetplugin.cpp --- a/homescreenapp/widgetplugins/hsshortcutwidgetplugin/src/hsshortcutwidgetplugin.cpp Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/widgetplugins/hsshortcutwidgetplugin/src/hsshortcutwidgetplugin.cpp Mon May 03 12:24:59 2010 +0300 @@ -11,7 +11,7 @@ * * Contributors: * -* Description: Homescreen widget plugin +* Description: Homescreen shortcut widget plugin. * */ @@ -26,18 +26,14 @@ #pragma CTC SKIP #endif //COVERAGE_MEASUREMENT -/** +/*! \class HsShortcutWidgetPlugin \ingroup group_hsshortcutwidgetplugin - \brief Homescreen shortcut widget plugin collects ready-made homescreen shortcut widget(s). - - This library includes homescreen shortcut widgets implemented by homescreen scrum team. - This plugin provides widgets that are described in the hsshortcutwidgetplugin.xml plugin - xml file. + \brief The plugin part of the homescreen shortcut widget. */ /*! - Creates widget object. + Instantiates and returns new shortcut widget. */ QObject *HsShortcutWidgetPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor, QServiceContext *context, diff -r cdae8c6c3876 -r 4e8ebe173323 homescreenapp/widgetplugins/widgetplugins.pro --- a/homescreenapp/widgetplugins/widgetplugins.pro Fri Apr 16 14:54:01 2010 +0300 +++ b/homescreenapp/widgetplugins/widgetplugins.pro Mon May 03 12:24:59 2010 +0300 @@ -17,6 +17,5 @@ TEMPLATE = subdirs SUBDIRS = hsshortcutwidgetplugin \ - hsclockwidgetplugin \ - hsclockwidgetplugin/styles/hsanalogclockstyleplugin + hsclockwidgetplugin \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/bwins/snsrutilsu.def --- a/screensaverapp/bwins/snsrutilsu.def Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -EXPORTS - ?qt_metacall@SnsrLabel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1 NONAME ; int SnsrLabel::qt_metacall(enum QMetaObject::Call, int, void * *) - ??0SnsrLabel@@QAE@PAVQGraphicsItem@@@Z @ 2 NONAME ; SnsrLabel::SnsrLabel(class QGraphicsItem *) - ?tr@SnsrLabel@@SA?AVQString@@PBD0H@Z @ 3 NONAME ; class QString SnsrLabel::tr(char const *, char const *, int) - ?tr@SnsrLabel@@SA?AVQString@@PBD0@Z @ 4 NONAME ; class QString SnsrLabel::tr(char const *, char const *) - ?getStaticMetaObject@SnsrLabel@@SAABUQMetaObject@@XZ @ 5 NONAME ; struct QMetaObject const & SnsrLabel::getStaticMetaObject(void) - ?changeEvent@SnsrLabel@@MAEXPAVQEvent@@@Z @ 6 NONAME ; void SnsrLabel::changeEvent(class QEvent *) - ?staticMetaObject@SnsrLabel@@2UQMetaObject@@B @ 7 NONAME ; struct QMetaObject const SnsrLabel::staticMetaObject - ??1SnsrLabel@@UAE@XZ @ 8 NONAME ; SnsrLabel::~SnsrLabel(void) - ?trUtf8@SnsrLabel@@SA?AVQString@@PBD0@Z @ 9 NONAME ; class QString SnsrLabel::trUtf8(char const *, char const *) - ?metaObject@SnsrLabel@@UBEPBUQMetaObject@@XZ @ 10 NONAME ; struct QMetaObject const * SnsrLabel::metaObject(void) const - ??0SnsrLabel@@QAE@ABVQString@@PAVQGraphicsItem@@@Z @ 11 NONAME ; SnsrLabel::SnsrLabel(class QString const &, class QGraphicsItem *) - ?setThemedTextColor@SnsrLabel@@AAEXXZ @ 12 NONAME ; void SnsrLabel::setThemedTextColor(void) - ?trUtf8@SnsrLabel@@SA?AVQString@@PBD0H@Z @ 13 NONAME ; class QString SnsrLabel::trUtf8(char const *, char const *, int) - ?qt_metacast@SnsrLabel@@UAEPAXPBD@Z @ 14 NONAME ; void * SnsrLabel::qt_metacast(char const *) - ??_ESnsrLabel@@UAE@I@Z @ 15 NONAME ; SnsrLabel::~SnsrLabel(unsigned int) - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/common.pri --- a/screensaverapp/common.pri Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,136 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: screensaverapp project - common QMake settings -# - -CONFIG += debug_and_release - -# On win32 and mac, debug and release libraries are named differently. -# We must follow the debug and release settings Qt was compiled with: -# build debug iff Qt built debug, build release iff Qt built release. -win32|mac { - !contains(QT_CONFIG,debug)|!contains(QT_CONFIG,release) { - CONFIG -= debug_and_release debug release - contains(QT_CONFIG,debug): CONFIG+=debug - contains(QT_CONFIG,release):CONFIG+=release - } -} - -CONFIG(debug, debug|release) { - SUBDIRPART = debug -} else { - SUBDIRPART = release -} - -win32: OUTPUT_DIR = $$PWD/../../bin/$$SUBDIRPART -symbian: OUTPUT_DIR = $$PWD/bin - -SOURCE_DIR = $$PWD/inc - -#test whether we have a unit test -!testcase { - OBJECTS_DIR = $$OUTPUT_DIR/tmp/$$TARGET - DESTDIR = $$OUTPUT_DIR - MOC_DIR = $$OUTPUT_DIR/tmp/$$TARGET/moc - RCC_DIR = $$OUTPUT_DIR/tmp/$$TARGET/rcc - UI_DIR = $$OUTPUT_DIR/tmp/$$TARGET/ui -} else { # test part is NOT DONE - QT *= testlib - CONFIG += console - CONFIG -= app_bundle - OBJECTS_DIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART/tmp/$$TARGET - DESTDIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART - MOC_DIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART/tmp/$$TARGET/moc - RCC_DIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART/tmp/$$TARGET/rcc - UI_DIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART/tmp/$$TARGET/ui - LIBS += -L$$OUTPUT_DIR/bin/$$SUBDIRPART/bin #link against library that we test -} - -# Add the output dirs to the link path too -LIBS += -L$$DESTDIR - -DEPENDPATH += . $$SOURCE_DIR -INCLUDEPATH += . $$SOURCE_DIR -#For some reason the default include path doesn't include MOC_DIR on symbian -symbian { - INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE - INCLUDEPATH += $$MOC_DIR - TARGET.CAPABILITY = ALL -TCB - TARGET.EPOCALLOWDLLDATA=1 -} - -win32 { - # add platfrom API for windows - INCLUDEPATH += \ - $$PWD/../../homescreensrv/homescreensrv_plat/appruntimemodel_api \ - $$PWD/../../homescreensrv/homescreensrv_plat/servicemodel_api \ - $$PWD/../../homescreensrv/homescreensrv_plat/statemodel_api \ - $$PWD/../../homescreensrv/screensavermodel/inc -} - -plugin: !isEmpty(PLUGIN_SUBDIR): DESTDIR = $$OUTPUT_DIR/$$PLUGIN_SUBDIR - -win32: plugin { # copy manifiers - manifest.path = $$DESTDIR - manifest.files = ./resource/*.manifest - manifest.CONFIG += no_build - - INSTALLS += manifest - PRE_TARGETDEPS += install_manifest -} - -symbian: plugin { # copy qtstub and manifest - pluginstub.sources = $${TARGET}.dll - pluginstub.path = $$PLUGIN_SUBDIR - - DEPLOYMENT += pluginstub - - qtplugins.path = $$PLUGIN_SUBDIR - qtplugins.sources += qmakepluginstubs/$${TARGET}.qtplugin - qtplugins.sources += resource/$${TARGET}.manifest - - for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin z:$$qtplugins.path/$$basename(qtplugin)" -} - -defineTest(exportResources) { -symbian { - for(subdirs, 1) { - entries = $$files($$subdirs) - for(entry, entries) : BLD_INF_RULES.prj_exports += "./$$entry z:/$$replace(2, ^/,)/$$basename(entry)" - } - export ( BLD_INF_RULES.prj_exports) -} -win32 { - name = $$replace(1, [/\\\\\.\*], _) - eval ($${name}.path = $${OUTPUT_DIR}/$${2}) - eval ($${name}.files = $$1) - eval ($${name}.CONFIG += no_build) - - INSTALLS += $$name - PRE_TARGETDEPS += install_$${name} - - export ( $${name}.path ) - export ( $${name}.files ) - export ( $${name}.CONFIG ) - export ( INSTALLS ) - export ( PRE_TARGETDEPS ) -} -} - -# support for NFT -nft:DEFINES += NFT -nft_ram { - DEFINES += NFT NFT_RAM - LIBS += -lhal -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/eabi/snsrutilsu.def --- a/screensaverapp/eabi/snsrutilsu.def Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -EXPORTS - _ZN9SnsrLabel11changeEventEP6QEvent @ 1 NONAME - _ZN9SnsrLabel11qt_metacallEN11QMetaObject4CallEiPPv @ 2 NONAME - _ZN9SnsrLabel11qt_metacastEPKc @ 3 NONAME - _ZN9SnsrLabel16staticMetaObjectE @ 4 NONAME DATA 16 - _ZN9SnsrLabel18setThemedTextColorEv @ 5 NONAME - _ZN9SnsrLabel19getStaticMetaObjectEv @ 6 NONAME - _ZN9SnsrLabelC1EP13QGraphicsItem @ 7 NONAME - _ZN9SnsrLabelC1ERK7QStringP13QGraphicsItem @ 8 NONAME - _ZN9SnsrLabelC2EP13QGraphicsItem @ 9 NONAME - _ZN9SnsrLabelC2ERK7QStringP13QGraphicsItem @ 10 NONAME - _ZN9SnsrLabelD0Ev @ 11 NONAME - _ZN9SnsrLabelD1Ev @ 12 NONAME - _ZN9SnsrLabelD2Ev @ 13 NONAME - _ZNK9SnsrLabel10metaObjectEv @ 14 NONAME - _ZTI9SnsrLabel @ 15 NONAME - _ZTV9SnsrLabel @ 16 NONAME - _ZThn16_N9SnsrLabelD0Ev @ 17 NONAME - _ZThn16_N9SnsrLabelD1Ev @ 18 NONAME - _ZThn8_N9SnsrLabelD0Ev @ 19 NONAME - _ZThn8_N9SnsrLabelD1Ev @ 20 NONAME - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/inc/snsrtest_global.h --- a/screensaverapp/inc/snsrtest_global.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Global Screensaver macros for testing purposes. -* -*/ - -#ifndef SNSRTEST_GLOBAL_H -#define SNSRTEST_GLOBAL_H - -#ifndef SCREENSAVER_TEST - #define SCREENSAVER_TEST_CLASS(aClassName) - #define SCREENSAVER_TEST_FRIEND_CLASS(aClassName) -#else - #define SCREENSAVER_TEST_CLASS(aClassName) class aClassName; - #define SCREENSAVER_TEST_FRIEND_CLASS(aClassName) friend class aClassName; -#endif //SCREENSAVER_TEST - -/*! -To enable logging of function entry and exit use the following flag for qmake: --config nft -To enable logging of function entry and exit aswell as RAM usage (Symbian only!) -use the following flag for qmake: --config nft_ram -*/ - -#ifdef NFT - #include - #include - -#ifdef NFT_RAM && Q_OS_SYMBIAN - #include - #include - - #define SCREENSAVER_TEST_FREERAM_ENTRY(function) \ - TInt gEntryFreeRam(0); \ - TInt gEntryFreeHeap(0); \ - TInt gEntryTotalHeap(0); \ - { \ - HAL::Get(HAL::EMemoryRAMFree, gEntryFreeRam); \ - RHeap &heap = User::Heap(); \ - TInt biggestBlock(0); \ - gEntryFreeHeap = heap.Available(biggestBlock); \ - gEntryTotalHeap = heap.Size(); \ - qDebug("(snsr nft RAM in) " function \ - " - Memory (kB) - Free RAM: %d, Heap size: %d, Free heap: %d", \ - gEntryFreeRam >> 10, \ - gEntryTotalHeap >> 10, \ - gEntryFreeHeap >> 10); \ - } - - #define SCREENSAVER_TEST_FREERAM_EXIT(function) \ - { \ - TInt freeRAM(0); \ - HAL::Get(HAL::EMemoryRAMFree, freeRAM); \ - RHeap &heap = User::Heap(); \ - TInt biggestBlock(0); \ - TInt freeHeap = heap.Available(biggestBlock); \ - TInt totalHeap = heap.Size(); \ - qDebug("(snsr nft RAM out) " function \ - " - Memory (kB) - Free RAM: %d (%+d), Heap size: %d (%+d), Free heap: %d (%+d)", \ - freeRAM >> 10, (freeRAM-gEntryFreeRam) >> 10, \ - totalHeap >> 10, (totalHeap-gEntryTotalHeap) >> 10, \ - freeHeap >> 10, (freeHeap-gEntryFreeHeap) >> 10); \ - } -#else // NFT_RAM && Q_OS_SYMBIAN - #define SCREENSAVER_TEST_FREERAM_ENTRY(function) - #define SCREENSAVER_TEST_FREERAM_EXIT(function) -#endif // NFT_RAM && Q_OS_SYMBIAN - - #define SCREENSAVER_TEST_TIME_ENTRY(function) \ - QTime _ENTRY_TIME; \ - _ENTRY_TIME.start(); \ - { \ - qDebug() << "(snsr nft time in)" << function << "-" << \ - _ENTRY_TIME.toString("hh:mm:ss.zzz"); \ - } - - #define SCREENSAVER_TEST_TIME_EXIT(function) \ - { \ - qDebug() << "(snsr nft time out)" << function << "-" << \ - QTime::currentTime().toString("hh:mm:ss.zzz") << \ - "elapsed:" << _ENTRY_TIME.elapsed() << "ms"; \ - } - - #define SCREENSAVER_TEST_FUNC_ENTRY(function) SCREENSAVER_TEST_TIME_ENTRY(function) \ - SCREENSAVER_TEST_FREERAM_ENTRY(function) - #define SCREENSAVER_TEST_FUNC_EXIT(function) SCREENSAVER_TEST_TIME_EXIT(function) \ - SCREENSAVER_TEST_FREERAM_EXIT(function) -#else //NFT - #define SCREENSAVER_TEST_FUNC_ENTRY(function) - #define SCREENSAVER_TEST_FUNC_EXIT(function) -#endif //NFT - -#endif // SNSRTEST_GLOBAL_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/misc/cmt/cmtsnsr.cmd --- a/screensaverapp/misc/cmt/cmtsnsr.cmd Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -@rem -@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -@rem All rights reserved. -@rem This component and the accompanying materials are made available -@rem under the terms of "Eclipse Public License v1.0" -@rem which accompanies this distribution, and is available -@rem at the URL "http://www.eclipse.org/legal/epl-v10.html". -@rem -@rem Initial Contributors: -@rem Nokia Corporation - initial contribution. -@rem -@rem Contributors: -@rem -@rem Description: -@rem - -call collectsnsrfiles.cmd -cmt -c snsrconf.ini -o snsrcmt.txt < snsrfiles.txt -cmt2html -i snsrcmt.txt \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/misc/cmt/collectsnsrfiles.cmd --- a/screensaverapp/misc/cmt/collectsnsrfiles.cmd Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -@rem -@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -@rem All rights reserved. -@rem This component and the accompanying materials are made available -@rem under the terms of "Eclipse Public License v1.0" -@rem which accompanies this distribution, and is available -@rem at the URL "http://www.eclipse.org/legal/epl-v10.html". -@rem -@rem Initial Contributors: -@rem Nokia Corporation - initial contribution. -@rem -@rem Contributors: -@rem -@rem Description: -@rem -rem dir ..\..\screensaverapp\*.cpp /s /b >snsrfiles.txt -dir ..\..\screensaverproviders\snsrbigclockscreensaverprovider\src\*.cpp /s /b >snsrfiles.txt -dir ..\..\runtimeproviders\snsrdefaultruntimeprovider\src\*.cpp /s /b >>snsrfiles.txt -dir ..\..\snsrapplication\src\*.cpp /s /b >>snsrfiles.txt -dir ..\..\stateproviders\snsrdefaultstateprovider\src\*.cpp /s /b >>snsrfiles.txt -dir ..\..\..\..\homescreensrv\bagetmodel\src\*.cpp /s /b >>snsrfiles.txt -dir ..\..\..\..\homescreensrv\screensavermodel\src\*.cpp /s /b >>snsrfiles.txt \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/misc/cmt/snsrconf.ini --- a/screensaverapp/misc/cmt/snsrconf.ini Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -MCCABE_FUNCTION_MAX=20 -V_FUNCTION_MIN=1 -V_FUNCTION_MAX=2000 -V_FILE_MIN=1 -V_FILE_MAX=20000 -LOC_FUNCTION_MIN=1 -LOC_FUNCTION_MAX=100 -LOC_FILE_MIN=1 -LOC_FILE_MAX=2000 -B_FILE_MIN=0 -B_FILE_MAX=10 -COMMENT_RATIO_FILE_MIN=0 -COMMENT_RATIO_FILE_MAX=100 -COMMENT_RATIO_FUNCTION_MIN=0 -COMMENT_RATIO_FUNCTION_MAX=100 -COMMENT_FUNCTION_MIN=0 diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/misc/screensaver_uids.xls Binary file screensaverapp/misc/screensaver_uids.xls has changed diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/rom/screensaverapp.iby --- a/screensaverapp/rom/screensaverapp.iby Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef __SCREENSAVERAPP_IBY__ -#define __SCREENSAVERAPP_IBY__ - - -// ---- hsapplication -------------------------------------------- - -file=ABI_DIR\BUILD_DIR\snsrapplication.exe PROGRAMS_DIR\snsrapplication.exe -data=ZPRIVATE\10003a3f\import\apps\snsrapplication_reg.rsc private\10003a3f\import\apps\snsrapplication_reg.rsc - -// ---- runtimeproviders -------------------------------------------- - -// -------- snsrdefaultruntimeprovider -file=ABI_DIR\BUILD_DIR\snsrdefaultruntimeprovider.dll SHARED_LIB_DIR\snsrdefaultruntimeprovider.dll -data=\epoc32\data\z\snsrresources\plugins\runtimeproviders\snsrdefaultruntimeprovider.qtplugin snsrresources\plugins\runtimeproviders\snsrdefaultruntimeprovider.qtplugin -data=\epoc32\data\z\snsrresources\plugins\runtimeproviders\snsrdefaultruntimeprovider.manifest snsrresources\plugins\runtimeproviders\snsrdefaultruntimeprovider.manifest - -// ---- stateproviders -------------------------------------------- - -// -------- snsrdefaultstateprovider -file=ABI_DIR\BUILD_DIR\snsrdefaultstateprovider.dll SHARED_LIB_DIR\snsrdefaultstateprovider.dll -data=\epoc32\data\z\snsrresources\plugins\stateproviders\snsrdefaultstateprovider.qtplugin snsrresources\plugins\stateproviders\snsrdefaultstateprovider.qtplugin -data=\epoc32\data\z\snsrresources\plugins\stateproviders\snsrdefaultstateprovider.manifest snsrresources\plugins\stateproviders\snsrdefaultstateprovider.manifest - -// ---- screensaverproviders -------------------------------------------- - -// -------- snsrbigclockscreensaverprovider -file=ABI_DIR\BUILD_DIR\snsrbigclockscreensaverprovider.dll SHARED_LIB_DIR\snsrbigclockscreensaverprovider.dll -data=\epoc32\data\z\snsrresources\plugins\screensaverproviders\snsrbigclockscreensaverprovider.qtplugin snsrresources\plugins\screensaverproviders\snsrbigclockscreensaverprovider.qtplugin -data=\epoc32\data\z\snsrresources\plugins\screensaverproviders\snsrbigclockscreensaverprovider.manifest snsrresources\plugins\screensaverproviders\snsrbigclockscreensaverprovider.manifest - -// ---- style plugins -------------------------------------------------- - -// -------- snsranalogclockstyleplugin -file=ABI_DIR\BUILD_DIR\snsranalogclockstyleplugin.dll SHARED_LIB_DIR\snsranalogclockstyleplugin.dll -data=\epoc32\data\z\snsrresources\plugins\snsrstyleplugins\snsranalogclockstyleplugin.qtplugin snsrresources\plugins\snsrstyleplugins\snsranalogclockstyleplugin.qtplugin -data=\epoc32\data\z\snsrresources\plugins\snsrstyleplugins\snsranalogclockstyleplugin.manifest snsrresources\plugins\snsrstyleplugins\snsranalogclockstyleplugin.manifest - -// -------- snsroledclockstyleplugin -file=ABI_DIR\BUILD_DIR\snsroledclockstyleplugin.dll SHARED_LIB_DIR\snsroledclockstyleplugin.dll -data=\epoc32\data\z\snsrresources\plugins\snsrstyleplugins\snsroledclockstyleplugin.qtplugin snsrresources\plugins\snsrstyleplugins\snsroledclockstyleplugin.qtplugin -data=\epoc32\data\z\snsrresources\plugins\snsrstyleplugins\snsroledclockstyleplugin.manifest snsrresources\plugins\snsrstyleplugins\snsroledclockstyleplugin.manifest - -// ---- serviceproviders -------------------------------------------- - -// -------- snsruseractivityservice -file=ABI_DIR\BUILD_DIR\snsruseractivityservice.dll SHARED_LIB_DIR\snsruseractivityservice.dll - -// ---- snsrutils -------------------------------------------- - -file=ABI_DIR\BUILD_DIR\snsrutils.dll SHARED_LIB_DIR\snsrutils.dll - -#endif //__SCREENSAVERAPP_IBY__ diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/runtimeproviders/runtimeproviders.pro --- a/screensaverapp/runtimeproviders/runtimeproviders.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: runtimeproviders.pro -# - -TEMPLATE = subdirs - -SUBDIRS = snsrdefaultruntimeprovider diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/runtimeproviders/snsrdefaultruntimeprovider/inc/snsrdefaultruntime.h --- a/screensaverapp/runtimeproviders/snsrdefaultruntimeprovider/inc/snsrdefaultruntime.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Default Screensaver runtime. -* -*/ - -#ifndef SNSRDEFAULTRUNTIME_H -#define SNSRDEFAULTRUNTIME_H - -#include -#include "snsrtest_global.h" - -SCREENSAVER_TEST_CLASS(T_SnsrDefaultRuntimeProvider) - -class QStateMachine; -class HbMainWindow; - -class SnsrDefaultRuntime : public HsRuntime -{ - - Q_OBJECT - -public: - - SnsrDefaultRuntime(QObject *parent = 0); - ~SnsrDefaultRuntime(); - -public slots: - - void start(); - void stop(); - -private: - - Q_DISABLE_COPY(SnsrDefaultRuntime) - - void initializeUserInterface(); - void initializeStateMachine(); - - void createStates(); - -private: - - QStateMachine *mStateMachine; - HbMainWindow *mWindow; - - SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrDefaultRuntimeProvider) - -}; - -#endif // SNSRDEFAULTRUNTIME_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/runtimeproviders/snsrdefaultruntimeprovider/inc/snsrdefaultruntimeprovider.h --- a/screensaverapp/runtimeproviders/snsrdefaultruntimeprovider/inc/snsrdefaultruntimeprovider.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Default runtime provider. -* -*/ - -#ifndef SNSRDEFAULTRUNTIMEPROVIDER_H -#define SNSRDEFAULTRUNTIMEPROVIDER_H - -#include - -class SnsrDefaultRuntimeProvider : public QObject, - public IHsRuntimeProvider -{ - - Q_OBJECT - Q_INTERFACES(IHsRuntimeProvider) - -public: - - SnsrDefaultRuntimeProvider(QObject *parent = 0); - ~SnsrDefaultRuntimeProvider(); - - QList runtimes(); - HsRuntime *createRuntime(const HsRuntimeToken& token); - -}; - -#endif // SNSRDEFAULTRUNTIMEPROVIDER_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/runtimeproviders/snsrdefaultruntimeprovider/resource/snsrdefaultruntimeprovider.manifest --- a/screensaverapp/runtimeproviders/snsrdefaultruntimeprovider/resource/snsrdefaultruntimeprovider.manifest Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ - - - - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/runtimeproviders/snsrdefaultruntimeprovider/snsrdefaultruntimeprovider.pri --- a/screensaverapp/runtimeproviders/snsrdefaultruntimeprovider/snsrdefaultruntimeprovider.pri Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: snsrdefaultruntimeprovider.pri -# - -HEADERS += ./inc/*.h - -SOURCES += ./src/*.cpp - -DEPENDPATH += ./inc \ - ./src - -INCLUDEPATH += ./inc diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/runtimeproviders/snsrdefaultruntimeprovider/snsrdefaultruntimeprovider.pro --- a/screensaverapp/runtimeproviders/snsrdefaultruntimeprovider/snsrdefaultruntimeprovider.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: snsrdefaultruntimeprovider.pro -# - -TEMPLATE = lib -CONFIG += plugin -PLUGIN_SUBDIR = /snsrresources/plugins/runtimeproviders - -include (../../common.pri) - -LIBS += -lappruntimemodel \ - -lstatemodel - -CONFIG += hb - -symbian: { -TARGET.UID3 = 0x2002704F -} - -include(snsrdefaultruntimeprovider.pri) diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/runtimeproviders/snsrdefaultruntimeprovider/src/snsrdefaultruntime.cpp --- a/screensaverapp/runtimeproviders/snsrdefaultruntimeprovider/src/snsrdefaultruntime.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,116 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Default Screensaver runtime. -* -*/ - -#include "snsrdefaultruntime.h" - -#include -#include - -#include - -#include -#include - -/*! - \class SnsrDefaultRuntime - \ingroup group_snsrdefaultruntimeprovider - \brief Default implementation of the screensaver runtime. -*/ - -const char factoryManifestDir [] = "snsrresources/plugins/stateproviders"; -const char factoryPluginDir [] = "snsrresources/plugins/stateproviders"; -const char stateLibrary[] = "snsrdefaultstateprovider.dll"; - -const char rootStateUri [] = "screensaver.nokia.com/state/root"; - -/*! - Constructs a new SnsrDefaultRuntime with parent. -*/ -SnsrDefaultRuntime::SnsrDefaultRuntime(QObject *parent) : - HsRuntime(parent), - mStateMachine(0), - mWindow(0) -{ - initializeUserInterface(); - initializeStateMachine(); -} - -/*! - Destructs the class. -*/ -SnsrDefaultRuntime::~SnsrDefaultRuntime() -{ - delete mWindow; -} - -/*! - Starts the runtime. -*/ -void SnsrDefaultRuntime::start() -{ - mStateMachine->start(); -} - -/*! - Stops the runtime. -*/ -void SnsrDefaultRuntime::stop() -{ - mStateMachine->stop(); -} - -/*! - Function initializes objects required to UI creation. -*/ -void SnsrDefaultRuntime::initializeUserInterface() -{ - mWindow = new HbMainWindow(); - mWindow->show(); -} - -/*! - Function initialize state machine. -*/ -void SnsrDefaultRuntime::initializeStateMachine() -{ - // Ownership transfered to application. - // State machine instance will be removed after runtime destruction. - mStateMachine = new QStateMachine(this); - - // Forward signals emited by statemachine. - connect(mStateMachine, SIGNAL(started()), SIGNAL(started())); - connect(mStateMachine, SIGNAL(stopped()), SIGNAL(stopped())); - - createStates(); -} - -/*! - Function creates and initializes UI states. -*/ -void SnsrDefaultRuntime::createStates() -{ - HsStateToken token; - HsStateFactory factory(factoryManifestDir, factoryPluginDir); - - token.mLibrary = stateLibrary; - token.mUri = rootStateUri; - QState *snsrRootState = factory.createState(token); - snsrRootState->setParent(mStateMachine); - snsrRootState->setObjectName(token.mUri); - - mStateMachine->setInitialState(snsrRootState); -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/runtimeproviders/snsrdefaultruntimeprovider/src/snsrdefaultruntimeprovider.cpp --- a/screensaverapp/runtimeproviders/snsrdefaultruntimeprovider/src/snsrdefaultruntimeprovider.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Default runtime provider. -* -*/ - -#include "snsrdefaultruntimeprovider.h" - -#include - -#include "snsrdefaultruntime.h" - -/*! - \class SnsrDefaultRuntimeProvider - \ingroup group_snsrdefaultruntimeprovider - \brief Provides a default implementation of the screensaver runtime. - - This provider includes a default implementation of the screensaver runtime. - The runtime is described in the snsrdefaultruntimeprovider.manifest file. -*/ - -// Constants -const char gFileName [] = "snsrdefaultruntimeprovider.dll"; -const char gFileUri [] = "screensaver.nokia.com/runtime/defaultruntime"; - -/*! - Constructs a new SnsrDefaultRuntimeProvider with parent. -*/ -SnsrDefaultRuntimeProvider::SnsrDefaultRuntimeProvider(QObject *parent) : - QObject(parent) -{ -} - -/*! - Destructs the class. -*/ -SnsrDefaultRuntimeProvider::~SnsrDefaultRuntimeProvider() -{ -} - -/*! - Returns contained runtimes as a list of tokens. -*/ -QList SnsrDefaultRuntimeProvider::runtimes() -{ - HsRuntimeToken token = {gFileName, gFileUri}; - return QList() << token; -} - -/*! - Creates a runtime based on the given token. -*/ -HsRuntime *SnsrDefaultRuntimeProvider::createRuntime(const HsRuntimeToken& token) -{ - if ((token.mLibrary == gFileName) && (token.mUri == gFileUri)) { - return new SnsrDefaultRuntime(); - } - else { - return 0; - } -} - -#ifndef COVERAGE_MEASUREMENT -Q_EXPORT_PLUGIN2(snsrdefaultruntimeprovider, SnsrDefaultRuntimeProvider) -#endif // COVERAGE_MEASUREMENT diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverapp.pro --- a/screensaverapp/screensaverapp.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: screensaverapp.pro -# - -TEMPLATE = subdirs - -SUBDIRS = snsrutils\ - serviceproviders \ - stateproviders \ - runtimeproviders \ - snsrapplication \ - screensaverproviders - -CONFIG += ordered - -symbian:include(screensaverapp_exports_to_rom.pri) diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverapp_exports_to_rom.pri --- a/screensaverapp/screensaverapp_exports_to_rom.pri Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -BLD_INF_RULES.prj_exports += \ - "$${LITERAL_HASH}include " \ - "rom/screensaverapp.iby CORE_APP_LAYER_IBY_EXPORT_PATH(screensaverapp.iby)" diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/screensaverproviders.pro --- a/screensaverapp/screensaverproviders/screensaverproviders.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: screensaverproviders.pro -# - -TEMPLATE = subdirs - -SUBDIRS += snsrbigclockscreensaverprovider/snsranalogclockstyleplugin -SUBDIRS += snsrbigclockscreensaverprovider/snsroledclockstyleplugin -SUBDIRS += snsrbigclockscreensaverprovider - -CONFIG += ordered \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/inc/snsranalogclockcontainer.h --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/inc/snsranalogclockcontainer.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Container for analog clock. -* -*/ - -#ifndef SNSRANALOGCLOCKCONTAINER_H -#define SNSRANALOGCLOCKCONTAINER_H - -#include "snsrbigclockcontainer.h" - -SCREENSAVER_TEST_CLASS(T_SnsrBigClockScreensaverProvider) - -class HbLabel; -class SnsrAnalogClockWidget; - -class SnsrAnalogClockContainer : public SnsrBigClockContainer -{ - Q_OBJECT - -public: - - SnsrAnalogClockContainer(); - ~SnsrAnalogClockContainer(); - -public slots: - - virtual void update(); - virtual void changeLayout(Qt::Orientation orientation); - -private: - - HbLabel *mDateLabel; - SnsrAnalogClockWidget *mAnalogClockWidget; - - SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrBigClockScreensaverProvider) -}; - -#endif // SNSRANALOGCLOCKCONTAINER_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/inc/snsrbigclockcontainer.h --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/inc/snsrbigclockcontainer.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Base class container. -* -*/ - -#ifndef SNSRBIGCLOCKCONTAINER_H -#define SNSRBIGCLOCKCONTAINER_H - -#include - -#include "snsrtest_global.h" -#include "snsrdocumentloader.h" - -SCREENSAVER_TEST_CLASS(T_SnsrBigClockScreensaverProvider) - -class QGraphicsLinearLayout; - -class SnsrBigClockContainer : public HbWidget -{ - Q_OBJECT - -public: - - SnsrBigClockContainer(); - ~SnsrBigClockContainer(); - -public slots: - - virtual void update() = 0; - virtual void changeLayout(Qt::Orientation orientation) = 0; - -protected: - - virtual void changeEvent(QEvent * event); - -private: - - void setBackgroundColor(); - void paint( - QPainter *painter, - const QStyleOptionGraphicsItem *option, - QWidget *widget = 0 - ); - -protected: - - QGraphicsWidget *mMainContainer; - QGraphicsLinearLayout *mBackgroundContainerLayout; - - SnsrDocumentLoader mDocumentLoader; - QObjectList mDocumentObjects; - - int mCurrentOrientation; - -private: - - QColor mBackgroundColor; - - SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrBigClockScreensaverProvider) -}; - -#endif // SNSRBIGCLOCKCONTAINER_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/inc/snsrbigclockscreensaver.h --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/inc/snsrbigclockscreensaver.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Big clock Screensaver. -* -*/ - -#ifndef SNSRBIGCLOCKSCREENSAVER_H -#define SNSRBIGCLOCKSCREENSAVER_H - -#include - -#include -#include "snsrtest_global.h" - -SCREENSAVER_TEST_CLASS(T_SnsrBigClockScreensaverProvider) - -class HbMainWindow; -class SnsrBigClockContainer; - -class SnsrBigClockScreensaver : public Screensaver -{ - Q_OBJECT - -public: - - enum ClockFormat - { - ClockFormatUndefined, - ClockFormatAnalog, - ClockFormatDigital - }; - - SnsrBigClockScreensaver(); - ~SnsrBigClockScreensaver(); - -private: - - ClockFormat clockFormat(); - - virtual bool onInitialize(); - virtual bool onForeground(); - virtual bool onPartialForeground(); - virtual bool onBackground(); - virtual bool onPowerSave(); - virtual bool onClose(); - -private: - - QTimer mTimer; - HbMainWindow *mMainWindow; - SnsrBigClockContainer *mCurrentContainer; - - SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrBigClockScreensaverProvider) - -}; - -#endif // SNSRBIGCLOCKSCREENSAVER_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/inc/snsrbigclockscreensaverprovider.h --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/inc/snsrbigclockscreensaverprovider.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Big clock Screensaver provider. -* -*/ - -#ifndef SNSRBIGCLOCKSCREENSAVERPROVIDER_H -#define SNSRBIGCLOCKSCREENSAVERPROVIDER_H - -#include -#include - -class SnsrBigClockScreensaverProvider : public QObject, public IScreensaverProvider -{ - Q_OBJECT - Q_INTERFACES(IScreensaverProvider) - -public: - - SnsrBigClockScreensaverProvider(); - virtual ~SnsrBigClockScreensaverProvider(); - - QList screensavers(); - Screensaver *createScreensaver(const ScreensaverToken& token); - -private: - - ScreensaverToken mClockScreensaverToken; - -}; - -#endif // SNSRBIGCLOCKSCREENSAVERPROVIDER_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/inc/snsrdigitalclockcontainer.h --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/inc/snsrdigitalclockcontainer.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Container for digital clock. -* -*/ - -#ifndef SNSRDIGITALCLOCKCONTAINER_H -#define SNSRDIGITALCLOCKCONTAINER_H - -#include "snsrbigclockcontainer.h" - -SCREENSAVER_TEST_CLASS(T_SnsrBigClockScreensaverProvider) - -class HbLabel; - -class SnsrDigitalClockContainer : public SnsrBigClockContainer -{ - Q_OBJECT - -public: - - SnsrDigitalClockContainer(); - ~SnsrDigitalClockContainer(); - -public slots: - - virtual void update(); - virtual void changeLayout(Qt::Orientation orientation); - -private: - - HbLabel *mTimeLabel; - HbLabel *mAmPmLabel; - HbLabel *mDateLabel; - - SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrBigClockScreensaverProvider) -}; - -#endif // SNSRDIGITALCLOCKCONTAINER_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/inc/snsrdocumentloader.h --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/inc/snsrdocumentloader.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Screensaver custom document loader. -* -*/ - -#ifndef SNSRDOCUMENTLOADER_H -#define SNSRDOCUMENTLOADER_H - -#include - -#include "snsrtest_global.h" - -class SnsrDocumentLoader : public HbDocumentLoader -{ - -private: - - virtual QObject *createObject(const QString &type, const QString &name); - - SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrBigClockScreensaverProvider) - -}; - -#endif // SNSRDOCUMENTLOADER_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/inc/snsroledanalogclockcontainer.h --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/inc/snsroledanalogclockcontainer.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Container for oled analog clock. -* -*/ - -#ifndef SNSROLEDANALOGCLOCKCONTAINER_H -#define SNSROLEDANALOGCLOCKCONTAINER_H - -#include "snsrbigclockcontainer.h" - -SCREENSAVER_TEST_CLASS(T_SnsrBigClockScreensaverProvider) - -class SnsrOledClockWidget; - -class SnsrOledAnalogClockContainer : public SnsrBigClockContainer -{ - Q_OBJECT - -public: - - SnsrOledAnalogClockContainer(); - ~SnsrOledAnalogClockContainer(); - -public slots: - - virtual void update(); - virtual void changeLayout(Qt::Orientation orientation); - -private: - - SnsrOledClockWidget *mOledClockWidget; - - SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrBigClockScreensaverProvider) -}; - -#endif // SNSROLEDANALOGCLOCKCONTAINER_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/inc/snsroleddigitalclockcontainer.h --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/inc/snsroleddigitalclockcontainer.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Container for oled digital clock. -* -*/ - -#ifndef SNSROLEDDIGITALCLOCKCONTAINER_H -#define SNSROLEDDIGITALCLOCKCONTAINER_H - -#include "snsrbigclockcontainer.h" - -SCREENSAVER_TEST_CLASS(T_SnsrBigClockScreensaverProvider) - -class HbLabel; - -class SnsrOledDigitalClockContainer : public SnsrBigClockContainer -{ - Q_OBJECT - -public: - - SnsrOledDigitalClockContainer(); - ~SnsrOledDigitalClockContainer(); - -public slots: - - virtual void update(); - virtual void changeLayout(Qt::Orientation orientation); - -private: - - HbLabel *mTimeLabel; - HbLabel *mAmPmLabel; - HbLabel *mDateLabel; - - SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrBigClockScreensaverProvider) -}; - -#endif // SNSROLEDDIGITALCLOCKCONTAINER_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/resource/snsrbigclockscreensaverprovider.manifest --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/resource/snsrbigclockscreensaverprovider.manifest Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ - - - - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsranalogclockstyleplugin/inc/snsranalogclockstyleplugin.h --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsranalogclockstyleplugin/inc/snsranalogclockstyleplugin.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Analog clock style plugin. -* -*/ - -#ifndef SNSRANALOGCLOCKSTYLEPLUGIN_H -#define SNSRANALOGCLOCKSTYLEPLUGIN_H - -#include - -#include -#include - -#include "snsrtest_global.h" - -SCREENSAVER_TEST_CLASS(T_SnsrACStylePlugin) - -class SnsrAnalogClockStylePlugin: public QObject, public HbStyleInterface -{ - Q_OBJECT - Q_INTERFACES(HbStyleInterface) - -public: - int primitiveCount() const; - HbWidgetBase *createPrimitive(HbStyle::Primitive primitive, QGraphicsItem *parent = 0) const; - void updatePrimitive(QGraphicsItem *item, HbStyle::Primitive primitive, const QStyleOption *option) const; - QString layoutPath() const; - - SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrACStylePlugin) - -}; - -#endif // SNSRANALOGCLOCKSTYLEPLUGIN_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsranalogclockstyleplugin/resource/snsranalogclockstyleplugin.manifest --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsranalogclockstyleplugin/resource/snsranalogclockstyleplugin.manifest Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ - - - - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsranalogclockstyleplugin/resource/snsranalogclockwidget.css --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsranalogclockstyleplugin/resource/snsranalogclockwidget.css Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -HbWidget { - margin-left: 0un; - margin-top: 0un; -} - -SnsrAnalogClockWidget { - layout: layout_1; -} - -SnsrAnalogClockWidget::analog_clock_background { - pref-width: 40.0un; - pref-height: 40.0un; -} - -SnsrAnalogClockWidget::analog_clock_hour_hand { - pref-height: 28.0un; -} - -SnsrAnalogClockWidget::analog_clock_minute_hand { - pref-height: 34.0un; -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsranalogclockstyleplugin/resource/snsranalogclockwidget.widgetml --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsranalogclockstyleplugin/resource/snsranalogclockwidget.widgetml Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ - - - - - - - - - - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsranalogclockstyleplugin/snsranalogclockstyleplugin.pri --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsranalogclockstyleplugin/snsranalogclockstyleplugin.pri Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: snsranalogclockstyleplugin.pri -# - -HEADERS += ./inc/*.h \ - ./../snsrclockwidgets/inc/snsrstyleoptionanalogclock.h - -SOURCES += ./src/*.cpp - -DEPENDPATH += ./inc \ - ./src \ - ./resource - -INCLUDEPATH += ./inc \ - ./../snsrclockwidgets/inc diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsranalogclockstyleplugin/snsranalogclockstyleplugin.pro --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsranalogclockstyleplugin/snsranalogclockstyleplugin.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: snsranalogclockstyleplugin.pro -# - -TEMPLATE = lib - -CONFIG += plugin hb - -PLUGIN_SUBDIR = /snsrresources/plugins/snsrstyleplugins - -include (../../../common.pri) - -symbian: { - TARGET.UID3 = 0x20027054 -} - -include(snsranalogclockstyleplugin.pri) - -RESOURCES += snsranalogclockstyleplugin.qrc \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsranalogclockstyleplugin/snsranalogclockstyleplugin.qrc --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsranalogclockstyleplugin/snsranalogclockstyleplugin.qrc Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - resource/snsranalogclockwidget.css - resource/snsranalogclockwidget.widgetml - - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsranalogclockstyleplugin/src/snsranalogclockstyleplugin.cpp --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsranalogclockstyleplugin/src/snsranalogclockstyleplugin.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,110 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Analog clock style plugin. -* -*/ - -#include "snsranalogclockstyleplugin.h" - -#include -#include - -#include "snsrstyleoptionanalogclock.h" - -const int gDropShadowOffset(2); - -/*! - \class SnsrAnalogClockStylePlugin - \ingroup group_snsrbigclockscreensaverprovider - \brief Screensaver analog clock style plugin. - */ - -/*! - @copydoc HbStyleInterface::primitiveCount() - */ -int SnsrAnalogClockStylePlugin::primitiveCount() const -{ - return SnsrStyleOptionAnalogClock::LastItemIndex; // first index = 0, index of LastItemIndex = number of primitives; -} - -/*! - @copydoc HbStyleInterface::createPrimitive() - */ -HbWidgetBase* SnsrAnalogClockStylePlugin::createPrimitive(HbStyle::Primitive primitive, - QGraphicsItem *parent) const -{ - if (primitive == (int)SnsrStyleOptionAnalogClock::BackgroundItemIndex) { - HbIconItem *item = new HbIconItem("analog-clock-background", parent); - HbStyle::setItemName(item, "analog_clock_background"); - item->setZValue(1); - return item; - } - else if (primitive == (int)SnsrStyleOptionAnalogClock::HourHandItemIndex) { - HbIconItem *item = new HbIconItem("analog-clock-hour-hand", parent); - HbStyle::setItemName(item, "analog_clock_hour_hand"); - item->setZValue(2); - QGraphicsDropShadowEffect *effect = new QGraphicsDropShadowEffect(); - effect->setOffset(gDropShadowOffset); - item->setGraphicsEffect(effect); - return item; - } - else if (primitive == (int)SnsrStyleOptionAnalogClock::MinuteHandItemIndex) { - HbIconItem *item = new HbIconItem("analog-clock-minute-hand", parent); - HbStyle::setItemName(item, "analog_clock_minute_hand"); - item->setZValue(3); - QGraphicsDropShadowEffect *effect = new QGraphicsDropShadowEffect(); - effect->setOffset(gDropShadowOffset); - item->setGraphicsEffect(effect); - return item; - } - return 0; -} - -/*! - @copydoc HbStyleInterface::updatePrimitive() - */ -void SnsrAnalogClockStylePlugin::updatePrimitive(QGraphicsItem *item, - HbStyle::Primitive primitive, - const QStyleOption *option ) const -{ - const SnsrStyleOptionAnalogClock *opt = - qstyleoption_cast(option); - if (!opt || !item) { - return; - } - - HbIconItem *iconItem = static_cast(item); - - int x = iconItem->iconItemSize().width()/2; - int y = iconItem->iconItemSize().height()/2; - - if (primitive == (int)SnsrStyleOptionAnalogClock::HourHandItemIndex) { - iconItem->setTransform(QTransform().translate(x, y).rotate(opt->mH).translate(-x, -y)); - } - else if (primitive == (int)SnsrStyleOptionAnalogClock::MinuteHandItemIndex) { - iconItem->setTransform(QTransform().translate(x, y).rotate(opt->mM).translate(-x, -y)); - } -} - -/*! - @copydoc HbStyleInterface::layoutPath() - */ -QString SnsrAnalogClockStylePlugin::layoutPath() const -{ - return QString(":/"); -} - -#ifndef COVERAGE_MEASUREMENT -Q_EXPORT_PLUGIN2(snsranalogclockstyleplugin, SnsrAnalogClockStylePlugin) -#endif //COVERAGE_MEASUREMENT diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrbigclockscreensaver.qrc --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrbigclockscreensaver.qrc Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - - resource/snsrbigclockscreensaverdigital.docml - resource/snsrbigclockscreensaveranalog.docml - resource/snsrbigclockscreensaveroledanalog.docml - resource/snsrbigclockscreensaveroleddigital.docml - - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrbigclockscreensaverprovider.pri --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrbigclockscreensaverprovider.pri Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: snsrbigclockscreensaverprovider.pri -# - -HEADERS += ./inc/*.h \ - ./snsrclockwidgets/inc/*.h - -SOURCES += ./src/*.cpp \ - ./snsrclockwidgets/src/*.cpp - -DEPENDPATH += ./inc \ - ./src \ - ./resource - -INCLUDEPATH += ./inc \ - ./snsrclockwidgets/inc \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrbigclockscreensaverprovider.pro --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrbigclockscreensaverprovider.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: snsrbigclockscreensaverprovider.pro -# - -TEMPLATE = lib - -CONFIG += plugin -PLUGIN_SUBDIR = /snsrresources/plugins/screensaverproviders - -include (../../common.pri) - -LIBS += -lscreensavermodel \ - -lsnsrutils - -INCLUDEPATH += ../../snsrutils/inc - -CONFIG += hb - -symbian: { - TARGET.UID3 = 0x20027052 - # TODO: temporary until screensavermodel goes to platform API - INCLUDEPATH += ../../../../homescreensrv/screensavermodel/inc -} - -include(snsrbigclockscreensaverprovider.pri) - -RESOURCES = snsrbigclockscreensaver.qrc diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrclockwidgets/inc/snsranalogclockwidget.h --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrclockwidgets/inc/snsranalogclockwidget.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Analog Clock Widget. -* -*/ - -#ifndef SNSRANALOGCLOCKWIDGET_H -#define SNSRANALOGCLOCKWIDGET_H - -#include -#include "snsrtest_global.h" - -SCREENSAVER_TEST_CLASS(T_SnsrClockWidgets) - -class QGraphicsItem; - -class SnsrAnalogClockWidget: public HbWidget -{ - Q_OBJECT - -public: - - explicit SnsrAnalogClockWidget(QGraphicsItem *parent = 0); - virtual ~SnsrAnalogClockWidget(); - -public slots: - - void tick(); - -private: - - void resizeEvent (QGraphicsSceneResizeEvent *event); - void createPrimitives(); - void updatePrimitives(); - -private: - - QString mStylePluginName; - - QGraphicsItem *mClockBackground; - QGraphicsItem *mClockHourHand; - QGraphicsItem *mClockMinuteHand; - - Q_DISABLE_COPY(SnsrAnalogClockWidget) - SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrClockWidgets) - -}; - -#endif // SNSRANALOGCLOCKWIDGET_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrclockwidgets/inc/snsroledclockwidget.h --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrclockwidgets/inc/snsroledclockwidget.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Oled Clock Widget. -* -*/ - -#ifndef SNSROLEDCLOCKWIDGET_H -#define SNSROLEDCLOCKWIDGET_H - -#include -#include "snsrtest_global.h" - -SCREENSAVER_TEST_CLASS(T_SnsrClockWidgets) - -class QGraphicsItem; - -class SnsrOledClockWidget: public HbWidget -{ - Q_OBJECT - -public: - - explicit SnsrOledClockWidget(QGraphicsItem *parent = 0); - virtual ~SnsrOledClockWidget(); - -public slots: - - void tick(); - -private: - - void resizeEvent (QGraphicsSceneResizeEvent *event); - void createPrimitives(); - void updatePrimitives(); - -private: - - QString mStylePluginName; - - QGraphicsItem *mClockBackground; - QGraphicsItem *mClockHourHand; - QGraphicsItem *mClockMinuteHand; - QGraphicsItem *mClockDateFrame; - QGraphicsItem *mClockDateLabel; - - Q_DISABLE_COPY(SnsrOledClockWidget) - SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrClockWidgets) - -}; - -#endif // SNSROLEDCLOCKWIDGET_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrclockwidgets/inc/snsrstyleoptionanalogclock.h --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrclockwidgets/inc/snsrstyleoptionanalogclock.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Style option for analog clock widget. -* -*/ - -#ifndef SNSRSTYLEOPTIONANALOGCLOCK_H -#define SNSRSTYLEOPTIONANALOGCLOCK_H - -#include - -class SnsrStyleOptionAnalogClock : public HbStyleOption -{ - -public: - - enum ItemIndex - { - BackgroundItemIndex = 0, - HourHandItemIndex, - MinuteHandItemIndex, - LastItemIndex - }; - -public: - SnsrStyleOptionAnalogClock(); - SnsrStyleOptionAnalogClock(const SnsrStyleOptionAnalogClock &other); - ~SnsrStyleOptionAnalogClock(); - - enum StyleOptionType { Type = HbSO_Widget+1000}; - enum StyleOptionVersion { Version = 1 }; - - qreal mM; - qreal mH; -}; - -#endif // SNSRSTYLEOPTIONANALOGCLOCK_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrclockwidgets/inc/snsrstyleoptionoledanalogclock.h --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrclockwidgets/inc/snsrstyleoptionoledanalogclock.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Style option for oled analog clock widget. -* -*/ - -#ifndef SNSRSTYLEOPTIONOLEDANALOGCLOCK_H -#define SNSRSTYLEOPTIONOLEDANALOGCLOCK_H - -#include - -class SnsrStyleOptionOledAnalogClock : public HbStyleOption -{ - -public: - - enum ItemIndex - { - BackgroundItemIndex = 0, - HourHandItemIndex, - MinuteHandItemIndex, - DateFrameItemIndex, - DateLabelItemIndex, - LastItemIndex - }; - -public: - SnsrStyleOptionOledAnalogClock(); - SnsrStyleOptionOledAnalogClock(const SnsrStyleOptionOledAnalogClock &other); - ~SnsrStyleOptionOledAnalogClock(); - - enum StyleOptionType { Type = HbSO_Widget+1000}; - enum StyleOptionVersion { Version = 1 }; - - qreal mM; - qreal mH; - QString mShortDate; -}; - -#endif // SNSRSTYLEOPTIONOLEDANALOGCLOCK_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrclockwidgets/src/snsranalogclockwidget.cpp --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrclockwidgets/src/snsranalogclockwidget.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,129 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Analog Clock Widget. -* -*/ - -#include "snsranalogclockwidget.h" - -#include -#include - -#include "snsrstyleoptionanalogclock.h" - -#ifdef Q_OS_SYMBIAN -const char *gAnalogClockPluginPath("../../snsrresources/plugins/snsrstyleplugins/snsranalogclockstyleplugin.dll"); -#else -const char *gAnalogClockPluginPath("snsrresources/plugins/snsrstyleplugins/snsranalogclockstyleplugin.dll"); -#endif - -/*! - \class SnsrAnalogClockWidget - \ingroup group_snsrbigclockscreensaverprovider - \brief Screensaver analog clock widget. - */ - -/*! - Constructs a new SnsrAnalogClockWidget. - \param stylePluginPath Style plugin path. - \param parent Parent object. - */ -SnsrAnalogClockWidget::SnsrAnalogClockWidget(QGraphicsItem* parent): - HbWidget(parent), mStylePluginName(gAnalogClockPluginPath), - mClockBackground(0), mClockHourHand(0), mClockMinuteHand(0) -{ - setPluginBaseId(style()->registerPlugin(mStylePluginName)); - - createPrimitives(); - updatePrimitives(); -} - -/*! - Destructs the class. - */ -SnsrAnalogClockWidget::~SnsrAnalogClockWidget() -{ - delete mClockBackground; - delete mClockHourHand; - delete mClockMinuteHand; - - style()->unregisterPlugin(mStylePluginName); -} - -/*! - @copydoc HbWidget::resizeEvent() - */ -void SnsrAnalogClockWidget::resizeEvent(QGraphicsSceneResizeEvent *event) -{ - QGraphicsWidget::resizeEvent(event); - updatePrimitives(); -} - -/*! - Creates all widget primitives. - */ -void SnsrAnalogClockWidget::createPrimitives() -{ - if (pluginBaseId()==-1) { - return; - } - if (!mClockBackground) { - mClockBackground = style()->createPrimitive((HbStyle::Primitive)(pluginBaseId()), this); - } - if (!mClockHourHand) { - mClockHourHand = style()->createPrimitive((HbStyle::Primitive)(pluginBaseId()+SnsrStyleOptionAnalogClock::HourHandItemIndex), this); - } - if (!mClockMinuteHand) { - mClockMinuteHand = style()->createPrimitive((HbStyle::Primitive)(pluginBaseId()+SnsrStyleOptionAnalogClock::MinuteHandItemIndex), this); - } -} - -/*! - @copydoc HbWidget::updatePrimitives() - */ -void SnsrAnalogClockWidget::updatePrimitives() -{ - if (pluginBaseId()==-1) { - return; - } - - // Calculate angles for clock hands. - QTime time = QTime::currentTime(); - qreal s = 6 * time.second(); - qreal m = 6 * (time.minute() + s/360); - qreal h = 30 * ((time.hour() % 12) + m/360); - - SnsrStyleOptionAnalogClock option; - initStyleOption(&option); - option.mM = m; - option.mH = h; - - if (mClockBackground) { - style()->updatePrimitive(mClockBackground, (HbStyle::Primitive)(pluginBaseId()), &option); - } - if (mClockHourHand) { - style()->updatePrimitive(mClockHourHand, (HbStyle::Primitive)(pluginBaseId()+SnsrStyleOptionAnalogClock::HourHandItemIndex), &option); - } - if (mClockMinuteHand) { - style()->updatePrimitive(mClockMinuteHand, (HbStyle::Primitive)(pluginBaseId()+SnsrStyleOptionAnalogClock::MinuteHandItemIndex), &option); - } -} - -/*! - Updates primitives when time change. - */ -void SnsrAnalogClockWidget::tick() -{ - updatePrimitives(); -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrclockwidgets/src/snsroledclockwidget.cpp --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrclockwidgets/src/snsroledclockwidget.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,147 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Oled Clock Widget. -* -*/ - -#include "snsroledclockwidget.h" - -#include -#include - -#include "snsrstyleoptionoledanalogclock.h" - -#ifdef Q_OS_SYMBIAN -const char *gOledClockPluginPath("../../snsrresources/plugins/snsrstyleplugins/snsroledclockstyleplugin.dll"); -#else -const char *gOledClockPluginPath("snsrresources/plugins/snsrstyleplugins/snsroledclockstyleplugin.dll"); -#endif - -/*! - \class SnsrOledClockWidget - \ingroup group_snsrbigclockscreensaverprovider - \brief Screensaver oled clock widget. - */ - -/*! - Constructs a new SnsrOledClockWidget. - \param stylePluginPath Style plugin path. - \param parent Parent object. - */ -SnsrOledClockWidget::SnsrOledClockWidget(QGraphicsItem* parent): - HbWidget(parent), mStylePluginName(gOledClockPluginPath), - mClockBackground(0), mClockHourHand(0), mClockMinuteHand(0), - mClockDateFrame(0), mClockDateLabel(0) -{ - setPluginBaseId(style()->registerPlugin(mStylePluginName)); - - createPrimitives(); - updatePrimitives(); -} - -/*! - Destructs the class. - */ -SnsrOledClockWidget::~SnsrOledClockWidget() -{ - delete mClockBackground; - delete mClockHourHand; - delete mClockMinuteHand; - delete mClockDateFrame; - delete mClockDateLabel; - - style()->unregisterPlugin(mStylePluginName); -} - -/*! - @copydoc HbWidget::resizeEvent() - */ -void SnsrOledClockWidget::resizeEvent(QGraphicsSceneResizeEvent *event) -{ - QGraphicsWidget::resizeEvent(event); - updatePrimitives(); -} - -/*! - Creates all widget primitives. - */ -void SnsrOledClockWidget::createPrimitives() -{ - if (pluginBaseId()==-1) { - return; - } - if (!mClockBackground) { - mClockBackground = style()->createPrimitive((HbStyle::Primitive)(pluginBaseId()), this); - } - if (!mClockHourHand) { - mClockHourHand = style()->createPrimitive((HbStyle::Primitive)(pluginBaseId()+SnsrStyleOptionOledAnalogClock::HourHandItemIndex), this); - } - if (!mClockMinuteHand) { - mClockMinuteHand = style()->createPrimitive((HbStyle::Primitive)(pluginBaseId()+SnsrStyleOptionOledAnalogClock::MinuteHandItemIndex), this); - } - if (!mClockDateFrame) { - mClockDateFrame = style()->createPrimitive((HbStyle::Primitive)(pluginBaseId()+SnsrStyleOptionOledAnalogClock::DateFrameItemIndex), this); - } - if (!mClockDateLabel) { - mClockDateLabel = style()->createPrimitive((HbStyle::Primitive)(pluginBaseId()+SnsrStyleOptionOledAnalogClock::DateLabelItemIndex), this); - } -} - -/*! - @copydoc HbWidget::updatePrimitives() - */ -void SnsrOledClockWidget::updatePrimitives() -{ - if (pluginBaseId()==-1) { - return; - } - - // Calculate angles for clock hands. - QTime time = QTime::currentTime(); - qreal s = 6 * time.second(); - qreal m = 6 * (time.minute() + s/360); - qreal h = 30 * ((time.hour() % 12) + m/360); - - SnsrStyleOptionOledAnalogClock option; - initStyleOption(&option); - option.mM = m; - option.mH = h; - - QDate currentdate = QDate::currentDate(); - option.mShortDate = QDate::shortDayName(currentdate.dayOfWeek())+" "+QString::number(currentdate.day()); - - if (mClockBackground) { - style()->updatePrimitive(mClockBackground, (HbStyle::Primitive)(pluginBaseId()), &option); - } - if (mClockHourHand) { - style()->updatePrimitive(mClockHourHand, (HbStyle::Primitive)(pluginBaseId()+SnsrStyleOptionOledAnalogClock::HourHandItemIndex), &option); - } - if (mClockMinuteHand) { - style()->updatePrimitive(mClockMinuteHand, (HbStyle::Primitive)(pluginBaseId()+SnsrStyleOptionOledAnalogClock::MinuteHandItemIndex), &option); - } - if (mClockDateFrame) { - style()->updatePrimitive(mClockDateFrame, (HbStyle::Primitive)(pluginBaseId()+SnsrStyleOptionOledAnalogClock::DateFrameItemIndex), &option); - } - if (mClockDateLabel) { - style()->updatePrimitive(mClockDateLabel, (HbStyle::Primitive)(pluginBaseId()+SnsrStyleOptionOledAnalogClock::DateLabelItemIndex), &option); - } -} - -/*! - Updates primitives when time change. - */ -void SnsrOledClockWidget::tick() -{ - updatePrimitives(); -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrclockwidgets/src/snsrstyleoptionanalogclock.cpp --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrclockwidgets/src/snsrstyleoptionanalogclock.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Style option for analog clock widget. -* -*/ - -#include "snsrstyleoptionanalogclock.h" - -/*! - \class SnsrStyleOptionAnalogClock - \ingroup group_snsrbigclockscreensaverprovider - \brief Style option for analog clock widget. - */ - -/*! - Constructs a new SnsrStyleOptionAnalogClock. - */ -SnsrStyleOptionAnalogClock::SnsrStyleOptionAnalogClock(): - HbStyleOption(), mM(0), mH(0) -{ - type = Type; - version = Version; -} - -/*! - Copy constructor - constructs a new SnsrStyleOptionAnalogClock. - */ -SnsrStyleOptionAnalogClock::SnsrStyleOptionAnalogClock(const SnsrStyleOptionAnalogClock &other) : - HbStyleOption(other), mM(other.mM), mH(other.mH) -{ - type = Type; - version = Version; -} - -/*! - Destructs the class. - */ -SnsrStyleOptionAnalogClock::~SnsrStyleOptionAnalogClock() -{ -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrclockwidgets/src/snsrstyleoptionoledanalogclock.cpp --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrclockwidgets/src/snsrstyleoptionoledanalogclock.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Style option for oled analog clock widget. -* -*/ - -#include "snsrstyleoptionoledanalogclock.h" - -/*! - \class SnsrStyleOptionOledAnalogClock - \ingroup group_snsrbigclockscreensaverprovider - \brief Style option for analog clock widget. - */ - -/*! - Constructs a new SnsrStyleOptionOledAnalogClock. - */ -SnsrStyleOptionOledAnalogClock::SnsrStyleOptionOledAnalogClock(): - HbStyleOption(), mM(0), mH(0), mShortDate(QString()) -{ - type = Type; - version = Version; -} - -/*! - Copy constructor - constructs a new SnsrStyleOptionOledAnalogClock. - */ -SnsrStyleOptionOledAnalogClock::SnsrStyleOptionOledAnalogClock(const SnsrStyleOptionOledAnalogClock &other) : - HbStyleOption(other), mM(other.mM), mH(other.mH), mShortDate(other.mShortDate) -{ - type = Type; - version = Version; -} - -/*! - Destructs the class. - */ -SnsrStyleOptionOledAnalogClock::~SnsrStyleOptionOledAnalogClock() -{ -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsroledclockstyleplugin/inc/snsroledclockstyleplugin.h --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsroledclockstyleplugin/inc/snsroledclockstyleplugin.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Analog clock style plugin. -* -*/ - -#ifndef SNSROLEDCLOCKSTYLEPLUGIN_H -#define SNSROLEDCLOCKSTYLEPLUGIN_H - -#include - -#include -#include - -#include "snsrtest_global.h" - -SCREENSAVER_TEST_CLASS(T_SnsrOCStylePlugin) - -class SnsrOledClockStylePlugin: public QObject, public HbStyleInterface -{ - Q_OBJECT - Q_INTERFACES(HbStyleInterface) - -public: - int primitiveCount() const; - HbWidgetBase *createPrimitive(HbStyle::Primitive primitive, QGraphicsItem *parent = 0) const; - void updatePrimitive(QGraphicsItem *item, HbStyle::Primitive primitive, const QStyleOption *option) const; - QString layoutPath() const; - - SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrOCStylePlugin) - -}; - -#endif // SNSROLEDCLOCKSTYLEPLUGIN_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsroledclockstyleplugin/resource/snsroledclockstyleplugin.manifest --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsroledclockstyleplugin/resource/snsroledclockstyleplugin.manifest Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ - - - - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsroledclockstyleplugin/resource/snsroledclockwidget.css --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsroledclockstyleplugin/resource/snsroledclockwidget.css Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -HbWidget { - margin-left: 0un; - margin-top: 0un; -} - -SnsrOledClockWidget { - layout: layout_1; -} - -SnsrOledClockWidget::oled_clock_background { - pref-width: 40.0un; - pref-height: 40.0un; -} - -SnsrOledClockWidget::oled_clock_hour_hand { - pref-height: 28.0un; -} - -SnsrOledClockWidget::oled_clock_minute_hand { - pref-height: 34.0un; -} - -SnsrOledClockWidget::oled_clock_date_frame { - pref-height: 10.0un; -} - -SnsrOledClockWidget::oled_clock_date_label { - pref-height: 10.0un; -} \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsroledclockstyleplugin/resource/snsroledclockwidget.widgetml --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsroledclockstyleplugin/resource/snsroledclockwidget.widgetml Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsroledclockstyleplugin/snsroledclockstyleplugin.pri --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsroledclockstyleplugin/snsroledclockstyleplugin.pri Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: snsroledclockstyleplugin.pri -# - -HEADERS += ./inc/*.h \ - ./../snsrclockwidgets/inc/snsrstyleoptionoledanalogclock.h - -SOURCES += ./src/*.cpp - -DEPENDPATH += ./inc \ - ./src \ - ./resource - -INCLUDEPATH += ./inc \ - ./../snsrclockwidgets/inc diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsroledclockstyleplugin/snsroledclockstyleplugin.pro --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsroledclockstyleplugin/snsroledclockstyleplugin.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: snsroledclockstyleplugin.pro -# - -TEMPLATE = lib - -CONFIG += plugin hb -PLUGIN_SUBDIR = /snsrresources/plugins/snsrstyleplugins - -include (../../../common.pri) - -LIBS += -lsnsrutils - -INCLUDEPATH += ../../../snsrutils/inc - -symbian: { - TARGET.UID3 = 0x20027055 -} - -include(snsroledclockstyleplugin.pri) - -RESOURCES += snsroledclockstyleplugin.qrc diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsroledclockstyleplugin/snsroledclockstyleplugin.qrc --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsroledclockstyleplugin/snsroledclockstyleplugin.qrc Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - resource/snsroledclockwidget.css - resource/snsroledclockwidget.widgetml - - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsroledclockstyleplugin/src/snsroledclockstyleplugin.cpp --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsroledclockstyleplugin/src/snsroledclockstyleplugin.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,124 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Analog clock style plugin. -* -*/ - -#include "snsroledclockstyleplugin.h" - -#include - -#include - -#include "snsrstyleoptionoledanalogclock.h" -#include "snsrlabel.h" - -/*! - \class SnsrOledClockStylePlugin - \ingroup group_snsrbigclockscreensaverprovider - \brief Screensaver oled clock style plugin. - */ - -/*! - @copydoc HbStyleInterface::primitiveCount() - */ -int SnsrOledClockStylePlugin::primitiveCount() const -{ - return SnsrStyleOptionOledAnalogClock::LastItemIndex; // first index = 0, index of LastItemIndex = number of primitives; -} - -/*! - @copydoc HbStyleInterface::createPrimitive() - */ -HbWidgetBase* SnsrOledClockStylePlugin::createPrimitive(HbStyle::Primitive primitive, - QGraphicsItem *parent) const -{ - if (primitive == (int)SnsrStyleOptionOledAnalogClock::BackgroundItemIndex) { - HbIconItem *item = new HbIconItem("oled-clock-background", parent); - HbStyle::setItemName(item, "oled_clock_background"); - item->setZValue(1); - return item; - } - else if (primitive == (int)SnsrStyleOptionOledAnalogClock::DateFrameItemIndex) { - HbIconItem *item = new HbIconItem("oled-clock-date-frame", parent); - HbStyle::setItemName(item, "oled_clock_date_frame"); - item->setZValue(2); - return item; - } - else if (primitive == (int)SnsrStyleOptionOledAnalogClock::DateLabelItemIndex) { - SnsrLabel *item = new SnsrLabel(parent); - HbStyle::setItemName(item, "oled_clock_date_label"); - item->setZValue(3); - return item; - } - else if (primitive == (int)SnsrStyleOptionOledAnalogClock::HourHandItemIndex) { - HbIconItem *item = new HbIconItem("oled-clock-hour-hand", parent); - HbStyle::setItemName(item, "oled_clock_hour_hand"); - item->setZValue(4); - return item; - } - else if (primitive == (int)SnsrStyleOptionOledAnalogClock::MinuteHandItemIndex) { - HbIconItem *item = new HbIconItem("oled-clock-minute-hand", parent); - HbStyle::setItemName(item, "oled_clock_minute_hand"); - item->setZValue(5); - return item; - } - - return 0; -} - -/*! - @copydoc HbStyleInterface::updatePrimitive() - */ -void SnsrOledClockStylePlugin::updatePrimitive(QGraphicsItem *item, - HbStyle::Primitive primitive, - const QStyleOption *option ) const -{ - const SnsrStyleOptionOledAnalogClock *opt = - qstyleoption_cast(option); - if (!opt || !item) { - return; - } - - if (primitive == (int)SnsrStyleOptionOledAnalogClock::HourHandItemIndex) { - HbIconItem *iconItem = static_cast(item); - int x = iconItem->iconItemSize().width()/2; - int y = iconItem->iconItemSize().height()/2; - - iconItem->setTransform(QTransform().translate(x, y).rotate(opt->mH).translate(-x, -y)); - } - else if (primitive == (int)SnsrStyleOptionOledAnalogClock::MinuteHandItemIndex) { - HbIconItem *iconItem = static_cast(item); - int x = iconItem->iconItemSize().width()/2; - int y = iconItem->iconItemSize().height()/2; - - iconItem->setTransform(QTransform().translate(x, y).rotate(opt->mM).translate(-x, -y)); - } - else if (primitive == (int)SnsrStyleOptionOledAnalogClock::DateLabelItemIndex) { - HbLabel *dateLabel = static_cast(item); - dateLabel->setPlainText(opt->mShortDate); - } -} - -/*! - @copydoc HbStyleInterface::layoutPath() - */ -QString SnsrOledClockStylePlugin::layoutPath() const -{ - return QString(":/"); -} - -#ifndef COVERAGE_MEASUREMENT -Q_EXPORT_PLUGIN2(snsroledclockstyleplugin, SnsrOledClockStylePlugin) -#endif //COVERAGE_MEASUREMENT diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/src/snsranalogclockcontainer.cpp --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/src/snsranalogclockcontainer.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,144 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Container for analog clock. -* -*/ - -#include "snsranalogclockcontainer.h" - -#include -#include -#include - -#include -#include - -#include "snsranalogclockwidget.h" - -/*! - \class SnsrAnalogClockContainer - \ingroup group_snsrbigclockscreensaverprovider - \brief Container used for preparing layout for analog clock. - */ - -const char *gAnalogLayoutDocml = ":/xml/snsrbigclockscreensaveranalog.docml"; - -const char *gPortraitSectionName = "portrait"; -const char *gLandscapeSectionName = "landscape"; - -const char *gMainViewName = "view"; - -const char *gDateLabelName = "dateLabel"; -const char *gAnalogClockWidgetName = "analogClockWidget"; - -const char *gDateFormatVerticalStr = "%E%,% %*D%*N%/0%4%/1%5"; -const char *gDateFormatHorizontalStr = "%E%,% %*D%N%/0%4%/1%5"; - -/*! - Constructs a new SnsrAnalogClockContainer. - */ -SnsrAnalogClockContainer::SnsrAnalogClockContainer() : - SnsrBigClockContainer(), - mDateLabel(0), - mAnalogClockWidget(0) -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrAnalogClockContainer::SnsrAnalogClockContainer") - - bool ok(true); - - // load analog clock - qDebug() << gAnalogLayoutDocml; - mDocumentObjects = mDocumentLoader.load(gAnalogLayoutDocml, &ok); - Q_ASSERT_X(ok, gAnalogLayoutDocml, "Invalid DocML file."); - if (ok) { - mMainContainer = mDocumentLoader.findWidget(gMainViewName); - mDateLabel = qobject_cast( - mDocumentLoader.findWidget(gDateLabelName)); - mAnalogClockWidget = qobject_cast( - mDocumentLoader.findWidget(gAnalogClockWidgetName)); - Q_ASSERT_X( - mMainContainer && mDateLabel && mAnalogClockWidget, - gAnalogLayoutDocml, "Objects not found in DocML file." - ); - - mBackgroundContainerLayout->addItem(mMainContainer); - } - - SCREENSAVER_TEST_FUNC_EXIT("SnsrAnalogClockContainer::SnsrAnalogClockContainer") -} - -/*! - Destructs the class. - */ -SnsrAnalogClockContainer::~SnsrAnalogClockContainer() -{ - //mDateLabel, mAnalogClockWidget - deleted by the parent -} - -/*! - Updates displayed time and date. - */ -void SnsrAnalogClockContainer::update() -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrAnalogClockContainer::update") - - // time - mAnalogClockWidget->tick(); - - // date - if (mCurrentOrientation == Qt::Vertical) { - mDateLabel->setPlainText( - HbExtendedLocale().format(QDate::currentDate(), gDateFormatVerticalStr) - ); - } else { - mDateLabel->setPlainText( - HbExtendedLocale().format(QDate::currentDate(), gDateFormatHorizontalStr) - ); - } - - SCREENSAVER_TEST_FUNC_EXIT("SnsrAnalogClockContainer::update") -} - -/*! - Changes screensaver layout basing on orientation changes. - \param orientation Current orientation. - */ -void SnsrAnalogClockContainer::changeLayout(Qt::Orientation orientation) -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrAnalogClockContainer::changeLayout") - - if (mCurrentOrientation != orientation) { - mCurrentOrientation = orientation; - bool ok; - // hide controls to avoid screen flickering - mMainContainer->hide(); - - QString sectionToLoad(""); - if (mCurrentOrientation == Qt::Vertical) { - sectionToLoad = gPortraitSectionName; - } else { - sectionToLoad = gLandscapeSectionName; - } - qDebug() << "loading: " << gAnalogLayoutDocml << ", section: " << sectionToLoad; - mDocumentLoader.load(gAnalogLayoutDocml, sectionToLoad, &ok); - // view is rebuilt and ready to show - mMainContainer->show(); - Q_ASSERT_X(ok, gAnalogLayoutDocml, "Invalid section in DocML file."); - } - // update anyway - this is needed in situations when screensaver goes to - // foreground but layout change did not occur - update(); - - SCREENSAVER_TEST_FUNC_EXIT("SnsrAnalogClockContainer::changeLayout") -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/src/snsrbigclockcontainer.cpp --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/src/snsrbigclockcontainer.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,130 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Base class container. -* -*/ - -#include "snsrbigclockcontainer.h" - -#ifdef Q_OS_SYMBIAN -#include -#endif // Q_OS_SYMBIAN - -#include -#include -#include - -#include -#include - -#include "snsrbigclockcontainer.h" - -/*! - \class SnsrBigClockContainer - \ingroup group_snsrbigclockscreensaverprovider - \brief Base class. Container used for drawing background and for preparing layout. - */ - -const QString popupBackgroundColorRole("popupbackground"); -const QString snsrBackgroundColorRole("snsrbackground"); - -/*! - Constructs a new SnsrBigClockContainer. - */ -SnsrBigClockContainer::SnsrBigClockContainer() : - mMainContainer(0), - mBackgroundContainerLayout(0), - mCurrentOrientation(-1) -{ - setBackgroundColor(); - mBackgroundContainerLayout = new QGraphicsLinearLayout(Qt::Vertical); - setLayout(mBackgroundContainerLayout); -} - -/*! - Destructs the class. - */ -SnsrBigClockContainer::~SnsrBigClockContainer() -{ - mDocumentLoader.reset(); - qDeleteAll(mDocumentObjects); - mDocumentObjects.clear(); - - //mMainContainer, mBackgroundContainerLayout - deleted by the parent -} - -/*! - \fn virtual void update() = 0; - - Slot for members update in container e.g. when time or date changed. - */ - -/*! - \fn virtual void changeLayout(Qt::Orientation orientation) = 0; - - Slot for members update in container when orientation changed. - */ - -/*! - \reimp - */ -void SnsrBigClockContainer::changeEvent(QEvent *event) -{ - if (event->type() == HbEvent::ThemeChanged) { - setBackgroundColor(); - } - return QGraphicsWidget::changeEvent(event); -} - -/*! - Set background color. - */ -void SnsrBigClockContainer::setBackgroundColor() -{ - QColor backgroundColor = HbColorScheme::color(snsrBackgroundColorRole); - if (backgroundColor.isValid()) { - mBackgroundColor = backgroundColor; - } - else { - backgroundColor = HbColorScheme::color(popupBackgroundColorRole); - if (backgroundColor.isValid()) { - mBackgroundColor = backgroundColor; - } - else { - mBackgroundColor = Qt::black; - } - } -} - -/*! - Paints the contents of an item in local coordinates. - */ -#ifdef COVERAGE_MEASUREMENT -#pragma CTC SKIP -#endif //COVERAGE_MEASUREMENT -void SnsrBigClockContainer::paint( - QPainter *painter, - const QStyleOptionGraphicsItem *option, - QWidget *widget - ) -{ - Q_UNUSED(option) - Q_UNUSED(widget) - - painter->fillRect(rect(), mBackgroundColor); -} -#ifdef COVERAGE_MEASUREMENT -#pragma CTC ENDSKIP -#endif //COVERAGE_MEASUREMENT - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/src/snsrbigclockscreensaver.cpp --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/src/snsrbigclockscreensaver.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,237 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Big clock Screensaver. -* -*/ - -#include "snsrbigclockscreensaver.h" - -#ifdef Q_OS_SYMBIAN -#include -#endif // Q_OS_SYMBIAN - -#include -#include -#include - -#include -#include - -#include "snsranalogclockcontainer.h" -#include "snsrdigitalclockcontainer.h" -#include "snsroledanalogclockcontainer.h" -#include "snsroleddigitalclockcontainer.h" - -/*! - \class SnsrBigClockScreensaver - \ingroup group_snsrbigclockscreensaverprovider - \brief Screensaver with big digital clock. - */ - -/*! - Constructs a new SnsrBigClockScreensaver. - */ -SnsrBigClockScreensaver::SnsrBigClockScreensaver() : - mMainWindow(0), - mCurrentContainer(0) -{ - mMainWindow = HbInstance::instance()->allMainWindows().at(0); - // for nice looking clock hand transformations - mMainWindow->setRenderHint(QPainter::SmoothPixmapTransform); -} - -/*! - Destructs the class. - */ -SnsrBigClockScreensaver::~SnsrBigClockScreensaver() -{ - // mCurrentContainer - deleted by the parent -} - -/*! - @copydoc Screensaver::onInitialize() -*/ -bool SnsrBigClockScreensaver::onInitialize() -{ - qDebug() << "SnsrBigClockScreensaver::onInitialize()"; - return true; -} - -/*! - @copydoc Screensaver::onForeground() - */ -bool SnsrBigClockScreensaver::onForeground() -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrBigClockScreensaver::onForeground") - qDebug() << "SnsrBigClockScreensaver::onForeground()"; - - bool ret(false); - - if (mCurrentContainer) { - disconnect( - mMainWindow, SIGNAL(orientationChanged(Qt::Orientation)), - mCurrentContainer, SLOT(changeLayout(Qt::Orientation)) - ); - disconnect( - &mTimer, SIGNAL(timeout()), - mCurrentContainer, SLOT(update()) - ); - emit viewChanged(0); - delete mCurrentContainer; - mCurrentContainer = 0; - } - - if (clockFormat() == ClockFormatAnalog) { - mCurrentContainer = new SnsrAnalogClockContainer(); - } - else { - mCurrentContainer = new SnsrDigitalClockContainer(); - } - connect( - mMainWindow, SIGNAL(orientationChanged(Qt::Orientation)), - mCurrentContainer, SLOT(changeLayout(Qt::Orientation)) - ); - connect(&mTimer, SIGNAL(timeout()), mCurrentContainer, SLOT(update())); - - mCurrentContainer->changeLayout(mMainWindow->orientation()); - mTimer.start(1000); - emit viewChanged(mCurrentContainer); - - ret = true; - - SCREENSAVER_TEST_FUNC_EXIT("SnsrBigClockScreensaver::onForeground") - return ret; -} - -/*! - @copydoc Screensaver::onPartialForeground() - */ -bool SnsrBigClockScreensaver::onPartialForeground() -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrBigClockScreensaver::onPartialForeground") - qDebug() << "SnsrBigClockScreensaver::onPartialForeground()"; - - bool ret(false); - - if (mCurrentContainer) { - disconnect( - mMainWindow, SIGNAL(orientationChanged(Qt::Orientation)), - mCurrentContainer, SLOT(changeLayout(Qt::Orientation)) - ); - disconnect( - &mTimer, SIGNAL(timeout()), - mCurrentContainer, SLOT(update()) - ); - emit viewChanged(0); - delete mCurrentContainer; - mCurrentContainer = 0; - } - - if (clockFormat() == ClockFormatAnalog) { - mCurrentContainer = new SnsrOledAnalogClockContainer(); - } - else { - mCurrentContainer = new SnsrOledDigitalClockContainer(); - } - connect( - mMainWindow, SIGNAL(orientationChanged(Qt::Orientation)), - mCurrentContainer, SLOT(changeLayout(Qt::Orientation)) - ); - connect(&mTimer, SIGNAL(timeout()), mCurrentContainer, SLOT(update())); - - mCurrentContainer->changeLayout(mMainWindow->orientation()); - mTimer.start(1000); - emit viewChanged(mCurrentContainer); - - ret = true; - - SCREENSAVER_TEST_FUNC_EXIT("SnsrBigClockScreensaver::onPartialForeground") - return ret; -} - -/*! - @copydoc Screensaver::onBackground() - */ -bool SnsrBigClockScreensaver::onBackground() -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrBigClockScreensaver::onBackground") - qDebug() << "SnsrBigClockScreensaver::onBackground()"; - - disconnect( - mMainWindow, SIGNAL(orientationChanged(Qt::Orientation)), - mCurrentContainer, SLOT(changeLayout(Qt::Orientation)) - ); - disconnect( - &mTimer, SIGNAL(timeout()), - mCurrentContainer, SLOT(update()) - ); - mTimer.stop(); - emit viewChanged(0); - - SCREENSAVER_TEST_FUNC_EXIT("SnsrBigClockScreensaver::onBackground") - return true; -} - -/*! - @copydoc Screensaver::onPowerSave() - */ -bool SnsrBigClockScreensaver::onPowerSave() -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrBigClockScreensaver::onPowerSave") - qDebug() << "SnsrBigClockScreensaver::onPowerSave()"; - - SCREENSAVER_TEST_FUNC_EXIT("SnsrBigClockScreensaver::onPowerSave") - return false; -} - -/*! - @copydoc Screensaver::onClose() - */ -bool SnsrBigClockScreensaver::onClose() -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrBigClockScreensaver::onClose") - qDebug() << "SnsrBigClockScreensaver::onClose()"; - - bool ret(false); - if (onBackground()) { - delete mCurrentContainer; - mCurrentContainer = 0; - ret = true; - } - - SCREENSAVER_TEST_FUNC_EXIT("SnsrBigClockScreensaver::onClose") - return ret; -} - -/*! - Determines the curent clock format settings. - \retval ClockFormat. - */ -SnsrBigClockScreensaver::ClockFormat SnsrBigClockScreensaver::clockFormat() -{ -#ifdef Q_OS_SYMBIAN - if (TLocale().ClockFormat() == EClockAnalog) { - return ClockFormatAnalog; - } else { - return ClockFormatDigital; - } -#else - // windows build - change the format every 30 seconds for testing purposes - if (QTime::currentTime().second() < 30) { - return ClockFormatAnalog; - } else { - return ClockFormatDigital; - } -#endif // Q_OS_SYMBIAN -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/src/snsrbigclockscreensaverprovider.cpp --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/src/snsrbigclockscreensaverprovider.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Big clock Screensaver provider. -* -*/ - -#include "snsrbigclockscreensaverprovider.h" - -#include "snsrbigclockscreensaver.h" - -/*! - \class SnsrBigClockScreensaverProvider - \ingroup group_snsrbigclockscreensaverprovider - \brief Screensaver big clock screensaver provider collects ready-made screensaver clock. - */ - -/*! - Constructs a new SnsrBigClockScreensaverProvider. - */ -SnsrBigClockScreensaverProvider::SnsrBigClockScreensaverProvider() -{ - mClockScreensaverToken.mLibrary = - QString("snsrbigclockscreensaverprovider.dll"); - mClockScreensaverToken.mUri = - QString("screensaver.nokia.com/screensaver/bigclock"); -} - -/*! - Destructs the class. - */ -SnsrBigClockScreensaverProvider::~SnsrBigClockScreensaverProvider() -{ -} - -/*! - Returns list of loadable screensavers' tokens. - \return ScreensaverToken info about loadable screensavers. - */ -QList SnsrBigClockScreensaverProvider::screensavers() -{ - return QList() << mClockScreensaverToken; -} - -/*! - Creates a screensaver based to given token. - \param token Reference to ScreensaverToken. - */ -Screensaver *SnsrBigClockScreensaverProvider:: - createScreensaver(const ScreensaverToken &token) -{ - if (token.mLibrary == mClockScreensaverToken.mLibrary && - token.mUri == mClockScreensaverToken.mUri) { - return new SnsrBigClockScreensaver(); - } - return 0; -} - -#ifndef COVERAGE_MEASUREMENT -Q_EXPORT_PLUGIN2(snsrbigclockscreensaverprovider, SnsrBigClockScreensaverProvider) -#endif //COVERAGE_MEASUREMENT diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/src/snsrdigitalclockcontainer.cpp --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/src/snsrdigitalclockcontainer.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,154 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Container for digital clock. -* -*/ - -#include "snsrdigitalclockcontainer.h" - -#include -#include -#include - -#include -#include - -/*! - \class SnsrDigitalClockContainer - \ingroup group_snsrbigclockscreensaverprovider - \brief Container used for preparing layout for digital clock. - */ - -const char *gDigitalLayoutDocml = ":/xml/snsrbigclockscreensaverdigital.docml"; -extern const char *gPortraitSectionName; -extern const char *gLandscapeSectionName; - -extern const char *gMainViewName; - -const char *gTimeLabelName = "timeLabel"; -const char *gAmPmLabelName = "amPmLabel"; -extern const char *gDateLabelName; - -extern const char *gDateFormatVerticalStr; -extern const char *gDateFormatHorizontalStr; - -const char *gTimeFormatStr = "%:0%J%:1%T%:3"; -const char *gAmPmFormatStr = "%B"; - -/*! - Constructs a new SnsrDigitalClockContainer. - */ -SnsrDigitalClockContainer::SnsrDigitalClockContainer() : - SnsrBigClockContainer(), - mTimeLabel(0), - mAmPmLabel(0), - mDateLabel(0) -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrDigitalClockContainer::SnsrDigitalClockContainer") - - bool ok(true); - - // load digital clock - qDebug() << gDigitalLayoutDocml; - mDocumentObjects = mDocumentLoader.load(gDigitalLayoutDocml, &ok); - Q_ASSERT_X(ok, gDigitalLayoutDocml, "Invalid DocML file."); - - if (ok) { - mMainContainer = mDocumentLoader.findWidget(gMainViewName); - mDateLabel = qobject_cast( - mDocumentLoader.findWidget(gDateLabelName)); - mTimeLabel = qobject_cast( - mDocumentLoader.findWidget(gTimeLabelName)); - mAmPmLabel = qobject_cast( - mDocumentLoader.findWidget(gAmPmLabelName)); - Q_ASSERT_X( - mMainContainer && mDateLabel && mTimeLabel && mAmPmLabel, - gDigitalLayoutDocml, "Objects not found in DocML file." - ); - - mBackgroundContainerLayout->addItem(mMainContainer); - } - - SCREENSAVER_TEST_FUNC_EXIT("SnsrDigitalClockContainer::SnsrDigitalClockContainer") -} - -/*! - Destructs the class. - */ -SnsrDigitalClockContainer::~SnsrDigitalClockContainer() -{ - //mTimeLabel, mAmPmLabel, mDateLabel - deleted by the parent -} - -/*! - Updates displayed time and date. - */ -void SnsrDigitalClockContainer::update() -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrDigitalClockContainer::update") - - // time - mTimeLabel->setPlainText( - HbExtendedLocale().format(QTime::currentTime(), gTimeFormatStr) - ); - mAmPmLabel->setPlainText( - HbExtendedLocale().format(QTime::currentTime(), gAmPmFormatStr) - ); - - // date - if (mCurrentOrientation == Qt::Vertical) { - mDateLabel->setPlainText( - HbExtendedLocale().format(QDate::currentDate(), gDateFormatVerticalStr) - ); - } else { - mDateLabel->setPlainText( - HbExtendedLocale().format(QDate::currentDate(), gDateFormatHorizontalStr) - ); - } - - SCREENSAVER_TEST_FUNC_EXIT("SnsrDigitalClockContainer::update") -} - -/*! - Changes screensaver layout basing on orientation changes. - \param orientation Current orientation. - */ -void SnsrDigitalClockContainer::changeLayout(Qt::Orientation orientation) -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrDigitalClockContainer::changeLayout") - - if (mCurrentOrientation != orientation) { - mCurrentOrientation = orientation; - bool ok; - // hide controls to avoid screen flickering - mMainContainer->hide(); - - QString sectionToLoad(""); - if (mCurrentOrientation == Qt::Vertical) { - sectionToLoad = gPortraitSectionName; - } else { - sectionToLoad = gLandscapeSectionName; - } - qDebug() << "loading: " << gDigitalLayoutDocml << ", section: " << sectionToLoad; - mDocumentLoader.load(gDigitalLayoutDocml, sectionToLoad, &ok); - // view is rebuilt and ready to show - mMainContainer->show(); - Q_ASSERT_X(ok, gDigitalLayoutDocml, "Invalid section in DocML file."); - } - // update anyway - this is needed in situations when screensaver goes to - // foreground but layout change did not occur - update(); - - SCREENSAVER_TEST_FUNC_EXIT("SnsrDigitalClockContainer::changeLayout") -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/src/snsrdocumentloader.cpp --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/src/snsrdocumentloader.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Screensaver custom document loader. -* -*/ - -#include "snsrdocumentloader.h" - -#include "snsranalogclockwidget.h" -#include "snsroledclockwidget.h" -#include "snsrlabel.h" - -/*! - \class SnsrDocumentLoader - \ingroup group_snsrbigclockscreensaverprovider - \brief Custom screensaver docml layout loader. - - Used mainly to create the analog clock widget from docml. - */ - -/*! - Creates the analog clock. - \param type Static type name. - \param name Object name. - \retval Created object. - */ -QObject *SnsrDocumentLoader::createObject(const QString &type, const QString &name) -{ - if (type == SnsrAnalogClockWidget::staticMetaObject.className()) { - QObject *object = new SnsrAnalogClockWidget(); - object->setObjectName(name); - return object; - } - - if (type == SnsrOledClockWidget::staticMetaObject.className()) { - QObject *object = new SnsrOledClockWidget(); - object->setObjectName(name); - return object; - } - - if (type == SnsrLabel::staticMetaObject.className()) { - QObject *object = new SnsrLabel(); - object->setObjectName(name); - return object; - } - - return HbDocumentLoader::createObject(type, name); -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/src/snsroledanalogclockcontainer.cpp --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/src/snsroledanalogclockcontainer.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,123 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Container for oled analog clock. -* -*/ - -#include "snsroledanalogclockcontainer.h" - -#include -#include - -#include - -#include "snsroledclockwidget.h" - -/*! - \class SnsrOledAnalogClockContainer - \ingroup group_snsrbigclockscreensaverprovider - \brief Container used for preparing layout for oled analog clock. - */ - -const char *gOledAnalogLayoutDocml = ":/xml/snsrbigclockscreensaveroledanalog.docml"; -extern const char *gPortraitSectionName; -extern const char *gLandscapeSectionName; - -extern const char *gMainViewName; - -const char *gOledAnalogClockWidgetName = "oledAnalogClockWidget"; - -/*! - Constructs a new SnsrOledAnalogClockContainer. - */ -SnsrOledAnalogClockContainer::SnsrOledAnalogClockContainer() : - SnsrBigClockContainer(), - mOledClockWidget(0) -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrOledAnalogClockContainer::SnsrOledAnalogClockContainer") - - bool ok(true); - - // load oled analog clock - qDebug() << gOledAnalogLayoutDocml; - mDocumentObjects = mDocumentLoader.load(gOledAnalogLayoutDocml, &ok); - Q_ASSERT_X(ok, gOledAnalogLayoutDocml, "Invalid DocML file."); - if (ok) { - mMainContainer = mDocumentLoader.findWidget(gMainViewName); - mOledClockWidget = qobject_cast( - mDocumentLoader.findWidget(gOledAnalogClockWidgetName)); - Q_ASSERT_X( - mMainContainer && mOledClockWidget, gOledAnalogLayoutDocml, - "Objects not found in DocML file." - ); - - mBackgroundContainerLayout->addItem(mMainContainer); - } - - SCREENSAVER_TEST_FUNC_EXIT("SnsrOledAnalogClockContainer::SnsrOledAnalogClockContainer") -} - -/*! - Destructs the class. - */ -SnsrOledAnalogClockContainer::~SnsrOledAnalogClockContainer() -{ - //mOledClockWidget - deleted by the parent -} - -/*! - Updates displayed time. - */ -void SnsrOledAnalogClockContainer::update() -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrOledAnalogClockContainer::update") - - // time - mOledClockWidget->tick(); - - SCREENSAVER_TEST_FUNC_EXIT("SnsrOledAnalogClockContainer::update") -} - -/*! - Changes screensaver layout basing on orientation changes. - \param orientation Current orientation. - */ -void SnsrOledAnalogClockContainer::changeLayout(Qt::Orientation orientation) -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrOledAnalogClockContainer::changeLayout") - - if (mCurrentOrientation != orientation) { - mCurrentOrientation = orientation; - bool ok; - // hide controls to avoid screen flickering - mMainContainer->hide(); - - QString sectionToLoad(""); - if (mCurrentOrientation == Qt::Vertical) { - sectionToLoad = gPortraitSectionName; - } else { - sectionToLoad = gLandscapeSectionName; - } - qDebug() << "loading: " << gOledAnalogLayoutDocml << ", section: " << sectionToLoad; - mDocumentLoader.load(gOledAnalogLayoutDocml, sectionToLoad, &ok); - // view is rebuilt and ready to show - mMainContainer->show(); - Q_ASSERT_X(ok, gOledAnalogLayoutDocml, "Invalid section in DocML file."); - } - // update anyway - this is needed in situations when screensaver goes to - // foreground but layout change did not occur - update(); - - SCREENSAVER_TEST_FUNC_EXIT("SnsrOledAnalogClockContainer::changeLayout") -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/src/snsroleddigitalclockcontainer.cpp --- a/screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/src/snsroleddigitalclockcontainer.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,154 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Container for oled digital clock. -* -*/ - -#include "snsroleddigitalclockcontainer.h" - -#include -#include -#include - -#include -#include - -/*! - \class SnsrOledDigitalClockContainer - \ingroup group_snsrbigclockscreensaverprovider - \brief Container used for preparing layout for oled digital clock. - */ - -const char *gOledDigitalLayoutDocml = ":/xml/snsrbigclockscreensaveroleddigital.docml"; -extern const char *gPortraitSectionName; -extern const char *gLandscapeSectionName; - -extern const char *gMainViewName; - -extern const char *gTimeLabelName; -extern const char *gAmPmLabelName; -extern const char *gDateLabelName; - -extern const char *gDateFormatVerticalStr; -extern const char *gDateFormatHorizontalStr; - -extern const char *gTimeFormatStr; -extern const char *gAmPmFormatStr; - -/*! - Constructs a new SnsrOledDigitalClockContainer. - */ -SnsrOledDigitalClockContainer::SnsrOledDigitalClockContainer() : - SnsrBigClockContainer(), - mTimeLabel(0), - mAmPmLabel(0), - mDateLabel(0) -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrOledDigitalClockContainer::SnsrOledDigitalClockContainer") - - bool ok(true); - qDebug() << gOledDigitalLayoutDocml; - - // load digital clock - mDocumentObjects = mDocumentLoader.load(gOledDigitalLayoutDocml, &ok); - Q_ASSERT_X(ok, gOledDigitalLayoutDocml, "Invalid DocML file."); - - if (ok) { - mMainContainer = mDocumentLoader.findWidget(gMainViewName); - mDateLabel = qobject_cast( - mDocumentLoader.findWidget(gDateLabelName)); - mTimeLabel = qobject_cast( - mDocumentLoader.findWidget(gTimeLabelName)); - mAmPmLabel = qobject_cast( - mDocumentLoader.findWidget(gAmPmLabelName)); - Q_ASSERT_X( - mMainContainer && mDateLabel && mTimeLabel && mAmPmLabel, - gOledDigitalLayoutDocml, "Objects not found in DocML file." - ); - - mBackgroundContainerLayout->addItem(mMainContainer); - } - - SCREENSAVER_TEST_FUNC_EXIT("SnsrOledDigitalClockContainer::SnsrOledDigitalClockContainer") -} - -/*! - Destructs the class. - */ -SnsrOledDigitalClockContainer::~SnsrOledDigitalClockContainer() -{ - //mTimeLabel, mAmPmLabel, mDateLabel - deleted by the parent -} - -/*! - Updates displayed time and date. - */ -void SnsrOledDigitalClockContainer::update() -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrOledDigitalClockContainer::update") - - // time - mTimeLabel->setPlainText( - HbExtendedLocale().format(QTime::currentTime(), gTimeFormatStr) - ); - mAmPmLabel->setPlainText( - HbExtendedLocale().format(QTime::currentTime(), gAmPmFormatStr) - ); - - // date - if (mCurrentOrientation == Qt::Vertical) { - mDateLabel->setPlainText( - HbExtendedLocale().format(QDate::currentDate(), gDateFormatVerticalStr) - ); - } else { - mDateLabel->setPlainText( - HbExtendedLocale().format(QDate::currentDate(), gDateFormatHorizontalStr) - ); - } - - SCREENSAVER_TEST_FUNC_EXIT("SnsrOledDigitalClockContainer::update") -} - -/*! - Changes screensaver layout basing on orientation changes. - \param orientation Current orientation. - */ -void SnsrOledDigitalClockContainer::changeLayout(Qt::Orientation orientation) -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrOledDigitalClockContainer::changeLayout") - - if (mCurrentOrientation != orientation) { - mCurrentOrientation = orientation; - bool ok; - // hide controls to avoid screen flickering - mMainContainer->hide(); - - QString sectionToLoad(""); - if (mCurrentOrientation == Qt::Vertical) { - sectionToLoad = gPortraitSectionName; - } else { - sectionToLoad = gLandscapeSectionName; - } - qDebug() << "loading: " << gOledDigitalLayoutDocml << ", section: " << sectionToLoad; - mDocumentLoader.load(gOledDigitalLayoutDocml, sectionToLoad, &ok); - // view is rebuilt and ready to show - mMainContainer->show(); - Q_ASSERT_X(ok, gOledDigitalLayoutDocml, "Invalid section in DocML file."); - } - // update anyway - this is needed in situations when screensaver goes to - // foreground but layout change did not occur - update(); - - SCREENSAVER_TEST_FUNC_EXIT("SnsrOledDigitalClockContainer::changeLayout") -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/serviceproviders/bwins/snsruseractivityserviceu.def --- a/screensaverapp/serviceproviders/bwins/snsruseractivityserviceu.def Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -EXPORTS - ??0SnsrUserActivityService@@QAE@XZ @ 1 NONAME ; SnsrUserActivityService::SnsrUserActivityService(void) - ??1SnsrUserActivityService@@UAE@XZ @ 2 NONAME ; SnsrUserActivityService::~SnsrUserActivityService(void) - ??_ESnsrUserActivityService@@UAE@I@Z @ 3 NONAME ; SnsrUserActivityService::~SnsrUserActivityService(unsigned int) - ?getStaticMetaObject@SnsrUserActivityService@@SAABUQMetaObject@@XZ @ 4 NONAME ; struct QMetaObject const & SnsrUserActivityService::getStaticMetaObject(void) - ?inactivityPeriod@SnsrUserActivityService@@UBEHXZ @ 5 NONAME ; int SnsrUserActivityService::inactivityPeriod(void) const - ?metaObject@SnsrUserActivityService@@UBEPBUQMetaObject@@XZ @ 6 NONAME ; struct QMetaObject const * SnsrUserActivityService::metaObject(void) const - ?qt_metacall@SnsrUserActivityService@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 7 NONAME ; int SnsrUserActivityService::qt_metacall(enum QMetaObject::Call, int, void * *) - ?qt_metacast@SnsrUserActivityService@@UAEPAXPBD@Z @ 8 NONAME ; void * SnsrUserActivityService::qt_metacast(char const *) - ?setInactivityPeriod@SnsrUserActivityService@@UAEXH@Z @ 9 NONAME ; void SnsrUserActivityService::setInactivityPeriod(int) - ?tr@SnsrUserActivityService@@SA?AVQString@@PBD0@Z @ 10 NONAME ; class QString SnsrUserActivityService::tr(char const *, char const *) - ?tr@SnsrUserActivityService@@SA?AVQString@@PBD0H@Z @ 11 NONAME ; class QString SnsrUserActivityService::tr(char const *, char const *, int) - ?trUtf8@SnsrUserActivityService@@SA?AVQString@@PBD0@Z @ 12 NONAME ; class QString SnsrUserActivityService::trUtf8(char const *, char const *) - ?trUtf8@SnsrUserActivityService@@SA?AVQString@@PBD0H@Z @ 13 NONAME ; class QString SnsrUserActivityService::trUtf8(char const *, char const *, int) - ?staticMetaObject@SnsrUserActivityService@@2UQMetaObject@@B @ 14 NONAME ; struct QMetaObject const SnsrUserActivityService::staticMetaObject - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/serviceproviders/eabi/snsruseractivityserviceu.def --- a/screensaverapp/serviceproviders/eabi/snsruseractivityserviceu.def Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -EXPORTS - _ZN23SnsrUserActivityService11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME - _ZN23SnsrUserActivityService11qt_metacastEPKc @ 2 NONAME - _ZN23SnsrUserActivityService16staticMetaObjectE @ 3 NONAME DATA 16 - _ZN23SnsrUserActivityService19getStaticMetaObjectEv @ 4 NONAME - _ZN23SnsrUserActivityService19setInactivityPeriodEi @ 5 NONAME - _ZN23SnsrUserActivityServiceC1Ev @ 6 NONAME - _ZN23SnsrUserActivityServiceC2Ev @ 7 NONAME - _ZN23SnsrUserActivityServiceD0Ev @ 8 NONAME - _ZN23SnsrUserActivityServiceD1Ev @ 9 NONAME - _ZN23SnsrUserActivityServiceD2Ev @ 10 NONAME - _ZNK23SnsrUserActivityService10metaObjectEv @ 11 NONAME - _ZNK23SnsrUserActivityService16inactivityPeriodEv @ 12 NONAME - _ZTI23SnsrUserActivityService @ 13 NONAME - _ZTV23SnsrUserActivityService @ 14 NONAME - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/serviceproviders/serviceproviders.pro --- a/screensaverapp/serviceproviders/serviceproviders.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: serviceproviders.pro -# - -TEMPLATE = subdirs - -SUBDIRS = snsruseractivityservice diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/serviceproviders/snsruseractivityservice/inc/snsruseractivityservice.h --- a/screensaverapp/serviceproviders/snsruseractivityservice/inc/snsruseractivityservice.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: snsruseractivityservice.h -* -*/ - -#ifndef SNSRSNSRUSERACTIVITYSERVICE_H -#define SNSRSNSRUSERACTIVITYSERVICE_H - -#include "snsruseractivityserviceinterface.h" -#include "snsruseractivityservice_global.h" - -#include "snsrtest_global.h" - -class SnsrUserActivityServicePrivate; - -class SNSRUSERACTIVITYSERVICE_EXPORT SnsrUserActivityService : public SnsrUserActivityServiceInterface -{ - Q_OBJECT - -public: - - explicit SnsrUserActivityService(/*QObject *parent = 0*/); - ~SnsrUserActivityService(); - - virtual void setInactivityPeriod(int seconds); - virtual int inactivityPeriod() const; - -private: - - //virtual void connectNotify(const char *signal); - //virtual void disconnectNotify(const char *signal); - - //bool receiversConnected(); - - Q_DISABLE_COPY(SnsrUserActivityService) - -private: - - SnsrUserActivityServicePrivate *m_d; - friend class SnsrUserActivityServicePrivate; - SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrUserActivityService) - -}; - -#endif // SNSRSNSRUSERACTIVITYSERVICE_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/serviceproviders/snsruseractivityservice/inc/snsruseractivityservice_global.h --- a/screensaverapp/serviceproviders/snsruseractivityservice/inc/snsruseractivityservice_global.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: snsruseractivityservice_global.h -* -*/ - - -#ifndef SNSRSNSRUSERACTIVITYSERVICE_GLOBAL_H -#define SNSRSNSRUSERACTIVITYSERVICE_GLOBAL_H - -#include - -#ifdef SNSRUSERACTIVITYSERVICE_LIB - #define SNSRUSERACTIVITYSERVICE_EXPORT Q_DECL_EXPORT -#else - #ifdef SNSRUSERACTIVITYSERVICE_TEST - #define SNSRUSERACTIVITYSERVICE_EXPORT - #else - #define SNSRUSERACTIVITYSERVICE_EXPORT Q_DECL_IMPORT - #endif -#endif - -#endif // SNSRSNSRUSERACTIVITYSERVICE_GLOBAL_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/serviceproviders/snsruseractivityservice/inc/snsruseractivityserviceinterface.h --- a/screensaverapp/serviceproviders/snsruseractivityservice/inc/snsruseractivityserviceinterface.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: snsruseractivityserviceinterface.h -* -*/ - -#ifndef SNSRUSERACTIVITYSERVICEINTERFACE_H -#define SNSRUSERACTIVITYSERVICEINTERFACE_H - -#include - -class SnsrUserActivityServiceInterface : public QObject -{ - Q_OBJECT - -public: - - virtual void setInactivityPeriod(int seconds) = 0; - virtual int inactivityPeriod() const = 0; - -signals: - - void notActive(); - void active(); - -}; - -#endif // SNSRUSERACTIVITYSERVICEINTERFACE_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/serviceproviders/snsruseractivityservice/s60/inc/snsruseractivityservice_p.h --- a/screensaverapp/serviceproviders/snsruseractivityservice/s60/inc/snsruseractivityservice_p.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: snsruseractivityservice_p.h -* -*/ - -#ifndef SNSRUSERACTIVITYSERVICEPRIVATE_H -#define SNSRUSERACTIVITYSERVICEPRIVATE_H - -#include "snsrtest_global.h" - -class CUserActivityManager; - -class SnsrUserActivityService; - -class SnsrUserActivityServicePrivate -{ - -public: - - explicit SnsrUserActivityServicePrivate(SnsrUserActivityService *servicePublic); - ~SnsrUserActivityServicePrivate(); - - void setInactivityPeriod(int seconds); - int inactivityPeriod() const; - - void watch(bool shouldWatch); - - void emitActive() const; - void emitNotActive() const; - -private: - - bool isWatching() const; - -private: - - SnsrUserActivityService *m_q; - - CUserActivityManager *mActivityManager; - int mInactivityPeriod; - SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrUserActivityService) - -}; - -#endif // SNSRUSERACTIVITYSERVICEPRIVATE_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/serviceproviders/snsruseractivityservice/s60/src/snsruseractivityservice_p.cpp --- a/screensaverapp/serviceproviders/snsruseractivityservice/s60/src/snsruseractivityservice_p.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: snsruseractivityservice_p.cpp -* -*/ - -#include "snsruseractivityservice.h" -#include "snsruseractivityservice_p.h" - -#include - -const int lDefaultInactivityPeriod(5); - -// ======== LOCAL FUNCTIONS ======== - -/*! - Called as callback to activity event. - \param pointer to activity callback object. - \retval error code. -*/ -TInt activityCallback(TAny *ptr) -{ - static_cast(ptr)->emitActive(); - // activity manager doesn't care about the return value, - // we return a value indicating 'true' to be elegant (see CIdle) - return 1; -} - -/*! - Called as callback to inactivity event. - \param pointer to inactivity callback object. - \retval error code. -*/ -TInt inactivityCallback(TAny *ptr) -{ - static_cast(ptr)->emitNotActive(); - // activity manager doesn't care about the return value, - // we return a value indicating 'true' to be elegant (see CIdle) - return 1; -} - -// ======== MEMBER FUNCTIONS ======== - -/*! - Constructor. - \param servicePublic public implementation. -*/ -SnsrUserActivityServicePrivate::SnsrUserActivityServicePrivate(SnsrUserActivityService *servicePublic) : - m_q(servicePublic), mActivityManager(0), mInactivityPeriod(lDefaultInactivityPeriod) -{ - mActivityManager = CUserActivityManager::NewL(CActive::EPriorityStandard); -} - -/*! - Destructor. -*/ -SnsrUserActivityServicePrivate::~SnsrUserActivityServicePrivate() -{ - delete mActivityManager; -} - -/*! - Sets the inactivity period after which to emit signal of inactivity. - \param seconds after which inactivity is detected. -*/ -void SnsrUserActivityServicePrivate::setInactivityPeriod(int seconds) -{ - mInactivityPeriod = seconds; - // activity manager panics if timeout set before start - if (isWatching()) - { - mActivityManager->SetInactivityTimeout(TTimeIntervalSeconds(mInactivityPeriod)); - } -} - -/*! - Retrives the current inactivity period setting. - \retval inactivity period set. -*/ -int SnsrUserActivityServicePrivate::inactivityPeriod() const -{ - return mInactivityPeriod; -} - -/*! - Starts or stops activity manager user activity watching. - \param shouldWatch determines if we shoul start watching or stop watching. -*/ -void SnsrUserActivityServicePrivate::watch(bool shouldWatch) -{ - if (shouldWatch && !isWatching()) { - mActivityManager->Start( - TTimeIntervalSeconds(mInactivityPeriod), - TCallBack(inactivityCallback, this), - TCallBack(activityCallback, this)); - } else if (!shouldWatch && isWatching()) { - mActivityManager->Cancel(); - } -} - -/*! - Checks if activity service is currently watching for user activity. - \retval true if user acitivity service is active. -*/ -bool SnsrUserActivityServicePrivate::isWatching() const -{ - return mActivityManager && mActivityManager->IsActive(); -} - -/*! - Emits signal that user is active. -*/ -void SnsrUserActivityServicePrivate::emitActive() const -{ - emit m_q->active(); -} - -/*! - Emits signal that user is not active. -*/ -void SnsrUserActivityServicePrivate::emitNotActive() const -{ - emit m_q->notActive(); -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/serviceproviders/snsruseractivityservice/snsruseractivityservice.pri --- a/screensaverapp/serviceproviders/snsruseractivityservice/snsruseractivityservice.pri Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: snsruseractivityservice.pri -# - -HEADERS += ./inc/*.h - -SOURCES += ./src/*.cpp - -INCLUDEPATH += . \ - inc - -DEPENDPATH += . \ - inc \ - src diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/serviceproviders/snsruseractivityservice/snsruseractivityservice.pro --- a/screensaverapp/serviceproviders/snsruseractivityservice/snsruseractivityservice.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: snsruseractivityservice.pro -# - -TEMPLATE = lib - -include(../../common.pri) - -DEFINES += SNSRUSERACTIVITYSERVICE_LIB - -symbian: { -TARGET.UID3 = 0x2002704D -LIBS += -lactivitymanager - -include(snsruseractivityservice_s60.pri) -} else { -include(snsruseractivityservice_stub.pri) -} - -include(snsruseractivityservice.pri) diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/serviceproviders/snsruseractivityservice/snsruseractivityservice_s60.pri --- a/screensaverapp/serviceproviders/snsruseractivityservice/snsruseractivityservice_s60.pri Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: snsruseractivityservice_s60.pri -# - -HEADERS += ./s60/inc/*.h - -SOURCES += ./s60/src/*.cpp - -INCLUDEPATH += ./s60/inc - -DEPENDPATH += ./s60/inc \ - ./s60/src diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/serviceproviders/snsruseractivityservice/snsruseractivityservice_stub.pri --- a/screensaverapp/serviceproviders/snsruseractivityservice/snsruseractivityservice_stub.pri Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: snsruseractivityservice_stub.pri -# - -HEADERS += ./stub/inc/*.h - -SOURCES += ./stub/src/*.cpp - -INCLUDEPATH += ./stub/inc - -DEPENDPATH += ./stub/inc \ - ./stub/src diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/serviceproviders/snsruseractivityservice/src/snsruseractivityservice.cpp --- a/screensaverapp/serviceproviders/snsruseractivityservice/src/snsruseractivityservice.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: snsruseractivityservice.cpp -* -*/ - -#include "snsruseractivityservice.h" -#include "snsruseractivityservice_p.h" - -/*! - \class SnsrUserActivityService - \brief ?brier_description - - ?Qt_style_documentation -*/ - -// ======== MEMBER FUNCTIONS ======== - -/*! - Constructor. -*/ -SnsrUserActivityService::SnsrUserActivityService() : - m_d(new SnsrUserActivityServicePrivate(this)) -{ - m_d->watch(true); -} - -/*! - Destructor. -*/ -SnsrUserActivityService::~SnsrUserActivityService() -{ - delete m_d; -} - -/*! - Sets the inactivity period after which to emit signal of inactivity. - \param seconds after which inactivity is detected. -*/ -void SnsrUserActivityService::setInactivityPeriod(int seconds) -{ - m_d->setInactivityPeriod(seconds); -} - -/*! - Retrives the current inactivity period setting. - \retval inactivity period set. -*/ -int SnsrUserActivityService::inactivityPeriod() const -{ - return m_d->inactivityPeriod(); -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/serviceproviders/snsruseractivityservice/stub/inc/snsruseractivityservice_p.h --- a/screensaverapp/serviceproviders/snsruseractivityservice/stub/inc/snsruseractivityservice_p.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: snsruseractivityservice_p.h -* -*/ - -#ifndef SNSRUSERACTIVITYSERVICEPRIVATE_H -#define SNSRUSERACTIVITYSERVICEPRIVATE_H - -#include "snsrtest_global.h" - -class QTimer; - -class SnsrUserActivityService; - -class SnsrUserActivityServicePrivate -{ - -public: - - explicit SnsrUserActivityServicePrivate(SnsrUserActivityService *servicePublic); - ~SnsrUserActivityServicePrivate(); - - void setInactivityPeriod(int seconds); - int inactivityPeriod() const; - - void watch(bool shouldWatch); - -private: - - bool isWatching() const; - -private: - - SnsrUserActivityService *m_q; - - QTimer *mActivityTimer; - QTimer *mInactivityTimer; - - int mInactivityPeriod; - SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrUserActivityService) -}; - -#endif // SNSRUSERACTIVITYSERVICEPRIVATE_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/serviceproviders/snsruseractivityservice/stub/src/snsruseractivityservice_p.cpp --- a/screensaverapp/serviceproviders/snsruseractivityservice/stub/src/snsruseractivityservice_p.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: snsruseractivityservice_p.cpp -* -*/ - -#include "snsruseractivityservice.h" -#include "snsruseractivityservice_p.h" - -#include -#include - -// ======== MEMBER FUNCTIONS ======== - -/*! - Constructor. - \param servicePublic public implementation. -*/ -SnsrUserActivityServicePrivate::SnsrUserActivityServicePrivate(SnsrUserActivityService *servicePublic) : - m_q(servicePublic), mInactivityPeriod(9) -{ - mActivityTimer = new QTimer(); - QObject::connect(mActivityTimer, SIGNAL(timeout()), m_q, SIGNAL(active())); - - mInactivityTimer = new QTimer(); - QObject::connect(mInactivityTimer, SIGNAL(timeout()), m_q, SIGNAL(notActive())); -} - -/*! - Destructor. -*/ -SnsrUserActivityServicePrivate::~SnsrUserActivityServicePrivate() -{ - delete mActivityTimer; - delete mInactivityTimer; -} - -/*! - Sets the inactivity period after which to emit signal of inactivity. - \param seconds after which inactivity is detected. -*/ -void SnsrUserActivityServicePrivate::setInactivityPeriod(int seconds) -{ - mInactivityPeriod = seconds; - if (isWatching()) { - mInactivityTimer->start(seconds * 1000); - } -} - -/*! - Retrives the current inactivity period setting. - \retval inactivity period set. -*/ -int SnsrUserActivityServicePrivate::inactivityPeriod() const -{ - return mInactivityPeriod; -} - -/*! - Starts or stops activity manager user activity watching. - \param shouldWatch determines if we shoul start watching or stop watching. -*/ -void SnsrUserActivityServicePrivate::watch(bool shouldWatch) -{ - if (shouldWatch && !isWatching()) { - mActivityTimer->start(5000); - mInactivityTimer->start(mInactivityPeriod * 1000); - } else if (!shouldWatch && isWatching()) { - mActivityTimer->stop(); - mInactivityTimer->stop(); - } -} - -/*! - Checks if activity service is currently watching for user activity. - \retval true if user acitivity service is active. -*/ -bool SnsrUserActivityServicePrivate::isWatching() const -{ - return (mActivityTimer->isActive() || mInactivityTimer->isActive()); -} - - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/sis/rd-key.pem --- a/screensaverapp/sis/rd-key.pem Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXAIBAAKBgQDLRF+r1FGGkCwTrb420kbnAps7gi1yYUcXYUdWeFTuBeQe5eW4 -6Y+LWaA8HMlDdoHRB0FgASisYcFagwno9+oFf4AJka4H1gWEs5XTGwAA1s0d8XGh -7W7Dt9F5FZij8F7/9Pi6+FhhxZFIf1DD+yry9D7+Sp+BgdNALe4XOpf25QIBAwKB -gQCHgupyjYuvCsgNHn7PNtnvVxInrB5MQNoPli+O+uNJWUK/Q+57Rl+yO8AoEzDX -pFaLWiuVVhsdloDnAgabT/FXzYncs6uOHyEUV+dSXb78vtLPJqAX+Fg2i3hOXreB -yskcZ13/OsKVOu5wgrJkx2baZufkqMwOSytf5y9nwjEIKwJBAP+inobagVNrN62j -KQva3cC+UN/6XnKdTc0CA6bHyLOaJoH1xiMwG/VS2PGjHI0tiSMNtLn/QPpHJ003 -iabGhdUCQQDLjp/9UjFT6K6CF66Chqf30pZXhx+GTSQZmv/gvZiMly7X9fX9BGX3 -2MbJohBC4yI21XKTbisWywkF73Hwh+TRAkEAqmxprzxWN5zPyRdwspHpKymLP/w+ -9xOJM1atGdqFzRFvAU6EF3Vn+OHl9my9s3OwwgkjJqorUYTE3iUGby8D4wJBAIe0 -aqjhdjfwdFa6dFcEb/qMZDpaFQQzbWZnVUB+ZbMPdI/5TqitmU/l2dvBYCyXbCSO -TGJJcg8yBgP09qBamIsCQFL7j1tM0XPVQJQ89WpKCld7O9ORxRGVj1eG0tWijrH8 -mGbYh8SGCVoWV3vrKSS8GBrFVgQnqUaHuEdtM7tpCAQ= ------END RSA PRIVATE KEY----- diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/sis/rd.cer --- a/screensaverapp/sis/rd.cer Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICzDCCAjWgAwIBAgIBADANBgkqhkiG9w0BAQUFADArMRAwDgYDVQQKEwdSRCBD -ZXJ0MRcwFQYDVQQDEw5SRCBDZXJ0aWZpY2F0ZTAeFw0wNDExMTUxMjQyMDZaFw0z -NzA5MjMxMjQyMDZaMCsxEDAOBgNVBAoTB1JEIENlcnQxFzAVBgNVBAMTDlJEIENl -cnRpZmljYXRlMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQDLRF+r1FGGkCwT -rb420kbnAps7gi1yYUcXYUdWeFTuBeQe5eW46Y+LWaA8HMlDdoHRB0FgASisYcFa -gwno9+oFf4AJka4H1gWEs5XTGwAA1s0d8XGh7W7Dt9F5FZij8F7/9Pi6+FhhxZFI -f1DD+yry9D7+Sp+BgdNALe4XOpf25QIBA6OCAQAwgf0wDAYDVR0TBAUwAwEB/zAL -BgNVHQ8EBAMCAoQwHQYDVR0OBBYEFFi/kuGzxhVpjGxe9ZwlxC3fH9jFMFMGA1Ud -IwRMMEqAFFi/kuGzxhVpjGxe9ZwlxC3fH9jFoS+kLTArMRAwDgYDVQQKEwdSRCBD -ZXJ0MRcwFQYDVQQDEw5SRCBDZXJ0aWZpY2F0ZYIBADBsBgNVHSAEZTBjMGEGBFUd -IAAwWTATBggrBgEFBQcCARYHaHR0cDovLzBCBggrBgEFBQcCAjA2GjRGb3IgUiZE -IHVzYWdlIG9ubHkuIFRoaXMgY2VydGlmaWNhdGUgaXMgbm90IHRydXN0ZWQuMA0G -CSqGSIb3DQEBBQUAA4GBAHGB4RQMAgBdeT2hxfOr6f2nA/dZm+M5yX5daUtZnET9 -Ed0A9sazLawfN2G1KFQT9kxEParAyoAkpbMAsRrnRz/9cM3OHgFm/NiKRnf50DpT -7oCx0I/65mVD2kt+xXE62/Ii5KPnTufIkPi2uLvURCia1tTS8JmJ8dtxDGyQt8BR ------END CERTIFICATE----- diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/sis/screensaverapp.pkg --- a/screensaverapp/sis/screensaverapp.pkg Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +0,0 @@ -; -; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -; All rights reserved. -; This component and the accompanying materials are made available -; under the terms of "Eclipse Public License v1.0" -; which accompanies this distribution, and is available -; at the URL "http://www.eclipse.org/legal/epl-v10.html". -; -; Initial Contributors: -; Nokia Corporation - initial contribution. -; -; Contributors: -; -; Description: -; - -; Language -&EN - -; SIS header: name, uid, version -#{"screensaverapp"},(0x2002704E),1,0,0 - -; Localised Vendor name -%{"Nokia"} - -; Unique Vendor name -:"Nokia" - -; Supports S60 5th Edition -[0x1028315F], 0, 0, 0, {"S60ProductID"} - - -; ---- snsrapplication -------------------------------------------- - -"/epoc32/release/armv5/urel/snsrapplication.exe" - "c:/sys/bin/snsrapplication.exe" -"/epoc32/data/z/private/10003a3f/import/apps/snsrapplication_reg.rsc" - "c:/private/10003a3f/import/apps/snsrapplication_reg.rsc" - -;themes -;color specific -"\epoc32\winscw\c\resource\hb\apptheme\snsrapplication\style\hbdefault\variables\color\hbcolorgroup.css" - "c:\resource\hb\apptheme\snsrapplication\style\hbdefault\variables\color\hbcolorgroup.css" -"\epoc32\winscw\c\resource\hb\apptheme\snsrapplication\style\redtheme\variables\color\hbcolorgroup.css" - "c:\resource\hb\apptheme\snsrapplication\style\redtheme\variables\color\hbcolorgroup.css" -"\epoc32\winscw\c\resource\hb\apptheme\snsrapplication\style\bluetheme\variables\color\hbcolorgroup.css" - "c:\resource\hb\apptheme\snsrapplication\style\bluetheme\variables\color\hbcolorgroup.css" - -;hbdefault theme -;"\epoc32\winscw\c\resource\hb\themes\icons\hbdefault\scalable\oled-clock-background.svg" - "c:\resource\hb\themes\icons\hbdefault\scalable\aoled-clock-background.svg" -;"\epoc32\winscw\c\resource\hb\themes\icons\hbdefault\scalable\oled-clock-hour-hand.svg" - "c:\resource\hb\themes\icons\hbdefault\scalable\oled-clock-hour-hand.svg" -;"\epoc32\winscw\c\resource\hb\themes\icons\hbdefault\scalable\oled-clock-minute-hand.svg" - "c:\resource\hb\themes\icons\hbdefault\scalable\oled-clock-minute-hand.svg" - -;icon specific (redtheme) -"\epoc32\winscw\c\resource\hb\themes\icons\redtheme\pixmap\analog-clock-background.png" - "c:\resource\hb\themes\icons\redtheme\pixmap\analog-clock-background.png" -"\epoc32\winscw\c\resource\hb\themes\icons\redtheme\scalable\analog-clock-hour-hand.svg" - "c:\resource\hb\themes\icons\redtheme\scalable\analog-clock-hour-hand.svg" -"\epoc32\winscw\c\resource\hb\themes\icons\redtheme\scalable\analog-clock-minute-hand.svg" - "c:\resource\hb\themes\icons\redtheme\scalable\analog-clock-minute-hand.svg" - -;icon specific (bluetheme) -"\epoc32\winscw\c\resource\hb\themes\icons\bluetheme\scalable\analog-clock-background.svg" - "c:\resource\hb\themes\icons\bluetheme\scalable\analog-clock-background.svg" -"\epoc32\winscw\c\resource\hb\themes\icons\bluetheme\scalable\analog-clock-hour-hand.svg" - "c:\resource\hb\themes\icons\bluetheme\scalable\analog-clock-hour-hand.svg" -"\epoc32\winscw\c\resource\hb\themes\icons\bluetheme\scalable\analog-clock-minute-hand.svg" - "c:\resource\hb\themes\icons\bluetheme\scalable\analog-clock-minute-hand.svg" - -; ---- runtimeproviders -------------------------------------------- - -; -------- snsrdefaultruntimeprovider -"/epoc32/release/armv5/urel/snsrdefaultruntimeprovider.dll" - "c:/sys/bin/snsrdefaultruntimeprovider.dll" -"/epoc32/data/z/snsrresources/plugins/runtimeproviders/snsrdefaultruntimeprovider.qtplugin" - "c:/snsrresources/plugins/runtimeproviders/snsrdefaultruntimeprovider.qtplugin" -"/epoc32/data/z/snsrresources/plugins/runtimeproviders/snsrdefaultruntimeprovider.manifest" - "c:/snsrresources/plugins/runtimeproviders/snsrdefaultruntimeprovider.manifest" - -; ---- stateproviders -------------------------------------------- - -; -------- snsrdefaultstateprovider -"/epoc32/release/armv5/urel/snsrdefaultstateprovider.dll" - "c:/sys/bin/snsrdefaultstateprovider.dll" -"/epoc32/data/z/snsrresources/plugins/stateproviders/snsrdefaultstateprovider.qtplugin" - "c:/snsrresources/plugins/stateproviders/snsrdefaultstateprovider.qtplugin" -"/epoc32/data/z/snsrresources/plugins/stateproviders/snsrdefaultstateprovider.manifest" - "c:/snsrresources/plugins/stateproviders/snsrdefaultstateprovider.manifest" - -; ---- screensaverproviders -------------------------------------------- - -; -------- snsrbigclockscreensaverprovider -"/epoc32/release/armv5/urel/snsrbigclockscreensaverprovider.dll" - "c:/sys/bin/snsrbigclockscreensaverprovider.dll" -"/epoc32/data/z/snsrresources/plugins/screensaverproviders/snsrbigclockscreensaverprovider.qtplugin" - "c:/snsrresources/plugins/screensaverproviders/snsrbigclockscreensaverprovider.qtplugin" -"/epoc32/data/z/snsrresources/plugins/screensaverproviders/snsrbigclockscreensaverprovider.manifest" - "c:/snsrresources/plugins/screensaverproviders/snsrbigclockscreensaverprovider.manifest" - -; -------- snsranalogclockstyleplugin -"/epoc32/release/armv5/urel/snsranalogclockstyleplugin.dll" - "c:/sys/bin/snsranalogclockstyleplugin.dll" -"/epoc32/data/z/snsrresources/plugins/snsrstyleplugins/snsranalogclockstyleplugin.qtplugin" - "c:/snsrresources/plugins/snsrstyleplugins/snsranalogclockstyleplugin.qtplugin" -"/epoc32/data/z/snsrresources/plugins/snsrstyleplugins/snsranalogclockstyleplugin.manifest" - "c:/snsrresources/plugins/snsrstyleplugins/snsranalogclockstyleplugin.manifest" - -; -------- snsroledclockstyleplugin -"/epoc32/release/armv5/urel/snsroledclockstyleplugin.dll" - "c:/sys/bin/snsroledclockstyleplugin.dll" -"/epoc32/data/z/snsrresources/plugins/snsrstyleplugins/snsroledclockstyleplugin.qtplugin" - "c:/snsrresources/plugins/snsrstyleplugins/snsroledclockstyleplugin.qtplugin" -"/epoc32/data/z/snsrresources/plugins/snsrstyleplugins/snsroledclockstyleplugin.manifest" - "c:/snsrresources/plugins/snsrstyleplugins/snsroledclockstyleplugin.manifest" - -; ---- serviceproviders -------------------------------------------- - -; -------- snsruseractivityservice -"/epoc32/release/armv5/urel/snsruseractivityservice.dll" - "c:/sys/bin/snsruseractivityservice.dll" - -; ---- snsrutils -------------------------------------------- - -"/epoc32/release/armv5/urel/snsrutils.dll" - "c:/sys/bin/snsrutils.dll" diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/sis/screensaverapp_sisx.bat --- a/screensaverapp/sis/screensaverapp_sisx.bat Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -@rem -@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -@rem All rights reserved. -@rem This component and the accompanying materials are made available -@rem under the terms of "Eclipse Public License v1.0" -@rem which accompanies this distribution, and is available -@rem at the URL "http://www.eclipse.org/legal/epl-v10.html". -@rem -@rem Initial Contributors: -@rem Nokia Corporation - initial contribution. -@rem -@rem Contributors: -@rem -@rem Description: -@rem -@echo off - -if exist screensaverapp.sisx del screensaverapp.sisx - -makesis screensaverapp.pkg -signsis screensaverapp.sis screensaverapp.sisx rd.cer rd-key.pem - -if exist screensaverapp.sisx ( -echo screensaverapp.sisx creation SUCCEEDED -del screensaverapp.sis -) - -if not exist screensaverapp.sisx ( -echo screensaverapp.sisx creation FAILED -) \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/inc/snsrscreensaver.h --- a/screensaverapp/snsrapplication/inc/snsrscreensaver.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Main Screensaver application class, loads runtime. -* -*/ - -#ifndef SNSRSCREENSAVER_H -#define SNSRSCREENSAVER_H - -#include -#include "snsrtest_global.h" - -SCREENSAVER_TEST_CLASS(T_SnsrScreensaver) - -class HsRuntime; - -class SnsrScreensaver : public QObject -{ - Q_OBJECT - -public: - - SnsrScreensaver(QObject *parent = 0); - virtual ~SnsrScreensaver(); - -signals: - - void exit(); - -public slots: - - void start(); - void stop(); - -private: - - Q_DISABLE_COPY (SnsrScreensaver) - -private slots: - - void onRuntimeStarted(); - void onRuntimeStopped(); - void onRuntimeFaulted(); - -private: - - HsRuntime *mRuntime; - - SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrScreensaver) - -}; - -#endif // SNSRSCREENSAVER_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/installs_symbian.pri --- a/screensaverapp/snsrapplication/installs_symbian.pri Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -deploy.path = c: - -#style - -styleexports1.path = /resource/hb/apptheme/snsrapplication/style/redtheme/variables/color -styleexports1.sources += themes/style/theme1/hbcolorgroup.css -for(styleexport1, styleexports1.sources):BLD_INF_RULES.prj_exports += "./$$styleexport1 $$deploy.path$$styleexports1.path/$$basename(styleexport1)" - -styleexports2.path = /resource/hb/apptheme/snsrapplication/style/bluetheme/variables/color -styleexports2.sources += themes/style/theme2/hbcolorgroup.css -for(styleexport2, styleexports2.sources):BLD_INF_RULES.prj_exports += "./$$styleexport2 $$deploy.path$$styleexports2.path/$$basename(styleexport2)" - -styleexports3.path = /resource/hb/apptheme/snsrapplication/style/hbdefault/variables/color -styleexports3.sources += themes/style/defaulttheme/hbcolorgroup.css -for(styleexport3, styleexports3.sources):BLD_INF_RULES.prj_exports += "./$$styleexport3 $$deploy.path$$styleexports3.path/$$basename(styleexport3)" - -#icons - -iconsexports11.path = /resource/hb/themes/icons/redtheme/scalable -iconsexports11.sources += themes/icons/theme1/analog-clock-hour-hand.svg -iconsexports11.sources += themes/icons/theme1/analog-clock-minute-hand.svg -for(iconsexport11, iconsexports11.sources):BLD_INF_RULES.prj_exports += "./$$iconsexport11 $$deploy.path$$iconsexports11.path/$$basename(iconsexport11)" - -iconsexports12.path = /resource/hb/themes/icons/redtheme/pixmap -iconsexports12.sources += themes/icons/theme1/analog-clock-background.png -for(iconsexport12, iconsexports12.sources):BLD_INF_RULES.prj_exports += "./$$iconsexport12 $$deploy.path$$iconsexports12.path/$$basename(iconsexport12)" - -iconsexports2.path = /resource/hb/themes/icons/bluetheme/scalable -iconsexports2.sources += themes/icons/theme2/analog-clock-background.svg -iconsexports2.sources += themes/icons/theme2/analog-clock-hour-hand.svg -iconsexports2.sources += themes/icons/theme2/analog-clock-minute-hand.svg -for(iconsexport2, iconsexports2.sources):BLD_INF_RULES.prj_exports += "./$$iconsexport2 $$deploy.path$$iconsexports2.path/$$basename(iconsexport2)" diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/installs_win.pri --- a/screensaverapp/snsrapplication/installs_win.pri Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -stylefortheme1.path = "$$(USERPROFILE)/Application Data/hb/apptheme/snsrapplication/style/redtheme/variables/color" -stylefortheme1.files = ./themes/style/theme1/hbcolorgroup.css - -stylefortheme2.path = "$$(USERPROFILE)/Application Data/hb/apptheme/snsrapplication/style/bluetheme/variables/color" -stylefortheme2.files = ./themes/style/theme2/hbcolorgroup.css - -stylefortheme3.path = "$$(USERPROFILE)/Application Data/hb/apptheme/snsrapplication/style/hbdefault/variables/color" -stylefortheme3.files = ./themes/style/defaulttheme/hbcolorgroup.css - -themeableimagesfortheme11.path = "$$(USERPROFILE)/Application Data/hb/themes/icons/redtheme/scalable" -themeableimagesfortheme11.files = ./themes/icons/theme1/analog-clock-hour-hand.svg \ - ./themes/icons/theme1/analog-clock-minute-hand.svg - -themeableimagesfortheme12.path = "$$(USERPROFILE)/Application Data/hb/themes/icons/redtheme/pixmap" -themeableimagesfortheme12.files = ./themes/icons/theme1/analog-clock-background.png - -themeableimagesfortheme2.path = "$$(USERPROFILE)/Application Data/hb/themes/icons/bluetheme/scalable" -themeableimagesfortheme2.files = ./themes/icons/theme2/analog-clock-background.svg \ - ./themes/icons/theme2/analog-clock-hour-hand.svg \ - ./themes/icons/theme2/analog-clock-minute-hand.svg - -INSTALLS += stylefortheme1 stylefortheme2 stylefortheme3 themeableimagesfortheme11 themeableimagesfortheme12 themeableimagesfortheme2 diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/screensaverapp_fallbacktheme.qrc --- a/screensaverapp/snsrapplication/screensaverapp_fallbacktheme.qrc Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - themes/icons/hbdefault/scalable/analog-clock-hour-hand.svg - themes/icons/hbdefault/scalable/analog-clock-minute-hand.svg - themes/icons/hbdefault/pixmap/analog-clock-background.png - - themes/icons/hbdefault/scalable/oled-clock-hour-hand.svg - themes/icons/hbdefault/scalable/oled-clock-minute-hand.svg - themes/icons/hbdefault/scalable/oled-clock-background.svg - themes/icons/hbdefault/scalable/oled-clock-date-frame.svg - - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/snsrapplication.pri --- a/screensaverapp/snsrapplication/snsrapplication.pri Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: snsrapplication.pri -# - -HEADERS += ./inc/*.h -SOURCES += ./src/*.cpp - -DEPENDPATH += . \ - ./inc \ - ./src - -INCLUDEPATH += . \ - ./inc \ - ../inc \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/snsrapplication.pro --- a/screensaverapp/snsrapplication/snsrapplication.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: snsrapplication.pro -# - -TEMPLATE = app - -include(../common.pri) - -LIBS += -lappruntimemodel -CONFIG += console hb - -RESOURCES += screensaverapp_fallbacktheme.qrc - -symbian: { - TARGET.UID3 = 0x2002704E - TARGET.CAPABILITY = CAP_APPLICATION - - include(installs_symbian.pri) -} - -win32: { - include(installs_win.pri) -} - -include(snsrapplication.pri) diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/src/main.cpp --- a/screensaverapp/snsrapplication/src/main.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Screensaver application. -* -*/ - -#include - -#include "snsrscreensaver.h" -#include "snsrtest_global.h" - -int main(int argc, char *argv[]) -{ - SCREENSAVER_TEST_FUNC_ENTRY("main") - - HbApplication scsrApp(argc, argv); - scsrApp.setApplicationName("Screensaver"); - SnsrScreensaver scsr; - QObject::connect(&scsrApp, SIGNAL(aboutToQuit()), &scsr, SLOT(stop())); - QObject::connect(&scsr, SIGNAL(exit()), &scsrApp, SLOT(quit()), Qt::QueuedConnection); - scsr.start(); - int ret = scsrApp.exec(); - - SCREENSAVER_TEST_FUNC_EXIT("main") - return ret; -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/src/snsrscreensaver.cpp --- a/screensaverapp/snsrapplication/src/snsrscreensaver.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,126 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Main Screensaver application class, loads runtime. -* -*/ - -#include "snsrscreensaver.h" - -#include -#include - -#include "snsrtest_global.h" - -/*! - \class SnsrScreensaver - \ingroup group_snsrapplication - \brief Main Screensaver application class. - - Loads and manages the runtime. -*/ - -/*! - Constructs a new SnsrScreensaver with parent. -*/ -SnsrScreensaver::SnsrScreensaver(QObject *parent): - QObject(parent) -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrScreensaver::SnsrScreensaver") - - HsRuntimeFactory factory( - "snsrresources/plugins/runtimeproviders", - "snsrresources/plugins/runtimeproviders"); - - HsRuntimeToken token; - token.mLibrary = "snsrdefaultruntimeprovider.dll"; - token.mUri = "screensaver.nokia.com/runtime/defaultruntime"; - - mRuntime = factory.createRuntime(token); - if (mRuntime) { - mRuntime->setParent(this); - - connect(mRuntime, SIGNAL(started()), SLOT(onRuntimeStarted())); - connect(mRuntime, SIGNAL(stopped()), SLOT(onRuntimeStopped())); - connect(mRuntime, SIGNAL(faulted()), SLOT(onRuntimeFaulted())); - } - - SCREENSAVER_TEST_FUNC_EXIT("SnsrScreensaver::SnsrScreensaver") -} - -/*! - Destructs the class. -*/ -SnsrScreensaver::~SnsrScreensaver() -{ -} - -/*! - \fn void SnsrScreensaver::exit() - - This signal is emitted when the runtime ends job. - */ - -/*! - Starts the runtime. -*/ -void SnsrScreensaver::start() -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrScreensaver::start") - - if (mRuntime) { - mRuntime->start(); - } - else { - emit exit(); - } - - SCREENSAVER_TEST_FUNC_EXIT("SnsrScreensaver::start") -} - -/*! - Stops the runtime. -*/ -void SnsrScreensaver::stop() -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrScreensaver::stop") - - if (mRuntime) { - mRuntime->stop(); - } - - SCREENSAVER_TEST_FUNC_EXIT("SnsrScreensaver::stop") -} - -/*! - Called after the runtime has started. -*/ -void SnsrScreensaver::onRuntimeStarted() -{ -} - -/*! - Called after the runtime has stopped. -*/ -void SnsrScreensaver::onRuntimeStopped() -{ - emit exit(); -} - -/*! - Called after the runtime has faulted. -*/ -void SnsrScreensaver::onRuntimeFaulted() -{ - emit exit(); -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/themes/icons/hbdefault/pixmap/analog-clock-background.png Binary file screensaverapp/snsrapplication/themes/icons/hbdefault/pixmap/analog-clock-background.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/themes/icons/hbdefault/scalable/analog-clock-hour-hand.svg --- a/screensaverapp/snsrapplication/themes/icons/hbdefault/scalable/analog-clock-hour-hand.svg Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ - - -image/svg+xml - - - - - - - - - - \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/themes/icons/hbdefault/scalable/analog-clock-minute-hand.svg --- a/screensaverapp/snsrapplication/themes/icons/hbdefault/scalable/analog-clock-minute-hand.svg Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ - - -image/svg+xml - - - - - - - - - - \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/themes/icons/hbdefault/scalable/oled-clock-background.svg --- a/screensaverapp/snsrapplication/themes/icons/hbdefault/scalable/oled-clock-background.svg Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,182 +0,0 @@ - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/themes/icons/hbdefault/scalable/oled-clock-date-frame.svg --- a/screensaverapp/snsrapplication/themes/icons/hbdefault/scalable/oled-clock-date-frame.svg Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ - - -image/svg+xml - - \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/themes/icons/hbdefault/scalable/oled-clock-hour-hand.svg --- a/screensaverapp/snsrapplication/themes/icons/hbdefault/scalable/oled-clock-hour-hand.svg Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ - - -image/svg+xml - - \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/themes/icons/hbdefault/scalable/oled-clock-minute-hand.svg --- a/screensaverapp/snsrapplication/themes/icons/hbdefault/scalable/oled-clock-minute-hand.svg Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ - - -image/svg+xml - - \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/themes/icons/theme1/analog-clock-background.png Binary file screensaverapp/snsrapplication/themes/icons/theme1/analog-clock-background.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/themes/icons/theme1/analog-clock-hour-hand.svg --- a/screensaverapp/snsrapplication/themes/icons/theme1/analog-clock-hour-hand.svg Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ - - -image/svg+xml - - - - - - - - - - \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/themes/icons/theme1/analog-clock-minute-hand.svg --- a/screensaverapp/snsrapplication/themes/icons/theme1/analog-clock-minute-hand.svg Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ - - -image/svg+xml - - - - - - - - - - \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/themes/icons/theme2/analog-clock-background.svg --- a/screensaverapp/snsrapplication/themes/icons/theme2/analog-clock-background.svg Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,241 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/themes/icons/theme2/analog-clock-hour-hand.svg --- a/screensaverapp/snsrapplication/themes/icons/theme2/analog-clock-hour-hand.svg Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/themes/icons/theme2/analog-clock-minute-hand.svg --- a/screensaverapp/snsrapplication/themes/icons/theme2/analog-clock-minute-hand.svg Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/themes/style/defaulttheme/hbcolorgroup.css --- a/screensaverapp/snsrapplication/themes/style/defaulttheme/hbcolorgroup.css Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -/* Colors for different states for different parts of UI */ - -/* Each CSS variable here referes to a color group having colors for enabled, disabled, focused and non-focused states in that order */ - -@variables -{ -snsrforeground:#FFFFFF,#FFFFFF,#FFFFFF,#FFFFFF; -snsrbackground:#000000,#000000,#000000,#000000; -} - -SnsrLabel -{ -background:var(snsrbackground); -foreground:var(snsrforeground); -text:var(snsrforeground); -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/themes/style/theme1/hbcolorgroup.css --- a/screensaverapp/snsrapplication/themes/style/theme1/hbcolorgroup.css Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -/* Colors for different states for different parts of UI */ - -/* Each CSS variable here referes to a color group having colors for enabled, disabled, focused and non-focused states in that order */ - -@variables -{ -snsrforeground:#BB0000,#BB0000,#BB0000,#BB0000; -snsrbackground:#FFE100,#FFE100,#FFE100,#FFE100; -} - -SnsrLabel -{ -background:var(snsrbackground); -foreground:var(snsrforeground); -text:var(snsrforeground); -} \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrapplication/themes/style/theme2/hbcolorgroup.css --- a/screensaverapp/snsrapplication/themes/style/theme2/hbcolorgroup.css Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -/* Colors for different states for different parts of UI */ - -/* Each CSS variable here referes to a color group having colors for enabled, disabled, focused and non-focused states in that order */ - -@variables -{ -snsrforeground:#0000BB,#0000BB,#0000BB,#0000BB; -snsrbackground:#880088,#880088,#880088,#880088; -} - -SnsrLabel -{ -background:var(snsrbackground); -foreground:var(snsrforeground); -text:var(snsrforeground); -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrutils/inc/snsrlabel.h --- a/screensaverapp/snsrutils/inc/snsrlabel.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Screensaver label. -* -*/ - -#ifndef SNSRLABEL_H -#define SNSRLABEL_H - -#include - -#include "snsrutils_global.h" -#include "snsrtest_global.h" - -SCREENSAVER_TEST_CLASS(T_SnsrUtils) - -class SNSRUTILS_EXPORT SnsrLabel : public HbLabel -{ - - Q_OBJECT - -public: - - SnsrLabel(QGraphicsItem *parent = 0); - SnsrLabel(const QString &displayText, QGraphicsItem *parent = 0); - ~SnsrLabel(); - -protected: - - virtual void changeEvent(QEvent *event); - -private: - - void setThemedTextColor(); - - SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrUtils) - -}; - -#endif // SNSRLABEL_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrutils/inc/snsrutils_global.h --- a/screensaverapp/snsrutils/inc/snsrutils_global.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: snsrutils_global.h -* -*/ - -#ifndef SNSRUTILS_GLOBAL_H -#define SNSRUTILS_GLOBAL_H - -#include - -#ifdef SNSRUTILS_LIB - #define SNSRUTILS_EXPORT Q_DECL_EXPORT -#else - #ifdef SNSRUTILS_TEST - #define SNSRUTILS_EXPORT - #else - #define SNSRUTILS_EXPORT Q_DECL_IMPORT - #endif -#endif - -#endif // SNSRUTILS_GLOBAL_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrutils/snsrutils.pri --- a/screensaverapp/snsrutils/snsrutils.pri Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -# -# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -HEADERS += ./inc/*.h - -SOURCES += ./src/*.cpp - -DEPENDPATH += . \ - inc \ - src - -INCLUDEPATH += . \ - inc diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrutils/snsrutils.pro --- a/screensaverapp/snsrutils/snsrutils.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -# -# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -TEMPLATE = lib - -include (../common.pri) - -CONFIG += hb - -DEFINES += SNSRUTILS_LIB - -symbian: { - TARGET.UID3 = 0x20027056 -} - -include(snsrutils.pri) diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/snsrutils/src/snsrlabel.cpp --- a/screensaverapp/snsrutils/src/snsrlabel.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Screensaver label. -* -*/ - -#include "snsrlabel.h" - -#include -#include - -const QString snsrForegroundColorRole("snsrforeground"); - -/*! - \class SnsrLabel - \ingroup group_snsrutils - \brief Screensaver label. - */ - -/*! - Constructs a new SnsrLabel. - \param parent Graphics parent item. - */ -SnsrLabel::SnsrLabel(QGraphicsItem *parent) - : HbLabel(parent) -{ - setThemedTextColor(); -} - -/*! - Constructs a new SnsrLabel. - \param displayText Text the label should display. - \param parent Graphics parent item. - */ -SnsrLabel::SnsrLabel(const QString &displayText, QGraphicsItem *parent) - : HbLabel(displayText, parent) -{ - setThemedTextColor(); -} - -/*! - Destructs the class. - */ -SnsrLabel::~SnsrLabel() -{ -} - -/*! - \reimp - */ -void SnsrLabel::changeEvent(QEvent * event) -{ - if (event->type() == HbEvent::ThemeChanged) { - setThemedTextColor(); - } - return HbLabel::changeEvent(event); -} - -/*! - Sets the label's color to follow the theme. - */ -void SnsrLabel::setThemedTextColor() -{ - QColor textColor(HbColorScheme::color(snsrForegroundColorRole)); - if (textColor.isValid()) { - setTextColor(textColor); - } else { - // fallback mechanism when color definition is missing in default theme - setTextColor(Qt::white); - } -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/stateproviders/snsrdefaultstateprovider/inc/snsrdefaultstateprovider.h --- a/screensaverapp/stateproviders/snsrdefaultstateprovider/inc/snsrdefaultstateprovider.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Default Screensaver provider. -* -*/ - -#ifndef SNSRDEFAULTSTATEPROVIDER_H -#define SNSRDEFAULTSTATEPROVIDER_H - -#include - -class QState; - -class SnsrDefaultStateProvider : public QObject, - public IHsStateProvider -{ - - Q_OBJECT - Q_INTERFACES(IHsStateProvider) - -public: - - SnsrDefaultStateProvider(); - virtual ~SnsrDefaultStateProvider(); - - QList states(); - QState *createState(const HsStateToken &token); - -private: - - HsStateToken mSnsrRootStateToken; - -}; - -#endif // SNSRDEFAULTSTATEPROVIDER_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/stateproviders/snsrdefaultstateprovider/inc/snsrrootstate.h --- a/screensaverapp/stateproviders/snsrdefaultstateprovider/inc/snsrrootstate.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Root Screensaver state. -* -*/ - -#ifndef SNSRROOTSTATE_H -#define SNSRROOTSTATE_H - -#include - -#include -#include "snsrtest_global.h" - -SCREENSAVER_TEST_CLASS(T_SnsrDefaultStateProvider) - -class QGraphicsWidget; -class HbMainWindow; -class SnsrUserActivityServiceInterface; - -class SnsrRootState : public QState -{ - Q_OBJECT - -public: - - SnsrRootState(QState *parent = 0); - virtual ~SnsrRootState(); - -protected: - - void onEntry(QEvent *event); - void onExit(QEvent *event); - -private slots: - - void changeView(QGraphicsWidget *widget); - void screensaverFaulted(); - -private: - - Screensaver *mScreensaver; - QGraphicsWidget *mCurrentView; - HbMainWindow *mMainWindow; - SnsrUserActivityServiceInterface *mUserActivity; - SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrDefaultStateProvider) - -}; - -#endif // SNSRROOTSTATE_H diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/stateproviders/snsrdefaultstateprovider/resource/snsrdefaultstateprovider.manifest --- a/screensaverapp/stateproviders/snsrdefaultstateprovider/resource/snsrdefaultstateprovider.manifest Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ - - - - - diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/stateproviders/snsrdefaultstateprovider/snsrdefaultstateprovider.pri --- a/screensaverapp/stateproviders/snsrdefaultstateprovider/snsrdefaultstateprovider.pri Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: snsrdefaultstateprovider.pri -# - -HEADERS += ./inc/*.h - -SOURCES += ./src/*.cpp - -DEPENDPATH += ./inc \ - ./src - -INCLUDEPATH += ./inc -INCLUDEPATH += ../../serviceproviders/snsruseractivityservice/inc diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/stateproviders/snsrdefaultstateprovider/snsrdefaultstateprovider.pro --- a/screensaverapp/stateproviders/snsrdefaultstateprovider/snsrdefaultstateprovider.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: snsrdefaultstateprovider.pro -# - -TEMPLATE = lib -CONFIG += plugin -PLUGIN_SUBDIR = /snsrresources/plugins/stateproviders - -include(../../common.pri) - -LIBS += -lstatemodel \ - -lscreensavermodel \ - -lsnsruseractivityservice -CONFIG += hb - -symbian: { -TARGET.UID3 = 0x20027050 -# TODO: temporary until screensavermodel goes to platform API -INCLUDEPATH += ../../../../homescreensrv/screensavermodel/inc -} - -include(snsrdefaultstateprovider.pri) diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/stateproviders/snsrdefaultstateprovider/src/snsrdefaultstateprovider.cpp --- a/screensaverapp/stateproviders/snsrdefaultstateprovider/src/snsrdefaultstateprovider.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Default Screensaver provider. -* -*/ - -#include "snsrdefaultstateprovider.h" - -#include - -#include "snsrrootstate.h" - -/*! - \class SnsrDefaultStateProvider - \ingroup group_snsrdefaultstateprovider - \brief Provides a default implementation for each screensaver state. - - States are described in the snsrdefaultstateprovider.manifest file. -*/ - -/*! - Constructs a new SnsrDefaultStateProvider. -*/ -SnsrDefaultStateProvider::SnsrDefaultStateProvider() -{ - mSnsrRootStateToken.mLibrary = "snsrdefaultstateprovider.dll"; - mSnsrRootStateToken.mUri = "screensaver.nokia.com/state/root"; -} - -/*! - Destructs the class. -*/ -SnsrDefaultStateProvider::~SnsrDefaultStateProvider() -{ -} - -/*! - Returns contained states as a list of tokens. -*/ -QList SnsrDefaultStateProvider::states() -{ - return QList() << mSnsrRootStateToken; -} - -/*! - Creates a state based on the given token. - \param token - Identifies the state to be created. -*/ -QState *SnsrDefaultStateProvider::createState(const HsStateToken& token) -{ - if ((token.mLibrary == mSnsrRootStateToken.mLibrary) && - (token.mUri == mSnsrRootStateToken.mUri)) { - return new SnsrRootState(); - } - return 0; -} - -#ifndef COVERAGE_MEASUREMENT -Q_EXPORT_PLUGIN2(snsrdefaultstateprovider, SnsrDefaultStateProvider) -#endif // COVERAGE_MEASUREMENT diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/stateproviders/snsrdefaultstateprovider/src/snsrrootstate.cpp --- a/screensaverapp/stateproviders/snsrdefaultstateprovider/src/snsrrootstate.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,170 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Root Screensaver state. -* -*/ - -#include "snsrrootstate.h" - -#include -#include - -#include -#include -#include - -#include - -#include "snsrtest_global.h" -#include "snsruseractivityservice.h" - -/*! - \class SnsrRootState - \ingroup group_snsrdefaultstateprovider - \brief Root Screensaver state. - */ - -/*! - Constructs a new SnsrRootState with parent. -*/ -SnsrRootState::SnsrRootState(QState *parent) : - QState(parent), mScreensaver(0), mCurrentView(0), mMainWindow(0) -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrRootState::SnsrRootState") - - mMainWindow = HbInstance::instance()->allMainWindows().at(0); - // TODO: consider if this should be Screensaver's responsibility - mMainWindow->hideItems(Hb::AllItems); - // load screensaver plugin - mUserActivity = new SnsrUserActivityService(); - mUserActivity->setInactivityPeriod(5); // 5 seconds inactivity period - - ScreensaverFactory factory(QString("snsrresources/plugins/screensaverproviders")); - ScreensaverToken bigClockToken; - bigClockToken.mLibrary = QString("snsrbigclockscreensaverprovider.dll"); - bigClockToken.mUri = QString("screensaver.nokia.com/screensaver/bigclock"); - mScreensaver = factory.createScreensaver(bigClockToken); - if (mScreensaver) { - mScreensaver->setParent(this); - } else { - // TODO: error state - } - connect(mScreensaver, SIGNAL(viewChanged(QGraphicsWidget*)), SLOT(changeView(QGraphicsWidget*))); - connect(mScreensaver, SIGNAL(faulted()), SLOT(screensaverFaulted())); - - // foreground state - QState *foregroundState = new QState(this); - connect(foregroundState, SIGNAL(entered()), mScreensaver, SLOT(foreground())); - - // background state - QState *backgroundState = new QState(this); - connect(backgroundState, SIGNAL(entered()), mScreensaver, SLOT(background())); - - // partial foreground state - QState *partialForegroundState = new QState(this); - connect(partialForegroundState, SIGNAL(entered()), mScreensaver, SLOT(partialForeground())); - - //setup user inactivity behaviour - partialForegroundState->addTransition(mUserActivity, SIGNAL(active()), foregroundState); - foregroundState->addTransition(mUserActivity, SIGNAL(notActive()), partialForegroundState); - - // power save state - - // set up transitions - QEventTransition *toPartialForegroundTransition = - new QEventTransition(qApp, QEvent::ApplicationActivate); - toPartialForegroundTransition->setTargetState(partialForegroundState); - backgroundState->addTransition(toPartialForegroundTransition); - - QEventTransition *toBackgroundTransition = - new QEventTransition(qApp, QEvent::ApplicationDeactivate); - toBackgroundTransition->setTargetState(backgroundState); - partialForegroundState->addTransition(toBackgroundTransition); - - QEventTransition *toBackgroundTransition2 = - new QEventTransition(qApp, QEvent::ApplicationDeactivate); - toBackgroundTransition2->setTargetState(backgroundState); - foregroundState->addTransition(toBackgroundTransition2); - - setInitialState(partialForegroundState); - - SCREENSAVER_TEST_FUNC_EXIT("SnsrRootState::SnsrRootState") -} - -/*! - Destructs the class. -*/ -SnsrRootState::~SnsrRootState() -{ - // mScreensaver deleted by parent -} - -/*! - This function is called when the state is entered. -*/ -void SnsrRootState::onEntry(QEvent *event) -{ - QState::onEntry(event); - qDebug() << objectName() << "- onEntry()"; - - mScreensaver->initialize(); -} - -/*! - This function is called when the state is exited. -*/ -void SnsrRootState::onExit(QEvent *event) -{ - if (mCurrentView) { - mMainWindow->removeView(mCurrentView); - } - - mScreensaver->close(); - - qDebug() << objectName() << "- onExit()"; - QState::onExit(event); -} - -/*! - Changes view in main window on widget. - \param widget Widget with new view. -*/ -void SnsrRootState::changeView(QGraphicsWidget *widget) -{ - SCREENSAVER_TEST_FUNC_ENTRY("SnsrRootState::changeView") - - qDebug("SnsrRootState::changeView() - widget: 0x%X", (int)widget); - - if (mCurrentView) { - mCurrentView->hide(); - mMainWindow->removeView(mCurrentView); - } - mCurrentView = widget; - if (mCurrentView) { - mCurrentView->show(); - mMainWindow->addView(mCurrentView); - mMainWindow->currentView()->setContentFullScreen(true); - } - - SCREENSAVER_TEST_FUNC_EXIT("SnsrRootState::changeView") -} - -/*! - Invoked when screensaver faulted. -*/ -void SnsrRootState::screensaverFaulted() -{ - qWarning() << "SnsrRootState::screensaverFaulted()"; - // TODO: some error handling -} diff -r cdae8c6c3876 -r 4e8ebe173323 screensaverapp/stateproviders/stateproviders.pro --- a/screensaverapp/stateproviders/stateproviders.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: stateproviders.pro -# - -TEMPLATE = subdirs - -SUBDIRS = snsrdefaultstateprovider diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/common.pri --- a/taskswitcherapp/common.pri Fri Apr 16 14:54:01 2010 +0300 +++ b/taskswitcherapp/common.pri Mon May 03 12:24:59 2010 +0300 @@ -55,11 +55,7 @@ coverage { DEFINES += COVERAGE_MEASUREMENT DEFINES += QT_NO_DEBUG # omit ASSERTS in coverage measurements - } - - symbian { - TARGET.SID = 0x2002677D - } + } } # Add the output dirs to the link path too diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/rom/tsapplication_core.iby --- a/taskswitcherapp/rom/tsapplication_core.iby Fri Apr 16 14:54:01 2010 +0300 +++ b/taskswitcherapp/rom/tsapplication_core.iby Mon May 03 12:24:59 2010 +0300 @@ -17,19 +17,10 @@ #ifndef __TSAPP_CORE_IBY__ #define __TSAPP_CORE_IBY__ -file=ABI_DIR\BUILD_DIR\tsapplication.exe PROGRAMS_DIR\tsapplication.exe -data=ZPRIVATE\10003a3f\import\apps\tsapplication_reg.rsc private\10003a3f\import\apps\tsapplication_reg.rsc -data=\epoc32\data\z\resource\apps\tsapplication.rsc resource\apps\tsapplication.rsc - -ECOM_PLUGIN( tsappecom.dll, tsappecom.rsc ) +data=\epoc32\data\z\resource\qt\crml\tsexternalactivation.qcrml resource\qt\crml\tsexternalactivation.qcrml -file=ABI_DIR\BUILD_DIR\tsserviceplugin.dll SHARED_LIB_DIR\tsserviceplugin.dll -data=\epoc32\data\z\resource\qt\plugins\tsserviceplugin.qtplugin resource\qt\plugins\tsserviceplugin.qtplugin - -file=ABI_DIR\BUILD_DIR\tsdefaultruntimeplugin.dll SHARED_LIB_DIR\tsdefaultruntimeplugin.dll -data=\epoc32\data\z\resource\qt\plugins\tsdefaultruntimeplugin.qtplugin resource\qt\plugins\tsdefaultruntimeplugin.qtplugin - -data=\epoc32\data\z\resource\qt\crml\tsexternalactivation.qcrml resource\qt\crml\tsexternalactivation.qcrml +file=ABI_DIR\BUILD_DIR\tsdevicedialogplugin.dll SHARED_LIB_DIR\tsdevicedialogplugin.dll +data=\epoc32\data\z\resource\plugins\devicedialogs\tsdevicedialogplugin.qtplugin resource\plugins\devicedialogs\tsdevicedialogplugin.qtplugin // stub sis data=ZSYSTEM/install/taskswitcher_stub.sis system/install/taskswitcher_stub.sis diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/runtimeplugins/runtimeplugins.pro --- a/taskswitcherapp/runtimeplugins/runtimeplugins.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: runtimeplugins.pro -# - -TEMPLATE = subdirs - -SUBDIRS = tsdefaultruntimeplugin diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/inc/tsdefaultruntime.h --- a/taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/inc/tsdefaultruntime.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Default Screensaver runtime. -* -*/ - -#ifndef TSDEFAULTRUNTIME_H -#define TSDEFAULTRUNTIME_H - -#include -#include - -QTM_USE_NAMESPACE - -class TsDefaultRuntime : public QStateMachine -{ - Q_OBJECT - -public: - TsDefaultRuntime(QObject *parent = 0); - -signals: - void event_exit(); - -private: - Q_DISABLE_COPY(TsDefaultRuntime) - QObject *createCriticalInterface(QServiceManager *serviceManager, const QString &name); - -}; - -#endif // TSDEFAULTRUNTIME_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/inc/tsdefaultruntimeplugin.h --- a/taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/inc/tsdefaultruntimeplugin.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Default runtime provider. -* -*/ - -#ifndef TSDEFAULTRUNTIMEPLUGIN_H -#define TSDEFAULTRUNTIMEPLUGIN_H - -#include -#include - -QTM_USE_NAMESPACE - -class TsDefaultRuntimePlugin : public QObject, public QServicePluginInterface -{ - Q_OBJECT - Q_INTERFACES(QtMobility::QServicePluginInterface) - -public: - QObject *createInstance(const QServiceInterfaceDescriptor &descriptor, QServiceContext *context, QAbstractSecuritySession *session); - -}; - -#endif // TSDEFAULTRUNTIMEPLUGIN_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/serviceinstaller/serviceinstaller.pro --- a/taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/serviceinstaller/serviceinstaller.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -TEMPLATE = subdirs -SUBDIRS = tsdefaultruntimeinstaller - -symbian { - load(data_caging_paths) - - plugin.sources = tsdefaultruntimeplugin.dll - plugin.path = $$QT_PLUGINS_BASE_DIR - - installer.pkg_postrules += "\"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/tsdefaultruntimeinstaller.exe\" \ - - \"!:\sys\bin\tsdefaultruntimeinstaller.exe\",FR,RI,RW" - - DEPLOYMENT += plugin installer -} else { - message("You might need to run tsdefaultruntimeinstaller.exe before running any application that uses task switcher service") -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/serviceinstaller/tsdefaultruntimeinstaller/bld.inf --- a/taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/serviceinstaller/tsdefaultruntimeinstaller/bld.inf Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -// ============================================================================ -// * Makefile for building: tsdefaultruntimeinstaller -// * Generated by qmake (2.01a) (Qt 4.6.1) on: 2010-02-08T12:01:04 -// * This file is generated by qmake and should not be modified by the -// * user. -// * Project: tsdefaultruntimeinstaller.pro -// * Template: app -// ============================================================================ - -#define BLD_INF_TSDEFAULTRUNTIMEINSTALLER_0DCA8979 - - -prj_platforms - -WINSCW GCCE ARMV5 ARMV6 - - -prj_mmpfiles - -tsdefaultruntimeinstaller_0xE2e19c9c.mmp - -prj_extensions - -START EXTENSION qt/qmake_extra_pre_targetdep -OPTION PREDEP_TARGET X:/HS/homescreen/taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/serviceinstaller/tsdefaultruntimeinstaller/qrc_tsdefaultruntimeinstaller.cpp -OPTION DEPS X:/HS/homescreen/taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/serviceinstaller/tsdefaultruntimeinstaller/tsdefaultruntimeinstaller.qrc -OPTION COMMAND /epoc32/tools/qt/rcc -name tsdefaultruntimeinstaller x:/HS/homescreen/taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/serviceinstaller/tsdefaultruntimeinstaller/tsdefaultruntimeinstaller.qrc -o x:/HS/homescreen/taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/serviceinstaller/tsdefaultruntimeinstaller/qrc_tsdefaultruntimeinstaller.cpp -END - -#if defined(WINSCW) -#else -#endif - - diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/serviceinstaller/tsdefaultruntimeinstaller/tsdefaultruntimeinstaller.cpp --- a/taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/serviceinstaller/tsdefaultruntimeinstaller/tsdefaultruntimeinstaller.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -QTM_USE_NAMESPACE - -int main(int argc, char *argv[]) -{ - QCoreApplication app(argc, argv); - - QServiceManager manager; - bool success = manager.addService(":/tsdefaultruntimeplugin.xml"); - if (!success) { - qDebug("Service adding failed: %d", manager.error()); - } -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/serviceinstaller/tsdefaultruntimeinstaller/tsdefaultruntimeinstaller.pro --- a/taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/serviceinstaller/tsdefaultruntimeinstaller/tsdefaultruntimeinstaller.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -TEMPLATE = app - -QT = core -#TODO - temporarily disabled, until the installer issues on HW are resolved -#CONFIG += no_icon - -CONFIG += console -CONFIG += mobility -MOBILITY = serviceframework - -SOURCES += tsdefaultruntimeinstaller.cpp - -RESOURCES += tsdefaultruntimeinstaller.qrc - -symbian { - TARGET.CAPABILITY = ALL -TCB -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/serviceinstaller/tsdefaultruntimeinstaller/tsdefaultruntimeinstaller.qrc --- a/taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/serviceinstaller/tsdefaultruntimeinstaller/tsdefaultruntimeinstaller.qrc Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ - - - ../../tsdefaultruntimeplugin.xml - - diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/src/tsdefaultruntime.cpp --- a/taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/src/tsdefaultruntime.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Default TaskSwitcher runtime. -* -*/ - -#include -#include -#include -#include - -#include "tsdefaultruntime.h" - -QTM_USE_NAMESPACE - -/*! - \class TsDefaultRuntime - \ingroup group_tsdefaultruntimeplugin - \brief Default implementation of the taskswitcher runtime. -*/ - -/*! - Constructs a new TsDefaultRuntime with parent. -*/ -TsDefaultRuntime::TsDefaultRuntime(QObject *parent) : QStateMachine(parent) -{ - // load services - // FIXME: workaround for bug in QtSF - can't destroy QServiceManager - QServiceManager *serviceManager = new QServiceManager; - QObject *itemProvider = createCriticalInterface(serviceManager, "com.nokia.taskswitcher.itemprovider"); - QObject *activation = createCriticalInterface(serviceManager, "com.nokia.taskswitcher.activation"); - QObject *deactivation = createCriticalInterface(serviceManager, "com.nokia.taskswitcher.deactivation"); - QObject *presentation = createCriticalInterface(serviceManager, "com.nokia.taskswitcher.presentation"); - - // create states - QState *taskSwitcherStates = new QState(this); - QState *backgroundState = new QState(taskSwitcherStates); - QState *activeState = new QState(taskSwitcherStates); - QFinalState *finalState = new QFinalState(this); - setInitialState(taskSwitcherStates); - taskSwitcherStates->setInitialState(backgroundState); - - // Forward signals emited by statemachine. - backgroundState->addTransition(activation, SIGNAL(activated()), activeState); - activeState->addTransition(deactivation, SIGNAL(deactivated()), backgroundState); - taskSwitcherStates->addTransition(this, SIGNAL(event_exit()), finalState); - - // exchange model between itemprovider and presentation service - QAbstractItemModel *model; - QMetaObject::invokeMethod(itemProvider, "model", Q_RETURN_ARG(QAbstractItemModel*, model)); - QMetaObject::invokeMethod(presentation, "setModel", Q_ARG(QAbstractItemModel*, model)); - - // connect all services - connect(presentation, SIGNAL(openApplication(QModelIndex)), itemProvider, SLOT(openApplication(QModelIndex))); - connect(presentation, SIGNAL(closeApplication(QModelIndex)), itemProvider, SLOT(closeApplication(QModelIndex))); - connect(presentation, SIGNAL(closeAllApplications()), itemProvider, SLOT(closeAllApplications())); - - connect(presentation, SIGNAL(hideTaskSwitcher()), deactivation, SIGNAL(deactivated())); - - connect(activeState, SIGNAL(exited()), presentation, SLOT(hide())); - connect(activeState, SIGNAL(entered()), presentation, SLOT(show())); - - connect(activeState, SIGNAL(exited()), itemProvider, SLOT(clearClosedApplicationList())); -} - -/*! - Creates critical interface with /a name using passed /a serviceManager. -*/ -QObject *TsDefaultRuntime::createCriticalInterface(QServiceManager *serviceManager, const QString &name) -{ - QObject *interface = serviceManager->loadInterface(name); - Q_ASSERT_X(interface, "TsDefaultRuntime::createCriticalInterface", qPrintable(QString("Cannot initialize critical %1 interafce").arg(name))); - interface->setParent(this); - return interface; -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/src/tsdefaultruntimeplugin.cpp --- a/taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/src/tsdefaultruntimeplugin.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Default runtime provider. -* -*/ - -#include -#include -#include - -#include "tsdefaultruntimeplugin.h" -#include "tsdefaultruntime.h" - -/*! - \class TsDefaultRuntimePlugin - \ingroup group_tsdefaultruntimeplugin - \brief Provides a default implementation of the taskswitcher runtime. - - This provider includes a default implementation of the taskswitcher runtime. -*/ - -#ifdef COVERAGE_MEASUREMENT -#pragma CTC SKIP -#endif //COVERAGE_MEASUREMENT - -/*! - Creates a runtime based on the given descriptor. -*/ -QObject *TsDefaultRuntimePlugin::createInstance(const QServiceInterfaceDescriptor &descriptor, QServiceContext *context, QAbstractSecuritySession *session) -{ - Q_UNUSED(context); - Q_UNUSED(session); - - if (descriptor.interfaceName() == "com.nokia.taskswitcher.runtime.defaultruntime") { - return new TsDefaultRuntime(this); - } else { - return NULL; - } -} - -Q_EXPORT_PLUGIN2(tsdefaultruntimeplugin, TsDefaultRuntimePlugin) - -#ifdef COVERAGE_MEASUREMENT -#pragma CTC ENDSKIP -#endif //COVERAGE_MEASUREMENT diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/tsdefaultruntimeplugin.pro --- a/taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/tsdefaultruntimeplugin.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: snsrdefaultruntimeplugin.pro -# - -TEMPLATE = lib -CONFIG += plugin mobility -MOBILITY = serviceframework - -INCLUDEPATH += inc - -HEADERS += inc/tsdefaultruntime.h \ - inc/tsdefaultruntimeplugin.h \ - -SOURCES += src/tsdefaultruntime.cpp \ - src/tsdefaultruntimeplugin.cpp \ - -symbian { - load(data_caging_paths) - - plugin.sources = tsdefaultruntimeplugin.dll - plugin.path = $$QT_PLUGINS_BASE_DIR - DEPLOYMENT += plugin -} - -include(../../common.pri) diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/tsdefaultruntimeplugin.xml --- a/taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/tsdefaultruntimeplugin.xml Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ - - - TaskSwitcher - tsdefaultruntimeplugin - TaskSwitcher Runtime Plugin - - com.nokia.taskswitcher.runtime.defaultruntime - 1.0 - Default implementation for taskswitcher runtime - - diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/sis/stubs/taskswitcher_stub.pkg --- a/taskswitcherapp/sis/stubs/taskswitcher_stub.pkg Fri Apr 16 14:54:01 2010 +0300 +++ b/taskswitcherapp/sis/stubs/taskswitcher_stub.pkg Mon May 03 12:24:59 2010 +0300 @@ -24,7 +24,7 @@ &EN ; standard SIS file header -#{"taskswitcher"},(0x2002677D),1,0,0,TYPE=SA +#{"taskswitcher"},(0x2002677F),1,0,0,TYPE=SA ;Localized Vendor Name %{"Nokia"} @@ -32,18 +32,8 @@ ;Unique Vendor name :"Nokia" -""-"Z:\sys\bin\tsapplication.exe" -""-"Z:\resource\apps\tsapplication.r??" -""-"Z:\private\10003a3f\import\apps\tsapplication_reg.rsc" - -""-"Z:\sys\bin\tsappecom.dll" -""-"Z:\resource\plugins\tsappecom.rsc" - -""-"Z:\sys\bin\tsserviceplugin.dll" -""-"Z:\resource\qt\plugins\tsserviceplugin.qtplugin" - -""-"Z:\sys\bin\tsdefaultruntimeplugin.dll" -""-"Z:\resource\qt\plugins\tsdefaultruntimeplugin.qtplugin" - ""-"Z:\resource\qt\translations\taskswitcher.qm" ""-"Z:\resource\qt\crml\tsexternalactivation.qcrml" + +""-"Z:\sys\bin\tsdevicedialogplugin.dll" +""-"Z:\resource\plugins\devicedialogs\tsdevicedialogplugin.qtplugin" diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/sis/stubs/taskswitcher_stub.sis Binary file taskswitcherapp/sis/stubs/taskswitcher_stub.sis has changed diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/sis/taskswitcher.pkg --- a/taskswitcherapp/sis/taskswitcher.pkg Fri Apr 16 14:54:01 2010 +0300 +++ b/taskswitcherapp/sis/taskswitcher.pkg Mon May 03 12:24:59 2010 +0300 @@ -18,7 +18,7 @@ &EN ; standard SIS file header -#{"taskswitcher"},(0x2002677D),1,0,0,TYPE=SA, RU +#{"taskswitcher"},(0x2002677F),1,0,0,TYPE=SA, RU ;Localized Vendor Name %{"Nokia"} @@ -26,18 +26,8 @@ ;Unique Vendor name :"Nokia" -"/epoc32/release/armv5/urel/tsapplication.exe"-"!:\sys\bin\tsapplication.exe" -"/epoc32/data/z/resource/apps/tsapplication.rsc" -"!:\resource\apps\tsapplication.rsc" -"/epoc32/data/z/private/10003a3f/import/apps/tsapplication_reg.rsc"-"!:\private\10003a3f\import\apps\tsapplication_reg.rsc" - -"/epoc32/release/armv5/urel/tsappecom.dll"-"!:\sys\bin\tsappecom.dll" -"/epoc32/data/z/resource/plugins/tsappecom.rsc"-"!:\resource\plugins\tsappecom.rsc" - -"/epoc32/release/armv5/urel/tsserviceplugin.dll"-"!:\sys\bin\tsserviceplugin.dll" -"/epoc32/data/z/resource/qt/plugins/tsserviceplugin.qtplugin"-"!:\resource\qt\plugins\tsserviceplugin.qtplugin" - -"/epoc32/release/armv5/urel/tsdefaultruntimeplugin.dll"-"!:\sys\bin\tsdefaultruntimeplugin.dll" -"/epoc32/data/z/resource/qt/plugins/tsdefaultruntimeplugin.qtplugin"-"!:\resource\qt\plugins\tsdefaultruntimeplugin.qtplugin" - "/epoc32/data/z/resource/qt/translations/taskswitcher.qm"-"!:\resource\qt\translations\taskswitcher.qm" "/epoc32/data/z/resource/qt/crml/tsexternalactivation.qcrml"-"!:\resource\qt\crml\tsexternalactivation.qcrml" + +"/epoc32/release/armv5/urel/tsdevicedialogplugin.dll"-"!:\sys\bin\tsdevicedialogplugin.dll" +"/epoc32/data/z/resource/plugins/devicedialogs/tsdevicedialogplugin.qtplugin"-"!:\resource\plugins\devicedialogs\tsdevicedialogplugin.qtplugin" \ No newline at end of file diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/taskswitcherapp.pro --- a/taskswitcherapp/taskswitcherapp.pro Fri Apr 16 14:54:01 2010 +0300 +++ b/taskswitcherapp/taskswitcherapp.pro Mon May 03 12:24:59 2010 +0300 @@ -16,17 +16,20 @@ TEMPLATE = subdirs -symbian:SUBDIRS += taskswitcherappecom -SUBDIRS += tsserviceplugin -SUBDIRS += runtimeplugins -SUBDIRS += tsapplication +SUBDIRS += tsdevicedialogplugin tests { - symbian:SUBDIRS += taskswitcherappecom\tsrc - SUBDIRS += tsserviceplugin\tsrc - SUBDIRS += runtimeplugins\tsdefaultruntimeplugin\tsrc - SUBDIRS += tsapplication\tsrc SUBDIRS += internal\tstestrunner + SUBDIRS += tsdevicedialogplugin\tsrc + SUBDIRS += ..\..\homescreensrv\activityfw\activityserviceplugin\unittests + SUBDIRS += ..\..\homescreensrv\activityfw\activitydatabase\hsactivitydbclient\t_hsactivitydbclient + SUBDIRS += ..\..\homescreensrv\hsappkeyhandler\tsrc\t_hsappkeyhandler + SUBDIRS += ..\..\homescreensrv\activityfw\activityserviceplugin\s60\tsrc +} + +coverage { + SUBDIRS += ..\..\homescreensrv\activityfw + SUBDIRS += ..\..\homescreensrv\hsappkeyhandler } symbian:include(rom.pri) diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/taskswitcherappecom/data/tsappecom.rss --- a/taskswitcherapp/taskswitcherappecom/data/tsappecom.rss Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Ecom registration file for alternate fast swap plugin -* -*/ - - -#include -#include "tsappecomconst.hrh" -#include "akncapserveralternatefspluginconst.hrh" - -RESOURCE REGISTRY_INFO theInfo - { - // UID for the DLL - dll_uid = KTsAppPluginDllUid; - // Declare array of interface info - interfaces = - { - INTERFACE_INFO - { - // UID of interface that is implemented - interface_uid = KAknCapServerAlternateFsPluginInterfaceUid; - implementations = - { - IMPLEMENTATION_INFO - { - implementation_uid = KTsAppPluginImplementationUid; - version_no = 1; - display_name = ""; - default_data = ""; - opaque_data = ""; - } - }; - } - }; - } diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/taskswitcherappecom/group/tsappecom.mmp --- a/taskswitcherapp/taskswitcherappecom/group/tsappecom.mmp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Taskswitcher application ecom plugin -* -*/ - - -#include -#include -#include "../inc/tsappecomconst.hrh" - -TARGET tsappecom.dll -TARGETTYPE PLUGIN -UID 0x10009D8D KTsAppPluginDllUid -CAPABILITY CAP_ECOM_PLUGIN - -SOURCEPATH ../src -SOURCE proxy.cpp -SOURCE tsappecom.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../trace - -APP_LAYER_SYSTEMINCLUDE - -SOURCEPATH ../data -START RESOURCE tsappecom.rss - TARGET tsappecom.rsc - TARGETPATH /resource/plugins -END - -LIBRARY euser.lib -LIBRARY ecom.lib -LIBRARY apgrfx.lib -LIBRARY cone.lib - -DEBUGLIBRARY flogger.lib - diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/taskswitcherappecom/inc/tsappecom.h --- a/taskswitcherapp/taskswitcherappecom/inc/tsappecom.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Taskswitcher application ecom plugin -* -*/ - - -#ifndef TSAPPECOM_H -#define TSAPPECOM_H - -#include -#include - -/** - * Taskswitcher ecom plugin which is loaded by AknCapServer as an alternate Fast - * Swap. Uses P&S to show/dismiss the Taskswitcher application. - */ -class CTsEcomPlugin : public CAknCapAppServerAlternateFs - { -public: - - /** - * Symbian two phased constructors. - * - * @return CTsEcomPlugin pointer. - */ - static CTsEcomPlugin* NewL(); - - /** - * Destructor. - */ - ~CTsEcomPlugin(); - -public: - - // From CAknCapAppServerAlternateFs - /** - * Shows the alternate fast swap. - */ - virtual void Show(); - - /** - * Dismisses the alternate fast swap. - */ - virtual void Dismiss(); - - /** - * Checks if alternate fast swap is currently visible. - * - * @return ETrue If alternate FS is visible. - */ - virtual TBool IsVisible(); - - /** - * Checks if alternate fast swap is ready to be shown. - * - * @return ETrue If alternate FS is ready. - */ - virtual TBool IsReady(); - - /** - * Forward long app key to the alternate fast swap. - */ - virtual void HandleLongAppKeyPress(); - - /** - * Forward short app key to the alternate fast swap. - */ - virtual void HandleShortAppKeyPress(); - -private: - - /** - * Default constructor, implicitly called by NewL(). - */ - CTsEcomPlugin(); - - /** - * 2nd phase construction, called by NewL(). - */ - void ConstructL(); - - /** - * Sets the P&S property to given value. - * - * @param aValue Value - */ - void SetTaskswitcherStateProperty( TInt aValue ); - - /** - * Defines the P&S property. - */ - void DefineTaskswitcherStateProperty(); - - }; - -#endif // TSAPPECOM_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/taskswitcherappecom/inc/tsappecomconst.hrh --- a/taskswitcherapp/taskswitcherappecom/inc/tsappecomconst.hrh Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Taskswitcher application ecom plugin UIDs -* -*/ - - -#ifndef TSAPPECOMCONST_HRH -#define TSAPPECOMCONST_HRH - -#define KTsAppPluginDllUid 0x2001FD72 -#define KTsAppPluginImplementationUid 0x2001FD72 - -#endif // TSAPPECOMCONST_HRH diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/taskswitcherappecom/src/proxy.cpp --- a/taskswitcherapp/taskswitcherappecom/src/proxy.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Taskswitcher application ecom plugin -* -*/ - - -// INCLUDE FILES -#include -#include - -#include "tsappecom.h" -#include "tsappecomconst.hrh" - -// Provides a key value pair table, this is used to identify -// the correct construction function for the requested interface. -const TImplementationProxy ImplementationTable[] = - { - IMPLEMENTATION_PROXY_ENTRY( - KTsAppPluginImplementationUid, - CTsEcomPlugin::NewL ) - }; - -// Function used to return an instance of the proxy table. -EXPORT_C const TImplementationProxy* ImplementationGroupProxy( - TInt& aTableCount ) - { - aTableCount - = sizeof ( ImplementationTable ) / sizeof( TImplementationProxy ); - return ImplementationTable; - } - -// End of file diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/taskswitcherappecom/src/tsappecom.cpp --- a/taskswitcherapp/taskswitcherappecom/src/tsappecom.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,192 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Taskswitcher application ecom plugin - * -*/ - - -#include -#include -#include - -#include "tsappecomconst.hrh" -#include "tsappecom.h" - -// AknCapServer UID, used for P&S category -const TUid KTaskswitcherStateCategory = { 0x10207218 }; - -// Taskswitcher UI, used as P&S key -const TUint KTaskswitcherStateKey = 0x2002677D; - -// Values for Taskswitcher launching P&S -const TInt KTaskswitcherBackgroundValue = 1; -const TInt KTaskswitcherForegroundValue = KTaskswitcherBackgroundValue << 1; -const TInt KTaskswitcherLongAppKeyPressed = KTaskswitcherForegroundValue << 1; - -// Taskswitcher application UID, for checking if taskswitcher is running -const TUid KTaskswitcherAppUidValue = { 0x2002677D }; - -// --------------------------------------------------------------------------- -// CTsEcomPlugin::CTsEcomPlugin() -// Default constructor for first phase construction. -// --------------------------------------------------------------------------- -// -CTsEcomPlugin::CTsEcomPlugin() - { - } - -// --------------------------------------------------------------------------- -// CTsEcomPlugin::NewL() -// Standard NewL. -// --------------------------------------------------------------------------- -// -CTsEcomPlugin* CTsEcomPlugin::NewL() - { - CTsEcomPlugin* self = new ( ELeave ) CTsEcomPlugin; - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - return self; - } - -// --------------------------------------------------------------------------- -// CTsEcomPlugin::ConstructL() -// 2nd phase construction. -// --------------------------------------------------------------------------- -// -void CTsEcomPlugin::ConstructL() - { - DefineTaskswitcherStateProperty(); - } - -// --------------------------------------------------------------------------- -// CTsEcomPlugin::~CTsEcomPlugin() -// Destructor. -// --------------------------------------------------------------------------- -// -CTsEcomPlugin::~CTsEcomPlugin() - { - } - -// --------------------------------------------------------------------------- -// CTsEcomPlugin::Show -// --------------------------------------------------------------------------- -// -void CTsEcomPlugin::Show() - { - TInt value( 0 ); - RProperty::Get( KTaskswitcherStateCategory, KTaskswitcherStateKey, value ); - value &= ~KTaskswitcherBackgroundValue; - value |= KTaskswitcherForegroundValue; - value |= KTaskswitcherLongAppKeyPressed; - SetTaskswitcherStateProperty( value ); - } - -// --------------------------------------------------------------------------- -// CTsEcomPlugin::Dismiss -// --------------------------------------------------------------------------- -// -void CTsEcomPlugin::Dismiss() - { - TInt value( 0 ); - RProperty::Get( KTaskswitcherStateCategory, KTaskswitcherStateKey, value ); - value &= ~KTaskswitcherForegroundValue; - value |= KTaskswitcherBackgroundValue; - SetTaskswitcherStateProperty( value ); - } - -// --------------------------------------------------------------------------- -// CTsEcomPlugin::HandleLongAppKeyPress -// --------------------------------------------------------------------------- -// -void CTsEcomPlugin::HandleLongAppKeyPress() - { - TInt value( 0 ); - RProperty::Get( KTaskswitcherStateCategory, KTaskswitcherStateKey, value ); - value |= KTaskswitcherLongAppKeyPressed; - SetTaskswitcherStateProperty( value ); - } - -// --------------------------------------------------------------------------- -// CTsEcomPlugin::HandleShortAppKeyPress -// --------------------------------------------------------------------------- -// -void CTsEcomPlugin::HandleShortAppKeyPress() - { - } - -// --------------------------------------------------------------------------- -// CTsEcomPlugin::IsVisible -// --------------------------------------------------------------------------- -// -TBool CTsEcomPlugin::IsVisible() - { - TInt value( 0 ); - RProperty::Get( KTaskswitcherStateCategory, KTaskswitcherStateKey, value ); - if ( value & KTaskswitcherForegroundValue ) - { - return ETrue; - } - return EFalse; - } - -// --------------------------------------------------------------------------- -// CTsEcomPlugin::IsReady -// --------------------------------------------------------------------------- -// -TBool CTsEcomPlugin::IsReady() - { - TBool ret = EFalse; - CEikonEnv* eikonEnv = CEikonEnv::Static(); - - if ( eikonEnv ) - { - TApaTaskList taskList( eikonEnv->WsSession() ); - TApaTask task = taskList.FindApp( KTaskswitcherAppUidValue ); - - if ( task.Exists() ) - { - ret = ETrue; - } - } - - return ret; - } - -// ----------------------------------------------------------------------------- -// CTsEcomPlugin::SetTaskswitcherStateProperty -// ----------------------------------------------------------------------------- -// -void CTsEcomPlugin::SetTaskswitcherStateProperty( TInt aValue ) - { - if ( RProperty::Set( - KTaskswitcherStateCategory, KTaskswitcherStateKey, aValue ) != KErrNone ) - { - DefineTaskswitcherStateProperty(); - RProperty::Set( KTaskswitcherStateCategory, KTaskswitcherStateKey, aValue ); - } - } - -// ----------------------------------------------------------------------------- -// CTsEcomPlugin::DefineTaskswitcherStateProperty -// ----------------------------------------------------------------------------- -// -void CTsEcomPlugin::DefineTaskswitcherStateProperty() - { - RProperty::Define( - KTaskswitcherStateCategory, KTaskswitcherStateKey, RProperty::EInt ); - - } - -// End of file diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/taskswitcherappecom/taskswitcherappecom.pro --- a/taskswitcherapp/taskswitcherappecom/taskswitcherappecom.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -TEMPLATE = subdirs -BLD_INF_RULES.prj_mmpfiles = "./group/tsappecom.mmp" - -load(data_caging_paths) - -ecomplugindll.sources = tsappecom.dll -ecomplugindll.path = $$SHARED_LIB_DIR - -ecompluginresource.sources = /epoc32/data/z/resource/plugins/tsappecom.rsc -ecompluginresource.path = $$ECOM_RESOURCE_DIR - -DEPLOYMENT += ecomplugindll ecompluginresource diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsapplication/inc/tstaskswitcher.h --- a/taskswitcherapp/tsapplication/inc/tstaskswitcher.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef TSTASKSWITCHER_H -#define TSTASKSWITCHER_H - -#include - -class T_TsTaskSwitcher; - -class QStateMachine; - -/** - * @ingroup group_tsapplication - * @brief TaskSwitcher application main class. - * - * Loads a runtime from a runtime provider plugin. Manages - * the runtime execution. - * - * @lib ?library - * @since S60 ?S60_version - */ - -class TsTaskSwitcher : public QObject -{ - Q_OBJECT - -public: - /** - * Constructor. - * @since S60 ?S60_version. - * @param aParent Parent object. - */ - TsTaskSwitcher(QObject* parent = 0); - -private: - - Q_DISABLE_COPY(TsTaskSwitcher) - -signals: - /** - * Emitted when the teleport application needs to exit. - * @since S60 ?S60_version. - */ - void exit(); - -public slots: - /** - * Starts the runtime. - * @since S60 ?S60_version. - */ - void start(); - - /** - * Stops the runtime. - * @since S60 ?S60_version. - */ - void stop(); - -private: - /** - * Runtime. - */ - QStateMachine* mRuntime; - - friend class T_TsTaskSwitcher; -}; - -#endif // TSTASKSWITCHER_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsapplication/src/main.cpp --- a/taskswitcherapp/tsapplication/src/main.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#include -#include - -#include -#include - -#include "tstaskswitcher.h" - -int main(int argc, char *argv[]) -{ - HbApplication tsApp(argc, argv); - tsApp.setApplicationName("Task Switcher"); - - HbMainWindow mainWindow(NULL, Hb::WindowFlagTransparent); - mainWindow.hideItems(Hb::AllItems); - - QString locale = QLocale::system().name(); - QTranslator translator; - - QString path = "resource/qt/translations/"; - QString tsTrFile = QString("taskswitcher_") + locale; -#ifdef Q_OS_SYMBIAN - // TRAP is must here, otherwise it crashes - TRAP_IGNORE( - bool tsLoaded(false); - tsLoaded = translator.load(tsTrFile, QString("z:/") + path); - if (!tsLoaded) - translator.load(tsTrFile, QString("c:/") + path); - ); -#else - translator.load(tsTrFile, QString(path)); -#endif //Q_OS_SYMBIAN - tsApp.installTranslator(&translator); - - TsTaskSwitcher ts; - QObject::connect(&tsApp, SIGNAL(aboutToQuit()), &ts, SLOT(stop())); - QObject::connect(&ts, SIGNAL(exit()), &tsApp, SLOT(quit()), Qt::QueuedConnection); - ts.start(); - - return tsApp.exec(); -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsapplication/src/tstaskswitcher.cpp --- a/taskswitcherapp/tsapplication/src/tstaskswitcher.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include "tstaskswitcher.h" - -#include -#include - -#include - -QTM_USE_NAMESPACE - -TsTaskSwitcher::TsTaskSwitcher(QObject* aParent) : QObject(aParent) -{ - // FIXME: we're leaking service manager to prevent crash caused by QServiceManager deletion - QServiceManager *serviceManager = new QServiceManager; - - // FIXME: temporary workaround for bug in QtSF database - this process have to add services - QList tsServiceInterfaces = serviceManager->findInterfaces("TaskSwitcher"); - QStringList requiredInterfaces; - requiredInterfaces << "com.nokia.taskswitcher.itemprovider"; - requiredInterfaces << "com.nokia.taskswitcher.activation"; - requiredInterfaces << "com.nokia.taskswitcher.deactivation"; - requiredInterfaces << "com.nokia.taskswitcher.presentation"; - requiredInterfaces << "com.nokia.taskswitcher.runtime.defaultruntime"; - - foreach (const QServiceInterfaceDescriptor &interface, tsServiceInterfaces) { - QString interfaceName = interface.interfaceName(); - if (requiredInterfaces.contains(interfaceName)) { - requiredInterfaces.removeAll(interfaceName); - } - } - - if (!requiredInterfaces.isEmpty()) { - // clean old entries - serviceManager->removeService("TaskSwitcher"); - - bool servicesAdded = serviceManager->addService(":/tsserviceplugin.xml"); - Q_ASSERT_X(servicesAdded, "Adding Ts Services", qPrintable(QString("addService returned false, error %1").arg(serviceManager->error()))); - - bool runtimeAdded = serviceManager->addService(":/tsdefaultruntimeplugin.xml"); - Q_ASSERT_X(runtimeAdded, "Adding Ts Runtime", qPrintable(QString("addService returned false, error %1").arg(serviceManager->error()))); - } - // FIXME - - mRuntime = serviceManager->loadLocalTypedInterface("com.nokia.taskswitcher.runtime.defaultruntime"); - if (mRuntime) { - mRuntime->setParent(this); - connect(mRuntime, SIGNAL(stopped()), this, SIGNAL(exit())); - } else { - qCritical("Failed to create runtime"); - } -} - -void TsTaskSwitcher::start() -{ - if (mRuntime) { - mRuntime->start(); - } else { - emit exit(); - } -} - -void TsTaskSwitcher::stop() -{ - if (mRuntime) { - if (mRuntime->isRunning()) { - QEventLoop eventLoop; - connect(mRuntime, SIGNAL(finished()), &eventLoop, SLOT(quit())); - QMetaObject::invokeMethod(mRuntime, "event_exit", Qt::QueuedConnection); - eventLoop.exec(); - } - } -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsapplication/tsapplication.pro --- a/taskswitcherapp/tsapplication/tsapplication.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -TEMPLATE = app -CONFIG += hb console mobility -MOBILITY = serviceframework - -INCLUDEPATH += inc - -SOURCES += src/main.cpp \ - src/tstaskswitcher.cpp \ - -HEADERS += inc/tstaskswitcher.h \ - -#temporary workaround for epoc bug in QtSF -RESOURCES += tsapplication.qrc - -symbian { - TARGET.EPOCHEAPSIZE = 0x700000 0xF00000 - TARGET.UID3 = 0x2002677D -} - -include(../common.pri) diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsapplication/tsapplication.qrc --- a/taskswitcherapp/tsapplication/tsapplication.qrc Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - ../tsserviceplugin/tsserviceplugin.xml - ../runtimeplugins/tsdefaultruntimeplugin/tsdefaultruntimeplugin.xml - - diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/inc/tsactivitymodelitem.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcherapp/tsdevicedialogplugin/inc/tsactivitymodelitem.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,56 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: tsactivitymodelitem.h +* +*/ + +#ifndef TSACTIVITYMODELITEM_H +#define TSACTIVITYMODELITEM_H +#include "tsmodelitem.h" +#include +#include +/*! + Implements model item which represents Activity entry +*/ +class TsActivityModelItem : public TsModelItem +{ + Q_OBJECT +public: + TsActivityModelItem(QAbstractListModel &model, QObject &service, const QVariantHash &activity); + ~TsActivityModelItem(); + QVariant data(int role) const; + void close(); + void open(); + static QString applicationKeyword(); + static QString visibilityKeyword(); + static QString screenshotKeyword(); + +private: + QVariant decorationRole() const; + QVariant displayRole() const; + QVariant visibilityRole() const; + +private slots: + void thumbnailReady(QPixmap, void *); +signals: + void entryChanged(TsModelItem *); + +private: + QObject &mService; + const QVariantHash mActivity; + QIcon mIcon; + bool mRequetPending; +}; + +#endif // TSACTIVITYMODELITEM_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/inc/tsdataroles.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcherapp/tsdevicedialogplugin/inc/tsdataroles.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,27 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#ifndef TSDATAROLES_H +#define TSDATAROLES_H + +namespace TsDataRoles { + enum EntryAttributes { + Closable = Qt::UserRole + 1, + Visible, + }; +} + +#endif // TSDATAROLES_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/inc/tsdevicedialog.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcherapp/tsdevicedialogplugin/inc/tsdevicedialog.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,51 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#ifndef TSDEVICEDIALOG_H +#define TSDEVICEDIALOG_H + +#include +#include + +class QGraphicsLinearLayout; +class HbDocumentLoader; + +class TsDeviceDialog : public HbDialog, public HbDeviceDialogInterface +{ + Q_OBJECT + +public: + TsDeviceDialog(HbDocumentLoader &loader, QGraphicsItem *parent = 0); + ~TsDeviceDialog(); + + virtual bool setDeviceDialogParameters(const QVariantMap ¶meters); + virtual int deviceDialogError() const; + virtual void closeDeviceDialog(bool byClient); + virtual HbPopup *deviceDialogWidget() const; + +signals: + void deviceDialogClosed(); + +public slots: + void changeOrientation(Qt::Orientation orientation); + +private: + HbDocumentLoader &mLoader; + +}; + +#endif // TSDEVICEDIALOG_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/inc/tsdevicedialogplugin.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcherapp/tsdevicedialogplugin/inc/tsdevicedialogplugin.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,64 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#ifndef TSDEVICEDIALOGPLUGIN_H +#define TSDEVICEDIALOGPLUGIN_H + +#include + +#include +#include +#include +#include + +#include "tsdocumentloader.h" + +class CaService; +class TsDeviceDialogPlugin : public HbDeviceDialogPlugin +{ + Q_OBJECT + +public: + TsDeviceDialogPlugin(); + ~TsDeviceDialogPlugin(); + + bool accessAllowed(const QString &deviceDialogType, const QVariantMap ¶meters, const QVariantMap &securityInfo) const; + HbDeviceDialogInterface *createDeviceDialog(const QString &deviceDialogType, const QVariantMap ¶meters); + bool deviceDialogInfo(const QString &deviceDialogType, const QVariantMap ¶meters, DeviceDialogInfo *info) const; + QStringList deviceDialogTypes() const; + PluginFlags pluginFlags() const; + int error() const; + +private slots: + void activated(QModelIndex index); + void pressed(); + void longPressed(); + +signals: + void activate(QModelIndex); + +private: + int mError; + TsDocumentLoader mLoader; + QAbstractListModel *mModel; + QSharedPointer mStorage; + bool mLongPressed; + + Q_DISABLE_COPY(TsDeviceDialogPlugin) +}; + +#endif // TSDEVICEDIALOGPLUGIN_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/inc/tsdocumentloader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcherapp/tsdevicedialogplugin/inc/tsdocumentloader.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,31 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Screensaver custom document loader. +* +*/ + +#ifndef TSDOCUMENTLOADER_H +#define TSDOCUMENTLOADER_H + +#include + +class TsDocumentLoader : public HbDocumentLoader +{ + +private: + virtual QObject *createObject(const QString &type, const QString &name); + +}; + +#endif // TSDOCUMENTLOADER_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/inc/tsentrymodelitem.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcherapp/tsdevicedialogplugin/inc/tsentrymodelitem.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,46 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: tsentrymodelitem.h +* +*/ + +#ifndef TSENTRYMODELITEM_H +#define TSENTRYMODELITEM_H +#include "tsmodelitem.h" +#include + +class CaEntry; + +/*! + Class implements model item which represents Content Arsenal entry +*/ +class TsEntryModelItem : public TsModelItem +{ +public: + TsEntryModelItem(CaService &service, QSharedPointer entry, QSize mSize); + ~TsEntryModelItem(); + QVariant data(int role) const; + void close(); + void open(); + +private: + bool closable() const; + +private: + CaService &mService; + const QSharedPointer mEntry; + const QSize mSize; +}; + +#endif // TSMODEL_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/inc/tsmodel.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcherapp/tsdevicedialogplugin/inc/tsmodel.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,92 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: tsmodel.h +* +*/ + +#ifndef TSMODEL_H +#define TSMODEL_H + +#include +#include +#include +#include +#include +#include + +class CaService; +class ActivityManager; +class CaNotifier; +class TsModelItem; + +class TsModel : public QAbstractListModel +{ + Q_OBJECT + +public: + explicit TsModel(CaService &applicationSrv, + QObject &activitySrv, + QObject *parent = 0); + ~TsModel(); + + int rowCount(const QModelIndex &parent = QModelIndex()) const; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + int maxRowCount()const; + +public slots: + void openApplication(const QModelIndex &index); + void closeApplication(const QModelIndex &index); + void updateModel(); + void entryChanged(CaEntry, ChangeType); + void entryChanged(TsModelItem *); +private: + TsModelItem *entry(const QModelIndex &index) const; + void getApplications(); + void getActivities(); + void prepareActivityEntry(QVariantHash &activity); + QString getApplicationName(int id); + +private: + /* + * List containing result + */ + QList mEntries; + + /* + * Query + */ + CaQuery mQuery; + + /* + * Content Arsenal Service + */ + CaService &mApplicationService; + + /* + * Activity Service + */ + QObject &mActivityService; + + /* + * Content Arsenal Notifier + */ + CaNotifier *mNotifier; + + /* + * Icon size in model + */ + QSize mSize; +}; + +#endif // TSMODEL_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/inc/tsmodelitem.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcherapp/tsdevicedialogplugin/inc/tsmodelitem.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,35 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: tsmodelitem.h +* +*/ + +#ifndef TSMODELITEM_H +#define TSMODELITEM_H +#include +#include +/*! + Abstract class which define model item for taskswitcher +*/ +class TsModelItem: public QObject +{ + Q_OBJECT + +public: + virtual QVariant data(int role) const =0; + virtual void close() =0; + virtual void open() =0; +}; + +#endif // TSMODELITEM_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/inc/tstasksgrid.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcherapp/tsdevicedialogplugin/inc/tstasksgrid.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,32 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#ifndef TSTASKSGRID_H +#define TSTASKSGRID_H + +#include + +class TsTasksGrid : public HbGridView +{ + + Q_OBJECT + +signals: + void deleteButtonClicked(const QModelIndex &index); + +}; + +#endif // TSTASKSGRID_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/inc/tstasksgriditem.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcherapp/tsdevicedialogplugin/inc/tstasksgriditem.h Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,50 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#ifndef TSTASKSGRIDITEM_H +#define TSTASKSGRIDITEM_H + +#include + +class HbLabel; +class HbPushButton; + +class TsTasksGridItem : public HbAbstractViewItem +{ + Q_OBJECT + +public: + TsTasksGridItem(); + TsTasksGridItem(const TsTasksGridItem &item); + ~TsTasksGridItem(); + + HbAbstractViewItem *createItem(); + void updateChildItems(); + +private slots: + void handleDeleteClicked(); + +signals: + void deleteClicked(const QModelIndex &index); + +private: + HbLabel *mScreenshotLabel; + HbLabel *mApplicationNameLabel; + HbPushButton *mDeleteButton; + +}; + +#endif //TSTASKSGRIDITEM_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/resource/delete.png Binary file taskswitcherapp/tsdevicedialogplugin/resource/delete.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/src/tsactivitymodelitem.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcherapp/tsdevicedialogplugin/src/tsactivitymodelitem.cpp Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,185 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: tsactivitymodelitem.cpp +* +*/ +#include "tsactivitymodelitem.h" +#include "tsdataroles.h" +#include +#include + +/*! + \class TsActivityModelItem + \ingroup group_tsdevicedialogplugin + \brief Item presenting activity in the grid. +*/ + +/*! + Standard C++ constructor + /param model - reference to parent model + /param service - reference to initialized ActivityManager instance + /param entry - Activity data +*/ +TsActivityModelItem::TsActivityModelItem(QAbstractListModel &model, + QObject& service, + const QVariantHash & activity) + : + mService(service), + mActivity(activity), + mIcon(), + mRequetPending(false) +{ + connect(this, + SIGNAL(entryChanged(TsModelItem *)), + &model, + SLOT(entryChanged(TsModelItem *))); + connect(&mService, + SIGNAL(thumbnailReady(QPixmap, void *)), + this, + SLOT(thumbnailReady(QPixmap, void *))); +} + +/*! + Standard C++ destructor + /param service - reference to initialized ActivityManager instance + /param entry - Activity data +*/ +TsActivityModelItem::~TsActivityModelItem() +{ +} + +/*! + Returns the data stored under the given role. + /param role - requested data role + /return data encapulated by QVariant +*/ +QVariant TsActivityModelItem::data(int role) const +{ + switch (role) { + case Qt::DisplayRole: + return displayRole(); + case Qt::DecorationRole: + return decorationRole(); + case TsDataRoles::Closable: + return QVariant(false); + case TsDataRoles::Visible: + return visibilityRole(); + default: + return QVariant(QVariant::Invalid); + } +} + +/*! + Empty interface implementation +*/ +void TsActivityModelItem::close() +{ + //no implementation required +} + +/*! + Open or move to foreground activity repesented by entry +*/ +void TsActivityModelItem::open() +{ + QVariantHash::const_iterator + app(mActivity.constFind(ActivityApplicationKeyword)), + act(mActivity.constFind(ActivityActivityKeyword)); + + if (mActivity.end() != app && mActivity.end() != act) { + QMetaObject::invokeMethod(&mService, + "launchActivity", + Q_ARG(int, app.value().toInt()), + Q_ARG(QString, act.value().toString())); + } +} + +/*! + Return application name keyword +*/ +QString TsActivityModelItem::applicationKeyword() +{ + static QString applciationName(":ApplicationName"); + return applciationName; +} + +/*! + Return activity visibility status keyword +*/ +QString TsActivityModelItem::visibilityKeyword() +{ + static QString visibility("visible"); + return visibility; +} + +/*! + Return activity screenshot keyword +*/ +QString TsActivityModelItem::screenshotKeyword() +{ + static QString screenshot("screenshot"); + return screenshot; +} + +/*! + Returns the data stored under decoration role. + /return data encapulated by QVariant +*/ +QVariant TsActivityModelItem::decorationRole() const +{ + if (!mRequetPending) { + const_cast(this)->mRequetPending = true; + QVariantHash::const_iterator node(mActivity.constFind(screenshotKeyword())); + if (mActivity.end() != node) { + QMetaObject::invokeMethod(&mService, + "getThumbnail", + Q_ARG(QString, node.value().toString()), + Q_ARG(void *, const_cast(this))); + } + } + return QVariant::fromValue(HbIcon(mIcon)); +} + +/*! + Returns the data stored under display role. + /return data encapulated by QVariant +*/ +QVariant TsActivityModelItem::displayRole() const +{ + QVariantHash::const_iterator node(mActivity.find(applicationKeyword())); + return mActivity.end() != node ? node.value() : QVariant(QString::null); +} + +/*! + Returns the data stored under visibility role. + /return data encapulated by QVariant +*/ +QVariant TsActivityModelItem::visibilityRole() const +{ + QVariantHash::const_iterator node(mActivity.find(visibilityKeyword())); + return mActivity.end() != node ? node.value() : QVariant(true); +} + +/*! + Slot retrieve thumbnail form TM, update content and notify observers + /param pixmap - thumbnail content + /ptr - user data provided to request +*/ +void TsActivityModelItem::thumbnailReady(QPixmap pixmap, void *ptr) +{ + if (ptr == this) { + mIcon = pixmap; + emit entryChanged(this); + } +} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/src/tsdevicedialog.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcherapp/tsdevicedialogplugin/src/tsdevicedialog.cpp Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,94 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Default Screensaver runtime. +* +*/ + +#include +#include + +#include "tsdevicedialog.h" + +/*! + \class TsDeviceDialog + \ingroup group_tsdevicedialogplugin + \brief TaskSwitcher Device Dialog. + */ + +/*! + Constructor. + \param parent Parent. + */ +TsDeviceDialog::TsDeviceDialog(HbDocumentLoader &loader, QGraphicsItem *parent) : HbDialog(parent), mLoader(loader) +{ + connect(mainWindow(), SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(changeOrientation(Qt::Orientation))); + connect(this, SIGNAL(aboutToClose()), this, SIGNAL(deviceDialogClosed())); +} + +TsDeviceDialog::~TsDeviceDialog() +{ + qDebug("Destruction"); +} + +/*! + Sets device dialog parameters. + \param parameters Device Dialog's parameters to be set. + \ret return true if parameters are correct. + */ +bool TsDeviceDialog::setDeviceDialogParameters(const QVariantMap ¶meters) +{ + Q_UNUSED(parameters); + return false; +} + +/*! + Returns error code. + \ret error code. + */ +int TsDeviceDialog::deviceDialogError() const +{ + return 0; +} + +/*! + Closes device dialog. + \param byClient If dialog is close by client. + */ +void TsDeviceDialog::closeDeviceDialog(bool byClient) +{ + Q_UNUSED(byClient) + hide(); + emit deviceDialogClosed(); +} + +/*! + Returns device dialog instance. + \ret Device dialog instance. + */ +HbPopup *TsDeviceDialog::deviceDialogWidget() const +{ + return const_cast(this); +} + +void TsDeviceDialog::changeOrientation(Qt::Orientation orientation) +{ + qDebug("Loading DOCML data for orientation %d", orientation); + bool ok(true); + if (orientation == Qt::Horizontal) { + mLoader.load(":/xml/resource/layout.docml", "landscape", &ok); + } else { + mLoader.load(":/xml/resource/layout.docml", "portrait", &ok); + } + Q_ASSERT(ok); +} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/src/tsdevicedialogplugin.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcherapp/tsdevicedialogplugin/src/tsdevicedialogplugin.cpp Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,177 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#include +#include +#include +#include + +#include "tsdevicedialogplugin.h" +#include "tsdevicedialog.h" +#include "tstasksgrid.h" +#include "tstasksgriditem.h" +#include "tsdocumentloader.h" +#include "tsmodel.h" +#include + +/*! + \class TsDeviceDialogPlugin + \ingroup group_tsdevicedialogplugin + \brief TaskSwitcher Device Dialog Plug-in. + */ + +const QString KTsDialogType = "com.nokia.taskswitcher.tsdevicedialogplugin/1.0"; + +/*! + Constructor. + */ +TsDeviceDialogPlugin::TsDeviceDialogPlugin() : mError(0), mModel(0), mStorage(CaService::instance()), mLongPressed(false) +{ +} + +TsDeviceDialogPlugin::~TsDeviceDialogPlugin() +{ + delete mModel; +} +/*! + \reimp + */ +bool TsDeviceDialogPlugin::accessAllowed(const QString &deviceDialogType, const QVariantMap ¶meters, const QVariantMap &securityInfo) const +{ + Q_UNUSED(deviceDialogType) + Q_UNUSED(parameters) + Q_UNUSED(securityInfo) + + // This plugin doesn't perform operations that may compromise security. + // All clients are allowed to use. + return true; +} + +/*! + \reimp + */ +HbDeviceDialogInterface *TsDeviceDialogPlugin::createDeviceDialog(const QString &deviceDialogType, const QVariantMap ¶meters) +{ + Q_UNUSED(parameters) + TsDeviceDialog *dialog(0); + if (deviceDialogType == KTsDialogType) { + if (0 == mModel) { + QtMobility::QServiceManager serviceManager; + QObject *objPtr(serviceManager.loadInterface("com.nokia.qt.activities.ActivityManager")); + if (objPtr) { + objPtr->setParent(this);//make it autodestucted + } else { + objPtr = this;//activity plugin is not present. provide invalid instance because its not critical functionality. + //QMetaObject::invokeMethod is safe to use in such a case. + } + mModel = new TsModel(*mStorage, *objPtr); + } + + mLoader.reset(); + bool ok(true); + mLoader.load(":/xml/resource/layout.docml", &ok); + Q_ASSERT(ok); + + dialog = qobject_cast(mLoader.findWidget("tsdevicedialog")); + TsTasksGrid *grid = qobject_cast(mLoader.findWidget("taskgrid")); + Q_ASSERT(dialog); + Q_ASSERT(grid); + + dialog->changeOrientation(dialog->mainWindow()->orientation()); + + grid->setItemPrototype(new TsTasksGridItem()); + grid->setModel(mModel); + + static_cast(mModel)->updateModel(); + + // connect the grid and model + qRegisterMetaType("QModelIndex"); + + disconnect(grid, SIGNAL(activated(QModelIndex)), this, SLOT(activated(QModelIndex))); + disconnect(grid, SIGNAL(pressed(QModelIndex)), this, SLOT(pressed())); + disconnect(grid, SIGNAL(longPressed(HbAbstractViewItem *, QPointF)), this, SLOT(longPressed())); + disconnect(this, SIGNAL(activate(QModelIndex)), mModel, SLOT(openApplication(QModelIndex))); + disconnect(this, SIGNAL(activate(QModelIndex)), dialog, SLOT(close())); + disconnect(grid, SIGNAL(deleteButtonClicked(QModelIndex)), mModel, SLOT(closeApplication(QModelIndex))); + + connect(grid, SIGNAL(activated(QModelIndex)), this, SLOT(activated(QModelIndex))); + connect(grid, SIGNAL(pressed(QModelIndex)), this, SLOT(pressed())); + connect(grid, SIGNAL(longPressed(HbAbstractViewItem *, QPointF)), this, SLOT(longPressed())); + connect(this, SIGNAL(activate(QModelIndex)), mModel, SLOT(openApplication(QModelIndex))); + connect(this, SIGNAL(activate(QModelIndex)), dialog, SLOT(close())); + connect(grid, SIGNAL(deleteButtonClicked(QModelIndex)), mModel, SLOT(closeApplication(QModelIndex)), Qt::QueuedConnection); + } + return dialog; +} + +/*! + \reimp + */ +bool TsDeviceDialogPlugin::deviceDialogInfo(const QString &deviceDialogType, const QVariantMap ¶meters, DeviceDialogInfo *info) const +{ + Q_UNUSED(parameters) + Q_UNUSED(deviceDialogType) + + info->group = GenericDeviceDialogGroup; + info->flags = NoDeviceDialogFlags; + info->priority = DefaultPriority; + + return true; +} + +/*! + \reimp + */ +QStringList TsDeviceDialogPlugin::deviceDialogTypes() const +{ + return QStringList(KTsDialogType); +} + +/*! + \reimp + */ +HbDeviceDialogPlugin::PluginFlags TsDeviceDialogPlugin::pluginFlags() const +{ + return PluginFlags(PreloadPlugin | KeepPluginLoaded); +} + +/*! + \reimp + */ +int TsDeviceDialogPlugin::error() const +{ + return mError; +} + +void TsDeviceDialogPlugin::activated(QModelIndex index) +{ + if (!mLongPressed) { + emit activate(index); + } +} + +void TsDeviceDialogPlugin::pressed() +{ + mLongPressed = false; +} + +void TsDeviceDialogPlugin::longPressed() +{ + mLongPressed = true; +} + +Q_EXPORT_PLUGIN2(tsdevicedialogplugin, TsDeviceDialogPlugin) diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/src/tsdocumentloader.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcherapp/tsdevicedialogplugin/src/tsdocumentloader.cpp Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,43 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Screensaver custom document loader. +* +*/ + +#include "tsdocumentloader.h" +#include "tstasksgrid.h" +#include "tsdevicedialog.h" + +/*! + \class TsDocumentLoader + \ingroup group_tsdevicedialogplugin + \brief Document loader. + + TS implementation of document loader. It is creating TS objects used in UI +*/ + +QObject *TsDocumentLoader::createObject(const QString &type, const QString &name) +{ + if (type == TsTasksGrid::staticMetaObject.className()) { + QObject *object = new TsTasksGrid(); + object->setObjectName(name); + return object; + } else if (type == TsDeviceDialog::staticMetaObject.className()) { + QObject *object = new TsDeviceDialog(*this); + object->setObjectName(name); + return object; + } + + return HbDocumentLoader::createObject(type, name); +} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/src/tsentrymodelitem.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcherapp/tsdevicedialogplugin/src/tsentrymodelitem.cpp Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,95 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: tsentrymodelitem.cpp +* +*/ +#include "tsentrymodelitem.h" +#include "tsdataroles.h" + +#include + +/*! + \class TsEntryModelItem + \ingroup group_tsdevicedialogplugin + \brief Item presenting running apps in the grid. +*/ + +/*! + Standard C++ constructor + /param service - reference to initialized Content Aresnal client instance + /param entry - Content Arsenal data + /param size - icon size +*/ +TsEntryModelItem::TsEntryModelItem(CaService& service, QSharedPointer entry, QSize size) + : + mService(service), + mEntry(entry), + mSize(size) +{ + //no implementation required +} + +/*! + Standard C++ destructor +*/ +TsEntryModelItem::~TsEntryModelItem() +{ +} + +/*! + Returns the data stored under the given role. + /param role - requested data role + /return data encapulated by QVariant +*/ +QVariant TsEntryModelItem::data(int role) const +{ + switch (role) { + case Qt::DisplayRole: + return QVariant(mEntry->text()); + case Qt::DecorationRole: + return QVariant(mEntry->makeIcon(mSize)); + case TsDataRoles::Closable: + return QVariant(closable()); + case TsDataRoles::Visible: + return QVariant(true); + default: + return QVariant(QVariant::Invalid); + } +} + +/*! + Close running application repesented by entry +*/ +void TsEntryModelItem::close() +{ + mService.executeCommand(mEntry->id(), QString("close")); +} + +/*! + Open or move to foreground application repesented by entry +*/ +void TsEntryModelItem::open() +{ + mService.executeCommand(mEntry->id(), QString("open")); +} + +/*! + Check if application represented by entry is running. + /return true if application is running, false otherwise +*/ +bool TsEntryModelItem::closable() const +{ + return (mEntry->flags().testFlag(RunningEntryFlag) && + !mEntry->flags().testFlag(SystemEntryFlag)); +} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/src/tsmodel.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcherapp/tsdevicedialogplugin/src/tsmodel.cpp Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,267 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: tsmodel.cpp +* +*/ +#include "tsmodel.h" +#include "tsmodelitem.h" +#include "tsentrymodelitem.h" +#include "tsactivitymodelitem.h" +#include "tsdataroles.h" + +#include +#include +#include +#include + +#include +#include +#include + +const char entryTypeKeyword[] = "application"; +const char applicationUidKeyword [] = "application:uid"; +const int maxItems(10); +/*! + \class TsModel + \ingroup group_tsdevicedialogplugin + \brief Model storing running application and activieties. +*/ + +/*! + Constructor + \param query used to create model + \param pointer to parent object +*/ +TsModel::TsModel(CaService &applicationSrv, QObject &activitySrv, QObject *parent) : + QAbstractListModel(parent), + mEntries(), + mApplicationService(applicationSrv), + mActivityService(activitySrv), + mNotifier(NULL), + mSize(240, 240) +{ + // creating query + mQuery.setEntryRoles(ItemEntryRole); + mQuery.addEntryTypeName(entryTypeKeyword); + mQuery.setFlagsOn(VisibleEntryFlag); + mQuery.setFlagsOff(MissingEntryFlag); + mQuery.setFlagsOn(UsedEntryFlag); + mQuery.setSort(LastUsedSortAttribute, Qt::DescendingOrder); + // requesting new data + updateModel(); + // creating notyfication filter + CaNotifierFilter filter(mQuery); + mNotifier = mApplicationService.createNotifier(filter); + connect(mNotifier, SIGNAL(entryChanged(CaEntry,ChangeType)), this, SLOT(entryChanged(CaEntry, ChangeType))); + connect(mNotifier, SIGNAL(entryTouched(int)), this, SLOT(updateModel())); + if (mQuery.parentId() > 0) { + connect(mNotifier, SIGNAL(groupContentChanged(int)), this, SLOT(updateModel())); + } +} + +/*! + Destructor +*/ +TsModel::~TsModel() +{ + qDeleteAll(mEntries); + delete mNotifier; +} + +/*! + Returns count of rows in model + \retval number of rows +*/ +int TsModel::rowCount( + const QModelIndex &parent) const +{ + Q_UNUSED(parent); + return mEntries.count(); +} + +/*! + Returns appropiate model's data + \param index model index + \param role which data role to return + \retval models data +*/ +QVariant TsModel::data(const QModelIndex &index, + int role) const +{ + return index.isValid() ? entry(index)->data(role) : QVariant(); +} + +/*! + Returns maximum anount of data allowed for model + \retval maximum data count +*/ + +int TsModel::maxRowCount()const +{ + return maxItems; +} + +/*! + Activate one of model entries +*/ +void TsModel::openApplication(const QModelIndex &index) +{ + if (!index.isValid()) { + return; + } + entry(index)->open(); +} + +/*! + Close one of moder entries +*/ +void TsModel::closeApplication(const QModelIndex &index) +{ + if (!index.isValid() || !entry(index)->data(TsDataRoles::Closable).toBool()) { + return; + } + entry(index)->close(); +} + +/*! + Updates model with fresh entries +*/ +void TsModel::updateModel() +{ + //clear current data + qDeleteAll(mEntries); + mEntries.clear(); + + beginResetModel(); + getApplications(); + getActivities(); + endResetModel(); + +} + +/*! + Read list of running applications +*/ +void TsModel::getApplications() +{ + //get running applications + TsModelItem *entry(0); + QList< QSharedPointer > applications(mApplicationService.getEntries(mQuery)); + foreach(QSharedPointer application, applications) { + //CA entry ownership is transfered to model item + entry = new TsEntryModelItem(mApplicationService, application, mSize); + if (entry) { + //add running application filtering + if (entry->data(TsDataRoles::Closable).toBool() && //running application filtering + entry->data(TsDataRoles::Visible).toBool() && //visible applications filtering + maxRowCount() > mEntries.count()) { //maximum model size check + mEntries.append(entry); + } else { + delete entry; + } + + } + } +} + +/*! + Read current activities +*/ +void TsModel::getActivities() +{ + //get activities + TsModelItem *entry(0); + QList activities; + QMetaObject::invokeMethod(&mActivityService, "activitiesList", Q_RETURN_ARG(QList, activities)); + foreach(QVariantHash activity, activities) { + prepareActivityEntry(activity); + entry = new TsActivityModelItem(*this, mActivityService, activity); + if (entry) { + if (entry->data(TsDataRoles::Visible).toBool() && //visible activity filtering + maxRowCount() > mEntries.count()) { //maximum model size check + mEntries.append(entry); + } else { + delete entry; + } + } + } +} + +/*! + Modify activity entry replacing application id with name +*/ +void TsModel::prepareActivityEntry(QVariantHash &activity) +{ + activity.insert(TsActivityModelItem::applicationKeyword(), + activity.find(ActivityActivityKeyword) == activity.end() ? + QString::null : + getApplicationName(activity[ActivityApplicationKeyword].toInt())); +} + +/*! + Return application name + \param id - reqiested application identyfier +*/ +QString TsModel::getApplicationName(int id) +{ + CaQuery query; + QString retVal; + query.setEntryRoles(ItemEntryRole); + query.addEntryTypeName(entryTypeKeyword); + query.setAttribute(applicationUidKeyword, QString::number(id)); + QList< QSharedPointer > applications(mApplicationService.getEntries(query)); + if (applications.begin() != applications.end()) { + retVal = (*applications.begin())->text(); + } + return retVal; +} + +/*! + Called when some entry was changed + \param updatedEntry entry that was changed + \param change change type +*/ +void TsModel::entryChanged(CaEntry updatedEntry, + ChangeType change) +{ + Q_UNUSED(updatedEntry); + Q_UNUSED(change) + updateModel(); +} + +/*! + Called when some item was changed + \param itemPtr - address of updated item +*/ +void TsModel::entryChanged(TsModelItem *itemPtr) +{ + QList::const_iterator iter(mEntries.constBegin()); + for (int offset(0); iter != mEntries.constEnd(); ++iter, ++offset) { + if ((*iter) == itemPtr) { + emit dataChanged(index(offset, 0), index(offset, 0)); + break; + } + } +} + +/*! + Returns an entry from model + \param index of entry in model + \retval pointer to an entry +*/ +TsModelItem *TsModel::entry(const QModelIndex &index) const +{ + return mEntries.at(index.row()); +} + diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/src/tstasksgriditem.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcherapp/tsdevicedialogplugin/src/tstasksgriditem.cpp Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,102 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#include "tstasksgriditem.h" + +#include +#include +#include +#include +#include "tsdataroles.h" + +/*! + \class TsTasksGridItem + \ingroup group_tsdevicedialogplugin + \brief Item that should be presented in grid. +*/ + + +TsTasksGridItem::TsTasksGridItem() : HbAbstractViewItem(), mScreenshotLabel(0), mApplicationNameLabel(0), mDeleteButton(0) +{ +} + +TsTasksGridItem::TsTasksGridItem(const TsTasksGridItem &item) : HbAbstractViewItem(item) +{ + // add screenshot + mScreenshotLabel = new HbLabel(); + mScreenshotLabel->setAlignment(Qt::AlignHCenter); + + // add application name label + mApplicationNameLabel = new HbLabel(); + mApplicationNameLabel->setAlignment(Qt::AlignCenter); + + // add close app button + HbIcon deleteIcon(":/resource/delete.png"); + mDeleteButton = new HbPushButton(); + mDeleteButton->setIcon(deleteIcon); + mDeleteButton->setPreferredSize(48, 48); + mDeleteButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum); + mDeleteButton->setEnabled(true); + connect(mDeleteButton, SIGNAL(clicked()), this, SLOT(handleDeleteClicked())); + mDeleteButton->hide(); + + setContentsMargins(5, 5, 5, 5); + + // add all items to layout + HbAnchorLayout *anchorLayout = new HbAnchorLayout(); + anchorLayout->setAnchor(mApplicationNameLabel, Hb::LeftEdge, anchorLayout, Hb::LeftEdge, 0); + anchorLayout->setAnchor(mApplicationNameLabel, Hb::TopEdge, anchorLayout, Hb::TopEdge, 0); + anchorLayout->setAnchor(mApplicationNameLabel, Hb::RightEdge, anchorLayout, Hb::RightEdge, 0); + + anchorLayout->setAnchor(mScreenshotLabel, Hb::TopEdge, mApplicationNameLabel, Hb::BottomEdge, 0); + anchorLayout->setAnchor(mScreenshotLabel, Hb::LeftEdge, anchorLayout, Hb::LeftEdge, 0); + anchorLayout->setAnchor(mScreenshotLabel, Hb::RightEdge, anchorLayout, Hb::RightEdge, 0); + anchorLayout->setAnchor(mScreenshotLabel, Hb::BottomEdge, anchorLayout, Hb::BottomEdge, 0); + + anchorLayout->setAnchor(mDeleteButton, Hb::RightEdge, mScreenshotLabel, Hb::RightEdge, 0); + anchorLayout->setAnchor(mDeleteButton, Hb::TopEdge, mScreenshotLabel, Hb::TopEdge, 0); + + setLayout(anchorLayout); +} + +TsTasksGridItem::~TsTasksGridItem() +{ +} + +HbAbstractViewItem *TsTasksGridItem::createItem() +{ + TsTasksGridItem *newItem = new TsTasksGridItem(*this); + connect(newItem, SIGNAL(deleteClicked(QModelIndex)), itemView(), SIGNAL(deleteButtonClicked(QModelIndex))); + return newItem; +} + +void TsTasksGridItem::handleDeleteClicked() +{ + emit deleteClicked(modelIndex()); +} + +void TsTasksGridItem::updateChildItems() +{ + mScreenshotLabel->setIcon(modelIndex().data(Qt::DecorationRole).value()); + mApplicationNameLabel->setPlainText(modelIndex().data(Qt::DisplayRole).toString()); + QVariant status(modelIndex().data(TsDataRoles::Closable)); + const bool isRunning(status.isValid() && status.toBool()); + if (isRunning) { + mDeleteButton->show(); + } else { + mDeleteButton->hide(); + } +} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/taskswitcher.qm Binary file taskswitcherapp/tsdevicedialogplugin/taskswitcher.qm has changed diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/taskswitcher.ts --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcherapp/tsdevicedialogplugin/taskswitcher.ts Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,16 @@ + + + + + + Task switcher popup title text. Application allows user to swap between running and recently used applications and to clear them from the list. + Task switcher + Task switcher + cell_tport_appsw_pane_t1 + tsw_01 + title + ts + False + + + diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/tsdevicedialogplugin.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcherapp/tsdevicedialogplugin/tsdevicedialogplugin.pro Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,67 @@ +# +# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: tsdevicedialogplugin.pro +# + +TEMPLATE = lib +CONFIG += hb plugin mobility +MOBILITY = serviceframework + +include (../common.pri) + +HEADERS += inc/tsdevicedialog.h \ + inc/tsdevicedialogplugin.h \ + inc/tsmodel.h \ + inc/tsmodelitem.h \ + inc/tsentrymodelitem.h \ + inc/tsactivitymodelitem.h \ + inc/tstasksgrid.h \ + inc/tstasksgriditem.h \ + inc/tsdocumentloader.h \ + inc/tsdataroles.h \ + +SOURCES += src/tsdevicedialog.cpp \ + src/tsdevicedialogplugin.cpp \ + src/tsmodel.cpp \ + src/tsentrymodelitem.cpp \ + src/tsactivitymodelitem.cpp \ + src/tstasksgriditem.cpp \ + src/tsdocumentloader.cpp \ + +INCLUDEPATH += . \ + ./inc \ + +LIBS += -lcaclient + +TRANSLATIONS = taskswitcher.ts + +RESOURCES += tsdevicedialogplugin.qrc + +symbian { + TARGET.CAPABILITY = CAP_ECOM_PLUGIN + TARGET.UID3 = 0x2002677F + pluginstub.sources = tsdevicedialogplugin.dll + pluginstub.path = /resource/plugins/devicedialogs + + # ugly hack + translation.sources = ./*.qm + translation.path = $$QT_PLUGINS_BASE_DIR/../translations + + DEPLOYMENT += pluginstub translation +} + +win32 { + include ($$[QMAKE_MKSPECS]/features/hb_install.prf) + DESTDIR = $$HB_PLUGINS_DIR/devicedialogs +} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsdevicedialogplugin/tsdevicedialogplugin.qrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcherapp/tsdevicedialogplugin/tsdevicedialogplugin.qrc Mon May 03 12:24:59 2010 +0300 @@ -0,0 +1,8 @@ + + + resource/layout.docml + + + resource/delete.png + + diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/s60/tsexternalactivationwatcher_p.h --- a/taskswitcherapp/tsserviceplugin/inc/s60/tsexternalactivationwatcher_p.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSEXTERNALACTIVATIONWATCHERPRIVATE_H -#define TSEXTERNALACTIVATIONWATCHERPRIVATE_H - -#include -#include - -class TsExternalActivationWatcher; - -class TsExternalActivationWatcherPrivate : public CActive -{ -public: - TsExternalActivationWatcherPrivate(TsExternalActivationWatcher *parent); - virtual ~TsExternalActivationWatcherPrivate(); - -public: //From CActive - /** - * Implements cancellation of an outstanding request. - */ - virtual void DoCancel(); - - /** - Handles an active object's request completion event. - */ - void RunL(); - -private: - bool CheckActivationFlag(); - void ResetActivationFlag(); - -private: - TsExternalActivationWatcher *mParent; - RProperty mProperty; - -}; - -#endif // TSEXTERNALACTIVATIONWATCHERPRIVATE_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/s60/tslongpresswatcher_p.h --- a/taskswitcherapp/tsserviceplugin/inc/s60/tslongpresswatcher_p.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSLONGPRESSWATCHERPRIVATE_H -#define TSLONGPRESSWATCHERPRIVATE_H - -#include -#include - -class TsLongPressWatcher; - -class TsLongPressWatcherPrivate : public CActive -{ -public: - TsLongPressWatcherPrivate(TsLongPressWatcher *parent); - virtual ~TsLongPressWatcherPrivate(); - -public: //From CActive - /** - * Implements cancellation of an outstanding request. - */ - virtual void DoCancel(); - - /** - Handles an active object's request completion event. - */ - void RunL(); - -private: - bool checkLongPressFlag(); - void setBackgroundState(); - -private: - TsLongPressWatcher *mParent; - RProperty mProperty; - -}; - -#endif // TSLONGPRESSWATCHERPRIVATE_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/tsactivation.h --- a/taskswitcherapp/tsserviceplugin/inc/tsactivation.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSACTIVATION_H -#define TSACTIVATION_H - -#include "tsactivationinterface.h" - -class TsActivation : public TsActivationInterface -{ - - Q_OBJECT - -public: - TsActivation(QObject *parent = 0); - -}; - -#endif // TSACTIVATION_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/tsactivationinterface.h --- a/taskswitcherapp/tsserviceplugin/inc/tsactivationinterface.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSACTIVATIONINTERFACE_H -#define TSACTIVATIONINTERFACE_H - -#include - -class TsActivationInterface : public QObject -{ - - Q_OBJECT - -public: - TsActivationInterface(QObject *parent = 0) : QObject(parent) {} - virtual ~TsActivationInterface() {}; - -signals: - void activated(); - -}; - -#endif // TSACTIVATIONINTERFACE_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/tsclosedapplicationsfiltermodel.h --- a/taskswitcherapp/tsserviceplugin/inc/tsclosedapplicationsfiltermodel.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef TSCLOSEDAPPLICATIONSFILTERMODEL_H -#define TSCLOSEDAPPLICATIONSFILTERMODEL_H - -#include - -class TsClosedApplicationsFilterModel : public QSortFilterProxyModel -{ - Q_OBJECT - -public: - explicit TsClosedApplicationsFilterModel(QObject *parent = 0); - -public: - void addId(int id); - void clearIds(); - -protected: - bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const; - -private: - /* - * List containing result - */ - QList mClosedIds; -}; - -#endif // TSCLOSEDAPPLICATIONSFILTERMODEL_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/tsdataroles.h --- a/taskswitcherapp/tsserviceplugin/inc/tsdataroles.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSDATAROLES_H -#define TSDATAROLES_H - -namespace TsDataRoles { - enum EntryAttributes { - Closable = Qt::UserRole + 1, - EntryId - }; -} - -#endif // TSDATAROLES_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/tsdeactivation.h --- a/taskswitcherapp/tsserviceplugin/inc/tsdeactivation.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSDEACTIVATION_H -#define TSDEACTIVATION_H - -#include "tsdeactivationinterface.h" - -class QEvent; - -class TsDeactivation : public TsDeactivationInterface -{ - Q_OBJECT - -public: - TsDeactivation(QObject *parent = 0); - -protected: - bool eventFilter(QObject *obj, QEvent *event); - -}; - -#endif // TSDEACTIVATION_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/tsdeactivationinterface.h --- a/taskswitcherapp/tsserviceplugin/inc/tsdeactivationinterface.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSDEACTIVATIONINTERFACE_H -#define TSDEACTIVATIONINTERFACE_H - -#include - -class TsDeactivationInterface : public QObject -{ - - Q_OBJECT - -public: - TsDeactivationInterface(QObject *parent = 0) : QObject(parent) {} - virtual ~TsDeactivationInterface() {}; - -signals: - void deactivated(); - -}; - -#endif // TSDEACTIVATIONINTERFACE_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/tsdocumentloader.h --- a/taskswitcherapp/tsserviceplugin/inc/tsdocumentloader.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Screensaver custom document loader. -* -*/ - -#ifndef TSDOCUMENTLOADER_H -#define TSDOCUMENTLOADER_H - -#include - -class TsDocumentLoader : public HbDocumentLoader -{ - -private: - virtual QObject *createObject(const QString &type, const QString &name); - -}; - -#endif // TSDOCUMENTLOADER_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/tsexternalactivationwatcher.h --- a/taskswitcherapp/tsserviceplugin/inc/tsexternalactivationwatcher.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSEXTERNALACTIVATIONWATCHER_H -#define TSEXTERNALACTIVATIONWATCHER_H - -#include - -class TsExternalActivationWatcherPrivate; - -class TsExternalActivationWatcher : public QObject -{ - Q_OBJECT - -public: - TsExternalActivationWatcher(QObject *parent = 0); - virtual ~TsExternalActivationWatcher(); - -signals: - void activationRequested(); - -private: - TsExternalActivationWatcherPrivate *d_ptr; - friend class TsExternalActivationWatcherPrivate; - -}; - -#endif // TSEXTERNALACTIVATIONWATCHER_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/tsitemprovider.h --- a/taskswitcherapp/tsserviceplugin/inc/tsitemprovider.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSITEMPROVIDER_H -#define TSITEMPROVIDER_H - -#include "tsitemproviderinterface.h" - -#include - -class TsClosedApplicationsFilterModel; -class CaService; - -class TsItemProvider : public TsItemProviderInterface -{ - - Q_OBJECT - -public: - TsItemProvider(QObject *parent = 0); - virtual ~TsItemProvider(); - -public: - virtual QAbstractItemModel *model(); - -public slots: - virtual void openApplication(const QModelIndex &index); - virtual void closeApplication(const QModelIndex &index); - virtual void closeAllApplications(); - virtual void clearClosedApplicationList(); - -private: - TsClosedApplicationsFilterModel *mModel; - QSharedPointer mService; - -}; - -#endif // TSITEMPROVIDER_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/tsitemproviderinterface.h --- a/taskswitcherapp/tsserviceplugin/inc/tsitemproviderinterface.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSITEMPROVIDERINTERFACE_H -#define TSITEMPROVIDERINTERFACE_H - -#include - -class QAbstractItemModel; -class QModelIndex; - -class TsItemProviderInterface : public QObject -{ - - Q_OBJECT - -public: - TsItemProviderInterface(QObject *parent = 0) : QObject(parent) {} - virtual ~TsItemProviderInterface() {}; - -public: - Q_INVOKABLE virtual QAbstractItemModel *model() = 0; - -public slots: - virtual void openApplication(const QModelIndex &index) = 0; - virtual void closeApplication(const QModelIndex &index) = 0; - virtual void closeAllApplications() = 0; - virtual void clearClosedApplicationList() = 0; - -}; - -#endif // TSITEMPROVIDERINTERFACE_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/tslongpresswatcher.h --- a/taskswitcherapp/tsserviceplugin/inc/tslongpresswatcher.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSLONGPRESSWATCHER_H -#define TSLONGPRESSWATCHER_H - -#include - -class TsLongPressWatcherPrivate; - -class TsLongPressWatcher : public QObject -{ - - Q_OBJECT - -public: - TsLongPressWatcher(QObject *parent = 0); - ~TsLongPressWatcher(); - -signals: - void applicationKeyLongPress(); - -private: - TsLongPressWatcherPrivate *d_ptr; - - friend class TsLongPressWatcherPrivate; - -}; - -#endif // TSLONGPRESSWATCHER_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/tspresentation.h --- a/taskswitcherapp/tsserviceplugin/inc/tspresentation.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSPRESENTATION_H -#define TSPRESENTATION_H - -#include "tspresentationinterface.h" -#include "tsdocumentloader.h" - -class HbDialog; -class TsTasksGrid; - -class TsPresentation : public TsPresentationInterface -{ - Q_OBJECT - -public: - TsPresentation(QObject *parent = 0); - -public: - virtual void setModel(QAbstractItemModel *model); - -public slots: - virtual void hide(); - virtual void show(); - -private slots: - void loadOrientationSpecificLayoutData(Qt::Orientation orientation); - -private: - TsDocumentLoader mLoader; - HbDialog *mDialog; - TsTasksGrid *mGrid; - -}; - -#endif // TSPRESENTATION_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/tspresentationinterface.h --- a/taskswitcherapp/tsserviceplugin/inc/tspresentationinterface.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSPRESENTATIONINTERFACE_H -#define TSPRESENTATIONINTERFACE_H - -#include - -class QAbstractItemModel; -class QModelIndex; - -class TsPresentationInterface : public QObject -{ - Q_OBJECT - -public: - TsPresentationInterface(QObject *parent = 0) : QObject(parent) {} - virtual ~TsPresentationInterface() {}; - -public: - Q_INVOKABLE virtual void setModel(QAbstractItemModel *model) = 0; - -public slots: - virtual void hide() = 0; - virtual void show() = 0; - -signals: - void openApplication(const QModelIndex &index); - void closeApplication(const QModelIndex &index); - void closeAllApplications(); - void hideTaskSwitcher(); - -}; - -#endif // TSPRESENTATIONINTERFACE_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/tsrecentapplicationsmodel.h --- a/taskswitcherapp/tsserviceplugin/inc/tsrecentapplicationsmodel.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: recentapplicationsmodel.h -* -*/ - -#ifndef TSRECENTAPPLICATIONSMODEL_H -#define TSRECENTAPPLICATIONSMODEL_H - -#include -#include -#include -#include -#include -#include - -class CaService; -class CaNotifier; - -class TsRecentApplicationsModel : public QAbstractListModel -{ - Q_OBJECT - -public: - explicit TsRecentApplicationsModel(QObject *parent = 0); - ~TsRecentApplicationsModel(); - - int rowCount(const QModelIndex &parent = QModelIndex()) const; - virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; - -public slots: - void updateModel(); - void entryChanged(CaEntry, ChangeType); - -private: - bool closeable(const QModelIndex &index) const; - QVariant entryId(const QModelIndex &index) const; - CaEntry *entry(const QModelIndex &index) const; - -public: - /* - * List containing result - */ - QList mEntries; - - /* - * Query - */ - CaQuery mQuery; - - /* - * Content Arsenal Service - */ - QSharedPointer mService; - - /* - * Content Arsenal Notifier - */ - CaNotifier *mNotifier; - - /* - * Icon size in model - */ - QSize mSize; -}; - -#endif // TSRECENTAPPLICATIONSMODEL_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/tsserviceplugin.h --- a/taskswitcherapp/tsserviceplugin/inc/tsserviceplugin.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSSERVICEPLUGIN_H -#define TSSERVICEPLUGIN_H - -#include -#include - -QTM_USE_NAMESPACE - -class TsServicePlugin : public QObject, public QServicePluginInterface -{ - Q_OBJECT - Q_INTERFACES(QtMobility::QServicePluginInterface) - -public: - QObject *createInstance(const QServiceInterfaceDescriptor &descriptor, QServiceContext *context, QAbstractSecuritySession *session); - -}; - -#endif //TSSERVICEPLUGIN_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/tstaskpopuphandler.h --- a/taskswitcherapp/tsserviceplugin/inc/tstaskpopuphandler.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSTASKPOPUPHANDLER_H -#define TSTASKPOPUPHANDLER_H - -#include -#include -#include - -class HbAbstractViewItem; -class T_TsTaskPopupHandler; - -class TsTaskPopupHandler : public QObject -{ - Q_OBJECT - -public: - explicit TsTaskPopupHandler(QObject *parent = 0); - -signals: - void closeTask(const QModelIndex &index); - void closeAllTasks(); - -public slots: - void showTaskPopup(HbAbstractViewItem *item, const QPointF &coords); - -private: - bool isClosable(const QModelIndex &index) const; - bool containsClosableItems(const QAbstractItemModel &model) const; - - friend class T_TsTaskPopupHandler; - -}; - -#endif // TSTASKPOPUPHANDLER_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/tstasksgrid.h --- a/taskswitcherapp/tsserviceplugin/inc/tstasksgrid.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSTASKSGRID_H -#define TSTASKSGRID_H - -#include - -class TsTasksGrid : public HbGridView -{ - - Q_OBJECT - -signals: - void deleteButtonClicked(const QModelIndex &index); - -}; - -#endif // TSTASKSGRID_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/tstasksgriditem.h --- a/taskswitcherapp/tsserviceplugin/inc/tstasksgriditem.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSTASKSGRIDITEM_H -#define TSTASKSGRIDITEM_H - -#include - -class HbLabel; -class HbPushButton; - -class TsTasksGridItem : public HbAbstractViewItem -{ - Q_OBJECT - -public: - TsTasksGridItem(); - TsTasksGridItem(const TsTasksGridItem& item); - ~TsTasksGridItem(); - - HbAbstractViewItem *createItem(); - void updateChildItems(); - -private slots: - void handleDeleteClicked(); - -signals: - void deleteClicked(const QModelIndex &index); - -private: - HbLabel *mScreenshotLabel; - HbLabel *mApplicationNameLabel; - HbPushButton *mDeleteButton; - -}; - -#endif //TSTASKSGRIDITEM_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/win/tsexternalactivationwatcher_p.h --- a/taskswitcherapp/tsserviceplugin/inc/win/tsexternalactivationwatcher_p.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSEXTERNALACTIVATIONWATCHERPRIVATE_H -#define TSEXTERNALACTIVATIONWATCHERPRIVATE_H - -#include -#include - -QTM_BEGIN_NAMESPACE - class QValueSpacePublisher; - class QValueSpaceSubscriber; -QTM_END_NAMESPACE - -QTM_USE_NAMESPACE - -class TsExternalActivationWatcherPrivate : public QObject -{ - Q_OBJECT - -public: - TsExternalActivationWatcherPrivate(QObject *parent); - -private slots: - void checkActivationFlag(); - -signals: - void activationRequested(); - -private: - QValueSpacePublisher *mPublisher; - QValueSpaceSubscriber *mSubscriber; - -}; - -#endif // TSEXTERNALACTIVATIONWATCHERPRIVATE_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/inc/win/tslongpresswatcher_p.h --- a/taskswitcherapp/tsserviceplugin/inc/win/tslongpresswatcher_p.h Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#ifndef TSLONGPRESSWATCHERPRIVATE_H -#define TSLONGPRESSWATCHERPRIVATE_H - -#include - -class TsLongPressWatcher; - -class TsLongPressWatcherPrivate : public QObject -{ - - Q_OBJECT - -public: - TsLongPressWatcherPrivate(TsLongPressWatcher *parent); - virtual ~TsLongPressWatcherPrivate(); - - static bool hotKeyFilter(void *message); - static TsLongPressWatcherPrivate *instance; - -signals: - void applicationKeyLongPress(); - -}; - -#endif // TSLONGPRESSWATCHERPRIVATE_H diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/resource/delete.png Binary file taskswitcherapp/tsserviceplugin/resource/delete.png has changed diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/resource/tsexternalactivation.qcrml --- a/taskswitcherapp/tsserviceplugin/resource/tsexternalactivation.qcrml Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ - - - - diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/serviceinstaller/serviceinstaller.pro --- a/taskswitcherapp/tsserviceplugin/serviceinstaller/serviceinstaller.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -TEMPLATE = subdirs -SUBDIRS = tsserviceinstaller - -symbian { - load(data_caging_paths) - - plugin.sources = tsserviceplugin.dll - plugin.path = $$QT_PLUGINS_BASE_DIR - - installer.pkg_postrules += "\"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/tsserviceinstaller.exe\" \ - - \"!:\sys\bin\tsserviceinstaller.exe\",FR,RI,RW" - - DEPLOYMENT += plugin installer -} else { - message("You might need to run tsserviceinstaller.exe before running any application that uses task switcher service") -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/serviceinstaller/tsserviceinstaller/tsserviceinstaller.cpp --- a/taskswitcherapp/tsserviceplugin/serviceinstaller/tsserviceinstaller/tsserviceinstaller.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -QTM_USE_NAMESPACE - -int main(int argc, char *argv[]) -{ - QCoreApplication app(argc, argv); - - QServiceManager manager; - bool success = manager.addService(":/tsserviceplugin.xml"); - if (!success) { - qDebug("Service adding failed: %d", manager.error()); - } -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/serviceinstaller/tsserviceinstaller/tsserviceinstaller.pro --- a/taskswitcherapp/tsserviceplugin/serviceinstaller/tsserviceinstaller/tsserviceinstaller.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -TEMPLATE = app - -QT = core -#TODO - temporarily disabled, until the installer issues on HW are resolved -#CONFIG += no_icon - -CONFIG += console -CONFIG += mobility -MOBILITY = serviceframework - -SOURCES += tsserviceinstaller.cpp - -RESOURCES += tsserviceinstaller.qrc - -symbian { - TARGET.CAPABILITY = ALL -TCB -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/serviceinstaller/tsserviceinstaller/tsserviceinstaller.qrc --- a/taskswitcherapp/tsserviceplugin/serviceinstaller/tsserviceinstaller/tsserviceinstaller.qrc Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ - - - ../../tsserviceplugin.xml - - diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/src/s60/tsexternalactivationwatcher_p.cpp --- a/taskswitcherapp/tsserviceplugin/src/s60/tsexternalactivationwatcher_p.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#include "tsexternalactivationwatcher_p.h" -#include "tsexternalactivationwatcher.h" - -const TUid KTaskswitcherCategory = { 0x2002677D }; -const TUint KExternalActivationKey = 0x1; -const TInt KTaskswitcherActivateFlag = 1; - -/*! - \class TsExternalActivationWatcherPrivate - \ingroup group_tsserviceplugin - \brief Private implementation of external activation watcher. -*/ - -TsExternalActivationWatcherPrivate::TsExternalActivationWatcherPrivate(TsExternalActivationWatcher *parent) : CActive(CActive::EPriorityStandard), mParent(parent) -{ - CActiveScheduler::Add(this); - - TInt err = RProperty::Define(KTaskswitcherCategory, KExternalActivationKey, RProperty::EInt); - if (err == KErrNone || err == KErrAlreadyExists) { - err = mProperty.Attach(KTaskswitcherCategory, KExternalActivationKey); - } - - Q_ASSERT_X(err == KErrNone, "TsExternalActivationWatcherPrivate", qPrintable(QString("Cannot define/attach to activation watcher property %1").arg(err))); - - mProperty.Subscribe(iStatus); - SetActive(); -} - -TsExternalActivationWatcherPrivate::~TsExternalActivationWatcherPrivate() -{ - Cancel(); - mProperty.Close(); -} - -void TsExternalActivationWatcherPrivate::ResetActivationFlag() -{ - TInt value(0); - mProperty.Set(value); -} - -void TsExternalActivationWatcherPrivate::DoCancel() -{ - mProperty.Cancel(); -} - -void TsExternalActivationWatcherPrivate::RunL() -{ - if (iStatus.Int() != KErrCancel) { - - if (CheckActivationFlag()) { - ResetActivationFlag(); - QT_TRYCATCH_LEAVING(emit mParent->activationRequested()); - } - mProperty.Subscribe(iStatus); - SetActive(); - } -} - -bool TsExternalActivationWatcherPrivate::CheckActivationFlag() -{ - TInt value(0); - TInt result = mProperty.Get(value); - return (result == KErrNone && value & KTaskswitcherActivateFlag); -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/src/s60/tslongpresswatcher_p.cpp --- a/taskswitcherapp/tsserviceplugin/src/s60/tslongpresswatcher_p.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#include "tslongpresswatcher_p.h" -#include "tslongpresswatcher.h" - -// AknCapServer UID, used for P&S category -const TUid KTaskswitcherStateCategory = { 0x10207218 }; -// Taskswitcher UI, used as P&S key -const TUint KTaskswitcherStateKey = 0x2002677D; -// Values for Taskswitcher launching P&S -const TInt KTaskswitcherBackgroundValue = 1; -const TInt KTaskswitcherForegroundValue = KTaskswitcherBackgroundValue << 1; -const TInt KTaskswitcherLongAppKeyPressed = KTaskswitcherForegroundValue << 1; - -/*! - \class TsLongPressWatcherPrivate - \ingroup group_tsserviceplugin - \brief Private implementation of long press app key watcher. -*/ - -TsLongPressWatcherPrivate::TsLongPressWatcherPrivate(TsLongPressWatcher *parent) : CActive(CActive::EPriorityStandard), mParent(parent) -{ - CActiveScheduler::Add(this); - TInt err = mProperty.Attach(KTaskswitcherStateCategory, KTaskswitcherStateKey); - if (err == KErrNone) { - mProperty.Subscribe(iStatus); - SetActive(); - } -} - -TsLongPressWatcherPrivate::~TsLongPressWatcherPrivate() -{ - Cancel(); - mProperty.Close(); -} - -void TsLongPressWatcherPrivate::setBackgroundState() -{ - TInt value(0); - mProperty.Get(value); - value &= ~KTaskswitcherForegroundValue; - value &= ~KTaskswitcherLongAppKeyPressed; - value |= KTaskswitcherBackgroundValue; - mProperty.Set(value); -} - -void TsLongPressWatcherPrivate::DoCancel() -{ - mProperty.Cancel(); -} - -void TsLongPressWatcherPrivate::RunL() -{ - if (iStatus.Int() != KErrCancel) { - if (checkLongPressFlag()) { - setBackgroundState(); - QT_TRYCATCH_LEAVING(emit mParent->applicationKeyLongPress()); - } - mProperty.Subscribe(iStatus); - SetActive(); - } -} - -bool TsLongPressWatcherPrivate::checkLongPressFlag() -{ - TInt value(0); - bool res = false; - mProperty.Get(KTaskswitcherStateCategory, KTaskswitcherStateKey, value); - if (value & KTaskswitcherLongAppKeyPressed) { - res = true; - } - return res; -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/src/tsactivation.cpp --- a/taskswitcherapp/tsserviceplugin/src/tsactivation.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include "tsactivation.h" - -#include "tslongpresswatcher.h" -#include "tsexternalactivationwatcher.h" - -/*! - \class TsActivation - \ingroup group_tsserviceplugin - \brief Activation service. - - Service responsible for observing all events that might show TS. When any of them - occurs it is emiting activation signal. -*/ -TsActivation::TsActivation(QObject *parent) : TsActivationInterface(parent) -{ - TsLongPressWatcher *longPressWatcher = new TsLongPressWatcher(this); - connect(longPressWatcher, SIGNAL(applicationKeyLongPress()), this, SIGNAL(activated())); - - TsExternalActivationWatcher *externalActivationWatcher = new TsExternalActivationWatcher(this); - connect(externalActivationWatcher, SIGNAL(activationRequested()), this, SIGNAL(activated())); -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/src/tsclosedapplicationsfiltermodel.cpp --- a/taskswitcherapp/tsserviceplugin/src/tsclosedapplicationsfiltermodel.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#include "tsclosedapplicationsfiltermodel.h" -#include "tsdataroles.h" - - -/*! - \class TsClosedApplicationsFilterModel - \ingroup group_tsserviceplugin - \brief Filtering model to hide closed apps. - - When app is closed from Task Switcher it is hidden from it and will be presented when TS is started once more. -*/ - -/*! - Constructor - \param pointer to parent object -*/ -TsClosedApplicationsFilterModel::TsClosedApplicationsFilterModel(QObject *parent) : QSortFilterProxyModel(parent) -{ -} - -/*! - Add id that should be filtered - \param id that should be added to list -*/ -void TsClosedApplicationsFilterModel::addId(int id) -{ - mClosedIds.append(id); - invalidateFilter(); -} - -/*! - Clear filtered ids list -*/ -void TsClosedApplicationsFilterModel::clearIds() -{ - mClosedIds.clear(); - invalidateFilter(); -} - -/*! - Function to compare items - \param sourceRow row to check - \param sourceParent parent of source index - \return true if row is accepted -*/ -bool TsClosedApplicationsFilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const -{ - Q_UNUSED(sourceParent); - bool res = true; - if (mClosedIds.contains(sourceModel()->data(sourceModel()->index(sourceRow,0), TsDataRoles::EntryId).toInt())) { - res = false; - } - return res; -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/src/tsdeactivation.cpp --- a/taskswitcherapp/tsserviceplugin/src/tsdeactivation.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include "tsdeactivation.h" - -#include -#include - -/*! - \class TsDeactivation - \ingroup group_tsserviceplugin - \brief Deactivation service. - - Service responsible for observation of all events that might hide TS. When any of - them occurs it is emiting signal. -*/ -TsDeactivation::TsDeactivation(QObject *parent) : TsDeactivationInterface(parent) -{ - qApp->installEventFilter(this); -} - -bool TsDeactivation::eventFilter(QObject *obj, QEvent *event) -{ - if (event->type() == QEvent::ApplicationDeactivate) { - emit deactivated(); - } - return TsDeactivationInterface::eventFilter(obj, event); -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/src/tsdocumentloader.cpp --- a/taskswitcherapp/tsserviceplugin/src/tsdocumentloader.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Screensaver custom document loader. -* -*/ - -#include "tsdocumentloader.h" -#include "tstasksgrid.h" -#include "tstasksgriditem.h" - -/*! - \class TsDocumentLoader - \ingroup group_tsserviceplugin - \brief Document loader. - - TS implementation of document loader. It is creating TS objects used in UI -*/ - -QObject *TsDocumentLoader::createObject(const QString &type, const QString &name) -{ - if (type == TsTasksGrid::staticMetaObject.className()) { - QObject *object = new TsTasksGrid(); - object->setObjectName(name); - return object; - } else if (type == TsTasksGridItem::staticMetaObject.className()) { - QObject *object = new TsTasksGridItem(); - object->setObjectName(name); - return object; - } - - return HbDocumentLoader::createObject(type, name); -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/src/tsexternalactivationwatcher.cpp --- a/taskswitcherapp/tsserviceplugin/src/tsexternalactivationwatcher.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include "tsexternalactivationwatcher.h" -#include "tsexternalactivationwatcher_p.h" - -TsExternalActivationWatcher::TsExternalActivationWatcher(QObject *parent) : QObject(parent) -{ - d_ptr = new TsExternalActivationWatcherPrivate(this); -} - -TsExternalActivationWatcher::~TsExternalActivationWatcher() -{ - delete d_ptr; -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/src/tsitemprovider.cpp --- a/taskswitcherapp/tsserviceplugin/src/tsitemprovider.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include "tsitemprovider.h" - -#include -#include - -#include - -#include "tsrecentapplicationsmodel.h" -#include "tsclosedapplicationsfiltermodel.h" -#include "tsdataroles.h" - -/*! - \class TsItemProvider - \ingroup group_tsserviceplugin - \brief Returns items that should be presented in TS. - - Service providing information about items that should be presented in TS. It also allows to - start some action on it (open/close). -*/ - -TsItemProvider::TsItemProvider(QObject *parent) : TsItemProviderInterface(parent), mService(CaService::instance()) -{ - TsRecentApplicationsModel *recentAppModel = new TsRecentApplicationsModel(this); - mModel = new TsClosedApplicationsFilterModel(this); - mModel->setSourceModel(recentAppModel); -} - -TsItemProvider::~TsItemProvider() -{ -} - -QAbstractItemModel *TsItemProvider::model() -{ - return mModel; -} - -void TsItemProvider::openApplication(const QModelIndex &index) -{ - QVariant entryId = index.data(TsDataRoles::EntryId); - if (entryId.isValid()) { - mService->executeCommand(entryId.toInt(), QString("open")); - } -} - -void TsItemProvider::closeApplication(const QModelIndex &index) -{ - if (index.data(TsDataRoles::Closable).toBool()) { - QVariant entryId = index.data(TsDataRoles::EntryId); - if (entryId.isValid()) { - mModel->addId(entryId.toInt()); - mService->executeCommand(entryId.toInt(), QString("close")); - } - } -} - -void TsItemProvider::closeAllApplications() -{ - QList closableList; - for (int row(0); row < mModel->rowCount(); ++row) { - if (mModel->index(row, 0).data(TsDataRoles::Closable).toBool()) { - QVariant entryId = mModel->index(row, 0).data(TsDataRoles::EntryId); - if (entryId.isValid()) { - closableList.append(entryId.toInt()); - } - } - } - foreach (int entryId, closableList) { - mModel->addId(entryId); - mService->executeCommand(entryId, QString("close")); - } -} - -void TsItemProvider::clearClosedApplicationList() -{ - mModel->clearIds(); -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/src/tslongpresswatcher.cpp --- a/taskswitcherapp/tsserviceplugin/src/tslongpresswatcher.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include "tslongpresswatcher.h" -#include "tslongpresswatcher_p.h" - -/*! - \class TsLongPressWatcher - \ingroup group_tsserviceplugin - \brief Class watching app key events. -*/ -TsLongPressWatcher::TsLongPressWatcher(QObject *parent) : QObject(parent) -{ - d_ptr = new TsLongPressWatcherPrivate(this); -} - -TsLongPressWatcher::~TsLongPressWatcher() -{ - delete d_ptr; -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/src/tspresentation.cpp --- a/taskswitcherapp/tsserviceplugin/src/tspresentation.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,116 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#include "tspresentation.h" - -#include -#include -#include - -#include "tstasksgrid.h" -#include "tstasksgriditem.h" -#include "tstaskpopuphandler.h" - -// FIXME: workaround for Orbit bug: not moving to foreground after QWidget::activateWindow(); -#ifdef Q_OS_SYMBIAN -#include -#include -#endif - -/*! - \class TsPresentation - \ingroup group_tsserviceplugin - \brief Class providing UI for presenting TS data. -*/ -TsPresentation::TsPresentation(QObject *parent) : TsPresentationInterface(parent), mDialog(NULL), mGrid(NULL) -{ - HbMainWindow *mainWindow = HbInstance::instance()->allMainWindows().first(); - - // load layout from XML - bool ok(true); - mLoader.load(":/xml/resource/layout.docml", &ok); - Q_ASSERT(ok); - loadOrientationSpecificLayoutData(mainWindow->orientation()); - - // get all items - HbView *view = qobject_cast(mLoader.findWidget("view")); - mGrid = qobject_cast(mLoader.findWidget("taskgrid")); - mDialog = qobject_cast(mLoader.findWidget("dialog")); - Q_ASSERT(view); - Q_ASSERT(mGrid); - Q_ASSERT(mDialog); - - mGrid->setItemPrototype(new TsTasksGridItem()); - - // forward grid signals - connect(mGrid, SIGNAL(activated(QModelIndex)), this, SIGNAL(openApplication(QModelIndex))); - connect(mGrid, SIGNAL(activated(QModelIndex)), this, SIGNAL(hideTaskSwitcher())); - qRegisterMetaType("QModelIndex"); - connect(mGrid, SIGNAL(deleteButtonClicked(QModelIndex)), this, SIGNAL(closeApplication(QModelIndex)), Qt::QueuedConnection); - - // task popup - TsTaskPopupHandler *popupHandler = new TsTaskPopupHandler(this); - connect(mGrid, SIGNAL(longPressed(HbAbstractViewItem*, QPointF)), popupHandler, SLOT(showTaskPopup(HbAbstractViewItem*, QPointF))); - connect(popupHandler, SIGNAL(closeTask(QModelIndex)), this, SIGNAL(closeApplication(QModelIndex)),Qt::QueuedConnection); - connect(popupHandler, SIGNAL(closeAllTasks()), this, SIGNAL(closeAllApplications())); - - // dismiss - connect(mDialog, SIGNAL(aboutToHide()), this, SIGNAL(hideTaskSwitcher())); - - // orientation change handling - connect(mainWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(loadOrientationSpecificLayoutData(Qt::Orientation))); - - mainWindow->addView(view); -} - -void TsPresentation::setModel(QAbstractItemModel *model) -{ - mGrid->setModel(model); -} - -void TsPresentation::hide() -{ - mDialog->hide(); - HbInstance::instance()->allMainWindows().first()->hide(); -} - -void TsPresentation::show() -{ - HbMainWindow *window = HbInstance::instance()->allMainWindows().first(); - window->show(); - window->activateWindow(); - -#ifdef Q_OS_SYMBIAN - // FIXME: workaround for Orbit bug: not moving to foreground after QWidget::activateWindow(); - TApaTaskList taskList(CEikonEnv::Static()->WsSession()); - TApaTask task = taskList.FindApp(RProcess().Type()[2]); - Q_ASSERT_X(task.Exists(), "Bringing task switcher to foreground", "Application couldn't find task with its own UID"); - task.BringToForeground(); -#endif - - mDialog->show(); -} - -void TsPresentation::loadOrientationSpecificLayoutData(Qt::Orientation orientation) -{ - bool ok(true); - if (orientation == Qt::Horizontal) { - mLoader.load(":/xml/resource/layout.docml", "landscape", &ok); - } else { - mLoader.load(":/xml/resource/layout.docml", "portrait", &ok); - } - Q_ASSERT(ok); -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/src/tsrecentapplicationsmodel.cpp --- a/taskswitcherapp/tsserviceplugin/src/tsrecentapplicationsmodel.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,170 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: recentapplicationsmodel.cpp -* -*/ -#include "tsrecentapplicationsmodel.h" - -#include -#include -#include -#include -#include - -#include "tsdataroles.h" - -/*! - \class TsRecentApplicationsModel - \ingroup group_tsserviceplugin - \brief Model storing recent application. -*/ - -/*! - Constructor - \param query used to create model - \param pointer to parent object -*/ -TsRecentApplicationsModel::TsRecentApplicationsModel(QObject *parent) : - QAbstractListModel(parent), - mEntries(), - mService(CaService::instance()), - mNotifier(NULL), - mSize(240, 240) -{ - // creating query - mQuery.setEntryRoles(ItemEntryRole); - mQuery.addEntryTypeName(QString("application")); - mQuery.setFlagsOn(VisibleEntryFlag); - mQuery.setFlagsOff(MissingEntryFlag); - mQuery.setFlagsOn(UsedEntryFlag); - mQuery.setSort(LastUsedSortAttribute, Qt::DescendingOrder); - // requesting new data - updateModel(); - // creating notyfication filter - CaNotifierFilter filter(mQuery); - mNotifier = mService->createNotifier(filter); - connect(mNotifier, SIGNAL(entryChanged(CaEntry,ChangeType)), this, SLOT(entryChanged(CaEntry, ChangeType))); - connect(mNotifier, SIGNAL(entryTouched(int)), this, SLOT(updateModel())); - if (mQuery.parentId() > 0) { - connect(mNotifier, SIGNAL(groupContentChanged(int)), this, SLOT(updateModel())); - } -} - -/*! - Destructor -*/ -TsRecentApplicationsModel::~TsRecentApplicationsModel() -{ - qDeleteAll(mEntries); - delete mNotifier; -} - -/*! - Returns count of rows in model - \retval number of rows -*/ -int TsRecentApplicationsModel::rowCount( - const QModelIndex &parent) const -{ - Q_UNUSED(parent); - return mEntries.count(); -} - -/*! - Returns appropiate model's data - \param index model index - \param role which data role to return - \retval models data -*/ -QVariant TsRecentApplicationsModel::data(const QModelIndex &index, - int role) const -{ - if (!index.isValid()) { - return QVariant(); - } - - switch (role) { - case Qt::DisplayRole: - return QVariant(entry(index)->text()); - case Qt::DecorationRole: - return QVariant(entry(index)->makeIcon(mSize)); - case TsDataRoles::Closable: - return QVariant(closeable(index)); - case TsDataRoles::EntryId: - return entryId(index); - default: - return QVariant(QVariant::Invalid); - } -} - -/*! - Updates model with fresh entries -*/ -void TsRecentApplicationsModel::updateModel() -{ - qDeleteAll(mEntries); - mEntries.clear(); - mEntries = mService->getEntries(mQuery); - reset(); -} - -/*! - Called when some entry was changed - \param updatedEntry entry that was changed - \param change change type -*/ -void TsRecentApplicationsModel::entryChanged(CaEntry updatedEntry, - ChangeType change) -{ - Q_UNUSED(updatedEntry); - Q_UNUSED(change) - updateModel(); -} - -/*! - Returns an entry from model - \param index of entry in model - \retval pointer to an entry -*/ -CaEntry *TsRecentApplicationsModel::entry(const QModelIndex &index) const -{ - return mEntries.at(index.row()); -} - -/*! - Allows to check if item is closable - \param index item index to be checked - \retval true if item is closable -*/ -bool TsRecentApplicationsModel::closeable(const QModelIndex &index) const -{ - CaEntry *caEntry = entry(index); - return (caEntry && caEntry->flags().testFlag(RunningEntryFlag) && - !caEntry->flags().testFlag(SystemEntryFlag)); -} - -/*! - Allows to check entry id - \param index item index to be checked - \param entry id -*/ -QVariant TsRecentApplicationsModel::entryId(const QModelIndex &index) const -{ - QVariant res; - CaEntry *caEntry = entry(index); - if (caEntry) { - res = QVariant(caEntry->id()); - } - return res; -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/src/tsserviceplugin.cpp --- a/taskswitcherapp/tsserviceplugin/src/tsserviceplugin.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include "tsserviceplugin.h" - -#include -#include -#include - -#include "tsitemprovider.h" -#include "tsactivation.h" -#include "tsdeactivation.h" -#include "tspresentation.h" - -#ifdef COVERAGE_MEASUREMENT -#pragma CTC SKIP -#endif //COVERAGE_MEASUREMENT - -/*! - \class TsServicePlugin - \ingroup group_tsserviceplugin - \brief Plugin implementation. -*/ - -QObject *TsServicePlugin::createInstance(const QServiceInterfaceDescriptor &descriptor, QServiceContext *context, QAbstractSecuritySession *session) -{ - Q_UNUSED(context); - Q_UNUSED(session); - - if (descriptor.interfaceName() == "com.nokia.taskswitcher.itemprovider") { - return new TsItemProvider(this); - } else if (descriptor.interfaceName() == "com.nokia.taskswitcher.activation") { - return new TsActivation(this); - } else if (descriptor.interfaceName() == "com.nokia.taskswitcher.deactivation") { - return new TsDeactivation(this); - } else if (descriptor.interfaceName() == "com.nokia.taskswitcher.presentation") { - return new TsPresentation(this); - } else { - return NULL; - } -} - -Q_EXPORT_PLUGIN2(tsserviceplugin, TsServicePlugin) - -#ifdef COVERAGE_MEASUREMENT -#pragma CTC ENDSKIP -#endif //COVERAGE_MEASUREMENT diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/src/tstaskpopuphandler.cpp --- a/taskswitcherapp/tsserviceplugin/src/tstaskpopuphandler.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#include "tstaskpopuphandler.h" - -#include -#include - -#include "tsdataroles.h" - -/*! - \class TsTaskPopupHandler - \ingroup group_tsserviceplugin - \brief Create popup with options for TS app. -*/ - -TsTaskPopupHandler::TsTaskPopupHandler(QObject *parent) : QObject(parent) -{ -} - -#ifdef COVERAGE_MEASUREMENT -#pragma CTC SKIP -#endif //COVERAGE_MEASUREMENT -void TsTaskPopupHandler::showTaskPopup(HbAbstractViewItem *item, const QPointF &coords) -{ - QModelIndex itemIndex(item->modelIndex()); - - //initialize popup menu - HbMenu taskPopup; - taskPopup.setTimeout(0); - taskPopup.setDismissPolicy(HbPopup::TapOutside); - - HbAction *closeAction = NULL; - HbAction *closeAllAction = NULL; - - if (isClosable(itemIndex)) { - closeAction = taskPopup.addAction( - hbTrId("txt_tsw_menu_clear_this_task")); - } - if (closeAction || containsClosableItems(*itemIndex.model())) { - closeAllAction = taskPopup.addAction( - hbTrId("txt_tsw_menu_clear_all_tasks")); - } - - if (closeAllAction || closeAction) { - // show popup - HbAction *selectionAction = taskPopup.exec(coords); - - //check selection and emit right signal - if (selectionAction == closeAction) { - emit closeTask(itemIndex); - } else if (selectionAction == closeAllAction) { - emit closeAllTasks(); - } - } - - //release resources - taskPopup.close(); -} -#ifdef COVERAGE_MEASUREMENT -#pragma CTC ENDSKIP -#endif //COVERAGE_MEASUREMENT - -bool TsTaskPopupHandler::isClosable(const QModelIndex &index) const -{ - const QVariant state(index.data(TsDataRoles::Closable)); - return state.isValid() && state.toBool(); -} - -bool TsTaskPopupHandler::containsClosableItems(const QAbstractItemModel &model) const -{ - bool retVal(false); - for (int row(0); !retVal && row < model.rowCount(); ++row) { - for (int col(0); !retVal && col < model.columnCount(); ++col) { - retVal = isClosable(model.index(row, col)); - } - } - return retVal; -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/src/tstasksgriditem.cpp --- a/taskswitcherapp/tsserviceplugin/src/tstasksgriditem.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,102 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#include "tstasksgriditem.h" - -#include -#include -#include -#include -#include "tsdataroles.h" - -/*! - \class TsTasksGridItem - \ingroup group_tsserviceplugin - \brief Item that should be presented in grid. -*/ - - -TsTasksGridItem::TsTasksGridItem() : HbAbstractViewItem() -{ -} - -TsTasksGridItem::TsTasksGridItem(const TsTasksGridItem &item) : HbAbstractViewItem(item) -{ - // add screenshot - mScreenshotLabel = new HbLabel(); - mScreenshotLabel->setAlignment(Qt::AlignHCenter); - - // add application name label - mApplicationNameLabel = new HbLabel(); - mApplicationNameLabel->setAlignment(Qt::AlignCenter); - - // add close app button - HbIcon deleteIcon(":/resource/delete.png"); - mDeleteButton = new HbPushButton(); - mDeleteButton->setIcon(deleteIcon); - mDeleteButton->setPreferredSize(48, 48); - mDeleteButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum); - mDeleteButton->setEnabled(true); - connect(mDeleteButton, SIGNAL(clicked()), this, SLOT(handleDeleteClicked())); - mDeleteButton->hide(); - - setContentsMargins(5, 5, 5, 5); - - // add all items to layout - HbAnchorLayout *anchorLayout = new HbAnchorLayout(); - anchorLayout->setAnchor(mApplicationNameLabel, Hb::LeftEdge, anchorLayout, Hb::LeftEdge, 0); - anchorLayout->setAnchor(mApplicationNameLabel, Hb::TopEdge, anchorLayout, Hb::TopEdge, 0); - anchorLayout->setAnchor(mApplicationNameLabel, Hb::RightEdge, anchorLayout, Hb::RightEdge, 0); - - anchorLayout->setAnchor(mScreenshotLabel, Hb::TopEdge, mApplicationNameLabel, Hb::BottomEdge, 0); - anchorLayout->setAnchor(mScreenshotLabel, Hb::LeftEdge, anchorLayout, Hb::LeftEdge, 0); - anchorLayout->setAnchor(mScreenshotLabel, Hb::RightEdge, anchorLayout, Hb::RightEdge, 0); - anchorLayout->setAnchor(mScreenshotLabel, Hb::BottomEdge, anchorLayout, Hb::BottomEdge, 0); - - anchorLayout->setAnchor(mDeleteButton, Hb::RightEdge, mScreenshotLabel, Hb::RightEdge, 0); - anchorLayout->setAnchor(mDeleteButton, Hb::TopEdge, mScreenshotLabel, Hb::TopEdge, 0); - - setLayout(anchorLayout); -} - -TsTasksGridItem::~TsTasksGridItem() -{ -} - -HbAbstractViewItem *TsTasksGridItem::createItem() -{ - TsTasksGridItem *newItem = new TsTasksGridItem(*this); - connect(newItem, SIGNAL(deleteClicked(QModelIndex)), itemView(), SIGNAL(deleteButtonClicked(QModelIndex))); - return newItem; -} - -void TsTasksGridItem::handleDeleteClicked() -{ - emit deleteClicked(modelIndex()); -} - -void TsTasksGridItem::updateChildItems() -{ - mScreenshotLabel->setIcon(modelIndex().data(Qt::DecorationRole).value()); - mApplicationNameLabel->setPlainText(modelIndex().data(Qt::DisplayRole).toString()); - QVariant status(modelIndex().data(TsDataRoles::Closable)); - const bool isRunning(status.isValid() && status.toBool()); - if (isRunning) { - mDeleteButton->show(); - } else { - mDeleteButton->hide(); - } -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/src/win/tsexternalactivationwatcher_p.cpp --- a/taskswitcherapp/tsserviceplugin/src/win/tsexternalactivationwatcher_p.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include "tsexternalactivationwatcher_p.h" - -#include -#include - -QTM_USE_NAMESPACE - -TsExternalActivationWatcherPrivate::TsExternalActivationWatcherPrivate(QObject *parent) : QObject() -{ - mSubscriber = new QValueSpaceSubscriber("/TaskSwitcher/Activation", this); - mPublisher = new QValueSpacePublisher("/TaskSwitcher", this); - connect(mSubscriber, SIGNAL(contentsChanged()), this, SLOT(checkActivationFlag())); - connect(this, SIGNAL(activationRequested()), parent, SIGNAL(activationRequested())); -} - -void TsExternalActivationWatcherPrivate::checkActivationFlag() -{ - if (mSubscriber->value().isValid()) { - mPublisher->resetValue("Activation"); - mPublisher->sync(); - emit activationRequested(); - } -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/src/win/tslongpresswatcher_p.cpp --- a/taskswitcherapp/tsserviceplugin/src/win/tslongpresswatcher_p.cpp Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include "tslongpresswatcher_p.h" -#include "tslongpresswatcher.h" - -#include -#include - -#include - -TsLongPressWatcherPrivate *TsLongPressWatcherPrivate::instance = NULL; - -bool TsLongPressWatcherPrivate::hotKeyFilter(void *message) -{ - MSG *m = (MSG *)(message); - if (m->message == WM_HOTKEY) { - unsigned long key = (m->lParam & 0xFFFF0000) >> 16; - unsigned long mods = (m->lParam & 0x0000FFFF); - if (key == VK_OEM_3 && mods == (MOD_CONTROL | MOD_SHIFT)) { - emit TsLongPressWatcherPrivate::instance->applicationKeyLongPress(); - return true; - } - } - return false; -} - -TsLongPressWatcherPrivate::TsLongPressWatcherPrivate(TsLongPressWatcher *parent) : QObject(parent) -{ - connect(this, SIGNAL(applicationKeyLongPress()), parent, SIGNAL(applicationKeyLongPress())); - TsLongPressWatcherPrivate::instance = this; - - QAbstractEventDispatcher::instance()->setEventFilter(&TsLongPressWatcherPrivate::hotKeyFilter); - - if (!RegisterHotKey(NULL, 1, MOD_CONTROL | MOD_SHIFT, VK_OEM_3)) { - qCritical("Failed to register hot key, taskswitcher might not work as expected"); - } else { - qDebug("To activate task switcher press Ctrl+Shift+~"); - } -} - -TsLongPressWatcherPrivate::~TsLongPressWatcherPrivate() -{ - UnregisterHotKey(NULL, 1); - TsLongPressWatcherPrivate::instance = NULL; -} diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/taskswitcher.qm Binary file taskswitcherapp/tsserviceplugin/taskswitcher.qm has changed diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/taskswitcher.ts --- a/taskswitcherapp/tsserviceplugin/taskswitcher.ts Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ - - - - - - Task switcher popup title text. Application allows user to swap between running and recently used applications and to clear them from the list. - Task switcher - Task switcher - cell_tport_appsw_pane_t1 - tsw_01 - title - ts - False - - - Task switcher context menu item, removes the task in focus from Task switcher and closes the application / task if it is running. Other command in same menu: “Clear all tasks”. - Clear this task - Clear this task - qtl_menu_sec - tsw_01 - menu - ts - False - - - Task switcher context menu item, empties the list of all tasks and closes the apps/tasks if running. Other command in same menu: “Clear this task”. - Clear all tasks - Clear all tasks - qtl_menu_sec - tsw_01 - menu - ts - False - - - diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/tspresentation.qrc --- a/taskswitcherapp/tsserviceplugin/tspresentation.qrc Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - - resource/layout.docml - - - resource/delete.png - - diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/tsrc/t_tsitemprovider/data/castorage.db Binary file taskswitcherapp/tsserviceplugin/tsrc/t_tsitemprovider/data/castorage.db has changed diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/tsserviceplugin.pro --- a/taskswitcherapp/tsserviceplugin/tsserviceplugin.pro Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -TEMPLATE = lib -CONFIG += plugin hb mobility -MOBILITY = serviceframework - -win32 { - MOBILITY += publishsubscribe -} - -INCLUDEPATH += . inc - -HEADERS += inc/tsserviceplugin.h \ - inc/tsdataroles.h \ - inc/tsactivationinterface.h \ - inc/tsactivation.h \ - inc/tslongpresswatcher.h \ - inc/tsexternalactivationwatcher.h \ - inc/tsdeactivationinterface.h \ - inc/tsdeactivation.h \ - inc/tsitemproviderinterface.h \ - inc/tsitemprovider.h \ - inc/tsclosedapplicationsfiltermodel.h \ - inc/tsrecentapplicationsmodel.h \ - inc/tspresentationinterface.h \ - inc/tspresentation.h \ - inc/tstasksgriditem.h \ - inc/tstasksgrid.h \ - inc/tstaskpopuphandler.h \ - inc/tsdocumentloader.h \ - -SOURCES += src/tsserviceplugin.cpp \ - src/tsactivation.cpp \ - src/tslongpresswatcher.cpp \ - src/tsexternalactivationwatcher.cpp \ - src/tsdeactivation.cpp \ - src/tsitemprovider.cpp \ - src/tsclosedapplicationsfiltermodel.cpp \ - src/tsrecentapplicationsmodel.cpp \ - src/tspresentation.cpp \ - src/tstasksgriditem.cpp \ - src/tstaskpopuphandler.cpp \ - src/tsdocumentloader.cpp \ - -LIBS += -lcaclient - -TRANSLATIONS = taskswitcher.ts - -RESOURCES += tspresentation.qrc - -symbian { - load(data_caging_paths) - - plugin.sources = tsserviceplugin.dll - plugin.path = $$QT_PLUGINS_BASE_DIR - - # ugly hack - translation.sources = ./*.qm - translation.path = $$QT_PLUGINS_BASE_DIR/../translations - - # another ugly hack - crml.sources = ./resource/*.qcrml - crml.path = $$QT_PLUGINS_BASE_DIR/../crml - - DEPLOYMENT += plugin translation crml -} - -symbian { - INCLUDEPATH += inc/s60 - HEADERS += inc/s60/tslongpresswatcher_p.h \ - inc/s60/tsexternalactivationwatcher_p.h \ - - SOURCES += src/s60/tslongpresswatcher_p.cpp \ - src/s60/tsexternalactivationwatcher_p.cpp \ - - LIBS += -lcone \ - -lapgrfx \ - -lws32 \ - -} - -win32 { - INCLUDEPATH += inc/win - - HEADERS += inc/win/tslongpresswatcher_p.h \ - inc/win/tsexternalactivationwatcher_p.h \ - - SOURCES += src/win/tslongpresswatcher_p.cpp \ - src/win/tsexternalactivationwatcher_p.cpp \ - - LIBS += -lUser32 -} - -include(../common.pri) diff -r cdae8c6c3876 -r 4e8ebe173323 taskswitcherapp/tsserviceplugin/tsserviceplugin.xml --- a/taskswitcherapp/tsserviceplugin/tsserviceplugin.xml Fri Apr 16 14:54:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ - - - TaskSwitcher - tsserviceplugin - Basic implementation of TaskSwitcher services - - com.nokia.taskswitcher.itemprovider - 1.0 - Default implementation of item provider for TaskSwitcher - - - com.nokia.taskswitcher.activation - 1.0 - Default implementation of activation triggers for TaskSwitcher - - - com.nokia.taskswitcher.deactivation - 1.0 - Default (empty) implementation of deactivation triggers for TaskSwitcher - - - com.nokia.taskswitcher.presentation - 1.0 - Default implementation of presentation layer of TaskSwitcher - -