|
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 priority field implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CESMRPRIORITYFIELD_H |
|
20 #define CESMRPRIORITYFIELD_H |
|
21 |
|
22 #include "cesmriconfield.h" |
|
23 #include "cesmrpriority.h" |
|
24 |
|
25 class MESMRCalEntry; |
|
26 class CEikLabel; |
|
27 class MESMRTitlePaneObserver; |
|
28 |
|
29 NONSHARABLE_CLASS( CESMRPriorityField ): public CESMRIconField |
|
30 { |
|
31 public: |
|
32 /** |
|
33 * Creates new CESMRPriorityField object. Ownership |
|
34 * is transferred to caller. |
|
35 * @return Pointer to created object, |
|
36 */ |
|
37 static CESMRPriorityField* NewL(); |
|
38 |
|
39 /** |
|
40 * C++ Destructor. |
|
41 */ |
|
42 ~CESMRPriorityField(); |
|
43 |
|
44 public: // From CESMRIconField |
|
45 void InitializeL(); |
|
46 void InternalizeL( MESMRCalEntry& aEntry ); |
|
47 void ExternalizeL( MESMRCalEntry& aEntry ); |
|
48 void ExecuteGenericCommandL( TInt aCommand ); |
|
49 void SetOutlineFocusL( TBool aFocus ); |
|
50 void SetTitlePaneObserver( MESMRTitlePaneObserver* aObserver ); |
|
51 |
|
52 public: // From CCoeControl |
|
53 TKeyResponse OfferKeyEventL(const TKeyEvent& aEvent, TEventCode aType); |
|
54 |
|
55 private: // Implementation |
|
56 /** |
|
57 * Constructor. |
|
58 */ |
|
59 CESMRPriorityField(); |
|
60 |
|
61 /** |
|
62 * Second phase constructor. |
|
63 */ |
|
64 void ConstructL(); |
|
65 |
|
66 /** |
|
67 * Updates priority to given index. |
|
68 * |
|
69 * @param aIndex index |
|
70 */ |
|
71 void UpdateTextL( TInt aIndex ); |
|
72 |
|
73 /** |
|
74 * Shows query dialog for selecting |
|
75 * priority |
|
76 * |
|
77 */ |
|
78 void ExecutePriorityQueryL(); |
|
79 |
|
80 private: |
|
81 /** |
|
82 * Not owned. Priority label. |
|
83 */ |
|
84 CEikLabel* iPriority; |
|
85 |
|
86 /** |
|
87 * Own. Array of available priorities. |
|
88 */ |
|
89 RPointerArray< CESMRPriority > iArray; |
|
90 |
|
91 /** |
|
92 * Selected priority index. |
|
93 */ |
|
94 TInt iIndex; |
|
95 |
|
96 /** |
|
97 * Entry type |
|
98 */ |
|
99 MESMRCalEntry::TESMRCalEntryType iEntryType; |
|
100 |
|
101 /** |
|
102 * Title pane observer for setting the priority icon |
|
103 */ |
|
104 MESMRTitlePaneObserver* iObserver; |
|
105 }; |
|
106 |
|
107 #endif // CESMRPRIORITYFIELD_H |
|
108 |