58
|
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: container control class
|
|
15 |
*
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
// INCLUDE FILES
|
|
20 |
#include "ConnectionMonitorUiDetailsContainer.h"
|
|
21 |
|
|
22 |
#include <aknnavi.h> //for CNaviPane
|
|
23 |
#include <aknnavide.h> //for CAknNavigationDecorator
|
|
24 |
#include <StringLoader.h>
|
|
25 |
#include <ConnectionMonitorUi.rsg>
|
|
26 |
|
|
27 |
#include "ConnectionArray.h"
|
|
28 |
#include "ConnectionMonitorUiLogger.h"
|
|
29 |
#include "ConnectionMonitorUiDetailsView.h"
|
|
30 |
#include "ConnectionMonitorUi.hrh"
|
|
31 |
|
|
32 |
// CONSTANTS
|
|
33 |
|
|
34 |
// ---------------------------------------------------------
|
|
35 |
// CConnectionMonitorUiDetailsContainer::ConstructL( const TRect& aRect )
|
|
36 |
// EPOC two phased constructor
|
|
37 |
// ---------------------------------------------------------
|
|
38 |
//
|
|
39 |
void CConnectionMonitorUiDetailsContainer::ConstructL( const TRect& aRect,
|
|
40 |
CConnectionMonitorUiDetailsView* aParentView )
|
|
41 |
{
|
|
42 |
CMUILOGGER_WRITE( "CConnectionMonitorUiDetailsContainer::ConstructL" );
|
|
43 |
CreateWindowL();
|
|
44 |
|
|
45 |
iParentView = aParentView;
|
|
46 |
iListBox = new( ELeave ) CAknSingleHeadingStyleListBox;
|
|
47 |
iListBox->SetContainerWindowL( *this );
|
|
48 |
TInt flags = 0;
|
|
49 |
flags |= EAknListBoxViewerFlags | EAknListBoxDisableItemSpecificMenu;
|
|
50 |
iListBox->ConstructL( this, flags );
|
|
51 |
iListBox->CreateScrollBarFrameL( ETrue );
|
|
52 |
iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
|
|
53 |
CEikScrollBarFrame::EOff,
|
|
54 |
CEikScrollBarFrame::EAuto );
|
|
55 |
|
|
56 |
CMUILOGGER_WRITE( "Creating connection details array" );
|
|
57 |
|
|
58 |
iListBox->Model()->SetOwnershipType( ELbmOwnsItemArray );
|
|
59 |
|
|
60 |
SetRect( aRect );
|
|
61 |
|
|
62 |
HBufC* noConn = StringLoader::LoadLC( R_QTN_CMON_NO_ACTIVE_CONNECTIONS,
|
|
63 |
iEikonEnv );
|
|
64 |
CListBoxView *lbview = iListBox->View();
|
|
65 |
lbview->SetListEmptyTextL( *noConn );
|
|
66 |
CleanupStack::PopAndDestroy( noConn );
|
|
67 |
|
|
68 |
|
|
69 |
GetPanesL();
|
|
70 |
|
|
71 |
ActivateL();
|
|
72 |
CMUILOGGER_WRITE( "CConnectionMonitorUiDetailsContainer::ConstructL" );
|
|
73 |
}
|
|
74 |
|
|
75 |
// ---------------------------------------------------------
|
|
76 |
// CConnectionMonitorUiDetailsContainer::SetSelectedConnectionL
|
|
77 |
// ---------------------------------------------------------
|
|
78 |
//
|
|
79 |
void CConnectionMonitorUiDetailsContainer::SetSelectedConnectionL(
|
|
80 |
TUint aConnectionIndex )
|
|
81 |
{
|
|
82 |
CMUILOGGER_ENTERFN( "CConnectionMonitorUiDetailsContainer::SetSelectedConnectionL" );
|
|
83 |
CMUILOGGER_WRITE_F( "aConnectionIndex : %d", &aConnectionIndex );
|
|
84 |
CMUILOGGER_WRITE_F( "iConnectionArray->MdcaCount() : %d",
|
|
85 |
iConnectionArray->MdcaCount() );
|
|
86 |
|
|
87 |
CConnectionInfoBase* temp = ( *iConnectionArray ).At( aConnectionIndex );
|
|
88 |
CDesCArrayFlat* tempArray = temp ? temp->GetDetailsArray() : NULL ;
|
|
89 |
if ( tempArray )
|
|
90 |
{
|
|
91 |
iConnectionIndex = aConnectionIndex;
|
|
92 |
iConnectionInfo = temp;
|
|
93 |
iListBox->Model()->SetItemTextArray( tempArray );
|
|
94 |
iListBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray );
|
|
95 |
iListBox->Reset();
|
|
96 |
iListBox->UpdateScrollBarsL();
|
|
97 |
}
|
|
98 |
|
|
99 |
CMUILOGGER_LEAVEFN( "CConnectionMonitorUiDetailsContainer::SetSelectedConnectionL" );
|
|
100 |
}
|
|
101 |
|
|
102 |
// ---------------------------------------------------------
|
|
103 |
// CConnectionMonitorUiDetailsContainer::~CConnectionMonitorUiDetailsContainer
|
|
104 |
// ---------------------------------------------------------
|
|
105 |
//
|
|
106 |
CConnectionMonitorUiDetailsContainer::~CConnectionMonitorUiDetailsContainer()
|
|
107 |
{
|
|
108 |
delete iListBox;
|
|
109 |
delete iNaviDecorator;
|
|
110 |
}
|
|
111 |
|
|
112 |
// ---------------------------------------------------------
|
|
113 |
// CConnectionMonitorUiContainer::CConnectionMonitorUiContainer
|
|
114 |
// ---------------------------------------------------------
|
|
115 |
//
|
|
116 |
CConnectionMonitorUiDetailsContainer::CConnectionMonitorUiDetailsContainer(
|
|
117 |
const CConnectionArray* const aConnectionArray )
|
|
118 |
: iConnectionArray( aConnectionArray )
|
|
119 |
{
|
|
120 |
}
|
|
121 |
|
|
122 |
// ---------------------------------------------------------
|
|
123 |
// CConnectionMonitorUiDetailsContainer::SizeChanged()
|
|
124 |
// Called by framework when the view size is changed
|
|
125 |
// ---------------------------------------------------------
|
|
126 |
//
|
|
127 |
void CConnectionMonitorUiDetailsContainer::SizeChanged()
|
|
128 |
{
|
|
129 |
iListBox->SetRect( Rect() );
|
|
130 |
}
|
|
131 |
|
|
132 |
// ---------------------------------------------------------
|
|
133 |
// CConnectionMonitorUiDetailsContainer::CountComponentControls() const
|
|
134 |
// ---------------------------------------------------------
|
|
135 |
//
|
|
136 |
TInt CConnectionMonitorUiDetailsContainer::CountComponentControls() const
|
|
137 |
{
|
|
138 |
return 1; // return nbr of controls inside this container
|
|
139 |
}
|
|
140 |
|
|
141 |
// ---------------------------------------------------------
|
|
142 |
// CConnectionMonitorUiDetailsContainer::ComponentControl( TInt aIndex ) const
|
|
143 |
// ---------------------------------------------------------
|
|
144 |
//
|
|
145 |
CCoeControl* CConnectionMonitorUiDetailsContainer::ComponentControl(
|
|
146 |
TInt aIndex ) const
|
|
147 |
{
|
|
148 |
switch ( aIndex )
|
|
149 |
{
|
|
150 |
case 0:
|
|
151 |
return iListBox;
|
|
152 |
default:
|
|
153 |
return NULL;
|
|
154 |
}
|
|
155 |
}
|
|
156 |
|
|
157 |
// ----------------------------------------------------------------------------
|
|
158 |
// CLogsDetailView::HandleNaviDecoratorEventL
|
|
159 |
// Handler for pointer events, when the Navi Pane arrows have been tapped
|
|
160 |
// ----------------------------------------------------------------------------
|
|
161 |
//
|
|
162 |
void CConnectionMonitorUiDetailsContainer::HandleNaviDecoratorEventL( TInt aEventID )
|
|
163 |
{
|
|
164 |
switch (aEventID)
|
|
165 |
{
|
|
166 |
case MAknNaviDecoratorObserver::EAknNaviDecoratorEventRightTabArrow:
|
|
167 |
if ( iConnectionIndex < (iConnectionArray->MdcaCount() - 1) ) {
|
|
168 |
SetSelectedConnectionL(iConnectionIndex + 1);
|
|
169 |
}
|
|
170 |
break;
|
|
171 |
|
|
172 |
case MAknNaviDecoratorObserver::EAknNaviDecoratorEventLeftTabArrow:
|
|
173 |
if ( iConnectionIndex > 0 ) {
|
|
174 |
SetSelectedConnectionL(iConnectionIndex - 1);
|
|
175 |
}
|
|
176 |
break;
|
|
177 |
|
|
178 |
default:
|
|
179 |
return;
|
|
180 |
}
|
|
181 |
}
|
|
182 |
|
|
183 |
// ---------------------------------------------------------
|
|
184 |
// CConnectionMonitorUiDetailsContainer::OfferKeyEventL
|
|
185 |
// ---------------------------------------------------------
|
|
186 |
//
|
|
187 |
TKeyResponse CConnectionMonitorUiDetailsContainer::OfferKeyEventL(
|
|
188 |
const TKeyEvent& aKeyEvent,
|
|
189 |
TEventCode aType )
|
|
190 |
{
|
|
191 |
CMUILOGGER_ENTERFN( "CConnectionMonitorUiDetailsContainer::OfferKeyEventL" );
|
|
192 |
|
|
193 |
TKeyResponse result( EKeyWasNotConsumed );
|
|
194 |
TInt index = iConnectionIndex;
|
|
195 |
TInt index_closed = iConnectionIndex;
|
|
196 |
CConnectionInfoBase* connection = NULL;
|
|
197 |
if ( aType == EEventKey )
|
|
198 |
{
|
|
199 |
if ( ( aKeyEvent.iCode == EKeyLeftArrow ) ||
|
|
200 |
( aKeyEvent.iCode == EKeyRightArrow ) )
|
|
201 |
{
|
|
202 |
|
|
203 |
TInt dir = 0;
|
|
204 |
switch (aKeyEvent.iCode)
|
|
205 |
{
|
|
206 |
case EKeyLeftArrow:
|
|
207 |
{
|
|
208 |
dir = -1;
|
|
209 |
break;
|
|
210 |
}
|
|
211 |
case EKeyRightArrow:
|
|
212 |
{
|
|
213 |
dir = 1;
|
|
214 |
break;
|
|
215 |
}
|
|
216 |
}
|
|
217 |
// Handle mirrored layout by negating the directionality
|
|
218 |
if (AknLayoutUtils::LayoutMirrored())
|
|
219 |
{
|
|
220 |
dir = -1 * dir;
|
|
221 |
}
|
|
222 |
|
|
223 |
index += dir;
|
|
224 |
|
|
225 |
TBool step( EFalse );
|
|
226 |
|
|
227 |
CMUILOGGER_WRITE_F( "OfferKeyEventL index: %d", index );
|
|
228 |
|
|
229 |
while ( ( index > -1 ) && ( index < iConnectionArray->MdcaCount()
|
|
230 |
&& !step ) )
|
|
231 |
{
|
|
232 |
connection = ( *iConnectionArray )[index];
|
|
233 |
TBool alive = connection->IsAlive();
|
|
234 |
CMUILOGGER_WRITE_F( "OfferKeyEventL alive: %b", alive );
|
|
235 |
|
|
236 |
if ( alive )
|
|
237 |
{
|
|
238 |
if ( ( index_closed > -1 ) &&
|
|
239 |
( index_closed < iConnectionArray->MdcaCount() ) )
|
|
240 |
{
|
|
241 |
CConnectionInfoBase* connection_closed
|
|
242 |
= ( *iConnectionArray )[index_closed];
|
|
243 |
|
|
244 |
if ( iParentView->GetViewRefreshState() )
|
|
245 |
{
|
|
246 |
step = ETrue;
|
|
247 |
CConnectionMonitorUiAppUi* appUi =
|
|
248 |
(CConnectionMonitorUiAppUi*)
|
|
249 |
iEikonEnv->EikAppUi();
|
|
250 |
appUi->DeleteDetailsView(
|
|
251 |
GetSelectedConnectionInfo()
|
|
252 |
->GetConnectionId(),
|
|
253 |
GetSelectedConnectionInfo() );
|
|
254 |
appUi->StartTimerL();
|
|
255 |
iParentView->SetViewRefreshState( EFalse );
|
|
256 |
if ( index_closed > index )
|
|
257 |
{
|
|
258 |
iConnectionInfo = connection;
|
|
259 |
iConnectionIndex = index;
|
|
260 |
}
|
|
261 |
iListBox->Model()->SetItemTextArray(
|
|
262 |
connection->GetDetailsArray() );
|
|
263 |
iListBox->DrawNow();
|
|
264 |
iListBox->UpdateScrollBarsL();
|
|
265 |
PushAndRefreshNaviPaneL();
|
|
266 |
}
|
|
267 |
else
|
|
268 |
{
|
|
269 |
step = ETrue;
|
|
270 |
iConnectionInfo = connection;
|
|
271 |
iConnectionIndex = index;
|
|
272 |
iListBox->Model()->SetItemTextArray(
|
|
273 |
connection->GetDetailsArray() );
|
|
274 |
iListBox->DrawNow();
|
|
275 |
iListBox->UpdateScrollBarsL();
|
|
276 |
PushAndRefreshNaviPaneL();
|
|
277 |
}
|
|
278 |
}
|
|
279 |
}
|
|
280 |
else
|
|
281 |
{
|
|
282 |
index += dir;
|
|
283 |
}
|
|
284 |
}
|
|
285 |
result = iListBox->OfferKeyEventL( aKeyEvent, aType );
|
|
286 |
}
|
|
287 |
else if ( aKeyEvent.iCode == EKeyDevice3 )
|
|
288 |
// selection key press -> go back to main view
|
|
289 |
{
|
|
290 |
CConnectionMonitorUiAppUi::Static()->ActivateLocalViewL(
|
|
291 |
TUid::Uid( EConnectionMonitorUiMainViewTab ) );
|
|
292 |
result = EKeyWasConsumed;
|
|
293 |
}
|
|
294 |
else
|
|
295 |
{
|
|
296 |
result = iListBox->OfferKeyEventL( aKeyEvent, aType );
|
|
297 |
}
|
|
298 |
}
|
|
299 |
|
|
300 |
CMUILOGGER_LEAVEFN( "CConnectionMonitorUiDetailsContainer::OfferKeyEventL" );
|
|
301 |
|
|
302 |
return result;
|
|
303 |
}
|
|
304 |
|
|
305 |
// ---------------------------------------------------------
|
|
306 |
// CConnectionMonitorUiDetailsContainer::OnEventL
|
|
307 |
// ---------------------------------------------------------
|
|
308 |
//
|
|
309 |
void CConnectionMonitorUiDetailsContainer::OnEventL(
|
|
310 |
const CConnMonEventBase& aConnMonEvent,
|
|
311 |
const TInt aIndex )
|
|
312 |
{
|
|
313 |
CMUILOGGER_ENTERFN( "CConnectionMonitorUiDetailsContainer::OnEventL()" );
|
|
314 |
CMUILOGGER_WRITE_F( "aIndex : %d", aIndex );
|
|
315 |
|
|
316 |
switch ( aConnMonEvent.EventType() )
|
|
317 |
{
|
|
318 |
case EConnMonDeleteConnection:
|
|
319 |
{
|
|
320 |
// Do nothing
|
|
321 |
}
|
|
322 |
break;
|
|
323 |
case EConnMonCreateConnection:
|
|
324 |
{
|
|
325 |
CMUILOGGER_WRITE_F( "iConnectionInfo : %d", iConnectionInfo );
|
|
326 |
|
|
327 |
if ( !iConnectionInfo )
|
|
328 |
{
|
|
329 |
SetSelectedConnectionL( 0 );
|
|
330 |
}
|
|
331 |
break;
|
|
332 |
}
|
|
333 |
default:
|
|
334 |
{
|
|
335 |
if ( !iConnectionInfo )
|
|
336 |
{
|
|
337 |
SetSelectedConnectionL( 0 );
|
|
338 |
}
|
|
339 |
else if ( ( aIndex == iConnectionIndex ) && ( iConnectionArray->MdcaCount() ) )
|
|
340 |
{
|
|
341 |
iListBox->DrawNow();
|
|
342 |
iListBox->UpdateScrollBarsL();
|
|
343 |
}
|
|
344 |
break;
|
|
345 |
}
|
|
346 |
}
|
|
347 |
PushAndRefreshNaviPaneL();
|
|
348 |
CMUILOGGER_LEAVEFN( "CConnectionMonitorUiDetailsContainer::OnEventL()" );
|
|
349 |
}
|
|
350 |
|
|
351 |
// ---------------------------------------------------------
|
|
352 |
// CConnectionMonitorUiDetailsContainer::OnTimerEventL
|
|
353 |
// ---------------------------------------------------------
|
|
354 |
//
|
|
355 |
void CConnectionMonitorUiDetailsContainer::OnTimerEventL()
|
|
356 |
{
|
|
357 |
if ( iConnectionArray->MdcaCount() )
|
|
358 |
{
|
|
359 |
iListBox->DrawNow();
|
|
360 |
|
|
361 |
CMUILOGGER_WRITE_F( "CMUIDW GetStatus() before: %d",
|
|
362 |
iConnectionInfo->GetStatus() );
|
|
363 |
if ( iConnectionInfo->GetStatus() == EConnectionClosing )
|
|
364 |
{
|
|
365 |
CConnectionMonitorUiAppUi* tempApUi =
|
|
366 |
CConnectionMonitorUiAppUi::Static();
|
|
367 |
iConnectionInfo->StatusChangedL();
|
|
368 |
}
|
|
369 |
CMUILOGGER_WRITE_F( "CMUIDW GetStatus() after: %d",
|
|
370 |
iConnectionInfo->GetStatus() );
|
|
371 |
}
|
|
372 |
PushAndRefreshNaviPaneL();
|
|
373 |
}
|
|
374 |
|
|
375 |
// ---------------------------------------------------------
|
|
376 |
// CConnectionMonitorUiDetailsContainer::DrawFirstAllListBoxItem
|
|
377 |
// ---------------------------------------------------------
|
|
378 |
//
|
|
379 |
void CConnectionMonitorUiDetailsContainer::DrawFirstAllListBoxItem()
|
|
380 |
{
|
|
381 |
TInt count = iListBox->Model()->NumberOfItems() - 1;
|
|
382 |
for ( TInt i = count; i > -1; --i )
|
|
383 |
{
|
|
384 |
iListBox->DrawItem( i );
|
|
385 |
}
|
|
386 |
}
|
|
387 |
|
|
388 |
// ---------------------------------------------------------
|
|
389 |
// CConnectionMonitorUiDetailsContainer::ListBox
|
|
390 |
// ---------------------------------------------------------
|
|
391 |
//
|
|
392 |
CAknSingleHeadingStyleListBox*
|
|
393 |
CConnectionMonitorUiDetailsContainer::ListBox() const
|
|
394 |
{
|
|
395 |
return iListBox;
|
|
396 |
}
|
|
397 |
|
|
398 |
// ---------------------------------------------------------
|
|
399 |
// CConnectionMonitorUiDetailsContainer::GetPanesL
|
|
400 |
// ---------------------------------------------------------
|
|
401 |
//
|
|
402 |
void CConnectionMonitorUiDetailsContainer::GetPanesL()
|
|
403 |
{
|
|
404 |
CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane();
|
|
405 |
|
|
406 |
iNaviPane = STATIC_CAST( CAknNavigationControlContainer*,
|
|
407 |
statusPane->ControlL( TUid::Uid(EEikStatusPaneUidNavi ) ) );
|
|
408 |
|
|
409 |
PushAndRefreshNaviPaneL();
|
|
410 |
}
|
|
411 |
|
|
412 |
// ---------------------------------------------------------
|
|
413 |
// CConnectionMonitorUiDetailsContainer::PushAndRefreshNaviPaneL
|
|
414 |
// ---------------------------------------------------------
|
|
415 |
//
|
|
416 |
void CConnectionMonitorUiDetailsContainer::PushAndRefreshNaviPaneL()
|
|
417 |
{
|
|
418 |
TUint countOfConnection = iConnectionArray->MdcaCount();
|
|
419 |
|
|
420 |
CMUILOGGER_WRITE_F( "countOfConnection : %d", countOfConnection );
|
|
421 |
|
|
422 |
if ( ( iConnectionIndex > countOfConnection ) && // spec. index update
|
|
423 |
( countOfConnection == 0 ) )
|
|
424 |
{
|
|
425 |
iConnectionIndex = iConnectionArray->
|
|
426 |
GetArrayIndex(
|
|
427 |
GetSelectedConnectionInfo()
|
|
428 |
->GetConnectionId() );
|
|
429 |
}
|
|
430 |
|
|
431 |
CMUILOGGER_WRITE_F( "iConnectionIndex : %d", iConnectionIndex );
|
|
432 |
|
|
433 |
if ( iNaviDecorator )
|
|
434 |
{
|
|
435 |
PopNaviPane();
|
|
436 |
}
|
|
437 |
|
|
438 |
if ( iParentView->GetViewRefreshState() ) // connection closed
|
|
439 |
{
|
|
440 |
iNaviDecorator = iNaviPane->CreateNavigationLabelL( KNullDesC );
|
|
441 |
}
|
|
442 |
else // connection alive
|
|
443 |
{
|
|
444 |
HBufC* textOfNaviPane = NULL;
|
|
445 |
|
|
446 |
CArrayFixFlat<TInt>* array = new( ELeave ) CArrayFixFlat<TInt>( 2 );
|
|
447 |
CleanupStack::PushL( array );
|
|
448 |
|
|
449 |
if ( ( countOfConnection == 1 ) &&
|
|
450 |
( iConnectionIndex + 1 >= countOfConnection ) )
|
|
451 |
{
|
|
452 |
array->AppendL( countOfConnection );
|
|
453 |
}
|
|
454 |
else
|
|
455 |
{
|
|
456 |
array->AppendL( countOfConnection ? iConnectionIndex + 1 : 0 );
|
|
457 |
}
|
|
458 |
|
|
459 |
array->AppendL( countOfConnection );
|
|
460 |
textOfNaviPane = StringLoader::LoadLC(
|
|
461 |
R_QTN_CMON_NAVI_NOF_CONNECTION,
|
|
462 |
*array );
|
|
463 |
|
|
464 |
iNaviDecorator = iNaviPane->CreateNavigationLabelL(
|
|
465 |
*textOfNaviPane );
|
|
466 |
|
|
467 |
CleanupStack::PopAndDestroy( textOfNaviPane );
|
|
468 |
CleanupStack::PopAndDestroy( array );
|
|
469 |
}
|
|
470 |
|
|
471 |
iNaviDecorator->MakeScrollButtonVisible( ETrue );
|
|
472 |
|
|
473 |
CAknNavigationDecorator::TScrollButton left = CAknNavigationDecorator::ELeftButton;
|
|
474 |
CAknNavigationDecorator::TScrollButton right = CAknNavigationDecorator::ERightButton;
|
|
475 |
if ( AknLayoutUtils::LayoutMirrored() )
|
|
476 |
{
|
|
477 |
left = CAknNavigationDecorator::ERightButton;
|
|
478 |
right = CAknNavigationDecorator::ELeftButton;
|
|
479 |
}
|
|
480 |
|
|
481 |
if ( iParentView->GetViewRefreshState() )
|
|
482 |
{
|
|
483 |
iNaviDecorator->SetScrollButtonDimmed( left,
|
|
484 |
( ( iConnectionIndex == 0 ) ||
|
|
485 |
( countOfConnection == 0 ) ) );
|
|
486 |
}
|
|
487 |
else
|
|
488 |
{
|
|
489 |
iNaviDecorator->SetScrollButtonDimmed(
|
|
490 |
left,
|
|
491 |
( ( iConnectionIndex == 0 ) ||
|
|
492 |
( countOfConnection == 0 ) ||
|
|
493 |
( ( countOfConnection == 1 ) &&
|
|
494 |
( iConnectionIndex + 1 >=
|
|
495 |
countOfConnection ) ) ) );
|
|
496 |
}
|
|
497 |
|
|
498 |
if ( iParentView->GetViewRefreshState() )
|
|
499 |
{
|
|
500 |
iNaviDecorator->SetScrollButtonDimmed( right,
|
|
501 |
iConnectionIndex >= countOfConnection );
|
|
502 |
}
|
|
503 |
else
|
|
504 |
{
|
|
505 |
iNaviDecorator->SetScrollButtonDimmed( right,
|
|
506 |
iConnectionIndex + 1 >= countOfConnection );
|
|
507 |
}
|
|
508 |
|
|
509 |
iNaviDecorator->SetNaviDecoratorObserver( this );
|
|
510 |
|
|
511 |
iNaviPane->PushL( *iNaviDecorator );
|
|
512 |
}
|
|
513 |
|
|
514 |
|
|
515 |
// ---------------------------------------------------------
|
|
516 |
// CConnectionMonitorUiDetailsContainer::PopNaviPane
|
|
517 |
// ---------------------------------------------------------
|
|
518 |
//
|
|
519 |
void CConnectionMonitorUiDetailsContainer::PopNaviPane()
|
|
520 |
{
|
|
521 |
iNaviPane->Pop( iNaviDecorator );
|
|
522 |
delete iNaviDecorator;
|
|
523 |
iNaviDecorator = NULL;
|
|
524 |
}
|
|
525 |
|
|
526 |
|
|
527 |
// ---------------------------------------------------------
|
|
528 |
// CConnectionMonitorUiDetailsContainer::HandleResourceChange
|
|
529 |
// ---------------------------------------------------------
|
|
530 |
//
|
|
531 |
void CConnectionMonitorUiDetailsContainer::HandleResourceChange( TInt aType )
|
|
532 |
{
|
|
533 |
CCoeControl::HandleResourceChange( aType );
|
|
534 |
if ( aType == KEikDynamicLayoutVariantSwitch )
|
|
535 |
{
|
|
536 |
TRect mainPaneRect;
|
|
537 |
AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane,
|
|
538 |
mainPaneRect );
|
|
539 |
SetRect( mainPaneRect );
|
|
540 |
DrawNow();
|
|
541 |
}
|
|
542 |
}
|
|
543 |
|
|
544 |
// ---------------------------------------------------------
|
|
545 |
// CConnectionMonitorUiDetailsContainer::FocusChanged
|
|
546 |
// ---------------------------------------------------------
|
|
547 |
//
|
|
548 |
void CConnectionMonitorUiDetailsContainer::FocusChanged( TDrawNow aDrawNow )
|
|
549 |
{
|
|
550 |
CMUILOGGER_ENTERFN( "CConnectionMonitorUiDetailsContainer::FocusChanged" );
|
|
551 |
CCoeControl::FocusChanged( aDrawNow );
|
|
552 |
if ( iListBox )
|
|
553 |
{
|
|
554 |
iListBox->SetFocus( IsFocused() );
|
|
555 |
}
|
|
556 |
CMUILOGGER_LEAVEFN( "CConnectionMonitorUiDetailsContainer::FocusChanged" );
|
|
557 |
}
|
|
558 |
|
|
559 |
|
|
560 |
// ---------------------------------------------------------
|
|
561 |
// CConnectionMonitorUiDetailsContainer::GetIndexOfSelectedItem
|
|
562 |
// ---------------------------------------------------------
|
|
563 |
//
|
|
564 |
TInt CConnectionMonitorUiDetailsContainer::GetIndexOfSelectedItem()
|
|
565 |
{
|
|
566 |
CMUILOGGER_WRITE_F(
|
|
567 |
"CMUIDetailsContainer::GetIndexOfSelectedItem iConnectionIndex: %d",
|
|
568 |
iConnectionIndex );
|
|
569 |
|
|
570 |
return iConnectionIndex;
|
|
571 |
}
|
|
572 |
|
|
573 |
// ---------------------------------------------------------
|
|
574 |
// CConnectionMonitorUiDetailsContainer::GetSelectedConnectionInfo()
|
|
575 |
// ---------------------------------------------------------
|
|
576 |
//
|
|
577 |
CConnectionInfoBase* CConnectionMonitorUiDetailsContainer::
|
|
578 |
GetSelectedConnectionInfo() const
|
|
579 |
{
|
|
580 |
return iConnectionInfo;
|
|
581 |
}
|
|
582 |
|
|
583 |
|
|
584 |
// End of File
|