Permalink
Browse files

Changes: Separating the lock screen to an application extension, part 1

RevBy: TrustMe
  • Loading branch information...
1 parent 10398a3 commit 78812a62dc9f78f5c09c3f873296e5c3d8c0b3f9 Vesa Halttunen committed Dec 1, 2010
Showing with 2,138 additions and 1,489 deletions.
  1. +0 −9 .gitignore
  2. +14 −1 debian/.gitignore
  3. +5 −0 debian/control
  4. +4 −0 debian/system-ui-screenlock.install
  5. +0 −2 demos/plugins/call/call.pro
  6. +3 −1 demos/plugins/call/callplugin.cpp
  7. +0 −8 demos/plugins/check.pri
  8. +0 −2 demos/plugins/profile/profile.pro
  9. +3 −1 demos/plugins/profile/profileplugin.cpp
  10. +2 −0 src/extensions/extensions.pro
  11. +1 −1 src/{systemui/lockscreen → extensions/screenlock}/date.cpp
  12. +3 −0 src/{systemui/lockscreen → extensions/screenlock}/date.h
  13. 0 src/{systemui/lockscreen → extensions/screenlock}/datestyle.h
  14. +2 −4 src/{systemui/lockscreen → extensions/screenlock}/lockscreen.cpp
  15. +2 −2 src/{systemui/lockscreen → extensions/screenlock}/lockscreen.h
  16. 0 src/{systemui/lockscreen → extensions/screenlock}/lockscreenheaderstyle.h
  17. 0 src/{systemui/lockscreen → extensions/screenlock}/lockscreenheaderview.cpp
  18. 0 src/{systemui/lockscreen → extensions/screenlock}/lockscreenheaderview.h
  19. 0 src/{systemui/lockscreen → extensions/screenlock}/lockscreenheaderwithpadlockstyle.h
  20. 0 src/{systemui/lockscreen → extensions/screenlock}/lockscreenheaderwithpadlockview.cpp
  21. 0 src/{systemui/lockscreen → extensions/screenlock}/lockscreenheaderwithpadlockview.h
  22. 0 src/{systemui/lockscreen → extensions/screenlock}/lockscreenstatusareastyle.h
  23. +2 −1 src/{systemui/lockscreen → extensions/screenlock}/lockscreenstatusareaview.cpp
  24. 0 src/{systemui/lockscreen → extensions/screenlock}/lockscreenstatusareaview.h
  25. +36 −0 src/extensions/screenlock/lockscreenstyle.h
  26. +4 −4 src/{systemui/lockscreen → extensions/screenlock}/lockscreenview.cpp
  27. +8 −7 src/{systemui/lockscreen → extensions/screenlock}/lockscreenview.h
  28. +3 −1 src/{systemui/lockscreen → extensions/screenlock}/lockscreenwithoutpadlockview.cpp
  29. +3 −4 src/{systemui/lockscreen → extensions/screenlock}/lockscreenwithoutpadlockview.h
  30. +2 −3 src/{systemui/lockscreen → extensions/screenlock}/lockscreenwithpadlockview.cpp
  31. +3 −4 src/{systemui/lockscreen → extensions/screenlock}/lockscreenwithpadlockview.h
  32. +50 −0 src/extensions/screenlock/screenlock.pri
  33. +110 −0 src/extensions/screenlock/screenlock.pro
  34. +56 −0 src/extensions/screenlock/screenlockextension.cpp
  35. +48 −0 src/extensions/screenlock/screenlockextension.h
  36. +7 −0 src/extensions/screenlock/sysuid-screenlock.desktop
  37. +57 −0 src/extensions/screenlock/themes/libsysuid-screenlock.conf
  38. +262 −0 src/extensions/screenlock/themes/style/libsysuid-screenlock.css
  39. +13 −0 src/extensions/screenlock/themes/style/style.pro
  40. +23 −0 src/extensions/screenlock/themes/themes.pro
  41. 0 src/{systemui/lockscreen → extensions/screenlock}/unlockarea.cpp
  42. 0 src/{systemui/lockscreen → extensions/screenlock}/unlockarea.h
  43. 0 src/{systemui/lockscreen → extensions/screenlock}/unlockmissedevents.cpp
  44. 0 src/{systemui/lockscreen → extensions/screenlock}/unlockmissedevents.h
  45. 0 src/{systemui/lockscreen → extensions/screenlock}/unlocknotifications.cpp
  46. 0 src/{systemui/lockscreen → extensions/screenlock}/unlocknotifications.h
  47. 0 src/{systemui/lockscreen → extensions/screenlock}/unlocknotificationsink.cpp
  48. 0 src/{systemui/lockscreen → extensions/screenlock}/unlocknotificationsink.h
  49. +0 −52 src/libnotificationsystem/notifications.pro
  50. +2 −1 src/src.pro
  51. +0 −50 src/systemui/lockscreen/lockscreen.pri
  52. +0 −95 src/systemui/lockscreen/lockscreenwindow.cpp
  53. +2 −0 src/systemui/main.cpp
  54. +0 −2 src/systemui/notifications/notifications.pri
  55. 0 src/systemui/{lockscreen → screenlock}/eventeater.cpp
  56. 0 src/systemui/{lockscreen → screenlock}/eventeater.h
  57. +17 −0 src/systemui/screenlock/screenlock.pri
  58. +27 −27 src/systemui/{lockscreen/lockscreenbusinesslogic.cpp → screenlock/screenlockbusinesslogic.cpp}
  59. +7 −7 src/systemui/{lockscreen/lockscreenbusinesslogic.h → screenlock/screenlockbusinesslogic.h}
  60. +12 −15 ...i/{lockscreen/lockscreenbusinesslogicadaptor.cpp → screenlock/screenlockbusinesslogicadaptor.cpp}
  61. +9 −13 ...temui/{lockscreen/lockscreenbusinesslogicadaptor.h → screenlock/screenlockbusinesslogicadaptor.h}
  62. +50 −0 src/systemui/screenlock/screenlockextensioninterface.h
  63. +132 −0 src/systemui/screenlock/screenlockwindow.cpp
  64. +34 −8 src/systemui/{lockscreen/lockscreenwindow.h → screenlock/screenlockwindow.h}
  65. +6 −6 src/systemui/{lockscreen/lockscreenwindowstyle.h → screenlock/screenlockwindowstyle.h}
  66. 0 src/systemui/{notifications → statusarea}/notificationstatusindicator.cpp
  67. 0 src/systemui/{notifications → statusarea}/notificationstatusindicator.h
  68. +2 −0 src/systemui/statusarea/statusarea.pri
  69. +2 −0 src/systemui/statusarea/statusareaview.cpp
  70. +2 −1 src/systemui/statusarea/statusareaview.h
  71. +0 −2 src/systemui/statusarea/statusindicator.cpp
  72. +12 −10 src/systemui/statusindicatormenu/notificationarea.cpp
  73. +8 −1 src/systemui/statusindicatormenu/notificationarea.h
  74. +2 −0 src/systemui/statusindicatormenu/statusindicatormenudropdownview.cpp
  75. +1 −1 src/systemui/systemui.pro
  76. +3 −19 src/systemui/sysuid.cpp
  77. +7 −7 src/systemui/sysuidrequest.cpp
  78. +4 −4 src/systemui/sysuidrequest.h
  79. +17 −17 tests/ft_lockscreenbusinesslogic/ft_lockscreenbusinesslogic.cpp
  80. +2 −2 tests/ft_lockscreenbusinesslogic/ft_lockscreenbusinesslogic.h
  81. +17 −17 tests/ft_lockscreenbusinesslogic/ft_lockscreenbusinesslogic.pro
  82. +2 −2 tests/ft_lockscreenui/ft_lockscreenui.cpp
  83. +2 −2 tests/ft_lockscreenui/ft_lockscreenui.h
  84. +17 −17 tests/ft_lockscreenui/ft_lockscreenui.pro
  85. +0 −93 tests/stubs/lockscreenbusinesslogic_stub.cpp
  86. +0 −34 tests/stubs/lockscreenbusinesslogic_stub.h
  87. +31 −21 tests/stubs/lockscreenwindow_stub.h
  88. +17 −4 tests/stubs/notificationarea_stub.h
  89. +114 −0 tests/stubs/screenlockbusinesslogic_stub.h
  90. +6 −6 tests/stubs/sysuidrequest_stub.h
  91. +5 −5 tests/ut_date/ut_date.pro
  92. +3 −3 tests/ut_eventeater/ut_eventeater.pro
  93. +3 −3 tests/ut_lockscreen/ut_lockscreen.pro
  94. +16 −17 tests/ut_lockscreenbusinesslogic/ut_lockscreenbusinesslogic.cpp
  95. +5 −6 tests/ut_lockscreenbusinesslogic/ut_lockscreenbusinesslogic.pro
  96. +23 −23 tests/ut_lockscreenbusinesslogicadaptor/ut_lockscreenbusinesslogicadaptor.cpp
  97. +5 −6 tests/ut_lockscreenbusinesslogicadaptor/ut_lockscreenbusinesslogicadaptor.h
  98. +5 −5 tests/ut_lockscreenbusinesslogicadaptor/ut_lockscreenbusinesslogicadaptor.pro
  99. +6 −7 tests/ut_lockscreenstatusareaview/ut_lockscreenstatusareaview.pro
  100. +1 −1 tests/ut_lockscreenview/ut_lockscreenview.cpp
  101. +1 −1 tests/ut_lockscreenview/ut_lockscreenview.h
  102. +3 −3 tests/ut_lockscreenview/ut_lockscreenview.pro
  103. +11 −8 tests/ut_lockscreenwindow/ut_lockscreenwindow.cpp
  104. +2 −3 tests/ut_lockscreenwindow/ut_lockscreenwindow.h
  105. +5 −6 tests/ut_lockscreenwindow/ut_lockscreenwindow.pro
  106. +6 −6 tests/ut_lockscreenwithoutpadlockview/ut_lockscreenwithoutpadlockview.pro
  107. +8 −8 tests/ut_lockscreenwithpadlockview/ut_lockscreenwithpadlockview.pro
  108. +2 −2 tests/ut_notificationstatusindicator/ut_notificationstatusindicator.pro
  109. +1 −0 tests/ut_statusareaview/ut_statusareaview.cpp
  110. +3 −3 tests/ut_statusareaview/ut_statusareaview.pro
  111. +0 −2 tests/ut_statusindicator/ut_statusindicator.cpp
  112. +1 −2 tests/ut_statusindicator/ut_statusindicator.pro
  113. +2 −1 tests/ut_statusindicatormenudropdownview/ut_statusindicatormenudropdownview.cpp
  114. +2 −1 tests/ut_statusindicatormenudropdownview/ut_statusindicatormenudropdownview.pro
  115. +1 −0 tests/ut_statusindicatormenuwindow/ut_statusindicatormenuwindow.cpp
  116. +1 −0 tests/ut_statusindicatormenuwindow/ut_statusindicatormenuwindow.pro
  117. +14 −14 tests/ut_sysuid/ut_sysuid.pro
  118. +3 −3 tests/ut_unlockarea/ut_unlockarea.pro
  119. +3 −3 tests/ut_unlockmissedevents/ut_unlockmissedevents.pro
  120. +4 −4 tests/ut_unlocknotifications/ut_unlocknotifications.pro
  121. +4 −4 tests/ut_unlocknotificationsink/ut_unlocknotificationsink.pro
  122. +4 −748 themes/style/default.css
  123. +57 −0 themes/style/notificationarea.css
  124. +35 −0 themes/style/screenlock.css
  125. +512 −0 themes/style/statusarea.css
  126. +89 −0 themes/style/statusindicatormenu.css
View
@@ -20,15 +20,6 @@ lib
.cproject
core
doc/html
-debian/system-ui
-debian/system-ui-dbg*
-debian/system-ui-dev*
-debian/system-ui-doc*
-debian/system-ui-tests*
-debian/systemui-l10n-engineering-english*
-debian/files
-debian/tmp
-debian/system-ui.substvars
build-stamp
configure-stamp
localconfig.pri
View
@@ -1 +1,14 @@
-libnotificationsystem*
+system-ui
+system-ui-dbg
+system-ui-dev
+system-ui-doc
+system-ui-tests
+systemui-l10n-engineering-english
+libnotificationsystem0
+libnotificationsystem-dev
+files
+tmp
+system-ui-screenlock
+*.substvars
+*.log
+*.debhelper
View
@@ -78,3 +78,8 @@ Section: devel
Architecture: all
Description: Engineering English translations for system-ui daemon.
+Package: system-ui-screenlock
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}
+Description: Screen lock extension for system-ui
@@ -0,0 +1,4 @@
+usr/share/themes/base/meegotouch/libsysuid-screenlock/style/*.css
+usr/share/themes/base/meegotouch/libsysuid-screenlock/*.conf
+usr/lib/meegotouch/applicationextensions/libsysuid-screenlock.so
+usr/share/meegotouch/applicationextensions/sysuid-screenlock.desktop
@@ -28,5 +28,3 @@ desktop_entry.files = *.desktop
INSTALLS += \
target \
desktop_entry
-
-include(../check.pri)
@@ -17,12 +17,12 @@
**
****************************************************************************/
+#include <MLibrary>
#include "callplugin.h"
#include "call.h"
Q_EXPORT_PLUGIN2(call, CallPlugin)
-
CallPlugin::CallPlugin() : statusIndicatorMenu(0), call(0)
{
}
@@ -49,3 +49,5 @@ QGraphicsWidget *CallPlugin::widget()
{
return call;
}
+
+M_LIBRARY
View
@@ -1,8 +0,0 @@
-QMAKE_EXTRA_TARGETS += check
-# check.depends = $$QMAKE_TARGET
-check.commands = $$system(true)
-
-QMAKE_EXTRA_TARGETS += check-xml
-# check-xml.depends = $$QMAKE_TARGET
-check-xml.commands = $$system(true)
-
@@ -28,5 +28,3 @@ desktop_entry.files = *.desktop
INSTALLS += \
target \
desktop_entry
-
-include(../check.pri)
@@ -17,12 +17,12 @@
**
****************************************************************************/
+#include <MLibrary>
#include "profileplugin.h"
#include "profile.h"
Q_EXPORT_PLUGIN2(profile, ProfilePlugin)
-
ProfilePlugin::ProfilePlugin() : statusIndicatorMenu(0), profile(0)
{
}
@@ -49,3 +49,5 @@ QGraphicsWidget *ProfilePlugin::widget()
{
return profile;
}
+
+M_LIBRARY
@@ -0,0 +1,2 @@
+TEMPLATE = subdirs
+SUBDIRS = screenlock screenlock/themes
@@ -62,14 +62,14 @@ void Date::applyStyle()
MStylableWidget::applyStyle();
label->setAlignment(style()->horizontalAlign());
+ dateFormat = style()->dateFormat();
updateDate();
}
void Date::updateDate()
{
// Set current time in the labels
QDateTime currentTime = QDateTime::currentDateTime();
- QString dateFormat = style()->dateFormat();
if (dateFormat.isEmpty()) {
label->setText(locale->formatDateTime(currentTime, MLocale::DateFull, MLocale::TimeNone));
} else {
@@ -76,6 +76,9 @@ private slots:
//! Update timer
QTimer timer;
+ //! Date format string
+ QString dateFormat;
+
#ifdef HAVE_QMSYSTEM
//! QmTime object for listening date changes
MeeGo::QmTime qmTime;
@@ -19,9 +19,8 @@
#include "lockscreen.h"
LockScreen::LockScreen(QGraphicsItem *parent) :
- MSceneWindow(parent),
+ MWidgetController(parent),
displayOn(true)
-
{
connect(this, SIGNAL(displayExited()), this, SLOT(sliderUnlocked()));
@@ -46,8 +45,7 @@ void LockScreen::updateDisplayState(MeeGo::QmDisplayState::DisplayState state)
void LockScreen::sliderUnlocked()
{
- if(displayOn)
- {
+ if(displayOn) {
emit unlocked();
}
}
@@ -19,13 +19,13 @@
#ifndef LOCKSCREEN_H
#define LOCKSCREEN_H
-#include <MSceneWindow>
+#include <MWidgetController>
#ifdef HAVE_QMSYSTEM
#include <qmdisplaystate.h>
#endif
-class LockScreen : public MSceneWindow
+class LockScreen : public MWidgetController
{
Q_OBJECT
@@ -52,7 +52,8 @@ LockScreenStatusAreaView::LockScreenStatusAreaView(StatusArea *controller) :
connect(phoneNetworkTypeIndicator, SIGNAL(networkAvailabilityChanged(bool)), phoneSignalStrengthIndicator, SLOT(setDisplay(bool)));
// Connect notification signals
- connect(&Sysuid::instance()->notifierNotificationSink(), SIGNAL(notifierSinkActive(bool)), notifierIndicator, SLOT(setActive(bool)));
+ // TODO
+ //connect(&Sysuid::instance()->notifierNotificationSink(), SIGNAL(notifierSinkActive(bool)), notifierIndicator, SLOT(setActive(bool)));
// Put indicators into the layout
QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Horizontal);
@@ -0,0 +1,36 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (directui@nokia.com)
+**
+** This file is part of systemui.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at directui@nokia.com.
+**
+** This library is free software; you can redistribute it and/or
+** modify it under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation
+** and appearing in the file LICENSE.LGPL included in the packaging
+** of this file.
+**
+****************************************************************************/
+
+#ifndef LOCKSCREENSTYLE_H
+#define LOCKSCREENSTYLE_H
+
+#include <mwidgetstyle.h>
+
+class LockScreenStyle : public MWidgetStyle
+{
+ Q_OBJECT
+ M_STYLE(LockScreenStyle)
+};
+
+class LockScreenStyleContainer : public MWidgetStyleContainer
+{
+ M_STYLE_CONTAINER(LockScreenStyle)
+};
+
+#endif
@@ -17,11 +17,11 @@
**
****************************************************************************/
#include <QGraphicsLinearLayout>
-#include "lockscreenview.h"
#include <MGConfItem>
#include <MViewCreator>
#include <MSceneManager>
#include "lockscreen.h"
+#include "lockscreenview.h"
const QString GCONF_KEY_LANDSCAPE = "/desktop/meego/background/landscape/picture_filename";
const QString GCONF_KEY_PORTRAIT = "/desktop/meego/background/portrait/picture_filename";
@@ -76,10 +76,10 @@ void LockScreenBackgroundPixmap::destroyPixmap()
}
}
-LockScreenView::LockScreenView(MSceneWindow* controller) : MSceneWindowView(controller),
+LockScreenView::LockScreenView(MWidgetController* controller) : MWidgetView(controller),
+ controller(controller),
layout(new QGraphicsLinearLayout(Qt::Vertical)),
lockScreenHeader(new MWidgetController),
- controller(controller),
landscapePixmap(GCONF_KEY_LANDSCAPE),
portraitPixmap(GCONF_KEY_PORTRAIT)
{
@@ -109,7 +109,7 @@ void LockScreenView::drawBackground(QPainter *painter, const QStyleOptionGraphic
if (pixmap == NULL || pixmap->isNull()) {
// If no specific pixmap has been loaded or the pixmap is not valid, use the default
- MSceneWindowView::drawBackground(painter, option);
+ MWidgetView::drawBackground(painter, option);
} else {
// Otherwise draw the specific pixmap
painter->drawPixmap(QRectF(QPointF(), controller->geometry().size()), *pixmap, QRectF(0, 0, pixmap->width(), pixmap->height()));
@@ -19,7 +19,8 @@
#ifndef LOCKSCREENVIEW_H
#define LOCKSCREENVIEW_H
-#include <mscenewindowview.h>
+#include <MWidgetView>
+#include "lockscreenstyle.h"
class QGraphicsLinearLayout;
class MGConfItem;
@@ -74,18 +75,18 @@ private slots:
/*!
* LockScreenView renders the background image of the lock screen.
*/
-class LockScreenView : public MSceneWindowView
+class LockScreenView : public MWidgetView
{
Q_OBJECT
- M_VIEW(MSceneWindowModel, MSceneWindowStyle)
+ M_VIEW(MWidgetModel, LockScreenStyle)
public:
/*!
* Creates a lock screen view.
*
* \param controller controller for the view
*/
- LockScreenView(MSceneWindow* controller);
+ LockScreenView(MWidgetController* controller);
/*!
* Destroys the lock screen view.
@@ -97,6 +98,9 @@ class LockScreenView : public MSceneWindowView
virtual void drawBackground(QPainter *painter, const QStyleOptionGraphicsItem *option) const;
//! \reimp_end
+ //! Controller for the view
+ MWidgetController *controller;
+
//! Layout for the view
QGraphicsLinearLayout *layout;
@@ -108,9 +112,6 @@ private slots:
void updateStyleName();
private:
- //! Controller for the view
- MSceneWindow *controller;
-
//! Data for the landscape pixmap
LockScreenBackgroundPixmap landscapePixmap;
@@ -22,12 +22,14 @@
#include "lockscreen.h"
#include "notificationarea.h"
-LockScreenWithoutPadlockView::LockScreenWithoutPadlockView(MSceneWindow* controller) :
+LockScreenWithoutPadlockView::LockScreenWithoutPadlockView(MWidgetController* controller) :
LockScreenView(controller)
{
notificationArea = new NotificationArea(controller, false);
notificationArea->setObjectName("LockScreenNotificationArea");
notificationArea->setHonorPrivacySetting(true);
+ // TODO
+ //notificationArea->setNotificationManager(Sysuid::instance()->notifierNotificationSink());
layout->addStretch();
layout->addItem(notificationArea);
}
@@ -26,23 +26,22 @@ class NotificationArea;
class LockScreenWithoutPadlockView : public LockScreenView
{
Q_OBJECT
- M_VIEW(MSceneWindowModel, MSceneWindowStyle)
+ M_VIEW(MWidgetModel, LockScreenStyle)
public:
/*!
* \brief Constructs a new LockScreenWithoutPadlockView.
*
* \param controller the controller this is a view for
*/
- LockScreenWithoutPadlockView (MSceneWindow* controller);
+ LockScreenWithoutPadlockView(MWidgetController *controller);
/*!
* \brief Destroys the LockScreenWithoutPadlockView.
*/
- ~LockScreenWithoutPadlockView ();
+ ~LockScreenWithoutPadlockView();
private:
-
//! Notification area
NotificationArea* notificationArea;
};
@@ -30,15 +30,14 @@
#include "lockscreen.h"
#include "unlockarea.h"
-LockScreenWithPadlockView::LockScreenWithPadlockView(MSceneWindow* controller) :
+LockScreenWithPadlockView::LockScreenWithPadlockView(MWidgetController* controller) :
LockScreenView(controller),
dragAndDropWindow(dynamic_cast<MWindow*>(controller->parent())),
dragAndDropIcon(0),
dragAndDropState(STATE_NONE),
lockLandArea(new UnlockArea),
drawPending(false),
- notificationArea(new UnlockNotifications),
- controller(controller)
+ notificationArea(new UnlockNotifications)
{
lockScreenHeader->setObjectName("LockLiftAreaWithPadlock");
@@ -30,11 +30,11 @@ class UnlockNotifications;
class LockScreenWithPadlockView : public LockScreenView
{
Q_OBJECT
- M_VIEW(MSceneWindowModel, MSceneWindowStyle)
+ M_VIEW(MWidgetModel, LockScreenStyle)
public:
- LockScreenWithPadlockView (MSceneWindow* controller);
- ~LockScreenWithPadlockView ();
+ LockScreenWithPadlockView(MWidgetController *controller);
+ ~LockScreenWithPadlockView();
enum dnd_state {
STATE_NONE = 0,
@@ -72,7 +72,6 @@ private slots:
bool drawPending;
QPointF dragAndDropPosition;
UnlockNotifications *notificationArea;
- MSceneWindow* controller;
#ifdef UNIT_TEST
friend class Ut_LockScreenWithPadlockView;
Oops, something went wrong.

0 comments on commit 78812a6

Please sign in to comment.