|
1 /* |
|
2 * Copyright (c) 2006-2009 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: Positioning Settings implementation of Location UIs. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // System Include |
|
20 #include <eikenv.h> |
|
21 #include <aknViewAppUi.h> |
|
22 |
|
23 // User Include |
|
24 #include "locpossettings.h" |
|
25 #include "locsysuiview.h" |
|
26 |
|
27 // --------------------------------------------------------------------------- |
|
28 // CLocPosSettings::CLocPosSettings |
|
29 // Overloaded Constructor |
|
30 // |
|
31 // --------------------------------------------------------------------------- |
|
32 // |
|
33 CLocPosSettings::CLocPosSettings() |
|
34 { |
|
35 } |
|
36 |
|
37 // --------------------------------------------------------------------------- |
|
38 // CLocPosSettings::~CLocPosSettings |
|
39 // Destructor |
|
40 // |
|
41 // --------------------------------------------------------------------------- |
|
42 // |
|
43 CLocPosSettings::~CLocPosSettings() |
|
44 { |
|
45 } |
|
46 |
|
47 // --------------------------------------------------------------------------- |
|
48 // CLocPosSettings* CLocPosSettings::NewL |
|
49 // Two phase constructor |
|
50 // |
|
51 // --------------------------------------------------------------------------- |
|
52 // |
|
53 EXPORT_C CLocPosSettings* CLocPosSettings::NewL() |
|
54 { |
|
55 CLocPosSettings* self = CLocPosSettings::NewLC(); |
|
56 CleanupStack::Pop( self ); |
|
57 return self; |
|
58 } |
|
59 |
|
60 // --------------------------------------------------------------------------- |
|
61 // CLocPosSettings* CLocPosSettings::NewL |
|
62 // Two phase constructor |
|
63 // |
|
64 // --------------------------------------------------------------------------- |
|
65 // |
|
66 EXPORT_C CLocPosSettings* CLocPosSettings::NewLC() |
|
67 { |
|
68 CLocPosSettings* self = new(ELeave) CLocPosSettings(); |
|
69 CleanupStack::PushL( self ); |
|
70 self->ConstructL(); |
|
71 return self; |
|
72 } |
|
73 |
|
74 // --------------------------------------------------------------------------- |
|
75 // void CLocPosSettings::ConstructL |
|
76 // |
|
77 // --------------------------------------------------------------------------- |
|
78 // |
|
79 void CLocPosSettings::ConstructL() |
|
80 { |
|
81 // Create the Positioning Specfic view and set its observer |
|
82 iView = CLocSysUiView::NewL(); |
|
83 |
|
84 CEikonEnv* env = CEikonEnv::Static(); |
|
85 |
|
86 // Transferring the view's control to AppUi |
|
87 (static_cast<CAknViewAppUi*>( env->EikAppUi()))->AddViewL( iView ); |
|
88 } |
|
89 |
|
90 // --------------------------------------------------------------------------- |
|
91 // void CLocPosSettings::LaunchLocationUIL |
|
92 // |
|
93 // --------------------------------------------------------------------------- |
|
94 // |
|
95 void CLocPosSettings::LaunchLocationUIL( TInt /* aUiInputParams */, |
|
96 MLocationUIObserver* aObserver ) |
|
97 { |
|
98 // Set the call back observer for this Launch call |
|
99 iView->SetObserver( aObserver ); |
|
100 |
|
101 // Activate the Positoning Settings View |
|
102 iView->ActivateViewL(); |
|
103 } |
|
104 |
|
105 // --------------------------------------------------------------------------- |
|
106 // void CLocPosSettings::LaunchLocationUIL |
|
107 // |
|
108 // --------------------------------------------------------------------------- |
|
109 // |
|
110 void CLocPosSettings::LaunchLocationUIL( const TDesC& /* aUiInputParams */, |
|
111 MLocationUIObserver* aObserver ) |
|
112 { |
|
113 // Set the call back observer for this Launch call |
|
114 iView->SetObserver( aObserver ); |
|
115 |
|
116 // Activate the Positoning Settings View |
|
117 iView->ActivateViewL(); |
|
118 } |
|
119 |
|
120 // --------------------------------------------------------------------------- |
|
121 // void CLocPosSettings::Close |
|
122 // |
|
123 // --------------------------------------------------------------------------- |
|
124 // |
|
125 void CLocPosSettings::Close() |
|
126 { |
|
127 // Deactivate the Postioning Settings view. |
|
128 iView->DeActivateView(); |
|
129 } |