author | William Roberts <williamr@symbian.org> |
Thu, 22 Jul 2010 16:32:06 +0100 | |
branch | GCC_SURGE |
changeset 47 | 5b14749788d7 |
parent 27 | e4592d119491 |
parent 34 | 84197e66a4bd |
permissions | -rw-r--r-- |
31 | 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: |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#include "univieweraddresscontainer.h" |
|
19 |
||
20 |
// SYSTEM INCLUDES |
|
21 |
#include <QGraphicsLinearLayout> |
|
22 |
||
23 |
// USER INCLUDES |
|
24 |
#include "univieweraddresswidget.h" |
|
25 |
||
26 |
// LOCAL CONSTANTS |
|
27 |
#define LOC_FROM hbTrId("txt_messaging_formlabel_from") |
|
28 |
#define LOC_TO hbTrId("txt_messaging_viewer_formlabel_to") |
|
29 |
#define LOC_CC hbTrId("txt_messaging_viewer_formlabel_cc") |
|
30 |
#define LOC_BCC hbTrId("txt_messaging_viewer_formlabel_bcc") |
|
31 |
||
32 |
//--------------------------------------------------------------- |
|
33 |
// UniViewerAddressContainer::UniViewerAddressContainer |
|
34 |
// @see header file |
|
35 |
//--------------------------------------------------------------- |
|
36 |
UniViewerAddressContainer::UniViewerAddressContainer(QGraphicsItem* parent) : |
|
37 |
HbWidget(parent) |
|
38 |
{ |
|
39 |
mMainLayout = new QGraphicsLinearLayout(Qt::Vertical, this); |
|
40 |
mMainLayout->setContentsMargins(0, 0, 0, 0); |
|
41 |
mMainLayout->setSpacing(0); |
|
42 |
setLayout(mMainLayout); |
|
43 |
} |
|
44 |
||
45 |
//--------------------------------------------------------------- |
|
46 |
// UniViewerAddressContainer::~UniViewerAddressContainer |
|
47 |
// @see header file |
|
48 |
//--------------------------------------------------------------- |
|
49 |
UniViewerAddressContainer::~UniViewerAddressContainer() |
|
50 |
{ |
|
51 |
} |
|
52 |
||
53 |
//--------------------------------------------------------------- |
|
54 |
// UniViewerAddressContainer::setFromField |
|
55 |
// @see header file |
|
56 |
//--------------------------------------------------------------- |
|
57 |
void UniViewerAddressContainer::setFromField(const QString& fromRecipient, const QString& alias) |
|
58 |
{ |
|
59 |
UniViewerAddressWidget* fromWidget = new UniViewerAddressWidget(this); |
|
60 |
||
61 |
connect(fromWidget, SIGNAL(sendMessage(const QString&,const QString&)), this, |
|
62 |
SIGNAL(sendMessage(const QString&,const QString&))); |
|
63 |
||
64 |
mMainLayout->addItem(fromWidget); |
|
65 |
||
66 |
fromWidget->populate(LOC_FROM, fromRecipient, alias); |
|
67 |
} |
|
68 |
||
69 |
//--------------------------------------------------------------- |
|
70 |
// UniViewerAddressContainer::setToField |
|
71 |
// @see header file |
|
72 |
//--------------------------------------------------------------- |
|
73 |
void UniViewerAddressContainer::setToField(ConvergedMessageAddressList toRecipients) |
|
74 |
{ |
|
75 |
UniViewerAddressWidget* toWidget = new UniViewerAddressWidget(); |
|
76 |
||
77 |
connect(toWidget, SIGNAL(sendMessage(const QString&,const QString&)), this, |
|
78 |
SIGNAL(sendMessage(const QString&,const QString&))); |
|
79 |
||
80 |
mMainLayout->addItem(toWidget); |
|
81 |
||
82 |
toWidget->populate(LOC_TO, toRecipients); |
|
83 |
||
84 |
} |
|
85 |
||
86 |
//--------------------------------------------------------------- |
|
87 |
// UniViewerAddressContainer::setCcField |
|
88 |
// @see header file |
|
89 |
//--------------------------------------------------------------- |
|
90 |
void UniViewerAddressContainer::setCcField(ConvergedMessageAddressList ccRecipients) |
|
91 |
{ |
|
92 |
UniViewerAddressWidget* ccWidget = new UniViewerAddressWidget(); |
|
93 |
||
94 |
connect(ccWidget, SIGNAL(sendMessage(const QString&,const QString&)), this, |
|
95 |
SIGNAL(sendMessage(const QString&,const QString&))); |
|
96 |
||
97 |
mMainLayout->addItem(ccWidget); |
|
98 |
||
99 |
ccWidget->populate(LOC_CC, ccRecipients); |
|
100 |
} |
|
101 |
||
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
102 |
//--------------------------------------------------------------- |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
103 |
// UniViewerAddressContainer :: setBccField |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
104 |
// @see header file |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
105 |
//--------------------------------------------------------------- |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
106 |
void UniViewerAddressContainer::setBccField(ConvergedMessageAddressList bccRecipients) |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
107 |
{ |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
108 |
UniViewerAddressWidget* bccWidget = new UniViewerAddressWidget(); |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
109 |
|
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
110 |
connect(bccWidget, SIGNAL(sendMessage(const QString&,const QString&)), this, |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
111 |
SIGNAL(sendMessage(const QString&,const QString&))); |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
112 |
|
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
113 |
mMainLayout->addItem(bccWidget); |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
114 |
|
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
115 |
bccWidget->populate(LOC_BCC, bccRecipients); |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
116 |
} |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
117 |
|
31 | 118 |
// EOF |