|
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: This widget holds the message header. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef UNIVIEWER_HEADER_CONTAINER_H |
|
19 #define UNIVIEWER_HEADER_CONTAINER_H |
|
20 |
|
21 #include <HbWidget> |
|
22 |
|
23 #include <convergedmessageaddress.h> |
|
24 |
|
25 class QGraphicsLinearLayout; |
|
26 class UniViewerDetailsWidget; |
|
27 class HbGroupBox; |
|
28 class HbFrameItem; |
|
29 class UniViewerAddressContainer; |
|
30 class UniViewerFeeder; |
|
31 class UniViewerAttachmentWidget; |
|
32 |
|
33 class UniViewerHeaderContainer: public HbWidget |
|
34 { |
|
35 Q_OBJECT |
|
36 |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Constructor |
|
41 */ |
|
42 explicit UniViewerHeaderContainer(UniViewerFeeder* feeder, QGraphicsItem *parent = 0); |
|
43 |
|
44 /** |
|
45 * Destructor |
|
46 */ |
|
47 ~UniViewerHeaderContainer(); |
|
48 |
|
49 /** |
|
50 * Populates the content on the widget |
|
51 */ |
|
52 void populateContent(); |
|
53 |
|
54 /** |
|
55 * Clears the content on the widget |
|
56 */ |
|
57 void clearContent(); |
|
58 |
|
59 private: |
|
60 |
|
61 /** |
|
62 * Populates the subject field in Details widget. |
|
63 */ |
|
64 void populateSubject(); |
|
65 |
|
66 /** |
|
67 * Populates the attachment list in Attachment container. |
|
68 */ |
|
69 void populateAttachments(); |
|
70 |
|
71 /** |
|
72 * Populates the from, to & cc fields. |
|
73 */ |
|
74 void populateAddressContainer(); |
|
75 |
|
76 /** |
|
77 * Sets the heading text of the address group box. |
|
78 */ |
|
79 void setAddrGroupBoxHeading(); |
|
80 |
|
81 /** |
|
82 * Creates a comma seperated address list using converged message address list. |
|
83 * @param addressList Converged message address list. |
|
84 * @return Comma separated address list. |
|
85 */ |
|
86 QString createAddressList(const ConvergedMessageAddressList &addressList); |
|
87 |
|
88 private slots: |
|
89 |
|
90 /** |
|
91 * Slot to know address box state. |
|
92 */ |
|
93 void addressBoxToggled(bool state); |
|
94 |
|
95 signals: |
|
96 /** |
|
97 * this signal is emitted when send message is triggered form UniViewerAddressWidget |
|
98 */ |
|
99 void sendMessage(const QString& phoneNumber,const QString& alias); |
|
100 |
|
101 private: |
|
102 |
|
103 /** |
|
104 * Main layout. |
|
105 */ |
|
106 QGraphicsLinearLayout *mMainLayout; |
|
107 |
|
108 /** |
|
109 * UniViewerFeeder object |
|
110 * Not Owned |
|
111 */ |
|
112 UniViewerFeeder* mViewFeeder; |
|
113 |
|
114 /** |
|
115 * UniViewerDetailsWidget object |
|
116 * Owned |
|
117 */ |
|
118 UniViewerDetailsWidget *mViewerDetails; |
|
119 |
|
120 /** |
|
121 * HbGroupBox object |
|
122 * owned. |
|
123 */ |
|
124 HbGroupBox *mHeaderGroupBox; |
|
125 |
|
126 /** |
|
127 * Separator line |
|
128 * Owned. |
|
129 */ |
|
130 HbFrameItem *mSeparator; |
|
131 |
|
132 /** |
|
133 * UniViewerAddressContainer object |
|
134 * owned. |
|
135 */ |
|
136 UniViewerAddressContainer *mAddressContainer; |
|
137 |
|
138 /** |
|
139 * List of attachment widgets. |
|
140 */ |
|
141 QList<UniViewerAttachmentWidget *> mUniViewerAttachmentstList; |
|
142 }; |
|
143 |
|
144 #endif /* UNIVIEWER_HEADER_CONTAINER_H */ |
|
145 |
|
146 // EOF |