|
1 /* |
|
2 * Copyright (c) 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 synchronization field impl. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CESMRSYNCFIELD_H |
|
20 #define CESMRSYNCFIELD_H |
|
21 |
|
22 #include "cesmriconfield.h" |
|
23 |
|
24 class CEikLabel; |
|
25 class CESMRSync; |
|
26 |
|
27 /** |
|
28 * This class is a custom field control that shows the sync status of calendar events |
|
29 */ |
|
30 NONSHARABLE_CLASS( CESMRSyncField ) : public CESMRIconField |
|
31 { |
|
32 public: |
|
33 /** |
|
34 * Creates new CESMRSyncField object. Ownership |
|
35 * is transferred to caller. |
|
36 * @return Pointer to created object, |
|
37 */ |
|
38 static CESMRSyncField* NewL(); |
|
39 |
|
40 /** |
|
41 * Destructor. |
|
42 */ |
|
43 ~CESMRSyncField(); |
|
44 |
|
45 public: // From CESMRField |
|
46 void InitializeL(); |
|
47 void InternalizeL( MESMRCalEntry& aEntry ); |
|
48 void ExternalizeL( MESMRCalEntry& aEntry ); |
|
49 void SetOutlineFocusL( TBool aFocus ); |
|
50 void ExecuteGenericCommandL( TInt aCommand ); |
|
51 |
|
52 public: // From CCoeControl |
|
53 TKeyResponse OfferKeyEventL( const TKeyEvent& aEvent, TEventCode aType ); |
|
54 |
|
55 private: |
|
56 /** |
|
57 * Constructor. |
|
58 */ |
|
59 CESMRSyncField(); |
|
60 |
|
61 /** |
|
62 * Second phase constructor. |
|
63 */ |
|
64 void ConstructL(); |
|
65 |
|
66 /** |
|
67 * Updates synchronization text to aIndex. |
|
68 * |
|
69 * @param aIndex new synchronization value index |
|
70 */ |
|
71 void UpdateLabelL( TInt aIndex ); |
|
72 |
|
73 /** |
|
74 * Shows query dialog for selecting |
|
75 * priority |
|
76 * |
|
77 */ |
|
78 void ExecuteSyncQueryL(); |
|
79 |
|
80 private: |
|
81 /** |
|
82 * Not owned. Synchronization label. |
|
83 */ |
|
84 CEikLabel* iSync; |
|
85 |
|
86 /** |
|
87 * Own. Array of synchronization objects. |
|
88 */ |
|
89 RPointerArray< CESMRSync > iArray; |
|
90 |
|
91 /** |
|
92 * Index of selected synchronization. |
|
93 */ |
|
94 TInt iIndex; |
|
95 }; |
|
96 |
|
97 #endif // CESMRSYNCFIELD_H |
|
98 |