mmsharing/livecommsui/lcui/inc/lceffecthandler.h
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
     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:
       
    15 *
       
    16 */
       
    17 #ifndef LCEFFECTHANDLER_H
       
    18 #define LCEFFECTHANDLER_H
       
    19 
       
    20 #include <QObject>
       
    21 #include <hbeffect.h>
       
    22 
       
    23 class HbWidget;
       
    24 class LcUiEngine;
       
    25 
       
    26 /**
       
    27  * 
       
    28  */
       
    29 class LcEffectHandler : public QObject
       
    30 {
       
    31     Q_OBJECT
       
    32     friend class UT_LcEffectHandler;
       
    33     friend class UT_LcView;
       
    34     
       
    35 public:
       
    36     
       
    37     enum DissapperEffect{
       
    38         NormalDissappear,
       
    39         DissappearToFlip
       
    40     };
       
    41 
       
    42     explicit LcEffectHandler(LcUiEngine& engine,
       
    43                              HbWidget* sharedVideo, 
       
    44                              HbWidget* sharedVideoOverlay,
       
    45                              HbWidget* receivedVideo,
       
    46                              HbWidget* receivedVideoOverlay);
       
    47     ~LcEffectHandler();
       
    48 
       
    49     void setVisibility(HbWidget* widget, bool visible);
       
    50     
       
    51     void setDissappearEffect( LcEffectHandler::DissapperEffect aEffectType );
       
    52 
       
    53     bool isSwapInProgress();
       
    54     
       
    55     void startEffects();
       
    56 
       
    57 signals:
       
    58     void swapCompleted();
       
    59     void loadSwapLayout();
       
    60        
       
    61 public slots:
       
    62 
       
    63     void showSendWindow();
       
    64     void showReceiveWindow();
       
    65     void hideSendWindow();
       
    66     void hideReceiveWindow();
       
    67     void windowAppearComplete( HbEffect::EffectStatus status );
       
    68     void windowDisappearComplete( HbEffect::EffectStatus status );
       
    69     void windowDisappearToFlipComplete( HbEffect::EffectStatus status );
       
    70     void windowFlipComplete( HbEffect::EffectStatus status );
       
    71     void windowSwapSharedComplete( HbEffect::EffectStatus status );
       
    72     void windowSwapReceivedComplete( HbEffect::EffectStatus status );
       
    73     void swap();
       
    74     
       
    75 private:
       
    76     void startEffect( HbWidget* widget, const char *effectId, const char *callBack = "" );
       
    77     bool isSharedVideoAtTop() const;
       
    78     bool videosSideBySide() const;
       
    79     void handleSwapCompletion();
       
    80     void initializeSwap();
       
    81     
       
    82 private: //data 
       
    83     
       
    84     LcUiEngine& mEngine;
       
    85     HbWidget* mSharedVideo;
       
    86     HbWidget* mSharedVideoOverlay;
       
    87     HbWidget* mReceivedVideo;
       
    88     HbWidget* mReceivedVideoOverlay;
       
    89     
       
    90     QString mEffectCallBack;
       
    91     bool mSwapSharedCompleted;
       
    92     bool mSwapReceivedCompleted;
       
    93     bool mSwapInProgress;
       
    94 };
       
    95                   
       
    96 #endif // LCEFFECTHANDLER_H