filemanager/View/inc/Cfilemanagerfoldernamequerydlg.h
branchRCL_3
changeset 21 65326cf895ed
parent 0 6a9f87576119
equal deleted inserted replaced
20:491b3ed49290 21:65326cf895ed
       
     1 /*
       
     2 * Copyright (c) 2002-2006 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:  Dialog for asking folder name from user
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CFILEMANAGERFOLDERNAMEQUERYDLG_H
       
    21 #define CFILEMANAGERFOLDERNAMEQUERYDLG_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <AknQueryDialog.h>     // CAknTextQueryDialog
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CFileManagerEngine;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 /**
       
    31  *  Dialog for querying folder names in File Manager
       
    32  *
       
    33  *  @lib FileManagerView.lib
       
    34  *  @since S60 2.0
       
    35  */
       
    36 NONSHARABLE_CLASS(CFileManagerFolderNameQueryDlg) : public CAknTextQueryDialog
       
    37     {
       
    38     public:  // Constructors and destructor
       
    39 
       
    40         /**
       
    41          * Two-phased constructor.
       
    42          * @param aDataText Old folder name, this will be the default
       
    43          * @param aEngine Reference to File Manager engine.
       
    44          * @param aNameGeneration ETrue if name generation will be used,
       
    45          *                        EFalse otherwise.
       
    46          * @return Newly created query dialog.
       
    47          */
       
    48         static CFileManagerFolderNameQueryDlg* NewL(
       
    49             TDes& aDataText,
       
    50             CFileManagerEngine& aEngine,
       
    51             TBool aNameGeneration );
       
    52 
       
    53         /**
       
    54         * Destructor.
       
    55         */
       
    56         ~CFileManagerFolderNameQueryDlg();
       
    57 
       
    58     private: // from CAknTextQueryDialog
       
    59         /**
       
    60          * @see CAknTextQueryDialog
       
    61          */
       
    62         TBool OkToExitL( TInt aButtonId );
       
    63         
       
    64         /**
       
    65          * @see CAknTextQueryDialog
       
    66          */
       
    67         TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType );
       
    68 
       
    69     private:
       
    70         /**
       
    71          * C++ default constructor.
       
    72          */
       
    73         CFileManagerFolderNameQueryDlg( TDes& aDataText, CFileManagerEngine& aEngine );
       
    74 
       
    75         /**
       
    76          * Symbian OS 2nd phase constructor.
       
    77          * @param aNameGeneration ETrue if name generation will be used,
       
    78          *                        EFalse otherwise.
       
    79          */
       
    80         void ConstructL( TBool aNameGeneration, TDes& aDataText );
       
    81 
       
    82         /**
       
    83          * Performs exit checking
       
    84          * @param aButtonId Button identifier
       
    85          */
       
    86         TBool DoOkToExitL( TInt aButtonId );
       
    87 
       
    88     private:    // Data
       
    89         /// Ref: Reference to File Manager engine.
       
    90         CFileManagerEngine& iEngine;
       
    91         /// Own: Old folder name
       
    92         HBufC* iOldName;
       
    93         /// For blocking unwanted softkey events
       
    94         TBool iCallbackDisabled;
       
    95     };
       
    96 
       
    97 #endif      // CFILEMANAGERFOLDERNAMEQUERYDLG_H
       
    98             
       
    99 // End of File