diff -r 8173571d354e -r 1fc85118c3ae locationsatviewrefapp/src/SatelliteReferenceAppUi.cpp --- a/locationsatviewrefapp/src/SatelliteReferenceAppUi.cpp Thu Aug 19 09:48:36 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,145 +0,0 @@ -/* -* Copyright (c) 2009 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: -* -*/ - -/* -* ============================================================================ -* Name : SatelliteReferenceAppUi -* Part of : Satellite Reference App -* ============================================================================ -*/ - -// INCLUDE FILES -#include "SatelliteReferenceAppUi.h" -#include "SatelliteReferenceContainer.h" -#include -#include "SatelliteReference.hrh" -#include - -#include - -// ================= MEMBER FUNCTIONS ======================= -// -// ---------------------------------------------------------- -// CSatelliteReferenceAppUi::ConstructL() -// ---------------------------------------------------------- -// -void CSatelliteReferenceAppUi::ConstructL() - { - //we hae to enable MSK for 3.2 - BaseConstructL( EAknEnableMSK ); - iAppContainer = new (ELeave) CSatelliteReferenceContainer; - iAppContainer->SetMopParent(this); - iAppContainer->ConstructL( ClientRect(), this); - AddToStackL( iAppContainer ); - } - -// ---------------------------------------------------- -// CSatelliteReferenceAppUi::~CSatelliteReferenceAppUi() -// Destructor -// Frees reserved resources -// ---------------------------------------------------- -// -CSatelliteReferenceAppUi::~CSatelliteReferenceAppUi() - { - if (iAppContainer) - { - RemoveFromStack( iAppContainer ); - delete iAppContainer; - } - } - -// ------------------------------------------------------------------------------ -// CSatelliteReferenceAppUi::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 CSatelliteReferenceAppUi::DynInitMenuPaneL( - TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/) - { - } - -// ---------------------------------------------------- -// CSatelliteReferenceAppUi::HandleKeyEventL( -// const TKeyEvent& aKeyEvent,TEventCode /*aType*/) -// ---------------------------------------------------- -// -TKeyResponse CSatelliteReferenceAppUi::HandleKeyEventL( - const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/) - { - return EKeyWasNotConsumed; - } - -// ------------------------------------------------------------------ -// CSatelliteReferenceAppUi::HandleForegroundEventL(TBool aForeground) -// ------------------------------------------------------------------ -// -void CSatelliteReferenceAppUi::HandleForegroundEventL(TBool aForeground) - { - if(iSatelliteInfo) - { - iSatelliteInfo->HandleForegroundEventL(aForeground); - } - } - -// ---------------------------------------------------- -// CSatelliteReferenceAppUi::HandleCommandL(TInt aCommand) -// ---------------------------------------------------- -// -void CSatelliteReferenceAppUi::HandleCommandL(TInt aCommand) - { - switch ( aCommand ) - { - case EAknSoftkeyBack: - case EAknSoftkeyExit: - case EEikCmdExit: - { - Exit(); - break; - } - - case ESatelliteInfoCmd: - { - HBufC* srvName = StringLoader::LoadLC( - R_SATREF_SERVICE_RULE_NAME, - CEikonEnv::Static() ); - // Creating instance of CSatelliteInfo - iSatelliteInfo = CSatelliteInfoUI::NewL(); - - //Setting the default satellite view as Firmament view - iSatelliteInfo->SetLaunchView(CSatelliteInfoUI::ESatelliteFirmamentView); - - // ExecuteLD displays the satellite dialog. - // The dialog display satellite ID's along with - // their signal strengths depicted using bar's. - iSatelliteInfo->ExecuteLD(*srvName); - - CleanupStack::PopAndDestroy(srvName); //srvName - iSatelliteInfo = NULL; - break; - } - - default: - { - break; - } - } - } - -// End of File