|
1 /* |
|
2 * Copyright (c) 2004 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: Utils class for ui classes. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __CATTENDEE_UI_UTILS_H__ |
|
21 #define __CATTENDEE_UI_UTILS_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <aknnavide.h> |
|
25 #include <RPbkViewResourceFile.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CEikStatusPane; |
|
29 class CEikonEnv; |
|
30 class RPbkViewResourceFile; |
|
31 class CAknTitlePane; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 /** |
|
35 * CAttendeeUiUtils class |
|
36 * - Store and restore navipane. |
|
37 * - Read resource files |
|
38 */ |
|
39 class CAttendeeUiUtils : public CBase |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 /** |
|
43 * C++ default constructor. |
|
44 * @return created CAttendeeUiUtils object |
|
45 */ |
|
46 static CAttendeeUiUtils* NewL(); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 ~CAttendeeUiUtils(); |
|
52 |
|
53 private: // Constructors |
|
54 /** |
|
55 * C++ default constructor. |
|
56 * @return newly instantiated object |
|
57 */ |
|
58 CAttendeeUiUtils(); |
|
59 |
|
60 /** |
|
61 * By default Symbian 2nd phase constructor is private. |
|
62 */ |
|
63 void ConstructL(); |
|
64 |
|
65 public: // New functions |
|
66 /** |
|
67 * Store current navi pane. |
|
68 */ |
|
69 void StoreNaviPane(); |
|
70 |
|
71 /** |
|
72 * Create navi label. |
|
73 * @param aLabel |
|
74 */ |
|
75 void CreateNaviLabelL( const TDesC& aLabel ); |
|
76 |
|
77 /** |
|
78 * Create navi label. |
|
79 * @param aResourceId |
|
80 */ |
|
81 void CreateNaviLabelL( const TInt aResourceId ); |
|
82 |
|
83 /** |
|
84 * Restore old navi pane. |
|
85 */ |
|
86 void RestoreOldNaviPaneL(); |
|
87 |
|
88 /** |
|
89 * Open resource files |
|
90 */ |
|
91 void OpenResourceFilesL(); |
|
92 |
|
93 /** |
|
94 * Close resource file |
|
95 */ |
|
96 void CloseResourceFile(); |
|
97 |
|
98 /** |
|
99 * Method for getting AttendeeView icon file name with correct |
|
100 * path information. |
|
101 * @return file name |
|
102 */ |
|
103 TFileName AttendeeViewIconFileL(); |
|
104 |
|
105 /** |
|
106 * Store current title pane. |
|
107 */ |
|
108 void StoreTitlePaneL(); |
|
109 |
|
110 /** |
|
111 * Change title pane. If KZeroResourceId is given then |
|
112 * title pane is not changed. |
|
113 * @param aResourceText resource containing title text |
|
114 */ |
|
115 void ChangeTitlePaneL( TInt aResourceText ); |
|
116 |
|
117 /** |
|
118 * Change title pane |
|
119 * @param aTitle, take ownership |
|
120 */ |
|
121 void ChangeTitlePaneL( HBufC* aTitle ); |
|
122 |
|
123 /** |
|
124 * Restore old title pane. |
|
125 */ |
|
126 void RestoreOldTitlePane(); |
|
127 |
|
128 private: // New functions |
|
129 /** |
|
130 * Find resource file |
|
131 */ |
|
132 void FindResourceFileL(); |
|
133 |
|
134 /** |
|
135 * Return status pane. |
|
136 * @return status pane, ownership is not transferred |
|
137 */ |
|
138 static CEikStatusPane* StatusPane(); |
|
139 |
|
140 /** |
|
141 * Find file from a correct drive, i.e. from drive where dll |
|
142 * being executed is located. |
|
143 * @param aFileName, file name which is updated to contain drive |
|
144 */ |
|
145 void GetFileWithCorrectDriveL( TFileName& aFileName ); |
|
146 |
|
147 private: // Data |
|
148 ///Own: Store navi decorator |
|
149 CAknNavigationDecorator* iStoredDecorator; |
|
150 |
|
151 ///Own: Pointer to navi label |
|
152 CAknNavigationDecorator* iNaviLabel; |
|
153 |
|
154 ///Ref: Reference to navi pane |
|
155 CAknNavigationControlContainer* iNaviPane; |
|
156 |
|
157 ///Ref: |
|
158 CEikonEnv* iEnv; |
|
159 |
|
160 ///Own: Resource file name and path |
|
161 TFileName iResourceFileName; |
|
162 |
|
163 ///Own: |
|
164 TInt iResourceOffset; |
|
165 |
|
166 ///Phonebook's resource file |
|
167 RPbkViewResourceFile iPbkResourceFile; |
|
168 |
|
169 /// Own: Title pane text to restore on exit |
|
170 HBufC* iStoredTitlePaneText; |
|
171 |
|
172 ///Ref: |
|
173 CAknTitlePane* iTitlePane; |
|
174 }; |
|
175 |
|
176 #endif // __CATTENDEE_UI_UTILS_H__ |
|
177 |
|
178 // End of File |