ui/viewutilities/effectengine/src/glxtransitioneffect.cpp
author hgs
Mon, 27 Sep 2010 15:13:20 +0530
changeset 69 45459746d5e8
parent 52 a3a4c0de738e
permissions -rw-r--r--
201039
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
43
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
*
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
hgs
parents:
diff changeset
    14
* Description:   ?Description
hgs
parents:
diff changeset
    15
*
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
hgs
parents:
diff changeset
    18
#include <glxtransitioneffect.h>
hgs
parents:
diff changeset
    19
hgs
parents:
diff changeset
    20
#include <QString>
hgs
parents:
diff changeset
    21
hgs
parents:
diff changeset
    22
GlxTransitionEffectSetting::GlxTransitionEffectSetting(GlxEffect effect): mEffect(effect), mTransitionLater(false), mItem(0)
hgs
parents:
diff changeset
    23
{
69
hgs
parents: 52
diff changeset
    24
    qDebug( "GlxTransitionEffectSetting::GlxTransitionEffectSetting() effect id %d ", effect );
43
hgs
parents:
diff changeset
    25
    mEffectFileList.clear();
hgs
parents:
diff changeset
    26
    mItemType.clear();
hgs
parents:
diff changeset
    27
    mEventType.clear();
hgs
parents:
diff changeset
    28
    init();
hgs
parents:
diff changeset
    29
}
hgs
parents:
diff changeset
    30
hgs
parents:
diff changeset
    31
void GlxTransitionEffectSetting::init()
hgs
parents:
diff changeset
    32
{
69
hgs
parents: 52
diff changeset
    33
    qDebug( "GlxTransitionEffectSetting::init() effect id %d ", mEffect );
43
hgs
parents:
diff changeset
    34
    
hgs
parents:
diff changeset
    35
    switch( mEffect ) {
hgs
parents:
diff changeset
    36
        case GRID_TO_FULLSCREEN :
69
hgs
parents: 52
diff changeset
    37
            mEffectFileList.append( QString( ":/data/gridtofullscreenhide.fxml" ) );
hgs
parents: 52
diff changeset
    38
            mItemType.append( QString( "HbGridViewItem" ) );
hgs
parents: 52
diff changeset
    39
            mEventType.append(QString( "gridtofshide" ) );
43
hgs
parents:
diff changeset
    40
            
69
hgs
parents: 52
diff changeset
    41
            mEffectFileList.append( QString( ":/data/gridtofullscreenshow.fxml" ) );
hgs
parents: 52
diff changeset
    42
            mItemType.append( QString( "HbView" ) );
hgs
parents: 52
diff changeset
    43
            mEventType.append(QString( "gridtofsshow" ) );
43
hgs
parents:
diff changeset
    44
            break;
hgs
parents:
diff changeset
    45
            
hgs
parents:
diff changeset
    46
        case FULLSCREEN_TO_GRID :
69
hgs
parents: 52
diff changeset
    47
            mEffectFileList.append( QString( ":/data/fullscreentogrid.fxml" ) );
hgs
parents: 52
diff changeset
    48
            mItemType.append( QString( "HbGridView" ) );
hgs
parents: 52
diff changeset
    49
            mEventType.append(QString( "fstogrid" ) );
43
hgs
parents:
diff changeset
    50
            break;
hgs
parents:
diff changeset
    51
            
69
hgs
parents: 52
diff changeset
    52
        case FULLSCREEN_TO_GRID_PORTRAIT :
hgs
parents: 52
diff changeset
    53
            mEffectFileList.append( QString( ":/data/fullscreentogridportrait.fxml" ) );
hgs
parents: 52
diff changeset
    54
            mItemType.append( QString( "HbGridView" ) );
hgs
parents: 52
diff changeset
    55
            mEventType.append( QString( "fstogridpt" ) );
hgs
parents: 52
diff changeset
    56
            break;            
hgs
parents: 52
diff changeset
    57
            
43
hgs
parents:
diff changeset
    58
        case GRID_TO_ALBUMLIST:
52
hgs
parents: 43
diff changeset
    59
            mEffectFileList.append( QString( "view_hide_normal" ) );
hgs
parents: 43
diff changeset
    60
            mItemType.append( QString( "HbView" ) );
69
hgs
parents: 52
diff changeset
    61
            mEventType.append( QString( "gridtolisthide" ) );
43
hgs
parents:
diff changeset
    62
                        
52
hgs
parents: 43
diff changeset
    63
            mEffectFileList.append( QString( "view_show_normal" ) );
hgs
parents: 43
diff changeset
    64
            mItemType.append( QString( "HbListView" ) );
69
hgs
parents: 52
diff changeset
    65
            mEventType.append( QString( "gridtolistshow" ) );
43
hgs
parents:
diff changeset
    66
            break;
hgs
parents:
diff changeset
    67
             
hgs
parents:
diff changeset
    68
        case ALBUMLIST_TO_GRID:
52
hgs
parents: 43
diff changeset
    69
            mEffectFileList.append( QString( "view_hide_back" ) );
hgs
parents: 43
diff changeset
    70
            mItemType.append( QString( "HbListView" ) );
69
hgs
parents: 52
diff changeset
    71
            mEventType.append( QString( "listtogridhide" ) );
43
hgs
parents:
diff changeset
    72
                        
52
hgs
parents: 43
diff changeset
    73
            mEffectFileList.append( QString( "view_show_back" ) );
hgs
parents: 43
diff changeset
    74
            mItemType.append( QString( "HbView" ) );
69
hgs
parents: 52
diff changeset
    75
            mEventType.append( QString( "listtogridshow" ) );
43
hgs
parents:
diff changeset
    76
            break;
hgs
parents:
diff changeset
    77
            
hgs
parents:
diff changeset
    78
        case FULLSCREEN_TO_DETAIL :
52
hgs
parents: 43
diff changeset
    79
            mEffectFileList.append( QString( "view_hide_normal_alt" ) );
hgs
parents: 43
diff changeset
    80
            mItemType.append( QString( "HbView" ) );
69
hgs
parents: 52
diff changeset
    81
            mEventType.append( QString( "fstodetailhide" ) );
43
hgs
parents:
diff changeset
    82
                        
52
hgs
parents: 43
diff changeset
    83
            mEffectFileList.append( QString( "view_show_normal_alt" ) );
hgs
parents: 43
diff changeset
    84
            mItemType.append( QString( "HbView" ) );
69
hgs
parents: 52
diff changeset
    85
            mEventType.append(QString( "fstodetailshow" ) );
43
hgs
parents:
diff changeset
    86
            mTransitionLater = true;
hgs
parents:
diff changeset
    87
            break;
hgs
parents:
diff changeset
    88
            
hgs
parents:
diff changeset
    89
        case DETAIL_TO_FULLSCREEN :
52
hgs
parents: 43
diff changeset
    90
            mEffectFileList.append( "view_hide_back_alt" );
hgs
parents: 43
diff changeset
    91
            mItemType.append( QString( "HbView" ) );
69
hgs
parents: 52
diff changeset
    92
            mEventType.append( QString( "detailtofshide" ) );
43
hgs
parents:
diff changeset
    93
                        
52
hgs
parents: 43
diff changeset
    94
            mEffectFileList.append( "view_show_back_alt" );
hgs
parents: 43
diff changeset
    95
            mItemType.append( QString( "HbView" ) );
69
hgs
parents: 52
diff changeset
    96
            mEventType.append( QString( "detailtofsshow" ) );
43
hgs
parents:
diff changeset
    97
            mTransitionLater = true;
hgs
parents:
diff changeset
    98
            break;            
hgs
parents:
diff changeset
    99
            
hgs
parents:
diff changeset
   100
        default :
hgs
parents:
diff changeset
   101
            break;
hgs
parents:
diff changeset
   102
    }    
hgs
parents:
diff changeset
   103
}
hgs
parents:
diff changeset
   104
hgs
parents:
diff changeset
   105
GlxTransitionEffectSetting::~GlxTransitionEffectSetting()
hgs
parents:
diff changeset
   106
{
69
hgs
parents: 52
diff changeset
   107
    qDebug( "GlxTransitionEffectSetting::~GlxTransitionEffectSetting() effect id %d ", mEffect );
43
hgs
parents:
diff changeset
   108
    mEffectFileList.clear();
hgs
parents:
diff changeset
   109
    mItemType.clear();
hgs
parents:
diff changeset
   110
    mEventType.clear();
hgs
parents:
diff changeset
   111
}
hgs
parents:
diff changeset
   112