Increase heap size on Symbian.
[dorian] / widgets / flickable.h
1 /****************************************************************************\r
2 **\r
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).\r
4 ** All rights reserved.\r
5 ** Contact: Nokia Corporation (qt-info@nokia.com)\r
6 **\r
7 ** This file is part of the demonstration applications of the Qt Toolkit.\r
8 **\r
9 ** $QT_BEGIN_LICENSE:LGPL$\r
10 ** Commercial Usage\r
11 ** Licensees holding valid Qt Commercial licenses may use this file in\r
12 ** accordance with the Qt Commercial License Agreement provided with the\r
13 ** Software or, alternatively, in accordance with the terms contained in\r
14 ** a written agreement between you and Nokia.\r
15 **\r
16 ** GNU Lesser General Public License Usage\r
17 ** Alternatively, this file may be used under the terms of the GNU Lesser\r
18 ** General Public License version 2.1 as published by the Free Software\r
19 ** Foundation and appearing in the file LICENSE.LGPL included in the\r
20 ** packaging of this file.  Please review the following information to\r
21 ** ensure the GNU Lesser General Public License version 2.1 requirements\r
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\r
23 **\r
24 ** In addition, as a special exception, Nokia gives you certain additional\r
25 ** rights.  These rights are described in the Nokia Qt LGPL Exception\r
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\r
27 **\r
28 ** GNU General Public License Usage\r
29 ** Alternatively, this file may be used under the terms of the GNU\r
30 ** General Public License version 3.0 as published by the Free Software\r
31 ** Foundation and appearing in the file LICENSE.GPL included in the\r
32 ** packaging of this file.  Please review the following information to\r
33 ** ensure the GNU General Public License version 3.0 requirements will be\r
34 ** met: http://www.gnu.org/copyleft/gpl.html.\r
35 **\r
36 ** If you have questions regarding the use of this file, please contact\r
37 ** Nokia at qt-info@nokia.com.\r
38 ** $QT_END_LICENSE$\r
39 **\r
40 ****************************************************************************/\r
41 \r
42 #ifndef FLICKABLE_H\r
43 #define FLICKABLE_H\r
44 \r
45 class QMouseEvent;\r
46 class QPoint;\r
47 class QWidget;\r
48 \r
49 class FlickableTicker;\r
50 class FlickablePrivate;\r
51 \r
52 class Flickable\r
53 {\r
54 public:\r
55 \r
56     Flickable();\r
57     virtual ~Flickable();\r
58 \r
59     void setThreshold(int threshold);\r
60     int threshold() const;\r
61 \r
62     void setAcceptMouseClick(QWidget *target);\r
63 \r
64     void handleMousePress(QMouseEvent *event);\r
65     void handleMouseMove(QMouseEvent *event);\r
66     void handleMouseRelease(QMouseEvent *event);\r
67 \r
68 protected:\r
69     virtual QPoint scrollOffset() const = 0;\r
70     virtual void setScrollOffset(const QPoint &offset) = 0;\r
71 \r
72 private:\r
73     void tick();\r
74 \r
75 private:\r
76     FlickablePrivate *d;\r
77     friend class FlickableTicker;\r
78 };\r
79 \r
80 #endif // FLICKABLE_H\r