00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef CAKNFILESELECTIONDIALOG_H
00022 #define CAKNFILESELECTIONDIALOG_H
00023
00024
00025 #include <CAknCommonDialogsBase.h>
00026
00027
00028 class CAknFileSelectionModel;
00029 class CAknFileSelectionEventHandler;
00030 class MAknFileSelectionObserver;
00031 class MAknFileFilter;
00032
00033
00040 NONSHARABLE_CLASS(CAknFileSelectionDialog) : public CAknCommonDialogsBase
00041 {
00042 public:
00048 IMPORT_C static CAknFileSelectionDialog* NewL(
00049 TCommonDialogType aDialogType );
00050
00057 IMPORT_C static CAknFileSelectionDialog* NewL(
00058 TCommonDialogType aDialogType, TInt aResourceId );
00059
00060 IMPORT_C ~CAknFileSelectionDialog();
00061
00062 public:
00063
00068 IMPORT_C void SetObserver( MAknFileSelectionObserver* aObserver );
00069
00075 IMPORT_C void AddFilterL( MAknFileFilter* aFilter );
00076
00083 IMPORT_C void SetDefaultFolderL( const TDesC& aDefaultFolder );
00084
00089 IMPORT_C void SetTitleL( const TDesC& aText );
00090
00095 IMPORT_C void SetLeftSoftkeyFileL( const TDesC& aText );
00096
00101 IMPORT_C void SetLeftSoftkeyFolderL( const TDesC& aText );
00102
00107 IMPORT_C void SetRightSoftkeyRootFolderL( const TDesC& aText );
00108
00113 IMPORT_C void SetRightSoftkeySubfolderL( const TDesC& aText );
00114
00123 IMPORT_C TBool ExecuteL( TDes& aFileName );
00124
00129 IMPORT_C static TBool RunDlgLD( TDes& aFileName,
00130 const TDesC& aDefaultFolder,
00131 MAknFileSelectionObserver* aObserver = NULL );
00132
00137 IMPORT_C static TBool RunDlgLD( TDes& aFileName,
00138 const TDesC& aDefaultFolder,
00139 const TDesC& aTitle,
00140 MAknFileSelectionObserver* aObserver = NULL );
00141
00146 IMPORT_C static TBool RunDlgLD( TDes& aFileName,
00147 const TDesC& aDefaultFolder,
00148 TInt aResourceId,
00149 MAknFileSelectionObserver* aObserver = NULL );
00150
00151 private:
00152
00172 static TBool RunL(
00173 TInt aResourceId,
00174 TDes& aFileName,
00175 const TDesC& aDefaultFolder,
00176 const TDesC& aTitle,
00177 MAknFileSelectionObserver* aObserver );
00178
00187 TBool PrepareL( const TDesC& aFileName );
00188
00194 void SetResourceId( TInt& aResourceId, TCommonDialogType aType ) const;
00195
00200 void ReadFromResourceL( TInt aResourceId );
00201
00202 private:
00203
00204 CAknFileSelectionDialog( TCommonDialogType aDialogType );
00205
00210 void ConstructFromResourceL( TInt aResourceId );
00211
00212 private:
00213
00214
00215 TCommonDialogType iDialogType;
00216
00217
00218 CAknFileSelectionModel* iModel;
00219
00220
00221 CAknFileSelectionEventHandler* iEventHandler;
00222
00223
00224 MAknFileSelectionObserver* iObserver;
00225
00226
00227 HBufC* iTitle;
00228
00229
00230 HBufC* iLeftSoftkeyFile;
00231
00232
00233 HBufC* iLeftSoftkeyFolder;
00234
00235
00236 HBufC* iRightSoftkeyRootFolder;
00237
00238
00239 HBufC* iRightSoftkeySubfolder;
00240
00241
00242 HBufC* iRootPath;
00243
00244
00245 HBufC* iDefaultFolder;
00246
00247
00248 TBool iExecuted;
00249 };
00250
00251
00252 #endif
00253
00254