|
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 |
|
18 #ifndef GLXDETAILSVIEWITEMPROTOTYPE_H |
|
19 #define GLXDETAILSVIEWITEMPROTOTYPE_H |
|
20 |
|
21 //Includes |
|
22 #include <hblistviewitem.h> |
|
23 |
|
24 //Orbit/Qt forward declartion |
|
25 class HbLabel; |
|
26 |
|
27 //User Defined forward declartion |
|
28 class GlxDetailsTextEdit; |
|
29 |
|
30 /** |
|
31 * Class Description |
|
32 * This is Custom widget class to create custom widgets in the list widget of the details view |
|
33 */ |
|
34 class GlxDetailsViewItemProtoType : public HbListViewItem |
|
35 { |
|
36 Q_OBJECT |
|
37 |
|
38 public: |
|
39 /* |
|
40 * The Enum here corresponds to the the custom widget's indexes occuring in the List Widget |
|
41 */ |
|
42 enum WidgetIndex |
|
43 { |
|
44 widgetNameIndex = 0, |
|
45 widgetDateIndex, |
|
46 widgetTimeIndex, |
|
47 widgetSizeIndex, |
|
48 widgetDescriptionIndex |
|
49 }; |
|
50 |
|
51 /* |
|
52 * Constructor |
|
53 * @param - parent of this widget |
|
54 */ |
|
55 GlxDetailsViewItemProtoType(QGraphicsItem* parent = 0); |
|
56 |
|
57 /* |
|
58 * Destructor |
|
59 */ |
|
60 virtual ~GlxDetailsViewItemProtoType(); |
|
61 |
|
62 /** |
|
63 * createItem() |
|
64 * From HbAbstractViewItem |
|
65 * Creates a new item. |
|
66 */ |
|
67 HbAbstractViewItem* createItem(); |
|
68 |
|
69 /** |
|
70 * updateChildItems() |
|
71 * From HbAbstractViewItem |
|
72 * Creates the custom widget corresponding to the widget index retrived through the model |
|
73 */ |
|
74 void updateChildItems(); |
|
75 |
|
76 private slots: |
|
77 |
|
78 /** |
|
79 * forwardSignalsToView() |
|
80 * This slot is called when the rename or description has to be changed |
|
81 */ |
|
82 void forwardSignalsToView(); |
|
83 |
|
84 /** |
|
85 * updateWidgetValues() |
|
86 * This slot is called when there is a change in the model data |
|
87 */ |
|
88 void updateWidgetValues(); |
|
89 |
|
90 signals: |
|
91 |
|
92 /** |
|
93 * signalFromCustomWidget : This signal is emitted to the details view, to update or launch dialogs |
|
94 * like description field editing or renaming of the image file name |
|
95 * @param - row , specifies the widget index in the list widget |
|
96 */ |
|
97 void signalFromCustomWidget(int row); |
|
98 |
|
99 private: |
|
100 //Image Name Editor:To display the Image Name |
|
101 GlxDetailsTextEdit *mImageNameEditor; |
|
102 |
|
103 //Description Editor:To display the Description/comments of the image |
|
104 GlxDetailsTextEdit *mDescriptionEditor; |
|
105 |
|
106 //Displays the Date of the image |
|
107 HbLabel *mDateLabel; |
|
108 |
|
109 //Displays the time of the image |
|
110 HbLabel *mTimeLabel; |
|
111 |
|
112 //Displays the size of the image |
|
113 HbLabel *mSizeLabel; |
|
114 }; |
|
115 |
|
116 #endif // GLXDETAILSVIEWITEMPROTOTYPE_H |