screensaver/snsrplugins/snsrbigclockscreensaverplugin/snsrswipewidget/inc/snsrswipewidget.h
changeset 97 66b5fe3c07fd
child 98 e6f74eb7f69f
equal deleted inserted replaced
95:32e56106abf2 97:66b5fe3c07fd
       
     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:  Swipe widget.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef SNSRSWIPEWIDGET_H
       
    19 #define SNSRSWIPEWIDGET_H
       
    20 
       
    21 #include <QGesture>
       
    22 
       
    23 #include <hbwidget.h>
       
    24 #include <hblabel.h>
       
    25 #include <hbeffect.h>
       
    26 #include "snsrtest_global.h"
       
    27 
       
    28 SCREENSAVER_TEST_CLASS(T_SnsrSwipeWidget)
       
    29 
       
    30 class HbAction;
       
    31 class HbPushButton;
       
    32 class HbLabel;
       
    33 class HbIconItem;
       
    34 
       
    35 class SnsrSwipeWidget : public HbWidget
       
    36     {
       
    37     Q_OBJECT
       
    38 
       
    39 public:
       
    40     
       
    41     explicit SnsrSwipeWidget(QGraphicsItem *parent = 0);
       
    42     virtual ~SnsrSwipeWidget();
       
    43     
       
    44     void setCurrentOrientation(int orientation);
       
    45 
       
    46 private slots:
       
    47 
       
    48     void createPrimitives();
       
    49 
       
    50 protected: // from base classes
       
    51 
       
    52     virtual void gestureEvent(QGestureEvent *event);
       
    53 
       
    54 signals:
       
    55     void swipeDownDetected();
       
    56 
       
    57 private: // data
       
    58 
       
    59     HbLabel *mSlideLabel;
       
    60     HbIconItem* mIconItem;
       
    61     //for swipe direction we need to know if the device is in landscapemode
       
    62     int mCurrentOrientation;
       
    63 
       
    64     Q_DISABLE_COPY(SnsrSwipeWidget)
       
    65 
       
    66     SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrSwipeWidget)
       
    67     
       
    68 };
       
    69 
       
    70 #endif // SNSRSWIPEWIDGET_H
       
    71 
       
    72 // EOF