CAknFileSelectionDialog Class Reference

API published in: S60 2nd Ed

Link against: commondialogs.lib

Capability Information

Required Capabilities

None


#include <caknfileselectiondialog.h>

Inherits CAknCommonDialogsBase.


Detailed Description

A class that launches a popup dialog for file selection or directory browsing.

Public Member Functions

IMPORT_C  ~CAknFileSelectionDialog ()
IMPORT_C void  SetObserver (MAknFileSelectionObserver *aObserver)
  Sets an observer which is asked if the selected item can be selected.
IMPORT_C void  AddFilterL (MAknFileFilter *aFilter)
  Adds a filter to list of filters owned by the engine.
IMPORT_C void  SetDefaultFolderL (const TDesC &aDefaultFolder)
  Sets the default folder that browsing is started from.
IMPORT_C void  SetTitleL (const TDesC &aText)
  Sets title to the pop-up dialog.
IMPORT_C void  SetLeftSoftkeyFileL (const TDesC &aText)
  Sets the text used for left softkey when a file is focused.
IMPORT_C void  SetLeftSoftkeyFolderL (const TDesC &aText)
  Sets the text used for left softkey when a folder is focused.
IMPORT_C void  SetRightSoftkeyRootFolderL (const TDesC &aText)
  Sets the text used for right softkey when user is in the root folder.
IMPORT_C void  SetRightSoftkeySubfolderL (const TDesC &aText)
  Sets the text used for right softkey when user is in a subfolder.
IMPORT_C TBool  ExecuteL (TDes &aFileName)
  Executes the file selection dialog.

Static Public Member Functions

static IMPORT_C CAknFileSelectionDialog NewL (TCommonDialogType aDialogType)
  Static constructor.
static IMPORT_C CAknFileSelectionDialog NewL (TCommonDialogType aDialogType, TInt aResourceId)
  Static constructor.
static IMPORT_C TBool  RunDlgLD (TDes &aFileName, const TDesC &aDefaultFolder, MAknFileSelectionObserver *aObserver=NULL)
  A static method that launches a file selection dialog.
static IMPORT_C TBool  RunDlgLD (TDes &aFileName, const TDesC &aDefaultFolder, const TDesC &aTitle, MAknFileSelectionObserver *aObserver=NULL)
  A static method that launches a file selection dialog.
static IMPORT_C TBool  RunDlgLD (TDes &aFileName, const TDesC &aDefaultFolder, TInt aResourceId, MAknFileSelectionObserver *aObserver=NULL)
  A static method that launches a file selection dialog.

Constructor & Destructor Documentation

IMPORT_C CAknFileSelectionDialog::~CAknFileSelectionDialog  ) 
 

Member Function Documentation

IMPORT_C void CAknFileSelectionDialog::AddFilterL MAknFileFilter aFilter  ) 
 

Adds a filter to list of filters owned by the engine.

Note! The ownership of the filter is transferred to the engine.

Parameters:
aFilter  A pointer to a filter that is derived from MAknFileFilter.
IMPORT_C TBool CAknFileSelectionDialog::ExecuteL TDes &  aFileName  ) 
 

Executes the file selection dialog.

Parameters:
aFileName  Contains the root path. If an item is selected, the selected item will be set to the parameter with full path.
Returns:
Returns ETrue if user has selected an item and EFalse if user hits cancel.
static IMPORT_C CAknFileSelectionDialog* CAknFileSelectionDialog::NewL TCommonDialogType  aDialogType,
TInt  aResourceId
[static]
 

Static constructor.

Parameters:
aDialogType  Type of the dialog for reading correct default values.
aResourceId  A resource id (FILESELECTIONDIALOG).
Returns:
Returns a pointer to an instance of itself.
static IMPORT_C CAknFileSelectionDialog* CAknFileSelectionDialog::NewL TCommonDialogType  aDialogType  )  [static]
 

Static constructor.

Parameters:
aDialogType  Type of the dialog for reading correct default values.
Returns:
Returns a pointer to an instance of itself.
static IMPORT_C TBool CAknFileSelectionDialog::RunDlgLD TDes &  aFileName,
const TDesC &  aDefaultFolder,
TInt  aResourceId,
MAknFileSelectionObserver aObserver = NULL
[static]
 

A static method that launches a file selection dialog.

See also:
RunL()
static IMPORT_C TBool CAknFileSelectionDialog::RunDlgLD TDes &  aFileName,
const TDesC &  aDefaultFolder,
const TDesC &  aTitle,
MAknFileSelectionObserver aObserver = NULL
[static]
 

A static method that launches a file selection dialog.

See also:
RunL()
static IMPORT_C TBool CAknFileSelectionDialog::RunDlgLD TDes &  aFileName,
const TDesC &  aDefaultFolder,
MAknFileSelectionObserver aObserver = NULL
[static]
 

A static method that launches a file selection dialog.

See also:
RunL()
IMPORT_C void CAknFileSelectionDialog::SetDefaultFolderL const TDesC &  aDefaultFolder  ) 
 

Sets the default folder that browsing is started from.

Parameters:
aDefaultFolder  A folder that is relative to the root path, e.g. root path = "C:\" so the default folder could be "Nokia\Images\".
IMPORT_C void CAknFileSelectionDialog::SetLeftSoftkeyFileL const TDesC &  aText  ) 
 

Sets the text used for left softkey when a file is focused.

Parameters:
aText  The text for softkey.
IMPORT_C void CAknFileSelectionDialog::SetLeftSoftkeyFolderL const TDesC &  aText  ) 
 

Sets the text used for left softkey when a folder is focused.

Parameters:
aText  The text for softkey.
IMPORT_C void CAknFileSelectionDialog::SetObserver MAknFileSelectionObserver aObserver  ) 
 

Sets an observer which is asked if the selected item can be selected.

Parameters:
aObserver  A pointer to an observer.
IMPORT_C void CAknFileSelectionDialog::SetRightSoftkeyRootFolderL const TDesC &  aText  ) 
 

Sets the text used for right softkey when user is in the root folder.

Parameters:
aText  The text used for right softkey when user is in the root folder.
IMPORT_C void CAknFileSelectionDialog::SetRightSoftkeySubfolderL const TDesC &  aText  ) 
 

Sets the text used for right softkey when user is in a subfolder.

Parameters:
aText  The text used for right softkey when user is in a subfolder.
IMPORT_C void CAknFileSelectionDialog::SetTitleL const TDesC &  aText  ) 
 

Sets title to the pop-up dialog.

Parameters:
aText  Title text.

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top