|
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: ESMR repeat until field implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CESMRREPEATUNTIL_H |
|
20 #define CESMRREPEATUNTIL_H |
|
21 |
|
22 #include "cesmrfield.h" |
|
23 |
|
24 class CMRLabel; |
|
25 class CEikDateEditor; |
|
26 class MESMRFieldValidator; |
|
27 class CAknsBasicBackgroundControlContext; |
|
28 |
|
29 |
|
30 NONSHARABLE_CLASS( CESMRRepeatUntilField ) : public CESMRField |
|
31 { |
|
32 public: |
|
33 /** |
|
34 * Creates new CESMRRepeatUntilField object. Ownership |
|
35 * is transferred to caller. |
|
36 * @return Pointer to created object, |
|
37 */ |
|
38 static CESMRRepeatUntilField* NewL( MESMRFieldValidator* aValidator ); |
|
39 |
|
40 /** |
|
41 * Destructor. |
|
42 */ |
|
43 ~CESMRRepeatUntilField(); |
|
44 |
|
45 public: // From CESMRField |
|
46 TBool OkToLoseFocusL( TESMREntryFieldId aNextItem ); |
|
47 void SetOutlineFocusL( TBool aFocus ); |
|
48 void SetValidatorL( MESMRFieldValidator* aValidator ); |
|
49 TBool ExecuteGenericCommandL( TInt aCommand ); |
|
50 |
|
51 public: // From CCoeControl |
|
52 TSize MinimumSize(); |
|
53 TInt CountComponentControls() const; |
|
54 CCoeControl* ComponentControl( TInt aInd ) const; |
|
55 void SizeChanged(); |
|
56 TKeyResponse OfferKeyEventL( |
|
57 const TKeyEvent& aEvent, |
|
58 TEventCode aType ); |
|
59 void CheckIfValidatingNeededL( |
|
60 TInt aStartFieldIndex ); |
|
61 void SetContainerWindowL( const CCoeControl& aContainer ); |
|
62 |
|
63 private: |
|
64 /** |
|
65 * Constructor. |
|
66 * @param aValidator validator object |
|
67 */ |
|
68 CESMRRepeatUntilField(MESMRFieldValidator* aValidator); |
|
69 |
|
70 /** |
|
71 * Second phase constructor. |
|
72 */ |
|
73 void ConstructL(); |
|
74 |
|
75 void DoEnvChangeL(); |
|
76 |
|
77 private: |
|
78 |
|
79 // Own. Repeat until field label. |
|
80 CMRLabel* iLabel; |
|
81 |
|
82 // Not owned. Repeat until field editor. |
|
83 CEikDateEditor* iDate; |
|
84 |
|
85 // Own. Background control context. |
|
86 CAknsBasicBackgroundControlContext* iBgCtrlContext; |
|
87 |
|
88 /// Ref: Pointer to container window |
|
89 const CCoeControl* iContainerWindow; |
|
90 }; |
|
91 |
|
92 #endif // CESMRREPEATUNTIL_H |