66
|
1 |
/*
|
|
2 |
* Copyright (c) 2002-2008 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: For Week View of Calendar application.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef CALENWEEKVIEW_H
|
|
20 |
#define CALENWEEKVIEW_H
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include "calennativeview.h"
|
|
24 |
|
|
25 |
// FORWARD DECLARATIONS
|
|
26 |
class CAknNavigationDecorator;
|
|
27 |
|
|
28 |
// CLASS DEFINITIONS
|
|
29 |
/**
|
|
30 |
* Declares view for Week view
|
|
31 |
*/
|
|
32 |
NONSHARABLE_CLASS( CCalenWeekView ) : public CCalenNativeView
|
|
33 |
{
|
|
34 |
public: // Constructors and destructor
|
|
35 |
|
|
36 |
/**
|
|
37 |
* Two-phased constructor.
|
|
38 |
*/
|
|
39 |
IMPORT_C static CCalenWeekView* NewL( MCalenServices& aServices );
|
|
40 |
/**
|
|
41 |
* Destructor.
|
|
42 |
*/
|
|
43 |
virtual ~CCalenWeekView();
|
|
44 |
|
|
45 |
public: // New function
|
|
46 |
/**
|
|
47 |
* Set a date text to StatusPane
|
|
48 |
* @param aTime Set a time to StatusPane
|
|
49 |
*/
|
|
50 |
void SetStatusPaneFromActiveContextL();
|
|
51 |
|
|
52 |
void UpdateCbaL();
|
|
53 |
|
|
54 |
public: // From CCalenView
|
|
55 |
virtual TNextPopulationStep ActiveStepL();
|
|
56 |
virtual void CancelPopulation();
|
|
57 |
virtual TCyclePosition CyclePosition() const;
|
|
58 |
virtual const TDesC& LocalisedViewNameL( CCalenView::TViewName aViewName );
|
|
59 |
virtual CGulIcon* ViewIconL() const;
|
|
60 |
|
|
61 |
protected: // From CCalenNativeView
|
|
62 |
/**
|
|
63 |
* Clears view specific data
|
|
64 |
*/
|
|
65 |
virtual void ClearViewSpecificDataL();
|
|
66 |
|
|
67 |
/**
|
|
68 |
* Updates preview pane/preview popup
|
|
69 |
*/
|
|
70 |
void UpdatePreviewPaneL();
|
|
71 |
|
|
72 |
/**
|
|
73 |
* Hides preview pane/preview popup
|
|
74 |
*/
|
|
75 |
void HidePreviewPane();
|
|
76 |
|
|
77 |
private: // Constructors
|
|
78 |
/**
|
|
79 |
* C++ constructor.
|
|
80 |
*/
|
|
81 |
CCalenWeekView( MCalenServices& aServices );
|
|
82 |
/**
|
|
83 |
* By default Symbian OS constructor is private.
|
|
84 |
*/
|
|
85 |
void ConstructL();
|
|
86 |
|
|
87 |
private: // From CCalenView
|
|
88 |
/**
|
|
89 |
* From CCalenView CCalenView::DoActivateL() calls DoActivateImplL()
|
|
90 |
*/
|
|
91 |
void DoActivateImplL( const TVwsViewId& aPrevViewId,
|
|
92 |
TUid aCustomMessageId,
|
|
93 |
const TDesC8& aCustomMessage );
|
|
94 |
/**
|
|
95 |
* From CCalenView
|
|
96 |
* CCalenView::DoDeactivateL() calls DoDeactivateImplL()
|
|
97 |
*/
|
|
98 |
void DoDeactivateImpl();
|
|
99 |
/**
|
|
100 |
* From CCalenView Called when cross over midinight or locale change.
|
|
101 |
*/
|
|
102 |
void OnLocaleChangedL(TInt aReason);
|
|
103 |
|
|
104 |
/**
|
|
105 |
* From CCalenView Creates CCalenContainer
|
|
106 |
*/
|
|
107 |
CCalenContainer* CreateContainerImplL();
|
|
108 |
/**
|
|
109 |
* From CCalenView Redraw status pane when Form is closed
|
|
110 |
*/
|
|
111 |
void RedrawStatusPaneL();
|
|
112 |
|
|
113 |
/**
|
|
114 |
* From CAknView. Command handling for each view
|
|
115 |
* @param aCommand command id
|
|
116 |
*/
|
|
117 |
void HandleCommandL(TInt aCommand);
|
|
118 |
|
|
119 |
private:
|
|
120 |
// From CAknView
|
|
121 |
TUid Id() const;
|
|
122 |
|
|
123 |
private: // From MEikMenuPaneObserver
|
|
124 |
/**
|
|
125 |
* Dynamic changes to menu pane
|
|
126 |
*/
|
|
127 |
void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
|
|
128 |
|
|
129 |
private: // own methods
|
|
130 |
|
|
131 |
/**
|
|
132 |
* Returns ETrue if the vsd is null.
|
|
133 |
*/
|
|
134 |
TBool IsViewSpecificDataNullL();
|
|
135 |
|
|
136 |
private: // Data
|
|
137 |
|
|
138 |
enum TPopulationStep
|
|
139 |
{
|
|
140 |
ENothingDone,
|
|
141 |
ERequestedInstanceView,
|
|
142 |
ESlotTable1Next,
|
|
143 |
ESlotTable2Next,
|
|
144 |
ESetListBoxDataNext,
|
|
145 |
EPopulationDone
|
|
146 |
};
|
|
147 |
TPopulationStep iPopulationStep;
|
|
148 |
|
|
149 |
// View specific data
|
|
150 |
TTime iTime;
|
|
151 |
TInt iSelectedRowNumber; // The row number of the highlighted cell.
|
|
152 |
TTimeIntervalMinutes iFirstRowTime; // The time of the first row on the screen.
|
|
153 |
TBool iShowBackButtonOnCba;
|
|
154 |
};
|
|
155 |
|
|
156 |
#endif //CALENWEEKVIEW_H
|
|
157 |
|
|
158 |
|
|
159 |
// End of File
|