diff -r 000000000000 -r 3ce708148e4d customization/UISettingsSrv/server/Src/UISettingsSrvUi.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/customization/UISettingsSrv/server/Src/UISettingsSrvUi.cpp Thu Dec 17 08:40:12 2009 +0200 @@ -0,0 +1,222 @@ +/* +* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* General Settings User Interface +* +*/ + + +// INCLUDE FILES +//sf-#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include //for determining skin change +#include +#include +#include + + + #include + #include + + +#include // for reboot +#include + +#include +#include +#include // The USER class +#include // EPinyin + +#include + +#include "UISettingsSrvUi.h" +#include "UISettingsSrvAppView.h" +#include "UISettingsSrvDocument.h" + +#include +#include "UISettingsSrv.hrh" + +#include "UISettingsSrv.h" + +//CONSTANTS +// _LIT( KGSAppUiClassName, "CUISettingsSrvUi" ); + + + +// ================= MEMBER FUNCTIONS ======================= + + +// ---------------------------------------------------- +// CUISettingsSrvUi::CUISettingsSrvUi() +// +// Default constructor. +// ---------------------------------------------------- +CUISettingsSrvUi::CUISettingsSrvUi() +//sf- : + { + } + +// ---------------------------------------------------- +// CUISettingsSrvUi::ConstructL() +// +// Symbian OS two-phased constructor +// ---------------------------------------------------- +void CUISettingsSrvUi::ConstructL() + { + FeatureManager::InitializeLibL(); + + BaseConstructL( 0 ); //sf- EAknEnableSkin ); + +/* +*/ + iAppView = CUISettingsSrvAppView::NewL(ClientRect()); + AddToStackL(iAppView); +/* +*/ + + // Hide application from task list + RWsSession& ws = iEikonEnv->WsSession(); + RWindowGroup& rootWin = iEikonEnv->RootWin(); + TInt wgId = rootWin.Identifier(); + + CApaWindowGroupName *windowGroupName = + CApaWindowGroupName::NewL(ws, wgId); + + windowGroupName->SetHidden( ETrue ); + windowGroupName->SetWindowGroupName( rootWin ); + + delete windowGroupName; + } + +// ---------------------------------------------------- +// CUISettingsSrvUi::~CUISettingsSrvUi() +// destructor +// frees reserved resources +// ---------------------------------------------------- +CUISettingsSrvUi::~CUISettingsSrvUi() + { +//sf- delete iDecoratedTabGroup; +//sf- delete iDatimTitleText; +//sf- delete iWaitDialog; + + FeatureManager::UnInitializeLib(); + + if (iAppView) + { + iEikonEnv->RemoveFromStack(iAppView); + delete iAppView; + iAppView = NULL; + } + + // +//sf- delete iShortcutUi; + + //Embedding - removing created document +/*sf-- + if ( iEmbedded ) + { + iEikonEnv->Process()->DestroyDocument( iEmbedded ); + iEmbedded = NULL; + } +--fs*/ + } + +// ------------------------------------------------------------------------------ +// CUISettingsSrvUi::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane) +// This function is called by the EIKON framework just before it displays +// a menu pane. Its default implementation is empty, and by overriding it, +// the application can set the state of menu items dynamically according +// to the state of application data. +// ------------------------------------------------------------------------------ +// +void CUISettingsSrvUi::DynInitMenuPaneL( + TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/) + { + } + +// ---------------------------------------------------- +// CUISettingsSrvUi::HandleCommandL(TInt aCommand) +// +// Handles commands directed to this class. +// ---------------------------------------------------- +void CUISettingsSrvUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + case EEikCmdExit: //both exit commands should do the same thing + iEikonEnv->InfoMsg(_L("ex1")); + case EAknCmdExit: + iEikonEnv->InfoMsg(_L("exit2")); + Exit(); + break; + /* + case EUISSCmdTest: + iEikonEnv->InfoMsg(_L("...test...")); + break; + case EUISSCmdTest2: + _LIT(message,"Halloo"); + CAknInformationNote* informationNote = new (ELeave) CAknInformationNote; + informationNote->ExecuteLD(message); + break; + */ + case EUISSCmdStartSrv: + CUISettingsSrvServer::NewL(); + break; + default: + CAknAppUi::HandleCommandL(aCommand); +//sf- CAknViewAppUi::HandleCommandL(aCommand); + break; + } + } + + + +// ---------------------------------------------------- +// CUISettingsSrvUi::HandleKeyEventL() +// +// Called when a key is pressed and no other class has catched the event. +// Handles only key events that are meant to control the tab group. +// ---------------------------------------------------- +TKeyResponse CUISettingsSrvUi::HandleKeyEventL(const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/) + { + return EKeyWasNotConsumed; +/*sf-- + // Check if the event should be handled + if (aType != EEventKey || iNaviContainer->Top() != iDecoratedTabGroup) + { + return EKeyWasNotConsumed; + } + return iTabGroup->OfferKeyEventL( aKeyEvent, aType ); +--fs*/ + } + + + +//End of File