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