diff -r f00a6757af32 -r 5f0182e07bfb screensaver/devicedialogplugins/snsrdevicedialogplugin/inc/snsrdevicedialog.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/screensaver/devicedialogplugins/snsrdevicedialogplugin/inc/snsrdevicedialog.h Tue Aug 31 15:06:34 2010 +0300 @@ -0,0 +1,102 @@ +/* +* Copyright (c) 2009 - 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Default Screensaver runtime. +* +*/ + +#ifndef SNSRDEVICEDIALOG_H +#define SNSRDEVICEDIALOG_H + +#include +#include + + + +#include "screensaver.h" +#include "snsrtest_global.h" + +class Screensaver; +class SnsrUserActivityServiceInterface; +class QGraphicsLinearLayout; +class XQSettingsManager; +class HbIndicatorInterface; + +SCREENSAVER_TEST_CLASS(T_SnsrDeviceDialogPlugin) + + +class SnsrDeviceDialog: public HbPopup, public HbDeviceDialogInterface +{ + +Q_OBJECT + +public: // constants + enum DisplayType { + DisplayTypeRegular = 0, + DisplayTypeOled, + DisplayTypeRegularAndOled + }; + + enum ViewType { + ViewTypeInitial = 0, // default initial state, depends on the configuration + ViewTypeActive, + ViewTypeStandby + }; + + static const char *dataKeyUnlock; + static const char *dataKeySwitchLights; + static const char *dataKeySwitchLowPower; + +public: // methods + + SnsrDeviceDialog(const QVariantMap ¶meters, QGraphicsItem *parent = 0); + ~SnsrDeviceDialog(); + + virtual bool setDeviceDialogParameters(const QVariantMap ¶meters); + virtual int deviceDialogError() const; + virtual void closeDeviceDialog(bool byClient); + virtual HbPopup *deviceDialogWidget() const; + +signals: + + void deviceDialogClosed(); + void deviceDialogData(QVariantMap); + +private slots: + + void changeView(QGraphicsWidget *widget); + void screensaverFaulted(); + void changeLayout(Qt::Orientation); + void requestUnlock(); + void requestScreenMode(Screensaver::ScreenPowerMode mode); + // slots for signals emitted by HbIndicatorPluginManager + void indicatorsActivated(const QList &activatedIndicators); + void indicatorActivated(HbIndicatorInterface *activatedIndicator); + void indicatorRemoved(HbIndicatorInterface *indicatorRemoved); + +private: + + void showEvent(QShowEvent *event); + void hideEvent(QHideEvent *event); + void closeEvent(QCloseEvent *event); + +private: + + Screensaver *mScreensaver; + QGraphicsLinearLayout *mLayout; + XQSettingsManager *m_setManager; + + SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrDeviceDialogPlugin) +}; + +#endif // SNSRDEVICEDIALOG_H