ui/viewutilities/effectengine/src/glxtransitioneffect.cpp
changeset 36 6481344a6d67
child 52 a3a4c0de738e
equal deleted inserted replaced
33:1ee2af37811f 36:6481344a6d67
       
     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 #include <glxtransitioneffect.h>
       
    19 
       
    20 #include <QString>
       
    21 
       
    22 GlxTransitionEffectSetting::GlxTransitionEffectSetting(GlxEffect effect): mEffect(effect), mTransitionLater(false), mItem(0)
       
    23 {
       
    24     qDebug("GlxTransitionEffectSetting::GlxTransitionEffectSetting() effect id %d ", effect);
       
    25     mEffectFileList.clear();
       
    26     mItemType.clear();
       
    27     mEventType.clear();
       
    28     init();
       
    29 }
       
    30 
       
    31 void GlxTransitionEffectSetting::init()
       
    32 {
       
    33     qDebug("GlxTransitionEffectSetting::init() effect id %d ", mEffect);
       
    34     
       
    35     switch( mEffect ) {
       
    36         case GRID_TO_FULLSCREEN :
       
    37             mEffectFileList.append( QString(":/data/gridtofullscreenhide.fxml"));
       
    38             mItemType.append( QString("HbGridViewItem") );
       
    39             mEventType.append(QString("click1") );
       
    40             
       
    41             mEffectFileList.append( QString(":/data/gridtofullscreenshow.fxml"));
       
    42             mItemType.append( QString("HbView") );
       
    43             mEventType.append(QString("click2") );
       
    44             break;
       
    45             
       
    46         case FULLSCREEN_TO_GRID :
       
    47             mEffectFileList.append( QString(":/data/fullscreentogrid.fxml"));
       
    48             mItemType.append( QString("HbGridView") );
       
    49             mEventType.append(QString("click3") );
       
    50             break;
       
    51             
       
    52         case GRID_TO_ALBUMLIST:
       
    53             mEffectFileList.append( QString(":/data/gridtoalbumlisthide.fxml"));
       
    54             mItemType.append( QString("HbView") );
       
    55             mEventType.append(QString("click4") );
       
    56                         
       
    57             mEffectFileList.append( QString(":/data/gridtoalbumlist.fxml"));
       
    58             mItemType.append( QString("HbListView") );
       
    59             mEventType.append(QString("click5") );
       
    60             break;
       
    61              
       
    62         case ALBUMLIST_TO_GRID:
       
    63             mEffectFileList.append( QString(":/data/albumlisttogrid.fxml"));
       
    64             mItemType.append( QString("HbListView") );
       
    65             mEventType.append(QString("click6") );
       
    66                         
       
    67             mEffectFileList.append( QString(":/data/albumlisttogridshow.fxml"));
       
    68             mItemType.append( QString("HbView") );
       
    69             mEventType.append(QString("click7") );
       
    70             break;
       
    71             
       
    72         case FULLSCREEN_TO_DETAIL :
       
    73             mEffectFileList.append( QString(":/data/view_flip_hide.fxml"));
       
    74             mItemType.append( QString("HbView") );
       
    75             mEventType.append(QString("click8") );
       
    76                         
       
    77             mEffectFileList.append( QString(":/data/view_flip_show.fxml"));
       
    78             mItemType.append( QString("HbView") );
       
    79             mEventType.append(QString("click9") );
       
    80             mTransitionLater = true;
       
    81             break;
       
    82             
       
    83         case DETAIL_TO_FULLSCREEN :
       
    84             mEffectFileList.append( QString(":/data/view_flip_hide.fxml"));
       
    85             mItemType.append( QString("HbView") );
       
    86             mEventType.append(QString("click10") );
       
    87                         
       
    88             mEffectFileList.append( QString(":/data/view_flip_show.fxml"));
       
    89             mItemType.append( QString("HbView") );
       
    90             mEventType.append(QString("click11") );
       
    91             mTransitionLater = true;
       
    92             break;            
       
    93             
       
    94         default :
       
    95             break;
       
    96     }    
       
    97 }
       
    98 
       
    99 GlxTransitionEffectSetting::~GlxTransitionEffectSetting()
       
   100 {
       
   101     qDebug("GlxTransitionEffectSetting::~GlxTransitionEffectSetting() effect id %d ", mEffect);
       
   102     mEffectFileList.clear();
       
   103     mItemType.clear();
       
   104     mEventType.clear();
       
   105 }
       
   106