66
|
1 |
/*
|
|
2 |
* Copyright (c) 2005 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 |
* Description : Editor DataBase fields functionality for Meeting entry types
|
|
14 |
*
|
|
15 |
*/
|
|
16 |
|
|
17 |
#ifndef CALENDBFIELD_H
|
|
18 |
#define CALENDBFIELD_H
|
|
19 |
|
|
20 |
// system includes
|
|
21 |
#include <e32base.h>
|
|
22 |
#include <badesca.h>
|
|
23 |
|
|
24 |
// forward declaration
|
|
25 |
class CCalEntry;
|
|
26 |
class CCalenUnifiedEditor;
|
|
27 |
class CAknQueryValueTextArray;
|
|
28 |
class CAknQueryValueText;
|
|
29 |
class MCalenServices;
|
|
30 |
|
|
31 |
/**
|
|
32 |
* Implements Calendar field for Calendar Editors.
|
|
33 |
*/
|
|
34 |
NONSHARABLE_CLASS( CCalenDbField ) : public CBase
|
|
35 |
{
|
|
36 |
public: // Constructors and destructor
|
|
37 |
|
|
38 |
/**
|
|
39 |
* @brief Two-phased constructor.
|
|
40 |
* @param aUnifiedEditor
|
|
41 |
*/
|
|
42 |
static CCalenDbField* NewL( CCalenUnifiedEditor& aUnifiedEditor, MCalenServices& aServices );
|
|
43 |
|
|
44 |
/**
|
|
45 |
* @brief Destructor.
|
|
46 |
*/
|
|
47 |
virtual ~CCalenDbField();
|
|
48 |
|
|
49 |
public:
|
|
50 |
|
|
51 |
/**
|
|
52 |
* @brief Updates fields just before the form is shown
|
|
53 |
*/
|
|
54 |
void InitDbFieldLayoutL();
|
|
55 |
|
|
56 |
/**
|
|
57 |
* @brief Update data in editor
|
|
58 |
*/
|
|
59 |
void SetDataToEditorL();
|
|
60 |
|
|
61 |
/**
|
|
62 |
* @brief Read data from form
|
|
63 |
*/
|
|
64 |
void ReadDataFromFormL( TBool aContinueOnError );
|
|
65 |
|
|
66 |
/**
|
|
67 |
* @brief Prepares for focus transition
|
|
68 |
* @param aFocusedId
|
|
69 |
*/
|
|
70 |
void PrepareForFocusTransitionL( TInt aFocusedId );
|
|
71 |
|
|
72 |
/**
|
|
73 |
* @brief To habdle the control state change
|
|
74 |
* @param aFocusedId
|
|
75 |
*/
|
|
76 |
void HandleControlStateChangeL( TInt aControlId );
|
|
77 |
|
|
78 |
/*
|
|
79 |
* @brief Get calendar name for where entry belongs to
|
|
80 |
* @return TDesC reference to name of the calendar
|
|
81 |
*/
|
|
82 |
const TDesC& GetCalendarNameForEntryL();
|
|
83 |
|
|
84 |
/*
|
|
85 |
* @brief Get calendar index for where entry belongs to
|
|
86 |
* @return TInt index of the calendar
|
|
87 |
*/
|
|
88 |
TInt GetCalendarNameForEntryL(const TDesC& aCalendarFileName);
|
|
89 |
/*
|
|
90 |
* @brief check if calendar is changed or not
|
|
91 |
* @return TBool true if calendar is chnaged
|
|
92 |
*/
|
|
93 |
TBool IsCalendarEdited();
|
|
94 |
|
|
95 |
/*
|
|
96 |
* @brief Get calendar index from popuplist for entry
|
|
97 |
* @return TInt index from popuplist
|
|
98 |
*/
|
|
99 |
TInt GetCalendarIndexForEntryL();
|
|
100 |
|
|
101 |
private:
|
|
102 |
|
|
103 |
/**
|
|
104 |
* @brief C++ constructor
|
|
105 |
* @param aUnifiedEditor
|
|
106 |
*/
|
|
107 |
CCalenDbField( CCalenUnifiedEditor& aUnifiedEditor, MCalenServices& aServices );
|
|
108 |
|
|
109 |
/**
|
|
110 |
* @brief second phase constructor
|
|
111 |
*/
|
|
112 |
void ConstructL();
|
|
113 |
|
|
114 |
|
|
115 |
/*
|
|
116 |
* @brief calendar name finder from array
|
|
117 |
*
|
|
118 |
* @param aName name of item in array
|
|
119 |
* @param aInfoItem item to be found
|
|
120 |
* @return TBool item found or not
|
|
121 |
*/
|
|
122 |
static TBool CalendarInfoNameIdentifierL( const HBufC* aName,
|
|
123 |
const CCalCalendarInfo& aInfoItem );
|
|
124 |
|
|
125 |
/**
|
|
126 |
* @brief show infonote when database changes and entry having
|
|
127 |
* childs.
|
|
128 |
*/
|
|
129 |
void ShowChangeDBQueryL();
|
|
130 |
/*
|
|
131 |
* Callback for CAsyncCallBack class
|
|
132 |
* @param aThisPtr* this pointer.
|
|
133 |
* @return TInt status.
|
|
134 |
*/
|
|
135 |
static TInt DoAsyncShowChangeDBQueryL(TAny* aThisPtr);
|
|
136 |
|
|
137 |
/**
|
|
138 |
* @brief Update data in editor
|
|
139 |
* @param aColId collection Id of selected database
|
|
140 |
*/
|
|
141 |
void SetDataToEditorL(const TCalCollectionId& aColId);
|
|
142 |
|
|
143 |
public:
|
|
144 |
//previous calendar collection id
|
|
145 |
TCalCollectionId iPreviousColId;
|
|
146 |
|
|
147 |
//current collection id
|
|
148 |
TCalCollectionId iCurrentColId;
|
|
149 |
private:
|
|
150 |
|
|
151 |
/**
|
|
152 |
* @var iUnifiedEditor
|
|
153 |
* @brief Reference to CCalenUnifiedEditor
|
|
154 |
*/
|
|
155 |
CCalenUnifiedEditor& iUnifiedEditor;
|
|
156 |
|
|
157 |
/**
|
|
158 |
* @var iDbNamesArrayText
|
|
159 |
*/
|
|
160 |
CDesCArrayFlat* iDbNamesArrayText;
|
|
161 |
|
|
162 |
/**
|
|
163 |
* @var iDbNamesArray
|
|
164 |
*/
|
|
165 |
CAknQueryValueTextArray* iDbNamesArray;
|
|
166 |
|
|
167 |
/**
|
|
168 |
* @var iDbNamesTextValues
|
|
169 |
*/
|
|
170 |
CAknQueryValueText* iDbNamesTextValues;
|
|
171 |
|
|
172 |
TInt iPreviousIndex;
|
|
173 |
|
|
174 |
TInt iCurrentIndex;
|
|
175 |
|
|
176 |
//services referance not owned
|
|
177 |
MCalenServices* iServices;
|
|
178 |
HBufC* iCalendarFileName;
|
|
179 |
CAsyncCallBack* iAsyncDBquery;
|
|
180 |
|
|
181 |
};
|
|
182 |
|
|
183 |
#endif // CALENDBFIELD_H
|
|
184 |
|
|
185 |
|
|
186 |
// End of File
|