62
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 - 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: Default Screensaver runtime.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef SNSRDEVICEDIALOG_H
|
|
19 |
#define SNSRDEVICEDIALOG_H
|
|
20 |
|
|
21 |
#include <HbPopup>
|
|
22 |
#include <HbDeviceDialogInterface>
|
|
23 |
|
|
24 |
|
|
25 |
|
69
|
26 |
#include "screensaver.h"
|
62
|
27 |
#include "snsrtest_global.h"
|
|
28 |
|
|
29 |
class Screensaver;
|
|
30 |
class SnsrUserActivityServiceInterface;
|
|
31 |
class QGraphicsLinearLayout;
|
|
32 |
class XQSettingsManager;
|
69
|
33 |
class HbIndicatorInterface;
|
62
|
34 |
|
|
35 |
SCREENSAVER_TEST_CLASS(T_SnsrDeviceDialogPlugin)
|
|
36 |
|
|
37 |
|
|
38 |
class SnsrDeviceDialog: public HbPopup, public HbDeviceDialogInterface
|
|
39 |
{
|
|
40 |
|
|
41 |
Q_OBJECT
|
|
42 |
|
|
43 |
public: // constants
|
|
44 |
enum DisplayType {
|
|
45 |
DisplayTypeRegular = 0,
|
|
46 |
DisplayTypeOled,
|
|
47 |
DisplayTypeRegularAndOled
|
|
48 |
};
|
|
49 |
|
|
50 |
enum ViewType {
|
|
51 |
ViewTypeInitial = 0, // default initial state, depends on the configuration
|
|
52 |
ViewTypeActive,
|
|
53 |
ViewTypeStandby
|
|
54 |
};
|
|
55 |
|
|
56 |
static const char *dataKeyUnlock;
|
69
|
57 |
static const char *dataKeySwitchLights;
|
|
58 |
static const char *dataKeySwitchLowPower;
|
62
|
59 |
|
|
60 |
public: // methods
|
|
61 |
|
|
62 |
SnsrDeviceDialog(const QVariantMap ¶meters, QGraphicsItem *parent = 0);
|
|
63 |
~SnsrDeviceDialog();
|
|
64 |
|
|
65 |
virtual bool setDeviceDialogParameters(const QVariantMap ¶meters);
|
|
66 |
virtual int deviceDialogError() const;
|
|
67 |
virtual void closeDeviceDialog(bool byClient);
|
|
68 |
virtual HbPopup *deviceDialogWidget() const;
|
|
69 |
|
|
70 |
signals:
|
|
71 |
|
|
72 |
void deviceDialogClosed();
|
|
73 |
void deviceDialogData(QVariantMap);
|
|
74 |
|
|
75 |
private slots:
|
|
76 |
|
|
77 |
void changeView(QGraphicsWidget *widget);
|
|
78 |
void screensaverFaulted();
|
|
79 |
void changeLayout(Qt::Orientation);
|
|
80 |
void requestUnlock();
|
69
|
81 |
void requestScreenMode(Screensaver::ScreenPowerMode mode);
|
62
|
82 |
// slots for signals emitted by HbIndicatorPluginManager
|
|
83 |
void indicatorsActivated(const QList<HbIndicatorInterface*> &activatedIndicators);
|
|
84 |
void indicatorActivated(HbIndicatorInterface *activatedIndicator);
|
|
85 |
void indicatorRemoved(HbIndicatorInterface *indicatorRemoved);
|
|
86 |
|
|
87 |
private:
|
|
88 |
|
|
89 |
void showEvent(QShowEvent *event);
|
|
90 |
void hideEvent(QHideEvent *event);
|
|
91 |
void closeEvent(QCloseEvent *event);
|
|
92 |
|
|
93 |
private:
|
|
94 |
|
|
95 |
Screensaver *mScreensaver;
|
|
96 |
QGraphicsLinearLayout *mLayout;
|
|
97 |
XQSettingsManager *m_setManager;
|
|
98 |
|
|
99 |
SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrDeviceDialogPlugin)
|
|
100 |
};
|
|
101 |
|
|
102 |
#endif // SNSRDEVICEDIALOG_H
|