|
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: HgMediawall stub for testing mpcollectioncontainers |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef HGMEDIAWALL_H |
|
19 #define HGMEDIAWALL_H |
|
20 |
|
21 //includes |
|
22 #include <hbglobal.h> |
|
23 #include <hbnamespace.h> |
|
24 #include <hbwidget.h> |
|
25 |
|
26 class HgWidget : public HbWidget |
|
27 { |
|
28 Q_OBJECT |
|
29 |
|
30 public: |
|
31 |
|
32 enum ScrollBarPolicy { |
|
33 ScrollBarAsNeeded = Qt::ScrollBarAsNeeded, |
|
34 ScrollBarAlwaysOff = Qt::ScrollBarAlwaysOff, |
|
35 ScrollBarAlwaysOn = Qt::ScrollBarAlwaysOn, |
|
36 ScrollBarAutoHide |
|
37 }; |
|
38 |
|
39 explicit HgWidget ( QGraphicsItem *parent = 0 ); |
|
40 virtual ~HgWidget (); |
|
41 |
|
42 void setScrollBarPolicy( ScrollBarPolicy policy ); |
|
43 virtual void setModel(QAbstractItemModel *model); |
|
44 void scrollTo(const QModelIndex &index); |
|
45 QModelIndex currentIndex() const; |
|
46 QSizeF itemSize() const; |
|
47 void setDefaultImage(QImage defaultImage); |
|
48 |
|
49 signals: |
|
50 |
|
51 void scrollingEnded(); |
|
52 |
|
53 }; |
|
54 |
|
55 class HgMediawall : public HgWidget |
|
56 { |
|
57 Q_OBJECT |
|
58 |
|
59 public: |
|
60 |
|
61 enum LabelPosition { |
|
62 PositionNone = 0, |
|
63 PositionAboveImage, |
|
64 PositionBelowImage |
|
65 }; |
|
66 |
|
67 explicit HgMediawall( QGraphicsItem *parent = 0 ); |
|
68 virtual ~HgMediawall(); |
|
69 |
|
70 void setTitlePosition( LabelPosition position ); |
|
71 void setDescriptionPosition( LabelPosition position ); |
|
72 void setTitleFontSpec( const HbFontSpec &fontSpec ); |
|
73 void setDescriptionFontSpec( const HbFontSpec &fontSpec ); |
|
74 |
|
75 void enableReflections( bool enabled ); |
|
76 bool reflectionsEnabled() const; |
|
77 |
|
78 public: |
|
79 |
|
80 bool mReflectionEnabled; |
|
81 |
|
82 }; |
|
83 |
|
84 #endif // HGMEDIAWALL_H |