screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/inc/snsrbigclockscreensaver.h
changeset 39 4e8ebe173323
parent 36 cdae8c6c3876
child 42 517f4fb5ec74
child 46 23b5d6a29cce
equal deleted inserted replaced
36:cdae8c6c3876 39:4e8ebe173323
     1 /*
       
     2 * Copyright (c) 2009 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_SnsrBigClockScreensaverProvider)
       
    27 
       
    28 class HbMainWindow;
       
    29 class SnsrBigClockContainer;
       
    30 
       
    31 class SnsrBigClockScreensaver : public Screensaver
       
    32 {
       
    33     Q_OBJECT
       
    34 
       
    35 public:
       
    36 
       
    37     enum ClockFormat
       
    38     {
       
    39         ClockFormatUndefined,
       
    40         ClockFormatAnalog,
       
    41         ClockFormatDigital
       
    42     };
       
    43 
       
    44     SnsrBigClockScreensaver();
       
    45     ~SnsrBigClockScreensaver();
       
    46 
       
    47 private:
       
    48 
       
    49     ClockFormat clockFormat();
       
    50 
       
    51     virtual bool onInitialize();
       
    52     virtual bool onForeground();
       
    53     virtual bool onPartialForeground();
       
    54     virtual bool onBackground();
       
    55     virtual bool onPowerSave();
       
    56     virtual bool onClose();
       
    57 
       
    58 private:
       
    59 
       
    60     QTimer mTimer;
       
    61     HbMainWindow *mMainWindow;
       
    62     SnsrBigClockContainer *mCurrentContainer;
       
    63     
       
    64     SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrBigClockScreensaverProvider)
       
    65 
       
    66 };
       
    67 
       
    68 #endif // SNSRBIGCLOCKSCREENSAVER_H