|
1 /* |
|
2 * Copyright (c) 2004 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 |
|
19 // INCLUDES |
|
20 #include "createReferDialog.h" |
|
21 #include "mcetestuiengineconstants.h" |
|
22 #include "cmcetestuiengineoutrefer.h" |
|
23 #include "cmcetestuiengineoutevent.h" |
|
24 |
|
25 // CONSTANTS |
|
26 const TInt KBufLength = 100; |
|
27 |
|
28 // ============================ MEMBER FUNCTIONS ============================== |
|
29 |
|
30 // ---------------------------------------------------------------------------- |
|
31 // CCreateReferDialog::CCreateReferDialog( CRtpEngine::TSessionType* ) |
|
32 // . |
|
33 // ---------------------------------------------------------------------------- |
|
34 // |
|
35 CCreateReferDialog::CCreateReferDialog( TReferParams* aParams ) : |
|
36 iParams( aParams ) |
|
37 { |
|
38 // No implementation required |
|
39 } |
|
40 |
|
41 // ---------------------------------------------------------------------------- |
|
42 // CCreateReferDialog::PreLayoutDynInitL() |
|
43 // . |
|
44 // ---------------------------------------------------------------------------- |
|
45 // |
|
46 void CCreateReferDialog::PreLayoutDynInitL() |
|
47 { |
|
48 CAknForm::PreLayoutDynInitL(); |
|
49 CEikEdwin* edwinRecipentAddress = static_cast<CEikEdwin*>( |
|
50 Control( EReferRecipentAddress ) ); |
|
51 |
|
52 TBuf<KBufLength> defaultAddress; |
|
53 defaultAddress.Copy(iParams->iRecipentAddress); |
|
54 edwinRecipentAddress->SetTextL(&defaultAddress); |
|
55 edwinRecipentAddress->SetCursorPosL(defaultAddress.Length(),EFalse); |
|
56 |
|
57 |
|
58 CEikEdwin* edwinReferTo = static_cast<CEikEdwin*>( |
|
59 Control( EReferTo ) ); |
|
60 defaultAddress.Copy(iParams->iReferTo); |
|
61 edwinReferTo->SetTextL(&defaultAddress); |
|
62 edwinReferTo->SetCursorPosL(defaultAddress.Length(),EFalse); |
|
63 |
|
64 iParams->originator.Copy(KNone); |
|
65 CEikEdwin* OriginaterAddress = static_cast<CEikEdwin*>( |
|
66 Control( EReferOriginaterAddress ) ); |
|
67 defaultAddress.Copy(iParams->originator); |
|
68 OriginaterAddress->SetTextL(&defaultAddress); |
|
69 OriginaterAddress->SetCursorPosL(defaultAddress.Length(),EFalse); |
|
70 } |
|
71 |
|
72 // ---------------------------------------------------------------------------- |
|
73 // CCreateReferDialog::OkToExitL( TInt ) |
|
74 // . |
|
75 // ---------------------------------------------------------------------------- |
|
76 // |
|
77 |
|
78 TBool CCreateReferDialog::OkToExitL( TInt aKey ) |
|
79 { |
|
80 if ( aKey == EEikCmdCanceled ) |
|
81 { |
|
82 // Cancel pressed. Just exit. |
|
83 return ETrue; |
|
84 } |
|
85 CEikEdwin* edwinRecipentAddress = static_cast<CEikEdwin*>( |
|
86 Control( EReferRecipentAddress ) ); |
|
87 TBuf<KBufLength> buffer; |
|
88 edwinRecipentAddress->GetText(buffer); |
|
89 iParams->iRecipentAddress = buffer; |
|
90 |
|
91 CEikEdwin* edwinReferTo = static_cast<CEikEdwin*>( |
|
92 Control( EReferTo ) ); |
|
93 edwinReferTo->GetText(buffer); |
|
94 iParams->iReferTo = buffer; |
|
95 |
|
96 CEikEdwin* OriginaterAddress = static_cast<CEikEdwin*>( |
|
97 Control( EReferOriginaterAddress ) ); |
|
98 OriginaterAddress->GetText(buffer); |
|
99 iParams->originator = buffer; |
|
100 |
|
101 return ETrue; |
|
102 } |
|
103 |
|
104 // ---------------------------------------------------------------------------- |
|
105 // CCreateReferDialog::~CCreateReferDialog() |
|
106 // . |
|
107 // ---------------------------------------------------------------------------- |
|
108 // |
|
109 CCreateReferDialog::~CCreateReferDialog() |
|
110 { |
|
111 return; |
|
112 } |
|
113 |
|
114 // ============================ MEMBER FUNCTIONS ============================== |
|
115 |
|
116 // ---------------------------------------------------------------------------- |
|
117 // CCreateReferToDialog::CCreateReferToDialog( CRtpEngine::TSessionType* ) |
|
118 // . |
|
119 // ---------------------------------------------------------------------------- |
|
120 // |
|
121 CCreateReferToDialog::CCreateReferToDialog( TReferParams* aParams ) : |
|
122 iParams( aParams ) |
|
123 { |
|
124 // No implementation required |
|
125 } |
|
126 |
|
127 // ---------------------------------------------------------------------------- |
|
128 // CCreateReferToDialog::PreLayoutDynInitL() |
|
129 // . |
|
130 // ---------------------------------------------------------------------------- |
|
131 // |
|
132 void CCreateReferToDialog::PreLayoutDynInitL() |
|
133 { |
|
134 CAknForm::PreLayoutDynInitL(); |
|
135 TBuf<KBufLength> defaultAddress; |
|
136 CEikEdwin* edwinReferTo = static_cast<CEikEdwin*>( |
|
137 Control( ESendReferTo ) ); |
|
138 defaultAddress.Copy(iParams->iReferTo); |
|
139 edwinReferTo->SetTextL(&defaultAddress); |
|
140 edwinReferTo->SetCursorPosL(defaultAddress.Length(),EFalse); |
|
141 } |
|
142 |
|
143 // ---------------------------------------------------------------------------- |
|
144 // CCreateReferToDialog::OkToExitL( TInt ) |
|
145 // . |
|
146 // ---------------------------------------------------------------------------- |
|
147 // |
|
148 |
|
149 TBool CCreateReferToDialog::OkToExitL( TInt aKey ) |
|
150 { |
|
151 if ( aKey == EEikCmdCanceled ) |
|
152 { |
|
153 // Cancel pressed. Just exit. |
|
154 return ETrue; |
|
155 } |
|
156 |
|
157 TBuf<KBufLength> buffer; |
|
158 CEikEdwin* edwinReferTo = static_cast<CEikEdwin*>( |
|
159 Control( ESendReferTo ) ); |
|
160 edwinReferTo->GetText(buffer); |
|
161 iParams->iReferTo = buffer; |
|
162 |
|
163 return ETrue; |
|
164 } |
|
165 |
|
166 // ---------------------------------------------------------------------------- |
|
167 // CCreateReferToDialog::~CCreateReferToDialog() |
|
168 // . |
|
169 // ---------------------------------------------------------------------------- |
|
170 // |
|
171 CCreateReferToDialog::~CCreateReferToDialog() |
|
172 { |
|
173 return; |
|
174 } |
|
175 |
|
176 // End of File |