diff -Nru plasma-mobile-0.0~svn20100617/applets/CMakeLists.txt plasma-mobile-0.0~svn20100711/applets/CMakeLists.txt --- plasma-mobile-0.0~svn20100617/applets/CMakeLists.txt 2010-06-05 12:54:21.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/CMakeLists.txt 2010-07-07 13:20:02.000000000 -0400 @@ -1,4 +1,5 @@ add_subdirectory(appswitcher) add_subdirectory(digital-clock) add_subdirectory(fakemail) +add_subdirectory(quickdialer) add_subdirectory(news) diff -Nru plasma-mobile-0.0~svn20100617/applets/digital-clock/package/contents/qml/main.qml plasma-mobile-0.0~svn20100711/applets/digital-clock/package/contents/qml/main.qml --- plasma-mobile-0.0~svn20100617/applets/digital-clock/package/contents/qml/main.qml 2010-06-05 12:59:10.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/digital-clock/package/contents/qml/main.qml 2010-07-07 16:30:20.000000000 -0400 @@ -1,3 +1,22 @@ +/* + * Copyright 2010 Alexis Menard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + import Qt 4.7 import Plasma 0.1 as Plasma diff -Nru plasma-mobile-0.0~svn20100617/applets/digital-clock/package/metadata.desktop plasma-mobile-0.0~svn20100711/applets/digital-clock/package/metadata.desktop --- plasma-mobile-0.0~svn20100617/applets/digital-clock/package/metadata.desktop 2010-06-16 02:38:54.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/digital-clock/package/metadata.desktop 2010-07-11 03:03:32.000000000 -0400 @@ -5,6 +5,7 @@ Name[es]=Reloj digital (QML) Name[et]=Digitaalkell (QML) Name[km]=នាឡិកា​ឌីជីថល (QML) +Name[nds]=Digitaalklock (QLM) Name[pt]=Relógio Digital (QML) Name[pt_BR]=Relógio digital (QML) Name[sv]=Digitalklocka (QML) diff -Nru plasma-mobile-0.0~svn20100617/applets/digital-clock/plasma-applet-digital-clock-qml.desktop plasma-mobile-0.0~svn20100711/applets/digital-clock/plasma-applet-digital-clock-qml.desktop --- plasma-mobile-0.0~svn20100617/applets/digital-clock/plasma-applet-digital-clock-qml.desktop 2010-06-16 02:38:54.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/digital-clock/plasma-applet-digital-clock-qml.desktop 2010-07-11 03:03:32.000000000 -0400 @@ -5,6 +5,7 @@ Name[es]=Reloj digital (QML) Name[et]=Digitaalkell (QML) Name[km]=នាឡិកា​ឌីជីថល (QML) +Name[nds]=Digitaalklock (QLM) Name[pt]=Relógio Digital (QML) Name[pt_BR]=Relógio digital (QML) Name[sv]=Digitalklocka (QML) diff -Nru plasma-mobile-0.0~svn20100617/applets/fakemail/package/contents/qml/components/Composer.qml plasma-mobile-0.0~svn20100711/applets/fakemail/package/contents/qml/components/Composer.qml --- plasma-mobile-0.0~svn20100617/applets/fakemail/package/contents/qml/components/Composer.qml 2010-05-26 12:32:35.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/fakemail/package/contents/qml/components/Composer.qml 2010-07-07 16:30:20.000000000 -0400 @@ -1,3 +1,22 @@ +/* + * Copyright 2010 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + import Qt 4.7 import GraphicsLayouts 4.7 import Plasma 0.1 as Plasma diff -Nru plasma-mobile-0.0~svn20100617/applets/fakemail/package/contents/qml/components/MessageDetails.qml plasma-mobile-0.0~svn20100711/applets/fakemail/package/contents/qml/components/MessageDetails.qml --- plasma-mobile-0.0~svn20100617/applets/fakemail/package/contents/qml/components/MessageDetails.qml 2010-05-26 12:32:35.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/fakemail/package/contents/qml/components/MessageDetails.qml 2010-07-07 16:30:20.000000000 -0400 @@ -1,3 +1,22 @@ +/* + * Copyright 2010 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + import Qt 4.7 import GraphicsLayouts 4.7 import Plasma 0.1 as Plasma diff -Nru plasma-mobile-0.0~svn20100617/applets/fakemail/package/contents/qml/components/MessageList.qml plasma-mobile-0.0~svn20100711/applets/fakemail/package/contents/qml/components/MessageList.qml --- plasma-mobile-0.0~svn20100617/applets/fakemail/package/contents/qml/components/MessageList.qml 2010-05-26 12:32:35.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/fakemail/package/contents/qml/components/MessageList.qml 2010-07-07 16:30:20.000000000 -0400 @@ -1,3 +1,22 @@ +/* + * Copyright 2010 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + import Qt 4.7 import GraphicsLayouts 4.7 import Plasma 0.1 as Plasma diff -Nru plasma-mobile-0.0~svn20100617/applets/fakemail/package/contents/qml/components/MessagesModel.qml plasma-mobile-0.0~svn20100711/applets/fakemail/package/contents/qml/components/MessagesModel.qml --- plasma-mobile-0.0~svn20100617/applets/fakemail/package/contents/qml/components/MessagesModel.qml 2010-05-27 09:21:45.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/fakemail/package/contents/qml/components/MessagesModel.qml 2010-07-07 16:30:20.000000000 -0400 @@ -1,3 +1,22 @@ +/* + * Copyright 2010 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + import Qt 4.7 ListModel { diff -Nru plasma-mobile-0.0~svn20100617/applets/fakemail/package/metadata.desktop plasma-mobile-0.0~svn20100711/applets/fakemail/package/metadata.desktop --- plasma-mobile-0.0~svn20100617/applets/fakemail/package/metadata.desktop 2010-06-01 04:39:27.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/fakemail/package/metadata.desktop 2010-06-22 04:59:14.000000000 -0400 @@ -2,6 +2,7 @@ Encoding=UTF-8 Name=Fake mail client (QML) Name[en_GB]=Fake mail client (QML) +Name[km]=កម្មវិធី​ផ្ញើ​សំបុត្រ​ក្លែង​ក្លាយ (QML) Name[pt]=Cliente de e-mail falso (QML) Name[pt_BR]=Cliente de e-mail falso (QML) Name[sv]=E-postprogram för test (QML) @@ -9,6 +10,7 @@ Name[x-test]=xxFake mail client (QML)xx Comment=A proof of concept of a mail app ui written in qml Comment[en_GB]=A proof of concept of a mail app ui written in qml +Comment[km]=ការ​ផ្ទៀង​ផ្ទាត់​បែប​បទ​ចំណុច​ប្រទាក់​កម្មវិធី​ផ្ញើ​សំបុត្រ​ដែល​សរសេរ​ជា​ qml Comment[pt]=Uma prova de conceito de uma interface de e-mail feita em QML Comment[pt_BR]=Uma prova de conceito de uma interface de e-mail feita em QML Comment[sv]=Ett koncept för ett e-postprograms användargränssnitt skrivet i QML diff -Nru plasma-mobile-0.0~svn20100617/applets/fakemail/plasma-applet-fakemail-qml.desktop plasma-mobile-0.0~svn20100711/applets/fakemail/plasma-applet-fakemail-qml.desktop --- plasma-mobile-0.0~svn20100617/applets/fakemail/plasma-applet-fakemail-qml.desktop 2010-06-01 04:39:27.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/fakemail/plasma-applet-fakemail-qml.desktop 2010-06-22 04:59:14.000000000 -0400 @@ -2,6 +2,7 @@ Encoding=UTF-8 Name=Fake mail client (QML) Name[en_GB]=Fake mail client (QML) +Name[km]=កម្មវិធី​ផ្ញើ​សំបុត្រ​ក្លែង​ក្លាយ (QML) Name[pt]=Cliente de e-mail falso (QML) Name[pt_BR]=Cliente de e-mail falso (QML) Name[sv]=E-postprogram för test (QML) @@ -9,6 +10,7 @@ Name[x-test]=xxFake mail client (QML)xx Comment=A proof of concept of a mail app ui written in qml Comment[en_GB]=A proof of concept of a mail app ui written in qml +Comment[km]=ការ​ផ្ទៀង​ផ្ទាត់​បែប​បទ​ចំណុច​ប្រទាក់​កម្មវិធី​ផ្ញើ​សំបុត្រ​ដែល​សរសេរ​ជា​ qml Comment[pt]=Uma prova de conceito de uma interface de e-mail feita em QML Comment[pt_BR]=Uma prova de conceito de uma interface de e-mail feita em QML Comment[sv]=Ett koncept för ett e-postprograms användargränssnitt skrivet i QML diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/CMakeLists.txt plasma-mobile-0.0~svn20100711/applets/mobilesystray/CMakeLists.txt --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/CMakeLists.txt 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/CMakeLists.txt 2010-07-03 10:21:05.000000000 -0400 @@ -0,0 +1,53 @@ +# Project Needs a name ofcourse +project(mobilesystemtray) + +# Find the required Libaries +find_package(KDE4 REQUIRED) +include(KDE4Defaults) + +add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) +include_directories( + ${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${KDE4_INCLUDES} + ) + +# We add our source code here +set(mobilesystemtray_SRCS + + core/manager.cpp + core/protocol.cpp + core/task.cpp + + #protocols/fdo/fdoprotocol.cpp + #protocols/fdo/fdotask.cpp + #FIXME: we should find another way to achieve that + #protocols/fdo/fdonotification.cpp + #protocols/fdo/fdographicswidget.cpp + #protocols/fdo/fdoselectionmanager.cpp + #protocols/fdo/x11embedcontainer.cpp + #protocols/fdo/x11embeddelegate.cpp + #protocols/fdo/x11embedpainter.cpp + + protocols/plasmoid/plasmoidtaskprotocol.cpp + protocols/plasmoid/plasmoidtask.cpp + + protocols/dbussystemtray/dbussystemtraytask.cpp + protocols/dbussystemtray/dbussystemtrayprotocol.cpp + protocols/dbussystemtray/dbussystemtraywidget.cpp + + ui/applet.cpp + ui/enlargedoverlay.cpp + ui/overlaytoolbox.cpp + ) + +# Now make sure all files get to the right place +kde4_add_plugin(plasma_applet_mobilesystemtray ${mobilesystemtray_SRCS}) +target_link_libraries(plasma_applet_mobilesystemtray + ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS}) + +install(TARGETS plasma_applet_mobilesystemtray + DESTINATION ${PLUGIN_INSTALL_DIR}) + +install(FILES plasma-applet-mobilesystemtray.desktop + DESTINATION ${SERVICES_INSTALL_DIR}) \ No newline at end of file diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/core/manager.cpp plasma-mobile-0.0~svn20100711/applets/mobilesystray/core/manager.cpp --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/core/manager.cpp 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/core/manager.cpp 2010-07-07 03:34:34.000000000 -0400 @@ -0,0 +1,132 @@ +/*************************************************************************** + * manager.cpp * + * * + * Copyright (C) 2008 Jason Stubbs * + * Copyright (C) 2010 Marco Martin * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#include "manager.h" + +#include + +#include + +#include "protocol.h" +#include "task.h" + +//#include "../protocols/fdo/fdoprotocol.h" +#include "../protocols/plasmoid/plasmoidtaskprotocol.h" +#include "../protocols/dbussystemtray/dbussystemtrayprotocol.h" + +#include + +namespace SystemTray +{ + +class Manager::Private +{ +public: + Private(Manager *manager) + : q(manager), + plasmoidProtocol(0) + { + } + + void setupProtocol(Protocol *protocol); + + Manager *q; + QList tasks; + PlasmoidProtocol *plasmoidProtocol; +}; + + +Manager::Manager() + : d(new Private(this)) +{ + d->plasmoidProtocol = new PlasmoidProtocol(this); + d->setupProtocol(d->plasmoidProtocol); + //d->setupProtocol(new SystemTray::FdoProtocol(this)); + d->setupProtocol(new SystemTray::DBusSystemTrayProtocol(this)); +} + +Manager::~Manager() +{ + delete d; +} + + +QList Manager::tasks() const +{ + return d->tasks; +} + +void Manager::addTask(Task *task) +{ + connect(task, SIGNAL(destroyed(SystemTray::Task*)), this, SLOT(removeTask(SystemTray::Task*))); + connect(task, SIGNAL(changed(SystemTray::Task*)), this, SIGNAL(taskChanged(SystemTray::Task*))); + + kDebug() << task->name() << "(" << task->typeId() << ")"; + + d->tasks.append(task); + emit taskAdded(task); +} + + +void Manager::removeTask(Task *task) +{ + d->tasks.removeAll(task); + disconnect(task, 0, this, 0); + emit taskRemoved(task); +} + +void Manager::forwardConstraintsEvent(Plasma::Constraints constraints, Plasma::Applet *host) +{ + d->plasmoidProtocol->forwardConstraintsEvent(constraints, host); +} + +void Manager::loadApplets(Plasma::Applet *parent) +{ + d->plasmoidProtocol->loadFromConfig(parent); +} + +void Manager::addApplet(const QString appletName, Plasma::Applet *parent) +{ + d->plasmoidProtocol->addApplet(appletName, 0, parent); +} + +void Manager::removeApplet(const QString appletName, Plasma::Applet *parent) +{ + d->plasmoidProtocol->removeApplet(appletName, parent); +} + +QStringList Manager::applets(Plasma::Applet *parent) const +{ + return d->plasmoidProtocol->applets(parent); +} + + +void Manager::Private::setupProtocol(Protocol *protocol) +{ + connect(protocol, SIGNAL(taskCreated(SystemTray::Task*)), q, SLOT(addTask(SystemTray::Task*))); + protocol->init(); +} + +} + + +#include "manager.moc" diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/core/manager.h plasma-mobile-0.0~svn20100711/applets/mobilesystray/core/manager.h --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/core/manager.h 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/core/manager.h 2010-07-07 03:34:34.000000000 -0400 @@ -0,0 +1,103 @@ +/*************************************************************************** + * manager.h * + * * + * Copyright (C) 2008 Jason Stubbs * + * Copyright (C) 2010 Marco Martin * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#ifndef SYSTEMTRAYMANAGER_H +#define SYSTEMTRAYMANAGER_H + +#include + +#include + +#include + +namespace Plasma +{ +class Applet; +} + +namespace SystemTray +{ + +class Applet; +class Notification; +class Task; +class Job; + +/** + * w + * @short Creator and amalgamator of the supported system tray specifications + **/ +class Manager : public QObject +{ + Q_OBJECT + +public: + Manager(); + ~Manager(); + + /** + * @return a list of all known Task instances + **/ + QList tasks() const; + + void forwardConstraintsEvent(Plasma::Constraints constraints, Plasma::Applet *host); + + void loadApplets(Plasma::Applet *parent); + + void addApplet(const QString appletName, Plasma::Applet *parent); + + void removeApplet(const QString appletName, Plasma::Applet *parent); + + QStringList applets(Plasma::Applet *parent) const; + +signals: + /** + * Emitted when a new task has been added + **/ + void taskAdded(SystemTray::Task *task); + + /** + * Emitted when something about a task changes (such as it changing from + * non-embeddable to embeddable) + **/ + void taskChanged(SystemTray::Task *task); + + /** + * Emitted when a task has been removed + **/ + void taskRemoved(SystemTray::Task *task); + +private slots: + void addTask(SystemTray::Task *task); + void removeTask(SystemTray::Task *task); + +private: + class Private; + Private* const d; + + friend class Applet; +}; + +} + + +#endif diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/core/protocol.cpp plasma-mobile-0.0~svn20100711/applets/mobilesystray/core/protocol.cpp --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/core/protocol.cpp 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/core/protocol.cpp 2010-07-07 03:34:34.000000000 -0400 @@ -0,0 +1,35 @@ +/*************************************************************************** + * taskprotocol.cpp * + * * + * Copyright (C) 2008 Jason Stubbs * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#include "protocol.h" + + +namespace SystemTray +{ + +Protocol::Protocol(QObject *parent) + : QObject(parent) +{ +} + +} + +#include "protocol.moc" diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/core/protocol.h plasma-mobile-0.0~svn20100711/applets/mobilesystray/core/protocol.h --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/core/protocol.h 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/core/protocol.h 2010-07-07 03:34:34.000000000 -0400 @@ -0,0 +1,74 @@ +/*************************************************************************** + * taskprotocol.h * + * * + * Copyright (C) 2008 Jason Stubbs * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#ifndef SYSTEMTRAYPROTOCOL_H +#define SYSTEMTRAYPROTOCOL_H + +#include + +namespace SystemTray +{ + class Job; + class Notification; + class Task; +} + + +namespace SystemTray +{ + +/** + * @short System tray protocol base class + * + * To support a new system tray protocol, this class and Task should be + * subclassed and the subclass of this class registered with the global + * Manager. The Protocol subclass should emit taskCreated() for each new + * task created. + **/ +class Protocol : public QObject +{ + Q_OBJECT +public: + explicit Protocol(QObject *parent); + + virtual void init() = 0; + +signals: + /** + * Signals that a new task has been created + **/ + void taskCreated(SystemTray::Task *task); + + /** + * Signals that a new notification has been created + **/ + void jobCreated(SystemTray::Job *job); + + /** + * Signals that a new notification has been created + **/ + void notificationCreated(SystemTray::Notification *notification); +}; + +} + + +#endif diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/core/task.cpp plasma-mobile-0.0~svn20100711/applets/mobilesystray/core/task.cpp --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/core/task.cpp 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/core/task.cpp 2010-07-07 03:34:34.000000000 -0400 @@ -0,0 +1,199 @@ +/*************************************************************************** + * task.cpp * + * * + * Copyright (C) 2008 Jason Stubbs * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#include "task.h" + +#include + + +namespace SystemTray +{ + + +class Task::Private +{ +public: + Private() + : hiddenState(Task::NotHidden), + order(Task::Normal), + status(Task::UnknownStatus), + category(Task::UnknownCategory) + { + } + + QHash widgetsByHost; + Task::HideStates hiddenState; + Task::Order order; + Task::Status status; + Task::Category category; +}; + + +Task::Task(QObject *parent) + : QObject(parent), + d(new Private) +{ +} + +Task::~Task() +{ + emit destroyed(this); + foreach (QGraphicsWidget * widget, d->widgetsByHost) { + disconnect(widget, 0, this, 0); + delete widget; + } + delete d; +} + + +QGraphicsWidget* Task::widget(Plasma::Applet *host, bool createIfNecessary) +{ + Q_ASSERT(host); + + QGraphicsWidget *widget = d->widgetsByHost.value(host); + + if (!widget && createIfNecessary) { + widget = createWidget(host); + + if (widget) { + d->widgetsByHost.insert(host, widget); + connect(widget, SIGNAL(destroyed()), this, SLOT(widgetDeleted())); + } + } + + return widget; +} + +bool Task::isEmbeddable(Plasma::Applet *host) +{ + if (!host) { + return false; + } + + return d->widgetsByHost.value(host) || isEmbeddable(); +} + +QHash Task::widgetsByHost() const +{ + return d->widgetsByHost; +} + +void Task::widgetDeleted() +{ + bool wasEmbeddable = isEmbeddable(); + + QGraphicsWidget * w = static_cast(sender()); + QMutableHashIterator it(d->widgetsByHost); + while (it.hasNext()) { + it.next(); + if (it.value() == w) { + it.remove(); + } + } + + if (!wasEmbeddable && isEmbeddable()) { + emit changed(this); + } +} + +bool Task::isHideable() const +{ + return true; +} + +void Task::setHidden(HideStates state) +{ + d->hiddenState = state; +} + +Task::HideStates Task::hidden() const +{ + return d->hiddenState; +} + +bool Task::isUsed() const +{ + return !d->widgetsByHost.isEmpty(); +} + +Task::Order Task::order() const +{ + return d->order; +} + +void Task::setOrder(Order order) +{ + d->order = order; +} + +void Task::setCategory(Category category) +{ + if (d->category == category) { + return; + } + + d->category = category; + emit changed(this); +} + +Task::Category Task::category() const +{ + return d->category; +} + +void Task::setStatus(Status status) +{ + if (d->status == status) { + return; + } + + d->status = status; + resetHiddenStatus(); + emit changed(this); +} + +Task::Status Task::status() const +{ + return d->status; +} + +void Task::resetHiddenStatus() +{ + if (d->status == NeedsAttention) { + setOrder(First); + if (hidden() & AutoHidden) { + setHidden(hidden() ^ AutoHidden); + } + } else { + if (d->status == Active && (hidden() & AutoHidden)) { + setHidden(hidden() ^ AutoHidden); + } else if (d->status == Passive) { + setHidden(hidden() | AutoHidden); + } + + setOrder(Normal); + } +} + +} + + +#include "task.moc" diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/core/task.h plasma-mobile-0.0~svn20100711/applets/mobilesystray/core/task.h --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/core/task.h 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/core/task.h 2010-07-07 03:34:34.000000000 -0400 @@ -0,0 +1,221 @@ +/*************************************************************************** + * task.h * + * * + * Copyright (C) 2008 Jason Stubbs * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#ifndef SYSTEMTRAYTASK_H +#define SYSTEMTRAYTASK_H + +#include + +#include + +class QGraphicsWidget; + +namespace Plasma +{ + class Applet; +} // namespace Plasma + +namespace SystemTray +{ + +/** + * @short System tray task base class + * + * To support a new system tray protocol, Protocol and this class should + * be subclassed. + **/ +class Task : public QObject +{ + Q_OBJECT + +public: + enum Order { First, Normal, Last }; + + enum HideState { + NotHidden = 0, + UserHidden = 1, + AutoHidden = 2 + }; + Q_DECLARE_FLAGS(HideStates, HideState) + + enum Status { + UnknownStatus = 0, + Passive = 1, + Active = 2, + NeedsAttention = 3 + }; + Q_ENUMS(Status) + + enum Category { + UnknownCategory = 0, + ApplicationStatus = 1, + Communications = 2, + SystemServices = 3, + Hardware = 4 + }; + Q_ENUMS(Category) + + + + virtual ~Task(); + + /** + * Creates a new graphics widget for this task + * + * isEmbeddable() should be checked before creating a new widget. + **/ + QGraphicsWidget* widget(Plasma::Applet *host, bool createIfNecessary = true); + + /** + * @return whether this task is embeddable; true if there is already a widget + * for this host. + */ + bool isEmbeddable(Plasma::Applet *host); + + /** + * Returns whether this task can be embeddable + * + * Depending on the protocol, there may be circumstances under which + * a new widget can not be created. isEmbeddable() will return false + * under these circumstances. + **/ + virtual bool isEmbeddable() const = 0; + + /** + * Returns the name of this task that should be presented to the user + **/ + virtual QString name() const = 0; + + /** + * Returns a unique identifier for this task + * + * The identifier is valid between restarts and so is safe to save + **/ + virtual QString typeId() const = 0; + + /** + * Returns an icon that can be associated with this task + * + * The icon returned is not necessarily the same icon that appears + * in the tray icon itself. + **/ + virtual QIcon icon() const = 0; + + /** + * Returns whether the task is currently hideable by the user or not + */ + virtual bool isHideable() const; + + /** + * Make the task ask to be hidden. The systemtray may or may not fullfill that requirement + */ + void setHidden(HideStates state); + + /** + * Returns the state of the icon: visible, hidden by the user or hidden by itself + */ + HideStates hidden() const; + + /** + * @return true if this task is current being used, e.g. it has created + * widgets for one or more hosts + */ + bool isUsed() const; + + /** + * Returns the order this Task should be placed in: first, normal or last + */ + Order order() const; + + /** + * Sets which order this task should be placed in, relative to other Tasks + * + * @arg order the order to set this Task to + */ + void setOrder(Order order); + + /** + * Sets the category of the task, UnknownCategory by default + * @arg category the category for this task + */ + void setCategory(Category category); + + /** + * @return the category of this task + */ + Category category() const; + + /** + * Sets the status of the task, UnknownStatus by default. + * @arg status the status for this task + */ + void setStatus(Status status); + + /** + * @return the status for this task + */ + Status status() const; + + /** + * Resets the hidden state based purely on the status. Will not emit a changed signal. + */ + void resetHiddenStatus(); + +Q_SIGNALS: + /** + * Emitted when something about the task has changed + **/ + //TODO: this should also state _what_ was changed so we can react more + // precisely (and therefore with greater efficiency) + void changed(SystemTray::Task *task); + + /** + * Emitted when the task is about to be destroyed + **/ + void destroyed(SystemTray::Task *task); + +protected: + Task(QObject *parent = 0); + + QHash widgetsByHost() const; + + /** + * Called when a new widget is required + * + * Subclasses should implement this to return a graphics widget that + * handles all user interaction with the task. Ownership of the + * created widget is handled automatically so subclasses should not + * delete the created widget. + **/ + virtual QGraphicsWidget* createWidget(Plasma::Applet *host) = 0; + +private slots: + void widgetDeleted(); + +private: + class Private; + Private* const d; +}; + +} + + +#endif diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/plasma-applet-mobilesystemtray.desktop plasma-mobile-0.0~svn20100711/applets/mobilesystray/plasma-applet-mobilesystemtray.desktop --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/plasma-applet-mobilesystemtray.desktop 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/plasma-applet-mobilesystemtray.desktop 2010-07-04 02:57:27.000000000 -0400 @@ -0,0 +1,28 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Mobile System Tray +Name[pt]=Bandeja do Sistema Móvel +Name[pt_BR]=Área de notificação móvel +Name[sv]=Systembricka för mobil +Name[uk]=Мобільний у системному лотку +Name[x-test]=xxMobile System Trayxx +Comment=A system tray applet for mobile shell +Comment[pt]=Uma 'applet' da bandeja para a consola móvel +Comment[pt_BR]=Um miniaplicativo da área de notificação para o console móvel +Comment[sv]=Ett miniprogram med systembricka för mobil-skal +Comment[uk]=Аплет системного лотка для командної оболонки керування мобільним телефоном +Comment[x-test]=xxA system tray applet for mobile shellxx +Icon=preferences-desktop-notification +Type=Service +X-KDE-ServiceTypes=Plasma/Applet + +X-KDE-Library=plasma_applet_mobilesystemtray +X-KDE-PluginInfo-Author=Lim Yuen Hoe +X-KDE-PluginInfo-Email=yuenhoe@hotmail.com +X-KDE-PluginInfo-Name=mobilesystemtray +X-KDE-PluginInfo-Version=1.0 +X-KDE-PluginInfo-Website=http://plasma.kde.org/ +X-KDE-PluginInfo-Category=Windows and Tasks +X-KDE-PluginInfo-Depends= +X-KDE-PluginInfo-License=GPL v2+ +X-KDE-PluginInfo-EnabledByDefault=true diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/protocols/dbussystemtray/dbussystemtrayprotocol.cpp plasma-mobile-0.0~svn20100711/applets/mobilesystray/protocols/dbussystemtray/dbussystemtrayprotocol.cpp --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/protocols/dbussystemtray/dbussystemtrayprotocol.cpp 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/protocols/dbussystemtray/dbussystemtrayprotocol.cpp 2010-07-10 13:55:12.000000000 -0400 @@ -0,0 +1,99 @@ +/*************************************************************************** + * dbussystemtrayprotocol.cpp * + * * + * Copyright (C) 2009 Marco Martin * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#include "dbussystemtraytask.h" +#include "dbussystemtrayprotocol.h" + +#include + + +namespace SystemTray +{ + +DBusSystemTrayProtocol::DBusSystemTrayProtocol(QObject *parent) + : Protocol(parent), + m_dataEngine(Plasma::DataEngineManager::self()->loadEngine("statusnotifieritem")), + m_tasks() +{ +} + +DBusSystemTrayProtocol::~DBusSystemTrayProtocol() +{ + Plasma::DataEngineManager::self()->unloadEngine("statusnotifieritem"); +} + +void DBusSystemTrayProtocol::init() +{ + if (m_dataEngine->isValid()) { + initRegisteredServices(); + connect(m_dataEngine, SIGNAL(sourceAdded(const QString&)), + this, SLOT(newTask(const QString&))); + connect(m_dataEngine, SIGNAL(sourceRemoved(const QString&)), + this, SLOT(cleanupTask(const QString&))); + } +} + +void DBusSystemTrayProtocol::newTask(const QString &service) +{ + if (m_tasks.contains(service)) { + return; + } + + DBusSystemTrayTask *task = new DBusSystemTrayTask(service, m_dataEngine->serviceForSource(service), this); + + m_dataEngine->connectSource(service, task); + + if (!task->isValid()) { + // we failed to load our task, *sob* + delete task; + return; + } + + m_tasks[service] = task; +// connect(task, SIGNAL(taskDeleted(QString)), this, SLOT(cleanupTask(QString))); + emit taskCreated(task); +} + +void DBusSystemTrayProtocol::cleanupTask(const QString &service) +{ + DBusSystemTrayTask *task = m_tasks.value(service); + + if (task) { + m_dataEngine->disconnectSource(service, task); + m_tasks.remove(service); + emit task->destroyed(task); + task->deleteLater(); + } +} + +void DBusSystemTrayProtocol::initRegisteredServices() +{ + if (m_dataEngine->isValid()) { + QStringList registeredItems = m_dataEngine->sources(); + foreach (const QString &service, registeredItems) { + newTask(service); + } + } +} + +} + +#include "dbussystemtrayprotocol.moc" diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/protocols/dbussystemtray/dbussystemtrayprotocol.h plasma-mobile-0.0~svn20100711/applets/mobilesystray/protocols/dbussystemtray/dbussystemtrayprotocol.h --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/protocols/dbussystemtray/dbussystemtrayprotocol.h 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/protocols/dbussystemtray/dbussystemtrayprotocol.h 2010-07-07 03:34:34.000000000 -0400 @@ -0,0 +1,61 @@ +/*************************************************************************** + * Copyright (C) 2009 Marco Martin * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#ifndef DBUSSYSTEMTRAYPROTOCOL_H +#define DBUSSYSTEMTRAYPROTOCOL_H + +#include "../../core/protocol.h" + +#include + +#include + +#include + + +namespace SystemTray +{ + +class DBusSystemTrayTask; + +class DBusSystemTrayProtocol : public Protocol +{ + Q_OBJECT + +public: + DBusSystemTrayProtocol(QObject *parent); + ~DBusSystemTrayProtocol(); + void init(); + +protected: + void initRegisteredServices(); + +protected Q_SLOTS: + void newTask(const QString &service); + void cleanupTask(const QString &typeId); + +private: + Plasma::DataEngine *m_dataEngine; + QHash m_tasks; +}; + +} + + +#endif diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/protocols/dbussystemtray/dbussystemtraytask.cpp plasma-mobile-0.0~svn20100711/applets/mobilesystray/protocols/dbussystemtray/dbussystemtraytask.cpp --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/protocols/dbussystemtray/dbussystemtraytask.cpp 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/protocols/dbussystemtray/dbussystemtraytask.cpp 2010-07-10 13:55:12.000000000 -0400 @@ -0,0 +1,361 @@ +/*************************************************************************** + * * + * Copyright (C) 2009 Marco Martin * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#include "dbussystemtraytask.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dbussystemtraywidget.h" + +#include + +namespace SystemTray +{ + +DBusSystemTrayTask::DBusSystemTrayTask(const QString &service, Plasma::Service *dataService, QObject *parent) + : Task(parent), + m_movie(0), + m_blinkTimer(0), + m_service(dataService), + m_blink(false), + m_valid(false), + m_embeddable(false) +{ + kDebug(); + m_typeId = service; + m_name = service; + m_service->setParent(this); + + //TODO: how to behave if its not m_valid? + m_valid = !service.isEmpty(); + + if (m_valid) { + dataUpdated(service, Plasma::DataEngine::Data()); + } +} + +DBusSystemTrayTask::~DBusSystemTrayTask() +{ + delete m_movie; + delete m_blinkTimer; +} + +QGraphicsWidget* DBusSystemTrayTask::createWidget(Plasma::Applet *host) +{ + kDebug(); + DBusSystemTrayWidget *m_iconWidget = new DBusSystemTrayWidget(host, m_service); + m_iconWidget->show(); + + m_iconWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + m_iconWidget->setMinimumSize(KIconLoader::SizeSmall, KIconLoader::SizeSmall); + //standard fdo icon sizes is 24x24, opposed to the 22x22 SizeSmallMedium + m_iconWidget->setPreferredSize(24, 24); + + //Delay because syncStatus needs that createWidget is done +// QTimer::singleShot(0, this, SLOT(connectToData())); + return m_iconWidget; +} + +bool DBusSystemTrayTask::isValid() const +{ + return m_valid; +} + +bool DBusSystemTrayTask::isEmbeddable() const +{ + return m_embeddable; +} + +QString DBusSystemTrayTask::name() const +{ + return m_name; +} + +QString DBusSystemTrayTask::typeId() const +{ + return m_typeId; +} + +QIcon DBusSystemTrayTask::icon() const +{ + return m_icon; +} + +void DBusSystemTrayTask::dataUpdated(const QString &taskName, const Plasma::DataEngine::Data &properties) +{ + Q_UNUSED(taskName); + + const QString oldTypeId = m_typeId; + + QString cat = properties["Category"].toString(); + if (!cat.isEmpty()) { + int index = metaObject()->indexOfEnumerator("Category"); + int key = metaObject()->enumerator(index).keyToValue(cat.toLatin1()); + + if (key != -1) { + setCategory((Task::Category)key); + } + } + + if (properties["TitleChanged"].toBool()) { + QString m_title = properties["Title"].toString(); + if (!m_title.isEmpty()) { + m_name = m_title; + + if (m_typeId.isEmpty()) { + m_typeId = m_title; + } + } + } + + /* + kDebug() << m_name + << "status:" << properties["StatusChanged"].toBool() << "title:" << properties["TitleChanged"].toBool() + << "icons:" << properties["IconsChanged"].toBool() << "tooltip:" << properties["ToolTipChanged"].toBool(); + */ + + QString id = properties["Id"].toString(); + if (!id.isEmpty()) { + m_typeId = id; + } + + if (properties["IconsChanged"].toBool()) { + syncIcons(properties); + } + + if (properties["StatusChanged"].toBool()) { + syncStatus(properties["Status"].toString()); + } + + if (properties["ToolTipChanged"].toBool()) { + syncToolTip(properties["ToolTipTitle"].toString(), + properties["ToolTipSubTitle"].toString(), + properties["ToolTipIcon"].value()); + } + + foreach (QGraphicsWidget *widget, widgetsByHost()) { + DBusSystemTrayWidget *iconWidget = qobject_cast(widget); + if (iconWidget) { + iconWidget->setItemIsMenu(properties["WindowId"].toInt() == 0); + } + } + + if (m_typeId != oldTypeId) { + QHash::const_iterator i = widgetsByHost().constBegin(); + while (i != widgetsByHost().constEnd()) { + Plasma::IconWidget *icon = static_cast(i.value()); + icon->action()->setObjectName(QString("Systemtray-%1-%2").arg(m_typeId).arg(i.key()->id())); + + KConfigGroup cg = i.key()->config(); + KConfigGroup shortcutsConfig = KConfigGroup(&cg, "Shortcuts"); + QString shortcutText = shortcutsConfig.readEntryUntranslated(icon->action()->objectName(), QString()); + KAction *action = qobject_cast(icon->action()); + if (action && !shortcutText.isEmpty()) { + action->setGlobalShortcut(KShortcut(shortcutText), + KAction::ShortcutTypes(KAction::ActiveShortcut | KAction::DefaultShortcut), + KAction::NoAutoloading); + } + + ++i; + } + } + + m_embeddable = true; + + if (oldTypeId != m_typeId || properties["StatusChanged"].toBool() || properties["TitleChanged"].toBool()) { + //kDebug() << "signaling a change"; + emit changed(this); + } +} + +void DBusSystemTrayTask::syncIcons(const Plasma::DataEngine::Data &properties) +{ + m_icon = properties["Icon"].value(); + m_iconName = properties["IconName"].toString(); + + if (status() != Task::NeedsAttention) { + foreach (QGraphicsWidget *widget, widgetsByHost()) { + DBusSystemTrayWidget *iconWidget = qobject_cast(widget); + if (!iconWidget) { + continue; + } + + iconWidget->setIcon(m_iconName, m_icon); + + //This hardcoded number is needed to support pixel perfection of m_icons coming from other environments, in kde actualsize will jusrt return our usual 22x22 + if (iconWidget->svg().isEmpty()) { + QSize size = m_icon.actualSize(QSize(24, 24)); + iconWidget->setPreferredSize(iconWidget->sizeFromIconSize(qMax(size.width(), size.height()))); + } else { + iconWidget->setPreferredSize(24, 24); + } + } + } + + m_attentionIcon = properties["AttentionIcon"].value(); + m_attentionIconName = properties["AttentionIconName"].toString(); + + QString m_movieName = properties["AttentionMovieName"].toString(); + syncMovie(m_movieName); + + //FIXME: this is used only on the monochrome ones, the third place where the overlay painting is implemented + QIcon overlayIcon = properties["OverlayIcon"].value(); + if (overlayIcon.isNull() && !properties["OverlayIconName"].value().isEmpty()) { + overlayIcon = KIcon(properties["OverlayIconName"].value()); + } + + if (!overlayIcon.isNull()) { + foreach (QGraphicsWidget *widget, widgetsByHost()) { + DBusSystemTrayWidget *iconWidget = qobject_cast(widget); + if (iconWidget) { + iconWidget->setOverlayIcon(overlayIcon); + } + } + } +} + +void DBusSystemTrayTask::blinkAttention() +{ + foreach (QGraphicsWidget *widget, widgetsByHost()) { + DBusSystemTrayWidget *iconWidget = qobject_cast(widget); + if (iconWidget) { + iconWidget->setIcon(m_blink?m_attentionIconName:m_iconName, m_blink?m_attentionIcon:m_icon); + } + } + m_blink = !m_blink; +} + +void DBusSystemTrayTask::syncMovie(const QString &m_movieName) +{ + delete m_movie; + if (m_movieName.isEmpty()) { + m_movie = 0; + return; + } + if (QDir::isAbsolutePath(m_movieName)) { + m_movie = new QMovie(m_movieName); + } else { + m_movie = KIconLoader::global()->loadMovie(m_movieName, KIconLoader::Panel); + } + if (m_movie) { + connect(m_movie, SIGNAL(frameChanged(int)), this, SLOT(updateMovieFrame())); + } +} + + + +void DBusSystemTrayTask::updateMovieFrame() +{ + Q_ASSERT(m_movie); + QPixmap pix = m_movie->currentPixmap(); + foreach (QGraphicsWidget *widget, widgetsByHost()) { + Plasma::IconWidget *iconWidget = qobject_cast(widget); + if (iconWidget) { + iconWidget->setIcon(pix); + } + } +} + + +//toolTip + +void DBusSystemTrayTask::syncToolTip(const QString &title, const QString &subTitle, const QIcon &toolTipIcon) +{ + if (title.isEmpty()) { + foreach (QGraphicsWidget *widget, widgetsByHost()) { + Plasma::ToolTipManager::self()->clearContent(widget); + } + return; + } + + Plasma::ToolTipContent toolTipData(title, subTitle, toolTipIcon); + foreach (QGraphicsWidget *widget, widgetsByHost()) { + Plasma::ToolTipManager::self()->setContent(widget, toolTipData); + } +} + + +//Status + +void DBusSystemTrayTask::syncStatus(QString newStatus) +{ + Task::Status status = (Task::Status)metaObject()->enumerator(metaObject()->indexOfEnumerator("Status")).keyToValue(newStatus.toLatin1()); + + if (this->status() == status) { + return; + } + + if (status == Task::NeedsAttention) { + if (m_movie) { + m_movie->stop(); + m_movie->start(); + } else if (!m_attentionIcon.isNull()) { + if (!m_blinkTimer) { + m_blinkTimer = new QTimer(this); + connect(m_blinkTimer, SIGNAL(timeout()), this, SLOT(blinkAttention())); + m_blinkTimer->start(500); + } + } + } else { + if (m_movie) { + m_movie->stop(); + } + + if (m_blinkTimer) { + m_blinkTimer->stop(); + m_blinkTimer->deleteLater(); + m_blinkTimer = 0; + } + + foreach (QGraphicsWidget *widget, widgetsByHost()) { + DBusSystemTrayWidget *iconWidget = qobject_cast(widget); + if (iconWidget) { + iconWidget->setIcon(m_iconName, m_icon); + } + } + } + + setStatus(status); +} + +} + +#include "dbussystemtraytask.moc" diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/protocols/dbussystemtray/dbussystemtraytask.h plasma-mobile-0.0~svn20100711/applets/mobilesystray/protocols/dbussystemtray/dbussystemtraytask.h --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/protocols/dbussystemtray/dbussystemtraytask.h 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/protocols/dbussystemtray/dbussystemtraytask.h 2010-07-10 13:55:12.000000000 -0400 @@ -0,0 +1,87 @@ +/*************************************************************************** + * * + * Copyright (C) 2009 Marco Martin * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#ifndef DBUSSYSTEMTRAYTASK_H +#define DBUSSYSTEMTRAYTASK_H + +#include "../../core/task.h" + +#include + +namespace Plasma +{ + +class Service; + +} + +namespace SystemTray +{ + +class DBusSystemTrayTaskPrivate; + +class DBusSystemTrayTask : public Task +{ + Q_OBJECT + + friend class DBusSystemTrayProtocol; + +public: + DBusSystemTrayTask(const QString &serviceName, Plasma::Service *service, QObject *parent); + ~DBusSystemTrayTask(); + + QGraphicsWidget* createWidget(Plasma::Applet *host); + bool isValid() const; + bool isEmbeddable() const; + virtual QString name() const; + virtual QString typeId() const; + virtual QIcon icon() const; + +private: + void syncToolTip(const QString &title, const QString &subTitle, const QIcon &toolTipIcon); + void syncMovie(const QString &); + void syncIcons(const Plasma::DataEngine::Data &properties); + +private Q_SLOTS: + void syncStatus(QString status); + void updateMovieFrame(); + void blinkAttention(); + void dataUpdated(const QString &taskName, const Plasma::DataEngine::Data &taskData); + +private: + QString m_typeId; + QString m_name; + QString m_title; + QIcon m_icon; + QString m_iconName; + QIcon m_attentionIcon; + QString m_attentionIconName; + QMovie *m_movie; + QTimer *m_blinkTimer; + Plasma::Service *m_service; + bool m_blink : 1; + bool m_valid : 1; + bool m_embeddable : 1; +}; + +} + + +#endif diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/protocols/dbussystemtray/dbussystemtraywidget.cpp plasma-mobile-0.0~svn20100711/applets/mobilesystray/protocols/dbussystemtray/dbussystemtraywidget.cpp --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/protocols/dbussystemtray/dbussystemtraywidget.cpp 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/protocols/dbussystemtray/dbussystemtraywidget.cpp 2010-07-10 13:55:12.000000000 -0400 @@ -0,0 +1,201 @@ +/*************************************************************************** + * * + * Copyright (C) 2009 Aaron Seigo * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#include "dbussystemtraywidget.h" + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +namespace SystemTray +{ + +DBusSystemTrayWidget::DBusSystemTrayWidget(Plasma::Applet *parent, Plasma::Service *service) + : Plasma::IconWidget(parent), + m_service(service), + m_host(parent), + m_waitingOnContextMenu(false) +{ + KAction *action = new KAction(this); + setAction(action); + connect(action, SIGNAL(triggered()), this, SLOT(calculateShowPosition())); +} + +void DBusSystemTrayWidget::mousePressEvent(QGraphicsSceneMouseEvent *event) +{ + Plasma::IconWidget::mousePressEvent(event); + + if (event->button() == Qt::MidButton) { + event->accept(); + } +} + +void DBusSystemTrayWidget::setItemIsMenu(bool itemIsMenu) +{ + m_itemIsMenu = itemIsMenu; +} + +bool DBusSystemTrayWidget::itemIsMenu() const +{ + return m_itemIsMenu; +} + +void DBusSystemTrayWidget::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + if (event->button() == Qt::MidButton) { + KConfigGroup params = m_service->operationDescription("SecondaryActivate"); + params.writeEntry("x", event->screenPos().x()); + params.writeEntry("y", event->screenPos().y()); + m_service->startOperationCall(params); + } else if (m_itemIsMenu && !m_waitingOnContextMenu) { + m_waitingOnContextMenu = true; + KConfigGroup params = m_service->operationDescription("ContextMenu"); + params.writeEntry("x", event->screenPos().x()); + params.writeEntry("y", event->screenPos().y()); + KJob *job = m_service->startOperationCall(params); + connect(job, SIGNAL(result(KJob*)), this, SLOT(showContextMenu(KJob*))); + return; + } + + Plasma::IconWidget::mouseReleaseEvent(event); +} + +void DBusSystemTrayWidget::wheelEvent(QGraphicsSceneWheelEvent *event) +{ + KConfigGroup params = m_service->operationDescription("Scroll"); + params.writeEntry("delta", event->delta()); + params.writeEntry("direction", "Vertical"); + m_service->startOperationCall(params); +} + +void DBusSystemTrayWidget::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ + if (m_waitingOnContextMenu) { + return; + } + + m_waitingOnContextMenu = true; + KConfigGroup params = m_service->operationDescription("ContextMenu"); + params.writeEntry("x", event->screenPos().x()); + params.writeEntry("y", event->screenPos().y()); + KJob *job = m_service->startOperationCall(params); + connect(job, SIGNAL(result(KJob*)), this, SLOT(showContextMenu(KJob*))); +} + +void DBusSystemTrayWidget::showContextMenu(KJob *job) +{ + m_waitingOnContextMenu = false; + Plasma::ServiceJob *sjob = qobject_cast(job); + if (!sjob) { + return; + } + + QMenu *menu = qobject_cast(sjob->result().value()); + if (menu) { + if (m_host->containment() && m_host->containment()->corona()) { + menu->adjustSize(); + QPoint p = m_host->containment()->corona()->popupPosition(this, menu->size()); + //kDebug() << "execing at: " << p << menu->size(); + menu->exec(p); + } else { + // Compute a reasonable position for the menu if we don't have a corona. + QPoint pos(sjob->parameters()["x"].toInt(), sjob->parameters()["y"].toInt()); + QRect availableRect = QApplication::desktop()->availableGeometry(pos); + QRect menuRect = QRect(pos, menu->sizeHint()); + if (menuRect.left() < availableRect.left()) { + menuRect.moveLeft(availableRect.left()); + } else if (menuRect.right() > availableRect.right()) { + menuRect.moveRight(availableRect.right()); + } + if (menuRect.top() < availableRect.top()) { + menuRect.moveTop(availableRect.top()); + } else if (menuRect.bottom() > availableRect.bottom()) { + menuRect.moveBottom(availableRect.bottom()); + } + //kDebug() << "non-corona execing at: " << menuRect.topLeft(); + menu->exec(menuRect.topLeft()); + } + } +} + +void DBusSystemTrayWidget::calculateShowPosition() +{ + Plasma::Corona *corona = m_host->containment()->corona(); + QSize s(1, 1); + QPoint pos = corona->popupPosition(this, s); + KConfigGroup params = m_service->operationDescription("Activate"); + params.writeEntry("x", pos.x()); + params.writeEntry("y", pos.y()); + m_service->startOperationCall(params); +} + +void DBusSystemTrayWidget::setIcon(const QString &iconName, const QIcon &icon) +{ + if (!iconName.isEmpty()) { + QString name = QString("icons/") + iconName.split("-").first(); + if (Plasma::Theme::defaultTheme()->imagePath(name).isEmpty()) { + Plasma::IconWidget::setIcon(icon); + } else { + setSvg(name, iconName); + if (svg().isEmpty()) { + Plasma::IconWidget::setIcon(icon); + } + } + } else { + Plasma::IconWidget::setIcon(icon); + } +} + +void DBusSystemTrayWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) +{ + Plasma::IconWidget::paint(painter, option, widget); + if (!svg().isEmpty()) { + int size = 0; + if (iconSize().width() <= KIconLoader::SizeSmallMedium) { + size = KIconLoader::SizeSmall/2; + } else if (iconSize().width() <= KIconLoader::SizeMedium) { + size = KIconLoader::SizeSmall/2; + } else { + size = KIconLoader::SizeSmall; + } + m_overlayIcon.paint(painter, QRect(option->rect.bottomRight() - QPoint(size, size), QSize(size, size))); + } +} + +void DBusSystemTrayWidget::setOverlayIcon(const QIcon &icon) +{ + m_overlayIcon = icon; +} + +QIcon DBusSystemTrayWidget::overlayIcon() const +{ + return m_overlayIcon; +} + +} + diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/protocols/dbussystemtray/dbussystemtraywidget.h plasma-mobile-0.0~svn20100711/applets/mobilesystray/protocols/dbussystemtray/dbussystemtraywidget.h --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/protocols/dbussystemtray/dbussystemtraywidget.h 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/protocols/dbussystemtray/dbussystemtraywidget.h 2010-07-10 13:55:12.000000000 -0400 @@ -0,0 +1,74 @@ +/*************************************************************************** + * * + * Copyright (C) 2009 Aaron Seigo * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#ifndef DBUSSYSTEMTRAYWIDGET_H +#define DBUSSYSTEMTRAYWIDGET_H + +#include + +class KJob; + +namespace Plasma +{ + class Applet; +} + +namespace SystemTray +{ + +class DBusSystemTrayWidget : public Plasma::IconWidget +{ + Q_OBJECT + +public: + DBusSystemTrayWidget(Plasma::Applet *parent, Plasma::Service *service); + void setIcon(const QString &iconName, const QIcon &icon); + + void setItemIsMenu(bool itemIsMenu); + bool itemIsMenu() const; + + void setOverlayIcon(const QIcon &icon); + QIcon overlayIcon() const; + +Q_SIGNALS: + void clicked(const QPoint &pos); + +protected: + void mousePressEvent(QGraphicsSceneMouseEvent *event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); + void wheelEvent(QGraphicsSceneWheelEvent *event); + void contextMenuEvent(QGraphicsSceneContextMenuEvent *event); + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); + +private Q_SLOTS: + void calculateShowPosition(); + void showContextMenu(KJob *job); + +private: + Plasma::Service *m_service; + Plasma::Applet *m_host; + QIcon m_overlayIcon; + bool m_itemIsMenu; + bool m_waitingOnContextMenu; +}; + +} + + +#endif diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/protocols/plasmoid/plasmoidtask.cpp plasma-mobile-0.0~svn20100711/applets/mobilesystray/protocols/plasmoid/plasmoidtask.cpp --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/protocols/plasmoid/plasmoidtask.cpp 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/protocols/plasmoid/plasmoidtask.cpp 2010-07-07 03:34:34.000000000 -0400 @@ -0,0 +1,198 @@ +/*************************************************************************** + * plasmoidtask.cpp * + * * + * Copyright (C) 2008 Jason Stubbs * + * Copyright (C) 2008 Sebastian Kügler * + * Copyright (C) 2009 Marco Martin * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#include "plasmoidtask.h" +#include + +#include +#include + +#include +#include +#include + + +namespace SystemTray +{ + +PlasmoidTask::PlasmoidTask(const QString &appletname, int id, QObject *parent, Plasma::Applet *host) + : Task(parent), + m_name(appletname), + m_typeId(appletname), + m_host(host), + m_takenByParent(false) +{ + setupApplet(appletname, id); +} + + +PlasmoidTask::~PlasmoidTask() +{ + emit taskDeleted(m_host, m_typeId); +} + + +bool PlasmoidTask::isEmbeddable() const +{ + return m_applet && !m_takenByParent; +} + +bool PlasmoidTask::isValid() const +{ + return !m_name.isEmpty() && m_applet; +} + +QString PlasmoidTask::name() const +{ + if (m_applet) { + return m_applet.data()->name(); + } + + return m_name; +} + + +QString PlasmoidTask::typeId() const +{ + return m_typeId; +} + + +QIcon PlasmoidTask::icon() const +{ + return m_icon; +} + +Plasma::Applet *PlasmoidTask::host() const +{ + return m_host; +} + +QGraphicsWidget* PlasmoidTask::createWidget(Plasma::Applet *host) +{ + if (host != m_host || !m_applet) { + return 0; + } + + Plasma::Applet *applet = m_applet.data(); + m_takenByParent = true; + applet->setParent(host); + applet->setParentItem(host); + applet->init(); + applet->updateConstraints(Plasma::StartupCompletedConstraint); + applet->flushPendingConstraintsEvents(); + applet->updateConstraints(Plasma::AllConstraints); + applet->flushPendingConstraintsEvents(); + + // make sure to record it in the configuration so that if we reload from the config, + // this applet is remembered + KConfigGroup dummy; + applet->save(dummy); + + connect(applet, SIGNAL(newStatus(Plasma::ItemStatus)), this, SLOT(newAppletStatus(Plasma::ItemStatus))); + + newAppletStatus(applet->status()); + + connect(applet, SIGNAL(configNeedsSaving()), host, SIGNAL(configNeedsSaving())); + connect(applet, SIGNAL(releaseVisualFocus()), host, SIGNAL(releaseVisualFocus())); + + return static_cast(applet); +} + +void PlasmoidTask::forwardConstraintsEvent(Plasma::Constraints constraints) +{ + Plasma::Applet *applet = m_applet.data(); + if (applet) { + applet->updateConstraints(constraints); + applet->flushPendingConstraintsEvents(); + } +} + +void PlasmoidTask::setupApplet(const QString &plugin, int id) +{ + Plasma::Applet *applet = Plasma::Applet::load(plugin, id); + m_applet = applet; + + if (!m_applet) { + kDebug() << "Could not load applet" << plugin; + return; + } + + //FIXME: System Information should be system services, but battery and devicenotifier are both there. we would need multiple categories + if (applet->category() == "System Information" || + applet->category() == "Network") { + setCategory(Hardware); + } else if (applet->category() == "Online Services") { + setCategory(Communications); + } + + m_icon = KIcon(applet->icon()); + + applet->setFlag(QGraphicsItem::ItemIsMovable, false); + + connect(applet, SIGNAL(destroyed(QObject*)), this, SLOT(appletDestroyed(QObject*))); + applet->setBackgroundHints(Plasma::Applet::NoBackground); + + applet->setPreferredSize(KIconLoader::SizeSmallMedium+2, KIconLoader::SizeSmallMedium+2); + kDebug() << applet->name() << " Applet loaded"; +} + +void PlasmoidTask::appletDestroyed(QObject *) +{ + deleteLater(); +} + +void PlasmoidTask::newAppletStatus(Plasma::ItemStatus status) +{ + Plasma::Applet *applet = m_applet.data(); + if (!applet) { + return; + } + + switch (status) { + case Plasma::PassiveStatus: + if (Plasma::PopupApplet *popupApplet = qobject_cast(applet)) { + popupApplet->hidePopup(); + } + setStatus(Task::Passive); + break; + + case Plasma::ActiveStatus: + setStatus(Task::Active); + break; + + case Plasma::NeedsAttentionStatus: + setStatus(Task::NeedsAttention); + break; + + default: + case Plasma::UnknownStatus: + setStatus(Task::UnknownStatus); + } + + emit changed(this); +} + +} + +#include "plasmoidtask.moc" diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/protocols/plasmoid/plasmoidtask.h plasma-mobile-0.0~svn20100711/applets/mobilesystray/protocols/plasmoid/plasmoidtask.h --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/protocols/plasmoid/plasmoidtask.h 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/protocols/plasmoid/plasmoidtask.h 2010-07-07 03:34:34.000000000 -0400 @@ -0,0 +1,74 @@ +/*************************************************************************** + * plasmoidtask.h * + * * + * Copyright (C) 2008 Jason Stubbs * + * Copyright (C) 2008 Sebastian Kügler * + * Copyright (C) 2009 Marco Martin * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#ifndef PLASMOIDTASK_H +#define PLASMOIDTASK_H + +#include "../../core/task.h" + +#include + +namespace SystemTray +{ + + +class PlasmoidTask : public Task +{ + Q_OBJECT + +public: + PlasmoidTask(const QString &appletName, int id, QObject *parent, Plasma::Applet *host); + virtual ~PlasmoidTask(); + + bool isValid() const; + virtual bool isEmbeddable() const; + virtual QString name() const; + virtual QString typeId() const; + virtual QIcon icon() const; + void forwardConstraintsEvent(Plasma::Constraints constraints); + Plasma::Applet *host() const; + +protected Q_SLOTS: + void appletDestroyed(QObject *object); + void newAppletStatus(Plasma::ItemStatus status); + +Q_SIGNALS: + void taskDeleted(Plasma::Applet *host, const QString &typeId); + +protected: + virtual QGraphicsWidget* createWidget(Plasma::Applet *applet); + +private: + void setupApplet(const QString &plugin, int id); + + QString m_name; + QString m_typeId; + QIcon m_icon; + QWeakPointer m_applet; + Plasma::Applet *m_host; + bool m_takenByParent; +}; + +} + +#endif diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/protocols/plasmoid/plasmoidtaskprotocol.cpp plasma-mobile-0.0~svn20100711/applets/mobilesystray/protocols/plasmoid/plasmoidtaskprotocol.cpp --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/protocols/plasmoid/plasmoidtaskprotocol.cpp 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/protocols/plasmoid/plasmoidtaskprotocol.cpp 2010-07-07 03:34:34.000000000 -0400 @@ -0,0 +1,160 @@ +/*************************************************************************** + * plasmoidprotocol.cpp * + * * + * Copyright (C) 2008 Jason Stubbs * + * Copyright (C) 2008 Sebastian Kügler * + * Copyright (C) 2009 Marco Martin * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#include "plasmoidtask.h" +#include "plasmoidtaskprotocol.h" + +#include + +#include + +namespace SystemTray +{ + +PlasmoidProtocol::PlasmoidProtocol(QObject *parent) + : Protocol(parent) +{ +} + + +PlasmoidProtocol::~PlasmoidProtocol() +{ +} + + +void PlasmoidProtocol::init() +{ +} + +void PlasmoidProtocol::forwardConstraintsEvent(Plasma::Constraints constraints, Plasma::Applet *host) +{ + if (m_tasks.contains(host)) { + QHash tasksForHost = m_tasks.value(host); + foreach (PlasmoidTask *task, tasksForHost) { + task->forwardConstraintsEvent(constraints); + } + } +} + +void PlasmoidProtocol::loadFromConfig(Plasma::Applet *parent) +{ + KConfigGroup cg = parent->config(); + QHash existingTasks = m_tasks.value(parent); + + if (m_tasks.contains(parent)) { + m_tasks[parent].clear(); + } + + KConfigGroup appletGroup(&cg, "Applets"); + foreach (const QString &groupName, appletGroup.groupList()) { + KConfigGroup childGroup(&appletGroup, groupName); + QString appletName = childGroup.readEntry("plugin", QString()); + + if (m_tasks.contains(parent) && m_tasks.value(parent).contains(appletName)) { + continue; + } + + if (existingTasks.contains(appletName)) { + m_tasks[parent].insert(appletName, existingTasks.value(appletName)); + existingTasks.remove(appletName); + continue; + } + + addApplet(appletName, groupName.toInt(), parent); + + existingTasks.remove(appletName); + } + + QHashIterator it(existingTasks); + while (it.hasNext()) { + it.next(); + Plasma::Applet *applet = qobject_cast(it.value()->widget(parent, true)); + if (applet) { + applet->destroy(); + } + } +} + +void PlasmoidProtocol::addApplet(const QString appletName, const int id, Plasma::Applet *parent) +{ + kDebug() << "Registering task with the manager" << appletName; + + PlasmoidTask *task = new PlasmoidTask(appletName, id, this, parent); + + if (!task->isValid()) { + // we failed to load our applet *sob* + delete task; + return; + } + + + m_tasks[parent].insert(appletName, task); + + connect(task, SIGNAL(taskDeleted(Plasma::Applet *, const QString &)), this, SLOT(cleanupTask(Plasma::Applet *, const QString &))); + emit taskCreated(task); +} + +void PlasmoidProtocol::removeApplet(const QString appletName, Plasma::Applet *parent) +{ + if (!m_tasks.contains(parent) || !m_tasks.value(parent).contains(appletName)) { + return; + } + + Plasma::Applet *applet = qobject_cast(m_tasks.value(parent).value(appletName)->widget(parent, true)); + + if (applet) { + applet->destroy(); + } +} + +void PlasmoidProtocol::cleanupTask(Plasma::Applet *host, const QString &typeId) +{ + kDebug() << "task with typeId" << typeId << "removed"; + if (m_tasks.contains(host)) { + m_tasks[host].remove(typeId); + if (m_tasks.value(host).isEmpty()) { + m_tasks.remove(host); + } + } +} + +QStringList PlasmoidProtocol::applets(Plasma::Applet *host) const +{ + QStringList list; + if (!m_tasks.contains(host)) { + return list; + } + + QHashIterator i(m_tasks.value(host)); + + while (i.hasNext()) { + i.next(); + list << i.key(); + } + + return list; +} + +} + +#include "plasmoidtaskprotocol.moc" diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/protocols/plasmoid/plasmoidtaskprotocol.h plasma-mobile-0.0~svn20100711/applets/mobilesystray/protocols/plasmoid/plasmoidtaskprotocol.h --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/protocols/plasmoid/plasmoidtaskprotocol.h 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/protocols/plasmoid/plasmoidtaskprotocol.h 2010-07-07 03:34:34.000000000 -0400 @@ -0,0 +1,65 @@ +/*************************************************************************** + * plasmoidprotocol.h * + * * + * Copyright (C) 2008 Jason Stubbs * + * Copyright (C) 2008 Sebastian Kügler * + * Copyright (C) 2009 Marco Martin * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#ifndef PLASMOIDTASKPROTOCOL_H +#define PLASMOIDTASKPROTOCOL_H + +#include "../../core/protocol.h" + +#include + +#include +#include + +namespace SystemTray +{ + +class PlasmoidTask; + +class PlasmoidProtocol : public Protocol +{ + Q_OBJECT + +public: + PlasmoidProtocol(QObject * parent); + ~PlasmoidProtocol(); + + void init(); + + void forwardConstraintsEvent(Plasma::Constraints constraints, Plasma::Applet *host); + void loadFromConfig(Plasma::Applet *parent); + void addApplet(const QString appletName, const int id, Plasma::Applet *parent); + void removeApplet(const QString appletName, Plasma::Applet *parent); + QStringList applets(Plasma::Applet *parent) const; + +private slots: + void cleanupTask(Plasma::Applet *host, const QString &typeId); + +private: + QHash > m_tasks; +}; + +} + + +#endif diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/ui/applet.cpp plasma-mobile-0.0~svn20100711/applets/mobilesystray/ui/applet.cpp --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/ui/applet.cpp 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/ui/applet.cpp 2010-07-10 13:55:12.000000000 -0400 @@ -0,0 +1,250 @@ +/*************************************************************************** + * applet.cpp * + * * + * Copyright (C) 2010 Lim Yuen Hoe * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#include "applet.h" + +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include "../core/manager.h" +#include "../core/task.h" + +namespace SystemTray +{ + +EnlargedWidget::EnlargedWidget(QGraphicsScene *sc) + : QGraphicsView(sc), m_toolBoxActivated(false) +{ + const QDesktopWidget desktop; + QRect size = desktop.availableGeometry(this); + resize(size.width(), size.height()); + setWindowFlags(Qt::Popup); + setAttribute(Qt::WA_TranslucentBackground, true); + setStyleSheet("background: transparent; border: none"); + setAlignment(Qt::AlignTop); + move(0,0); +} + +void EnlargedWidget::mousePressEvent(QMouseEvent* e) +{ + if (e->y() > 100 && !m_toolBoxActivated) { + hide(); + } + QGraphicsView::mousePressEvent(e); +} + +Manager *MobileTray::m_manager = 0; + +MobileTray::MobileTray(QObject *parent, const QVariantList &args) + : Plasma::Applet(parent, args), + m_icon("document"), m_view(0), m_scene(0), m_overlay(0), m_toolbox(0) +{ + if (!m_manager) { + m_manager = new SystemTray::Manager(); + } + + m_fixedList << "notifications" << "org.kde.networkmanagement" << "battery"; + + setBackgroundHints(DefaultBackground); + layout = new QGraphicsLinearLayout(Qt::Horizontal, this); + resize(50,50); +} + + +MobileTray::~MobileTray() +{ + if (hasFailedToLaunch()) { + // Do some cleanup here + } else { + // Save settings + } +} + +void MobileTray::init() +{ + m_manager->loadApplets(this); + + QStringList applets = m_manager->applets(this); + if (!applets.contains("org.kde.networkmanagement")) { + m_manager->addApplet("org.kde.networkmanagement", this); + } + + if (!applets.contains("notifier")) { + m_manager->addApplet("notifier", this); + } + + if (!applets.contains("notifications")) { + m_manager->addApplet("notifications", this); + } + + if (!applets.contains("battery")) { + Plasma::DataEngineManager *engines = Plasma::DataEngineManager::self(); + Plasma::DataEngine *power = engines->loadEngine("powermanagement"); + if (power) { + const QStringList &batteries = power->query("Battery")["sources"].toStringList(); + if (!batteries.isEmpty()) { + m_manager->addApplet("battery", this); + } + } + engines->unloadEngine("powermanagement"); + } + + foreach(Task *task, m_manager->tasks()) { + bool isFixed = m_fixedList.contains(task->typeId()); + if (task->isEmbeddable(this) && (isFixed || m_cyclicIcons.size() < MAXCYCLIC)) { + Plasma::IconWidget *ic = new Plasma::IconWidget(task->icon(), "", this); + connect(ic, SIGNAL(clicked()), this, SLOT(enlarge())); + if (isFixed) { + layout->insertItem(0, ic); + m_fixedIcons.insert(task->typeId(), ic); + } else { + layout->addItem(ic); + m_cyclicIcons.insert(task->typeId(), ic); + } + } + } + adjustSize(); + m_overlay = new EnlargedOverlay(m_manager->tasks(), + containment()->boundingRect().size().toSize(), this); + m_overlay->hide(); + + connect(m_manager, SIGNAL(taskAdded(SystemTray::Task*)), + this, SLOT(addTask(SystemTray::Task*))); + connect(m_manager, SIGNAL(taskChanged(SystemTray::Task*)), + this, SLOT(updateTask(SystemTray::Task*))); + connect(m_manager, SIGNAL(taskRemoved(SystemTray::Task*)), + this, SLOT(removeTask(SystemTray::Task*))); + +} + +void MobileTray::addTask(SystemTray::Task* task) +{ + m_overlay->addTask(task); + bool isFixed = m_fixedList.contains(task->typeId()); + if (!isFixed && m_cyclicIcons.size() >= MAXCYCLIC) { + Plasma::IconWidget *ic = m_cyclicIcons.take(m_cyclicIcons.keys().at(0)); + layout->removeItem(ic); + delete ic; + } + Plasma::IconWidget *ic = new Plasma::IconWidget(task->icon(), "", this); + connect(ic, SIGNAL(clicked()), this, SLOT(enlarge())); + if (isFixed) { + layout->insertItem(0,ic); + m_fixedIcons.insert(task->typeId(), ic); + } else { + layout->addItem(ic); + m_cyclicIcons.insert(task->typeId(), ic); + } + adjustSize(); +} + +void MobileTray::removeTask(SystemTray::Task* task) +{ + m_overlay->removeTask(task); + Plasma::IconWidget *ic = 0; + if (m_cyclicIcons.contains(task->typeId())) { + ic = m_cyclicIcons.take(task->typeId()); + } else if (m_fixedIcons.contains(task->typeId())) { + ic = m_fixedIcons.take(task->typeId()); + } + if (ic) { + layout->removeItem(ic); + delete ic; + } +} + +void MobileTray::updateTask(SystemTray::Task* task) +{ + removeTask(task); + addTask(task); + //m_overlay->updateTask(task); +} + +void MobileTray::enlarge() +{ + //removeToolBox(); + if (m_overlay) { + m_overlay->show(); + m_overlay->setPos(0 - scenePos().x() + containment()->scenePos().x() + 50, + 0 - scenePos().y() + containment()->scenePos().y()); + return; + } + //m_scene = new QGraphicsScene(); + //m_view = new EnlargedWidget(m_scene); + + m_overlay = new EnlargedOverlay(m_manager->tasks(), + containment()->boundingRect().size().toSize(), this); + m_overlay->show(); + m_overlay->setPos(0 - scenePos().x() + containment()->scenePos().x() + 50, + 0 - scenePos().y() + containment()->scenePos().y()); + //connect (m_overlay, SIGNAL(showMenu(QMenu*)), this, SLOT(showOverlayToolBox(QMenu*))); + +// m_scene->addItem(m_overlay); + +// m_view->show(); +} + +void MobileTray::removeToolBox() +{ + if (m_toolbox) { + m_scene->removeItem(m_toolbox); + m_toolbox->hide(); + delete m_toolbox; + m_toolbox = 0; + } +} + +void MobileTray::showOverlayToolBox(QMenu *m) +{ + removeToolBox(); + m_view->setToolBoxActivated(true); + + QAction *cancel = new QAction(KIcon("dialog-cancel"), i18n("Cancel"), this); + connect(cancel, SIGNAL(triggered()), m_view, SLOT(hide())); + m->addAction(cancel); + + m_toolbox = new OverlayToolBox("", this); + m_scene->addItem(m_toolbox); + m_toolbox->setPos(0,100); + m_toolbox->resize(m_view->size().width() - 100, m_view->size().height() - 100); + m_toolbox->setMainMenu(m); +} + +void MobileTray::mousePressEvent(QGraphicsSceneMouseEvent*) +{ + enlarge(); +} + + +// This is the command that links your applet to the .desktop file +K_EXPORT_PLASMA_APPLET(mobilesystemtray, MobileTray) + +} + +#include "applet.moc" \ No newline at end of file diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/ui/applet.h plasma-mobile-0.0~svn20100711/applets/mobilesystray/ui/applet.h --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/ui/applet.h 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/ui/applet.h 2010-07-10 13:55:12.000000000 -0400 @@ -0,0 +1,97 @@ +/*************************************************************************** + * applet.h * + * * + * Copyright (C) 2010 Lim Yuen Hoe * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +#ifndef APPLET_H +#define APPLET_H + +#include +#include +#include +#include + +#include "enlargedoverlay.h" +#include "overlaytoolbox.h" + +namespace Plasma +{ +class IconWidget; +} + +class QGraphicsLinearLayout; +class QGraphicsScene; + +namespace SystemTray +{ + +class Manager; +class Task; + +class EnlargedWidget : public QGraphicsView +{ + Q_OBJECT +public: + EnlargedWidget(QGraphicsScene *sc); + void setToolBoxActivated(bool b) { m_toolBoxActivated = b; } + +protected: + virtual void mousePressEvent( QMouseEvent* ); + +private: + bool m_toolBoxActivated; +}; + +// Define our plasma Applet +class MobileTray : public Plasma::Applet +{ + Q_OBJECT +public: + // Basic Create/Destroy + MobileTray(QObject *parent, const QVariantList &args); + ~MobileTray(); + + void init(); +public slots: + void addTask(SystemTray::Task* task); + void removeTask(SystemTray::Task* task); + void updateTask(SystemTray::Task* task); + void enlarge(); + void showOverlayToolBox(QMenu *m); + +protected: + void mousePressEvent(QGraphicsSceneMouseEvent *event); + +private: + void removeToolBox(); + static Manager *m_manager; + static const int MAXCYCLIC = 3; + QGraphicsLinearLayout *layout; + KIcon m_icon; + QList m_fixedList; + QHash m_cyclicIcons; + QHash m_fixedIcons; + EnlargedWidget *m_view; + QGraphicsScene *m_scene; + EnlargedOverlay *m_overlay; + OverlayToolBox *m_toolbox; +}; + +} +#endif \ No newline at end of file diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/ui/enlargedoverlay.cpp plasma-mobile-0.0~svn20100711/applets/mobilesystray/ui/enlargedoverlay.cpp --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/ui/enlargedoverlay.cpp 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/ui/enlargedoverlay.cpp 2010-07-10 13:55:12.000000000 -0400 @@ -0,0 +1,134 @@ +/* + * Copyright 2008 Lim Yuen Hoe + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "enlargedoverlay.h" +#include "../protocols/dbussystemtray/dbussystemtraywidget.h" + +#include +#include +#include + +#include +#include +#include + +using namespace Plasma; + +namespace SystemTray +{ + +EnlargedOverlay::EnlargedOverlay(QList tasks, QSize containerSize, Plasma::Applet *par) + : Applet(par) +{ + parent = par; + m_layout = new QGraphicsLinearLayout(Qt::Horizontal, this); + Plasma::IconWidget *cancel = new Plasma::IconWidget(KIcon("dialog-cancel"), "", this); + connect(cancel, SIGNAL(clicked()), this, SLOT(hideOverlay())); + m_layout->addItem(cancel); + foreach(Task *task, tasks) { + if (task->isEmbeddable(parent)) { + QGraphicsWidget *w = task->widget(parent, true); + if (!w) { + continue; + } + m_layout->addItem(w); + m_widgetList.insert(task->typeId(), w); + w->setParent(this); + //Plasma::IconWidget *w = qobject_cast(task->widget(this, true)); + //layout->addItem(w); + //w->setIcon(task->icon()); + //Plasma::IconWidget *w = new Plasma::IconWidget(task->icon(), "", this); + //layout->addItem(w); + DBusSystemTrayWidget *d = qobject_cast(w); + if (d != 0) { + d->setIcon("", task->icon()); + d->setItemIsMenu(false); + /*QAction *q = new QAction(task->icon(), "", this); + connect(q, SIGNAL(triggered()), d, SLOT(emitMenu())); + w->setAction(q); + //connect(d, SIGNAL(clicked()), d, SLOT(emitMenu())); + connect(d, SIGNAL(menuEmitted(QMenu*)), this, SLOT(relayMenu(QMenu*)));*/ + } + } + } + + m_background.setImagePath("widgets/translucentbackground"); + m_background.setEnabledBorders(FrameSvg::AllBorders); + + resize(containerSize.width() - 100, 100); + setZValue(9999); +} + +EnlargedOverlay::~EnlargedOverlay() +{ +} + +void EnlargedOverlay::addTask(SystemTray::Task* task) +{ + QGraphicsWidget *w = task->widget(parent, true); + if (!w) return; + m_layout->addItem(w); + m_widgetList.insert(task->typeId(), w); + DBusSystemTrayWidget *d = qobject_cast(w); + if (d != 0) { + d->setIcon("", task->icon()); + d->setItemIsMenu(false); + } +} + +void EnlargedOverlay::removeTask(SystemTray::Task* task) +{ + QGraphicsWidget *ic = m_widgetList.take(task->typeId()); + if (ic) { + m_layout->removeItem(ic); + delete ic; + } +} + +void EnlargedOverlay::updateTask(SystemTray::Task* task) +{ + removeTask(task); + addTask(task); +} + +void EnlargedOverlay::hideOverlay() +{ + hide(); +} + +void EnlargedOverlay::relayMenu(QMenu* m) +{ + emit showMenu(m); +} + +void EnlargedOverlay::resizeEvent(QGraphicsSceneResizeEvent *event) +{ + m_background.resizeFrame(event->newSize()); +} + +void EnlargedOverlay::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, + QWidget *widget) +{ + Q_UNUSED(option); + Q_UNUSED(widget); + + m_background.paintFrame(painter); +} + +} \ No newline at end of file diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/ui/enlargedoverlay.h plasma-mobile-0.0~svn20100711/applets/mobilesystray/ui/enlargedoverlay.h --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/ui/enlargedoverlay.h 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/ui/enlargedoverlay.h 2010-07-10 00:56:38.000000000 -0400 @@ -0,0 +1,79 @@ +/* + * Copyright 2008 Lim Yuen Hoe + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef ENLARGEDOVERLAY_H +#define ENLARGEDOVERLAY_H + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "../core/task.h" + +namespace Plasma +{ + class Applet; +} + +class QGraphicsLinearLayout; + +namespace SystemTray +{ + +class EnlargedOverlay : public Plasma::Applet +{ + Q_OBJECT + +public: + EnlargedOverlay(QList tasks, QSize containerSize, Plasma::Applet *par = 0); + ~EnlargedOverlay(); + +public slots: + void addTask(SystemTray::Task* task); + void removeTask(SystemTray::Task* task); + void updateTask(SystemTray::Task* task); + +signals: + void showMenu(QMenu* m); + +protected slots: + void relayMenu(QMenu* m); + void hideOverlay(); + +protected: + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, + QWidget *widget = 0); + void resizeEvent(QGraphicsSceneResizeEvent *event); + +private: + QHash m_widgetList; + QGraphicsLinearLayout *m_layout; + Plasma::Applet* parent; + Plasma::FrameSvg m_background; +}; + +} + +#endif diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/ui/overlaytoolbox.cpp plasma-mobile-0.0~svn20100711/applets/mobilesystray/ui/overlaytoolbox.cpp --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/ui/overlaytoolbox.cpp 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/ui/overlaytoolbox.cpp 2010-07-03 10:36:38.000000000 -0400 @@ -0,0 +1,110 @@ +/* + * Copyright 2008 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "overlaytoolbox.h" + + +#include + +#include +#include + +using namespace Plasma; + +OverlayToolBox::OverlayToolBox(const QString &title, QGraphicsWidget *parent) + : QGraphicsWidget(parent), m_totalActions(0) +{ + setAcceptsHoverEvents(true); + + m_background.setImagePath("widgets/translucentbackground"); + m_background.setEnabledBorders(FrameSvg::AllBorders); + + Plasma::IconWidget *tool = new Plasma::IconWidget(title, this); + + // Add menu title + tool->setAction(0L); + tool->setOrientation(Qt::Horizontal); + tool->resize(tool->sizeFromIconSize(22)); + + tool->setPos(QPoint(30, 10)); + tool->resize(size().width() - 60, tool->size().height() + 50); + tool->setZValue(zValue() + 10); +} + +OverlayToolBox::~OverlayToolBox() +{ +} + +void OverlayToolBox::resizeEvent(QGraphicsSceneResizeEvent *event) +{ + m_background.resizeFrame(event->newSize()); + + foreach(QGraphicsItem *child, QGraphicsItem::children()) { + Plasma::IconWidget *tool = dynamic_cast(child); + tool->resize(size().width() - 60, tool->size().height()); + } + +} + +void OverlayToolBox::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, + QWidget *widget) +{ + Q_UNUSED(option); + Q_UNUSED(widget); + + m_background.paintFrame(painter); +} + +void OverlayToolBox::setMainMenu(QMenu* m) +{ + QList actions = m->actions(); + for (int i=0; iisSeparator() && !action->menu()) { + addTool(action); + } + } +} + +void OverlayToolBox::addTool(QAction *action) +{ + if (!action) { + return; + } + + Plasma::IconWidget *tool = new Plasma::IconWidget(this); + + tool->setAction(action); + tool->setDrawBackground(true); + tool->setOrientation(Qt::Horizontal); + tool->resize(tool->sizeFromIconSize(22)); + + const int height = 70; //static_cast(tool->boundingRect().height()); + tool->setPos(QPoint(30, 10 + (m_totalActions * height))); + tool->resize(size().width() - 60, height);//tool->size().height()); + tool->setZValue(zValue() + 10); + tool->setToolTip(action->text()); + + //make enabled/disabled tools appear/disappear instantly + // connect(tool, SIGNAL(changed()), this, SLOT(updateToolBox())); + //connect(action, SIGNAL(triggered(bool)), this, SLOT(toolTriggered(bool))); + + m_totalActions++; +} + diff -Nru plasma-mobile-0.0~svn20100617/applets/mobilesystray/ui/overlaytoolbox.h plasma-mobile-0.0~svn20100711/applets/mobilesystray/ui/overlaytoolbox.h --- plasma-mobile-0.0~svn20100617/applets/mobilesystray/ui/overlaytoolbox.h 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/mobilesystray/ui/overlaytoolbox.h 2010-07-03 10:36:38.000000000 -0400 @@ -0,0 +1,58 @@ +/* + * Copyright 2008 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef OVERLAYTOOLBOX_H +#define OVERLAYTOOLBOX_H + +#include +#include +#include +#include +#include + +#include +#include + + +class OverlayToolBox : public QGraphicsWidget +{ + Q_OBJECT + +public: + OverlayToolBox(const QString &title, QGraphicsWidget *parent = 0); + ~OverlayToolBox(); + + void addTool(QAction *action); + +public slots: + void setMainMenu(QMenu* m); + +protected: + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, + QWidget *widget = 0); + + void resizeEvent(QGraphicsSceneResizeEvent *event); + +private: + int m_totalActions; + Plasma::FrameSvg m_background; +}; + + +#endif diff -Nru plasma-mobile-0.0~svn20100617/applets/news/package/contents/qml/main.qml plasma-mobile-0.0~svn20100711/applets/news/package/contents/qml/main.qml --- plasma-mobile-0.0~svn20100617/applets/news/package/contents/qml/main.qml 2010-06-16 12:11:45.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/news/package/contents/qml/main.qml 2010-07-07 16:30:20.000000000 -0400 @@ -1,3 +1,22 @@ +/* + * Copyright 2010 Marco Martin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + import Qt 4.7 import Plasma 0.1 as Plasma import GraphicsLayouts 4.7 diff -Nru plasma-mobile-0.0~svn20100617/applets/news/package/metadata.desktop plasma-mobile-0.0~svn20100711/applets/news/package/metadata.desktop --- plasma-mobile-0.0~svn20100617/applets/news/package/metadata.desktop 2010-06-16 02:38:54.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/news/package/metadata.desktop 2010-06-22 04:59:14.000000000 -0400 @@ -10,6 +10,7 @@ Name[x-test]=xxNews reader (QML)xx Comment=A proof of concept RSS reader written in qml Comment[en_GB]=A proof of concept RSS reader written in qml +Comment[km]=ការ​ផ្ទៀង​ផ្ទាត់​បែប​បទ​ចំណុច​ប្រទាក់​កម្មវិធី​ផ្ញើ​សំបុត្រ​ដែល​សរសេរ​ជា​ qml Comment[pt]=Uma prova de conceito de um leitor de RSS feito em QML Comment[pt_BR]=Uma prova de conceito de um leitor RSS escrito em QML Comment[sv]=Ett koncept för en RSS-läsare skrivet i QML diff -Nru plasma-mobile-0.0~svn20100617/applets/news/plasma-applet-news-qml.desktop plasma-mobile-0.0~svn20100711/applets/news/plasma-applet-news-qml.desktop --- plasma-mobile-0.0~svn20100617/applets/news/plasma-applet-news-qml.desktop 2010-06-16 02:38:54.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/news/plasma-applet-news-qml.desktop 2010-06-22 04:59:14.000000000 -0400 @@ -10,6 +10,7 @@ Name[x-test]=xxNews reader (QML)xx Comment=A proof of concept RSS reader written in qml Comment[en_GB]=A proof of concept RSS reader written in qml +Comment[km]=ការ​ផ្ទៀង​ផ្ទាត់​បែប​បទ​ចំណុច​ប្រទាក់​កម្មវិធី​ផ្ញើ​សំបុត្រ​ដែល​សរសេរ​ជា​ qml Comment[pt]=Uma prova de conceito de um leitor de RSS feito em QML Comment[pt_BR]=Uma prova de conceito de um leitor RSS escrito em QML Comment[sv]=Ett koncept för en RSS-läsare skrivet i QML diff -Nru plasma-mobile-0.0~svn20100617/applets/quickdialer/CMakeLists.txt plasma-mobile-0.0~svn20100711/applets/quickdialer/CMakeLists.txt --- plasma-mobile-0.0~svn20100617/applets/quickdialer/CMakeLists.txt 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/quickdialer/CMakeLists.txt 2010-07-07 13:20:02.000000000 -0400 @@ -0,0 +1,6 @@ +project(news) + +install(DIRECTORY package/ DESTINATION ${DATA_INSTALL_DIR}/plasma/plasmoids/quickdialer-qml PATTERN .svn EXCLUDE) + +install(FILES plasma-applet-quickdialer-qml.desktop + DESTINATION ${SERVICES_INSTALL_DIR}) diff -Nru plasma-mobile-0.0~svn20100617/applets/quickdialer/package/contents/qml/main.qml plasma-mobile-0.0~svn20100711/applets/quickdialer/package/contents/qml/main.qml --- plasma-mobile-0.0~svn20100617/applets/quickdialer/package/contents/qml/main.qml 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/quickdialer/package/contents/qml/main.qml 2010-07-09 03:57:43.000000000 -0400 @@ -0,0 +1,90 @@ +/* + * Copyright 2010 Alexis Menard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import Qt 4.7 +import Plasma 0.1 as Plasma +import GraphicsLayouts 4.7 + +QGraphicsWidget { + id: main + Item { Plasma.Phone { id : phone} } + function enterDigit(digit) + { + if (number.text == "Please type a number") + number.text = digit + else + number.text = number.text + digit + } + + function call() + { + if (number.text == "Please type a number") + return + phone.call(number.text); + } + + function deleteLastDigit() + { + number.text = number.text.slice(0, -1) + if (number.text.length == 0) + number.text = "Please type a number" + } + + layout: QGraphicsLinearLayout { + id: box; + spacing : 10 + orientation: Qt.Vertical + QGraphicsGridLayout{ + property int r: 0 + property int c: 0 + id: grid; spacing: 6 + Plasma.PushButton { QGraphicsGridLayout.row: 0; QGraphicsGridLayout.column: 0; QGraphicsGridLayout.columnSpan: 2; text: "7"; onClicked: enterDigit("7");} + Plasma.PushButton { QGraphicsGridLayout.row: 0; QGraphicsGridLayout.column: 2; QGraphicsGridLayout.columnSpan: 2; text: "8"; onClicked: enterDigit("8");} + Plasma.PushButton { QGraphicsGridLayout.row: 0; QGraphicsGridLayout.column: 4; QGraphicsGridLayout.columnSpan: 2; text: "9"; onClicked: enterDigit("9");} + Plasma.PushButton { QGraphicsGridLayout.row: 1; QGraphicsGridLayout.column: 0; QGraphicsGridLayout.columnSpan: 2; text: "4"; onClicked: enterDigit("4");} + Plasma.PushButton { QGraphicsGridLayout.row: 1; QGraphicsGridLayout.column: 2; QGraphicsGridLayout.columnSpan: 2; text: "5"; onClicked: enterDigit("5");} + Plasma.PushButton { QGraphicsGridLayout.row: 1; QGraphicsGridLayout.column: 4; QGraphicsGridLayout.columnSpan: 2; text: "6"; onClicked: enterDigit("6");} + Plasma.PushButton { QGraphicsGridLayout.row: 2; QGraphicsGridLayout.column: 0; QGraphicsGridLayout.columnSpan: 2; text: "1"; onClicked: enterDigit("1");} + Plasma.PushButton { QGraphicsGridLayout.row: 2; QGraphicsGridLayout.column: 2; QGraphicsGridLayout.columnSpan: 2; text: "2"; onClicked: enterDigit("2");} + Plasma.PushButton { QGraphicsGridLayout.row: 2; QGraphicsGridLayout.column: 4; QGraphicsGridLayout.columnSpan: 2; text: "3"; onClicked: enterDigit("3");} + Plasma.PushButton { QGraphicsGridLayout.row: 3; QGraphicsGridLayout.column: 0; QGraphicsGridLayout.columnSpan: 2; text: "*"; onClicked: enterDigit("*");} + Plasma.PushButton { QGraphicsGridLayout.row: 3; QGraphicsGridLayout.column: 2; QGraphicsGridLayout.columnSpan: 2; text: "0"; onClicked: enterDigit("0");} + Plasma.PushButton { QGraphicsGridLayout.row: 3; QGraphicsGridLayout.column: 4; QGraphicsGridLayout.columnSpan: 2; text: "#"; onClicked: enterDigit("#");} + Plasma.PushButton { QGraphicsGridLayout.row: 4; QGraphicsGridLayout.column: 0; QGraphicsGridLayout.columnSpan: 3; text: "Del"; onClicked: deleteLastDigit();} + Plasma.PushButton { QGraphicsGridLayout.row: 4; QGraphicsGridLayout.column: 3; QGraphicsGridLayout.columnSpan: 3; text: "Call"; onClicked: call();} + } + LayoutItem{ + minimumSize: "100x35" + preferredSize: number.width+"x35" + maximumSize: "1000x35" + Rectangle { + id : display + width : main.width; + height : 35 + color : "white" + clip: true + Text { + id : number; + anchors.fill : parent; + text : "Please type a number" + } + } + } + } +} diff -Nru plasma-mobile-0.0~svn20100617/applets/quickdialer/package/metadata.desktop plasma-mobile-0.0~svn20100711/applets/quickdialer/package/metadata.desktop --- plasma-mobile-0.0~svn20100617/applets/quickdialer/package/metadata.desktop 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/quickdialer/package/metadata.desktop 2010-07-10 03:05:21.000000000 -0400 @@ -0,0 +1,23 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Quick Dialer (QML) +Name[pt]=Marcação Rápida (QML) +Name[pt_BR]=Discador rápido (QML) +Name[sv]=Snabbuppringning (QML) +Name[uk]=Швидкий набір (QML) +Name[x-test]=xxQuick Dialer (QML)xx +Type=Service +ServiceTypes=Plasma/Applet +Icon=akregator +X-Plasma-API=qmlscript +X-Plasma-MainScript=qml/main.qml +X-KDE-PluginInfo-Author=Alexis Menard +X-KDE-PluginInfo-Email=menard@kde.org +X-KDE-PluginInfo-Name=quickdialer-qml +X-KDE-PluginInfo-Version=1.0 +X-KDE-PluginInfo-Website=http://plasma.kde.org/ +X-KDE-PluginInfo-Category=Phone +X-KDE-PluginInfo-Depends= +X-KDE-PluginInfo-License=GPL +X-KDE-PluginInfo-EnabledByDefault=true +X-Plasma-DefaultSize=400,420 diff -Nru plasma-mobile-0.0~svn20100617/applets/quickdialer/plasma-applet-quickdialer-qml.desktop plasma-mobile-0.0~svn20100711/applets/quickdialer/plasma-applet-quickdialer-qml.desktop --- plasma-mobile-0.0~svn20100617/applets/quickdialer/plasma-applet-quickdialer-qml.desktop 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/applets/quickdialer/plasma-applet-quickdialer-qml.desktop 2010-07-10 03:05:21.000000000 -0400 @@ -0,0 +1,28 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=A Quick Dialer (QML) +Name[pt]=Um marcador rápido (QML) +Name[pt_BR]=Um discador rápido (QML) +Name[sv]=En snabbuppringare (QML) +Name[uk]=Швидкий набір (QML) +Name[x-test]=xxA Quick Dialer (QML)xx +Comment=A quick dialer to call a number +Comment[pt]=Um marcador rápido para digitar um número +Comment[pt_BR]=Um discador rápido para discar um número +Comment[sv]=En snabbuppringare för att ringa ett nummer +Comment[uk]=Програма для пришвидшення набирання телефонного номеру +Comment[x-test]=xxA quick dialer to call a numberxx +Type=Service +ServiceTypes=Plasma/Applet +Icon= +X-Plasma-API=qmlscript +X-Plasma-MainScript=qml/main.qml +X-KDE-PluginInfo-Author=Alexis Menard +X-KDE-PluginInfo-Email=menard@kde.org +X-KDE-PluginInfo-Name=quickdialer-qml +X-KDE-PluginInfo-Version=1.0 +X-KDE-PluginInfo-Website=http://plasma.kde.org/ +X-KDE-PluginInfo-Category=Phone +X-KDE-PluginInfo-Depends= +X-KDE-PluginInfo-License=GPL +X-KDE-PluginInfo-EnabledByDefault=true diff -Nru plasma-mobile-0.0~svn20100617/bindings/CMakeLists.txt plasma-mobile-0.0~svn20100711/bindings/CMakeLists.txt --- plasma-mobile-0.0~svn20100617/bindings/CMakeLists.txt 2010-06-05 11:11:05.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/bindings/CMakeLists.txt 2010-07-07 13:20:02.000000000 -0400 @@ -4,6 +4,7 @@ set(bindings_SRCS plasmabindings.cpp + phone/phone.cpp private/declarativetabbar.cpp private/gridlayout.cpp private/linearlayout.cpp diff -Nru plasma-mobile-0.0~svn20100617/bindings/phone/phone.cpp plasma-mobile-0.0~svn20100711/bindings/phone/phone.cpp --- plasma-mobile-0.0~svn20100617/bindings/phone/phone.cpp 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/bindings/phone/phone.cpp 2010-07-07 16:30:20.000000000 -0400 @@ -0,0 +1,78 @@ +/* + * Copyright 2010 Alexis Menard + * Copyright 2010 Artur Duque de Souza + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +#include "phone.h" + +Phone::Phone(QObject *parent) + : QObject(parent) +{ + QDBusConnection connSystemBus = QDBusConnection::systemBus(); + m_dbusPhone = new QDBusInterface("com.nokia.csd.Call", "/com/nokia/csd/call", + "com.nokia.csd.Call", connSystemBus, this); + + m_dbusPhoneInstance = new QDBusInterface("com.nokia.csd.Call", "/com/nokia/csd/call/1", + "com.nokia.csd.Call.Instance", connSystemBus, this); + + connect(m_dbusPhoneInstance, SIGNAL(CallStatus(int)), + this, SLOT(callStatus(int))); +} + +Phone::~Phone() +{ + delete m_dbusPhone; +} + +void Phone::call(const QString &number) { + kDebug()<<"CALLING NUMBER"< args; + args << number; + args << 0; + m_dbusPhone->callWithCallback("CreateWith", args, this, + SLOT(callReturned()), + SLOT(callError(QDBusError&))); +} + +void Phone::hangup() +{ + QList args; + m_dbusPhone->callWithCallback("Release", args, this, + SLOT(callReturned())); +} + +void Phone::callReturned() +{ +} + +void Phone::callError(QDBusError &error) +{ +} + +void Phone::callStatus(int value) +{ + // >= 2 (=CSD_CALL_STATUS_COMING) + if (value >= 2) { + qWarning() << "----> RECEIVING CALL!!!"; + // answer code? + } +} + +#include "phone.moc" diff -Nru plasma-mobile-0.0~svn20100617/bindings/phone/phone.h plasma-mobile-0.0~svn20100711/bindings/phone/phone.h --- plasma-mobile-0.0~svn20100617/bindings/phone/phone.h 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/bindings/phone/phone.h 2010-07-07 16:30:20.000000000 -0400 @@ -0,0 +1,54 @@ +/* + * Copyright 2010 Alexis Menard + * Copyright 2010 Artur Duque de Souza + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef PLASMA_PHONE +#define PLASMA_PHONE + +#include +#include +#include + +class Phone : public QObject +{ + Q_OBJECT + +public: + Phone(QObject *parent = 0); + ~Phone(); + +public slots: + void call(const QString &number); + void hangup(); + +signals: + void calling(); + void receiving(); + +protected slots: + void callReturned(); + void callError(QDBusError &error); + void callStatus(int value); + +private: + QDBusInterface *m_dbusPhone; + QDBusInterface *m_dbusPhoneInstance; +}; + +#endif diff -Nru plasma-mobile-0.0~svn20100617/bindings/plasmabindings.cpp plasma-mobile-0.0~svn20100711/bindings/plasmabindings.cpp --- plasma-mobile-0.0~svn20100617/bindings/plasmabindings.cpp 2010-06-05 11:11:05.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/bindings/plasmabindings.cpp 2010-07-07 13:20:02.000000000 -0400 @@ -32,6 +32,7 @@ qmlRegisterType("Plasma", 0, 1, "SpinBox"); qmlRegisterType("Plasma", 0, 1, "WebView"); qmlRegisterType("Plasma", 0, 1, "TabBar"); +qmlRegisterType("Plasma", 0, 1, "Phone"); qmlRegisterType("Plasma", 0, 1, "SvgWidget"); qmlRegisterType("Plasma", 0, 1, "Svg"); @@ -45,4 +46,4 @@ qmlRegisterType("Plasma", 0, 1, "DataSource"); -} \ No newline at end of file +} diff -Nru plasma-mobile-0.0~svn20100617/bindings/plasmabindings.h plasma-mobile-0.0~svn20100711/bindings/plasmabindings.h --- plasma-mobile-0.0~svn20100617/bindings/plasmabindings.h 2010-06-05 11:11:05.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/bindings/plasmabindings.h 2010-07-07 13:20:02.000000000 -0400 @@ -41,6 +41,7 @@ #include "private/gridlayout.h" #include "private/linearlayout.h" #include "datasource.h" +#include "phone/phone.h" void PLASMA_EXPORT setupBindings(); @@ -57,6 +58,7 @@ QML_DECLARE_TYPE(Plasma::FrameSvg) QML_DECLARE_TYPE(Plasma::WebView) //QML_DECLARE_TYPE(DeclarativeTabBar) +QML_DECLARE_TYPE(Phone) QML_DECLARE_TYPE(Plasma::ExtenderItem) QML_DECLARE_TYPE(Plasma::Extender) diff -Nru plasma-mobile-0.0~svn20100617/containments/mobiledesktop/mobiledesktop.cpp plasma-mobile-0.0~svn20100711/containments/mobiledesktop/mobiledesktop.cpp --- plasma-mobile-0.0~svn20100617/containments/mobiledesktop/mobiledesktop.cpp 2010-03-19 10:11:29.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/containments/mobiledesktop/mobiledesktop.cpp 2010-06-23 09:21:36.000000000 -0400 @@ -57,7 +57,7 @@ setAcceptsHoverEvents(false); setFlag(QGraphicsItem::ItemSendsGeometryChanges, false); setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, false); - execute(KStandardDirs::locate("data", "plasma-mobile/containments/mobile-desktop/Main.qml")); + //execute(KStandardDirs::locate("data", "plasma-mobile/containments/mobile-desktop/Main.qml")); } void MobileDesktop::errorPrint() diff -Nru plasma-mobile-0.0~svn20100617/debian/changelog plasma-mobile-0.0~svn20100711/debian/changelog --- plasma-mobile-0.0~svn20100617/debian/changelog 2010-07-11 15:10:21.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/debian/changelog 2010-07-11 15:10:21.000000000 -0400 @@ -1,10 +1,10 @@ -plasma-mobile (0.0~svn20100617-0ubuntu2) maverick; urgency=low +plasma-mobile (0.0~svn20100711-0ubuntu1) maverick; urgency=low - * Remove Install_libplasma_bindings_to_plugins_dir.diff which - incorrectly made libplasma_bindings.so try to be a plugin, add - kubuntu_01_library_version.diff which gives it a version number + * New svn snapshot. (LP: #604364 ) + * Enabled the build of mobilesystray. + * Added the mobilesystray applet to the desktop. - -- Jonathan Riddell Wed, 23 Jun 2010 12:46:03 +0100 + -- Rodrigo Belem Sun, 11 Jul 2010 14:56:16 -0400 plasma-mobile (0.0~svn20100617-0ubuntu1) maverick; urgency=low diff -Nru plasma-mobile-0.0~svn20100617/debian/control plasma-mobile-0.0~svn20100711/debian/control --- plasma-mobile-0.0~svn20100617/debian/control 2010-07-11 15:10:21.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/debian/control 2010-07-11 15:10:21.000000000 -0400 @@ -1,7 +1,7 @@ Source: plasma-mobile Section: kde Priority: extra -Maintainer: Kubuntu Developers +Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Rodrigo Belem Build-Depends: debhelper (>= 7.3.16~), quilt (>= 0.46-7~), cmake (>= 2.8.1), pkg-kde-tools (>= 0.5.0~), kdelibs5-dev (>= 4.4.80), diff -Nru plasma-mobile-0.0~svn20100617/debian/copyright plasma-mobile-0.0~svn20100711/debian/copyright --- plasma-mobile-0.0~svn20100617/debian/copyright 2010-07-11 15:10:21.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/debian/copyright 2010-07-11 15:10:21.000000000 -0400 @@ -12,8 +12,9 @@ 2010, Nokia Corporation and/or its subsidiary(-ies) 2010, Artur Duque de Souza -Files: applets/appswitcher/appswitcher.cpp, applets/appswitcher/appswitcher.h, bindings/datasource.cpp, bindings/plasmabindings.h, bindings/plasmabindings.cpp, bindings/datasource.h, bindings/private/dataengineconsumer.cpp, common/qmlwidget.h, common/qmlwidget.cpp, bindings/private/dataengineconsumer_p.h, containments/mobilelauncher/models/krunnermodel.h, containments/mobilelauncher/models/krunnermodel.cpp, containments/mobilelauncher/models/standarditemfactory.cpp, containments/mobilelauncher/models/commonmodel.h, containments/mobilelauncher/models/standarditemfactory.h, containments/mobilelauncher/resultwidget.cpp, qmlengine/qmlpackage.h, qmlengine/qmlpackage.cpp, qmlengine/qmlappletscript.h, qmlengine/qmlappletscript.cpp, shell/mobdialogmanager.cpp, shell/mobdialogmanager.h +Files: applets/appswitcher/appswitcher.cpp, applets/appswitcher/appswitcher.h, applets/digital-clock/package/contents/qml/main.qml, applets/fakemail/package/contents/qml/components/Composer.qml, applets/fakemail/package/contents/qml/components/MessageDetails.qml, applets/fakemail/package/contents/qml/components/MessageList.qml, applets/fakemail/package/contents/qml/components/MessagesModel.qml, bindings/datasource.cpp, bindings/plasmabindings.h, bindings/plasmabindings.cpp, bindings/datasource.h, bindings/phone/phone.cpp, bindings/phone/phone.h, bindings/private/dataengineconsumer.cpp, common/qmlwidget.h, common/qmlwidget.cpp, bindings/private/dataengineconsumer_p.h, containments/mobilelauncher/models/krunnermodel.h, containments/mobilelauncher/models/krunnermodel.cpp, containments/mobilelauncher/models/standarditemfactory.cpp, containments/mobilelauncher/models/commonmodel.h, containments/mobilelauncher/models/standarditemfactory.h, containments/mobilelauncher/resultwidget.cpp, examples/qmlwidgets/package/contents/qml/main.qml, qmlengine/qmlpackage.h, qmlengine/qmlpackage.cpp, qmlengine/qmlappletscript.h, qmlengine/qmlappletscript.cpp, shell/mobdialogmanager.cpp, shell/mobdialogmanager.h Copyright: 2008-2010, Alexis Menard + 2010, Artur Duque de Souza 2009, Alan Alpert 2005, Aaron Seigo 2007, Riccardo Iaconelli @@ -92,11 +93,14 @@ If you have questions regarding the use of this file, please contact Nokia at qt-info@nokia.com. -Files: containments/homescreen/UnlockScreen.qml, containments/homescreen/HomeScreen.qml, containments/homescreen/ActivityPanel.qml, containments/homescreen/ActivityPanelItems.qml, containments/mobiledesktop/qml/Main.qml, containments/mobiledesktop/mobiledesktop.cpp, containments/mobiledesktop/mobiledesktop.h, containments/mobilelauncher/mobilelauncher.h, containments/mobilelauncher/mobilelauncher.cpp, shell/plasmaapp.h, shell/mobview.h, shell/mobcorona.cpp, shell/mobview.cpp, shell/mobcorona.h, shell/main.cpp, shell/plasmaapp.cpp +Files: applets/mobilesystray/core/manager.cpp, applets/mobilesystray/core/manager.h, applets/mobilesystray/core/protocol.cpp, applets/mobilesystray/core/protocol.h, applets/mobilesystray/core/task.cpp, applets/mobilesystray/core/task.h, applets/mobilesystray/protocols/dbussystemtray/dbussystemtrayprotocol.cpp, applets/mobilesystray/protocols/dbussystemtray/dbussystemtrayprotocol.h, applets/mobilesystray/protocols/dbussystemtray/dbussystemtraytask.cpp, applets/mobilesystray/protocols/dbussystemtray/dbussystemtraytask.h, applets/mobilesystray/protocols/dbussystemtray/dbussystemtraywidget.cpp, applets/mobilesystray/protocols/dbussystemtray/dbussystemtraywidget.h, applets/mobilesystray/protocols/plasmoid/plasmoidtask.cpp, applets/mobilesystray/protocols/plasmoid/plasmoidtask.h, applets/mobilesystray/protocols/plasmoid/plasmoidtaskprotocol.cpp, applets/mobilesystray/protocols/plasmoid/plasmoidtaskprotocol.h, applets/mobilesystray/ui/applet.cpp, applets/mobilesystray/ui/applet.h, applets/mobilesystray/ui/enlargedoverlay.cpp, applets/mobilesystray/ui/enlargedoverlay.h, applets/mobilesystray/ui/overlaytoolbox.cpp, applets/mobilesystray/ui/overlaytoolbox.h, applets/news/package/contents/qml/main.qml, applets/quickdialer/package/contents/qml/main.qml, containments/homescreen/UnlockScreen.qml, containments/homescreen/HomeScreen.qml, containments/homescreen/ActivityPanel.qml, containments/homescreen/ActivityPanelItems.qml, containments/mobiledesktop/qml/Main.qml, containments/mobiledesktop/mobiledesktop.cpp, containments/mobiledesktop/mobiledesktop.h, containments/mobilelauncher/mobilelauncher.h, containments/mobilelauncher/mobilelauncher.cpp, shell/plasmaapp.h, shell/mobview.h, shell/mobcorona.cpp, shell/mobview.cpp, shell/mobcorona.h, shell/main.cpp, shell/plasmaapp.cpp Copyright: 2010, Alexis Menard 2010, Artur Duque de Souza - 2009-2010, Marco Martin - 2006-2008, Aaron Seigo + 2008-2010, Marco Martin + 2006-2009, Aaron Seigo + 2008-2010, Lim Yuen Hoe + 2008, Jason Stubbs + 2008, Sebastian Kügler License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff -Nru plasma-mobile-0.0~svn20100617/debian/patches/Add_mobilesystray_to_desktop.diff plasma-mobile-0.0~svn20100711/debian/patches/Add_mobilesystray_to_desktop.diff --- plasma-mobile-0.0~svn20100617/debian/patches/Add_mobilesystray_to_desktop.diff 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/debian/patches/Add_mobilesystray_to_desktop.diff 2010-07-11 15:10:21.000000000 -0400 @@ -0,0 +1,15 @@ +--- a/shell/plasma-default-layoutrc ++++ b/shell/plasma-default-layoutrc +@@ -43,6 +43,12 @@ + immutability=1 + zvalue=1 + ++[Containments][3][Applets][2] ++geometry=500.0,-4.49997,310.5,310.5 ++plugin=mobilesystemtray ++immutability=1 ++zvalue=1 ++ + [Containments][4] + activity=client + desktop=-1 diff -Nru plasma-mobile-0.0~svn20100617/debian/patches/Enable_mobilesystray_applet.diff plasma-mobile-0.0~svn20100711/debian/patches/Enable_mobilesystray_applet.diff --- plasma-mobile-0.0~svn20100617/debian/patches/Enable_mobilesystray_applet.diff 1969-12-31 20:00:00.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/debian/patches/Enable_mobilesystray_applet.diff 2010-07-11 15:10:21.000000000 -0400 @@ -0,0 +1,7 @@ +--- a/applets/CMakeLists.txt ++++ b/applets/CMakeLists.txt +@@ -3,3 +3,4 @@ + add_subdirectory(fakemail) + add_subdirectory(quickdialer) + add_subdirectory(news) ++add_subdirectory(mobilesystray) diff -Nru plasma-mobile-0.0~svn20100617/debian/patches/kubuntu_01_library_version.diff plasma-mobile-0.0~svn20100711/debian/patches/kubuntu_01_library_version.diff --- plasma-mobile-0.0~svn20100617/debian/patches/kubuntu_01_library_version.diff 2010-07-11 15:10:21.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/debian/patches/kubuntu_01_library_version.diff 1969-12-31 20:00:00.000000000 -0400 @@ -1,11 +0,0 @@ -Index: plasma-mobile-0.0~svn20100617/bindings/CMakeLists.txt -=================================================================== ---- plasma-mobile-0.0~svn20100617.orig/bindings/CMakeLists.txt 2010-06-23 12:42:54.439678591 +0100 -+++ plasma-mobile-0.0~svn20100617/bindings/CMakeLists.txt 2010-06-23 12:42:56.691694444 +0100 -@@ -21,5 +21,6 @@ - - add_library(plasma_bindings SHARED ${bindings_SRCS}) - target_link_libraries(plasma_bindings ${KDE4_PLASMA_LIBS} ${QT_QTSCRIPT_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY}) -+set_target_properties(plasma_bindings PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} ) - - install(TARGETS plasma_bindings DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS}) diff -Nru plasma-mobile-0.0~svn20100617/debian/patches/series plasma-mobile-0.0~svn20100711/debian/patches/series --- plasma-mobile-0.0~svn20100617/debian/patches/series 2010-07-11 15:10:21.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/debian/patches/series 2010-07-11 15:10:21.000000000 -0400 @@ -1,2 +1,3 @@ Adding_project_name_to_cmakelists.diff -kubuntu_01_library_version.diff +Enable_mobilesystray_applet.diff +Add_mobilesystray_to_desktop.diff diff -Nru plasma-mobile-0.0~svn20100617/desktoptheme/air-mobile/metadata.desktop plasma-mobile-0.0~svn20100711/desktoptheme/air-mobile/metadata.desktop --- plasma-mobile-0.0~svn20100617/desktoptheme/air-mobile/metadata.desktop 2010-06-16 02:38:54.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/desktoptheme/air-mobile/metadata.desktop 2010-06-22 04:59:14.000000000 -0400 @@ -20,6 +20,7 @@ Comment[ga]=Béalán den aer cumhra Comment[gl]=Un pouco de ar fresco Comment[hr]=Dašak svježeg zraka +Comment[km]=ការ​ដកដង្ហើមយក​​ខ្យល់​បរិសុទ្ធ Comment[nds]=En beten Frischluft Comment[nl]=Een hap frisse lucht Comment[pt]=Uma brisa de ar fresco diff -Nru plasma-mobile-0.0~svn20100617/examples/qmlwidgets/package/contents/qml/main.qml plasma-mobile-0.0~svn20100711/examples/qmlwidgets/package/contents/qml/main.qml --- plasma-mobile-0.0~svn20100617/examples/qmlwidgets/package/contents/qml/main.qml 2010-02-24 08:21:29.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/examples/qmlwidgets/package/contents/qml/main.qml 2010-07-07 16:30:20.000000000 -0400 @@ -1,3 +1,22 @@ +/* + * Copyright 2010 Alexis Menard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + import Qt 4.6 import Plasma 0.1 as Plasma Plasma.PushButton { diff -Nru plasma-mobile-0.0~svn20100617/examples/qmlwidgets/package/metadata.desktop plasma-mobile-0.0~svn20100711/examples/qmlwidgets/package/metadata.desktop --- plasma-mobile-0.0~svn20100617/examples/qmlwidgets/package/metadata.desktop 2010-02-08 13:06:25.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/examples/qmlwidgets/package/metadata.desktop 2010-06-22 04:59:14.000000000 -0400 @@ -5,6 +5,7 @@ Name[es]=Elemento gráfico de ejemplo (QML) Name[et]=Vidina näidis (QML) Name[fr]=Exemple de gagdet graphique (QML) +Name[km]=គំរូ​ធាតុក្រាហ្វិក (QML) Name[pa]=ਵਿਦਜੈੱਟ ਉਦਾਹਰਨ (QML) Name[pt]=Exemplo de Elemento (QML) Name[pt_BR]=Exemplo de elemento (QML) diff -Nru plasma-mobile-0.0~svn20100617/examples/qmlwidgets/plasma-applet-qmlwidgets.desktop plasma-mobile-0.0~svn20100711/examples/qmlwidgets/plasma-applet-qmlwidgets.desktop --- plasma-mobile-0.0~svn20100617/examples/qmlwidgets/plasma-applet-qmlwidgets.desktop 2010-02-07 19:01:22.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/examples/qmlwidgets/plasma-applet-qmlwidgets.desktop 2010-06-22 04:59:14.000000000 -0400 @@ -5,6 +5,7 @@ Name[es]=Elemento gráfico de ejemplo (QML) Name[et]=Vidina näidis (QML) Name[fr]=Exemple de gagdet graphique (QML) +Name[km]=គំរូ​ធាតុក្រាហ្វិក (QML) Name[pa]=ਵਿਦਜੈੱਟ ਉਦਾਹਰਨ (QML) Name[pt]=Exemplo de Elemento (QML) Name[pt_BR]=Exemplo de elemento (QML) @@ -16,6 +17,7 @@ Comment[es]=Una prueba del motor de script de kineticqml Comment[et]=kineticqml skriptimootori test Comment[fr]=Le test de moteur de script kineticqml +Comment[km]=ការ​សាកល្បង kineticqml scriptengine Comment[pt]=Um teste do motor de programação 'kineticqml' Comment[pt_BR]=Um teste do motor de programação 'kineticqml' Comment[sv]=Test av skriptgränssnittet kinetisk QML diff -Nru plasma-mobile-0.0~svn20100617/qmlengine/plasma-appletscript-qml.desktop plasma-mobile-0.0~svn20100711/qmlengine/plasma-appletscript-qml.desktop --- plasma-mobile-0.0~svn20100617/qmlengine/plasma-appletscript-qml.desktop 2010-06-16 02:38:54.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/qmlengine/plasma-appletscript-qml.desktop 2010-07-11 03:03:32.000000000 -0400 @@ -3,6 +3,7 @@ Name[en_GB]=QML Name[et]=QML Name[km]=QML +Name[nds]=QML Name[pt]=QML Name[pt_BR]=QML Name[sv]=QML diff -Nru plasma-mobile-0.0~svn20100617/shell/plasmaapp.cpp plasma-mobile-0.0~svn20100711/shell/plasmaapp.cpp --- plasma-mobile-0.0~svn20100617/shell/plasmaapp.cpp 2010-04-19 14:06:27.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/shell/plasmaapp.cpp 2010-06-23 11:35:44.000000000 -0400 @@ -343,8 +343,6 @@ containment->resize(m_mainView->size()); //FIXME: this makes the containment to not paint until the animation finishes containment->graphicsEffect()->setEnabled(true); - m_currentContainment->graphicsEffect()->update(); - m_currentContainment->graphicsEffect()->setEnabled(true); //###The reparenting need a repaint so this ensure that we //have actually re-render the containment otherwise it //makes animations slugglish. We need a better solution. @@ -379,18 +377,6 @@ containment->setGraphicsEffect(effect); containment->graphicsEffect()->setEnabled(false); - //We load the wallpaper now so when animating the containments around the first time it will not be slow - Plasma::Wallpaper *w = containment->wallpaper(); - if (!w->isInitialized()) { - // delayed paper initialization - KConfigGroup wallpaperConfig = containment->config(); - wallpaperConfig = KConfigGroup(&wallpaperConfig, "Wallpaper"); - wallpaperConfig = KConfigGroup(&wallpaperConfig, w->pluginName()); - w->restore(wallpaperConfig); - disconnect(w, SIGNAL(update(const QRectF&)), containment, SLOT(updateRect(const QRectF&))); - connect(w, SIGNAL(update(const QRectF&)), containment, SLOT(updateRect(const QRectF&))); - } - m_mainSlot->setFlag(QGraphicsItem::ItemHasNoContents, false); containment->resize(m_mainView->size()); diff -Nru plasma-mobile-0.0~svn20100617/shell/plasma-default-layoutrc plasma-mobile-0.0~svn20100711/shell/plasma-default-layoutrc --- plasma-mobile-0.0~svn20100617/shell/plasma-default-layoutrc 2010-03-19 10:11:29.000000000 -0400 +++ plasma-mobile-0.0~svn20100711/shell/plasma-default-layoutrc 2010-07-07 13:20:02.000000000 -0400 @@ -5,7 +5,7 @@ geometry=0,0,800,480 immutability=1 location=0 -plugin=desktop +plugin=mobiledesktop screen=0 zvalue=0 wallpaperplugin=image @@ -31,7 +31,7 @@ geometry=0,0,800,480 immutability=1 location=0 -plugin=desktop +plugin=mobiledesktop screen=0 zvalue=0 wallpaperplugin=image @@ -39,7 +39,7 @@ [Containments][3][Applets][1] geometry=-0.999985,-4.49997,310.5,310.5 -plugin=clock +plugin=news immutability=1 zvalue=1 @@ -50,15 +50,15 @@ geometry=0,0,800,480 immutability=1 location=0 -plugin=desktop +plugin=mobiledesktop screen=0 zvalue=0 wallpaperplugin=image wallpaperpluginmode=SingleImage [Containments][4][Applets][1] -geometry=8,1,342,342 -plugin=fifteenPuzzle +plugin=digital-clock +geometry=28,66.8,266.4,133.2 immutability=1 zvalue=1 @@ -69,15 +69,15 @@ geometry=0,0,800,480 immutability=1 location=0 -plugin=desktop +plugin=mobiledesktop screen=0 zvalue=0 wallpaperplugin=image wallpaperpluginmode=SingleImage [Containments][5][Applets][1] -geometry=90,49,256,256 -plugin=plasma_applet_notes +geometry=200,0,400,420 +plugin=quickdialer-qml immutability=1 zvalue=1 @@ -88,15 +88,15 @@ geometry=0,0,800,480 immutability=1 location=0 -plugin=desktop +plugin=mobiledesktop screen=0 zvalue=0 wallpaperplugin=image wallpaperpluginmode=SingleImage [Containments][6][Applets][1] -geometry=220,69,182,182 -plugin=battery +geometry=10,10,500,400 +plugin=twitter immutability=1 zvalue=1 @@ -107,14 +107,14 @@ geometry=0,0,800,480 immutability=1 location=0 -plugin=desktop +plugin=mobiledesktop screen=0 zvalue=0 wallpaperplugin=image wallpaperpluginmode=SingleImage [Containments][7][Applets][1] -plugin=digital-clock -geometry=28,66.8,266.4,133.2 +geometry=8,1,342,342 +plugin=fifteenPuzzle immutability=1 zvalue=1