author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 16 Apr 2010 15:50:13 +0300 | |
changeset 18 | 2f34d5167611 |
parent 3 | 41300fa6a67c |
child 19 | fcece45ef507 |
permissions | -rw-r--r-- |
0 | 1 |
/**************************************************************************** |
2 |
** |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3 |
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 4 |
** All rights reserved. |
5 |
** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 |
** |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
7 |
** This file is part of the QtGui module of the Qt Toolkit. |
0 | 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 QS60STYLE_P_H |
|
43 |
#define QS60STYLE_P_H |
|
44 |
||
45 |
#include "qs60style.h" |
|
46 |
#include "qcommonstyle_p.h" |
|
47 |
#include <QtCore/qhash.h> |
|
48 |
||
49 |
// |
|
50 |
// W A R N I N G |
|
51 |
// ------------- |
|
52 |
// |
|
53 |
// This file is not part of the Qt API. It exists purely as an |
|
54 |
// implementation detail. This header file may change from version to |
|
55 |
// version without notice, or even be removed. |
|
56 |
// |
|
57 |
// We mean it. |
|
58 |
// |
|
59 |
||
60 |
QT_BEGIN_NAMESPACE |
|
61 |
||
62 |
const int MAX_NON_CUSTOM_PIXELMETRICS = 92; |
|
63 |
const int CUSTOMVALUESCOUNT = 4; |
|
64 |
enum { |
|
65 |
PM_Custom_FrameCornerWidth = MAX_NON_CUSTOM_PIXELMETRICS, |
|
66 |
PM_Custom_FrameCornerHeight, |
|
67 |
PM_Custom_BoldLineWidth, |
|
68 |
PM_Custom_ThinLineWidth |
|
69 |
}; |
|
70 |
const int MAX_PIXELMETRICS = MAX_NON_CUSTOM_PIXELMETRICS + CUSTOMVALUESCOUNT; |
|
71 |
||
72 |
typedef struct { |
|
73 |
unsigned short height; |
|
74 |
unsigned short width; |
|
75 |
int major_version; |
|
76 |
int minor_version; |
|
77 |
const char* layoutName; |
|
78 |
} layoutHeader; |
|
79 |
||
80 |
#ifdef Q_OS_SYMBIAN |
|
81 |
NONSHARABLE_CLASS (QS60StyleEnums) |
|
82 |
#else |
|
83 |
class QS60StyleEnums |
|
84 |
#endif |
|
85 |
: public QObject |
|
86 |
{ |
|
87 |
#ifndef Q_WS_S60 |
|
88 |
Q_OBJECT |
|
89 |
Q_ENUMS(FontCategories) |
|
90 |
Q_ENUMS(SkinParts) |
|
91 |
Q_ENUMS(ColorLists) |
|
92 |
#endif // !Q_WS_S60 |
|
93 |
||
94 |
public: |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
95 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
96 |
// S60 definitions within theme |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
97 |
enum ThemeDefinitions { |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
98 |
TD_AnimationData, |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
99 |
}; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
100 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
101 |
//Defines which values are contained within animation data (retrieved using TD_AnimationData). |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
102 |
//Additionally defines the order in which the items are given out in QList<QVariant>. |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
103 |
enum AnimationData { |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
104 |
AD_Interval = 0, |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
105 |
AD_NumberOfFrames, |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
106 |
AD_AnimationPlayMode, //currently not used as themes seem to contain invalid data |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
107 |
}; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
108 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
109 |
// Animation modes |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
110 |
enum AnimationMode { |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
111 |
AM_PlayOnce = 0, //animation is played exactly once |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
112 |
AM_Looping, //animation is repeated until stopped |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
113 |
AM_Bounce //animation is played repeatedly until stopped, |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
114 |
//but frames are played in reverse order every second time |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
115 |
//(no support yet) |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
116 |
}; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
117 |
|
0 | 118 |
// S60 look-and-feel font categories |
119 |
enum FontCategories { |
|
120 |
FC_Undefined, |
|
121 |
FC_Primary, |
|
122 |
FC_Secondary, |
|
123 |
FC_Title, |
|
124 |
FC_PrimarySmall, |
|
125 |
FC_Digital |
|
126 |
}; |
|
127 |
||
128 |
enum SkinParts { |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
129 |
SP_QgnGrafBarWaitAnim, |
0 | 130 |
SP_QgnGrafBarFrameCenter, |
131 |
SP_QgnGrafBarFrameSideL, |
|
132 |
SP_QgnGrafBarFrameSideR, |
|
133 |
SP_QgnGrafBarProgress, |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
134 |
SP_QgnGrafOrgBgGrid, |
0 | 135 |
SP_QgnGrafScrollArrowDown, |
136 |
SP_QgnGrafScrollArrowLeft, |
|
137 |
SP_QgnGrafScrollArrowRight, |
|
138 |
SP_QgnGrafScrollArrowUp, |
|
139 |
SP_QgnGrafTabActiveL, |
|
140 |
SP_QgnGrafTabActiveM, |
|
141 |
SP_QgnGrafTabActiveR, |
|
142 |
SP_QgnGrafTabPassiveL, |
|
143 |
SP_QgnGrafTabPassiveM, |
|
144 |
SP_QgnGrafTabPassiveR, |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
145 |
SP_QgnGrafNsliderEndLeft, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
146 |
SP_QgnGrafNsliderEndRight, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
147 |
SP_QgnGrafNsliderMiddle, |
0 | 148 |
SP_QgnIndiCheckboxOff, |
149 |
SP_QgnIndiCheckboxOn, |
|
150 |
SP_QgnIndiHlColSuper, // Available in S60 release 3.2 and later. |
|
151 |
SP_QgnIndiHlExpSuper, // Available in S60 release 3.2 and later. |
|
152 |
SP_QgnIndiHlLineBranch, // Available in S60 release 3.2 and later. |
|
153 |
SP_QgnIndiHlLineEnd, // Available in S60 release 3.2 and later. |
|
154 |
SP_QgnIndiHlLineStraight, // Available in S60 release 3.2 and later. |
|
155 |
SP_QgnIndiMarkedAdd, |
|
156 |
SP_QgnIndiNaviArrowLeft, |
|
157 |
SP_QgnIndiNaviArrowRight, |
|
158 |
SP_QgnIndiRadiobuttOff, |
|
159 |
SP_QgnIndiRadiobuttOn, |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
160 |
SP_QgnGrafNsliderMarker, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
161 |
SP_QgnGrafNsliderMarkerSelected, |
0 | 162 |
SP_QgnIndiSubMenu, |
163 |
SP_QgnNoteErased, |
|
164 |
SP_QgnNoteError, |
|
165 |
SP_QgnNoteInfo, |
|
166 |
SP_QgnNoteOk, |
|
167 |
SP_QgnNoteQuery, |
|
168 |
SP_QgnNoteWarning, |
|
169 |
SP_QgnPropFileSmall, |
|
170 |
SP_QgnPropFolderCurrent, |
|
171 |
SP_QgnPropFolderSmall, |
|
172 |
SP_QgnPropFolderSmallNew, |
|
173 |
SP_QgnPropPhoneMemcLarge, |
|
174 |
SP_QsnCpScrollHandleBottomPressed, //ScrollBar handle, pressed state |
|
175 |
SP_QsnCpScrollHandleMiddlePressed, |
|
176 |
SP_QsnCpScrollHandleTopPressed, |
|
177 |
SP_QsnBgScreen, |
|
178 |
SP_QsnCpScrollBgBottom, |
|
179 |
SP_QsnCpScrollBgMiddle, |
|
180 |
SP_QsnCpScrollBgTop, |
|
181 |
SP_QsnCpScrollHandleBottom, |
|
182 |
SP_QsnCpScrollHandleMiddle, |
|
183 |
SP_QsnCpScrollHandleTop, |
|
184 |
SP_QsnFrButtonTbCornerTl, // Button, normal state |
|
185 |
SP_QsnFrButtonTbCornerTr, |
|
186 |
SP_QsnFrButtonTbCornerBl, |
|
187 |
SP_QsnFrButtonTbCornerBr, |
|
188 |
SP_QsnFrButtonTbSideT, |
|
189 |
SP_QsnFrButtonTbSideB, |
|
190 |
SP_QsnFrButtonTbSideL, |
|
191 |
SP_QsnFrButtonTbSideR, |
|
192 |
SP_QsnFrButtonTbCenter, |
|
193 |
SP_QsnFrButtonTbCornerTlPressed, // Button, pressed state |
|
194 |
SP_QsnFrButtonTbCornerTrPressed, |
|
195 |
SP_QsnFrButtonTbCornerBlPressed, |
|
196 |
SP_QsnFrButtonTbCornerBrPressed, |
|
197 |
SP_QsnFrButtonTbSideTPressed, |
|
198 |
SP_QsnFrButtonTbSideBPressed, |
|
199 |
SP_QsnFrButtonTbSideLPressed, |
|
200 |
SP_QsnFrButtonTbSideRPressed, |
|
201 |
SP_QsnFrButtonTbCenterPressed, |
|
202 |
SP_QsnFrCaleCornerTl, // calendar grid item |
|
203 |
SP_QsnFrCaleCornerTr, |
|
204 |
SP_QsnFrCaleCornerBl, |
|
205 |
SP_QsnFrCaleCornerBr, |
|
206 |
SP_QsnFrCaleGSideT, |
|
207 |
SP_QsnFrCaleGSideB, |
|
208 |
SP_QsnFrCaleGSideL, |
|
209 |
SP_QsnFrCaleGSideR, |
|
210 |
SP_QsnFrCaleCenter, |
|
211 |
SP_QsnFrCaleHeadingCornerTl, // calendar grid header |
|
212 |
SP_QsnFrCaleHeadingCornerTr, |
|
213 |
SP_QsnFrCaleHeadingCornerBl, |
|
214 |
SP_QsnFrCaleHeadingCornerBr, |
|
215 |
SP_QsnFrCaleHeadingSideT, |
|
216 |
SP_QsnFrCaleHeadingSideB, |
|
217 |
SP_QsnFrCaleHeadingSideL, |
|
218 |
SP_QsnFrCaleHeadingSideR, |
|
219 |
SP_QsnFrCaleHeadingCenter, |
|
220 |
SP_QsnFrInputCornerTl, // Text input field |
|
221 |
SP_QsnFrInputCornerTr, |
|
222 |
SP_QsnFrInputCornerBl, |
|
223 |
SP_QsnFrInputCornerBr, |
|
224 |
SP_QsnFrInputSideT, |
|
225 |
SP_QsnFrInputSideB, |
|
226 |
SP_QsnFrInputSideL, |
|
227 |
SP_QsnFrInputSideR, |
|
228 |
SP_QsnFrInputCenter, |
|
229 |
SP_QsnFrListCornerTl, // List background |
|
230 |
SP_QsnFrListCornerTr, |
|
231 |
SP_QsnFrListCornerBl, |
|
232 |
SP_QsnFrListCornerBr, |
|
233 |
SP_QsnFrListSideT, |
|
234 |
SP_QsnFrListSideB, |
|
235 |
SP_QsnFrListSideL, |
|
236 |
SP_QsnFrListSideR, |
|
237 |
SP_QsnFrListCenter, |
|
238 |
SP_QsnFrPopupCornerTl, // Option menu background |
|
239 |
SP_QsnFrPopupCornerTr, |
|
240 |
SP_QsnFrPopupCornerBl, |
|
241 |
SP_QsnFrPopupCornerBr, |
|
242 |
SP_QsnFrPopupSideT, |
|
243 |
SP_QsnFrPopupSideB, |
|
244 |
SP_QsnFrPopupSideL, |
|
245 |
SP_QsnFrPopupSideR, |
|
246 |
SP_QsnFrPopupCenter, |
|
247 |
SP_QsnFrPopupPreviewCornerTl, // tool tip background |
|
248 |
SP_QsnFrPopupPreviewCornerTr, |
|
249 |
SP_QsnFrPopupPreviewCornerBl, |
|
250 |
SP_QsnFrPopupPreviewCornerBr, |
|
251 |
SP_QsnFrPopupPreviewSideT, |
|
252 |
SP_QsnFrPopupPreviewSideB, |
|
253 |
SP_QsnFrPopupPreviewSideL, |
|
254 |
SP_QsnFrPopupPreviewSideR, |
|
255 |
SP_QsnFrPopupPreviewCenter, |
|
256 |
SP_QsnFrSetOptCornerTl, // Settings list |
|
257 |
SP_QsnFrSetOptCornerTr, |
|
258 |
SP_QsnFrSetOptCornerBl, |
|
259 |
SP_QsnFrSetOptCornerBr, |
|
260 |
SP_QsnFrSetOptSideT, |
|
261 |
SP_QsnFrSetOptSideB, |
|
262 |
SP_QsnFrSetOptSideL, |
|
263 |
SP_QsnFrSetOptSideR, |
|
264 |
SP_QsnFrSetOptCenter, |
|
265 |
SP_QsnFrPopupSubCornerTl, // Toolbar background |
|
266 |
SP_QsnFrPopupSubCornerTr, |
|
267 |
SP_QsnFrPopupSubCornerBl, |
|
268 |
SP_QsnFrPopupSubCornerBr, |
|
269 |
SP_QsnFrPopupSubSideT, |
|
270 |
SP_QsnFrPopupSubSideB, |
|
271 |
SP_QsnFrPopupSubSideL, |
|
272 |
SP_QsnFrPopupSubSideR, |
|
273 |
SP_QsnFrPopupSubCenter, |
|
274 |
SP_QsnFrSctrlButtonCornerTl, // Toolbar button |
|
275 |
SP_QsnFrSctrlButtonCornerTr, |
|
276 |
SP_QsnFrSctrlButtonCornerBl, |
|
277 |
SP_QsnFrSctrlButtonCornerBr, |
|
278 |
SP_QsnFrSctrlButtonSideT, |
|
279 |
SP_QsnFrSctrlButtonSideB, |
|
280 |
SP_QsnFrSctrlButtonSideL, |
|
281 |
SP_QsnFrSctrlButtonSideR, |
|
282 |
SP_QsnFrSctrlButtonCenter, |
|
283 |
SP_QsnFrSctrlButtonCornerTlPressed, // Toolbar button, pressed |
|
284 |
SP_QsnFrSctrlButtonCornerTrPressed, |
|
285 |
SP_QsnFrSctrlButtonCornerBlPressed, |
|
286 |
SP_QsnFrSctrlButtonCornerBrPressed, |
|
287 |
SP_QsnFrSctrlButtonSideTPressed, |
|
288 |
SP_QsnFrSctrlButtonSideBPressed, |
|
289 |
SP_QsnFrSctrlButtonSideLPressed, |
|
290 |
SP_QsnFrSctrlButtonSideRPressed, |
|
291 |
SP_QsnFrSctrlButtonCenterPressed, |
|
292 |
SP_QsnFrButtonCornerTlInactive, // Inactive button |
|
293 |
SP_QsnFrButtonCornerTrInactive, |
|
294 |
SP_QsnFrButtonCornerBlInactive, |
|
295 |
SP_QsnFrButtonCornerBrInactive, |
|
296 |
SP_QsnFrButtonSideTInactive, |
|
297 |
SP_QsnFrButtonSideBInactive, |
|
298 |
SP_QsnFrButtonSideLInactive, |
|
299 |
SP_QsnFrButtonSideRInactive, |
|
300 |
SP_QsnFrButtonCenterInactive, |
|
301 |
}; |
|
302 |
||
303 |
enum ColorLists { |
|
304 |
CL_QsnHighlightColors, |
|
305 |
CL_QsnIconColors, |
|
306 |
CL_QsnLineColors, |
|
307 |
CL_QsnOtherColors, |
|
308 |
CL_QsnParentColors, |
|
309 |
CL_QsnTextColors |
|
310 |
}; |
|
311 |
}; |
|
312 |
||
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
313 |
#ifdef Q_WS_S60 |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
314 |
class CAknBitmapAnimation; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
315 |
NONSHARABLE_CLASS (AnimationData) : public QObject |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
316 |
{ |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
317 |
public: |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
318 |
AnimationData(const QS60StyleEnums::SkinParts part, int frames, int interval); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
319 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
320 |
const QS60StyleEnums::SkinParts m_id; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
321 |
int m_frames; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
322 |
int m_interval; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
323 |
QS60StyleEnums::AnimationMode m_mode; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
324 |
}; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
325 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
326 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
327 |
NONSHARABLE_CLASS (AnimationDataV2) : public AnimationData |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
328 |
{ |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
329 |
public: |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
330 |
AnimationDataV2(const AnimationData &data); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
331 |
~AnimationDataV2(); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
332 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
333 |
CAknBitmapAnimation *m_animation; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
334 |
int m_currentFrame; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
335 |
bool m_resourceBased; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
336 |
int m_timerId; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
337 |
}; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
338 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
339 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
340 |
class QS60StyleAnimation : public QObject |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
341 |
{ |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
342 |
public: |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
343 |
QS60StyleAnimation(const QS60StyleEnums::SkinParts part, int frames, int interval); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
344 |
~QS60StyleAnimation(); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
345 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
346 |
public: |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
347 |
QS60StyleEnums::SkinParts animationId() const {return m_currentData->m_id;} |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
348 |
int frameCount() const { return m_currentData->m_frames;} |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
349 |
int interval() const {return m_currentData->m_interval;} |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
350 |
QS60StyleEnums::AnimationMode playMode() const {return m_currentData->m_mode;} |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
351 |
CAknBitmapAnimation* animationObject() const {return m_currentData->m_animation;} |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
352 |
bool isResourceBased() const {return m_currentData->m_resourceBased;} |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
353 |
int timerId() const {return m_currentData->m_timerId;} |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
354 |
int currentFrame() const {return m_currentData->m_currentFrame;} |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
355 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
356 |
void setFrameCount(int frameCount) {m_currentData->m_frames = frameCount;} |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
357 |
void setInterval(int interval) {m_currentData->m_interval = interval;} |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
358 |
void setAnimationObject(CAknBitmapAnimation* animation); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
359 |
void setResourceBased(bool resourceBased) {m_currentData->m_resourceBased = resourceBased;} |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
360 |
void setTimerId(int timerId) {m_currentData->m_timerId = timerId;} |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
361 |
void setCurrentFrame(int currentFrame) {m_currentData->m_currentFrame = currentFrame;} |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
362 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
363 |
void resetToDefaults(); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
364 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
365 |
private: //data members |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
366 |
//TODO: consider changing these to non-pointers as the classes are rather small anyway |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
367 |
AnimationData *m_defaultData; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
368 |
AnimationDataV2 *m_currentData; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
369 |
}; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
370 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
371 |
#endif //Q_WS_S60 |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
372 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
373 |
|
0 | 374 |
class QFocusFrame; |
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
375 |
class QProgressBar; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
376 |
class QS60StyleAnimation; |
0 | 377 |
|
378 |
// Private class |
|
379 |
#ifdef Q_OS_SYMBIAN |
|
380 |
NONSHARABLE_CLASS (QS60StylePrivate) |
|
381 |
#else |
|
382 |
class QS60StylePrivate |
|
383 |
#endif |
|
384 |
: public QCommonStylePrivate |
|
385 |
{ |
|
386 |
Q_DECLARE_PUBLIC(QS60Style) |
|
387 |
||
388 |
public: |
|
389 |
QS60StylePrivate(); |
|
390 |
~QS60StylePrivate(); |
|
391 |
||
392 |
enum SkinElements { |
|
393 |
SE_ButtonNormal, |
|
394 |
SE_ButtonPressed, |
|
395 |
SE_FrameLineEdit, |
|
396 |
SE_ProgressBarGrooveHorizontal, |
|
397 |
SE_ProgressBarIndicatorHorizontal, |
|
398 |
SE_ProgressBarGrooveVertical, |
|
399 |
SE_ProgressBarIndicatorVertical, |
|
400 |
SE_ScrollBarGrooveHorizontal, |
|
401 |
SE_ScrollBarGrooveVertical, |
|
402 |
SE_ScrollBarHandleHorizontal, |
|
403 |
SE_ScrollBarHandleVertical, |
|
404 |
SE_SliderHandleHorizontal, |
|
405 |
SE_SliderHandleVertical, |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
406 |
SE_SliderHandleSelectedHorizontal, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
407 |
SE_SliderHandleSelectedVertical, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
408 |
SE_SliderGrooveVertical, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
409 |
SE_SliderGrooveHorizontal, |
0 | 410 |
SE_TabBarTabEastActive, |
411 |
SE_TabBarTabEastInactive, |
|
412 |
SE_TabBarTabNorthActive, |
|
413 |
SE_TabBarTabNorthInactive, |
|
414 |
SE_TabBarTabSouthActive, |
|
415 |
SE_TabBarTabSouthInactive, |
|
416 |
SE_TabBarTabWestActive, |
|
417 |
SE_TabBarTabWestInactive, |
|
418 |
SE_ListHighlight, |
|
419 |
SE_OptionsMenu, |
|
420 |
SE_SettingsList, |
|
421 |
SE_TableItem, |
|
422 |
SE_TableHeaderItem, |
|
423 |
SE_ToolTip, //own graphic available on 3.2+ releases, |
|
424 |
SE_ToolBar, |
|
425 |
SE_ToolBarButton, |
|
426 |
SE_ToolBarButtonPressed, |
|
427 |
SE_PanelBackground, |
|
428 |
SE_ScrollBarHandlePressedHorizontal, //only for 5.0+ |
|
429 |
SE_ScrollBarHandlePressedVertical, |
|
430 |
SE_ButtonInactive, |
|
431 |
SE_Editor, |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
432 |
SE_DropArea |
0 | 433 |
}; |
434 |
||
435 |
enum SkinFrameElements { |
|
436 |
SF_ButtonNormal, |
|
437 |
SF_ButtonPressed, |
|
438 |
SF_FrameLineEdit, |
|
439 |
SF_ListHighlight, |
|
440 |
SF_OptionsMenu, |
|
441 |
SF_SettingsList, |
|
442 |
SF_TableItem, |
|
443 |
SF_TableHeaderItem, |
|
444 |
SF_ToolTip, |
|
445 |
SF_ToolBar, |
|
446 |
SF_ToolBarButton, |
|
447 |
SF_ToolBarButtonPressed, |
|
448 |
SF_PanelBackground, |
|
449 |
SF_ButtonInactive, |
|
450 |
}; |
|
451 |
||
452 |
enum SkinElementFlag { |
|
453 |
SF_PointNorth = 0x0001, // North = the default |
|
454 |
SF_PointEast = 0x0002, |
|
455 |
SF_PointSouth = 0x0004, |
|
456 |
SF_PointWest = 0x0008, |
|
457 |
||
458 |
SF_StateEnabled = 0x0010, // Enabled = the default |
|
459 |
SF_StateDisabled = 0x0020, |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
460 |
SF_ColorSkinned = 0x0040, // pixmap is colored with foreground pen color |
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
461 |
SF_Animation = 0x0080, |
0 | 462 |
}; |
463 |
||
464 |
enum CacheClearReason { |
|
465 |
CC_UndefinedChange = 0, |
|
466 |
CC_LayoutChange, |
|
467 |
CC_ThemeChange |
|
468 |
}; |
|
469 |
||
470 |
Q_DECLARE_FLAGS(SkinElementFlags, SkinElementFlag) |
|
471 |
||
472 |
// draws skin element |
|
473 |
static void drawSkinElement(SkinElements element, QPainter *painter, |
|
474 |
const QRect &rect, SkinElementFlags flags = KDefaultSkinElementFlags); |
|
475 |
// draws a specific skin part |
|
476 |
static void drawSkinPart(QS60StyleEnums::SkinParts part, QPainter *painter, |
|
477 |
const QRect &rect, SkinElementFlags flags = KDefaultSkinElementFlags); |
|
478 |
// gets pixel metrics value |
|
479 |
static short pixelMetric(int metric); |
|
480 |
// gets color. 'index' is NOT 0-based. |
|
481 |
// It corresponds to the enum key 1-based numbers of TAknsQsnXYZColorsIndex, not the values. |
|
482 |
static QColor s60Color(QS60StyleEnums::ColorLists list, |
|
483 |
int index, const QStyleOption *option); |
|
484 |
// gets state specific color |
|
485 |
static QColor stateColor(const QColor &color, const QStyleOption *option); |
|
486 |
// gets lighter color than base color |
|
487 |
static QColor lighterColor(const QColor &baseColor); |
|
488 |
//deduces if the given widget should have separately themeable background |
|
489 |
static bool drawsOwnThemeBackground(const QWidget *widget); |
|
490 |
||
491 |
QFont s60Font(QS60StyleEnums::FontCategories fontCategory, |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
492 |
int pointSize = -1, bool resolveFontSize = true) const; |
0 | 493 |
// clears all style caches (fonts, colors, pixmaps) |
494 |
void clearCaches(CacheClearReason reason = CC_UndefinedChange); |
|
495 |
||
496 |
// themed main background oprations |
|
497 |
void setBackgroundTexture(QApplication *application) const; |
|
498 |
static void deleteBackground(); |
|
499 |
||
500 |
static bool isTouchSupported(); |
|
501 |
static bool isToolBarBackground(); |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
502 |
static bool hasSliderGrooveGraphic(); |
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
503 |
static bool isSingleClickUi(); |
0 | 504 |
|
505 |
// calculates average color based on button skin graphics (minus borders). |
|
506 |
QColor colorFromFrameGraphics(SkinFrameElements frame) const; |
|
507 |
||
508 |
//set theme palette for application |
|
509 |
void setThemePalette(QApplication *application) const; |
|
510 |
//access to theme palette |
|
511 |
static QPalette* themePalette(); |
|
512 |
||
513 |
static const layoutHeader m_layoutHeaders[]; |
|
514 |
static const short data[][MAX_PIXELMETRICS]; |
|
515 |
||
516 |
void setCurrentLayout(int layoutIndex); |
|
517 |
void setActiveLayout(); |
|
518 |
// Pointer |
|
519 |
static short const *m_pmPointer; |
|
520 |
// number of layouts supported by the style |
|
521 |
static const int m_numberOfLayouts; |
|
522 |
||
523 |
mutable QHash<QPair<QS60StyleEnums::FontCategories , int>, QFont> m_mappedFontsCache; |
|
524 |
mutable QHash<SkinFrameElements, QColor> m_colorCache; |
|
525 |
||
526 |
// Has one entry per SkinFrameElements |
|
527 |
static const struct frameElementCenter { |
|
528 |
SkinElements element; |
|
529 |
QS60StyleEnums::SkinParts center; |
|
530 |
} m_frameElementsData[]; |
|
531 |
||
532 |
static QPixmap frame(SkinFrameElements frame, const QSize &size, |
|
533 |
SkinElementFlags flags = KDefaultSkinElementFlags); |
|
534 |
static QPixmap backgroundTexture(); |
|
535 |
||
536 |
#ifdef Q_WS_S60 |
|
537 |
void handleDynamicLayoutVariantSwitch(); |
|
538 |
void handleSkinChange(); |
|
539 |
#endif // Q_WS_S60 |
|
540 |
||
541 |
static QSize naviPaneSize(); |
|
542 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
543 |
//Checks that the current brush is transparent or has BrushStyle NoBrush, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
544 |
//so that theme graphic background can be drawn. |
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
545 |
static bool canDrawThemeBackground(const QBrush &backgroundBrush, const QWidget *widget); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
546 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
547 |
static int currentAnimationFrame(QS60StyleEnums::SkinParts part); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
548 |
#ifdef Q_WS_S60 |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
549 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
550 |
//No support for animations on emulated style |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
551 |
void startAnimation(QS60StyleEnums::SkinParts animation); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
552 |
void stopAnimation(QS60StyleEnums::SkinParts animation); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
553 |
static QS60StyleAnimation* animationDefinition(QS60StyleEnums::SkinParts part); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
554 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
555 |
#endif |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
556 |
|
0 | 557 |
private: |
558 |
static void drawPart(QS60StyleEnums::SkinParts part, QPainter *painter, |
|
559 |
const QRect &rect, SkinElementFlags flags = KDefaultSkinElementFlags); |
|
560 |
static void drawRow(QS60StyleEnums::SkinParts start, QS60StyleEnums::SkinParts middle, |
|
561 |
QS60StyleEnums::SkinParts end, Qt::Orientation orientation, QPainter *painter, |
|
562 |
const QRect &rect, SkinElementFlags flags = KDefaultSkinElementFlags); |
|
563 |
static void drawFrame(SkinFrameElements frame, QPainter *painter, |
|
564 |
const QRect &rect, SkinElementFlags flags = KDefaultSkinElementFlags); |
|
565 |
||
566 |
static QPixmap cachedPart(QS60StyleEnums::SkinParts part, const QSize &size, |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
567 |
QPainter *painter, SkinElementFlags flags = KDefaultSkinElementFlags); |
0 | 568 |
static QPixmap cachedFrame(SkinFrameElements frame, const QSize &size, |
569 |
SkinElementFlags flags = KDefaultSkinElementFlags); |
|
570 |
||
571 |
static void refreshUI(); |
|
572 |
||
573 |
// set S60 font for widget |
|
574 |
void setFont(QWidget *widget) const; |
|
575 |
void setThemePalette(QWidget *widget) const; |
|
576 |
void setThemePalette(QPalette *palette) const; |
|
577 |
void setThemePaletteHash(QPalette *palette) const; |
|
578 |
static void storeThemePalette(QPalette *palette); |
|
579 |
static void deleteThemePalette(); |
|
580 |
||
581 |
static QSize partSize(QS60StyleEnums::SkinParts part, |
|
582 |
SkinElementFlags flags = KDefaultSkinElementFlags); |
|
583 |
static QPixmap part(QS60StyleEnums::SkinParts part, const QSize &size, |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
584 |
QPainter *painter, SkinElementFlags flags = KDefaultSkinElementFlags); |
0 | 585 |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
586 |
static QFont s60Font_specific(QS60StyleEnums::FontCategories fontCategory, |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
587 |
int pointSize, bool resolveFontSize); |
0 | 588 |
|
589 |
static QSize screenSize(); |
|
590 |
||
591 |
// Contains background texture. |
|
592 |
static QPixmap *m_background; |
|
593 |
const static SkinElementFlags KDefaultSkinElementFlags; |
|
594 |
// defined theme palette |
|
595 |
static QPalette *m_themePalette; |
|
596 |
QPalette m_originalPalette; |
|
597 |
||
598 |
QPointer<QFocusFrame> m_focusFrame; |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
599 |
static qint64 m_webPaletteKey; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
600 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
601 |
#ifdef Q_WS_S60 |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
602 |
//list of progress bars having animation running |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
603 |
QList<QProgressBar *> m_bars; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
604 |
#endif |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
605 |
|
0 | 606 |
}; |
607 |
||
608 |
QT_END_NAMESPACE |
|
609 |
||
610 |
#endif // QS60STYLE_P_H |