Changeset 846 for trunk/src/gui/s60framework/qs60mainappui.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
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/s60framework/qs60mainappui.cpp
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]) … … 42 42 // INCLUDE FILES 43 43 #include <exception> 44 45 44 46 #include <avkon.hrh> 45 47 #include <eikmenub.h> 46 48 #include <eikmenup.h> 49 50 47 51 #include <barsread.h> 48 52 #include <qconfig.h> 49 #if defined(QT_LIBINFIX_UNQUOTED)50 // Two level macro needed for proper expansion of libinfix51 # define QT_S60MAIN_RSG_2(x) <s60main##x##.rsg>52 # define QT_S60MAIN_RSG(x) QT_S60MAIN_RSG_2(x)53 # include QT_S60MAIN_RSG(QT_LIBINFIX_UNQUOTED)54 #else55 # include <s60main.rsg>56 #endif57 #include <avkon.rsg>58 53 59 54 #include "qs60mainappui.h" … … 116 111 // resource files in most SDKs. S60 3rd FP1 public seems to require resource file 117 112 // even these flags are defined 118 TInt flags = CAknAppUi::EAknEnableSkin 119 | CAknAppUi::ENoScreenFurniture 120 | CAknAppUi::ENonStandardResourceFile; 113 TInt flags = CEikAppUi::ENoScreenFurniture 114 | CEikAppUi::ENonStandardResourceFile; 115 #ifdef Q_WS_S60 116 flags |= CAknAppUi::EAknEnableSkin; 121 117 // After 5th Edition S60, native side supports animated wallpapers. 122 123 118 // However, there is no support for that feature on Qt side, so indicate to 119 // native UI framework that this application will not support background animations. 124 120 if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0) 125 121 flags |= KAknDisableAnimationBackground; 122 126 123 BaseConstructL(flags); 127 124 } … … 169 166 void QS60MainAppUi::HandleResourceChangeL(TInt type) 170 167 { 171 CAknAppUi::HandleResourceChangeL(type);168 ::HandleResourceChangeL(type); 172 169 173 170 if (qApp) { … … 186 183 * handle the event. 187 184 */ 188 void QS60MainAppUi::HandleWsEventL(const TWsEvent &wsEvent, CCoeControl *destination)185 void QS60MainAppUi::HandleWsEventL(const TWsEventwsEvent, CCoeControl *destination) 189 186 { 190 187 int result = 0; … … 197 194 198 195 if (result <= 0) 199 CAknAppUi::HandleWsEventL(wsEvent, destination);196 ::HandleWsEventL(wsEvent, destination); 200 197 } 201 198 … … 237 234 void QS60MainAppUi::DynInitMenuPaneL(TInt resourceId, CEikMenuPane *menuPane) 238 235 { 239 if (resourceId == R_QT_WRAPPERAPP_MENU) { 236 #ifdef Q_WS_S60 237 if (resourceId == R_AVKON_MENUPANE_EMPTY) { 240 238 if (menuPane->NumberOfItemsInPane() <= 1) 241 239 QT_TRYCATCH_LEAVING(qt_symbian_show_toplevel(menuPane)); … … 246 244 QT_TRYCATCH_LEAVING(qt_symbian_show_submenu(menuPane, resourceId)); 247 245 } 246 247 248 248 249 } 249 250 … … 256 257 * If you override this function, you should call the base class implementation as well. 257 258 */ 258 void QS60MainAppUi::RestoreMenuL(CCoeControl* menuWindow, TInt resourceId, TMenuType menuType) 259 { 259 void QS60MainAppUi::RestoreMenuL(CCoeControl *menuWindow, TInt resourceId, TMenuType menuType) 260 { 261 #ifdef Q_WS_S60 260 262 if (resourceId >= QT_SYMBIAN_FIRST_MENU_ITEM && resourceId <= QT_SYMBIAN_LAST_MENU_ITEM) { 261 263 if (menuType == EMenuPane) … … 263 265 else 264 266 DynInitMenuBarL(resourceId, (CEikMenuBar*)menuWindow); 265 } else { 266 CAknAppUi::RestoreMenuL(menuWindow, resourceId, menuType); 267 } 268 } 267 } else if(resourceId == R_AVKON_MENUPANE_EMPTY) { 268 CEikMenuBarTitle *title = new(ELeave) CEikMenuBarTitle; 269 CleanupStack::PushL(title); 270 271 title->iData.iMenuPaneResourceId = R_AVKON_MENUPANE_EMPTY; 272 title->iTitleFlags = 0; 273 274 S60->menuBar()->TitleArray()->AddTitleL(title); 275 CleanupStack::Pop( title ); 276 } 277 else 278 #endif 279 { 280 QS60MainAppUiBase::RestoreMenuL(menuWindow, resourceId, menuType); 281 } 282 } 283 284 /*! 285 \internal 286 */ 287 void QS60MainAppUi::Exit() 288 { 289 QS60MainAppUiBase::Exit(); 290 } 291 292 /*! 293 \internal 294 */ 295 void QS60MainAppUi::SetFadedL(TBool aFaded) 296 { 297 QS60MainAppUiBase::SetFadedL(aFaded); 298 } 299 300 /*! 301 \internal 302 */ 303 TRect QS60MainAppUi::ApplicationRect() const 304 { 305 return QS60MainAppUiBase::ApplicationRect(); 306 } 307 308 /*! 309 \internal 310 */ 311 void QS60MainAppUi::HandleScreenDeviceChangedL() 312 { 313 QS60MainAppUiBase::HandleScreenDeviceChangedL(); 314 } 315 316 /*! 317 \internal 318 */ 319 void QS60MainAppUi::HandleApplicationSpecificEventL(TInt aType, const TWsEvent &aEvent) 320 { 321 QS60MainAppUiBase::HandleApplicationSpecificEventL(aType, aEvent); 322 } 323 324 /*! 325 \internal 326 */ 327 TTypeUid::Ptr QS60MainAppUi::MopSupplyObject(TTypeUid aId) 328 { 329 return QS60MainAppUiBase::MopSupplyObject(aId); 330 } 331 332 /*! 333 \internal 334 */ 335 void QS60MainAppUi::ProcessCommandL(TInt aCommand) 336 { 337 QS60MainAppUiBase::ProcessCommandL(aCommand); 338 } 339 340 /*! 341 \internal 342 */ 343 TErrorHandlerResponse QS60MainAppUi::HandleError (TInt aError, const SExtendedError &aExtErr, TDes &aErrorText, TDes &aContextText) 344 { 345 return QS60MainAppUiBase::HandleError(aError, aExtErr, aErrorText, aContextText); 346 } 347 348 /*! 349 \internal 350 */ 351 void QS60MainAppUi::HandleViewDeactivation(const TVwsViewId &aViewIdToBeDeactivated, const TVwsViewId &aNewlyActivatedViewId) 352 { 353 QS60MainAppUiBase::HandleViewDeactivation(aViewIdToBeDeactivated, aNewlyActivatedViewId); 354 } 355 356 /*! 357 \internal 358 */ 359 void QS60MainAppUi::PrepareToExit() 360 { 361 QS60MainAppUiBase::PrepareToExit(); 362 } 363 364 /*! 365 \internal 366 */ 367 void QS60MainAppUi::HandleTouchPaneSizeChange() 368 { 369 QS60MainAppUiBase::HandleTouchPaneSizeChange(); 370 } 371 372 /*! 373 \internal 374 */ 375 void QS60MainAppUi::HandleSystemEventL(const TWsEvent &aEvent) 376 { 377 QS60MainAppUiBase::HandleSystemEventL(aEvent); 378 } 379 380 /*! 381 \internal 382 */ 383 void QS60MainAppUi::Reserved_MtsmPosition() 384 { 385 QS60MainAppUiBase::Reserved_MtsmPosition(); 386 } 387 388 /*! 389 \internal 390 */ 391 void QS60MainAppUi::Reserved_MtsmObject() 392 { 393 QS60MainAppUiBase::Reserved_MtsmObject(); 394 } 395 396 /*! 397 \internal 398 */ 399 void QS60MainAppUi::HandleForegroundEventL(TBool aForeground) 400 { 401 QS60MainAppUiBase::HandleForegroundEventL(aForeground); 402 } 403 404 #ifndef Q_WS_S60 405 406 void QS60StubAknAppUi::HandleViewDeactivation(const TVwsViewId &, const TVwsViewId &) {} 407 void QS60StubAknAppUi::HandleTouchPaneSizeChange() {} 408 void QS60StubAknAppUi::HandleStatusPaneSizeChange() {} 409 void QS60StubAknAppUi::Reserved_MtsmPosition() {} 410 void QS60StubAknAppUi::Reserved_MtsmObject() {} 411 412 #endif 269 413 270 414 QT_END_NAMESPACE
Note:
See TracChangeset
for help on using the changeset viewer.