screensaver/snsrplugins/snsrbigclockscreensaverplugin/inc/snsrbigclockscreensaver.h
changeset 97 66b5fe3c07fd
equal deleted inserted replaced
95:32e56106abf2 97:66b5fe3c07fd
       
     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: Big clock Screensaver.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef SNSRBIGCLOCKSCREENSAVER_H
       
    19 #define SNSRBIGCLOCKSCREENSAVER_H
       
    20 
       
    21 #include <QTimer>
       
    22 
       
    23 #include <screensaver.h>
       
    24 #include "snsrtest_global.h"
       
    25 
       
    26 SCREENSAVER_TEST_CLASS(T_SnsrBigClockScreensaverPlugin)
       
    27 
       
    28 class HbMainWindow;
       
    29 class SnsrBigClockContainer;
       
    30 class SnsrIndicatorModel;
       
    31 
       
    32 class SnsrBigClockScreensaver : public Screensaver
       
    33 {
       
    34     Q_OBJECT
       
    35 
       
    36 public:
       
    37 
       
    38     enum ClockFormat
       
    39     {
       
    40         ClockFormatUndefined,
       
    41         ClockFormatAnalog,
       
    42         ClockFormatDigital
       
    43     };
       
    44 
       
    45     SnsrBigClockScreensaver();
       
    46     ~SnsrBigClockScreensaver();
       
    47 
       
    48 private:
       
    49 
       
    50     ClockFormat clockFormat();
       
    51     void removeCurrentContainer();
       
    52     void setCurrentContainer( SnsrBigClockContainer* newContainer );
       
    53 
       
    54     virtual bool onInitialize();
       
    55     virtual bool onForeground();
       
    56     virtual bool onPartialForeground();
       
    57     virtual bool onBackground();
       
    58     virtual bool onPowerSave();
       
    59     virtual bool onClose();
       
    60     virtual void onHandleActiveIndicators(const QList<HbIndicatorInterface*> &activeIndicators);
       
    61     virtual void onHandleActivatedIndicator(HbIndicatorInterface *activatedIndicator);
       
    62     virtual void onHandleDeactivatedIndicator(HbIndicatorInterface *deactivatedIndicator);
       
    63     virtual Screensaver::ScreenPowerMode currentPowerMode();
       
    64     virtual void getActiveScreenRows(int *firstActiveRow, int *lastActiveRow);
       
    65     virtual void updateLayout();
       
    66 
       
    67 private slots:
       
    68 
       
    69     void updateTime();
       
    70 
       
    71 private:
       
    72 
       
    73     QTimer mTimer;
       
    74     HbMainWindow *mMainWindow;
       
    75     SnsrBigClockContainer *mCurrentContainer;
       
    76     SnsrIndicatorModel *mIndicatorModel;
       
    77 
       
    78     SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrBigClockScreensaverPlugin)
       
    79 
       
    80 };
       
    81 
       
    82 #endif // SNSRBIGCLOCKSCREENSAVER_H