|
1 /* |
|
2 * Copyright (c) 2008-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: HgWidget private class definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef HGWIDGETITEM_H |
|
20 #define HGWIDGETITEM_H |
|
21 |
|
22 #include <QString> |
|
23 #include <QPixmap> |
|
24 #include <QModelIndex> |
|
25 #include <qobject> |
|
26 #include <hgvgimage.h> |
|
27 |
|
28 class HgQuadRenderer; |
|
29 class HgImage; |
|
30 |
|
31 class HgWidgetItem |
|
32 { |
|
33 public: |
|
34 |
|
35 HgWidgetItem(HgQuadRenderer* renderer); |
|
36 HgWidgetItem( HgQuadRenderer* renderer, QImage image, QString title, QString description ); |
|
37 virtual ~HgWidgetItem(); |
|
38 |
|
39 void setImage( QImage image ); |
|
40 |
|
41 void setTitle( QString title ); |
|
42 QString title() const; |
|
43 |
|
44 const HgImage* image() const; |
|
45 |
|
46 void setDescription( QString description ); |
|
47 QString description() const; |
|
48 |
|
49 void setModelIndex( const QModelIndex& index); |
|
50 QModelIndex modelIndex() const; |
|
51 |
|
52 bool validData() const; |
|
53 bool updateItemData(); |
|
54 void releaseItemData(); |
|
55 |
|
56 bool visibility() const; |
|
57 void setVisibility(bool visible); |
|
58 |
|
59 private: |
|
60 |
|
61 QString mTitle; |
|
62 QString mDescription; |
|
63 QModelIndex mModelIndex; |
|
64 bool mValidData; |
|
65 HgImage* mHgImage; |
|
66 HgQuadRenderer* mRenderer; |
|
67 bool mVisibility; |
|
68 |
|
69 Q_DISABLE_COPY(HgWidgetItem) |
|
70 }; |
|
71 |
|
72 #endif //HGWIDGETITEM_H |
|
73 |