|
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: Declares view class of View architecture for Day view. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CALENDAYVIEW_H |
|
21 #define CALENDAYVIEW_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "calennativeview.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CAknNavigationDecorator; |
|
28 |
|
29 // CLASS DEFINITIONS |
|
30 |
|
31 /** |
|
32 * Declares view for Day view |
|
33 */ |
|
34 NONSHARABLE_CLASS( CCalenDayView ) : public CCalenNativeView |
|
35 { |
|
36 public: // Constructors and destructor |
|
37 /** |
|
38 * Two-phased constructor. |
|
39 */ |
|
40 IMPORT_C static CCalenDayView* NewL( MCalenServices& aServices ); |
|
41 |
|
42 /** |
|
43 * Destructor. |
|
44 */ |
|
45 virtual ~CCalenDayView(); |
|
46 |
|
47 public: // New function |
|
48 /** |
|
49 * Set a date text to StatusPane |
|
50 * @param aTime Set a time |
|
51 */ |
|
52 void SetStatusPaneFromActiveContextL(); |
|
53 |
|
54 /** |
|
55 * Update CBA buttons depending on if we have items or not in view |
|
56 * Callend from Day Container as well as DoActivateViewImpl. |
|
57 * |
|
58 */ |
|
59 void UpdateCbaL(); |
|
60 |
|
61 public: // From CCalenView |
|
62 virtual TNextPopulationStep ActiveStepL(); |
|
63 virtual void CancelPopulation(); |
|
64 virtual TCyclePosition CyclePosition() const; |
|
65 virtual const TDesC& LocalisedViewNameL( CCalenView::TViewName aViewName ); |
|
66 virtual CGulIcon* CCalenDayView::ViewIconL() const; |
|
67 |
|
68 protected: // From CCalenNativeView |
|
69 /** |
|
70 * Clears view specific data |
|
71 */ |
|
72 virtual void ClearViewSpecificDataL(); |
|
73 |
|
74 /** |
|
75 * Update date form context when entry is saved |
|
76 */ |
|
77 void UpdateDateFromContextL(); |
|
78 |
|
79 private: // Constructors |
|
80 /** |
|
81 * C++ constructor. |
|
82 */ |
|
83 CCalenDayView( MCalenServices& aServices ); |
|
84 |
|
85 private: |
|
86 /** |
|
87 * By default Symbian OS constructor is private. |
|
88 */ |
|
89 void ConstructL(); |
|
90 |
|
91 /** |
|
92 * From CCalenView Second phase DoActivateL |
|
93 */ |
|
94 void DoActivateImplL( const TVwsViewId& aPrevViewId, |
|
95 TUid aCustomMessageId, |
|
96 const TDesC8& aCustomMessage ); |
|
97 |
|
98 /** |
|
99 * From CCalenView Second phase DoDeactivate |
|
100 */ |
|
101 void DoDeactivateImpl(); |
|
102 |
|
103 /** |
|
104 * From CCalenView. Called when locale was changed and |
|
105 * time was crossed over |
|
106 */ |
|
107 void OnLocaleChangedL(TInt aReason); |
|
108 |
|
109 /** |
|
110 * From CCalenView Creates container control for DayView |
|
111 */ |
|
112 CCalenContainer* CreateContainerImplL(); |
|
113 |
|
114 /** |
|
115 * From CCalenView Redraw status pane when Form is closed |
|
116 */ |
|
117 void RedrawStatusPaneL(); |
|
118 |
|
119 /** |
|
120 * From CCalenView. Normal command handling method. |
|
121 * needed for MSK. |
|
122 */ |
|
123 void HandleCommandL(TInt aCommand); |
|
124 |
|
125 TUid Id() const; |
|
126 |
|
127 /** |
|
128 * Enable the copy functionality for the entries |
|
129 *.to single aur multiple calendars. |
|
130 */ |
|
131 |
|
132 void CopyToCalendarsL(); |
|
133 |
|
134 private: // From MEikMenuObserver |
|
135 /** |
|
136 * From MEikMenuObserver Changes MenuPane dynamically |
|
137 */ |
|
138 void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); |
|
139 |
|
140 private: |
|
141 |
|
142 /** |
|
143 * Returns ETrue if the vsd is null. |
|
144 */ |
|
145 TBool IsViewSpecificDataNullL(); |
|
146 |
|
147 private: // Data |
|
148 |
|
149 TBool iShowBackButtonOnCba; // BACK cba button test variable |
|
150 TVwsViewId iPreviousViewId; // view id that the day view is switched from |
|
151 |
|
152 private: |
|
153 enum TPopulationStep |
|
154 { |
|
155 ENothingDone, |
|
156 ERequestedInstanceView, |
|
157 ECreateSlotTableNext, |
|
158 ESizedChanged, |
|
159 ECreateListBoxDataNext, |
|
160 EPopulationDone |
|
161 }; |
|
162 TPopulationStep iPopulationStep; |
|
163 |
|
164 // View specific data, day container gets references to all of these. |
|
165 TTime iDate; // Date of current focus. |
|
166 TInt iHighlightedRowNumber; // The row number highlighted. |
|
167 TInt iFirstEntryOnScreenIndex; // The offset of the topmost item on screen to the first entry. |
|
168 TInt iEventViewCommandHandled; |
|
169 }; |
|
170 |
|
171 #endif // CALENDAYVIEW_H |
|
172 |
|
173 // End of File |