|
1 /**************************************************************************** |
|
2 ** |
|
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 ** All rights reserved. |
|
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 ** |
|
7 ** This file is part of the utility applications of the Qt Toolkit. |
|
8 ** |
|
9 ** $QT_BEGIN_LICENSE:LGPL$ |
|
10 ** No Commercial Usage |
|
11 ** This file contains pre-release code and may not be distributed. |
|
12 ** You may use this file in accordance with the terms and conditions |
|
13 ** contained in the Technology Preview License Agreement accompanying |
|
14 ** this package. |
|
15 ** |
|
16 ** GNU Lesser General Public License Usage |
|
17 ** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 ** General Public License version 2.1 as published by the Free Software |
|
19 ** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 ** packaging of this file. Please review the following information to |
|
21 ** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 ** |
|
24 ** In addition, as a special exception, Nokia gives you certain additional |
|
25 ** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 ** |
|
28 ** If you have questions regarding the use of this file, please contact |
|
29 ** Nokia at qt-info@nokia.com. |
|
30 ** |
|
31 ** |
|
32 ** |
|
33 ** |
|
34 ** |
|
35 ** |
|
36 ** |
|
37 ** |
|
38 ** $QT_END_LICENSE$ |
|
39 ** |
|
40 ****************************************************************************/ |
|
41 |
|
42 #ifndef PMMAPPERAPP_H |
|
43 #define PMMAPPERAPP_H |
|
44 |
|
45 // INCLUDES |
|
46 #include <eikapp.h> |
|
47 #include <eikdoc.h> |
|
48 #include <e32std.h> |
|
49 #include <aknViewAppUi.h> |
|
50 |
|
51 // CONSTANTS |
|
52 const TUid KUidPMMapperApplication = { 0x2002121F }; |
|
53 |
|
54 |
|
55 // FORWARD DECLARATIONS |
|
56 class CPixelMetricsMapperView; |
|
57 class MAknsSkinInstance; |
|
58 |
|
59 // CLASS DECLARATION |
|
60 /** |
|
61 * CPixelMetricsMapperDocument |
|
62 */ |
|
63 class CPixelMetricsMapperDocument : public CEikDocument |
|
64 { |
|
65 public: // Constructors and destructor |
|
66 |
|
67 /** |
|
68 * Symbian 2nd phase constructor. |
|
69 */ |
|
70 void ConstructL(); |
|
71 |
|
72 /** |
|
73 * Constructor. |
|
74 */ |
|
75 CPixelMetricsMapperDocument( CEikApplication& aApp ) |
|
76 : CEikDocument( aApp ) {} |
|
77 |
|
78 /** |
|
79 * Destructor. |
|
80 */ |
|
81 ~CPixelMetricsMapperDocument(){} |
|
82 |
|
83 public: // Functions from base classes |
|
84 |
|
85 /** |
|
86 * From CEikDocument. |
|
87 */ |
|
88 CFileStore* OpenFileL( |
|
89 TBool /*aDoOpen*/, |
|
90 const TDesC& /*aFilename*/, |
|
91 RFs& /*aFs*/ ) |
|
92 { |
|
93 return NULL; |
|
94 } |
|
95 |
|
96 private: // Functions from base classes |
|
97 |
|
98 /** |
|
99 * From CEikDocument. |
|
100 */ |
|
101 CEikAppUi* CreateAppUiL(); |
|
102 }; |
|
103 |
|
104 /** |
|
105 * CPixelMetricsMapperAppUi |
|
106 */ |
|
107 class CPixelMetricsMapperAppUi : public CAknViewAppUi |
|
108 { |
|
109 public: // Constructors and destructor |
|
110 |
|
111 /** |
|
112 * Constructor. |
|
113 */ |
|
114 CPixelMetricsMapperAppUi(); |
|
115 |
|
116 /** |
|
117 * Symbian 2nd phase constructor. |
|
118 */ |
|
119 void ConstructL(); |
|
120 |
|
121 /** |
|
122 * Destructor. |
|
123 */ |
|
124 ~CPixelMetricsMapperAppUi(); |
|
125 |
|
126 public: |
|
127 void DoAutoOperationL(); |
|
128 |
|
129 TBool ReadyForAutoOp() const; |
|
130 |
|
131 |
|
132 private: // Functions from base classes |
|
133 |
|
134 /** |
|
135 * From CEikAppUi. |
|
136 */ |
|
137 void HandleCommandL(TInt aCommand); |
|
138 |
|
139 /** |
|
140 * From CEikAppUi. |
|
141 */ |
|
142 virtual TKeyResponse HandleKeyEventL( |
|
143 const TKeyEvent& aKeyEvent, |
|
144 TEventCode aType ); |
|
145 |
|
146 private: |
|
147 |
|
148 /** |
|
149 * Shows text given. |
|
150 */ |
|
151 void ShowL( const TDesC& aText, TBool& aLast, const TBool& aFileOutput = EFalse ); |
|
152 void ShowSingleValueL(TInt& aPixelMetric, TInt& aValue, TBool& aLast); |
|
153 void ClearL(); |
|
154 void CreateHeaderFileL() const; |
|
155 |
|
156 TFileName CreateLayoutNameL(TFileText& aFileHandle) const; |
|
157 |
|
158 private: // Data |
|
159 |
|
160 // Test view. |
|
161 CPixelMetricsMapperView* iView; |
|
162 |
|
163 CEikDialog* iDialog; |
|
164 |
|
165 TBool iFileOutputOn; |
|
166 |
|
167 CFbsBitmap* icon; |
|
168 CFbsBitmap* iconMask; |
|
169 |
|
170 TBool iAutoMode; |
|
171 TBool iMode; |
|
172 |
|
173 }; |
|
174 |
|
175 |
|
176 /** |
|
177 * CPixelMetricsMapperApplication |
|
178 */ |
|
179 class CPixelMetricsMapperApplication : public CEikApplication |
|
180 { |
|
181 private: // Functions from base classes |
|
182 |
|
183 /** |
|
184 * From CApaApplication. |
|
185 */ |
|
186 CApaDocument* CreateDocumentL(); |
|
187 |
|
188 /** |
|
189 * From CApaApplication. |
|
190 */ |
|
191 TUid AppDllUid() const; |
|
192 }; |
|
193 |
|
194 |
|
195 #endif // PMMAPPERAPP_H |
|
196 |
|
197 |
|
198 // End of File |