66
|
1 |
/*
|
|
2 |
* Copyright (c) 2002, 2003 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:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
// System includes
|
|
19 |
#include <badesca.h>
|
|
20 |
|
|
21 |
// User includes
|
|
22 |
#include "calenconstants.h"
|
|
23 |
|
|
24 |
// Forward declaration
|
|
25 |
class CCalenStatusPaneUtilsImpl;
|
|
26 |
class CEikStatusPane;
|
|
27 |
class CAknNavigationDecorator;
|
|
28 |
class TRgb;
|
|
29 |
|
|
30 |
/**
|
|
31 |
* @class CCalenStatusPaneUtils
|
|
32 |
* @brief Utility class for accessing the status pane of the calendar
|
|
33 |
*/
|
|
34 |
NONSHARABLE_CLASS( CCalenStatusPaneUtils ) : public CBase
|
|
35 |
{
|
|
36 |
public: // Constructor and destructor
|
|
37 |
|
|
38 |
/**
|
|
39 |
* @brief First phase constructor
|
|
40 |
*
|
|
41 |
* @param aStatusPane The status pane
|
|
42 |
* @return CCalenStatusPaneUtils* Pointer to an object of type CCalenStatusPaneUtils
|
|
43 |
*/
|
|
44 |
IMPORT_C static CCalenStatusPaneUtils* NewL( CEikStatusPane* aStatusPane );
|
|
45 |
|
|
46 |
/**
|
|
47 |
* @brief Virtual destructor
|
|
48 |
*/
|
|
49 |
IMPORT_C virtual ~CCalenStatusPaneUtils();
|
|
50 |
|
|
51 |
public:
|
|
52 |
|
|
53 |
/**
|
|
54 |
* @brief Sets the title for the status pane
|
|
55 |
*
|
|
56 |
* @param aText The text to be set, of type TDes
|
|
57 |
*/
|
|
58 |
IMPORT_C void SetTitleTextL( TDes& aText );
|
|
59 |
|
|
60 |
/**
|
|
61 |
* @brief Sets the title for the status pane
|
|
62 |
*
|
|
63 |
* @param aText The text to be set, of type HBufC
|
|
64 |
*/
|
|
65 |
IMPORT_C void SetTitleText( HBufC* aText );
|
|
66 |
|
|
67 |
/**
|
|
68 |
* @brief Sets if the title text has to be underlined or not
|
|
69 |
*
|
|
70 |
* @param aUnderline ETrue if the text has to be underlined, EFalse otherwise
|
|
71 |
*/
|
|
72 |
IMPORT_C void UnderLineTitleText( TBool aUnderline );
|
|
73 |
|
|
74 |
/**
|
|
75 |
* @brief Sets the current day in the navi pane
|
|
76 |
* and returns the decorator that can be set to the navi pane control
|
|
77 |
*
|
|
78 |
* @param aActiveDay The day to be displayed in the navi pane
|
|
79 |
* @return CAknNavigationDecorator* The navi pane decorator
|
|
80 |
*/
|
|
81 |
IMPORT_C CAknNavigationDecorator* ShowNaviPaneL( const TTime& aActiveDay );
|
|
82 |
/**
|
|
83 |
* @brief Sets the calendar name and icon in the navi pane
|
|
84 |
* and returns the decorator that can be set to the navi pane control
|
|
85 |
*
|
|
86 |
* @param aName The calendar name to be displayed in the navi pane
|
|
87 |
* @param aColor The color of the icon to be displayed.
|
|
88 |
* @return CAknNavigationDecorator* The navi pane decorator
|
|
89 |
*/
|
|
90 |
IMPORT_C CAknNavigationDecorator* ShowNaviPaneL( const TDesC& aName, const TRgb aColor );
|
|
91 |
|
|
92 |
/**
|
|
93 |
* @brief Hides the navi pane
|
|
94 |
*/
|
|
95 |
IMPORT_C void HideNaviPane();
|
|
96 |
|
|
97 |
/**
|
|
98 |
* @brief Gets the month name in aName, based on the active time
|
|
99 |
*
|
|
100 |
* @param aName The month name
|
|
101 |
* @param aTime The active time
|
|
102 |
*/
|
|
103 |
IMPORT_C void MonthNameByActiveTime( TDes& aName, const TTime& aTime );
|
|
104 |
|
|
105 |
/**
|
|
106 |
* @brief Gets the day name in aName, based on the active time
|
|
107 |
*
|
|
108 |
* @param aName The day name
|
|
109 |
* @param aTime The active time
|
|
110 |
*/
|
|
111 |
IMPORT_C void DayNameByActiveTime( TDes& aName, const TTime& aTime );
|
|
112 |
|
|
113 |
/**
|
|
114 |
* @brief Returns the week name based on the active time
|
|
115 |
*
|
|
116 |
* @param aTime The active time
|
|
117 |
* @param aDayFormat The day of the week
|
|
118 |
* @param aType The calendar week title
|
|
119 |
* @return HBufC* The week name
|
|
120 |
*/
|
|
121 |
IMPORT_C HBufC* WeekNameByActiveTimeL( const TTime& aTime, TDay aDayFormat, TCalenWeekTitle aType );
|
|
122 |
|
|
123 |
/**
|
|
124 |
* @brief Refreshes the status pane
|
|
125 |
*/
|
|
126 |
IMPORT_C void RefreshStatusPane();
|
|
127 |
|
|
128 |
private:
|
|
129 |
|
|
130 |
/**
|
|
131 |
* @brief Default C++ constructor. Hidden, use NewL instead
|
|
132 |
*/
|
|
133 |
CCalenStatusPaneUtils();
|
|
134 |
|
|
135 |
/**
|
|
136 |
* @brief Second phase constructor
|
|
137 |
*
|
|
138 |
* @param aStatusPane The status pane
|
|
139 |
*/
|
|
140 |
void ConstructL( CEikStatusPane* aStatusPane );
|
|
141 |
|
|
142 |
private: // Data
|
|
143 |
|
|
144 |
/**
|
|
145 |
* @var iStatusPaneUtils
|
|
146 |
*
|
|
147 |
* @brief The pointer to the actual implementation
|
|
148 |
*/
|
|
149 |
CCalenStatusPaneUtilsImpl* iStatusPaneUtils;
|
|
150 |
};
|
|
151 |
|
|
152 |
// End of file
|