screensaver/devicedialogplugins/snsrdevicedialogplugin/inc/snsrdevicedialog.h
changeset 62 341166945d65
child 69 87476091b3f5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/screensaver/devicedialogplugins/snsrdevicedialogplugin/inc/snsrdevicedialog.h	Fri Jun 25 19:19:22 2010 +0300
@@ -0,0 +1,100 @@
+/*
+* 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 <HbPopup>
+#include <HbDeviceDialogInterface>
+
+
+
+
+#include "snsrtest_global.h"
+
+class Screensaver;
+class SnsrUserActivityServiceInterface;
+class QGraphicsLinearLayout;
+class XQSettingsManager;
+
+SCREENSAVER_TEST_CLASS(T_SnsrDeviceDialogPlugin)
+
+class HbIndicatorInterface;
+
+
+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;
+
+public: // methods
+
+    SnsrDeviceDialog(const QVariantMap &parameters, QGraphicsItem *parent = 0);
+    ~SnsrDeviceDialog();
+
+    virtual bool setDeviceDialogParameters(const QVariantMap &parameters);
+    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();
+    // slots for signals emitted by HbIndicatorPluginManager
+    void indicatorsActivated(const QList<HbIndicatorInterface*> &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