|
1 /* |
|
2 * Copyright (c) 2007 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 Recurence field for CESMRListComponent |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CESMRRECURENCEFIELD_H |
|
20 #define CESMRRECURENCEFIELD_H |
|
21 |
|
22 #include "cesmriconfield.h" |
|
23 |
|
24 class CEikLabel; |
|
25 class CESMRRecurrence; |
|
26 class MESMRFieldValidator; |
|
27 |
|
28 NONSHARABLE_CLASS( CESMRRecurenceField ): public CESMRIconField |
|
29 { |
|
30 public: |
|
31 /** |
|
32 * Creates new CESMRRecurenceField object. Ownership |
|
33 * is transferred to caller. |
|
34 * @return Pointer to created object, |
|
35 */ |
|
36 static CESMRRecurenceField* NewL( MESMRFieldValidator* aValidator ); |
|
37 |
|
38 /** |
|
39 * Destructor. |
|
40 */ |
|
41 ~CESMRRecurenceField(); |
|
42 |
|
43 public: // From CESMRField |
|
44 void InitializeL(); |
|
45 void InternalizeL( MESMRCalEntry& aEntry ); |
|
46 void SetOutlineFocusL( TBool aFocus ); |
|
47 void ExecuteGenericCommandL( TInt aCommand ); |
|
48 |
|
49 public: // From CCoeControl |
|
50 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); |
|
51 |
|
52 private: // implementation |
|
53 /** |
|
54 * Constructor. |
|
55 * |
|
56 * @param aValidator validator object |
|
57 */ |
|
58 CESMRRecurenceField( MESMRFieldValidator* aValidator ); |
|
59 |
|
60 /** |
|
61 * Second phase constructor. |
|
62 */ |
|
63 void ConstructL(); |
|
64 |
|
65 /** |
|
66 * Selects new recurrence value. |
|
67 * |
|
68 * @param aIndex index of new recurrence |
|
69 */ |
|
70 void SetRecurrenceL( TInt aIndex ); |
|
71 |
|
72 /** |
|
73 * Shows query dialog for selecting |
|
74 * priority |
|
75 * |
|
76 */ |
|
77 void ExecuteRecurrenceQueryL(); |
|
78 |
|
79 private: // data |
|
80 /** |
|
81 * Not owned. Label for current recurrence. |
|
82 */ |
|
83 CEikLabel* iRecurence; |
|
84 |
|
85 /** |
|
86 * Own. Array of recurrence objects. |
|
87 */ |
|
88 RPointerArray< CESMRRecurrence > iArray; |
|
89 |
|
90 /** |
|
91 * Not owned. Helper class for sanity and time checks. |
|
92 */ |
|
93 MESMRFieldValidator* iValidator; |
|
94 |
|
95 /** |
|
96 * Index for selected recurrence (index to iArray) |
|
97 */ |
|
98 TInt iIndex; |
|
99 }; |
|
100 |
|
101 #endif // CESMRRECURENCEFIELD_H |
|
102 |