ui/viewmanagement/statehandler/src/glxdetailstate.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 <glxdetailstate.h>
       
    21 
       
    22 GlxDetailState::GlxDetailState(GlxState *preState) : GlxState(GLX_DETAILSVIEW_ID, preState)
       
    23 {
       
    24 	
       
    25 }
       
    26 
       
    27 
       
    28 void GlxDetailState::eventHandler(qint32 &id)
       
    29 {
       
    30     Q_UNUSED(id)	
       
    31 }
       
    32 
       
    33 void GlxDetailState::setTranstionParameter(NavigationDir dir, GlxEffect &effect, GlxViewEffect &viewEffect)
       
    34 {
       
    35     GlxState *preState = previousState();
       
    36     effect = NO_EFFECT ;
       
    37     viewEffect = NO_VIEW ;
       
    38     
       
    39     if ( preState == NULL ) {
       
    40         return ;        
       
    41     }
       
    42     
       
    43     if ( dir == FORWARD_DIR ){
       
    44          if ( preState->compare( GLX_FULLSCREENVIEW_ID ) ) {
       
    45              effect = FULLSCREEN_TO_DETAIL ;
       
    46              viewEffect = BOTH_VIEW ;
       
    47          }
       
    48     }    
       
    49     else if ( dir == BACKWARD_DIR ) {
       
    50         if ( preState->compare( GLX_FULLSCREENVIEW_ID ) ) {
       
    51             effect = DETAIL_TO_FULLSCREEN;
       
    52             viewEffect = BOTH_VIEW;
       
    53         }       
       
    54     }    
       
    55 }
       
    56