caknfilenamepromptdialog.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : CAknFileNamePromptDialog.h
00004 *  Part of     : Common File Dialogs / CommonDialogs.dll
00005 *  Interface   : ?Interface_category, ?Interface_name
00006 *  Description : ?Description
00007 *  Version     : ?Version
00008 *
00009 *  Copyright (c) 2002-2006 Nokia Corporation.
00010 *  This material, including documentation and any related
00011 *  computer programs, is protected by copyright controlled by
00012 *  Nokia Corporation. All rights are reserved. Copying,
00013 *  including reproducing, storing, adapting or translating, any
00014 *  or all of this material requires the prior written consent of
00015 *  Nokia Corporation. This material also contains confidential
00016 *  information which may not be disclosed to others without the
00017 *  prior written consent of Nokia Corporation.
00018 * ==============================================================================
00019 */
00020 
00021 #ifndef CAKNFILENAMEPROMPTDIALOG_H
00022 #define CAKNFILENAMEPROMPTDIALOG_H
00023 
00024 // INCLUDES
00025 #include <CAknCommonDialogsBase.h>
00026 
00027 // FORWARD DECLARATIONS
00028 class MAknFileSelectionObserver;
00029 
00030 //  CLASS DEFINITION
00037 NONSHARABLE_CLASS(CAknFileNamePromptDialog) : public CAknCommonDialogsBase
00038     {
00039     public:     // Constructors and destructors
00040 
00046         IMPORT_C static CAknFileNamePromptDialog* NewL();
00047 
00053         IMPORT_C static CAknFileNamePromptDialog* NewL( TInt aResourceId );
00054 
00055         IMPORT_C ~CAknFileNamePromptDialog();
00056 
00057     public:     // New functions
00058 
00063         IMPORT_C void SetPathL( const TDesC& aPath );
00064 
00069         IMPORT_C void SetObserver( MAknFileSelectionObserver* aObserver );
00070 
00075         IMPORT_C void SetTitleL( const TDesC& aText );
00076 
00081         IMPORT_C void SetLeftSoftkeyL( const TDesC& aText );
00082 
00087         IMPORT_C void SetRightSoftkeyL( const TDesC& aText );
00088 
00096         IMPORT_C TBool ExecuteL( TDes& aFileName );
00097 
00102         IMPORT_C static TBool RunDlgLD( TDes& aFileName,
00103             const TDesC& aPath,
00104             MAknFileSelectionObserver* aObserver = NULL );
00105 
00110         IMPORT_C static TBool RunDlgLD( TDes& aFileName,
00111             const TDesC& aPath,
00112             const TDesC& aTitle,
00113             MAknFileSelectionObserver* aObserver = NULL );
00114 
00119         IMPORT_C static TBool RunDlgLD( TDes& aFileName,
00120             const TDesC& aPath,
00121             TInt aResourceId,
00122             MAknFileSelectionObserver* aObserver = NULL );
00123 
00132         IMPORT_C TBool RenameL( TDes& aFileName );
00133     private:    // New functions
00134 
00143         static TBool RunL(
00144             TInt aResourceId,
00145             TDes& aFileName,
00146             const TDesC& aPath,
00147             const TDesC& aTitle,
00148             MAknFileSelectionObserver* aObserver );
00149 
00153         void SetResourceId( TInt& aResourceId ) const;
00154 
00158         void ReadFromResourceL( TInt aResourceId );
00159 
00168         TBool ShowDialogL( TDes& aFilename, TBool aIfRename );
00169     private:    // Constructors and destructors
00170 
00175         void ConstructFromResourceL( TInt aResourceId );
00176 
00177         CAknFileNamePromptDialog();
00178 
00179     protected:  // Data
00180 
00181         // Ref: observer
00182         MAknFileSelectionObserver* iObserver;
00183 
00184         // Own: Descriptor for default filename
00185         HBufC* iDefaultFileName;
00186 
00187         // Own: Descriptor for path
00188         HBufC* iPath;
00189 
00190         // Own: Descriptor for window title
00191         HBufC* iTitle;
00192 
00193         // Own: Descriptor for left softkey
00194         HBufC* iLeftSoftkey;
00195 
00196         // Own: Descriptor for right softkey
00197         HBufC* iRightSoftkey;
00198     };
00199 
00200 // CAKNFILENAMEPROMPTDIALOG_H
00201 #endif
00202 
00203 // End of File

Copyright © Nokia Corporation 2001-2008
Back to top