Changeset 846 for trunk/src/gui/kernel/qt_s60_p.h
- Timestamp:
- May 5, 2011, 5:36:53 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/gui/kernel/qt_s60_p.h (modified) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/kernel/qt_s60_p.h
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 63 63 #include "qpointer.h" 64 64 #include "qapplication.h" 65 66 65 67 #include <w32std.h> 66 68 #include <coecntrl.h> … … 86 88 #define Q_SYMBIAN_ECOLOR16MAP TDisplayMode(13) 87 89 90 91 92 93 94 95 96 97 98 99 88 100 class QS60Data 89 101 { 90 102 public: 91 103 QS60Data(); 104 92 105 TUid uid; 93 106 int screenDepth; … … 103 116 int defaultDpiY; 104 117 WId curWin; 105 int virtualMouseLastKey;106 118 enum PressedKeys { 107 119 Select = 0x1, … … 109 121 Down = 0x4, 110 122 Left = 0x8, 111 Up = 0x10 123 Up = 0x10, 124 LeftUp = 0x20, 125 RightUp = 0x40, 126 RightDown = 0x80, 127 LeftDown = 0x100 112 128 }; 113 129 int virtualMousePressedKeys; // of the above type, but avoids casting problems 114 int virtualMouseAccel; 130 int virtualMouseAccelDX; 131 int virtualMouseAccelDY; 132 QElapsedTimer virtualMouseAccelTimeout; 115 133 int virtualMouseMaxAccel; 116 134 #ifndef Q_SYMBIAN_FIXED_POINTER_CURSORS … … 124 142 int avkonComponentsSupportTransparency : 1; 125 143 int menuBeingConstructed : 1; 144 126 145 QApplication::QS60MainApplicationFactory s60ApplicationFactory; // typedef'ed pointer type 146 147 148 149 150 151 152 153 154 127 155 static inline void updateScreenSize(); 128 staticinline RWsSession& wsSession();156 inline RWsSession& wsSession(); 129 157 static inline RWindowGroup& windowGroup(); 130 staticinline CWsScreenDevice* screenDevice();158 inline CWsScreenDevice* screenDevice(); 131 159 static inline CCoeAppUi* appUi(); 132 160 static inline CEikMenuBar* menuBar(); … … 137 165 static inline CAknContextPane* contextPane(); 138 166 static inline CEikButtonGroupContainer* buttonGroupContainer(); 139 167 static inline void setButtonGroupContainer(CEikButtonGroupContainer* newCba); 168 static void setStatusPaneAndButtonGroupVisibility(bool statusPaneVisible, bool buttonGroupVisible); 169 #endif 170 static void controlVisibilityChanged(CCoeControl *control, bool visible); 171 172 #ifdef Q_OS_SYMBIAN 140 173 TTrapHandler *s60InstalledTrapHandler; 141 174 #endif 142 175 }; 143 176 144 Q S60Data* qGlobalS60Data();177 QS60Data* qGlobalS60Data(); 145 178 #define S60 qGlobalS60Data() 146 179 … … 182 215 void setFocusSafely(bool focus); 183 216 217 218 184 219 #ifdef Q_WS_S60 185 220 void FadeBehindPopup(bool fade){ popupFader.FadeBehindPopup( this, this, fade); } … … 190 225 CCoeControl* FadedComponent(TInt /*aIndex*/) {return this;} 191 226 #else 192 #warning No fallback implementation for QSymbianControl::FadeBehindPopup227 #warning No fallback implementation for QSymbianControl::FadeBehindPopup 193 228 void FadeBehindPopup(bool /*fade*/){ } 194 229 #endif … … 203 238 void HandlePointerEvent(const TPointerEvent& aPointerEvent); 204 239 TKeyResponse OfferKeyEvent(const TKeyEvent& aKeyEvent,TEventCode aType); 240 205 241 TKeyResponse sendKeyEvent(QWidget *widget, QKeyEvent *keyEvent); 242 206 243 bool sendMouseEvent(QWidget *widget, QMouseEvent *mEvent); 207 244 void sendMouseEvent( … … 211 248 Qt::MouseButton button, 212 249 Qt::KeyboardModifiers modifiers); 250 213 251 void HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& aPenEventScreenLocation ); 214 252 #ifdef QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER 215 253 void translateAdvancedPointerEvent(const TAdvancedPointerEvent *event); 216 254 #endif 255 256 217 257 void handleClientAreaChange(); 218 258 … … 223 263 QWidget *qwidget; 224 264 QLongTapTimer* m_longTapDetector; 265 225 266 bool m_ignoreFocusChanged : 1; 226 267 bool m_symbianPopupIsOpen : 1; … … 233 274 234 275 inline QS60Data::QS60Data() 235 { 236 memclr(this, sizeof(QS60Data)); //zero init data 276 : uid(TUid::Null()), 277 screenDepth(0), 278 screenWidthInPixels(0), 279 screenHeightInPixels(0), 280 screenWidthInTwips(0), 281 screenHeightInTwips(0), 282 defaultDpiX(0), 283 defaultDpiY(0), 284 curWin(0), 285 virtualMousePressedKeys(0), 286 virtualMouseAccelDX(0), 287 virtualMouseAccelDY(0), 288 virtualMouseMaxAccel(0), 289 #ifndef Q_SYMBIAN_FIXED_POINTER_CURSORS 290 brokenPointerCursors(0), 291 #endif 292 hasTouchscreen(0), 293 mouseInteractionEnabled(0), 294 virtualMouseRequired(0), 295 qtOwnsS60Environment(0), 296 supportsPremultipliedAlpha(0), 297 avkonComponentsSupportTransparency(0), 298 menuBeingConstructed(0), 299 orientationSet(0), 300 s60ApplicationFactory(0) 301 #ifdef Q_OS_SYMBIAN 302 ,s60InstalledTrapHandler(0) 303 #endif 304 { 237 305 } 238 306 … … 247 315 S60->screenHeightInTwips = params.iTwipsSize.iHeight; 248 316 249 S60->virtualMouseMaxAccel = qMax(S60->screenHeightInPixels, S60->screenWidthInPixels) / 20;317 S60->virtualMouseMaxAccel = qMax(S60->screenHeightInPixels, S60->screenWidthInPixels) / 0; 250 318 251 319 TReal inches = S60->screenHeightInTwips / (TReal)KTwipsPerInch; … … 257 325 inline RWsSession& QS60Data::wsSession() 258 326 { 259 return CCoeEnv::Static()->WsSession(); 327 if(!tls.hasLocalData()) { 328 tls.setLocalData(new QS60ThreadLocalData); 329 } 330 return tls.localData()->wsSession; 260 331 } 261 332 … … 267 338 inline CWsScreenDevice* QS60Data::screenDevice() 268 339 { 269 return CCoeEnv::Static()->ScreenDevice(); 340 if(!tls.hasLocalData()) { 341 tls.setLocalData(new QS60ThreadLocalData); 342 } 343 return tls.localData()->screenDevice; 270 344 } 271 345 … … 314 388 inline CEikButtonGroupContainer* QS60Data::buttonGroupContainer() 315 389 { 316 return CEikonEnv::Static()->AppUiFactory()->Cba(); 390 return QS60Data::cba; 391 } 392 393 inline void QS60Data::setButtonGroupContainer(CEikButtonGroupContainer *newCba) 394 { 395 QS60Data::cba = newCba; 317 396 } 318 397 #endif // Q_WS_S60
Note:
See TracChangeset
for help on using the changeset viewer.
