ui/viewutilities/effectplugin/src/glxflipeffectplugin.cpp
changeset 36 6481344a6d67
child 45 863223ea6961
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 
       
    19 #include "glxflipeffectplugin.h"
       
    20 #include "glxuistd.h"
       
    21 
       
    22 GlxFlipEffectPlugin::GlxFlipEffectPlugin() : GlxEffectPluginBase( FLIP_EFFECT )
       
    23 {
       
    24     mEffectFileList.append(QString(":/data/view_flip_hide.fxml"));
       
    25     mEffectFileList.append(QString(":/data/view_flip_show.fxml"));
       
    26 }
       
    27 
       
    28 void GlxFlipEffectPlugin::setUpItems( QList< QGraphicsItem * > &  items )
       
    29 {
       
    30     if ( items.count() < 2 ) 
       
    31         return;
       
    32     
       
    33     mItem = items.at(1);
       
    34     mItem->hide();
       
    35     mItem->setPos(0,0);
       
    36     items.at(0)->setPos(0,0);
       
    37 }
       
    38 
       
    39 bool GlxFlipEffectPlugin::isAnimationLater(int index) 
       
    40 {
       
    41     if ( index == 1) {
       
    42         return true;
       
    43     }
       
    44     return false;
       
    45 }
       
    46 
       
    47 QGraphicsItem * GlxFlipEffectPlugin::animationItem() 
       
    48 { 
       
    49     mItem->show();
       
    50     return mItem ; 
       
    51 }
       
    52 
       
    53 GlxFlipEffectPlugin::~GlxFlipEffectPlugin()
       
    54 {
       
    55     mEffectFileList.clear();
       
    56 }
       
    57 
       
    58