stifui/stifui/src/ShowStartedCasesContainer.cpp
changeset 0 d6fe6244b863
child 3 2703485a934c
equal deleted inserted replaced
-1:000000000000 0:d6fe6244b863
       
     1 /*
       
     2 * Copyright (c) 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: This file contains CStartedTestsListBoxModel class
       
    15 * definition.
       
    16 *
       
    17 */
       
    18 
       
    19 // INCLUDE FILES
       
    20 
       
    21 #include <aknlists.h>  // ListBox
       
    22 #include <akniconarray.h>  // CAknIconArray
       
    23 #include <badesca.h> // CDesCArray
       
    24 #include <eikclbd.h> // CColumnListBoxData
       
    25 #include <aknnotewrappers.h>
       
    26 
       
    27 #include <Stifui.rsg>
       
    28 
       
    29 //#include "UIStoreIf.h"         
       
    30 //#include "UIStore.h"            
       
    31 //#include "UIEngine.h"           
       
    32 //#include "UIEngineContainer.h"  
       
    33 
       
    34 #include <stifinternal/UIStoreIf.h>
       
    35 #include <stifinternal/UIStore.h>
       
    36 #include <stifinternal/UIEngine.h>
       
    37 #include <stifinternal/UIEngineContainer.h>
       
    38 
       
    39 #include "ShowStartedCasesContainer.h"
       
    40 
       
    41 #include "Stifui.hrh"
       
    42 #include "AppUIAppUi.h"
       
    43 #include "MenuListBox.h"
       
    44 
       
    45 
       
    46 // ================= MEMBER FUNCTIONS =======================
       
    47 // ---------------------------------------------------------
       
    48 // CStartedTestsListBoxModel::NewL
       
    49 // 
       
    50 // Symbian OS two phased constructor
       
    51 // ---------------------------------------------------------
       
    52 //
       
    53 CStartedTestsListBoxModel* CStartedTestsListBoxModel::NewL 
       
    54             ( RRefArray<CStartedTestCase>* aTestCasesInView )
       
    55     {
       
    56     CStartedTestsListBoxModel* self = new ( ELeave ) CStartedTestsListBoxModel();
       
    57     CleanupStack::PushL( self );
       
    58     self->iBuffer = HBufC::NewL( 130 );
       
    59     self->iTestCasesInView = aTestCasesInView;
       
    60     CleanupStack::Pop();
       
    61     return self;
       
    62 
       
    63     }
       
    64 
       
    65 // ---------------------------------------------------------
       
    66 // CStartedTestsListBoxModel::ConstructL
       
    67 // 
       
    68 // Symbian OS two phased constructor
       
    69 // Completes the construction of the object.
       
    70 // ---------------------------------------------------------
       
    71 //
       
    72 
       
    73 void CStartedTestsListBoxModel::ConstructL()
       
    74     {
       
    75     }
       
    76 
       
    77 // ---------------------------------------------------------
       
    78 // CStartedTestsListBoxModel::~CStartedTestsListBoxModel
       
    79 // 
       
    80 // Destructor
       
    81 // ---------------------------------------------------------
       
    82 //
       
    83 
       
    84 CStartedTestsListBoxModel::~CStartedTestsListBoxModel()
       
    85     {
       
    86     }
       
    87 
       
    88 // ---------------------------------------------------------
       
    89 // CStartedTestsListBoxModel::MdcaCount
       
    90 // 
       
    91 // Returns the number of descriptor elements in the array.
       
    92 // ---------------------------------------------------------
       
    93 //
       
    94 
       
    95 TInt CStartedTestsListBoxModel::MdcaCount() const
       
    96     {
       
    97     return iTestCasesInView->Count();
       
    98 
       
    99     }
       
   100 
       
   101 // ---------------------------------------------------------
       
   102 // CStartedTestsListBoxModel::MdcaPoint
       
   103 // 
       
   104 // Indexes into a descriptor array.
       
   105 // ---------------------------------------------------------
       
   106 //
       
   107 TPtrC CStartedTestsListBoxModel::MdcaPoint(TInt aIndex) const
       
   108     {
       
   109     TPtr buffer( iBuffer->Des() );
       
   110     buffer.Zero();
       
   111     switch ( (*iTestCasesInView)[aIndex].Status() )
       
   112         {
       
   113         case CUIStoreIf::EStatusRunning:
       
   114             {
       
   115             if( (*iTestCasesInView)[aIndex].UIEngineContainer().State() ==
       
   116                 CUIEngineContainer::ERunning )
       
   117                 {
       
   118                 buffer.Append(_L("Running\t"));
       
   119                 }
       
   120             else
       
   121                 {
       
   122                 buffer.Append(_L("Paused\t"));
       
   123                 }
       
   124             break;
       
   125             }
       
   126         case CUIStoreIf::EStatusPassed:
       
   127             {
       
   128             buffer.Append(_L("Passed\t"));
       
   129             break;
       
   130             }
       
   131         case CUIStoreIf::EStatusFailed:
       
   132             {
       
   133             buffer.Append(_L("Failed\t"));
       
   134             break;
       
   135             }
       
   136         /*case ECrashed:
       
   137             buffer.Append(_L("Crashed\t"));
       
   138             break;*/
       
   139         case CUIStoreIf::EStatusAborted:
       
   140         	{
       
   141             buffer.Append(_L("Aborted\t"));
       
   142             break;
       
   143         	}
       
   144         default:
       
   145         	{
       
   146             if((*iTestCasesInView)[aIndex].Status() & CUIStoreIf::EStatusPassed)
       
   147             	{
       
   148             	buffer.Append(_L("Passed\t"));
       
   149             	}
       
   150         	else if((*iTestCasesInView)[aIndex].Status() & CUIStoreIf::EStatusFailed)
       
   151             	{
       
   152             	buffer.Append(_L("Failed\t"));
       
   153             	}
       
   154         	else if((*iTestCasesInView)[aIndex].Status() & CUIStoreIf::EStatusAborted)
       
   155             	{
       
   156             	buffer.Append(_L("Aborted\t"));
       
   157             	}
       
   158         	else if((*iTestCasesInView)[aIndex].Status() & CUIStoreIf::EStatusCrashed)
       
   159 	        	{
       
   160 	            buffer.Append(_L("Crashed\t"));
       
   161 	        	}
       
   162         	else
       
   163         		{
       
   164         		buffer.Append(_L("\t"));
       
   165         		}
       
   166         	break;
       
   167         	}
       
   168         }
       
   169         
       
   170     buffer.Append((*iTestCasesInView)[aIndex].TestInfo().TestCaseTitle() );
       
   171     
       
   172     return *iBuffer;
       
   173     
       
   174     }
       
   175 
       
   176 
       
   177 
       
   178 // ---------------------------------------------------------
       
   179 // CShowStartedCasesContainer::ConstructL
       
   180 // 
       
   181 // Symbian OS two phased constructor
       
   182 // ---------------------------------------------------------
       
   183 //
       
   184 void CShowStartedCasesContainer::ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver)
       
   185     {
       
   186     CreateWindowL();
       
   187 
       
   188     iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
       
   189 
       
   190     const TInt KSelectedMode = ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode;
       
   191     
       
   192     if(KSelectedMode == EShowOngoingCases || KSelectedMode == EShowPausedCases
       
   193     		|| KSelectedMode == EShowCrashedAbortedCases  || KSelectedMode == EShowAllStartedCases)
       
   194     	{
       
   195     	iListBox = new (ELeave) CAknSingleHeadingStyleListBox();
       
   196     	}
       
   197     else
       
   198     	{
       
   199     	iListBox = CMenuListBox::NewL(EShowStartedCasesViewId); //CAknSingleStyleListBox();
       
   200     	}
       
   201 	iListBox->SetContainerWindowL( *this );
       
   202 	iListBox->SetListBoxObserver( aListBoxObserver );
       
   203     iListBox->ConstructL(this, EAknListBoxSelectionList);
       
   204 
       
   205     //Create Scroller control for ListBox and set its visibility
       
   206     iListBox->CreateScrollBarFrameL(ETrue);
       
   207     iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
       
   208 	iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );
       
   209 
       
   210     if ( iUIStore )
       
   211         {
       
   212         ConstructListBoxModelL();
       
   213         iListBoxModel = CStartedTestsListBoxModel::NewL( &iStartedTestsPtrs );
       
   214         iListBox->Model()->SetItemTextArray(iListBoxModel);
       
   215         }
       
   216     else
       
   217         {
       
   218         //User::Leave( syy?? )
       
   219         }
       
   220 	iListBox->ActivateL();
       
   221 	if(KSelectedMode != EShowOngoingCases && KSelectedMode != EShowPausedCases
       
   222 	    	&& KSelectedMode != EShowCrashedAbortedCases  && KSelectedMode != EShowAllStartedCases)
       
   223 		{
       
   224 		((CMenuListBox*)iListBox)->SetPreviousFocus();
       
   225 		}
       
   226 
       
   227     SetRect(aRect);
       
   228     ActivateL();
       
   229 
       
   230     }
       
   231 
       
   232 // ---------------------------------------------------------
       
   233 // CShowStartedCasesContainer::ConstructListBoxModelL
       
   234 // 
       
   235 // Constructs list box model without any filtering.
       
   236 // ---------------------------------------------------------
       
   237 //
       
   238 void CShowStartedCasesContainer::ConstructListBoxModelL()
       
   239     {
       
   240     TInt ret( 0 );
       
   241     RRefArray<CStartedTestCase> startedTestCases;
       
   242     ret = iUIStore->StartedTestCases( startedTestCases );
       
   243     if( KErrNone != ret )
       
   244         {
       
   245         startedTestCases.Reset();
       
   246         startedTestCases.Close();
       
   247         User::Leave( ret );
       
   248         }
       
   249     CleanupClosePushL( startedTestCases ); // Closes the handle
       
   250 
       
   251     const TInt KStartedCaseCount = startedTestCases.Count();
       
   252 
       
   253     iStartedTestsPtrs.Reset(); // Remove all pointers (does not delete objects)
       
   254 
       
   255     const TInt KSelectedMode = ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode;
       
   256 
       
   257     // Loop through all started cases
       
   258     for( TInt i=0; i < KStartedCaseCount; i++ )
       
   259         {
       
   260         switch ( KSelectedMode )
       
   261             {
       
   262             case EShowAllStartedCases:
       
   263                 {
       
   264                 iStartedTestsPtrs.Append( startedTestCases[i] );
       
   265                 break;
       
   266                 }
       
   267             case EShowOngoingCases:
       
   268                 {
       
   269                 // Note: PAUSE IS ALSO RUNNIN STATUS
       
   270                 if ( startedTestCases[i].Status() & CUIStoreIf::EStatusRunning )
       
   271                     {
       
   272                     iStartedTestsPtrs.Append(startedTestCases[i]);
       
   273                     }
       
   274                 break;
       
   275                 }
       
   276             case EShowPassedCases:
       
   277                 {
       
   278                 if ( startedTestCases[i].Status() & CUIStoreIf::EStatusPassed )
       
   279                     {
       
   280                     iStartedTestsPtrs.Append( startedTestCases[i] );
       
   281                     }
       
   282                 break;
       
   283                 }
       
   284             case EShowPausedCases:
       
   285                 {
       
   286                 if ( startedTestCases[i].Status() & CUIStoreIf::EStatusRunning )
       
   287                     {
       
   288                     if( startedTestCases[i].UIEngineContainer().State() == CUIEngineContainer::EPaused )
       
   289                         {
       
   290                         iStartedTestsPtrs.Append( startedTestCases[i] );
       
   291                         }
       
   292                     }
       
   293                 break;
       
   294                 }
       
   295             case EShowFailedCases:
       
   296                 {
       
   297                 if ( startedTestCases[i].Status() & CUIStoreIf::EStatusFailed )
       
   298                     {
       
   299                     iStartedTestsPtrs.Append( startedTestCases[i] );
       
   300                     }
       
   301                 break;
       
   302                 }
       
   303             case EShowCrashedAbortedCases:
       
   304                 {
       
   305                 if ( startedTestCases[i].Status() & CUIStoreIf::EStatusAborted 
       
   306                 		|| startedTestCases[i].Status() & CUIStoreIf::EStatusCrashed)
       
   307                     {
       
   308                     iStartedTestsPtrs.Append( startedTestCases[i] );
       
   309                     }
       
   310                 break;
       
   311                 }
       
   312             }
       
   313         }
       
   314     startedTestCases.Reset();
       
   315     startedTestCases.Close();
       
   316 
       
   317     CleanupStack::PopAndDestroy(); // startedTestCases
       
   318 
       
   319     }
       
   320 
       
   321 // ---------------------------------------------------------
       
   322 // CShowStartedCasesContainer::~CShowStartedCasesContainer
       
   323 // 
       
   324 // Destructor
       
   325 // ---------------------------------------------------------
       
   326 //
       
   327 CShowStartedCasesContainer::~CShowStartedCasesContainer()
       
   328     {
       
   329     iStartedTestsPtrs.Close(); // does not delete objects whose pointers are contained in the array
       
   330     }
       
   331 
       
   332 // ---------------------------------------------------------
       
   333 // CShowStartedCasesContainer::SizeChanged
       
   334 // 
       
   335 // Called by framework when the view size is changed
       
   336 // ---------------------------------------------------------
       
   337 //
       
   338 void CShowStartedCasesContainer::SizeChanged()
       
   339     {
       
   340     if ( iListBox )
       
   341 		{
       
   342 		iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
       
   343 		}
       
   344     }
       
   345 
       
   346 // ---------------------------------------------------------
       
   347 // CShowStartedCasesContainer::CountComponentControls
       
   348 //
       
   349 // Gets a count of the component controls of this list box control.
       
   350 // ---------------------------------------------------------
       
   351 //
       
   352 TInt CShowStartedCasesContainer::CountComponentControls() const
       
   353     {
       
   354     return 1; // return nbr of controls inside this container
       
   355     }
       
   356 
       
   357 // ---------------------------------------------------------
       
   358 // CShowStartedCasesContainer::ComponentControl
       
   359 //
       
   360 // Gets a pointer to the specified component control.
       
   361 // ---------------------------------------------------------
       
   362 //
       
   363 CCoeControl* CShowStartedCasesContainer::ComponentControl(TInt aIndex) const
       
   364     {
       
   365     switch ( aIndex )
       
   366         {
       
   367 		case 0: 
       
   368 			return iListBox;
       
   369         default:
       
   370             return NULL;
       
   371         }
       
   372     }
       
   373 
       
   374 // ---------------------------------------------------------
       
   375 // CShowStartedCasesContainer::Draw
       
   376 // 
       
   377 // Draw a control, called by window server.
       
   378 // ---------------------------------------------------------
       
   379 //
       
   380 void CShowStartedCasesContainer::Draw(const TRect& /*aRect*/) const
       
   381     {
       
   382     }
       
   383 
       
   384 // ---------------------------------------------------------
       
   385 // CShowStartedCasesContainer::OfferKeyEventL
       
   386 // 
       
   387 // Handles key events.
       
   388 // ---------------------------------------------------------
       
   389 //
       
   390 TKeyResponse CShowStartedCasesContainer::OfferKeyEventL(
       
   391 	const TKeyEvent& aKeyEvent, TEventCode aType)
       
   392     {
       
   393 	if (aType != EEventKey)
       
   394 	    {
       
   395 		return EKeyWasNotConsumed;
       
   396 	    }
       
   397 
       
   398 	if (iListBox)
       
   399 		{
       
   400 		return iListBox->OfferKeyEventL( aKeyEvent, aType );
       
   401 		}
       
   402 	else
       
   403 		{
       
   404 		return EKeyWasNotConsumed;
       
   405 		}
       
   406 		
       
   407 	}
       
   408 	
       
   409 // ---------------------------------------------------------
       
   410 // CShowStartedCasesContainer::SelectedTestCase
       
   411 // 
       
   412 // Returns reference to currently selected test case in view (listbox).
       
   413 // ---------------------------------------------------------
       
   414 //
       
   415 CStartedTestCase* CShowStartedCasesContainer::SelectedTestCase()
       
   416     {
       
   417     if ( iStartedTestsPtrs.Count() > 0 )
       
   418         {
       
   419         return &(iStartedTestsPtrs[ iListBox->CurrentItemIndex() ]);
       
   420         }
       
   421     else
       
   422         {
       
   423         return NULL;
       
   424         }
       
   425     }
       
   426 
       
   427 // ---------------------------------------------------------
       
   428 // CShowStartedCasesContainer::DrawListBox
       
   429 // 
       
   430 // Refresh ListBox, if aSelectedTestCase is still found from ListBox
       
   431 // it is set as selected test case.
       
   432 // ---------------------------------------------------------
       
   433 //
       
   434 void CShowStartedCasesContainer::DrawListBox()
       
   435     {
       
   436     if ( iListBox )
       
   437         {
       
   438         iListBox->DrawNow();
       
   439         }
       
   440 
       
   441     }
       
   442 
       
   443 // ---------------------------------------------------------
       
   444 // CShowStartedCasesContainer::HandleItemAdditionL
       
   445 // 
       
   446 // Refresh ListBox after new item was added to listbox model.
       
   447 // ---------------------------------------------------------
       
   448 //
       
   449 void CShowStartedCasesContainer::HandleItemAdditionL()
       
   450     {
       
   451     iListBox->HandleItemAdditionL();
       
   452 
       
   453     }
       
   454 
       
   455 
       
   456 // ---------------------------------------------------------
       
   457 // CShowStartedCasesContainer::HandleItemRemovalL
       
   458 // 
       
   459 // Refresh ListBox after item is removed from listbox model.
       
   460 // ---------------------------------------------------------
       
   461 //
       
   462 void CShowStartedCasesContainer::HandleItemRemovalL()
       
   463     {
       
   464     iListBox->HandleItemRemovalL();
       
   465 
       
   466     // HandleItemRemovalL "loses selection" if current item is removed
       
   467     // -> we have to check it and set one item as current item to make it possible for
       
   468     // user to select one item from items left after remove
       
   469     if ( iListBox->CurrentItemIndex() == -1 ) // No item selected
       
   470         if ( ((CStartedTestsListBoxModel*)iListBox->Model())->MdcaCount() > 0 ) // there are items
       
   471             SetCurrentItemIndex(0);
       
   472 
       
   473     }
       
   474 
       
   475 // ---------------------------------------------------------
       
   476 // CShowStartedCasesContainer::TestsInViewCount
       
   477 // 
       
   478 // Returns count of test cases in view.
       
   479 // ---------------------------------------------------------
       
   480 //
       
   481 TInt CShowStartedCasesContainer::TestsInViewCount()
       
   482     {
       
   483     return ((CStartedTestsListBoxModel*)iListBox->Model())->MdcaCount();
       
   484 
       
   485     }
       
   486     
       
   487 // ---------------------------------------------------------
       
   488 // CShowStartedCasesContainer::CurrentTestCase
       
   489 // 
       
   490 // Returns pointer to currently selected test case.
       
   491 // ---------------------------------------------------------
       
   492 //
       
   493 CStartedTestCase* CShowStartedCasesContainer::CurrentTestCase()
       
   494     {
       
   495     return &iStartedTestsPtrs[ iListBox->CurrentItemIndex() ];
       
   496     }
       
   497 
       
   498 // ---------------------------------------------------------
       
   499 // CShowStartedCasesContainer::SetCurrentItemIndex
       
   500 // 
       
   501 // Sets the current item.
       
   502 // ---------------------------------------------------------
       
   503 //
       
   504 void CShowStartedCasesContainer::SetCurrentItemIndex(TInt aIndex)
       
   505     {
       
   506     TInt itemCount = ((CStartedTestsListBoxModel*)iListBox->Model())->MdcaCount();
       
   507     if ( aIndex < itemCount )
       
   508         {
       
   509         iListBox->SetCurrentItemIndex(aIndex);
       
   510         }
       
   511     else
       
   512         {
       
   513         iListBox->SetCurrentItemIndex(itemCount);
       
   514         }
       
   515 
       
   516     }
       
   517 
       
   518 // ---------------------------------------------------------
       
   519 // CShowStartedCasesContainer::ResetListBox
       
   520 // 
       
   521 // Resets the selection indices, top and current item indices,
       
   522 // the selection, and the horizontal scroll offset of this list box.
       
   523 // This function does not redraw the list box.
       
   524 // ---------------------------------------------------------
       
   525 //
       
   526 void CShowStartedCasesContainer::ResetListBox()
       
   527     {
       
   528     iListBox->Reset();
       
   529 
       
   530     }
       
   531 
       
   532 // ---------------------------------------------------------
       
   533 // CShowStartedCasesContainer::RemoveSelectedExecutionsL
       
   534 // 
       
   535 // Removes items from list box.
       
   536 // ---------------------------------------------------------
       
   537 //
       
   538 void CShowStartedCasesContainer::RemoveSelectedExecutionsL()
       
   539     {
       
   540     TInt indexOfRemovedExecution = 0;
       
   541     iStartedTestsPtrs.Remove(indexOfRemovedExecution);
       
   542     HandleItemRemovalL();
       
   543 
       
   544     }
       
   545 
       
   546 // ---------------------------------------------------------
       
   547 // CShowStartedCasesContainer::RemoveAllExecutionsInViewL
       
   548 // 
       
   549 // Removes all started test cases from list box.
       
   550 // ---------------------------------------------------------
       
   551 //
       
   552 void CShowStartedCasesContainer::RemoveAllExecutionsInViewL()
       
   553     {
       
   554     TInt exutionsInViewCount = iStartedTestsPtrs.Count();
       
   555     iStartedTestsPtrs.Reset(); //Empties the array, does not delete the objects whose pointers are contained in the array
       
   556     HandleItemRemovalL();
       
   557 
       
   558     }
       
   559 
       
   560 // ----------------------------------------------------------------------------
       
   561 // CContainer::FilterCasesByModuleL
       
   562 // 
       
   563 // Show only testcases which are defined is specified module.
       
   564 // ----------------------------------------------------------------------------
       
   565 //
       
   566 void CShowStartedCasesContainer::FilterCasesByModuleL(TName aModuleName)
       
   567     {
       
   568     //First the list box model have to be reconstructed to make sure that all
       
   569     //possible earlier filtering does not affect
       
   570     ConstructListBoxModelL();
       
   571     
       
   572     TInt i;
       
   573     const TInt KCurrentShowedCaseCount = iStartedTestsPtrs.Count();
       
   574 
       
   575     for ( i = KCurrentShowedCaseCount-1; i >= 0; i-- )
       
   576         {
       
   577         RRefArray<CStartedTestCase> startedTestCases;
       
   578         TInt ret = iUIStore->StartedTestCases( startedTestCases );
       
   579         if( ret != KErrNone )
       
   580             {
       
   581             startedTestCases.Reset();
       
   582             startedTestCases.Close();
       
   583             }
       
   584         if ( startedTestCases[i].TestInfo().ModuleName() != aModuleName )
       
   585             {
       
   586             iStartedTestsPtrs.Remove(i); // delete pointer to CStartedTestCase
       
   587             }
       
   588         startedTestCases.Reset();
       
   589         startedTestCases.Close();
       
   590         }
       
   591     }
       
   592 
       
   593 // ----------------------------------------------------------------------------
       
   594 // CContainer::FilterCasesByTCFileNameL
       
   595 // 
       
   596 // Show only testcases which are defined is specified test case file.
       
   597 // ----------------------------------------------------------------------------
       
   598 //
       
   599 void CShowStartedCasesContainer::FilterCasesByTCFileNameL(TFileName aTestCaseFileName)
       
   600     {
       
   601 
       
   602     //First the list box model have to be reconstructed to make sure that all
       
   603     //possible earlier filtering does not affect
       
   604     ConstructListBoxModelL();
       
   605 
       
   606     const TInt KCurrentShowedCaseCount = iStartedTestsPtrs.Count();
       
   607 
       
   608     for ( TInt i = KCurrentShowedCaseCount-1; i >= 0; i-- )
       
   609         {
       
   610         RRefArray<CStartedTestCase> startedTestCases;
       
   611         TInt ret = iUIStore->StartedTestCases( startedTestCases );
       
   612         if( ret != KErrNone )
       
   613             {
       
   614             startedTestCases.Reset();
       
   615             startedTestCases.Close();
       
   616             }
       
   617         if ( startedTestCases[i].TestInfo().TestCaseFile() != aTestCaseFileName )
       
   618             {
       
   619             iStartedTestsPtrs.Remove(i); // delete pointer to CStartedTestCase
       
   620             }
       
   621         startedTestCases.Reset();
       
   622         startedTestCases.Close();
       
   623         }
       
   624     }
       
   625 
       
   626 // ----------------------------------------------------------------------------
       
   627 // CContainer::NoFilteringL
       
   628 // 
       
   629 // Remove possible filtering of test cases -> show all test cases.
       
   630 // ----------------------------------------------------------------------------
       
   631 //
       
   632 void CShowStartedCasesContainer::NoFilteringL()
       
   633     {
       
   634     ConstructListBoxModelL();
       
   635     }
       
   636 
       
   637 // ----------------------------------------------------------------------------
       
   638 // CShowStartedCasesContainer:::SaveActiveLine
       
   639 //
       
   640 // Makes the iListBox member save its focus position
       
   641 // ----------------------------------------------------------------------------
       
   642 //
       
   643 void CShowStartedCasesContainer::SaveActiveLine()
       
   644 	{
       
   645 	((CMenuListBox*)iListBox)->SaveFocusPosition();
       
   646 	}
       
   647 
       
   648 // End of File