ginebra/flickcharm.h
changeset 0 1450b09d0cfd
equal deleted inserted replaced
-1:000000000000 0:1450b09d0cfd
       
     1 /*
       
     2 * Copyright (c) 2008 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 
       
    19 #ifndef FLICKCHARM_H
       
    20 #define FLICKCHARM_H
       
    21 
       
    22 #include <QObject>
       
    23 
       
    24 class FlickCharmPrivate;
       
    25 class QWidget;
       
    26 
       
    27 // Makes any QAbstractScrollArea or QWebView "flickable" with the mouse.  Just call
       
    28 // activateOn().
       
    29 class FlickCharm: public QObject
       
    30 {
       
    31     Q_OBJECT
       
    32 public:
       
    33     FlickCharm(QObject *parent = 0);
       
    34     ~FlickCharm();
       
    35     void activateOn(QWidget *widget);
       
    36     void deactivateFrom(QWidget *widget);
       
    37     bool eventFilter(QObject *object, QEvent *event);
       
    38 
       
    39 protected:
       
    40     void timerEvent(QTimerEvent *event);
       
    41 
       
    42 private:
       
    43     FlickCharmPrivate *d;
       
    44 };
       
    45 
       
    46 #endif // FLICKCHARM_H