30
|
1 |
/*
|
|
2 |
* Copyright (c) 2002 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: Calendar icons class
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef CCALENICONS_H
|
|
21 |
#define CCALENICONS_H
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#include <e32base.h>
|
|
25 |
#include <calenservices.h>
|
|
26 |
// CONSTANTS
|
|
27 |
static const TInt KDayAndWeekIconCount( 12 );
|
|
28 |
|
|
29 |
// FORWARD DECLARATIONS
|
|
30 |
class CAknIconArray;
|
|
31 |
class CEikonEnv;
|
|
32 |
class CFbsBitmap;
|
|
33 |
class CGulIcon;
|
|
34 |
class TAknsItemID;
|
|
35 |
class TRgb;
|
|
36 |
class CCalEntry;
|
|
37 |
|
|
38 |
// CLASS DECLARATION
|
|
39 |
|
|
40 |
/**
|
|
41 |
* Construct icons used by calendar. Takes care of different types
|
|
42 |
* of skinning (i.e. bitmap replacement or color change).
|
|
43 |
*
|
|
44 |
* @lib Calendar.app
|
|
45 |
* @since 2.1
|
|
46 |
*/
|
|
47 |
NONSHARABLE_CLASS( CCalenIcons ) : public CBase
|
|
48 |
{
|
|
49 |
public: // Constructors and destructor
|
|
50 |
/**
|
|
51 |
* Gets an icon index corresponding to a note
|
|
52 |
* @param aEntry Agenda entry
|
|
53 |
* @return ENullIcon | EBirthdayIcon |
|
|
54 |
* EMeetingIcon | EDaynoteIcon | EToDoIcon
|
|
55 |
*/
|
|
56 |
IMPORT_C static MCalenServices::TCalenIcons IconIndexFromEntryL(CCalEntry& aEntry);
|
|
57 |
|
|
58 |
/**
|
|
59 |
* Two-phased constructor.
|
|
60 |
*/
|
|
61 |
static CCalenIcons* NewL();
|
|
62 |
|
|
63 |
/**
|
|
64 |
* Destructor.
|
|
65 |
*/
|
|
66 |
virtual ~CCalenIcons();
|
|
67 |
|
|
68 |
public: // New functions
|
|
69 |
/**
|
|
70 |
* Create icons that are only used by month view
|
|
71 |
* @return a pointer to CAknIconArray
|
|
72 |
*/
|
|
73 |
IMPORT_C CAknIconArray* CreateMonthViewIconsL() const;
|
|
74 |
|
|
75 |
/**
|
|
76 |
* Create icons that are shared by Day/Week/Todo views
|
|
77 |
* @return a pointer to CAknIconArray
|
|
78 |
*/
|
|
79 |
IMPORT_C CAknIconArray* CreateDayWeekToDoViewIconsL() const;
|
|
80 |
|
|
81 |
/**
|
|
82 |
* Create icons for "out of range"
|
|
83 |
* @return a pointer to CAknIconArray
|
|
84 |
*/
|
|
85 |
IMPORT_C CAknIconArray* CreateOutOfRangeIconsL() const;
|
|
86 |
|
|
87 |
/**
|
|
88 |
* Create icon for "item not shown"
|
|
89 |
* @return a pointer to CGulIcon
|
|
90 |
*/
|
|
91 |
IMPORT_C CGulIcon* CreateItemNotShownIconL() const;
|
|
92 |
/**
|
|
93 |
* Get an icon by passing an icon type
|
|
94 |
* @param aIndex An index to the enum TCalenIcons
|
|
95 |
* @return a pointer to CGulIcon
|
|
96 |
*/
|
|
97 |
IMPORT_C CGulIcon* GetIconL( MCalenServices::TCalenIcons aIndex, const TInt aViewId = 0 ) const;
|
|
98 |
|
|
99 |
private:
|
|
100 |
/**
|
|
101 |
* C++ default constructor.
|
|
102 |
*/
|
|
103 |
CCalenIcons();
|
|
104 |
|
|
105 |
/**
|
|
106 |
* By default Symbian 2nd phase constructor is private.
|
|
107 |
*/
|
|
108 |
void ConstructL();
|
|
109 |
|
|
110 |
private: // New methods
|
|
111 |
|
|
112 |
/*
|
|
113 |
* Create bimap totally filled by aIconColor, and of size aSize.
|
|
114 |
* This can be used with mask to produce skinned
|
|
115 |
*/
|
|
116 |
CFbsBitmap* CreateColorFilledRectBmpL(const TSize& aSize,
|
|
117 |
const TRgb& aIconColor) const;
|
|
118 |
|
|
119 |
CGulIcon* CreateColorSkinnedIconL(TInt aBitmapId,
|
|
120 |
const TRgb& aIconColor) const;
|
|
121 |
|
|
122 |
CGulIcon* CreateBitmapSkinnedIconL(const TAknsItemID& aSkinIconId,
|
|
123 |
const TDesC& aFilename,
|
|
124 |
TInt aNormalIconId,
|
|
125 |
TInt aNormalMaskId) const;
|
|
126 |
|
|
127 |
private: // Data
|
|
128 |
TFileName iIconFile;
|
|
129 |
};
|
|
130 |
|
|
131 |
#endif // CCALENICONS_H
|
|
132 |
|
|
133 |
// End of File
|