|
1 /**************************************************************************** |
|
2 ** |
|
3 ** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
|
4 ** All rights reserved. |
|
5 ** Contact: Nokia Corporation (developer.feedback@nokia.com) |
|
6 ** |
|
7 ** This file is part of the HbWidgets module of the UI Extensions for Mobile. |
|
8 ** |
|
9 ** GNU Lesser General Public License Usage |
|
10 ** This file may be used under the terms of the GNU Lesser General Public |
|
11 ** License version 2.1 as published by the Free Software Foundation and |
|
12 ** appearing in the file LICENSE.LGPL included in the packaging of this file. |
|
13 ** Please review the following information to ensure the GNU Lesser General |
|
14 ** Public License version 2.1 requirements will be met: |
|
15 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
16 ** |
|
17 ** In addition, as a special exception, Nokia gives you certain additional |
|
18 ** rights. These rights are described in the Nokia Qt LGPL Exception |
|
19 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
20 ** |
|
21 ** If you have questions regarding the use of this file, please contact |
|
22 ** Nokia at developer.feedback@nokia.com. |
|
23 ** |
|
24 ****************************************************************************/ |
|
25 |
|
26 #ifndef HBSLIDER_P_H |
|
27 #define HBSLIDER_P_H |
|
28 |
|
29 |
|
30 #include "hbwidget_p.h" |
|
31 #include <QHash> |
|
32 |
|
33 class HbSliderControl; |
|
34 class QGraphicsItem; |
|
35 |
|
36 struct ItemPrimitive |
|
37 { |
|
38 QGraphicsItem* item; |
|
39 QGraphicsItem *touchItem; |
|
40 HbStyle::Primitive type; |
|
41 }; |
|
42 |
|
43 class HbSliderPrivate : public HbWidgetPrivate |
|
44 { |
|
45 Q_DECLARE_PUBLIC(HbSlider) |
|
46 |
|
47 public: |
|
48 HbSliderPrivate(); |
|
49 virtual ~HbSliderPrivate(); |
|
50 void init(); |
|
51 void setElements( QList<HbSlider::SliderElement> elementList); |
|
52 void elementWidget(HbSlider::SliderElement element); |
|
53 void updateElements(); |
|
54 void startIncrementing(); |
|
55 void startDecrementing(); |
|
56 void stopRepeatAction(); |
|
57 void setTickLabelPresentProperty(); |
|
58 |
|
59 #ifdef HB_EFFECTS |
|
60 void _q_startIconPressedEffect(); |
|
61 void _q_startIconReleasedEffect(); |
|
62 void _q_startTextClickEffect(); |
|
63 #endif |
|
64 |
|
65 //Data member |
|
66 |
|
67 HbSliderControl *sliderControl; |
|
68 Qt::Orientation orientation; |
|
69 QList<HbSlider::SliderElement> elements; |
|
70 QString sliderTextString; |
|
71 QHash<HbSlider::SliderElement,HbIcon> icons; |
|
72 QString thumbPath; |
|
73 bool pressOnIncrement; |
|
74 QMap<HbSlider::SliderElement , ItemPrimitive> elementItemMap; |
|
75 |
|
76 }; |
|
77 |
|
78 #endif // HBSLIDER_P_H |