1 /* |
|
2 * Copyright (c) 2002 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: view class |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // EXTERNAL INCLUDES |
|
21 #include <wlansniffer.rsg> |
|
22 #include <aknViewAppUi.h> |
|
23 |
|
24 // INTERNAL INCLUDES |
|
25 #include "wsfdetailsview.h" |
|
26 #include "wsfdetailscontainer.h" |
|
27 #include "wsfdetailsviewmodel.h" |
|
28 #include "wsfmainapplication.hrh" |
|
29 #include "wsfappui.h" |
|
30 #include "wsfdetailscontainerif.h" |
|
31 |
|
32 #include "wsflogger.h" |
|
33 |
|
34 |
|
35 |
|
36 // ================= MEMBER FUNCTIONS ======================= |
|
37 |
|
38 |
|
39 // --------------------------------------------------------- |
|
40 // CWsfDetailsView* CWsfDetailsView::NewL() |
|
41 // --------------------------------------------------------- |
|
42 // |
|
43 CWsfDetailsView* CWsfDetailsView::NewL() |
|
44 { |
|
45 LOG_ENTERFN( "CWsfDetailsView::NewL" ); |
|
46 CWsfDetailsView* self = CWsfDetailsView::NewLC(); |
|
47 CleanupStack::Pop(self); |
|
48 return self; |
|
49 } |
|
50 |
|
51 // --------------------------------------------------------- |
|
52 // CWsfDetailsView* CWsfDetailsView::NewLC() |
|
53 // --------------------------------------------------------- |
|
54 // |
|
55 CWsfDetailsView* CWsfDetailsView::NewLC() |
|
56 { |
|
57 LOG_ENTERFN( "CWsfDetailsView::NewLC" ); |
|
58 CWsfDetailsView* self = new (ELeave) CWsfDetailsView(); |
|
59 CleanupStack::PushL(self); |
|
60 self->ConstructL( ); |
|
61 return self; |
|
62 } |
|
63 |
|
64 |
|
65 // --------------------------------------------------------- |
|
66 // CWsfDetailsView::CWsfDetailsView() |
|
67 // --------------------------------------------------------- |
|
68 // |
|
69 CWsfDetailsView::CWsfDetailsView() : CAknView() |
|
70 { |
|
71 } |
|
72 |
|
73 // --------------------------------------------------------- |
|
74 // CWsfDetailsView::ConstructL() |
|
75 // --------------------------------------------------------- |
|
76 // |
|
77 void CWsfDetailsView::ConstructL() |
|
78 { |
|
79 LOG_ENTERFN( "CWsfDetailsView::ConstructL" ); |
|
80 BaseConstructL( R_SNIFFER_DETAILSVIEW ); |
|
81 iModel = CWsfDetailsViewModel::NewL(); |
|
82 iController.SetModel( iModel ); |
|
83 } |
|
84 |
|
85 // --------------------------------------------------------- |
|
86 // CWsfDetailsView::~CWsfDetailsView() |
|
87 // --------------------------------------------------------- |
|
88 // |
|
89 CWsfDetailsView::~CWsfDetailsView() |
|
90 { |
|
91 LOG_ENTERFN( "CWsfDetailsView::~CWsfDetailsView" ); |
|
92 delete iContainer; |
|
93 delete iModel; |
|
94 } |
|
95 |
|
96 // --------------------------------------------------------- |
|
97 // CWsfDetailsView::Id() |
|
98 // --------------------------------------------------------- |
|
99 // |
|
100 TUid CWsfDetailsView::Id() const |
|
101 { |
|
102 return TUid::Uid( EDetailsViewId ); |
|
103 } |
|
104 |
|
105 // --------------------------------------------------------- |
|
106 // CWsfDetailsView::HandleCommandL() |
|
107 // --------------------------------------------------------- |
|
108 // |
|
109 void CWsfDetailsView::HandleCommandL( TInt aCommand ) |
|
110 { |
|
111 LOG_ENTERFN( "CWsfDetailsView::HandleCommandL" ); |
|
112 switch ( aCommand ) |
|
113 { |
|
114 case EAknSoftkeyOk: |
|
115 { |
|
116 iController.HandleSelectionKeyPressedL(); |
|
117 AppUi()->HandleCommandL( ESnifferCmdShowWlans ); |
|
118 break; |
|
119 } |
|
120 default: |
|
121 { |
|
122 AppUi()->HandleCommandL( aCommand ); |
|
123 break; |
|
124 } |
|
125 } |
|
126 } |
|
127 |
|
128 // --------------------------------------------------------- |
|
129 // CWsfDetailsView::Controller |
|
130 // --------------------------------------------------------- |
|
131 // |
|
132 MWsfDetailsViewControllerIf& CWsfDetailsView::Controller() |
|
133 { |
|
134 return iController; |
|
135 } |
|
136 |
|
137 // --------------------------------------------------------- |
|
138 // CWsfDetailsView::DoActivateL() |
|
139 // --------------------------------------------------------- |
|
140 // |
|
141 void CWsfDetailsView::DoActivateL( const TVwsViewId& /*aPrevViewId*/, |
|
142 TUid /*aCustomMessageId*/, |
|
143 const TDesC8& /*aCustomMessage*/ ) |
|
144 { |
|
145 LOG_ENTERFN( "CWsfDetailsView::DoActivateL" ); |
|
146 if( !iContainer ) |
|
147 { |
|
148 iContainer = CWsfDetailsContainer::NewL( ClientRect(), |
|
149 iController ); |
|
150 iContainer->SetMopParent( this ); |
|
151 AppUi()->AddToViewStackL( *this, iContainer ); |
|
152 iContainer->SetPartner( iController ); |
|
153 iContainer->SetDetailsModel( iModel ); |
|
154 iContainer->MakeVisible( ETrue ); |
|
155 iController.SetContainer( iContainer ); |
|
156 iController.RefreshL(); |
|
157 } |
|
158 } |
|
159 |
|
160 // --------------------------------------------------------- |
|
161 // CWsfDetailsView::DoDeactivate |
|
162 // --------------------------------------------------------- |
|
163 // |
|
164 void CWsfDetailsView::DoDeactivate() |
|
165 { |
|
166 LOG_ENTERFN( "CWsfDetailsView::DoDeactivate" ); |
|
167 AppUi()->RemoveFromViewStack( *this, iContainer ); |
|
168 iContainer->MakeVisible( EFalse ); |
|
169 delete iContainer; |
|
170 iContainer = NULL; |
|
171 iController.SetContainer( NULL ); |
|
172 } |
|
173 |
|
174 // --------------------------------------------------------- |
|
175 // CWsfDetailsView::HandleListBoxEventL |
|
176 // --------------------------------------------------------- |
|
177 // |
|
178 void CWsfDetailsView::HandleListBoxEventL( CEikListBox* /*aListBox*/, |
|
179 TListBoxEvent /*aEventType*/ ) |
|
180 { |
|
181 } |
|
182 |
|
183 // End of File |
|