uiservicetab/vimpstutils/inc/vimpstutilsdialog.h
branchRCL_3
changeset 28 3104fc151679
parent 27 2b7283837edb
child 29 9a48e301e94b
equal deleted inserted replaced
27:2b7283837edb 28:3104fc151679
     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:  Utils for IMUiServiceTab modules.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef VIMPSTUTILSDIALOG_H
       
    21 #define VIMPSTUTILSDIALOG_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <avkon.rsg> // for R_AVKON_SOFTKEYS_EMPTY
       
    25 #include <aknnotedialog.h>
       
    26 #include <eiklbm.h>
       
    27 
       
    28 // CLASS DECLARATION
       
    29 /**
       
    30  *  This class provides some useful methods to launch different dialogs.
       
    31  *
       
    32  *  @lib vimpstutils.lib
       
    33  *  @since 5.0
       
    34  */
       
    35 class VIMPSTUtilsDialog
       
    36     {
       
    37     
       
    38     public: // Enumerations
       
    39     
       
    40         enum TLeftSoftkey
       
    41             {
       
    42             EDefault = 0,
       
    43             ESend,
       
    44             EOk
       
    45             };
       
    46 
       
    47         enum TInitialSelectionMode
       
    48             {
       
    49             ESelectAll = 0, // Default mode
       
    50             ESelectNone
       
    51             };
       
    52     
       
    53     public: // New functions
       
    54 
       
    55         /**
       
    56          * This method displays note dialogs e.g. confirmation dialog
       
    57          * Note dialog's type is defined in resource file
       
    58          * @param aText Prompt text of dialog
       
    59          * @param aButtonsResourceId tells buttons that are shown with note, default none
       
    60          * @param aTimeout timeout when note showing stops
       
    61          * @return KeyCode (e.g. EAknSoftKeyOk)
       
    62          */
       
    63          IMPORT_C static TInt DisplayNoteDialogL( const TDesC& aText, 
       
    64                 const TInt aButtonsResourceId = R_AVKON_SOFTKEYS_EMPTY,
       
    65                 const CAknNoteDialog::TTimeout& aTimeout = CAknNoteDialog::EShortTimeout );
       
    66 
       
    67         /**
       
    68          * This method displays error notes for corresponding resource Id
       
    69          * @param aText Prompt text of dialog
       
    70          * @param aSoftkeyOk Should there be OK softkey
       
    71          * @return KeyCode
       
    72          */
       
    73         IMPORT_C static TInt DisplayErrorNoteL( const TDesC& aText, 
       
    74         										TBool aSoftkeyOk = EFalse );
       
    75         
       
    76 
       
    77         /**
       
    78          * Displays query dialog with given data
       
    79          * @param aDialogResourceId Dialogs resource id
       
    80          * @param aPrompt Prompt text
       
    81          * @return Dialog dismiss key
       
    82          */
       
    83         IMPORT_C static TInt DisplayQueryDialogL( TInt aDialogResourceId, 
       
    84                 const TDesC& aPrompt = KNullDesC );
       
    85 
       
    86         /**
       
    87 		 * This method displays Text Query Dialog
       
    88 		 * @param aDataText Descriptor where written data is stored
       
    89 		 * @param aTitleResourceId Resource ID of title text
       
    90 		 * @param aDialogResource Resource of dialog
       
    91          * @param aPredictiveInput Enable T9 predictive input (when ETrue)
       
    92          * @param aLeftSoftkeyAlwaysVisible Is LSK always visible, or visible
       
    93          *                                  only when there is text in the editor.
       
    94          * @param aLeftSoftkey Left soft key of dialog.
       
    95          * @param aSelectionMode Initial selection mode in dialog editor.
       
    96          * @param aDomainSelectionQuery Is domain selection variated on or not,
       
    97          *                              ETrue causes dialog to exit when editor field
       
    98          *                              is cleared by user.
       
    99 		 * @return KeyCode (e.g. EAknSoftKeyOk)
       
   100 		 */
       
   101 		IMPORT_C static TInt DisplayTextQueryDialogL( TDes& aDataText, 
       
   102 											 const TInt aTitleResourceId, 
       
   103 											 const TInt aDialogResourceId,
       
   104                                              TBool aPredictiveInput = EFalse,
       
   105                                              TBool aLeftSoftkeyAlwaysVisible = EFalse,
       
   106                                              TLeftSoftkey aLeftSoftkey = EDefault,
       
   107                                              TInitialSelectionMode aSelectionMode = ESelectAll,
       
   108                                              TBool aDomainSelectionQuery = EFalse );
       
   109         /**
       
   110          * This method displays singleselection List Query Dialog
       
   111          * NOTE that it is the responsibility of the caller to use
       
   112          * cleanupstack for aItemList (ownership is NOT transferred to the
       
   113          * list box).
       
   114          * @param aSelectedIndex Index of selected item
       
   115          * @param aItemList List of Items (Must be formatted)
       
   116          * @param aDialogResourceId Resource ID of dialog
       
   117          * @param aAlternativeTitle Alternative title text
       
   118          * @param aListEmptyText Text to be shown if the list is empty
       
   119          * @param aIsForwardQuery The dialog is for forwarding the message (ETrue)
       
   120          * @return KeyCode (e.g. EAknSoftKeyOk)
       
   121          */
       
   122         IMPORT_C static TInt DisplayListQueryDialogL( TInt* aSelectedIndex,
       
   123                 MDesCArray* aItemList,
       
   124                 const TInt aDialogResourceId,
       
   125                 const TDesC& aAlternativeTitle = KNullDesC,
       
   126                 const TDesC& aListEmptyText = KNullDesC,
       
   127                 const TBool aIsForwardQuery = EFalse,
       
   128                 const TBool aIsOnlySelect = EFalse  );
       
   129                                              
       
   130     };
       
   131 
       
   132 #endif      // VIMPSTUTILSDIALOG_H   
       
   133 
       
   134 // End of File