engines/vmbxengine/inc/vmdialog.h
branchRCL_3
changeset 20 987c9837762f
parent 0 ff3b6d0fd310
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
       
     1 /*
       
     2 * Copyright (c) 2002 - 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:  A text query where empty query can be approved.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef VMDIALOG_H
       
    20 #define VMDIALOG_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <AknQueryDialog.h>
       
    24 
       
    25 // CLASS DECLARATION
       
    26 
       
    27 /**
       
    28 *  Text query dialog
       
    29 *
       
    30 *  @lib vmbx.lib
       
    31 *  @since 
       
    32 */
       
    33 class CVmTextQueryDialog : public CAknTextQueryDialog
       
    34     {
       
    35     public: // Constructors and destructor
       
    36     
       
    37         /**
       
    38         * Two-phased constructor.
       
    39         */
       
    40         static CVmTextQueryDialog* NewL( TDes& aDataText, const TDesC& aPrompt,        
       
    41                                                  const TBool aSearchEnabled );
       
    42                                                  
       
    43         /**
       
    44         * Destructor.
       
    45         */                                                 
       
    46         virtual ~CVmTextQueryDialog();
       
    47 
       
    48     public:// Functions from base classes
       
    49 
       
    50         /**
       
    51         * From CCoeControl Key event handler
       
    52         * @since
       
    53         * @param aKeyEvent The key event
       
    54         * @param aType The type of key event
       
    55         * @return Response of the key event handling
       
    56         */
       
    57         TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
       
    58                                                          TEventCode aType );
       
    59 
       
    60     public:// New method
       
    61 
       
    62         /**
       
    63         * Dissmiss the dialog with EAknSoftkeyCancel
       
    64         * @since 5.0
       
    65         */
       
    66         void DismissQueryDlg();
       
    67 
       
    68     protected: // Functions from base classes
       
    69 
       
    70         /**
       
    71         * From CEikdialog This function is called by the EIKON dialog framework
       
    72         * just before the dialog is activated, after it has called
       
    73         * PreLayoutDynInitL() and the dialog has been sized. 
       
    74         * Overridden method to enable accepting an empty query
       
    75         * @since
       
    76         */  
       
    77         void PreLayoutDynInitL();
       
    78 
       
    79         /**
       
    80         * From MAknQueryControlObserver Gets called when editor sends
       
    81         * state event. Overridden method to enable accepting an empty query
       
    82         * @since
       
    83         * @param aQueryControl  Pointer to query control which sent the event  
       
    84         * @param aEventType  Type of the event  
       
    85         * @param aStatus  Editor validation status
       
    86         * @return ETrue if success
       
    87         */
       
    88         TBool HandleQueryEditorStateEventL( CAknQueryControl* aQueryControl,
       
    89                                             TQueryControlEvent aEventType,
       
    90                                             TQueryValidationStatus aStatus );
       
    91 
       
    92     private:
       
    93     
       
    94         /**
       
    95         * C++ default constructor.
       
    96         */
       
    97         CVmTextQueryDialog( TDes& aDataText, const TBool aSearchEnabled );
       
    98 
       
    99     private:  // Data
       
   100     
       
   101         // Flag to allow search
       
   102         TBool iSearchEnabled;
       
   103     };
       
   104 
       
   105 
       
   106 
       
   107 // CLASS DECLARATION
       
   108 
       
   109 /**
       
   110 *  Query dialog for sim
       
   111 *  added to fix JKAN-6KU5C2
       
   112 *
       
   113 *  @lib vmbx.lib
       
   114 *  @since
       
   115 **/
       
   116 class CVMSimQueryDilaog:public CAknQueryDialog
       
   117     {
       
   118     
       
   119     public:  // Constructors and destructor
       
   120         
       
   121         /**
       
   122         * Two-phased constructor.
       
   123         */
       
   124         static CVMSimQueryDilaog* NewL();                
       
   125         
       
   126         /**
       
   127         * Destructor.
       
   128         */
       
   129         virtual ~CVMSimQueryDilaog();
       
   130 
       
   131     public: // New functions
       
   132                     
       
   133         /**
       
   134         * Sets query caption on the screen asking for confirmation to copy voice
       
   135         * mailbox number from sim. 
       
   136         *
       
   137         * @since 3.0
       
   138         * @param aPrompt query heading to display on dialog.
       
   139         **/
       
   140         void SetVMSimPromptL( const TDesC& aPrompt );
       
   141         
       
   142         /**
       
   143         * Destroys the query dialog.
       
   144         *
       
   145         * @since 3.0
       
   146         **/
       
   147         void VMSimDismissDialogL();
       
   148 
       
   149     private:
       
   150 
       
   151         /**
       
   152         * C++ default constructor.
       
   153         */
       
   154         CVMSimQueryDilaog();
       
   155     
       
   156     };
       
   157 
       
   158 #endif  // VMDIALOG_H
       
   159             
       
   160 // End of File