uiservicetab/vimpstui/inc/cvimpstuisearchquerydialog.h
branchRCL_3
changeset 29 9a48e301e94b
parent 0 5e5d6b214f4f
equal deleted inserted replaced
28:3104fc151679 29:9a48e301e94b
       
     1 /*
       
     2 * Copyright (c) 2008 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:  search fields editor class declaration 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CVIMPSTUISEARCHQUERYDIALOG_H
       
    20 #define CVIMPSTUISEARCHQUERYDIALOG_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <AknForm.h>
       
    24 #include <babitflags.h>
       
    25 
       
    26 #include "mvimpstsearchuibuilder.h"
       
    27 #include "cvimpstuisearchfieldaray.h"
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 
       
    31 class CAknTitlePane;
       
    32 class CVIMPSTUiSearchFieldArray;
       
    33 class CAknNavigationControlContainer;
       
    34 class MVIMPSTSearchUiBuilder;
       
    35 class CAknTitlePane;
       
    36 
       
    37 // CLASS DECLARATION
       
    38 /**
       
    39  * search dialog implementation.
       
    40  *  @lib vimpstui.lib
       
    41  *  @since S60 v5.0
       
    42  */
       
    43 class CVIMPSTUiSearchQueryDialog : public CAknForm,
       
    44 								   public MVIMPSTSearchUiBuilder
       
    45     {
       
    46     public: // Constructors and destructor
       
    47 
       
    48         /**
       
    49          * Creates a new instance of this class.
       
    50          * @param aUiFieldArray, reference to field array class 
       
    51          * @return  A new instance of this class.
       
    52          */
       
    53         static CVIMPSTUiSearchQueryDialog* NewL( CVIMPSTUiSearchFieldArray& aUiFieldArray );
       
    54 
       
    55         /**
       
    56          * Destructor.
       
    57          */
       
    58         virtual ~CVIMPSTUiSearchQueryDialog();
       
    59 
       
    60     public: // Interface
       
    61 
       
    62         /**
       
    63          * Executes the dialog.
       
    64          */
       
    65         void ExecuteLD();
       
    66 
       
    67     public: // From CAknForm
       
    68     
       
    69     	/**
       
    70          * see @ base class CAknForm
       
    71          */
       
    72         void PreLayoutDynInitL();
       
    73         
       
    74         /**
       
    75          * see @ base class CAknForm
       
    76          */
       
    77         void PostLayoutDynInitL();
       
    78         
       
    79         /**
       
    80          * see @ base class CAknForm
       
    81          */
       
    82         void SetInitialCurrentLineL();
       
    83         
       
    84         /**
       
    85          * see @ base class CAknForm
       
    86          */           
       
    87         TBool OkToExitL(TInt aKeycode );
       
    88         
       
    89         /**
       
    90          * see @ base class CAknForm
       
    91          */  
       
    92         TKeyResponse OfferKeyEventL ( const TKeyEvent& aKeyEvent, TEventCode aType );
       
    93       
       
    94 	
       
    95 	public: // From MVIMPSTSearchUiBuilder
       
    96 	
       
    97 		/**
       
    98          * see @ base class MVIMPSTSearchUiBuilder
       
    99          * @param aCaption, caption of field line 
       
   100 		 * @param aControlId, control id  
       
   101 	  	 * @param aControlType, control type 
       
   102          * @return  A new instance of CCoeControl.
       
   103          */
       
   104         CCoeControl* CreateLineL(
       
   105                 		const TDesC& aCaption,
       
   106                 		TInt aControlId,
       
   107                 		TInt aControlType );
       
   108                 		
       
   109         /**
       
   110          * see @ base class MVIMPSTSearchUiBuilder
       
   111          * @param aControlId, control id  
       
   112          * @return  A new instance of CEikCaptionedControl.
       
   113          */             
       
   114         CEikCaptionedControl* LineControl(
       
   115                			 TInt aControlId ) const;
       
   116        
       
   117         /**
       
   118          * see @ base class MVIMPSTSearchUiBuilder
       
   119          * @param aControlId, control id  
       
   120          */
       
   121         void TryChangeFocusL(TInt aControlId );
       
   122           
       
   123          /**
       
   124           * see @ base class MVIMPSTSearchUiBuilder
       
   125           * @param aText, caption text  
       
   126           */      
       
   127         void SetCurrentLineCaptionL( const TDesC& aText );
       
   128         
       
   129         /**
       
   130          * see @ base class MVIMPSTSearchUiBuilder
       
   131          * @param aControlId, control id  
       
   132          */
       
   133         CCoeControl* Control( TInt aControlId ) const;
       
   134         
       
   135         /**
       
   136          * see @ base class MVIMPSTSearchUiBuilder
       
   137          * @param aState, ETrue or EFalse  
       
   138          */
       
   139         void SetEditableL( TBool aState );
       
   140         
       
   141         /**
       
   142          * see @ base class MVIMPSTSearchUiBuilder
       
   143          * @param aControlId, control id
       
   144          * @param aDimmed, ETrue if hide or EFalse   
       
   145          */
       
   146         void SetLineDimmed( TInt aControlId , TBool aDimmed ) ;
       
   147                 
       
   148 
       
   149     public: // new implementation 
       
   150         
       
   151         /**
       
   152          * AreAllControlsEmptyL check the all control text are empty 
       
   153          * @return ETrue if empty else EFalse
       
   154          */ 
       
   155         TBool AreAllControlsEmptyL() const;
       
   156         
       
   157         /**
       
   158          *IsEndKeyPressed check to find if End Key was pressed
       
   159          * @return ETrue if End Key Pressed
       
   160          */
       
   161         TBool IsEndKeyPressed();
       
   162       
       
   163 
       
   164     private: // new Implementation
       
   165     	
       
   166     	/**
       
   167          * constructor 
       
   168          * @param aUiFieldArray, reference to ui fields array
       
   169          */ 
       
   170         CVIMPSTUiSearchQueryDialog(CVIMPSTUiSearchFieldArray& aUiFieldArray);
       
   171         
       
   172         /**
       
   173          * ConstructL 
       
   174          */ 
       
   175         void ConstructL();
       
   176         
       
   177         /**
       
   178          * Construct the  context menu 
       
   179          */    
       
   180         void ConstructContextMenuL();
       
   181         
       
   182         /**
       
   183          * Construct the navi pane for dialog
       
   184          */ 
       
   185         void ConstructNaviPaneL();
       
   186         
       
   187         /**
       
   188          * call to update the title pane
       
   189          */ 
       
   190         void UpdateTitleL();
       
   191         
       
   192         /**
       
   193          * ok or done has been press
       
   194          * perform the saving operation
       
   195          */            
       
   196         void CmdDoneL( );
       
   197         
       
   198         /**
       
   199          * StoreTitlePaneTextL, 
       
   200          * store the previous title text
       
   201          */   
       
   202         inline void StoreTitlePaneTextL();
       
   203         
       
   204         /**
       
   205          * UpdateCbasL, 
       
   206          * to update the rsk, lsk
       
   207          */   
       
   208         void UpdateCbasL();
       
   209         
       
   210          /**
       
   211           * show ui fields into form, 
       
   212           */  
       
   213         void ShowSearchUiFieldsL();
       
   214         
       
   215         /**
       
   216          * check if basic field are supported or not
       
   217          * @retrun ETrue if Supported else EFalse
       
   218          */
       
   219         TBool IsBasicFieldAvailableL();
       
   220         
       
   221         /**
       
   222          * set the cba with resource
       
   223          * @param aResourceId , resource to use
       
   224          */
       
   225         void SetCbaCommandSetL( TInt aResourceId ) ;
       
   226       
       
   227     private: // Data
       
   228         
       
   229         // not Own: Manages dialog fields
       
   230         CVIMPSTUiSearchFieldArray& iUiFieldArray;
       
   231        
       
   232         // own : last cba resource set
       
   233         TInt iCbaCommandSet;
       
   234         
       
   235         // Own: Title pane text to restore on exit
       
   236         HBufC* iStoredTitlePaneText;
       
   237       	
       
   238       	// owns : search field type
       
   239       	TIMPSTSearchFieldTypes iSearchType;
       
   240                
       
   241         // Own: Context menu bar
       
   242         CEikMenuBar* iContextMenuBar;
       
   243        
       
   244         // Ref: Status pane handle
       
   245         CAknNavigationControlContainer* iNaviContainer;
       
   246                
       
   247         // Ref: Application's title pane
       
   248         CAknTitlePane* iTitlePane;
       
   249         
       
   250         //own: Is End Key Pressed
       
   251         TBool isEndKeyPressed;
       
   252         
       
   253     };
       
   254 
       
   255 #endif // CVIMPSTUISEARCHQUERYDIALOG_H
       
   256 
       
   257 // End of File
       
   258