|
1 /* |
|
2 * Copyright (c) 2007-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: Title pane for UI |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CESMRTITLEPANE_H |
|
19 #define CESMRTITLEPANE_H |
|
20 |
|
21 #include <coecntrl.h> |
|
22 #include <AknsItemID.h> |
|
23 //<cmail> |
|
24 #include "mesmrcalentry.h" |
|
25 #include "esmrdef.h" |
|
26 //</cmail> |
|
27 |
|
28 class CMRImage; |
|
29 class CMRLabel; |
|
30 |
|
31 /** |
|
32 * This class is responsibe of showing the current title. |
|
33 */ |
|
34 NONSHARABLE_CLASS( CESMRTitlePane ) : public CCoeControl |
|
35 { |
|
36 |
|
37 public: |
|
38 /** |
|
39 * Constructor for new title pane. |
|
40 * |
|
41 * @param aLayout - pointer to layout manager |
|
42 */ |
|
43 static CESMRTitlePane* NewL(); |
|
44 static CESMRTitlePane* NewLC(); |
|
45 // Destructor |
|
46 ~CESMRTitlePane(); |
|
47 |
|
48 public: // From CCoeControl |
|
49 TInt CountComponentControls() const; |
|
50 CCoeControl* ComponentControl( TInt aInd ) const; |
|
51 void SizeChanged(); |
|
52 |
|
53 public: |
|
54 /** |
|
55 * Handle set the priority |
|
56 * @param aPriority |
|
57 */ |
|
58 void HandleSetPriorityCmdL( TInt aPriority ); |
|
59 /** |
|
60 * Sets the priority indicator for this pane |
|
61 * |
|
62 * @param aPriority - priority to be set |
|
63 * @param aEntryType - entry type |
|
64 */ |
|
65 void SetPriorityL(TUint aPriority ); |
|
66 |
|
67 /** |
|
68 * Sets the text for this pane |
|
69 * |
|
70 * @param aText - descriptor that contains the text |
|
71 */ |
|
72 void SetTextL( const TDesC& aText ); |
|
73 |
|
74 /** |
|
75 * Called by the view component. Title pane fethces the priority of entry |
|
76 * @param aEntry Current calendar entry |
|
77 */ |
|
78 void InternalizeL( MESMRCalEntry& aEntry ); |
|
79 |
|
80 /** |
|
81 * Called by the view component. Title pane stores the priority of entry |
|
82 * @param aEntry Current calendar entry |
|
83 */ |
|
84 void ExternalizeL( MESMRCalEntry& aEntry ); |
|
85 |
|
86 /** |
|
87 * Set default icon for the view if needed |
|
88 */ |
|
89 void SetDefaultIcon(TBool aDefault); |
|
90 |
|
91 private: |
|
92 CESMRTitlePane(); |
|
93 void ConstructL(); |
|
94 void CreateIconL( TAknsItemID aIconID ); |
|
95 |
|
96 private: |
|
97 /// Own: Current priority |
|
98 TUint iPriority; |
|
99 /// Own: entry type: |
|
100 MESMRCalEntry::TESMRCalEntryType iEntryType; |
|
101 /// Own: do we have a default icon |
|
102 TBool iDefaultIcon; |
|
103 /// Own: Field icon |
|
104 CMRImage* iIcon; |
|
105 /// Own: Field text label |
|
106 CMRLabel* iTitle; |
|
107 }; |
|
108 #endif // CESMRTITLEPANE_H |
|
109 |
|
110 // EOF |