emailuis/nmailui/inc/nmuieffects.h
changeset 23 2dc6caa42ec3
child 30 759dc5235cdb
equal deleted inserted replaced
20:ecc8def7944a 23:2dc6caa42ec3
       
     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: Graphical effects/animations for nmail ui.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef NMUIEFFECTS_H_
       
    19 #define NMUIEFFECTS_H_
       
    20 
       
    21 #include <QObject>
       
    22 #include <hbeffect.h>
       
    23 
       
    24 class QGraphicsPixmapItem;
       
    25 class HbMainWindow;
       
    26 
       
    27 class NmUiEffects : public QObject
       
    28 {
       
    29     Q_OBJECT
       
    30 
       
    31 public:
       
    32     /*!
       
    33      * \enum NmEffectType
       
    34      * \brief Defines effect to be launched
       
    35      */
       
    36     enum NmUiEffectType
       
    37     {
       
    38         NmNoEffect = 0,
       
    39         // Editor 'exiting' effect when message has been sent.
       
    40         NmEditorSendMessageAnimation
       
    41     };
       
    42 
       
    43     NmUiEffects(HbMainWindow &mainWindow);
       
    44     ~NmUiEffects();
       
    45 
       
    46     void prepareEffect(NmUiEffectType effect);
       
    47     void startEffect(NmUiEffectType effect);
       
    48 
       
    49 private:
       
    50     QGraphicsPixmapItem *screenShot();
       
    51     void resetSendAnimation();
       
    52     
       
    53 private slots:
       
    54     void sendAnimationComplete(HbEffect::EffectStatus status);
       
    55 
       
    56 private:
       
    57     HbMainWindow &mMainWindow;
       
    58     QGraphicsPixmapItem *mSendAnimationScreenShot; // Owned
       
    59     bool mDoSendAnimation;
       
    60 };
       
    61 
       
    62 #endif /* NMUIEFFECTS_H_ */