Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/s60framework/qs60mainappui.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    4242// INCLUDE FILES
    4343#include <exception>
     44
     45
    4446#include <avkon.hrh>
    4547#include <eikmenub.h>
    4648#include <eikmenup.h>
     49
     50
    4751#include <barsread.h>
    4852#include <qconfig.h>
    49 #if defined(QT_LIBINFIX_UNQUOTED)
    50 // Two level macro needed for proper expansion of libinfix
    51 #  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 #else
    55 #  include <s60main.rsg>
    56 #endif
    57 #include <avkon.rsg>
    5853
    5954#include "qs60mainappui.h"
     
    116111    // resource files in most SDKs. S60 3rd FP1 public seems to require resource file
    117112    // 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;
    121117    // After 5th Edition S60, native side supports animated wallpapers.
    122         // However, there is no support for that feature on Qt side, so indicate to
    123         // native UI framework that this application will not support background animations.
     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.
    124120    if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0)
    125121        flags |= KAknDisableAnimationBackground;
     122
    126123    BaseConstructL(flags);
    127124}
     
    169166void QS60MainAppUi::HandleResourceChangeL(TInt type)
    170167{
    171     CAknAppUi::HandleResourceChangeL(type);
     168    ::HandleResourceChangeL(type);
    172169
    173170    if (qApp) {
     
    186183 * handle the event.
    187184 */
    188 void QS60MainAppUi::HandleWsEventL(const TWsEvent& wsEvent, CCoeControl *destination)
     185void QS60MainAppUi::HandleWsEventL(const TWsEventwsEvent, CCoeControl *destination)
    189186{
    190187    int result = 0;
     
    197194
    198195    if (result <= 0)
    199         CAknAppUi::HandleWsEventL(wsEvent, destination);
     196        ::HandleWsEventL(wsEvent, destination);
    200197}
    201198
     
    237234void QS60MainAppUi::DynInitMenuPaneL(TInt resourceId, CEikMenuPane *menuPane)
    238235{
    239     if (resourceId == R_QT_WRAPPERAPP_MENU) {
     236#ifdef Q_WS_S60
     237    if (resourceId == R_AVKON_MENUPANE_EMPTY) {
    240238        if (menuPane->NumberOfItemsInPane() <= 1)
    241239            QT_TRYCATCH_LEAVING(qt_symbian_show_toplevel(menuPane));
     
    246244        QT_TRYCATCH_LEAVING(qt_symbian_show_submenu(menuPane, resourceId));
    247245    }
     246
     247
     248
    248249}
    249250
     
    256257 * If you override this function, you should call the base class implementation as well.
    257258 */
    258 void QS60MainAppUi::RestoreMenuL(CCoeControl* menuWindow, TInt resourceId, TMenuType menuType)
    259 {
     259void QS60MainAppUi::RestoreMenuL(CCoeControl *menuWindow, TInt resourceId, TMenuType menuType)
     260{
     261#ifdef Q_WS_S60
    260262    if (resourceId >= QT_SYMBIAN_FIRST_MENU_ITEM && resourceId <= QT_SYMBIAN_LAST_MENU_ITEM) {
    261263        if (menuType == EMenuPane)
     
    263265        else
    264266            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*/
     287void QS60MainAppUi::Exit()
     288{
     289    QS60MainAppUiBase::Exit();
     290}
     291
     292/*!
     293  \internal
     294*/
     295void QS60MainAppUi::SetFadedL(TBool aFaded)
     296{
     297    QS60MainAppUiBase::SetFadedL(aFaded);
     298}
     299
     300/*!
     301  \internal
     302*/
     303TRect QS60MainAppUi::ApplicationRect() const
     304{
     305    return QS60MainAppUiBase::ApplicationRect();
     306}
     307
     308/*!
     309  \internal
     310*/
     311void QS60MainAppUi::HandleScreenDeviceChangedL()
     312{
     313    QS60MainAppUiBase::HandleScreenDeviceChangedL();
     314}
     315
     316/*!
     317  \internal
     318*/
     319void QS60MainAppUi::HandleApplicationSpecificEventL(TInt aType, const TWsEvent &aEvent)
     320{
     321    QS60MainAppUiBase::HandleApplicationSpecificEventL(aType, aEvent);
     322}
     323
     324/*!
     325  \internal
     326*/
     327TTypeUid::Ptr QS60MainAppUi::MopSupplyObject(TTypeUid aId)
     328{
     329    return QS60MainAppUiBase::MopSupplyObject(aId);
     330}
     331
     332/*!
     333  \internal
     334*/
     335void QS60MainAppUi::ProcessCommandL(TInt aCommand)
     336{
     337    QS60MainAppUiBase::ProcessCommandL(aCommand);
     338}
     339
     340/*!
     341  \internal
     342*/
     343TErrorHandlerResponse 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*/
     351void QS60MainAppUi::HandleViewDeactivation(const TVwsViewId &aViewIdToBeDeactivated, const TVwsViewId &aNewlyActivatedViewId)
     352{
     353    QS60MainAppUiBase::HandleViewDeactivation(aViewIdToBeDeactivated, aNewlyActivatedViewId);
     354}
     355
     356/*!
     357  \internal
     358*/
     359void QS60MainAppUi::PrepareToExit()
     360{
     361    QS60MainAppUiBase::PrepareToExit();
     362}
     363
     364/*!
     365  \internal
     366*/
     367void QS60MainAppUi::HandleTouchPaneSizeChange()
     368{
     369    QS60MainAppUiBase::HandleTouchPaneSizeChange();
     370}
     371
     372/*!
     373  \internal
     374*/
     375void QS60MainAppUi::HandleSystemEventL(const TWsEvent &aEvent)
     376{
     377    QS60MainAppUiBase::HandleSystemEventL(aEvent);
     378}
     379
     380/*!
     381  \internal
     382*/
     383void QS60MainAppUi::Reserved_MtsmPosition()
     384{
     385    QS60MainAppUiBase::Reserved_MtsmPosition();
     386}
     387
     388/*!
     389  \internal
     390*/
     391void QS60MainAppUi::Reserved_MtsmObject()
     392{
     393    QS60MainAppUiBase::Reserved_MtsmObject();
     394}
     395
     396/*!
     397  \internal
     398*/
     399void QS60MainAppUi::HandleForegroundEventL(TBool aForeground)
     400{
     401    QS60MainAppUiBase::HandleForegroundEventL(aForeground);
     402}
     403
     404#ifndef Q_WS_S60
     405
     406void QS60StubAknAppUi::HandleViewDeactivation(const TVwsViewId &, const TVwsViewId &) {}
     407void QS60StubAknAppUi::HandleTouchPaneSizeChange() {}
     408void QS60StubAknAppUi::HandleStatusPaneSizeChange() {}
     409void QS60StubAknAppUi::Reserved_MtsmPosition() {}
     410void QS60StubAknAppUi::Reserved_MtsmObject() {}
     411
     412#endif
    269413
    270414QT_END_NAMESPACE
Note: See TracChangeset for help on using the changeset viewer.