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: ?Description |
|
15 * |
|
16 */ |
|
17 #ifndef GLXZOOMSLIDER_H |
|
18 #define GLXZOOMSLIDER_H |
|
19 #include <QObject> |
|
20 #include <QSize> |
|
21 class HbSlider; |
|
22 class GlxMediaModel; |
|
23 class QAbstractItemModel; |
|
24 class QGraphicsItem; |
|
25 class GlxZoomSlider : public QObject |
|
26 { |
|
27 Q_OBJECT |
|
28 |
|
29 public: |
|
30 GlxZoomSlider (QGraphicsItem *parent = NULL); |
|
31 ~GlxZoomSlider (); |
|
32 void setModel (QAbstractItemModel *model); |
|
33 void indexChanged (int index); |
|
34 signals: |
|
35 void valueChanged(int newValue); |
|
36 void initialZoomFactor(int initZoomFactor); |
|
37 public slots: |
|
38 void toggleSliderVisibility(); |
|
39 void filterandEmitSliderValueChanges(int newValue); |
|
40 void sliderThumbPressed(); |
|
41 void sliderThumbReleased(); |
|
42 private: |
|
43 void retrieveActualAndDisplayedSize(QSize& itemsize, QSize& displayedSize); |
|
44 int calculateZoomFactor(QSize& itemsize, QSize& displayedSize); |
|
45 void calculateAndInitializeFSZoomFactor(); |
|
46 HbSlider* mZoomSlider; |
|
47 bool isSliderVisible; |
|
48 bool mSliderThumbPressed; |
|
49 GlxMediaModel *mModel; //not owned |
|
50 }; |
|
51 #endif //GLXZOOMSLIDER_H |
|