|
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 // INCLUDES |
|
19 #include "createEventDialog.h" |
|
20 |
|
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 // CCreateEventDialog::CCreateEventDialog( CRtpEngine::TSessionType* ) |
|
32 // . |
|
33 // ---------------------------------------------------------------------------- |
|
34 // |
|
35 CCreateEventDialog::CCreateEventDialog( TEventParams* aParams ) : |
|
36 iParams( aParams ) |
|
37 { |
|
38 // No implementation required |
|
39 } |
|
40 |
|
41 // ---------------------------------------------------------------------------- |
|
42 // CCreateEventDialog::PreLayoutDynInitL() |
|
43 // . |
|
44 // ---------------------------------------------------------------------------- |
|
45 // |
|
46 void CCreateEventDialog::PreLayoutDynInitL() |
|
47 { |
|
48 |
|
49 CEikEdwin* edwinRecipentAddress = static_cast<CEikEdwin*>( |
|
50 Control( EEventRecipentAddress ) ); |
|
51 |
|
52 TBuf<KBufLength> defaultAddress; |
|
53 defaultAddress.Copy(iParams->iRecipentAddress); |
|
54 edwinRecipentAddress->SetTextL(&defaultAddress); |
|
55 edwinRecipentAddress->SetCursorPosL(defaultAddress.Length(),EFalse); |
|
56 |
|
57 iParams->iEventHeader.Copy(KEventHeader); |
|
58 CEikEdwin* edwinEventHeader = static_cast<CEikEdwin*>( |
|
59 Control( EEventHeader ) ); |
|
60 defaultAddress.Copy(iParams->iEventHeader); |
|
61 edwinEventHeader->SetTextL(&defaultAddress); |
|
62 edwinEventHeader->SetCursorPosL(defaultAddress.Length(),EFalse); |
|
63 |
|
64 iParams->originator.Copy(KNone); |
|
65 CEikEdwin* OriginaterAddress = static_cast<CEikEdwin*>( |
|
66 Control( EEventOriginaterAddress ) ); |
|
67 defaultAddress.Copy(iParams->originator); |
|
68 OriginaterAddress->SetTextL(&defaultAddress); |
|
69 OriginaterAddress->SetCursorPosL(defaultAddress.Length(),EFalse); |
|
70 |
|
71 CEikNumberEditor* refreshInterval = static_cast<CEikNumberEditor*>( |
|
72 Control( EEventRefreshInterval ) ); |
|
73 refreshInterval->SetNumber(3600); |
|
74 CAknForm::PreLayoutDynInitL(); |
|
75 } |
|
76 |
|
77 // ---------------------------------------------------------------------------- |
|
78 // CCreateEventDialog::OkToExitL( TInt ) |
|
79 // . |
|
80 // ---------------------------------------------------------------------------- |
|
81 // |
|
82 |
|
83 TBool CCreateEventDialog::OkToExitL( TInt aKey ) |
|
84 { |
|
85 if ( aKey == EEikCmdCanceled ) |
|
86 { |
|
87 // Cancel pressed. Just exit. |
|
88 return ETrue; |
|
89 } |
|
90 CEikEdwin* edwinRecipentAddress = static_cast<CEikEdwin*>( |
|
91 Control( EEventRecipentAddress ) ); |
|
92 TBuf<KBufLength> buffer; |
|
93 edwinRecipentAddress->GetText(buffer); |
|
94 iParams->iRecipentAddress = buffer; |
|
95 |
|
96 CEikEdwin* edwinEventHeader = static_cast<CEikEdwin*>( |
|
97 Control( EEventHeader ) ); |
|
98 edwinEventHeader->GetText(buffer); |
|
99 iParams->iEventHeader = buffer; |
|
100 |
|
101 CEikEdwin* OriginaterAddress = static_cast<CEikEdwin*>( |
|
102 Control( EEventOriginaterAddress ) ); |
|
103 OriginaterAddress->GetText(buffer); |
|
104 iParams->originator = buffer; |
|
105 |
|
106 |
|
107 CEikNumberEditor* refreshInterval = static_cast<CEikNumberEditor*>( |
|
108 Control( EEventRefreshInterval ) ); |
|
109 iParams->refreshInterval = refreshInterval->Number(); |
|
110 return ETrue; |
|
111 } |
|
112 |
|
113 // ---------------------------------------------------------------------------- |
|
114 // CCreateEventDialog::~CCreateEventDialog() |
|
115 // . |
|
116 // ---------------------------------------------------------------------------- |
|
117 // |
|
118 CCreateEventDialog::~CCreateEventDialog() |
|
119 { |
|
120 return; |
|
121 } |
|
122 |
|
123 // End of File |