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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef HGGRID_H |
|
19 #define HGGRID_H |
|
20 |
|
21 #include <hgwidgets/hgwidgets.h> |
|
22 |
|
23 class HgGridPrivate; |
|
24 |
|
25 class HG_WIDGETS_EXPORT HgGrid : public HgWidget |
|
26 { |
|
27 Q_OBJECT |
|
28 Q_PROPERTY(bool effect3dEnabled READ effect3dEnabled WRITE setEffect3dEnabled ) |
|
29 Q_PROPERTY(bool pinchEnabled READ pinchEnabled WRITE setPinchEnabled ) |
|
30 Q_PROPERTY(int rowCount READ rowCount WRITE setRowCount ) |
|
31 public: |
|
32 |
|
33 explicit HgGrid(Qt::Orientation scrollDirection, QGraphicsItem *parent = 0 ); |
|
34 virtual ~HgGrid(); |
|
35 |
|
36 bool effect3dEnabled() const; |
|
37 void setEffect3dEnabled(bool effect3dEnabled); |
|
38 |
|
39 bool pinchEnabled() const; |
|
40 void setPinchEnabled(bool pinchEnabled); |
|
41 |
|
42 void setPinchLevels(QPair<int,int> levels, Qt::Orientation scrollDirection); |
|
43 QPair<int,int> pinchLevels(Qt::Orientation scrollDirection) const; |
|
44 |
|
45 void setRowCount(int count, Qt::Orientation scrollDirection = Qt::Horizontal); |
|
46 int rowCount(Qt::Orientation scrollDirection = Qt::Horizontal) const; |
|
47 |
|
48 signals: |
|
49 |
|
50 void emptySpacePressed(); |
|
51 |
|
52 protected: |
|
53 HgGrid(Qt::Orientation scrollDirection, HgGridPrivate &dd, QGraphicsItem *parent); |
|
54 |
|
55 private: |
|
56 Q_DECLARE_PRIVATE_D(p_ptr, HgGrid) |
|
57 Q_DISABLE_COPY(HgGrid) |
|
58 }; |
|
59 |
|
60 #endif //HGGRID_H |
|
61 |
|