stifui/stifui/inc/TestSetMenuContainer.h
changeset 0 d6fe6244b863
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 CTestSetMenuContainer class 
       
    15 * declaration.
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef TestSetMenuContainer_H
       
    20 #define TestSetMenuContainer_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <coecntrl.h>
       
    24 #include <eiklbo.h>     // MEikListBoxObserver
       
    25 #include <bamdesca.h>   // MDesCArray
       
    26 #include <aknsfld.h>
       
    27 
       
    28 //#include "RRefArray.h"        
       
    29 //#include "UIEngine.h"         
       
    30 //#include "UIStoreIf.h"        
       
    31 //#include "UIStoreContainer.h" 
       
    32 
       
    33 #include <stifinternal/RRefArray.h>
       
    34 #include <stifinternal/UIEngine.h>
       
    35 #include <stifinternal/UIStoreIf.h>
       
    36 #include <stifinternal/UIStoreContainer.h>
       
    37    
       
    38 // FORWARD DECLARATIONS
       
    39 class CEikTextListBox;
       
    40 class CDesC16Array;
       
    41 
       
    42 class CTestSetMenuView;
       
    43 class CEikColumnListBox;
       
    44 class CTestCaseListBoxModel;
       
    45 
       
    46 class CUIStoreHandler;
       
    47 class CUIStore;
       
    48 class CUIStoreIf;
       
    49 class CUIEngineContainer;
       
    50 class CUIEngine;
       
    51 
       
    52 // CLASS DECLARATION
       
    53 /**
       
    54 *  CTestSetMenuContainer  container control class.
       
    55 *  
       
    56 */
       
    57 class CTestSetMenuContainer : public CCoeControl /*, MEikListBoxObserver */ /* MCoeControlObserver */
       
    58     {
       
    59     public: // Constructors and destructor
       
    60         
       
    61         /**
       
    62         * Symbian OS default constructor.
       
    63         * @param aRect Frame rectangle for container.
       
    64         */
       
    65         void ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver);
       
    66 
       
    67         /**
       
    68         * Destructor.
       
    69         */
       
    70         ~CTestSetMenuContainer();
       
    71 
       
    72     public: // New functions
       
    73         /**
       
    74         * Show only testcases which are defined is specified module.
       
    75         * @param aModuleName Module which test cases are shown.
       
    76         */
       
    77         void FilterCasesByModuleL(TName aModuleName);
       
    78         
       
    79         /**
       
    80         * Show only testcases which are defined in specified test case file.
       
    81         * @param aTestCaseFileName Test cases file name.
       
    82         */
       
    83         void FilterCasesByTCFileNameL(TFileName aTestCaseFileName);
       
    84         
       
    85         /**
       
    86         * Remove possible filtering of test cases -> show all test cases.
       
    87         */
       
    88         void NoFilteringL();
       
    89         
       
    90         /**
       
    91         * Returns pointers to selected test cases.
       
    92         * @param aSelectedTestCases Currently selected test case.
       
    93         */
       
    94         void SelectedTestCases(RPointerArray<CTestInfo>& aSelectedTestCases);
       
    95 
       
    96         /**
       
    97         * Sets graphic icon using listbox as CEikColumnListBox.
       
    98         * @param aListBox Pointer to list box.
       
    99         */
       
   100         void SetGraphicIconL( CEikColumnListBox* aListBox );
       
   101 
       
   102         /**
       
   103         * Appends graphics data.
       
   104         * @param aIcons Pointer array of icons.
       
   105         */
       
   106         void GraphicIconL( CArrayPtr<CGulIcon>* aIcons );
       
   107         
       
   108         /**
       
   109         * Gets the index number of the current item in the view.
       
   110         * @return Index number of the current item.
       
   111         */
       
   112         TInt CurrentItemIndex();
       
   113         
       
   114         /**
       
   115         * Sets the current item.
       
   116         * @param aIndex Index of the item to make current.
       
   117         */
       
   118         void SetCurrentItemIndex(TInt aCurrentTestCase);
       
   119 		
       
   120 		/**
       
   121 		* Inline function for getting pointer to list box.
       
   122 		* @return Pointer to list box.
       
   123 		*/
       
   124 		inline CEikListBox* ListBox() { return (CEikListBox*)iListBox; };
       
   125 		
       
   126 		/**
       
   127 		* Processes user commands.
       
   128 		* @param aCommand ID of the command to respond to.
       
   129 		*/
       
   130 		void ProcessCommandL( TInt  aCommand );
       
   131 		
       
   132 		/**
       
   133 		* Processes user commands.
       
   134 		* @param aCommand ID of the command to respond to.
       
   135 		*/
       
   136 		void SelectionListProcessCommandL( TInt  aCommand );
       
   137 		
       
   138 		/**
       
   139 		* Handles mark commands.
       
   140 		* @param aCommand ID of the command to respond to.
       
   141 		*/
       
   142 		void HandleMarkCommandL( TInt aCommand );
       
   143         
       
   144         /**
       
   145 		* Removes items from list box.
       
   146 		* @param aSelected Indexes of removed items.
       
   147 		*/
       
   148 		void RemoveListBoxItemL( TInt aSelected );
       
   149 		
       
   150         /**
       
   151          * Stores current position of focus of iListBox to the CAppUiAppUi object
       
   152          */
       
   153 		void SaveActiveLine();
       
   154 		
       
   155     public: // Functions from base classes
       
   156 
       
   157     private: // Functions from base classes
       
   158 
       
   159         /**
       
   160         * From CoeControl,SizeChanged.
       
   161         * Called by framework when the view size is changed.
       
   162         */
       
   163         void SizeChanged();
       
   164 
       
   165         /**
       
   166         * From CoeControl,CountComponentControls.
       
   167         * Gets a count of the component controls of this list box control.
       
   168         * This information is used for DrawNow().
       
   169         */
       
   170         TInt CountComponentControls() const;
       
   171 
       
   172         /**
       
   173         * From CCoeControl,ComponentControl.
       
   174         * Gets a pointer to the specified component control.
       
   175         * @param aIndex Index of the component control to look up.
       
   176         * @return The control at aIndex.
       
   177         */
       
   178         CCoeControl* ComponentControl(TInt aIndex) const;
       
   179 
       
   180         /**
       
   181         * From CCoeControl,Draw.
       
   182         * Draw a control, called by window server.
       
   183         * @param aRect The region of the control to be redrawn. Co-ordinates
       
   184         *              are relative to the control's origin (top left corner).
       
   185         */
       
   186         void Draw(const TRect& aRect) const;
       
   187         
       
   188         /**
       
   189         * From CCoeControl,OfferKeyEventL
       
   190         * Handles key events.
       
   191         * @param aKeyEvent The key event.
       
   192         * @param aType The type of key event.
       
   193         * @return Indicates whether or not the key event was used 
       
   194         *         by this control.
       
   195         */
       
   196 		TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
       
   197         
       
   198     private: //data
       
   199         
       
   200         CTestSetMenuView*           iParentView;
       
   201         CEikColumnListBox*          iListBox;
       
   202         CTestCaseListBoxModel*      iListBoxModel;
       
   203         RPointerArray<CTestInfo>    iTestCasesInView;
       
   204         CUIStore*                   iUIStore;
       
   205     };
       
   206 
       
   207 #endif // CTestSetMenuContainer_H
       
   208 
       
   209 // End of File