ginebra/animations/slideanimator.h
changeset 3 0954f5dd2cd0
parent 1 b0dd75e285d2
child 4 d5cdb6bc139d
equal deleted inserted replaced
1:b0dd75e285d2 3:0954f5dd2cd0
     1 /*
       
     2 * Copyright (c) 2010 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef _GINEBRA_SLIDE_ANIMATOR_H_
       
    19 #define _GINEBRA_SLIDE_ANIMATOR_H_
       
    20 
       
    21 #include <QObject>
       
    22 #include "../visibilityanimator.h"
       
    23 
       
    24 class ChromeSnippet;
       
    25 class QPainterPath;
       
    26 
       
    27 class SlideAnimator : public VisibilityAnimator
       
    28 {
       
    29    Q_OBJECT
       
    30  enum direction {
       
    31      slideUp,
       
    32      slideDown,
       
    33      slideLeft,
       
    34      slideRight
       
    35    };
       
    36  public:
       
    37   SlideAnimator(ChromeSnippet* snippet);
       
    38   virtual ~SlideAnimator();
       
    39  public slots:
       
    40   virtual void updateVisibility(qreal step);
       
    41  private:
       
    42   ChromeSnippet * m_snippet;
       
    43   direction m_direction;
       
    44   qreal m_visiblePosition;
       
    45   qreal m_invisiblePosition;
       
    46   qreal m_moveBy;
       
    47 };
       
    48 
       
    49 #endif