changeset 3 | 41300fa6a67c |
parent 0 | 1918ee327afb |
child 4 | 3b1da2848fc7 |
2:56cd8111b7f7 | 3:41300fa6a67c |
---|---|
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtGui of the Qt Toolkit. |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
8 ** |
8 ** |
9 ** $QT_BEGIN_LICENSE:LGPL$ |
9 ** $QT_BEGIN_LICENSE:LGPL$ |
10 ** No Commercial Usage |
10 ** No Commercial Usage |
11 ** This file contains pre-release code and may not be distributed. |
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 |
12 ** You may use this file in accordance with the terms and conditions |
60 #include <avkon.mbg> |
60 #include <avkon.mbg> |
61 #include <AknFontAccess.h> |
61 #include <AknFontAccess.h> |
62 #include <AknLayoutFont.h> |
62 #include <AknLayoutFont.h> |
63 #include <aknutils.h> |
63 #include <aknutils.h> |
64 #include <aknnavi.h> |
64 #include <aknnavi.h> |
65 #include <gulicon.h> |
|
65 |
66 |
66 #if !defined(QT_NO_STYLE_S60) || defined(QT_PLUGIN) |
67 #if !defined(QT_NO_STYLE_S60) || defined(QT_PLUGIN) |
67 |
68 |
68 QT_BEGIN_NAMESPACE |
69 QT_BEGIN_NAMESPACE |
69 |
70 |
70 enum TDrawType { |
71 enum TDrawType { |
71 EDrawIcon, |
72 EDrawIcon, |
73 EDrawGulIcon, |
|
72 EDrawBackground, |
74 EDrawBackground, |
73 ENoDraw |
75 ENoDraw |
74 }; |
76 }; |
75 |
77 |
76 enum TSupportRelease { |
78 enum TSupportRelease { |
78 ES60_3_1 = 0x0001, |
80 ES60_3_1 = 0x0001, |
79 ES60_3_2 = 0x0002, |
81 ES60_3_2 = 0x0002, |
80 ES60_5_0 = 0x0004, |
82 ES60_5_0 = 0x0004, |
81 ES60_5_1 = 0x0008, |
83 ES60_5_1 = 0x0008, |
82 ES60_5_2 = 0x0010, |
84 ES60_5_2 = 0x0010, |
85 ES60_3_X = ES60_3_1 | ES60_3_2, |
|
86 // Releases before Symbian Foundation |
|
87 ES60_PreSF = ES60_3_1 | ES60_3_2 | ES60_5_0, |
|
83 // Add all new releases here |
88 // Add all new releases here |
84 ES60_AllReleases = ES60_3_1 | ES60_3_2 | ES60_5_0 | ES60_5_1 | ES60_5_2 |
89 ES60_All = ES60_3_1 | ES60_3_2 | ES60_5_0 | ES60_5_1 | ES60_5_2 |
85 }; |
90 }; |
86 |
91 |
87 typedef struct { |
92 typedef struct { |
88 const TAknsItemID &skinID; |
93 const TAknsItemID &skinID; |
89 TDrawType drawType; |
94 TDrawType drawType; |
97 public: |
102 public: |
98 static QPixmap skinnedGraphics(QS60StyleEnums::SkinParts stylepart, |
103 static QPixmap skinnedGraphics(QS60StyleEnums::SkinParts stylepart, |
99 const QSize &size, QS60StylePrivate::SkinElementFlags flags); |
104 const QSize &size, QS60StylePrivate::SkinElementFlags flags); |
100 static QPixmap skinnedGraphics(QS60StylePrivate::SkinFrameElements frameElement, const QSize &size, QS60StylePrivate::SkinElementFlags flags); |
105 static QPixmap skinnedGraphics(QS60StylePrivate::SkinFrameElements frameElement, const QSize &size, QS60StylePrivate::SkinElementFlags flags); |
101 static QPixmap colorSkinnedGraphics(const QS60StyleEnums::SkinParts &stylepart, |
106 static QPixmap colorSkinnedGraphics(const QS60StyleEnums::SkinParts &stylepart, |
102 const QSize &size, QS60StylePrivate::SkinElementFlags flags); |
107 const QSize &size, QPainter *painter, QS60StylePrivate::SkinElementFlags flags); |
103 static QColor colorValue(const TAknsItemID &colorGroup, int colorIndex); |
108 static QColor colorValue(const TAknsItemID &colorGroup, int colorIndex); |
104 static QPixmap fromFbsBitmap(CFbsBitmap *icon, CFbsBitmap *mask, QS60StylePrivate::SkinElementFlags flags, QImage::Format format); |
109 static QPixmap fromFbsBitmap(CFbsBitmap *icon, CFbsBitmap *mask, QS60StylePrivate::SkinElementFlags flags, const TSize& targetSize); |
105 static bool disabledPartGraphic(QS60StyleEnums::SkinParts &part); |
110 static bool disabledPartGraphic(QS60StyleEnums::SkinParts &part); |
106 static bool disabledFrameGraphic(QS60StylePrivate::SkinFrameElements &frame); |
111 static bool disabledFrameGraphic(QS60StylePrivate::SkinFrameElements &frame); |
107 static QPixmap generateMissingThemeGraphic(QS60StyleEnums::SkinParts &part, const QSize &size, QS60StylePrivate::SkinElementFlags flags); |
112 static QPixmap generateMissingThemeGraphic(QS60StyleEnums::SkinParts &part, const QSize &size, QS60StylePrivate::SkinElementFlags flags); |
108 static QSize naviPaneSize(); |
113 static QSize naviPaneSize(); |
114 static TAknsItemID partSpecificThemeId(int part); |
|
109 |
115 |
110 private: |
116 private: |
111 static QPixmap createSkinnedGraphicsLX(QS60StyleEnums::SkinParts part, |
117 static QPixmap createSkinnedGraphicsLX(QS60StyleEnums::SkinParts part, |
112 const QSize &size, QS60StylePrivate::SkinElementFlags flags); |
118 const QSize &size, QS60StylePrivate::SkinElementFlags flags); |
113 static QPixmap createSkinnedGraphicsLX(QS60StylePrivate::SkinFrameElements frameElement, const QSize &size, QS60StylePrivate::SkinElementFlags flags); |
119 static QPixmap createSkinnedGraphicsLX(QS60StylePrivate::SkinFrameElements frameElement, const QSize &size, QS60StylePrivate::SkinElementFlags flags); |
114 static QPixmap colorSkinnedGraphicsLX(const QS60StyleEnums::SkinParts &stylepart, |
120 static QPixmap colorSkinnedGraphicsLX(const QS60StyleEnums::SkinParts &stylepart, |
115 const QSize &size, QS60StylePrivate::SkinElementFlags flags); |
121 const QSize &size, QPainter *painter, QS60StylePrivate::SkinElementFlags flags); |
116 static void frameIdAndCenterId(QS60StylePrivate::SkinFrameElements frameElement, TAknsItemID &frameId, TAknsItemID ¢erId); |
122 static void frameIdAndCenterId(QS60StylePrivate::SkinFrameElements frameElement, TAknsItemID &frameId, TAknsItemID ¢erId); |
117 static TRect innerRectFromElement(QS60StylePrivate::SkinFrameElements frameElement, const TRect &outerRect); |
123 static TRect innerRectFromElement(QS60StylePrivate::SkinFrameElements frameElement, const TRect &outerRect); |
118 static void checkAndUnCompressBitmapL(CFbsBitmap*& aOriginalBitmap); |
124 static void fallbackInfo(const QS60StyleEnums::SkinParts &stylePart, TInt &fallbackIndex); |
119 static void checkAndUnCompressBitmap(CFbsBitmap*& aOriginalBitmap); |
|
120 static void unCompressBitmapL(const TRect& aTrgRect, CFbsBitmap* aTrgBitmap, CFbsBitmap* aSrcBitmap); |
|
121 static void colorGroupAndIndex(QS60StyleEnums::SkinParts skinID, |
|
122 TAknsItemID &colorGroup, int &colorIndex); |
|
123 static void fallbackInfo(const QS60StyleEnums::SkinParts &stylepart, TDes& fallbackFileName, TInt& fallbackIndex); |
|
124 static bool checkSupport(const int supportedRelease); |
125 static bool checkSupport(const int supportedRelease); |
125 static TAknsItemID checkAndUpdateReleaseSpecificGraphics(int part); |
|
126 // Array to match the skin ID, fallback graphics and Qt widget graphics. |
126 // Array to match the skin ID, fallback graphics and Qt widget graphics. |
127 static const partMapEntry m_partMap[]; |
127 static const partMapEntry m_partMap[]; |
128 }; |
128 }; |
129 |
129 |
130 const partMapEntry QS60StyleModeSpecifics::m_partMap[] = { |
130 const partMapEntry QS60StyleModeSpecifics::m_partMap[] = { |
131 /* SP_QgnGrafBarWait */ {KAknsIIDQgnGrafBarWaitAnim, EDrawIcon, ES60_AllReleases, -1,-1}, |
131 /* SP_QgnGrafBarWait */ {KAknsIIDQgnGrafBarWaitAnim, EDrawIcon, ES60_All, -1,-1}, |
132 /* SP_QgnGrafBarFrameCenter */ {KAknsIIDQgnGrafBarFrameCenter, EDrawIcon, ES60_AllReleases, -1,-1}, |
132 /* SP_QgnGrafBarFrameCenter */ {KAknsIIDQgnGrafBarFrameCenter, EDrawIcon, ES60_All, -1,-1}, |
133 /* SP_QgnGrafBarFrameSideL */ {KAknsIIDQgnGrafBarFrameSideL, EDrawIcon, ES60_AllReleases, -1,-1}, |
133 /* SP_QgnGrafBarFrameSideL */ {KAknsIIDQgnGrafBarFrameSideL, EDrawIcon, ES60_All, -1,-1}, |
134 /* SP_QgnGrafBarFrameSideR */ {KAknsIIDQgnGrafBarFrameSideR, EDrawIcon, ES60_AllReleases, -1,-1}, |
134 /* SP_QgnGrafBarFrameSideR */ {KAknsIIDQgnGrafBarFrameSideR, EDrawIcon, ES60_All, -1,-1}, |
135 /* SP_QgnGrafBarProgress */ {KAknsIIDQgnGrafBarProgress, EDrawIcon, ES60_AllReleases, -1,-1}, |
135 /* SP_QgnGrafBarProgress */ {KAknsIIDQgnGrafBarProgress, EDrawIcon, ES60_All, -1,-1}, |
136 /* SP_QgnGrafScrollArrowDown */ {KAknsIIDQgnGrafScrollArrowDown, EDrawIcon, ES60_AllReleases, -1,-1}, |
136 /* SP_QgnGrafScrollArrowDown */ {KAknsIIDQgnGrafScrollArrowDown, EDrawGulIcon, ES60_All, -1,-1}, |
137 /* SP_QgnGrafScrollArrowLeft */ {KAknsIIDQgnGrafScrollArrowLeft, EDrawIcon, ES60_AllReleases, -1,-1}, |
137 /* SP_QgnGrafScrollArrowLeft */ {KAknsIIDQgnGrafScrollArrowLeft, EDrawGulIcon, ES60_All, -1,-1}, |
138 /* SP_QgnGrafScrollArrowRight */ {KAknsIIDQgnGrafScrollArrowRight, EDrawIcon, ES60_AllReleases, -1,-1}, |
138 /* SP_QgnGrafScrollArrowRight */ {KAknsIIDQgnGrafScrollArrowRight, EDrawGulIcon, ES60_All, -1,-1}, |
139 /* SP_QgnGrafScrollArrowUp */ {KAknsIIDQgnGrafScrollArrowUp, EDrawIcon, ES60_AllReleases, -1,-1}, |
139 /* SP_QgnGrafScrollArrowUp */ {KAknsIIDQgnGrafScrollArrowUp, EDrawGulIcon, ES60_All, -1,-1}, |
140 /* SP_QgnGrafTabActiveL */ {KAknsIIDQgnGrafTabActiveL, EDrawIcon, ES60_AllReleases, -1,-1}, |
140 /* SP_QgnGrafTabActiveL */ {KAknsIIDQgnGrafTabActiveL, EDrawIcon, ES60_All, -1,-1}, |
141 /* SP_QgnGrafTabActiveM */ {KAknsIIDQgnGrafTabActiveM, EDrawIcon, ES60_AllReleases, -1,-1}, |
141 /* SP_QgnGrafTabActiveM */ {KAknsIIDQgnGrafTabActiveM, EDrawIcon, ES60_All, -1,-1}, |
142 /* SP_QgnGrafTabActiveR */ {KAknsIIDQgnGrafTabActiveR, EDrawIcon, ES60_AllReleases, -1,-1}, |
142 /* SP_QgnGrafTabActiveR */ {KAknsIIDQgnGrafTabActiveR, EDrawIcon, ES60_All, -1,-1}, |
143 /* SP_QgnGrafTabPassiveL */ {KAknsIIDQgnGrafTabPassiveL, EDrawIcon, ES60_AllReleases, -1,-1}, |
143 /* SP_QgnGrafTabPassiveL */ {KAknsIIDQgnGrafTabPassiveL, EDrawIcon, ES60_All, -1,-1}, |
144 /* SP_QgnGrafTabPassiveM */ {KAknsIIDQgnGrafTabPassiveM, EDrawIcon, ES60_AllReleases, -1,-1}, |
144 /* SP_QgnGrafTabPassiveM */ {KAknsIIDQgnGrafTabPassiveM, EDrawIcon, ES60_All, -1,-1}, |
145 /* SP_QgnGrafTabPassiveR */ {KAknsIIDQgnGrafTabPassiveR, EDrawIcon, ES60_AllReleases, -1,-1}, |
145 /* SP_QgnGrafTabPassiveR */ {KAknsIIDQgnGrafTabPassiveR, EDrawIcon, ES60_All, -1,-1}, |
146 /* SP_QgnIndiCheckboxOff */ {KAknsIIDQgnIndiCheckboxOff, EDrawIcon, ES60_AllReleases, -1,-1}, |
146 |
147 /* SP_QgnIndiCheckboxOn */ {KAknsIIDQgnIndiCheckboxOn, EDrawIcon, ES60_AllReleases, -1,-1}, |
147 // In 3.1 there is no slider groove. |
148 /* SP_QgnGrafNsliderEndLeft */ {KAknsIIDNone, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x19cf /* KAknsIIDQgnGrafNsliderEndLeft */}, |
|
149 /* SP_QgnGrafNsliderEndRight */ {KAknsIIDNone, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x19d0 /* KAknsIIDQgnGrafNsliderEndRight */}, |
|
150 /* SP_QgnGrafNsliderMiddle */ {KAknsIIDNone, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x19d2 /* KAknsIIDQgnGrafNsliderMiddle */}, |
|
151 /* SP_QgnIndiCheckboxOff */ {KAknsIIDQgnIndiCheckboxOff, EDrawIcon, ES60_All, -1,-1}, |
|
152 /* SP_QgnIndiCheckboxOn */ {KAknsIIDQgnIndiCheckboxOn, EDrawIcon, ES60_All, -1,-1}, |
|
153 |
|
148 // Following 5 items (SP_QgnIndiHlColSuper - SP_QgnIndiHlLineStraight) are available starting from S60 release 3.2. |
154 // Following 5 items (SP_QgnIndiHlColSuper - SP_QgnIndiHlLineStraight) are available starting from S60 release 3.2. |
149 // In 3.1 CommonStyle drawing is used for these QTreeView elements, since no similar icons in AVKON UI. |
155 // In 3.1 CommonStyle drawing is used for these QTreeView elements, since no similar icons in AVKON UI. |
150 /* SP_QgnIndiHlColSuper */ {KAknsIIDNone, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x17d5 /* KAknsIIDQgnIndiHlColSuper */}, |
156 /* SP_QgnIndiHlColSuper */ {KAknsIIDNone, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x17d5 /* KAknsIIDQgnIndiHlColSuper */}, |
151 /* SP_QgnIndiHlExpSuper */ {KAknsIIDNone, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x17d6 /* KAknsIIDQgnIndiHlExpSuper */}, |
157 /* SP_QgnIndiHlExpSuper */ {KAknsIIDNone, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x17d6 /* KAknsIIDQgnIndiHlExpSuper */}, |
152 /* SP_QgnIndiHlLineBranch */ {KAknsIIDNone, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x17d7 /* KAknsIIDQgnIndiHlLineBranch */}, |
158 /* SP_QgnIndiHlLineBranch */ {KAknsIIDNone, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x17d7 /* KAknsIIDQgnIndiHlLineBranch */}, |
153 /* SP_QgnIndiHlLineEnd */ {KAknsIIDNone, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x17d8 /* KAknsIIDQgnIndiHlLineEnd */}, |
159 /* SP_QgnIndiHlLineEnd */ {KAknsIIDNone, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x17d8 /* KAknsIIDQgnIndiHlLineEnd */}, |
154 /* SP_QgnIndiHlLineStraight */ {KAknsIIDNone, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x17d9 /* KAknsIIDQgnIndiHlLineStraight */}, |
160 /* SP_QgnIndiHlLineStraight */ {KAknsIIDNone, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x17d9 /* KAknsIIDQgnIndiHlLineStraight */}, |
155 /* SP_QgnIndiMarkedAdd */ {KAknsIIDQgnIndiMarkedAdd, EDrawIcon, ES60_AllReleases, -1,-1}, |
161 /* SP_QgnIndiMarkedAdd */ {KAknsIIDQgnIndiMarkedAdd, EDrawIcon, ES60_All, -1,-1}, |
156 /* SP_QgnIndiNaviArrowLeft */ {KAknsIIDQgnGrafScrollArrowLeft, EDrawIcon, ES60_AllReleases, -1,-1}, |
162 /* SP_QgnIndiNaviArrowLeft */ {KAknsIIDQgnIndiNaviArrowLeft, EDrawIcon, ES60_All, -1,-1}, |
157 /* SP_QgnIndiNaviArrowRight */ {KAknsIIDQgnGrafScrollArrowRight, EDrawIcon, ES60_AllReleases, -1,-1}, |
163 /* SP_QgnIndiNaviArrowRight */ {KAknsIIDQgnIndiNaviArrowRight, EDrawIcon, ES60_All, -1,-1}, |
158 /* SP_QgnIndiRadiobuttOff */ {KAknsIIDQgnIndiRadiobuttOff, EDrawIcon, ES60_AllReleases, -1,-1}, |
164 /* SP_QgnIndiRadiobuttOff */ {KAknsIIDQgnIndiRadiobuttOff, EDrawIcon, ES60_All, -1,-1}, |
159 /* SP_QgnIndiRadiobuttOn */ {KAknsIIDQgnIndiRadiobuttOn, EDrawIcon, ES60_AllReleases, -1,-1}, |
165 /* SP_QgnIndiRadiobuttOn */ {KAknsIIDQgnIndiRadiobuttOn, EDrawIcon, ES60_All, -1,-1}, |
160 /* SP_QgnIndiSliderEdit */ {KAknsIIDQgnIndiSliderEdit, EDrawIcon, ES60_AllReleases, -1,-1}, |
166 |
161 /* SP_QgnIndiSubMenu */ {KAknsIIDQgnIndiSubmenu, EDrawIcon, ES60_AllReleases, -1,-1}, |
167 // In 3.1 there different slider graphic and no pressed state. |
162 /* SP_QgnNoteErased */ {KAknsIIDQgnNoteErased, EDrawIcon, ES60_AllReleases, -1,-1}, |
168 /* SP_QgnGrafNsliderMarker */ {KAknsIIDQgnIndiSliderEdit, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x19d1 /* KAknsIIDQgnGrafNsliderMarker */}, |
163 /* SP_QgnNoteError */ {KAknsIIDQgnNoteError, EDrawIcon, ES60_AllReleases, -1,-1}, |
169 /* SP_QgnGrafNsliderMarkerSelected */ {KAknsIIDQgnIndiSliderEdit, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x1a4a /* KAknsIIDQgnGrafNsliderMarkerSelected */}, |
164 /* SP_QgnNoteInfo */ {KAknsIIDQgnNoteInfo, EDrawIcon, ES60_AllReleases, -1,-1}, |
170 /* SP_QgnIndiSubMenu */ {KAknsIIDQgnIndiSubmenu, EDrawIcon, ES60_All, -1,-1}, |
165 /* SP_QgnNoteOk */ {KAknsIIDQgnNoteOk, EDrawIcon, ES60_AllReleases, -1,-1}, |
171 /* SP_QgnNoteErased */ {KAknsIIDQgnNoteErased, EDrawIcon, ES60_All, -1,-1}, |
166 /* SP_QgnNoteQuery */ {KAknsIIDQgnNoteQuery, EDrawIcon, ES60_AllReleases, -1,-1}, |
172 /* SP_QgnNoteError */ {KAknsIIDQgnNoteError, EDrawIcon, ES60_All, -1,-1}, |
167 /* SP_QgnNoteWarning */ {KAknsIIDQgnNoteWarning, EDrawIcon, ES60_AllReleases, -1,-1}, |
173 /* SP_QgnNoteInfo */ {KAknsIIDQgnNoteInfo, EDrawIcon, ES60_All, -1,-1}, |
168 /* SP_QgnPropFileSmall */ {KAknsIIDQgnPropFileSmall, EDrawIcon, ES60_AllReleases, -1,-1}, |
174 /* SP_QgnNoteOk */ {KAknsIIDQgnNoteOk, EDrawIcon, ES60_All, -1,-1}, |
169 /* SP_QgnPropFolderCurrent */ {KAknsIIDQgnPropFolderCurrent, EDrawIcon, ES60_AllReleases, -1,-1}, |
175 /* SP_QgnNoteQuery */ {KAknsIIDQgnNoteQuery, EDrawIcon, ES60_All, -1,-1}, |
170 /* SP_QgnPropFolderSmall */ {KAknsIIDQgnPropFolderSmall, EDrawIcon, ES60_AllReleases, -1,-1}, |
176 /* SP_QgnNoteWarning */ {KAknsIIDQgnNoteWarning, EDrawIcon, ES60_All, -1,-1}, |
171 /* SP_QgnPropFolderSmallNew */ {KAknsIIDQgnPropFolderSmallNew, EDrawIcon, ES60_AllReleases, -1,-1}, |
177 /* SP_QgnPropFileSmall */ {KAknsIIDQgnPropFileSmall, EDrawIcon, ES60_All, -1,-1}, |
172 /* SP_QgnPropPhoneMemcLarge */ {KAknsIIDQgnPropPhoneMemcLarge, EDrawIcon, ES60_AllReleases, -1,-1}, |
178 /* SP_QgnPropFolderCurrent */ {KAknsIIDQgnPropFolderCurrent, EDrawIcon, ES60_All, -1,-1}, |
179 /* SP_QgnPropFolderSmall */ {KAknsIIDQgnPropFolderSmall, EDrawIcon, ES60_All, -1,-1}, |
|
180 /* SP_QgnPropFolderSmallNew */ {KAknsIIDQgnPropFolderSmallNew, EDrawIcon, ES60_All, -1,-1}, |
|
181 /* SP_QgnPropPhoneMemcLarge */ {KAknsIIDQgnPropPhoneMemcLarge, EDrawIcon, ES60_All, -1,-1}, |
|
173 |
182 |
174 // 3.1 & 3.2 do not have pressed state for scrollbar, so use normal scrollbar graphics instead. |
183 // 3.1 & 3.2 do not have pressed state for scrollbar, so use normal scrollbar graphics instead. |
175 /* SP_QsnCpScrollHandleBottomPressed*/ {KAknsIIDQsnCpScrollHandleBottom, EDrawIcon, ES60_3_1 | ES60_3_2, EAknsMajorGeneric, 0x20f8}, /*KAknsIIDQsnCpScrollHandleBottomPressed*/ |
184 /* SP_QsnCpScrollHandleBottomPressed*/ {KAknsIIDQsnCpScrollHandleBottom, EDrawIcon, ES60_3_X, EAknsMajorGeneric, 0x20f8}, /*KAknsIIDQsnCpScrollHandleBottomPressed*/ |
176 /* SP_QsnCpScrollHandleMiddlePressed*/ {KAknsIIDQsnCpScrollHandleMiddle, EDrawIcon, ES60_3_1 | ES60_3_2, EAknsMajorGeneric, 0x20f9}, /*KAknsIIDQsnCpScrollHandleMiddlePressed*/ |
185 /* SP_QsnCpScrollHandleMiddlePressed*/ {KAknsIIDQsnCpScrollHandleMiddle, EDrawIcon, ES60_3_X, EAknsMajorGeneric, 0x20f9}, /*KAknsIIDQsnCpScrollHandleMiddlePressed*/ |
177 /* SP_QsnCpScrollHandleTopPressed*/ {KAknsIIDQsnCpScrollHandleTop, EDrawIcon, ES60_3_1 | ES60_3_2, EAknsMajorGeneric, 0x20fa}, /*KAknsIIDQsnCpScrollHandleTopPressed*/ |
186 /* SP_QsnCpScrollHandleTopPressed*/ {KAknsIIDQsnCpScrollHandleTop, EDrawIcon, ES60_3_X, EAknsMajorGeneric, 0x20fa}, /*KAknsIIDQsnCpScrollHandleTopPressed*/ |
178 |
187 |
179 /* SP_QsnBgScreen */ {KAknsIIDQsnBgScreen, EDrawBackground, ES60_AllReleases, -1,-1}, |
188 /* SP_QsnBgScreen */ {KAknsIIDQsnBgScreen, EDrawBackground, ES60_All, -1,-1}, |
180 |
189 |
181 /* SP_QsnCpScrollBgBottom */ {KAknsIIDQsnCpScrollBgBottom, EDrawIcon, ES60_AllReleases, -1,-1}, |
190 /* SP_QsnCpScrollBgBottom */ {KAknsIIDQsnCpScrollBgBottom, EDrawIcon, ES60_All, -1,-1}, |
182 /* SP_QsnCpScrollBgMiddle */ {KAknsIIDQsnCpScrollBgMiddle, EDrawIcon, ES60_AllReleases, -1,-1}, |
191 /* SP_QsnCpScrollBgMiddle */ {KAknsIIDQsnCpScrollBgMiddle, EDrawIcon, ES60_All, -1,-1}, |
183 /* SP_QsnCpScrollBgTop */ {KAknsIIDQsnCpScrollBgTop, EDrawIcon, ES60_AllReleases, -1,-1}, |
192 /* SP_QsnCpScrollBgTop */ {KAknsIIDQsnCpScrollBgTop, EDrawIcon, ES60_All, -1,-1}, |
184 |
193 |
185 /* SP_QsnCpScrollHandleBottom */ {KAknsIIDQsnCpScrollHandleBottom, EDrawIcon, ES60_AllReleases, -1,-1}, |
194 /* SP_QsnCpScrollHandleBottom */ {KAknsIIDQsnCpScrollHandleBottom, EDrawIcon, ES60_All, -1,-1}, |
186 /* SP_QsnCpScrollHandleMiddle */ {KAknsIIDQsnCpScrollHandleMiddle, EDrawIcon, ES60_AllReleases, -1,-1}, |
195 /* SP_QsnCpScrollHandleMiddle */ {KAknsIIDQsnCpScrollHandleMiddle, EDrawIcon, ES60_All, -1,-1}, |
187 /* SP_QsnCpScrollHandleTop */ {KAknsIIDQsnCpScrollHandleTop, EDrawIcon, ES60_AllReleases, -1,-1}, |
196 /* SP_QsnCpScrollHandleTop */ {KAknsIIDQsnCpScrollHandleTop, EDrawIcon, ES60_All, -1,-1}, |
188 |
197 |
189 /* SP_QsnFrButtonTbCornerTl */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_AllReleases, -1,-1}, //todo: use "normal button" from 5.0 onwards |
198 /* SP_QsnFrButtonTbCornerTl */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_All, -1, -1}, |
190 /* SP_QsnFrButtonTbCornerTr */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_AllReleases, -1,-1}, |
199 /* SP_QsnFrButtonTbCornerTr */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_All, -1, -1}, |
191 /* SP_QsnFrButtonTbCornerBl */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_AllReleases, -1,-1}, |
200 /* SP_QsnFrButtonTbCornerBl */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_All, -1, -1}, |
192 /* SP_QsnFrButtonTbCornerBr */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_AllReleases, -1,-1}, |
201 /* SP_QsnFrButtonTbCornerBr */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_All, -1, -1}, |
193 /* SP_QsnFrButtonTbSideT */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_AllReleases, -1,-1}, |
202 /* SP_QsnFrButtonTbSideT */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_All, -1, -1}, |
194 /* SP_QsnFrButtonTbSideB */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_AllReleases, -1,-1}, |
203 /* SP_QsnFrButtonTbSideB */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_All, -1, -1}, |
195 /* SP_QsnFrButtonTbSideL */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_AllReleases, -1,-1}, |
204 /* SP_QsnFrButtonTbSideL */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_All, -1, -1}, |
196 /* SP_QsnFrButtonTbSideR */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_AllReleases, -1,-1}, |
205 /* SP_QsnFrButtonTbSideR */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_All, -1, -1}, |
197 /* SP_QsnFrButtonTbCenter */ {KAknsIIDQsnFrButtonTbCenter, EDrawIcon, ES60_AllReleases, -1,-1}, |
206 /* SP_QsnFrButtonTbCenter */ {KAknsIIDQsnFrButtonTbCenter, EDrawIcon, ES60_All, -1, -1}, |
198 |
207 |
199 /* SP_QsnFrButtonTbCornerTlPressed */{KAknsIIDQsnFrButtonTbCornerTlPressed, ENoDraw, ES60_AllReleases, -1,-1}, |
208 /* SP_QsnFrButtonTbCornerTlPressed */{KAknsIIDQsnFrButtonTbCornerTlPressed, ENoDraw, ES60_All, -1,-1}, |
200 /* SP_QsnFrButtonTbCornerTrPressed */{KAknsIIDQsnFrButtonTbCornerTrPressed, ENoDraw, ES60_AllReleases, -1,-1}, |
209 /* SP_QsnFrButtonTbCornerTrPressed */{KAknsIIDQsnFrButtonTbCornerTrPressed, ENoDraw, ES60_All, -1,-1}, |
201 /* SP_QsnFrButtonTbCornerBlPressed */{KAknsIIDQsnFrButtonTbCornerBlPressed, ENoDraw, ES60_AllReleases, -1,-1}, |
210 /* SP_QsnFrButtonTbCornerBlPressed */{KAknsIIDQsnFrButtonTbCornerBlPressed, ENoDraw, ES60_All, -1,-1}, |
202 /* SP_QsnFrButtonTbCornerBrPressed */{KAknsIIDQsnFrButtonTbCornerBrPressed, ENoDraw, ES60_AllReleases, -1,-1}, |
211 /* SP_QsnFrButtonTbCornerBrPressed */{KAknsIIDQsnFrButtonTbCornerBrPressed, ENoDraw, ES60_All, -1,-1}, |
203 /* SP_QsnFrButtonTbSideTPressed */ {KAknsIIDQsnFrButtonTbSideTPressed, ENoDraw, ES60_AllReleases, -1,-1}, |
212 /* SP_QsnFrButtonTbSideTPressed */ {KAknsIIDQsnFrButtonTbSideTPressed, ENoDraw, ES60_All, -1,-1}, |
204 /* SP_QsnFrButtonTbSideBPressed */ {KAknsIIDQsnFrButtonTbSideBPressed, ENoDraw, ES60_AllReleases, -1,-1}, |
213 /* SP_QsnFrButtonTbSideBPressed */ {KAknsIIDQsnFrButtonTbSideBPressed, ENoDraw, ES60_All, -1,-1}, |
205 /* SP_QsnFrButtonTbSideLPressed */ {KAknsIIDQsnFrButtonTbSideLPressed, ENoDraw, ES60_AllReleases, -1,-1}, |
214 /* SP_QsnFrButtonTbSideLPressed */ {KAknsIIDQsnFrButtonTbSideLPressed, ENoDraw, ES60_All, -1,-1}, |
206 /* SP_QsnFrButtonTbSideRPressed */ {KAknsIIDQsnFrButtonTbSideRPressed, ENoDraw, ES60_AllReleases, -1,-1}, |
215 /* SP_QsnFrButtonTbSideRPressed */ {KAknsIIDQsnFrButtonTbSideRPressed, ENoDraw, ES60_All, -1,-1}, |
207 /* SP_QsnFrButtonTbCenterPressed */ {KAknsIIDQsnFrButtonTbCenterPressed, EDrawIcon, ES60_AllReleases, -1,-1}, |
216 /* SP_QsnFrButtonTbCenterPressed */ {KAknsIIDQsnFrButtonTbCenterPressed, EDrawIcon, ES60_All, -1,-1}, |
208 |
217 |
209 /* SP_QsnFrCaleCornerTl */ {KAknsIIDQsnFrCaleCornerTl, ENoDraw, ES60_AllReleases, -1,-1}, |
218 /* SP_QsnFrCaleCornerTl */ {KAknsIIDQsnFrCaleCornerTl, ENoDraw, ES60_All, -1,-1}, |
210 /* SP_QsnFrCaleCornerTr */ {KAknsIIDQsnFrCaleCornerTr, ENoDraw, ES60_AllReleases, -1,-1}, |
219 /* SP_QsnFrCaleCornerTr */ {KAknsIIDQsnFrCaleCornerTr, ENoDraw, ES60_All, -1,-1}, |
211 /* SP_QsnFrCaleCornerBl */ {KAknsIIDQsnFrCaleCornerBl, ENoDraw, ES60_AllReleases, -1,-1}, |
220 /* SP_QsnFrCaleCornerBl */ {KAknsIIDQsnFrCaleCornerBl, ENoDraw, ES60_All, -1,-1}, |
212 /* SP_QsnFrCaleCornerBr */ {KAknsIIDQsnFrCaleCornerBr, ENoDraw, ES60_AllReleases, -1,-1}, |
221 /* SP_QsnFrCaleCornerBr */ {KAknsIIDQsnFrCaleCornerBr, ENoDraw, ES60_All, -1,-1}, |
213 /* SP_QsnFrCaleGSideT */ {KAknsIIDQsnFrCaleSideT, ENoDraw, ES60_AllReleases, -1,-1}, |
222 /* SP_QsnFrCaleGSideT */ {KAknsIIDQsnFrCaleSideT, ENoDraw, ES60_All, -1,-1}, |
214 /* SP_QsnFrCaleGSideB */ {KAknsIIDQsnFrCaleSideB, ENoDraw, ES60_AllReleases, -1,-1}, |
223 /* SP_QsnFrCaleGSideB */ {KAknsIIDQsnFrCaleSideB, ENoDraw, ES60_All, -1,-1}, |
215 /* SP_QsnFrCaleGSideL */ {KAknsIIDQsnFrCaleSideL, ENoDraw, ES60_AllReleases, -1,-1}, |
224 /* SP_QsnFrCaleGSideL */ {KAknsIIDQsnFrCaleSideL, ENoDraw, ES60_All, -1,-1}, |
216 /* SP_QsnFrCaleGSideR */ {KAknsIIDQsnFrCaleSideR, ENoDraw, ES60_AllReleases, -1,-1}, |
225 /* SP_QsnFrCaleGSideR */ {KAknsIIDQsnFrCaleSideR, ENoDraw, ES60_All, -1,-1}, |
217 /* SP_QsnFrCaleCenter */ {KAknsIIDQsnFrCaleCenter, ENoDraw, ES60_AllReleases, -1,-1}, |
226 /* SP_QsnFrCaleCenter */ {KAknsIIDQsnFrCaleCenter, ENoDraw, ES60_All, -1,-1}, |
218 |
227 |
219 /* SP_QsnFrCaleHeadingCornerTl */ {KAknsIIDQsnFrCaleHeadingCornerTl, ENoDraw, ES60_AllReleases, -1,-1}, |
228 /* SP_QsnFrCaleHeadingCornerTl */ {KAknsIIDQsnFrCaleHeadingCornerTl, ENoDraw, ES60_All, -1,-1}, |
220 /* SP_QsnFrCaleHeadingCornerTr */ {KAknsIIDQsnFrCaleHeadingCornerTr, ENoDraw, ES60_AllReleases, -1,-1}, |
229 /* SP_QsnFrCaleHeadingCornerTr */ {KAknsIIDQsnFrCaleHeadingCornerTr, ENoDraw, ES60_All, -1,-1}, |
221 /* SP_QsnFrCaleHeadingCornerBl */ {KAknsIIDQsnFrCaleHeadingCornerBl, ENoDraw, ES60_AllReleases, -1,-1}, |
230 /* SP_QsnFrCaleHeadingCornerBl */ {KAknsIIDQsnFrCaleHeadingCornerBl, ENoDraw, ES60_All, -1,-1}, |
222 /* SP_QsnFrCaleHeadingCornerBr */ {KAknsIIDQsnFrCaleHeadingCornerBr, ENoDraw, ES60_AllReleases, -1,-1}, |
231 /* SP_QsnFrCaleHeadingCornerBr */ {KAknsIIDQsnFrCaleHeadingCornerBr, ENoDraw, ES60_All, -1,-1}, |
223 /* SP_QsnFrCaleHeadingSideT */ {KAknsIIDQsnFrCaleHeadingSideT, ENoDraw, ES60_AllReleases, -1,-1}, |
232 /* SP_QsnFrCaleHeadingSideT */ {KAknsIIDQsnFrCaleHeadingSideT, ENoDraw, ES60_All, -1,-1}, |
224 /* SP_QsnFrCaleHeadingSideB */ {KAknsIIDQsnFrCaleHeadingSideB, ENoDraw, ES60_AllReleases, -1,-1}, |
233 /* SP_QsnFrCaleHeadingSideB */ {KAknsIIDQsnFrCaleHeadingSideB, ENoDraw, ES60_All, -1,-1}, |
225 /* SP_QsnFrCaleHeadingSideL */ {KAknsIIDQsnFrCaleHeadingSideL, ENoDraw, ES60_AllReleases, -1,-1}, |
234 /* SP_QsnFrCaleHeadingSideL */ {KAknsIIDQsnFrCaleHeadingSideL, ENoDraw, ES60_All, -1,-1}, |
226 /* SP_QsnFrCaleHeadingSideR */ {KAknsIIDQsnFrCaleHeadingSideR, ENoDraw, ES60_AllReleases, -1,-1}, |
235 /* SP_QsnFrCaleHeadingSideR */ {KAknsIIDQsnFrCaleHeadingSideR, ENoDraw, ES60_All, -1,-1}, |
227 /* SP_QsnFrCaleHeadingCenter */ {KAknsIIDQsnFrCaleHeadingCenter, ENoDraw, ES60_AllReleases, -1,-1}, |
236 /* SP_QsnFrCaleHeadingCenter */ {KAknsIIDQsnFrCaleHeadingCenter, ENoDraw, ES60_All, -1,-1}, |
228 |
237 |
229 /* SP_QsnFrInputCornerTl */ {KAknsIIDQsnFrInputCornerTl, ENoDraw, ES60_AllReleases, -1,-1}, |
238 /* SP_QsnFrInputCornerTl */ {KAknsIIDQsnFrInputCornerTl, ENoDraw, ES60_All, -1,-1}, |
230 /* SP_QsnFrInputCornerTr */ {KAknsIIDQsnFrInputCornerTr, ENoDraw, ES60_AllReleases, -1,-1}, |
239 /* SP_QsnFrInputCornerTr */ {KAknsIIDQsnFrInputCornerTr, ENoDraw, ES60_All, -1,-1}, |
231 /* SP_QsnFrInputCornerBl */ {KAknsIIDQsnFrInputCornerBl, ENoDraw, ES60_AllReleases, -1,-1}, |
240 /* SP_QsnFrInputCornerBl */ {KAknsIIDQsnFrInputCornerBl, ENoDraw, ES60_All, -1,-1}, |
232 /* SP_QsnFrInputCornerBr */ {KAknsIIDQsnFrInputCornerBr, ENoDraw, ES60_AllReleases, -1,-1}, |
241 /* SP_QsnFrInputCornerBr */ {KAknsIIDQsnFrInputCornerBr, ENoDraw, ES60_All, -1,-1}, |
233 /* SP_QsnFrInputSideT */ {KAknsIIDQsnFrInputSideT, ENoDraw, ES60_AllReleases, -1,-1}, |
242 /* SP_QsnFrInputSideT */ {KAknsIIDQsnFrInputSideT, ENoDraw, ES60_All, -1,-1}, |
234 /* SP_QsnFrInputSideB */ {KAknsIIDQsnFrInputSideB, ENoDraw, ES60_AllReleases, -1,-1}, |
243 /* SP_QsnFrInputSideB */ {KAknsIIDQsnFrInputSideB, ENoDraw, ES60_All, -1,-1}, |
235 /* SP_QsnFrInputSideL */ {KAknsIIDQsnFrInputSideL, ENoDraw, ES60_AllReleases, -1,-1}, |
244 /* SP_QsnFrInputSideL */ {KAknsIIDQsnFrInputSideL, ENoDraw, ES60_All, -1,-1}, |
236 /* SP_QsnFrInputSideR */ {KAknsIIDQsnFrInputSideR, ENoDraw, ES60_AllReleases, -1,-1}, |
245 /* SP_QsnFrInputSideR */ {KAknsIIDQsnFrInputSideR, ENoDraw, ES60_All, -1,-1}, |
237 /* SP_QsnFrInputCenter */ {KAknsIIDQsnFrInputCenter, ENoDraw, ES60_AllReleases, -1,-1}, |
246 /* SP_QsnFrInputCenter */ {KAknsIIDQsnFrInputCenter, ENoDraw, ES60_All, -1,-1}, |
238 |
247 |
239 /* SP_QsnFrListCornerTl */ {KAknsIIDQsnFrListCornerTl, ENoDraw, ES60_AllReleases, -1,-1}, |
248 /* SP_QsnFrListCornerTl */ {KAknsIIDQsnFrListCornerTl, ENoDraw, ES60_All, -1,-1}, |
240 /* SP_QsnFrListCornerTr */ {KAknsIIDQsnFrListCornerTr, ENoDraw, ES60_AllReleases, -1,-1}, |
249 /* SP_QsnFrListCornerTr */ {KAknsIIDQsnFrListCornerTr, ENoDraw, ES60_All, -1,-1}, |
241 /* SP_QsnFrListCornerBl */ {KAknsIIDQsnFrListCornerBl, ENoDraw, ES60_AllReleases, -1,-1}, |
250 /* SP_QsnFrListCornerBl */ {KAknsIIDQsnFrListCornerBl, ENoDraw, ES60_All, -1,-1}, |
242 /* SP_QsnFrListCornerBr */ {KAknsIIDQsnFrListCornerBr, ENoDraw, ES60_AllReleases, -1,-1}, |
251 /* SP_QsnFrListCornerBr */ {KAknsIIDQsnFrListCornerBr, ENoDraw, ES60_All, -1,-1}, |
243 /* SP_QsnFrListSideT */ {KAknsIIDQsnFrListSideT, ENoDraw, ES60_AllReleases, -1,-1}, |
252 /* SP_QsnFrListSideT */ {KAknsIIDQsnFrListSideT, ENoDraw, ES60_All, -1,-1}, |
244 /* SP_QsnFrListSideB */ {KAknsIIDQsnFrListSideB, ENoDraw, ES60_AllReleases, -1,-1}, |
253 /* SP_QsnFrListSideB */ {KAknsIIDQsnFrListSideB, ENoDraw, ES60_All, -1,-1}, |
245 /* SP_QsnFrListSideL */ {KAknsIIDQsnFrListSideL, ENoDraw, ES60_AllReleases, -1,-1}, |
254 /* SP_QsnFrListSideL */ {KAknsIIDQsnFrListSideL, ENoDraw, ES60_All, -1,-1}, |
246 /* SP_QsnFrListSideR */ {KAknsIIDQsnFrListSideR, ENoDraw, ES60_AllReleases, -1,-1}, |
255 /* SP_QsnFrListSideR */ {KAknsIIDQsnFrListSideR, ENoDraw, ES60_All, -1,-1}, |
247 /* SP_QsnFrListCenter */ {KAknsIIDQsnFrListCenter, ENoDraw, ES60_AllReleases, -1,-1}, |
256 /* SP_QsnFrListCenter */ {KAknsIIDQsnFrListCenter, ENoDraw, ES60_All, -1,-1}, |
248 |
257 |
249 /* SP_QsnFrPopupCornerTl */ {KAknsIIDQsnFrPopupCornerTl, ENoDraw, ES60_AllReleases, -1,-1}, |
258 /* SP_QsnFrPopupCornerTl */ {KAknsIIDQsnFrPopupCornerTl, ENoDraw, ES60_All, -1,-1}, |
250 /* SP_QsnFrPopupCornerTr */ {KAknsIIDQsnFrPopupCornerTr, ENoDraw, ES60_AllReleases, -1,-1}, |
259 /* SP_QsnFrPopupCornerTr */ {KAknsIIDQsnFrPopupCornerTr, ENoDraw, ES60_All, -1,-1}, |
251 /* SP_QsnFrPopupCornerBl */ {KAknsIIDQsnFrPopupCornerBl, ENoDraw, ES60_AllReleases, -1,-1}, |
260 /* SP_QsnFrPopupCornerBl */ {KAknsIIDQsnFrPopupCornerBl, ENoDraw, ES60_All, -1,-1}, |
252 /* SP_QsnFrPopupCornerBr */ {KAknsIIDQsnFrPopupCornerBr, ENoDraw, ES60_AllReleases, -1,-1}, |
261 /* SP_QsnFrPopupCornerBr */ {KAknsIIDQsnFrPopupCornerBr, ENoDraw, ES60_All, -1,-1}, |
253 /* SP_QsnFrPopupSideT */ {KAknsIIDQsnFrPopupSideT, ENoDraw, ES60_AllReleases, -1,-1}, |
262 /* SP_QsnFrPopupSideT */ {KAknsIIDQsnFrPopupSideT, ENoDraw, ES60_All, -1,-1}, |
254 /* SP_QsnFrPopupSideB */ {KAknsIIDQsnFrPopupSideB, ENoDraw, ES60_AllReleases, -1,-1}, |
263 /* SP_QsnFrPopupSideB */ {KAknsIIDQsnFrPopupSideB, ENoDraw, ES60_All, -1,-1}, |
255 /* SP_QsnFrPopupSideL */ {KAknsIIDQsnFrPopupSideL, ENoDraw, ES60_AllReleases, -1,-1}, |
264 /* SP_QsnFrPopupSideL */ {KAknsIIDQsnFrPopupSideL, ENoDraw, ES60_All, -1,-1}, |
256 /* SP_QsnFrPopupSideR */ {KAknsIIDQsnFrPopupSideR, ENoDraw, ES60_AllReleases, -1,-1}, |
265 /* SP_QsnFrPopupSideR */ {KAknsIIDQsnFrPopupSideR, ENoDraw, ES60_All, -1,-1}, |
257 /* SP_QsnFrPopupCenter */ {KAknsIIDQsnFrPopupCenter, ENoDraw, ES60_AllReleases, -1,-1}, |
266 /* SP_QsnFrPopupCenter */ {KAknsIIDQsnFrPopupCenter, ENoDraw, ES60_All, -1,-1}, |
258 |
267 |
259 // ToolTip graphics different in 3.1 vs. 3.2+. |
268 // ToolTip graphics different in 3.1 vs. 3.2+. |
260 /* SP_QsnFrPopupPreviewCornerTl */ {KAknsIIDQsnFrPopupCornerTl, ENoDraw, ES60_3_1, EAknsMajorSkin, 0x19c5}, /* KAknsIIDQsnFrPopupPreviewCornerTl */ |
269 /* SP_QsnFrPopupPreviewCornerTl */ {KAknsIIDQsnFrPopupCornerTl, ENoDraw, ES60_3_1, EAknsMajorSkin, 0x19c5}, /* KAknsIIDQsnFrPopupPreviewCornerTl */ |
261 /* SP_QsnFrPopupPreviewCornerTr */ {KAknsIIDQsnFrPopupCornerTr, ENoDraw, ES60_3_1, EAknsMajorSkin, 0x19c6}, |
270 /* SP_QsnFrPopupPreviewCornerTr */ {KAknsIIDQsnFrPopupCornerTr, ENoDraw, ES60_3_1, EAknsMajorSkin, 0x19c6}, |
262 /* SP_QsnFrPopupPreviewCornerBl */ {KAknsIIDQsnFrPopupCornerBl, ENoDraw, ES60_3_1, EAknsMajorSkin, 0x19c3}, |
271 /* SP_QsnFrPopupPreviewCornerBl */ {KAknsIIDQsnFrPopupCornerBl, ENoDraw, ES60_3_1, EAknsMajorSkin, 0x19c3}, |
263 /* SP_QsnFrPopupPreviewCornerBr */ {KAknsIIDQsnFrPopupCornerBr, ENoDraw, ES60_3_1, EAknsMajorSkin, 0x19c4}, |
272 /* SP_QsnFrPopupPreviewCornerBr */ {KAknsIIDQsnFrPopupCornerBr, ENoDraw, ES60_3_1, EAknsMajorSkin, 0x19c4}, |
264 /* SP_QsnFrPopupPreviewSideT */ {KAknsIIDQsnFrPopupSideT, ENoDraw, ES60_3_1, EAknsMajorSkin, 0x19ca}, |
273 /* SP_QsnFrPopupPreviewSideT */ {KAknsIIDQsnFrPopupSideT, ENoDraw, ES60_3_1, EAknsMajorSkin, 0x19ca}, |
265 /* SP_QsnFrPopupPreviewSideB */ {KAknsIIDQsnFrPopupSideB, ENoDraw, ES60_3_1, EAknsMajorSkin, 0x19c7}, |
274 /* SP_QsnFrPopupPreviewSideB */ {KAknsIIDQsnFrPopupSideB, ENoDraw, ES60_3_1, EAknsMajorSkin, 0x19c7}, |
266 /* SP_QsnFrPopupPreviewSideL */ {KAknsIIDQsnFrPopupSideL, ENoDraw, ES60_3_1, EAknsMajorSkin, 0x19c8}, |
275 /* SP_QsnFrPopupPreviewSideL */ {KAknsIIDQsnFrPopupSideL, ENoDraw, ES60_3_1, EAknsMajorSkin, 0x19c8}, |
267 /* SP_QsnFrPopupPreviewSideR */ {KAknsIIDQsnFrPopupSideR, ENoDraw, ES60_3_1, EAknsMajorSkin, 0x19c9}, |
276 /* SP_QsnFrPopupPreviewSideR */ {KAknsIIDQsnFrPopupSideR, ENoDraw, ES60_3_1, EAknsMajorSkin, 0x19c9}, |
268 /* SP_QsnFrPopupPreviewCenter */ {KAknsIIDQsnFrPopupCenter, ENoDraw, ES60_3_1, EAknsMajorSkin, 0x19c2}, |
277 /* SP_QsnFrPopupPreviewCenter */ {KAknsIIDQsnFrPopupCenter, ENoDraw, ES60_3_1, EAknsMajorSkin, 0x19c2}, |
269 |
278 |
270 /* SP_QsnFrSetOptCornerTl */ {KAknsIIDQsnFrSetOptCornerTl, ENoDraw, ES60_AllReleases, -1,-1}, |
279 /* SP_QsnFrSetOptCornerTl */ {KAknsIIDQsnFrSetOptCornerTl, ENoDraw, ES60_All, -1,-1}, |
271 /* SP_QsnFrSetOptCornerTr */ {KAknsIIDQsnFrSetOptCornerTr, ENoDraw, ES60_AllReleases, -1,-1}, |
280 /* SP_QsnFrSetOptCornerTr */ {KAknsIIDQsnFrSetOptCornerTr, ENoDraw, ES60_All, -1,-1}, |
272 /* SP_QsnFrSetOptCornerBl */ {KAknsIIDQsnFrSetOptCornerBl, ENoDraw, ES60_AllReleases, -1,-1}, |
281 /* SP_QsnFrSetOptCornerBl */ {KAknsIIDQsnFrSetOptCornerBl, ENoDraw, ES60_All, -1,-1}, |
273 /* SP_QsnFrSetOptCornerBr */ {KAknsIIDQsnFrSetOptCornerBr, ENoDraw, ES60_AllReleases, -1,-1}, |
282 /* SP_QsnFrSetOptCornerBr */ {KAknsIIDQsnFrSetOptCornerBr, ENoDraw, ES60_All, -1,-1}, |
274 /* SP_QsnFrSetOptSideT */ {KAknsIIDQsnFrSetOptSideT, ENoDraw, ES60_AllReleases, -1,-1}, |
283 /* SP_QsnFrSetOptSideT */ {KAknsIIDQsnFrSetOptSideT, ENoDraw, ES60_All, -1,-1}, |
275 /* SP_QsnFrSetOptSideB */ {KAknsIIDQsnFrSetOptSideB, ENoDraw, ES60_AllReleases, -1,-1}, |
284 /* SP_QsnFrSetOptSideB */ {KAknsIIDQsnFrSetOptSideB, ENoDraw, ES60_All, -1,-1}, |
276 /* SP_QsnFrSetOptSideL */ {KAknsIIDQsnFrSetOptSideL, ENoDraw, ES60_AllReleases, -1,-1}, |
285 /* SP_QsnFrSetOptSideL */ {KAknsIIDQsnFrSetOptSideL, ENoDraw, ES60_All, -1,-1}, |
277 /* SP_QsnFrSetOptSideR */ {KAknsIIDQsnFrSetOptSideR, ENoDraw, ES60_AllReleases, -1,-1}, |
286 /* SP_QsnFrSetOptSideR */ {KAknsIIDQsnFrSetOptSideR, ENoDraw, ES60_All, -1,-1}, |
278 /* SP_QsnFrSetOptCenter */ {KAknsIIDQsnFrSetOptCenter, ENoDraw, ES60_AllReleases, -1,-1}, |
287 /* SP_QsnFrSetOptCenter */ {KAknsIIDQsnFrSetOptCenter, ENoDraw, ES60_All, -1,-1}, |
279 |
288 |
280 // No toolbar frame for 5.0+ releases. |
289 // No toolbar frame for 5.0+ releases. |
281 /* SP_QsnFrPopupSubCornerTl */ {KAknsIIDQsnFrPopupSubCornerTl, ENoDraw, ES60_3_1 | ES60_3_2, -1,-1}, |
290 /* SP_QsnFrPopupSubCornerTl */ {KAknsIIDQsnFrPopupSubCornerTl, ENoDraw, ES60_3_X, -1,-1}, |
282 /* SP_QsnFrPopupSubCornerTr */ {KAknsIIDQsnFrPopupSubCornerTr, ENoDraw, ES60_3_1 | ES60_3_2, -1,-1}, |
291 /* SP_QsnFrPopupSubCornerTr */ {KAknsIIDQsnFrPopupSubCornerTr, ENoDraw, ES60_3_X, -1,-1}, |
283 /* SP_QsnFrPopupSubCornerBl */ {KAknsIIDQsnFrPopupSubCornerBl, ENoDraw, ES60_3_1 | ES60_3_2, -1,-1}, |
292 /* SP_QsnFrPopupSubCornerBl */ {KAknsIIDQsnFrPopupSubCornerBl, ENoDraw, ES60_3_X, -1,-1}, |
284 /* SP_QsnFrPopupSubCornerBr */ {KAknsIIDQsnFrPopupSubCornerBr, ENoDraw, ES60_3_1 | ES60_3_2, -1,-1}, |
293 /* SP_QsnFrPopupSubCornerBr */ {KAknsIIDQsnFrPopupSubCornerBr, ENoDraw, ES60_3_X, -1,-1}, |
285 /* SP_QsnFrPopupSubSideT */ {KAknsIIDQsnFrPopupSubSideT, ENoDraw, ES60_3_1 | ES60_3_2, -1,-1}, |
294 /* SP_QsnFrPopupSubSideT */ {KAknsIIDQsnFrPopupSubSideT, ENoDraw, ES60_3_X, -1,-1}, |
286 /* SP_QsnFrPopupSubSideB */ {KAknsIIDQsnFrPopupSubSideB, ENoDraw, ES60_3_1 | ES60_3_2, -1,-1}, |
295 /* SP_QsnFrPopupSubSideB */ {KAknsIIDQsnFrPopupSubSideB, ENoDraw, ES60_3_X, -1,-1}, |
287 /* SP_QsnFrPopupSubSideL */ {KAknsIIDQsnFrPopupSubSideL, ENoDraw, ES60_3_1 | ES60_3_2, -1,-1}, |
296 /* SP_QsnFrPopupSubSideL */ {KAknsIIDQsnFrPopupSubSideL, ENoDraw, ES60_3_X, -1,-1}, |
288 /* SP_QsnFrPopupSubSideR */ {KAknsIIDQsnFrPopupSubSideR, ENoDraw, ES60_3_1 | ES60_3_2, -1,-1}, |
297 /* SP_QsnFrPopupSubSideR */ {KAknsIIDQsnFrPopupSubSideR, ENoDraw, ES60_3_X, -1,-1}, |
289 /* SP_QsnFrPopupSubCenter */ {KAknsIIDQsnFrPopupCenterSubmenu, ENoDraw, ES60_3_1 | ES60_3_2, -1,-1}, |
298 /* SP_QsnFrPopupSubCenter */ {KAknsIIDQsnFrPopupCenterSubmenu, ENoDraw, ES60_3_X, -1,-1}, |
290 |
299 |
291 // Toolbar graphics is different in 3.1/3.2 vs. 5.0 |
300 // Toolbar graphics is different in 3.1/3.2 vs. 5.0 |
292 /* SP_QsnFrSctrlButtonCornerTl */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2301}, /* KAknsIIDQgnFrSctrlButtonCornerTl*/ |
301 /* SP_QsnFrSctrlButtonCornerTl */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2301}, /* KAknsIIDQgnFrSctrlButtonCornerTl*/ |
293 /* SP_QsnFrSctrlButtonCornerTr */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2302}, |
302 /* SP_QsnFrSctrlButtonCornerTr */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2302}, |
294 /* SP_QsnFrSctrlButtonCornerBl */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2303}, |
303 /* SP_QsnFrSctrlButtonCornerBl */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2303}, |
295 /* SP_QsnFrSctrlButtonCornerBr */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2304}, |
304 /* SP_QsnFrSctrlButtonCornerBr */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2304}, |
296 /* SP_QsnFrSctrlButtonSideT */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2305}, |
305 /* SP_QsnFrSctrlButtonSideT */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2305}, |
297 /* SP_QsnFrSctrlButtonSideB */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2306}, |
306 /* SP_QsnFrSctrlButtonSideB */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2306}, |
298 /* SP_QsnFrSctrlButtonSideL */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2307}, |
307 /* SP_QsnFrSctrlButtonSideL */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2307}, |
299 /* SP_QsnFrSctrlButtonSideR */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2308}, |
308 /* SP_QsnFrSctrlButtonSideR */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2308}, |
300 /* SP_QsnFrSctrlButtonCenter */ {KAknsIIDQsnFrButtonTbCenter, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2309}, /*KAknsIIDQgnFrSctrlButtonCenter*/ |
309 /* SP_QsnFrSctrlButtonCenter */ {KAknsIIDQsnFrButtonTbCenter, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2309}, /*KAknsIIDQgnFrSctrlButtonCenter*/ |
301 |
310 |
302 // No pressed state for toolbar button in 3.1/3.2. |
311 // No pressed state for toolbar button in 3.1/3.2. |
303 /* SP_QsnFrSctrlButtonCornerTlPressed */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2621}, /*KAknsIIDQsnFrSctrlButtonCornerTlPressed*/ |
312 /* SP_QsnFrSctrlButtonCornerTlPressed */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2621}, /*KAknsIIDQsnFrSctrlButtonCornerTlPressed*/ |
304 /* SP_QsnFrSctrlButtonCornerTrPressed */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2622}, |
313 /* SP_QsnFrSctrlButtonCornerTrPressed */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2622}, |
305 /* SP_QsnFrSctrlButtonCornerBlPressed */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2623}, |
314 /* SP_QsnFrSctrlButtonCornerBlPressed */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2623}, |
306 /* SP_QsnFrSctrlButtonCornerBrPressed */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2624}, |
315 /* SP_QsnFrSctrlButtonCornerBrPressed */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2624}, |
307 /* SP_QsnFrSctrlButtonSideTPressed */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2625}, |
316 /* SP_QsnFrSctrlButtonSideTPressed */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2625}, |
308 /* SP_QsnFrSctrlButtonSideBPressed */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2626}, |
317 /* SP_QsnFrSctrlButtonSideBPressed */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2626}, |
309 /* SP_QsnFrSctrlButtonSideLPressed */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2627}, |
318 /* SP_QsnFrSctrlButtonSideLPressed */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2627}, |
310 /* SP_QsnFrSctrlButtonSideRPressed */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2628}, |
319 /* SP_QsnFrSctrlButtonSideRPressed */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2628}, |
311 /* SP_QsnFrSctrlButtonCenterPressed */ {KAknsIIDQsnFrButtonTbCenter, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2629}, |
320 /* SP_QsnFrSctrlButtonCenterPressed */ {KAknsIIDQsnFrButtonTbCenter, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2629}, |
312 |
321 |
313 // No inactive button graphics in 3.1/3.2 |
322 // No inactive button graphics in 3.1/3.2 |
314 /* SP_QsnFrButtonCornerTlInactive */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b1}, /*KAknsIIDQsnFrButtonCornerTlInactive*/ |
323 /* SP_QsnFrButtonCornerTlInactive */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x21b1}, /*KAknsIIDQsnFrButtonCornerTlInactive*/ |
315 /* SP_QsnFrButtonCornerTrInactive */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b2}, |
324 /* SP_QsnFrButtonCornerTrInactive */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x21b2}, |
316 /* SP_QsnFrButtonCornerBlInactive */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b3}, |
325 /* SP_QsnFrButtonCornerBlInactive */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x21b3}, |
317 /* SP_QsnFrButtonCornerTrInactive */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b4}, |
326 /* SP_QsnFrButtonCornerTrInactive */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x21b4}, |
318 /* SP_QsnFrButtonSideTInactive */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b5}, |
327 /* SP_QsnFrButtonSideTInactive */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x21b5}, |
319 /* SP_QsnFrButtonSideBInactive */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b6}, |
328 /* SP_QsnFrButtonSideBInactive */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x21b6}, |
320 /* SP_QsnFrButtonSideLInactive */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b7}, |
329 /* SP_QsnFrButtonSideLInactive */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x21b7}, |
321 /* SP_QsnFrButtonSideRInactive */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b8}, |
330 /* SP_QsnFrButtonSideRInactive */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x21b8}, |
322 /* SP_QsnFrButtonCenterInactive */ {KAknsIIDQsnFrButtonTbCenter, EDrawIcon, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b9}, |
331 /* SP_QsnFrButtonCenterInactive */ {KAknsIIDQsnFrButtonTbCenter, EDrawIcon, ES60_3_X, EAknsMajorSkin, 0x21b9}, |
323 |
|
324 /* SP_QsnFrNotepadCornerTl */ {KAknsIIDQsnFrNotepadContCornerTl, ENoDraw, ES60_AllReleases, -1,-1}, |
|
325 /* SP_QsnFrNotepadCornerTr */ {KAknsIIDQsnFrNotepadContCornerTr, ENoDraw, ES60_AllReleases, -1,-1}, |
|
326 /* SP_QsnFrNotepadCornerBl */ {KAknsIIDQsnFrNotepadCornerBl, ENoDraw, ES60_AllReleases, -1,-1}, |
|
327 /* SP_QsnFrNotepadCornerBr */ {KAknsIIDQsnFrNotepadCornerBr, ENoDraw, ES60_AllReleases, -1,-1}, |
|
328 /* SP_QsnFrNotepadSideT */ {KAknsIIDQsnFrNotepadContSideT, ENoDraw, ES60_AllReleases, -1,-1}, |
|
329 /* SP_QsnFrNotepadSideB */ {KAknsIIDQsnFrNotepadSideB, ENoDraw, ES60_AllReleases, -1,-1}, |
|
330 /* SP_QsnFrNotepadSideL */ {KAknsIIDQsnFrNotepadSideL, ENoDraw, ES60_AllReleases, -1,-1}, |
|
331 /* SP_QsnFrNotepadSideR */ {KAknsIIDQsnFrNotepadSideR, ENoDraw, ES60_AllReleases, -1,-1}, |
|
332 /* SP_QsnFrNotepadCenter */ {KAknsIIDQsnFrNotepadCenter, EDrawIcon, ES60_AllReleases, -1,-1}, |
|
333 |
332 |
334 }; |
333 }; |
335 |
334 |
336 QPixmap QS60StyleModeSpecifics::skinnedGraphics( |
335 QPixmap QS60StyleModeSpecifics::skinnedGraphics( |
337 QS60StyleEnums::SkinParts stylepart, const QSize &size, |
336 QS60StyleEnums::SkinParts stylepart, const QSize &size, |
359 return themedImage = QPixmap(); |
358 return themedImage = QPixmap(); |
360 return themedImage; |
359 return themedImage; |
361 } |
360 } |
362 |
361 |
363 QPixmap QS60StyleModeSpecifics::colorSkinnedGraphics( |
362 QPixmap QS60StyleModeSpecifics::colorSkinnedGraphics( |
364 const QS60StyleEnums::SkinParts &stylepart, |
363 const QS60StyleEnums::SkinParts &stylepart, const QSize &size, QPainter *painter, |
365 const QSize &size, QS60StylePrivate::SkinElementFlags flags) |
364 QS60StylePrivate::SkinElementFlags flags) |
366 { |
365 { |
367 QPixmap colorGraphics; |
366 QPixmap colorGraphics; |
368 TRAPD(error, QT_TRYCATCH_LEAVING(colorGraphics = colorSkinnedGraphicsLX(stylepart, size, flags))); |
367 TRAPD(error, QT_TRYCATCH_LEAVING(colorGraphics = colorSkinnedGraphicsLX(stylepart, size, painter, flags))); |
369 return error ? QPixmap() : colorGraphics; |
368 return error ? QPixmap() : colorGraphics; |
370 } |
369 } |
371 |
370 |
372 void QS60StyleModeSpecifics::fallbackInfo(const QS60StyleEnums::SkinParts &stylepart, TDes& fallbackFileName, TInt& fallbackIndex) |
371 void QS60StyleModeSpecifics::fallbackInfo(const QS60StyleEnums::SkinParts &stylePart, TInt &fallbackIndex) |
373 { |
372 { |
374 switch(stylepart) { |
373 switch(stylePart) { |
375 case QS60StyleEnums::SP_QgnGrafBarWait: |
374 case QS60StyleEnums::SP_QgnGrafBarWait: |
376 fallbackFileName = KAvkonBitmapFile(); |
|
377 fallbackIndex = EMbmAvkonQgn_graf_bar_wait_1; |
375 fallbackIndex = EMbmAvkonQgn_graf_bar_wait_1; |
378 break; |
376 break; |
379 case QS60StyleEnums::SP_QgnGrafBarFrameCenter: |
377 case QS60StyleEnums::SP_QgnGrafBarFrameCenter: |
380 fallbackFileName = KAvkonBitmapFile(); |
|
381 fallbackIndex = EMbmAvkonQgn_graf_bar_frame_center; |
378 fallbackIndex = EMbmAvkonQgn_graf_bar_frame_center; |
382 break; |
379 break; |
383 case QS60StyleEnums::SP_QgnGrafBarFrameSideL: |
380 case QS60StyleEnums::SP_QgnGrafBarFrameSideL: |
384 fallbackFileName = KAvkonBitmapFile(); |
|
385 fallbackIndex = EMbmAvkonQgn_graf_bar_frame_side_l; |
381 fallbackIndex = EMbmAvkonQgn_graf_bar_frame_side_l; |
386 break; |
382 break; |
387 case QS60StyleEnums::SP_QgnGrafBarFrameSideR: |
383 case QS60StyleEnums::SP_QgnGrafBarFrameSideR: |
388 fallbackFileName = KAvkonBitmapFile(); |
|
389 fallbackIndex = EMbmAvkonQgn_graf_bar_frame_side_r; |
384 fallbackIndex = EMbmAvkonQgn_graf_bar_frame_side_r; |
390 break; |
385 break; |
391 case QS60StyleEnums::SP_QgnGrafBarProgress: |
386 case QS60StyleEnums::SP_QgnGrafBarProgress: |
392 fallbackFileName = KAvkonBitmapFile(); |
|
393 fallbackIndex = EMbmAvkonQgn_graf_bar_progress; |
387 fallbackIndex = EMbmAvkonQgn_graf_bar_progress; |
394 break; |
388 break; |
395 case QS60StyleEnums::SP_QgnGrafTabActiveL: |
389 case QS60StyleEnums::SP_QgnGrafTabActiveL: |
396 fallbackFileName = KAvkonBitmapFile(); |
|
397 fallbackIndex = EMbmAvkonQgn_graf_tab_active_l; |
390 fallbackIndex = EMbmAvkonQgn_graf_tab_active_l; |
398 break; |
391 break; |
399 case QS60StyleEnums::SP_QgnGrafTabActiveM: |
392 case QS60StyleEnums::SP_QgnGrafTabActiveM: |
400 fallbackFileName = KAvkonBitmapFile(); |
|
401 fallbackIndex = EMbmAvkonQgn_graf_tab_active_m; |
393 fallbackIndex = EMbmAvkonQgn_graf_tab_active_m; |
402 break; |
394 break; |
403 case QS60StyleEnums::SP_QgnGrafTabActiveR: |
395 case QS60StyleEnums::SP_QgnGrafTabActiveR: |
404 fallbackFileName = KAvkonBitmapFile(); |
|
405 fallbackIndex = EMbmAvkonQgn_graf_tab_active_r; |
396 fallbackIndex = EMbmAvkonQgn_graf_tab_active_r; |
406 break; |
397 break; |
407 case QS60StyleEnums::SP_QgnGrafTabPassiveL: |
398 case QS60StyleEnums::SP_QgnGrafTabPassiveL: |
408 fallbackFileName = KAvkonBitmapFile(); |
|
409 fallbackIndex = EMbmAvkonQgn_graf_tab_passive_l; |
399 fallbackIndex = EMbmAvkonQgn_graf_tab_passive_l; |
410 break; |
400 break; |
411 case QS60StyleEnums::SP_QgnGrafTabPassiveM: |
401 case QS60StyleEnums::SP_QgnGrafTabPassiveM: |
412 fallbackFileName = KAvkonBitmapFile(); |
|
413 fallbackIndex = EMbmAvkonQgn_graf_tab_passive_m; |
402 fallbackIndex = EMbmAvkonQgn_graf_tab_passive_m; |
414 break; |
403 break; |
415 case QS60StyleEnums::SP_QgnGrafTabPassiveR: |
404 case QS60StyleEnums::SP_QgnGrafTabPassiveR: |
416 fallbackFileName = KAvkonBitmapFile(); |
|
417 fallbackIndex = EMbmAvkonQgn_graf_tab_passive_r; |
405 fallbackIndex = EMbmAvkonQgn_graf_tab_passive_r; |
418 break; |
406 break; |
419 case QS60StyleEnums::SP_QgnIndiCheckboxOff: |
407 case QS60StyleEnums::SP_QgnIndiCheckboxOff: |
420 fallbackFileName = KAvkonBitmapFile(); |
|
421 fallbackIndex = EMbmAvkonQgn_indi_checkbox_off; |
408 fallbackIndex = EMbmAvkonQgn_indi_checkbox_off; |
422 break; |
409 break; |
423 case QS60StyleEnums::SP_QgnIndiCheckboxOn: |
410 case QS60StyleEnums::SP_QgnIndiCheckboxOn: |
424 fallbackFileName = KAvkonBitmapFile(); |
|
425 fallbackIndex = EMbmAvkonQgn_indi_checkbox_on; |
411 fallbackIndex = EMbmAvkonQgn_indi_checkbox_on; |
426 break; |
412 break; |
427 case QS60StyleEnums::SP_QgnIndiHlColSuper: |
413 case QS60StyleEnums::SP_QgnIndiHlColSuper: |
428 fallbackFileName = KAvkonBitmapFile(); |
|
429 fallbackIndex = 0x4456; /* EMbmAvkonQgn_indi_hl_col_super */ |
414 fallbackIndex = 0x4456; /* EMbmAvkonQgn_indi_hl_col_super */ |
430 break; |
415 break; |
431 case QS60StyleEnums::SP_QgnIndiHlExpSuper: |
416 case QS60StyleEnums::SP_QgnIndiHlExpSuper: |
432 fallbackFileName = KAvkonBitmapFile(); |
|
433 fallbackIndex = 0x4458; /* EMbmAvkonQgn_indi_hl_exp_super */ |
417 fallbackIndex = 0x4458; /* EMbmAvkonQgn_indi_hl_exp_super */ |
434 break; |
418 break; |
435 case QS60StyleEnums::SP_QgnIndiHlLineBranch: |
419 case QS60StyleEnums::SP_QgnIndiHlLineBranch: |
436 fallbackFileName = KAvkonBitmapFile(); |
|
437 fallbackIndex = 0x445A; /* EMbmAvkonQgn_indi_hl_line_branch */ |
420 fallbackIndex = 0x445A; /* EMbmAvkonQgn_indi_hl_line_branch */ |
438 break; |
421 break; |
439 case QS60StyleEnums::SP_QgnIndiHlLineEnd: |
422 case QS60StyleEnums::SP_QgnIndiHlLineEnd: |
440 fallbackFileName = KAvkonBitmapFile(); |
|
441 fallbackIndex = 0x445C; /* EMbmAvkonQgn_indi_hl_line_end */ |
423 fallbackIndex = 0x445C; /* EMbmAvkonQgn_indi_hl_line_end */ |
442 break; |
424 break; |
443 case QS60StyleEnums::SP_QgnIndiHlLineStraight: |
425 case QS60StyleEnums::SP_QgnIndiHlLineStraight: |
444 fallbackFileName = KAvkonBitmapFile(); |
|
445 fallbackIndex = 0x445E; /* EMbmAvkonQgn_indi_hl_line_straight */ |
426 fallbackIndex = 0x445E; /* EMbmAvkonQgn_indi_hl_line_straight */ |
446 break; |
427 break; |
447 case QS60StyleEnums::SP_QgnIndiMarkedAdd: |
428 case QS60StyleEnums::SP_QgnIndiMarkedAdd: |
448 fallbackFileName = KAvkonBitmapFile(); |
|
449 fallbackIndex = EMbmAvkonQgn_indi_marked_add; |
429 fallbackIndex = EMbmAvkonQgn_indi_marked_add; |
450 break; |
430 break; |
451 case QS60StyleEnums::SP_QgnIndiNaviArrowLeft: |
431 case QS60StyleEnums::SP_QgnIndiNaviArrowLeft: |
452 fallbackFileName = KAvkonBitmapFile(); |
|
453 fallbackIndex = EMbmAvkonQgn_indi_navi_arrow_left; |
432 fallbackIndex = EMbmAvkonQgn_indi_navi_arrow_left; |
454 break; |
433 break; |
455 case QS60StyleEnums::SP_QgnIndiNaviArrowRight: |
434 case QS60StyleEnums::SP_QgnIndiNaviArrowRight: |
456 fallbackFileName = KAvkonBitmapFile(); |
|
457 fallbackIndex = EMbmAvkonQgn_indi_navi_arrow_right; |
435 fallbackIndex = EMbmAvkonQgn_indi_navi_arrow_right; |
458 break; |
436 break; |
459 case QS60StyleEnums::SP_QgnIndiRadiobuttOff: |
437 case QS60StyleEnums::SP_QgnIndiRadiobuttOff: |
460 fallbackFileName = KAvkonBitmapFile(); |
|
461 fallbackIndex = EMbmAvkonQgn_indi_radiobutt_off; |
438 fallbackIndex = EMbmAvkonQgn_indi_radiobutt_off; |
462 break; |
439 break; |
463 case QS60StyleEnums::SP_QgnIndiRadiobuttOn: |
440 case QS60StyleEnums::SP_QgnIndiRadiobuttOn: |
464 fallbackFileName = KAvkonBitmapFile(); |
|
465 fallbackIndex = EMbmAvkonQgn_indi_radiobutt_on; |
441 fallbackIndex = EMbmAvkonQgn_indi_radiobutt_on; |
466 break; |
442 break; |
467 case QS60StyleEnums::SP_QgnIndiSliderEdit: |
443 case QS60StyleEnums::SP_QgnGrafNsliderMarker: |
468 fallbackFileName = KAvkonBitmapFile(); |
444 fallbackIndex = 17572; /* EMbmAvkonQgn_graf_nslider_marker */ |
469 fallbackIndex = EMbmAvkonQgn_indi_slider_edit; |
445 break; |
446 case QS60StyleEnums::SP_QgnGrafNsliderMarkerSelected: |
|
447 fallbackIndex = 17574; /* EMbmAvkonQgn_graf_nslider_marker_selected */ |
|
470 break; |
448 break; |
471 case QS60StyleEnums::SP_QgnIndiSubMenu: |
449 case QS60StyleEnums::SP_QgnIndiSubMenu: |
472 fallbackFileName = KAvkonBitmapFile(); |
|
473 fallbackIndex = EMbmAvkonQgn_indi_submenu; |
450 fallbackIndex = EMbmAvkonQgn_indi_submenu; |
474 break; |
451 break; |
475 case QS60StyleEnums::SP_QgnNoteErased: |
452 case QS60StyleEnums::SP_QgnNoteErased: |
476 fallbackFileName = KAvkonBitmapFile(); |
|
477 fallbackIndex = EMbmAvkonQgn_note_erased; |
453 fallbackIndex = EMbmAvkonQgn_note_erased; |
478 break; |
454 break; |
479 case QS60StyleEnums::SP_QgnNoteError: |
455 case QS60StyleEnums::SP_QgnNoteError: |
480 fallbackFileName = KAvkonBitmapFile(); |
|
481 fallbackIndex = EMbmAvkonQgn_note_error; |
456 fallbackIndex = EMbmAvkonQgn_note_error; |
482 break; |
457 break; |
483 case QS60StyleEnums::SP_QgnNoteInfo: |
458 case QS60StyleEnums::SP_QgnNoteInfo: |
484 fallbackFileName = KAvkonBitmapFile(); |
|
485 fallbackIndex = EMbmAvkonQgn_note_info; |
459 fallbackIndex = EMbmAvkonQgn_note_info; |
486 break; |
460 break; |
487 case QS60StyleEnums::SP_QgnNoteOk: |
461 case QS60StyleEnums::SP_QgnNoteOk: |
488 fallbackFileName = KAvkonBitmapFile(); |
|
489 fallbackIndex = EMbmAvkonQgn_note_ok; |
462 fallbackIndex = EMbmAvkonQgn_note_ok; |
490 break; |
463 break; |
491 case QS60StyleEnums::SP_QgnNoteQuery: |
464 case QS60StyleEnums::SP_QgnNoteQuery: |
492 fallbackFileName = KAvkonBitmapFile(); |
|
493 fallbackIndex = EMbmAvkonQgn_note_query; |
465 fallbackIndex = EMbmAvkonQgn_note_query; |
494 break; |
466 break; |
495 case QS60StyleEnums::SP_QgnNoteWarning: |
467 case QS60StyleEnums::SP_QgnNoteWarning: |
496 fallbackFileName = KAvkonBitmapFile(); |
|
497 fallbackIndex = EMbmAvkonQgn_note_warning; |
468 fallbackIndex = EMbmAvkonQgn_note_warning; |
498 break; |
469 break; |
499 case QS60StyleEnums::SP_QgnPropFileSmall: |
470 case QS60StyleEnums::SP_QgnPropFileSmall: |
500 fallbackFileName = KAvkonBitmapFile(); |
|
501 fallbackIndex = EMbmAvkonQgn_prop_file_small; |
471 fallbackIndex = EMbmAvkonQgn_prop_file_small; |
502 break; |
472 break; |
503 case QS60StyleEnums::SP_QgnPropFolderCurrent: |
473 case QS60StyleEnums::SP_QgnPropFolderCurrent: |
504 fallbackFileName = KAvkonBitmapFile(); |
|
505 fallbackIndex = EMbmAvkonQgn_prop_folder_current; |
474 fallbackIndex = EMbmAvkonQgn_prop_folder_current; |
506 break; |
475 break; |
507 case QS60StyleEnums::SP_QgnPropFolderSmall: |
476 case QS60StyleEnums::SP_QgnPropFolderSmall: |
508 fallbackFileName = KAvkonBitmapFile(); |
|
509 fallbackIndex = EMbmAvkonQgn_prop_folder_small; |
477 fallbackIndex = EMbmAvkonQgn_prop_folder_small; |
510 break; |
478 break; |
511 case QS60StyleEnums::SP_QgnPropFolderSmallNew: |
479 case QS60StyleEnums::SP_QgnPropFolderSmallNew: |
512 fallbackFileName = KAvkonBitmapFile(); |
|
513 fallbackIndex = EMbmAvkonQgn_prop_folder_small_new; |
480 fallbackIndex = EMbmAvkonQgn_prop_folder_small_new; |
514 break; |
481 break; |
515 case QS60StyleEnums::SP_QgnPropPhoneMemcLarge: |
482 case QS60StyleEnums::SP_QgnPropPhoneMemcLarge: |
516 fallbackFileName = KAvkonBitmapFile(); |
|
517 fallbackIndex = EMbmAvkonQgn_prop_phone_memc_large; |
483 fallbackIndex = EMbmAvkonQgn_prop_phone_memc_large; |
518 break; |
484 break; |
519 default: |
485 default: |
520 fallbackFileName = KNullDesC(); |
|
521 fallbackIndex = -1; |
486 fallbackIndex = -1; |
522 break; |
487 break; |
523 } |
488 } |
524 } |
489 } |
525 |
490 |
526 QPixmap QS60StyleModeSpecifics::colorSkinnedGraphicsLX( |
491 QPixmap QS60StyleModeSpecifics::colorSkinnedGraphicsLX( |
527 const QS60StyleEnums::SkinParts &stylepart, |
492 const QS60StyleEnums::SkinParts &stylepart, |
528 const QSize &size, QS60StylePrivate::SkinElementFlags flags) |
493 const QSize &size, QPainter *painter, QS60StylePrivate::SkinElementFlags flags) |
529 { |
494 { |
530 // this function can throw both exceptions and leaves. There are no cleanup dependencies between Qt and Symbian parts. |
495 // this function can throw both exceptions and leaves. There are no cleanup dependencies between Qt and Symbian parts. |
531 const int stylepartIndex = (int)stylepart; |
496 const int stylepartIndex = (int)stylepart; |
532 const TAknsItemID skinId = m_partMap[stylepartIndex].skinID; |
497 const TAknsItemID skinId = m_partMap[stylepartIndex].skinID; |
533 |
498 |
534 TInt fallbackGraphicID = -1; |
499 TInt fallbackGraphicID = -1; |
535 HBufC* iconFile = HBufC::NewLC( KMaxFileName ); |
500 HBufC* iconFile = HBufC::NewLC( KMaxFileName ); |
536 TPtr fileNamePtr = iconFile->Des(); |
501 fallbackInfo(stylepart, fallbackGraphicID); |
537 fallbackInfo(stylepart, fileNamePtr, fallbackGraphicID); |
|
538 |
502 |
539 TAknsItemID colorGroup = KAknsIIDQsnIconColors; |
503 TAknsItemID colorGroup = KAknsIIDQsnIconColors; |
540 int colorIndex = 0; |
504 TRgb defaultColor = KRgbBlack; |
541 colorGroupAndIndex(stylepart, colorGroup, colorIndex); |
505 int colorIndex = -1; //set a bogus value to color index to ensure that painter color is used |
506 //to color the icon |
|
507 if (painter) { |
|
508 QRgb widgetColor = painter->pen().color().rgb(); |
|
509 defaultColor = TRgb(qRed(widgetColor), qGreen(widgetColor), qBlue(widgetColor)); |
|
510 } |
|
542 |
511 |
543 const bool rotatedBy90or270 = |
512 const bool rotatedBy90or270 = |
544 (flags & (QS60StylePrivate::SF_PointEast | QS60StylePrivate::SF_PointWest)); |
513 (flags & (QS60StylePrivate::SF_PointEast | QS60StylePrivate::SF_PointWest)); |
545 const TSize targetSize = |
514 const TSize targetSize = |
546 rotatedBy90or270?TSize(size.height(), size.width()):TSize(size.width(), size.height()); |
515 rotatedBy90or270?TSize(size.height(), size.width()):TSize(size.width(), size.height()); |
548 CFbsBitmap *iconMask = 0; |
517 CFbsBitmap *iconMask = 0; |
549 const TInt fallbackGraphicsMaskID = |
518 const TInt fallbackGraphicsMaskID = |
550 fallbackGraphicID == KErrNotFound?KErrNotFound:fallbackGraphicID+1; //masks are auto-generated as next in mif files |
519 fallbackGraphicID == KErrNotFound?KErrNotFound:fallbackGraphicID+1; //masks are auto-generated as next in mif files |
551 MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); |
520 MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); |
552 AknsUtils::CreateColorIconLC( |
521 AknsUtils::CreateColorIconLC( |
553 skinInstance, skinId, colorGroup, colorIndex, icon, iconMask, fileNamePtr, fallbackGraphicID , fallbackGraphicsMaskID, KRgbBlack); |
522 skinInstance, |
554 User::LeaveIfError(AknIconUtils::SetSize(icon, targetSize, EAspectRatioNotPreserved)); |
523 skinId, |
555 User::LeaveIfError(AknIconUtils::SetSize(iconMask, targetSize, EAspectRatioNotPreserved)); |
524 colorGroup, |
556 QPixmap result = fromFbsBitmap(icon, iconMask, flags, qt_TDisplayMode2Format(icon->DisplayMode())); |
525 colorIndex, |
526 icon, |
|
527 iconMask, |
|
528 AknIconUtils::AvkonIconFileName(), |
|
529 fallbackGraphicID, |
|
530 fallbackGraphicsMaskID, |
|
531 defaultColor); |
|
532 |
|
533 QPixmap result = fromFbsBitmap(icon, iconMask, flags, targetSize); |
|
557 CleanupStack::PopAndDestroy(3); //icon, iconMask, iconFile |
534 CleanupStack::PopAndDestroy(3); //icon, iconMask, iconFile |
558 return result; |
535 return result; |
559 } |
536 } |
560 |
537 |
561 QColor QS60StyleModeSpecifics::colorValue(const TAknsItemID &colorGroup, int colorIndex) |
538 QColor QS60StyleModeSpecifics::colorValue(const TAknsItemID &colorGroup, int colorIndex) |
571 QAutoFbsBitmapHeapLock(CFbsBitmap* aBmp) : mBmp(aBmp) { mBmp->LockHeap(); } |
548 QAutoFbsBitmapHeapLock(CFbsBitmap* aBmp) : mBmp(aBmp) { mBmp->LockHeap(); } |
572 ~QAutoFbsBitmapHeapLock() { mBmp->UnlockHeap(); } |
549 ~QAutoFbsBitmapHeapLock() { mBmp->UnlockHeap(); } |
573 CFbsBitmap* mBmp; |
550 CFbsBitmap* mBmp; |
574 }; |
551 }; |
575 |
552 |
576 QPixmap QS60StyleModeSpecifics::fromFbsBitmap(CFbsBitmap *icon, CFbsBitmap *mask, QS60StylePrivate::SkinElementFlags flags, QImage::Format format) |
553 QPixmap QS60StyleModeSpecifics::fromFbsBitmap(CFbsBitmap *icon, CFbsBitmap *mask, QS60StylePrivate::SkinElementFlags flags, const TSize &targetSize) |
577 { |
554 { |
578 Q_ASSERT(icon); |
555 Q_ASSERT(icon); |
579 const TSize iconSize = icon->SizeInPixels(); |
556 |
580 const int iconBytesPerLine = CFbsBitmap::ScanLineLength(iconSize.iWidth, icon->DisplayMode()); |
557 AknIconUtils::DisableCompression(icon); |
581 const int iconBytesCount = iconBytesPerLine * iconSize.iHeight; |
558 TInt error = AknIconUtils::SetSize(icon, targetSize, EAspectRatioNotPreserved); |
582 |
559 |
583 QImage iconImage(qt_TSize2QSize(iconSize), format); |
560 if (mask && !error) { |
584 if (iconImage.isNull()) |
561 AknIconUtils::DisableCompression(mask); |
562 error = AknIconUtils::SetSize(mask, targetSize, EAspectRatioNotPreserved); |
|
563 } |
|
564 if (error) |
|
585 return QPixmap(); |
565 return QPixmap(); |
586 |
566 |
587 checkAndUnCompressBitmap(icon); |
567 QPixmap pixmap = QPixmap::fromSymbianCFbsBitmap(icon); |
588 if (!icon) //checkAndUnCompressBitmap might set icon to NULL |
568 if (mask) |
589 return QPixmap(); |
569 pixmap.setAlphaChannel(QPixmap::fromSymbianCFbsBitmap(mask)); |
590 |
570 |
591 icon->LockHeap(); |
571 if ((flags & QS60StylePrivate::SF_PointEast) || |
592 const uchar *const iconBytes = (uchar*)icon->DataAddress(); |
572 (flags & QS60StylePrivate::SF_PointSouth) || |
593 // The icon data needs to be copied, since the color format will be |
573 (flags & QS60StylePrivate::SF_PointWest)) { |
594 // automatically converted to Format_ARGB32 when setAlphaChannel is called. |
574 QImage iconImage = pixmap.toImage(); |
595 memcpy(iconImage.bits(), iconBytes, iconBytesCount); |
575 QTransform imageTransform; |
596 icon->UnlockHeap(); |
576 if (flags & QS60StylePrivate::SF_PointEast) { |
597 if (mask) { |
577 imageTransform.rotate(90); |
598 checkAndUnCompressBitmap(mask); |
578 } else if (flags & QS60StylePrivate::SF_PointSouth) { |
599 if (mask) { //checkAndUnCompressBitmap might set mask to NULL |
579 imageTransform.rotate(180); |
600 const TSize maskSize = icon->SizeInPixels(); |
580 iconImage = iconImage.transformed(imageTransform); |
601 const int maskBytesPerLine = CFbsBitmap::ScanLineLength(maskSize.iWidth, mask->DisplayMode()); |
581 } else if (flags & QS60StylePrivate::SF_PointWest) { |
602 // heap lock object required because QImage ctor might throw |
582 imageTransform.rotate(270); |
603 QAutoFbsBitmapHeapLock maskHeapLock(mask); |
|
604 const uchar *const maskBytes = (uchar *)mask->DataAddress(); |
|
605 // Since no other bitmap should be locked, we can just "borrow" the mask data for setAlphaChannel |
|
606 const QImage maskImage(maskBytes, maskSize.iWidth, maskSize.iHeight, maskBytesPerLine, QImage::Format_Indexed8); |
|
607 if (!maskImage.isNull()) |
|
608 iconImage.setAlphaChannel(maskImage); |
|
609 } |
583 } |
610 } |
584 if (imageTransform.isRotating()) |
611 |
585 iconImage = iconImage.transformed(imageTransform); |
612 QTransform imageTransform; |
586 |
613 if (flags & QS60StylePrivate::SF_PointEast) { |
587 pixmap = QPixmap::fromImage(iconImage); |
614 imageTransform.rotate(90); |
588 } |
615 } else if (flags & QS60StylePrivate::SF_PointSouth) { |
589 return pixmap; |
616 imageTransform.rotate(180); |
|
617 iconImage = iconImage.transformed(imageTransform); |
|
618 } else if (flags & QS60StylePrivate::SF_PointWest) { |
|
619 imageTransform.rotate(270); |
|
620 } |
|
621 if (imageTransform.isRotating()) |
|
622 iconImage = iconImage.transformed(imageTransform); |
|
623 |
|
624 return QPixmap::fromImage(iconImage); |
|
625 } |
590 } |
626 |
591 |
627 bool QS60StylePrivate::isTouchSupported() |
592 bool QS60StylePrivate::isTouchSupported() |
628 { |
593 { |
629 return bool(AknLayoutUtils::PenEnabled()); |
594 return bool(AknLayoutUtils::PenEnabled()); |
630 } |
595 } |
631 |
596 |
632 bool QS60StylePrivate::isToolBarBackground() |
597 bool QS60StylePrivate::isToolBarBackground() |
633 { |
598 { |
634 return (QSysInfo::s60Version() == QSysInfo::SV_S60_3_1 || QSysInfo::s60Version() == QSysInfo::SV_S60_3_2); |
599 return (QSysInfo::s60Version() == QSysInfo::SV_S60_3_1 || QSysInfo::s60Version() == QSysInfo::SV_S60_3_2); |
600 } |
|
601 |
|
602 bool QS60StylePrivate::hasSliderGrooveGraphic() |
|
603 { |
|
604 return QSysInfo::s60Version() != QSysInfo::SV_S60_3_1; |
|
635 } |
605 } |
636 |
606 |
637 QPoint qt_s60_fill_background_offset(const QWidget *targetWidget) |
607 QPoint qt_s60_fill_background_offset(const QWidget *targetWidget) |
638 { |
608 { |
639 CCoeControl *control = targetWidget->effectiveWinId(); |
609 CCoeControl *control = targetWidget->effectiveWinId(); |
650 } |
620 } |
651 return QPoint(pos.iX, pos.iY); |
621 return QPoint(pos.iX, pos.iY); |
652 } |
622 } |
653 |
623 |
654 QPixmap QS60StyleModeSpecifics::createSkinnedGraphicsLX( |
624 QPixmap QS60StyleModeSpecifics::createSkinnedGraphicsLX( |
655 QS60StyleEnums::SkinParts part, |
625 QS60StyleEnums::SkinParts part, const QSize &size, |
656 const QSize &size, QS60StylePrivate::SkinElementFlags flags) |
626 QS60StylePrivate::SkinElementFlags flags) |
657 { |
627 { |
658 // this function can throw both exceptions and leaves. There are no cleanup dependencies between Qt and Symbian parts. |
628 // this function can throw both exceptions and leaves. There are no cleanup dependencies between Qt and Symbian parts. |
659 if (!size.isValid()) |
629 if (!size.isValid()) |
660 return QPixmap(); |
630 return QPixmap(); |
661 |
631 |
662 // Check release support and change part, if necessary. |
632 // Check release support and change part, if necessary. |
663 const TAknsItemID skinId = checkAndUpdateReleaseSpecificGraphics((int)part); |
633 const TAknsItemID skinId = partSpecificThemeId((int)part); |
664 const int stylepartIndex = (int)part; |
634 const int stylepartIndex = (int)part; |
665 const TDrawType drawType = m_partMap[stylepartIndex].drawType; |
635 const TDrawType drawType = m_partMap[stylepartIndex].drawType; |
666 Q_ASSERT(drawType != ENoDraw); |
636 Q_ASSERT(drawType != ENoDraw); |
667 const bool rotatedBy90or270 = |
637 const bool rotatedBy90or270 = |
668 (flags & (QS60StylePrivate::SF_PointEast | QS60StylePrivate::SF_PointWest)); |
638 (flags & (QS60StylePrivate::SF_PointEast | QS60StylePrivate::SF_PointWest)); |
672 MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); |
642 MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); |
673 |
643 |
674 QPixmap result; |
644 QPixmap result; |
675 |
645 |
676 switch (drawType) { |
646 switch (drawType) { |
647 case EDrawGulIcon: { |
|
648 CGulIcon* icon = AknsUtils::CreateGulIconL( AknsUtils::SkinInstance(), skinId, EFalse ); |
|
649 if (icon) |
|
650 result = fromFbsBitmap(icon->Bitmap(), icon->Mask(), flags, targetSize); |
|
651 delete icon; |
|
652 break; |
|
653 } |
|
677 case EDrawIcon: { |
654 case EDrawIcon: { |
678 TInt fallbackGraphicID = -1; |
655 TInt fallbackGraphicID = -1; |
679 HBufC* iconFile = HBufC::NewLC( KMaxFileName ); |
656 fallbackInfo(part, fallbackGraphicID); |
680 TPtr fileNamePtr = iconFile->Des(); |
|
681 fallbackInfo(part, fileNamePtr, fallbackGraphicID); |
|
682 // todo: could we instead use AknIconUtils::AvkonIconFileName(); to avoid allocating each time? |
|
683 |
657 |
684 CFbsBitmap *icon = 0; |
658 CFbsBitmap *icon = 0; |
685 CFbsBitmap *iconMask = 0; |
659 CFbsBitmap *iconMask = 0; |
686 const TInt fallbackGraphicsMaskID = |
660 const TInt fallbackGraphicsMaskID = |
687 fallbackGraphicID == KErrNotFound?KErrNotFound:fallbackGraphicID+1; //masks are auto-generated as next in mif files |
661 fallbackGraphicID == KErrNotFound?KErrNotFound:fallbackGraphicID+1; //masks are auto-generated as next in mif files |
688 // QS60WindowSurface::unlockBitmapHeap(); |
662 |
689 AknsUtils::CreateIconLC(skinInstance, skinId, icon, iconMask, fileNamePtr, fallbackGraphicID , fallbackGraphicsMaskID); |
663 AknsUtils::CreateIconL( |
690 User::LeaveIfError(AknIconUtils::SetSize(icon, targetSize, EAspectRatioNotPreserved)); |
664 skinInstance, |
691 User::LeaveIfError(AknIconUtils::SetSize(iconMask, targetSize, EAspectRatioNotPreserved)); |
665 skinId, |
692 result = fromFbsBitmap(icon, iconMask, flags, qt_TDisplayMode2Format(icon->DisplayMode())); |
666 icon, |
693 CleanupStack::PopAndDestroy(3); // iconMask, icon, iconFile |
667 iconMask, |
694 // QS60WindowSurface::lockBitmapHeap(); |
668 AknIconUtils::AvkonIconFileName(), |
669 fallbackGraphicID , |
|
670 fallbackGraphicsMaskID); |
|
671 |
|
672 result = fromFbsBitmap(icon, iconMask, flags, targetSize); |
|
673 delete icon; |
|
674 delete iconMask; |
|
695 break; |
675 break; |
696 } |
676 } |
697 case EDrawBackground: { |
677 case EDrawBackground: { |
698 // QS60WindowSurface::unlockBitmapHeap(); |
678 // QS60WindowSurface::unlockBitmapHeap(); |
699 CFbsBitmap *background = new (ELeave) CFbsBitmap(); //offscreen |
679 CFbsBitmap *background = new (ELeave) CFbsBitmap(); //offscreen |
700 CleanupStack::PushL(background); |
680 CleanupStack::PushL(background); |
701 User::LeaveIfError(background->Create(targetSize, EColor16MA)); |
681 User::LeaveIfError(background->Create(targetSize, EColor16MA)); |
702 |
682 |
703 CFbsBitmapDevice* dev = CFbsBitmapDevice::NewL(background); |
683 CFbsBitmapDevice *dev = CFbsBitmapDevice::NewL(background); |
704 CleanupStack::PushL(dev); |
684 CleanupStack::PushL(dev); |
705 CFbsBitGc* gc = NULL; |
685 CFbsBitGc *gc = NULL; |
706 User::LeaveIfError(dev->CreateContext(gc)); |
686 User::LeaveIfError(dev->CreateContext(gc)); |
707 CleanupStack::PushL(gc); |
687 CleanupStack::PushL(gc); |
708 |
688 |
709 CAknsBasicBackgroundControlContext* bgContext = CAknsBasicBackgroundControlContext::NewL( |
689 CAknsBasicBackgroundControlContext *bgContext = CAknsBasicBackgroundControlContext::NewL( |
710 skinId, |
690 skinId, |
711 targetSize, |
691 targetSize, |
712 EFalse); |
692 EFalse); |
713 CleanupStack::PushL(bgContext); |
693 CleanupStack::PushL(bgContext); |
714 |
694 |
720 TPoint(), |
700 TPoint(), |
721 targetSize, |
701 targetSize, |
722 KAknsDrawParamDefault | KAknsDrawParamRGBOnly); |
702 KAknsDrawParamDefault | KAknsDrawParamRGBOnly); |
723 |
703 |
724 if (drawn) |
704 if (drawn) |
725 result = fromFbsBitmap(background, NULL, flags, QImage::Format_RGB32); |
705 result = fromFbsBitmap(background, NULL, flags, targetSize); |
706 // if drawing fails in skin server, just ignore the background (probably OOM occured) |
|
726 |
707 |
727 CleanupStack::PopAndDestroy(4, background); //background, dev, gc, bgContext |
708 CleanupStack::PopAndDestroy(4, background); //background, dev, gc, bgContext |
728 // QS60WindowSurface::lockBitmapHeap(); |
709 // QS60WindowSurface::lockBitmapHeap(); |
729 break; |
710 break; |
730 } |
711 } |
731 } |
712 } |
713 if (!result) |
|
714 result = QPixmap(); |
|
732 |
715 |
733 return result; |
716 return result; |
734 } |
717 } |
735 |
718 |
736 QPixmap QS60StyleModeSpecifics::createSkinnedGraphicsLX(QS60StylePrivate::SkinFrameElements frameElement, |
719 QPixmap QS60StyleModeSpecifics::createSkinnedGraphicsLX(QS60StylePrivate::SkinFrameElements frameElement, |
760 CleanupStack::PushL(bitmapDev); |
743 CleanupStack::PushL(bitmapDev); |
761 CFbsBitGc* bitmapGc = NULL; |
744 CFbsBitGc* bitmapGc = NULL; |
762 User::LeaveIfError(bitmapDev->CreateContext(bitmapGc)); |
745 User::LeaveIfError(bitmapDev->CreateContext(bitmapGc)); |
763 CleanupStack::PushL(bitmapGc); |
746 CleanupStack::PushL(bitmapGc); |
764 |
747 |
748 #ifndef Q_SYMBIAN_HAS_EXTENDED_BITMAP_TYPE |
|
765 frame->LockHeap(); |
749 frame->LockHeap(); |
766 memset(frame->DataAddress(), 0, frame->SizeInPixels().iWidth * frame->SizeInPixels().iHeight * 4); // 4: argb bytes |
750 memset(frame->DataAddress(), 0, frame->SizeInPixels().iWidth * frame->SizeInPixels().iHeight * 4); // 4: argb bytes |
767 frame->UnlockHeap(); |
751 frame->UnlockHeap(); |
752 #endif |
|
768 |
753 |
769 const TRect outerRect(TPoint(0, 0), targetSize); |
754 const TRect outerRect(TPoint(0, 0), targetSize); |
770 const TRect innerRect = innerRectFromElement(frameElement, outerRect); |
755 const TRect innerRect = innerRectFromElement(frameElement, outerRect); |
771 |
756 |
772 TAknsItemID frameSkinID, centerSkinID; |
757 TAknsItemID frameSkinID, centerSkinID; |
773 frameSkinID = centerSkinID = checkAndUpdateReleaseSpecificGraphics(QS60StylePrivate::m_frameElementsData[frameElement].center); |
758 frameSkinID = centerSkinID = partSpecificThemeId(QS60StylePrivate::m_frameElementsData[frameElement].center); |
774 frameIdAndCenterId(frameElement, frameSkinID, centerSkinID); |
759 frameIdAndCenterId(frameElement, frameSkinID, centerSkinID); |
775 const TBool drawn = AknsDrawUtils::DrawFrame( skinInstance, |
760 |
776 *bitmapGc, outerRect, innerRect, |
761 TBool drawn = AknsDrawUtils::DrawFrame( |
777 frameSkinID, centerSkinID, |
762 skinInstance, |
778 drawParam ); |
763 *bitmapGc, |
764 outerRect, |
|
765 innerRect, |
|
766 frameSkinID, |
|
767 centerSkinID, |
|
768 drawParam ); |
|
779 |
769 |
780 if (S60->supportsPremultipliedAlpha) { |
770 if (S60->supportsPremultipliedAlpha) { |
781 if (drawn) |
771 if (drawn) { |
782 result = fromFbsBitmap(frame, NULL, flags, QImage::Format_ARGB32_Premultiplied); |
772 result = fromFbsBitmap(frame, NULL, flags, targetSize); |
773 } else { |
|
774 // Drawing might fail due to OOM (we can do nothing about that), |
|
775 // or due to skin item not being available. |
|
776 // If the latter occurs, lets try switch to non-release specific items (if available) |
|
777 // and re-try the drawing. |
|
778 frameSkinID = centerSkinID = m_partMap[(int)QS60StylePrivate::m_frameElementsData[frameElement].center].skinID; |
|
779 frameIdAndCenterId(frameElement, frameSkinID, centerSkinID); |
|
780 drawn = AknsDrawUtils::DrawFrame( skinInstance, |
|
781 *bitmapGc, outerRect, innerRect, |
|
782 frameSkinID, centerSkinID, |
|
783 drawParam ); |
|
784 // in case drawing fails, even after using default graphics, ignore the error |
|
785 if (drawn) |
|
786 result = fromFbsBitmap(frame, NULL, flags, targetSize); |
|
787 } |
|
783 } else { |
788 } else { |
784 TDisplayMode maskDepth = EGray2; |
789 TDisplayMode maskDepth = EGray2; |
785 // Query the skin item for possible frame graphics mask details. |
790 // Query the skin item for possible frame graphics mask details. |
786 if (skinInstance) { |
791 if (skinInstance) { |
787 CAknsMaskedBitmapItemData* skinMaskedBmp = static_cast<CAknsMaskedBitmapItemData*>( |
792 CAknsMaskedBitmapItemData* skinMaskedBmp = static_cast<CAknsMaskedBitmapItemData*>( |
807 maskBitGc->SetBrushStyle(CGraphicsContext::ESolidBrush); |
812 maskBitGc->SetBrushStyle(CGraphicsContext::ESolidBrush); |
808 maskBitGc->SetBrushColor(KRgbWhite); |
813 maskBitGc->SetBrushColor(KRgbWhite); |
809 maskBitGc->Clear(); |
814 maskBitGc->Clear(); |
810 maskBitGc->SetBrushStyle(CGraphicsContext::ENullBrush); |
815 maskBitGc->SetBrushStyle(CGraphicsContext::ENullBrush); |
811 |
816 |
812 AknsDrawUtils::DrawFrame(skinInstance, |
817 drawn = AknsDrawUtils::DrawFrame(skinInstance, |
813 *maskBitGc, outerRect, innerRect, |
818 *maskBitGc, outerRect, innerRect, |
814 frameSkinID, centerSkinID, |
819 frameSkinID, centerSkinID, |
815 KAknsSDMAlphaOnly |KAknsDrawParamNoClearUnderImage); |
820 KAknsSDMAlphaOnly |KAknsDrawParamNoClearUnderImage); |
816 result = fromFbsBitmap(frame, frameMask, flags, QImage::Format_ARGB32); |
821 if (drawn) |
822 result = fromFbsBitmap(frame, frameMask, flags, targetSize); |
|
817 } |
823 } |
818 CleanupStack::PopAndDestroy(3, frameMask); |
824 CleanupStack::PopAndDestroy(3, frameMask); |
819 } |
825 } |
820 } |
826 } |
821 CleanupStack::PopAndDestroy(3, frame); //frame, bitmapDev, bitmapGc |
827 CleanupStack::PopAndDestroy(3, frame); //frame, bitmapDev, bitmapGc |
847 case QS60StylePrivate::SF_PanelBackground: |
853 case QS60StylePrivate::SF_PanelBackground: |
848 // remove center piece for panel graphics, so that only border is drawn |
854 // remove center piece for panel graphics, so that only border is drawn |
849 centerId.Set(KAknsIIDNone); |
855 centerId.Set(KAknsIIDNone); |
850 frameId.Set(KAknsIIDQsnFrSetOpt); |
856 frameId.Set(KAknsIIDQsnFrSetOpt); |
851 break; |
857 break; |
852 case QS60StylePrivate::SF_Editor: |
|
853 centerId.Set(KAknsIIDQsnFrNotepadCenter); |
|
854 frameId.Set(KAknsIIDQsnFrNotepadCont); |
|
855 break; |
|
856 default: |
858 default: |
857 // center should be correct here |
859 // center should be correct here |
858 frameId.iMinor = centerId.iMinor - 9; |
860 frameId.iMinor = centerId.iMinor - 9; |
859 break; |
861 break; |
860 } |
862 } |
889 bool QS60StyleModeSpecifics::checkSupport(const int supportedRelease) |
891 bool QS60StyleModeSpecifics::checkSupport(const int supportedRelease) |
890 { |
892 { |
891 const QSysInfo::S60Version currentRelease = QSysInfo::s60Version(); |
893 const QSysInfo::S60Version currentRelease = QSysInfo::s60Version(); |
892 return ( (currentRelease == QSysInfo::SV_S60_3_1 && supportedRelease & ES60_3_1) || |
894 return ( (currentRelease == QSysInfo::SV_S60_3_1 && supportedRelease & ES60_3_1) || |
893 (currentRelease == QSysInfo::SV_S60_3_2 && supportedRelease & ES60_3_2) || |
895 (currentRelease == QSysInfo::SV_S60_3_2 && supportedRelease & ES60_3_2) || |
894 (currentRelease == QSysInfo::SV_S60_5_0 && supportedRelease & ES60_5_0)); |
896 (currentRelease == QSysInfo::SV_S60_5_0 && supportedRelease & ES60_5_0) || |
895 } |
897 (currentRelease == QSysInfo::SV_S60_5_1 && supportedRelease & ES60_5_1) || |
896 |
898 (currentRelease == QSysInfo::SV_S60_5_2 && supportedRelease & ES60_5_2)); |
897 TAknsItemID QS60StyleModeSpecifics::checkAndUpdateReleaseSpecificGraphics(int part) |
899 } |
900 |
|
901 TAknsItemID QS60StyleModeSpecifics::partSpecificThemeId(int part) |
|
898 { |
902 { |
899 TAknsItemID newSkinId; |
903 TAknsItemID newSkinId; |
900 if (!checkSupport(m_partMap[(int)part].supportInfo)) |
904 if (!checkSupport(m_partMap[(int)part].supportInfo)) |
901 newSkinId.Set(m_partMap[(int)part].newMajorSkinId, m_partMap[(int)part].newMinorSkinId); |
905 newSkinId.Set(m_partMap[(int)part].newMajorSkinId, m_partMap[(int)part].newMinorSkinId); |
902 else |
906 else |
903 newSkinId.Set(m_partMap[(int)part].skinID); |
907 newSkinId.Set(m_partMap[(int)part].skinID); |
904 return newSkinId; |
908 return newSkinId; |
905 } |
909 } |
906 |
910 |
907 void QS60StyleModeSpecifics::checkAndUnCompressBitmap(CFbsBitmap*& aOriginalBitmap) |
|
908 { |
|
909 TRAPD(error, checkAndUnCompressBitmapL(aOriginalBitmap)); |
|
910 if (error) |
|
911 aOriginalBitmap = NULL; |
|
912 } |
|
913 |
|
914 void QS60StyleModeSpecifics::checkAndUnCompressBitmapL(CFbsBitmap*& aOriginalBitmap) |
|
915 { |
|
916 const TSize iconSize = aOriginalBitmap->SizeInPixels(); |
|
917 const int iconBytesPerLine = CFbsBitmap::ScanLineLength(iconSize.iWidth, aOriginalBitmap->DisplayMode()); |
|
918 const int iconBytesCount = iconBytesPerLine * iconSize.iHeight; |
|
919 if (aOriginalBitmap->IsCompressedInRAM() || aOriginalBitmap->Header().iBitmapSize < iconBytesCount) { |
|
920 const TSize iconSize(aOriginalBitmap->SizeInPixels().iWidth, |
|
921 aOriginalBitmap->SizeInPixels().iHeight); |
|
922 CFbsBitmap* uncompressedBitmap = new (ELeave) CFbsBitmap(); |
|
923 CleanupStack::PushL(uncompressedBitmap); |
|
924 User::LeaveIfError(uncompressedBitmap->Create(iconSize, |
|
925 aOriginalBitmap->DisplayMode())); |
|
926 unCompressBitmapL(iconSize, uncompressedBitmap, aOriginalBitmap); |
|
927 CleanupStack::Pop(uncompressedBitmap); |
|
928 User::LeaveIfError(aOriginalBitmap->Duplicate( |
|
929 uncompressedBitmap->Handle())); |
|
930 delete uncompressedBitmap; |
|
931 } |
|
932 } |
|
933 |
|
934 QFont QS60StylePrivate::s60Font_specific( |
911 QFont QS60StylePrivate::s60Font_specific( |
935 QS60StyleEnums::FontCategories fontCategory, int pointSize) |
912 QS60StyleEnums::FontCategories fontCategory, int pointSize) |
936 { |
913 { |
937 TAknFontCategory aknFontCategory = EAknFontCategoryUndefined; |
914 TAknFontCategory aknFontCategory = EAknFontCategoryUndefined; |
938 switch (fontCategory) { |
915 switch (fontCategory) { |
981 |
958 |
982 void QS60StylePrivate::setActiveLayout() |
959 void QS60StylePrivate::setActiveLayout() |
983 { |
960 { |
984 const QSize activeScreenSize(screenSize()); |
961 const QSize activeScreenSize(screenSize()); |
985 int activeLayoutIndex = -1; |
962 int activeLayoutIndex = -1; |
986 const bool mirrored = !QApplication::isLeftToRight(); |
|
987 const short screenHeight = (short)activeScreenSize.height(); |
963 const short screenHeight = (short)activeScreenSize.height(); |
988 const short screenWidth = (short)activeScreenSize.width(); |
964 const short screenWidth = (short)activeScreenSize.width(); |
989 for (int i=0; i<m_numberOfLayouts; i++) { |
965 for (int i=0; i<m_numberOfLayouts; i++) { |
990 if (screenHeight==m_layoutHeaders[i].height && |
966 if (screenHeight==m_layoutHeaders[i].height && |
991 screenWidth==m_layoutHeaders[i].width && |
967 screenWidth==m_layoutHeaders[i].width) { |
992 mirrored==m_layoutHeaders[i].mirroring) { |
|
993 activeLayoutIndex = i; |
968 activeLayoutIndex = i; |
994 break; |
969 break; |
995 } |
|
996 } |
|
997 |
|
998 //not found, lets try without mirroring info |
|
999 if (activeLayoutIndex==-1){ |
|
1000 for (int i=0; i<m_numberOfLayouts; i++) { |
|
1001 if (screenHeight==m_layoutHeaders[i].height && |
|
1002 screenWidth==m_layoutHeaders[i].width) { |
|
1003 activeLayoutIndex = i; |
|
1004 break; |
|
1005 } |
|
1006 } |
970 } |
1007 } |
971 } |
1008 |
972 |
1009 //not found, lets try with either of dimensions |
973 //not found, lets try with either of dimensions |
1010 if (activeLayoutIndex==-1){ |
974 if (activeLayoutIndex==-1){ |
1011 const QSysInfo::S60Version currentRelease = QSysInfo::s60Version(); |
975 const QSysInfo::S60Version currentRelease = QSysInfo::s60Version(); |
1012 const bool landscape = screenHeight < screenWidth; |
976 const bool landscape = screenHeight < screenWidth; |
1013 |
977 |
1014 activeLayoutIndex = (currentRelease == QSysInfo::SV_S60_3_1 || currentRelease == QSysInfo::SV_S60_3_2) ? 0 : 4; |
978 activeLayoutIndex = (currentRelease == QSysInfo::SV_S60_3_1 || currentRelease == QSysInfo::SV_S60_3_2) ? 0 : 2; |
1015 activeLayoutIndex += (!landscape) ? 2 : 0; |
979 activeLayoutIndex += (!landscape) ? 1 : 0; |
1016 activeLayoutIndex += (!mirrored) ? 1 : 0; |
|
1017 } |
980 } |
1018 |
981 |
1019 m_pmPointer = data[activeLayoutIndex]; |
982 m_pmPointer = data[activeLayoutIndex]; |
1020 } |
983 } |
1021 |
984 |
1022 QS60StylePrivate::QS60StylePrivate() |
985 QS60StylePrivate::QS60StylePrivate() |
1023 { |
986 { |
1024 // No need to set active layout, if dynamic metrics API is available |
987 // No need to set active layout, if dynamic metrics API is available |
1025 setActiveLayout(); |
988 setActiveLayout(); |
1026 } |
|
1027 |
|
1028 void QS60StylePrivate::setStyleProperty_specific(const char *name, const QVariant &value) |
|
1029 { |
|
1030 if (QLatin1String(name) == QLatin1String("foo")) { |
|
1031 // BaR |
|
1032 } else { |
|
1033 setStyleProperty(name, value); |
|
1034 } |
|
1035 } |
|
1036 |
|
1037 QVariant QS60StylePrivate::styleProperty_specific(const char *name) const |
|
1038 { |
|
1039 if (QLatin1String(name) == QLatin1String("foo")) |
|
1040 return QLatin1String("Bar"); |
|
1041 else |
|
1042 return styleProperty(name); |
|
1043 } |
989 } |
1044 |
990 |
1045 QColor QS60StylePrivate::s60Color(QS60StyleEnums::ColorLists list, |
991 QColor QS60StylePrivate::s60Color(QS60StyleEnums::ColorLists list, |
1046 int index, const QStyleOption *option) |
992 int index, const QStyleOption *option) |
1047 { |
993 { |
1143 return result; |
1089 return result; |
1144 } |
1090 } |
1145 } |
1091 } |
1146 |
1092 |
1147 QPixmap QS60StylePrivate::part(QS60StyleEnums::SkinParts part, |
1093 QPixmap QS60StylePrivate::part(QS60StyleEnums::SkinParts part, |
1148 const QSize &size, SkinElementFlags flags) |
1094 const QSize &size, QPainter *painter, SkinElementFlags flags) |
1149 { |
1095 { |
1150 QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock); |
1096 QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock); |
1151 |
1097 |
1152 QPixmap result = (flags & SF_ColorSkinned)? |
1098 QPixmap result = (flags & SF_ColorSkinned)? |
1153 QS60StyleModeSpecifics::colorSkinnedGraphics(part, size, flags) |
1099 QS60StyleModeSpecifics::colorSkinnedGraphics(part, size, painter, flags) |
1154 : QS60StyleModeSpecifics::skinnedGraphics(part, size, flags); |
1100 : QS60StyleModeSpecifics::skinnedGraphics(part, size, flags); |
1155 |
1101 |
1156 lock.relock(); |
1102 lock.relock(); |
1157 |
1103 |
1158 if (flags & SF_StateDisabled && !QS60StyleModeSpecifics::disabledPartGraphic(part)) { |
1104 if (flags & SF_StateDisabled && !QS60StyleModeSpecifics::disabledPartGraphic(part)) { |
1187 |
1133 |
1188 QPixmap QS60StylePrivate::backgroundTexture() |
1134 QPixmap QS60StylePrivate::backgroundTexture() |
1189 { |
1135 { |
1190 if (!m_background) { |
1136 if (!m_background) { |
1191 QPixmap background = part(QS60StyleEnums::SP_QsnBgScreen, |
1137 QPixmap background = part(QS60StyleEnums::SP_QsnBgScreen, |
1192 QSize(S60->screenWidthInPixels, S60->screenHeightInPixels), SkinElementFlags()); |
1138 QSize(S60->screenWidthInPixels, S60->screenHeightInPixels), 0, SkinElementFlags()); |
1193 m_background = new QPixmap(background); |
1139 m_background = new QPixmap(background); |
1194 } |
1140 } |
1195 return *m_background; |
1141 return *m_background; |
1196 } |
|
1197 |
|
1198 // If the public SDK returns compressed images, please let us also uncompress those! |
|
1199 void QS60StyleModeSpecifics::unCompressBitmapL(const TRect& aTrgRect, CFbsBitmap* aTrgBitmap, CFbsBitmap* aSrcBitmap) |
|
1200 { |
|
1201 if (!aSrcBitmap) |
|
1202 User::Leave(KErrArgument); |
|
1203 if (!aTrgBitmap) |
|
1204 User::Leave(KErrArgument); |
|
1205 |
|
1206 // Note! aSrcBitmap->IsCompressedInRAM() is always ETrue, since this method is called only if that applies! |
|
1207 // Extra note! this function is also being used when bitmaps appear to be compressed (because DataSize is too small) |
|
1208 // even when they pretend they are not. Assert removed. |
|
1209 // ASSERT(aSrcBitmap->IsCompressedInRAM()); |
|
1210 |
|
1211 TDisplayMode displayMode = aSrcBitmap->DisplayMode(); |
|
1212 |
|
1213 if (displayMode != aTrgBitmap->DisplayMode()) |
|
1214 User::Leave(KErrArgument); |
|
1215 |
|
1216 const TSize trgSize = aTrgBitmap->SizeInPixels(); |
|
1217 const TSize srcSize = aSrcBitmap->SizeInPixels(); |
|
1218 |
|
1219 // calculate the valid drawing area |
|
1220 TRect drawRect = aTrgRect; |
|
1221 drawRect.Intersection(TRect(TPoint(0, 0), trgSize)); |
|
1222 |
|
1223 if (drawRect.IsEmpty()) |
|
1224 return; |
|
1225 |
|
1226 CFbsBitmap* realSource = new (ELeave) CFbsBitmap(); |
|
1227 CleanupStack::PushL(realSource); |
|
1228 User::LeaveIfError(realSource->Create(srcSize, displayMode)); |
|
1229 CFbsBitmapDevice* dev = CFbsBitmapDevice::NewL(realSource); |
|
1230 CleanupStack::PushL(dev); |
|
1231 CFbsBitGc* gc = NULL; |
|
1232 User::LeaveIfError(dev->CreateContext(gc)); |
|
1233 CleanupStack::PushL(gc); |
|
1234 gc->BitBlt(TPoint(0, 0), aSrcBitmap); |
|
1235 CleanupStack::PopAndDestroy(2); // dev, gc |
|
1236 |
|
1237 // Heap lock for FBServ large chunk is only needed with large bitmaps. |
|
1238 if (realSource->IsLargeBitmap() || aTrgBitmap->IsLargeBitmap()) { |
|
1239 aTrgBitmap->LockHeapLC(ETrue); // fbsheaplock |
|
1240 } else { |
|
1241 CleanupStack::PushL((TAny*) NULL); |
|
1242 } |
|
1243 |
|
1244 TUint32* srcAddress = realSource->DataAddress(); |
|
1245 TUint32* trgAddress = aTrgBitmap->DataAddress(); |
|
1246 |
|
1247 const TInt xSkip = (srcSize.iWidth << 8) / aTrgRect.Width(); |
|
1248 const TInt ySkip = (srcSize.iHeight << 8) / aTrgRect.Height(); |
|
1249 |
|
1250 const TInt drawWidth = drawRect.Width(); |
|
1251 const TInt drawHeight = drawRect.Height(); |
|
1252 |
|
1253 const TRect offsetRect(aTrgRect.iTl, drawRect.iTl); |
|
1254 const TInt yPosOffset = ySkip * offsetRect.Height(); |
|
1255 const TInt xPosOffset = xSkip * offsetRect.Width(); |
|
1256 |
|
1257 if ((displayMode == EGray256) || (displayMode == EColor256)) { |
|
1258 const TInt srcScanLen8 = CFbsBitmap::ScanLineLength(srcSize.iWidth, |
|
1259 displayMode); |
|
1260 const TInt trgScanLen8 = CFbsBitmap::ScanLineLength(trgSize.iWidth, |
|
1261 displayMode); |
|
1262 |
|
1263 TUint8* trgAddress8 = reinterpret_cast<TUint8*> (trgAddress); |
|
1264 |
|
1265 TInt yPos = yPosOffset; |
|
1266 // skip left and top margins in the beginning |
|
1267 trgAddress8 += trgScanLen8 * drawRect.iTl.iY + drawRect.iTl.iX; |
|
1268 |
|
1269 for (TInt y = 0; y < drawHeight; y++) { |
|
1270 const TUint8* srcAddress8 = reinterpret_cast<const TUint8*> (srcAddress) |
|
1271 + (srcScanLen8 * (yPos >> 8)); |
|
1272 |
|
1273 TInt xPos = xPosOffset; |
|
1274 for (TInt x = 0; x < drawWidth; x++) { |
|
1275 *(trgAddress8++) = srcAddress8[xPos >> 8]; |
|
1276 xPos += xSkip; |
|
1277 } |
|
1278 |
|
1279 yPos += ySkip; |
|
1280 |
|
1281 trgAddress8 += trgScanLen8 - drawWidth; |
|
1282 } |
|
1283 } else if (displayMode == EColor4K || displayMode == EColor64K) { |
|
1284 const TInt srcScanLen16 = CFbsBitmap::ScanLineLength(srcSize.iWidth, |
|
1285 displayMode) >>1; |
|
1286 const TInt trgScanLen16 = CFbsBitmap::ScanLineLength(trgSize.iWidth, |
|
1287 displayMode) >>1; |
|
1288 |
|
1289 TUint16* trgAddress16 = reinterpret_cast<TUint16*> (trgAddress); |
|
1290 |
|
1291 TInt yPos = yPosOffset; |
|
1292 // skip left and top margins in the beginning |
|
1293 trgAddress16 += trgScanLen16 * drawRect.iTl.iY + drawRect.iTl.iX; |
|
1294 |
|
1295 for (TInt y = 0; y < drawHeight; y++) { |
|
1296 const TUint16* srcAddress16 = reinterpret_cast<const TUint16*> (srcAddress) |
|
1297 + (srcScanLen16 * (yPos >> 8)); |
|
1298 |
|
1299 TInt xPos = xPosOffset; |
|
1300 for (TInt x = 0; x < drawWidth; x++) { |
|
1301 *(trgAddress16++) = srcAddress16[xPos >> 8]; |
|
1302 xPos += xSkip; |
|
1303 } |
|
1304 |
|
1305 yPos += ySkip; |
|
1306 |
|
1307 trgAddress16 += trgScanLen16 - drawWidth; |
|
1308 } |
|
1309 } else if (displayMode == EColor16MU || displayMode == EColor16MA) { |
|
1310 const TInt srcScanLen32 = CFbsBitmap::ScanLineLength(srcSize.iWidth, |
|
1311 displayMode) >>2; |
|
1312 const TInt trgScanLen32 = CFbsBitmap::ScanLineLength(trgSize.iWidth, |
|
1313 displayMode) >>2; |
|
1314 |
|
1315 TUint32* trgAddress32 = reinterpret_cast<TUint32*> (trgAddress); |
|
1316 |
|
1317 TInt yPos = yPosOffset; |
|
1318 // skip left and top margins in the beginning |
|
1319 trgAddress32 += trgScanLen32 * drawRect.iTl.iY + drawRect.iTl.iX; |
|
1320 |
|
1321 for (TInt y = 0; y < drawHeight; y++) { |
|
1322 const TUint32* srcAddress32 = reinterpret_cast<const TUint32*> (srcAddress) |
|
1323 + (srcScanLen32 * (yPos >> 8)); |
|
1324 |
|
1325 TInt xPos = xPosOffset; |
|
1326 for (TInt x = 0; x < drawWidth; x++) { |
|
1327 *(trgAddress32++) = srcAddress32[xPos >> 8]; |
|
1328 xPos += xSkip; |
|
1329 } |
|
1330 |
|
1331 yPos += ySkip; |
|
1332 |
|
1333 trgAddress32 += trgScanLen32 - drawWidth; |
|
1334 } |
|
1335 } else { User::Leave(KErrUnknown);} |
|
1336 |
|
1337 CleanupStack::PopAndDestroy(2); // fbsheaplock, realSource |
|
1338 } |
1142 } |
1339 |
1143 |
1340 QSize QS60StylePrivate::screenSize() |
1144 QSize QS60StylePrivate::screenSize() |
1341 { |
1145 { |
1342 const TSize screenSize = QS60Data::screenDevice()->SizeInPixels(); |
1146 const TSize screenSize = QS60Data::screenDevice()->SizeInPixels(); |
1343 return QSize(screenSize.iWidth, screenSize.iHeight); |
1147 return QSize(screenSize.iWidth, screenSize.iHeight); |
1344 } |
1148 } |
1345 |
1149 |
1346 void QS60StyleModeSpecifics::colorGroupAndIndex( |
|
1347 QS60StyleEnums::SkinParts skinID, TAknsItemID &colorGroup, int &colorIndex) |
|
1348 { |
|
1349 switch(skinID) { |
|
1350 case QS60StyleEnums::SP_QgnIndiSubMenu: |
|
1351 colorGroup = KAknsIIDQsnIconColors; |
|
1352 colorIndex = EAknsCIQsnIconColorsCG1; |
|
1353 break; |
|
1354 case QS60StyleEnums::SP_QgnIndiRadiobuttOff: |
|
1355 case QS60StyleEnums::SP_QgnIndiRadiobuttOn: |
|
1356 case QS60StyleEnums::SP_QgnIndiCheckboxOff: |
|
1357 case QS60StyleEnums::SP_QgnIndiCheckboxOn: |
|
1358 colorGroup = KAknsIIDQsnIconColors; |
|
1359 colorIndex = EAknsCIQsnIconColorsCG14; |
|
1360 break; |
|
1361 default: |
|
1362 break; |
|
1363 } |
|
1364 } |
|
1365 |
|
1366 QS60Style::QS60Style() |
1150 QS60Style::QS60Style() |
1367 : QCommonStyle(*new QS60StylePrivate) |
1151 : QCommonStyle(*new QS60StylePrivate) |
1368 { |
1152 { |
1369 } |
1153 } |
1370 |
1154 |
1371 #ifdef Q_WS_S60 |
1155 #ifdef Q_WS_S60 |
1372 void QS60StylePrivate::handleDynamicLayoutVariantSwitch() |
1156 void QS60StylePrivate::handleDynamicLayoutVariantSwitch() |
1373 { |
1157 { |
1374 clearCaches(QS60StylePrivate::CC_LayoutChange); |
1158 clearCaches(QS60StylePrivate::CC_LayoutChange); |
1159 setBackgroundTexture(qApp); |
|
1375 setActiveLayout(); |
1160 setActiveLayout(); |
1376 refreshUI(); |
1161 refreshUI(); |
1377 setBackgroundTexture(qApp); |
|
1378 foreach (QWidget *widget, QApplication::allWidgets()) |
1162 foreach (QWidget *widget, QApplication::allWidgets()) |
1379 widget->ensurePolished(); |
1163 widget->ensurePolished(); |
1380 } |
1164 } |
1381 |
1165 |
1382 void QS60StylePrivate::handleSkinChange() |
1166 void QS60StylePrivate::handleSkinChange() |
1397 } |
1181 } |
1398 |
1182 |
1399 QSize QS60StyleModeSpecifics::naviPaneSize() |
1183 QSize QS60StyleModeSpecifics::naviPaneSize() |
1400 { |
1184 { |
1401 CAknNavigationControlContainer* naviContainer; |
1185 CAknNavigationControlContainer* naviContainer; |
1402 if (S60->statusPane()) |
1186 if (S60->statusPane()) { |
1403 naviContainer = static_cast<CAknNavigationControlContainer*> |
1187 TRAPD(err, naviContainer = static_cast<CAknNavigationControlContainer*> |
1404 (S60->statusPane()->ControlL(TUid::Uid(EEikStatusPaneUidNavi))); |
1188 (S60->statusPane()->ControlL(TUid::Uid(EEikStatusPaneUidNavi)))); |
1405 if (naviContainer) |
1189 if (err==KErrNone) |
1406 return QSize(naviContainer->Size().iWidth, naviContainer->Size().iHeight); |
1190 return QSize(naviContainer->Size().iWidth, naviContainer->Size().iHeight); |
1407 else |
1191 } |
1408 return QSize(0,0); |
1192 return QSize(0,0); |
1409 } |
1193 } |
1410 |
1194 |
1411 #endif // Q_WS_S60 |
1195 #endif // Q_WS_S60 |
1412 |
1196 |
1413 QT_END_NAMESPACE |
1197 QT_END_NAMESPACE |