|
1 /* |
|
2 * Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Application to launch Positioning Settings for Location Centre |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // System Includes |
|
20 #include <avkon.hrh> |
|
21 #include <eikserverapp.h> |
|
22 |
|
23 // User Includes |
|
24 #include "locpossettingsappui.h" |
|
25 |
|
26 // ======== Member functions for class CLosPosSettingsAppUi ================== |
|
27 |
|
28 |
|
29 // --------------------------------------------------------------------------- |
|
30 // void CLosPosSettingsAppUi::ConstructL |
|
31 // --------------------------------------------------------------------------- |
|
32 // |
|
33 void CLosPosSettingsAppUi::ConstructL() |
|
34 { |
|
35 BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible); |
|
36 |
|
37 // Create the Postioning Settings View |
|
38 CLocSysUiView* view = CLocSysUiView::NewL(); |
|
39 view->LaunchedfromPosSettingsApp(); |
|
40 CleanupStack::PushL( view ); |
|
41 AddViewL( view ); // transfer ownership to CAknViewAppUi |
|
42 CleanupStack::Pop( view ); |
|
43 SetDefaultViewL( *view ); |
|
44 } |
|
45 |
|
46 |
|
47 // --------------------------------------------------------------------------- |
|
48 // CLosPosSettingsAppUi::~CLosPosSettingsAppUi |
|
49 // --------------------------------------------------------------------------- |
|
50 // |
|
51 CLosPosSettingsAppUi::~CLosPosSettingsAppUi() |
|
52 { |
|
53 } |
|
54 |
|
55 // --------------------------------------------------------------------------- |
|
56 // void CLosPosSettingsAppUi::HandleCommandL |
|
57 // --------------------------------------------------------------------------- |
|
58 // |
|
59 void CLosPosSettingsAppUi::HandleCommandL( TInt aCommand ) |
|
60 { |
|
61 switch ( aCommand ) |
|
62 { |
|
63 case EAknSoftkeyExit: |
|
64 { |
|
65 // The User has pressed the Back key from the Application or the |
|
66 // Exit key using the Right soft key. In this case the parent |
|
67 // application need not exit. Hence, the application can exit |
|
68 // with EEikCmdExit itself |
|
69 Exit(); |
|
70 break; |
|
71 } |
|
72 case EEikCmdExit: |
|
73 { |
|
74 // The User has exited the application using the Exit option from |
|
75 //.Options menu. But, thats possible only if we exit the application |
|
76 // with EAknCmdExit. |
|
77 // A bit of convoluted logic but needed because we are using the |
|
78 // same components for the Settings UI Server as well as LC. |
|
79 |
|
80 CEikAppServer* server = iEikonEnv->AppServer(); |
|
81 if ( server ) |
|
82 { |
|
83 server->NotifyServerExit(EAknCmdExit); |
|
84 } |
|
85 Exit(); |
|
86 break; |
|
87 } |
|
88 default: |
|
89 break; |
|
90 } |
|
91 } |