43
|
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 |
{
|
69
|
24 |
qDebug( "GlxTransitionEffectSetting::GlxTransitionEffectSetting() effect id %d ", effect );
|
43
|
25 |
mEffectFileList.clear();
|
|
26 |
mItemType.clear();
|
|
27 |
mEventType.clear();
|
|
28 |
init();
|
|
29 |
}
|
|
30 |
|
|
31 |
void GlxTransitionEffectSetting::init()
|
|
32 |
{
|
69
|
33 |
qDebug( "GlxTransitionEffectSetting::init() effect id %d ", mEffect );
|
43
|
34 |
|
|
35 |
switch( mEffect ) {
|
|
36 |
case GRID_TO_FULLSCREEN :
|
69
|
37 |
mEffectFileList.append( QString( ":/data/gridtofullscreenhide.fxml" ) );
|
|
38 |
mItemType.append( QString( "HbGridViewItem" ) );
|
|
39 |
mEventType.append(QString( "gridtofshide" ) );
|
43
|
40 |
|
69
|
41 |
mEffectFileList.append( QString( ":/data/gridtofullscreenshow.fxml" ) );
|
|
42 |
mItemType.append( QString( "HbView" ) );
|
|
43 |
mEventType.append(QString( "gridtofsshow" ) );
|
43
|
44 |
break;
|
|
45 |
|
|
46 |
case FULLSCREEN_TO_GRID :
|
69
|
47 |
mEffectFileList.append( QString( ":/data/fullscreentogrid.fxml" ) );
|
|
48 |
mItemType.append( QString( "HbGridView" ) );
|
|
49 |
mEventType.append(QString( "fstogrid" ) );
|
43
|
50 |
break;
|
|
51 |
|
69
|
52 |
case FULLSCREEN_TO_GRID_PORTRAIT :
|
|
53 |
mEffectFileList.append( QString( ":/data/fullscreentogridportrait.fxml" ) );
|
|
54 |
mItemType.append( QString( "HbGridView" ) );
|
|
55 |
mEventType.append( QString( "fstogridpt" ) );
|
|
56 |
break;
|
|
57 |
|
43
|
58 |
case GRID_TO_ALBUMLIST:
|
52
|
59 |
mEffectFileList.append( QString( "view_hide_normal" ) );
|
|
60 |
mItemType.append( QString( "HbView" ) );
|
69
|
61 |
mEventType.append( QString( "gridtolisthide" ) );
|
43
|
62 |
|
52
|
63 |
mEffectFileList.append( QString( "view_show_normal" ) );
|
|
64 |
mItemType.append( QString( "HbListView" ) );
|
69
|
65 |
mEventType.append( QString( "gridtolistshow" ) );
|
43
|
66 |
break;
|
|
67 |
|
|
68 |
case ALBUMLIST_TO_GRID:
|
52
|
69 |
mEffectFileList.append( QString( "view_hide_back" ) );
|
|
70 |
mItemType.append( QString( "HbListView" ) );
|
69
|
71 |
mEventType.append( QString( "listtogridhide" ) );
|
43
|
72 |
|
52
|
73 |
mEffectFileList.append( QString( "view_show_back" ) );
|
|
74 |
mItemType.append( QString( "HbView" ) );
|
69
|
75 |
mEventType.append( QString( "listtogridshow" ) );
|
43
|
76 |
break;
|
|
77 |
|
|
78 |
case FULLSCREEN_TO_DETAIL :
|
52
|
79 |
mEffectFileList.append( QString( "view_hide_normal_alt" ) );
|
|
80 |
mItemType.append( QString( "HbView" ) );
|
69
|
81 |
mEventType.append( QString( "fstodetailhide" ) );
|
43
|
82 |
|
52
|
83 |
mEffectFileList.append( QString( "view_show_normal_alt" ) );
|
|
84 |
mItemType.append( QString( "HbView" ) );
|
69
|
85 |
mEventType.append(QString( "fstodetailshow" ) );
|
43
|
86 |
mTransitionLater = true;
|
|
87 |
break;
|
|
88 |
|
|
89 |
case DETAIL_TO_FULLSCREEN :
|
52
|
90 |
mEffectFileList.append( "view_hide_back_alt" );
|
|
91 |
mItemType.append( QString( "HbView" ) );
|
69
|
92 |
mEventType.append( QString( "detailtofshide" ) );
|
43
|
93 |
|
52
|
94 |
mEffectFileList.append( "view_show_back_alt" );
|
|
95 |
mItemType.append( QString( "HbView" ) );
|
69
|
96 |
mEventType.append( QString( "detailtofsshow" ) );
|
43
|
97 |
mTransitionLater = true;
|
|
98 |
break;
|
|
99 |
|
|
100 |
default :
|
|
101 |
break;
|
|
102 |
}
|
|
103 |
}
|
|
104 |
|
|
105 |
GlxTransitionEffectSetting::~GlxTransitionEffectSetting()
|
|
106 |
{
|
69
|
107 |
qDebug( "GlxTransitionEffectSetting::~GlxTransitionEffectSetting() effect id %d ", mEffect );
|
43
|
108 |
mEffectFileList.clear();
|
|
109 |
mItemType.clear();
|
|
110 |
mEventType.clear();
|
|
111 |
}
|
|
112 |
|