ui/viewmanagement/statehandler/src/glxfullscreenstate.cpp
changeset 23 74c9f037fd5d
child 50 a0f57508af73
equal deleted inserted replaced
5:f7f0874bfe7d 23:74c9f037fd5d
       
     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:   ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include <glxfullscreenstate.h>
       
    21 
       
    22 GlxFullScreenState::GlxFullScreenState(GlxState *preState) : GlxState(GLX_FULLSCREENVIEW_ID, preState)
       
    23 {
       
    24 	
       
    25 }
       
    26 
       
    27 void GlxFullScreenState::eventHandler(qint32 &id)
       
    28 {
       
    29     Q_UNUSED(id);	
       
    30 }
       
    31 
       
    32 void GlxFullScreenState::setTranstionParameter(NavigationDir dir, GlxEffect &effect, GlxViewEffect &viewEffect)
       
    33 {
       
    34     GlxState *preState = previousState();
       
    35     effect = NO_EFFECT ;
       
    36     viewEffect = NO_VIEW ;
       
    37     
       
    38     if ( preState == NULL ) {
       
    39         return ;        
       
    40     }
       
    41     
       
    42     if ( dir == FORWARD_DIR ){
       
    43          if ( preState->compare( GLX_GRIDVIEW_ID ) ) {
       
    44              effect = GRID_TO_FULLSCREEN ;
       
    45              viewEffect = BOTH_VIEW ;
       
    46          }
       
    47     }    
       
    48     else if ( dir == BACKWARD_DIR ) {
       
    49         if ( preState->compare( GLX_GRIDVIEW_ID ) ) {
       
    50             effect = FULLSCREEN_TO_GRID;
       
    51             viewEffect = LAUNCH_VIEW;
       
    52         }       
       
    53     }    
       
    54 }
       
    55