CAknMultiLineDataQueryDialog Class Reference

API published in: S60 1st Ed

Link against: avkon.lib

Capability Information

Required Capabilities

None


#include <aknquerydialog.h>

Inherits CAknQueryDialog.

Inherited by CAknMultiLineIpQueryDialog.


Detailed Description

Query dialog with data input on more than one line (2 lines at the moment).

Object of this class is created by using NewL method and by passing parameters as appropriate.

Attention: When deriving from this class, you must call SetDataL() during second phase construction.

Enumeration for tones. The tone played before the dialog is shown. Application specific tones may be played by casting the application defined Sound ID (SID), to TTone.

Enumeration values:
ENoTone No tone is played.
EConfirmationTone A confirmation tone is played.
EWarningTone A warning tone is played.
EErrorTone An error tone is played.


Public Member Functions

virtual IMPORT_C  ~CAknMultiLineDataQueryDialog ()
  Destructor.
IMPORT_C void  SetPromptL (const TDesC &aFirstPrompt, const TDesC &aSecondPrompt)
  Sets a prompt text for the query.
IMPORT_C void  SetMaxLengthOfFirstEditor (TInt aFirstTextEditorMaxLength)
  Sets a max length for the first editor in a query.
IMPORT_C void  SetMaxLengthOfSecondEditor (TInt aSecondTextEditorMaxLength)
  Sets a max length for the second editor in a query.
IMPORT_C void  HandlePointerEventL (const TPointerEvent &aPointerEvent)
  From CCoeControl.
IMPORT_C  CAknMultiLineDataQueryDialog (TTime *aTime, TTime *aTime2, TDesC *aPrompt=NULL, TDesC *aPrompt2=NULL, const TTone &aTone=ENoTone)
  Constructor.
IMPORT_C  CAknMultiLineDataQueryDialog (TDes *aDataText, TDes *aDataText2, TDesC *aPrompt=NULL, TDesC *aPrompt2=NULL, const TTone &aTone=ENoTone)
  Constructor.
IMPORT_C  CAknMultiLineDataQueryDialog (TDes *aDataText, TTime *aTime, TDesC *aPrompt=NULL, TDesC *aPrompt2=NULL, const TTone &aTone=ENoTone)
  Constructor.
IMPORT_C  CAknMultiLineDataQueryDialog (TDes *aDataText, TInt *aNumber, TDesC *aPrompt=NULL, TDesC *aPrompt2=NULL, const TTone &aTone=ENoTone)
  Constructor.
IMPORT_C  CAknMultiLineDataQueryDialog (TDes *aDataText, TTimeIntervalSeconds *aDuration, TDesC *aPrompt=NULL, TDesC *aPrompt2=NULL, const TTone &aTone=ENoTone)
  Constructor.
IMPORT_C  CAknMultiLineDataQueryDialog (TTime *aTime, TTimeIntervalSeconds *aDuration, TDesC *aPrompt=NULL, TDesC *aPrompt2=NULL, const TTone &aTone=ENoTone)
  Constructor.
IMPORT_C  CAknMultiLineDataQueryDialog (TInt *aNumber, TInt *aNumber2, TDesC *aPrompt=NULL, TDesC *aPrompt2=NULL, const TTone &aTone=ENoTone)
  Constructor.

Static Public Member Functions

static IMPORT_C CAknMultiLineDataQueryDialog NewL (TTime &aTime1, TTime &aTime2, TTone aTone=ENoTone)
  Creates a new instance of a multiline dialog.
static IMPORT_C CAknMultiLineDataQueryDialog NewL (TDes &aText1, TDes &aText2, TTone aTone=ENoTone)
  Creates a new instance of a multiline dialog.
static IMPORT_C CAknMultiLineDataQueryDialog NewL (TDes &aText1, TTime &aTime2, TTone aTone=ENoTone)
  Creates a new instance of a multiline dialog.
static IMPORT_C CAknMultiLineDataQueryDialog NewL (TDes &aText1, TInt &aNum2, TTone aTone=ENoTone)
  Creates a new instance of a multiline dialog.
static IMPORT_C CAknMultiLineDataQueryDialog NewL (TDes &aText1, TTimeIntervalSeconds &aDur2, TTone aTone=ENoTone)
  Creates a new instance of a multiline dialog.
static IMPORT_C CAknMultiLineDataQueryDialog NewL (TTime &aTime1, TTimeIntervalSeconds &aDur2, TTone aTone=ENoTone)
  Creates a new instance of a multiline dialog.
static IMPORT_C CAknMultiLineDataQueryDialog NewL (TInt &aNum1, TInt &aNum2, TTone aTone=ENoTone)
  Creates a new instance of a multiline dialog.
static IMPORT_C CAknMultiLineDataQueryDialog NewL (TPosition &aPos, TTone aTone=ENoTone)
  Creates a new instance of a multiline dialog.

Protected Member Functions

template<class T1, class T2>
void  SetDataL (T1 &aData1, T2 &aData2)
  Sets the query data for the first and the second line.
IMPORT_C  CAknMultiLineDataQueryDialog (const TTone &aTone)
  C++ default constructor.
virtual IMPORT_C TBool  OkToExitL (TInt aButtonId)
  From CEikdialog.
IMPORT_C void  PreLayoutDynInitL ()
  From CEikdialog.
IMPORT_C void  HandleResourceChange (TInt aType)
  From CCoeControl.
IMPORT_C void  UpdateLeftSoftKeyL ()
  If the query text is ok (retrieved form query controls) the left soft key is displayed, otherwise it is hidden.
IMPORT_C void  DoSetPromptL ()
  Sets the prompt inside the query control.
IMPORT_C TBool  NeedToDismissQueryL (const TKeyEvent &aKeyEvent)
  Allows dismissing of queries.
IMPORT_C CAknMultilineQueryControl FirstControl () const
  Access to 1st query control.
IMPORT_C CAknMultilineQueryControl SecondControl () const
  Access to 2nd query control.
IMPORT_C CAknQueryControl QueryControl () const
  Gets a querycontrol.
IMPORT_C CAknPopupHeadingPane QueryHeading () const
  Not implemented.
template<class T>
T &  FirstData (const T &)
  Data access.
template<class T>
T &  SecondData (const T &)
  Data access.
template<class T>
const T &  FirstData (const T &) const
  Data access.
template<class T>
const T &  SecondData (const T &) const
  Data access.
IMPORT_C TPtrC  SecondPrompt () const
  Prompts access for derived classes.

Static Protected Member Functions

template<class T1, class T2>
static CAknMultiLineDataQueryDialog DoNewL (T1 &aData1, T2 &aData2, const TTone &aTone)
  Utility function called by NewL() method - should really be private but it is left here to show to people extending this class what their NewL() method should do.

Protected Attributes

TDes16 *  iText
  Deprecated - use data access template methods instead A text of the first line.
TDes16 *  iSecondText
  Deprecated do not use A text of the secondline.

Constructor & Destructor Documentation

virtual IMPORT_C CAknMultiLineDataQueryDialog::~CAknMultiLineDataQueryDialog  )  [virtual]
 

Destructor.

IMPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog const TTone aTone  )  [protected]
 

C++ default constructor.

Parameters:
aTone  Reference to TTone enumeration.
IMPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog TTime *  aTime,
TTime *  aTime2,
TDesC *  aPrompt = NULL,
TDesC *  aPrompt2 = NULL,
const TTone aTone = ENoTone
 

Constructor.

Parameters:
aTime  First line parameter.
aTime2  Second line parameter.
aPrompt  First prompt value. NULL in default.
aPrompt2  Second prompt value. NULL in default.
aTone  Reference to TTone enum. Default is ENoTone.
IMPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog TDes *  aDataText,
TDes *  aDataText2,
TDesC *  aPrompt = NULL,
TDesC *  aPrompt2 = NULL,
const TTone aTone = ENoTone
 

Constructor.

Parameters:
aDataText  First line parameter.
aDataText2  Second line parameter.
aPrompt  First prompt value. NULL in default.
aPrompt2  Second prompt value. NULL in default.
aTone  Reference to TTone enum. Default is ENoTone.
IMPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog TDes *  aDataText,
TTime *  aTime,
TDesC *  aPrompt = NULL,
TDesC *  aPrompt2 = NULL,
const TTone aTone = ENoTone
 

Constructor.

Parameters:
aDataText  First line parameter.
aTime  Second line parameter.
aPrompt  First prompt value. NULL in default.
aPrompt2  Second prompt value. NULL in default.
aTone  Reference to TTone enum. Default is ENoTone.
IMPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog TDes *  aDataText,
TInt *  aNumber,
TDesC *  aPrompt = NULL,
TDesC *  aPrompt2 = NULL,
const TTone aTone = ENoTone
 

Constructor.

Parameters:
aDataText  First line parameter.
aNumber  Second line parameter.
aPrompt  First prompt value. NULL in default.
aPrompt2  Second prompt value. NULL in default.
aTone  Reference to TTone enum. Default is ENoTone.
IMPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog TDes *  aDataText,
TTimeIntervalSeconds *  aDuration,
TDesC *  aPrompt = NULL,
TDesC *  aPrompt2 = NULL,
const TTone aTone = ENoTone
 

Constructor.

Parameters:
aDataText  First line parameter.
aDuration  Second line parameter.
aPrompt  First prompt value. NULL in default.
aPrompt2  Second prompt value. NULL in default.
aTone  Reference to TTone enum. Default is ENoTone.
IMPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog TTime *  aTime,
TTimeIntervalSeconds *  aDuration,
TDesC *  aPrompt = NULL,
TDesC *  aPrompt2 = NULL,
const TTone aTone = ENoTone
 

Constructor.

Parameters:
aTime  First line parameter.
aDuration  Second line parameter.
aPrompt  First prompt value. NULL in default.
aPrompt2  Second prompt value. NULL in default.
aTone  Reference to TTone enum. Default is ENoTone.
IMPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog TInt *  aNumber,
TInt *  aNumber2,
TDesC *  aPrompt = NULL,
TDesC *  aPrompt2 = NULL,
const TTone aTone = ENoTone
 

Constructor.

Parameters:
aNumber  First line parameter.
aNumber2  Second line parameter.
aPrompt  First prompt value. NULL in default.
aPrompt2  Second prompt value. NULL in default.
aTone  Reference to TTone enum. Default is ENoTone.

Member Function Documentation

template<class T1, class T2>
static CAknMultiLineDataQueryDialog* CAknMultiLineDataQueryDialog::DoNewL T1 &  aData1,
T2 &  aData2,
const TTone aTone
[inline, static, protected]
 

Utility function called by NewL() method - should really be private but it is left here to show to people extending this class what their NewL() method should do.

Creates new instance of the multiline dialog.

Parameters:
aData1  First line parameter.
aData2  Second line parameter.
aTone  Reference to TTone enum.

Reimplemented in CAknMultiLineIpQueryDialog.

IMPORT_C void CAknMultiLineDataQueryDialog::DoSetPromptL  )  [protected, virtual]
 

Sets the prompt inside the query control.

Reimplemented from CAknQueryDialog.

Reimplemented in CAknMultiLineIpQueryDialog.

IMPORT_C CAknMultilineQueryControl* CAknMultiLineDataQueryDialog::FirstControl  )  const [protected]
 

Access to 1st query control.

Returns:
Pointer to the control of the first line.

Reimplemented in CAknMultiLineIpQueryDialog.

template<class T>
const T& CAknMultiLineDataQueryDialog::FirstData const T &   )  const [inline, protected]
 

Data access.

Derived class can use this method to get access to the query data. The query data is a reference stored in TAknQueryData, see aknquerydata.h

The client ultimately owns the data this reference references and so it should never need to call these methods.

Derived class however, might need to set or get the data and hence this method have been provided. The derived class is responsible for choosing the correct type, if not the cast will fail.

template<class T>
T& CAknMultiLineDataQueryDialog::FirstData const T &   )  [inline, protected]
 

Data access.

Derived class can use this method to get access to the query data. The query data is a reference stored in TAknQueryData, see aknquerydata.h

The client ultimately owns the data this reference references and so it should never need to call these methods.

Derived class however, might need to set or get the data and hence this method have been provided. The derived class is responsible for choosing the correct type, if not the cast will fail.

IMPORT_C void CAknMultiLineDataQueryDialog::HandlePointerEventL const TPointerEvent &  aPointerEvent  ) 
 

From CCoeControl.

Handles pointer events.

Parameters:
aPointerEvent  The pointer event.

Reimplemented from CAknQueryDialog.

IMPORT_C void CAknMultiLineDataQueryDialog::HandleResourceChange TInt  aType  )  [protected, virtual]
 

From CCoeControl.

Handles a change to the control's resources. The types of resources handled are those which are shared across the environment, e.g. colours or fonts.

Parameters:
aType  A message UID value. The most common is KEikMessageColorSchemeChange which controls get when the colour scheme is changed. Other examples include: KEikMessageFadeAllWindows, KEikMessageUnfadeWindows, KEikMessageZoomChange, KEikMessageVirtualCursorStateChange, KEikMessageCapsLock, KEikMessagePrepareForSave.

Reimplemented from CEikDialog.

Reimplemented in CAknMultiLineIpQueryDialog.

IMPORT_C TBool CAknMultiLineDataQueryDialog::NeedToDismissQueryL const TKeyEvent &  aKeyEvent  )  [protected, virtual]
 

Allows dismissing of queries.

Same as base class implementation only take into consideration both controls

Reimplemented from CAknQueryDialog.

Reimplemented in CAknMultiLineIpQueryDialog.

static IMPORT_C CAknMultiLineDataQueryDialog* CAknMultiLineDataQueryDialog::NewL TPosition aPos,
TTone  aTone = ENoTone
[static]
 

Creates a new instance of a multiline dialog.

Parameters:
aPos  Position parameter.
aTone  Reference to TTone enumeration. Default is ENoTone.
Returns:
Pointer to multiline dialog object.
static IMPORT_C CAknMultiLineDataQueryDialog* CAknMultiLineDataQueryDialog::NewL TInt &  aNum1,
TInt &  aNum2,
TTone  aTone = ENoTone
[static]
 

Creates a new instance of a multiline dialog.

Parameters:
aNum1  First line parameter.
aNum2  Second line parameter.
aTone  Reference to TTone enumeration. Default is ENoTone.
Returns:
Pointer to multiline dialog object.
static IMPORT_C CAknMultiLineDataQueryDialog* CAknMultiLineDataQueryDialog::NewL TTime &  aTime1,
TTimeIntervalSeconds &  aDur2,
TTone  aTone = ENoTone
[static]
 

Creates a new instance of a multiline dialog.

Parameters:
aTime1  First line parameter.
aDur2  Second line parameter.
aTone  Reference to TTone enumeration. Default is ENoTone.
Returns:
Pointer to a multiline dialog object.
static IMPORT_C CAknMultiLineDataQueryDialog* CAknMultiLineDataQueryDialog::NewL TDes &  aText1,
TTimeIntervalSeconds &  aDur2,
TTone  aTone = ENoTone
[static]
 

Creates a new instance of a multiline dialog.

Parameters:
aText1  First line parameter.
aDur2  Second line parameter.
aTone  Reference to TTone enumeration. Default is ENoTone.
Returns:
Pointer to a multiline dialog object.
static IMPORT_C CAknMultiLineDataQueryDialog* CAknMultiLineDataQueryDialog::NewL TDes &  aText1,
TInt &  aNum2,
TTone  aTone = ENoTone
[static]
 

Creates a new instance of a multiline dialog.

Parameters:
aText1  First line parameter.
aNum2  Second line parameter.
aTone  Reference to TTone enumeration. Default is ENoTone.
Returns:
Pointer to a multiline dialog object.
static IMPORT_C CAknMultiLineDataQueryDialog* CAknMultiLineDataQueryDialog::NewL TDes &  aText1,
TTime &  aTime2,
TTone  aTone = ENoTone
[static]
 

Creates a new instance of a multiline dialog.

Parameters:
aText1  First line parameter.
aTime2  Second line parameter.
aTone  Reference to TTone enumeration. Default is ENoTone.
Returns:
Pointer to a multiline dialog object.
static IMPORT_C CAknMultiLineDataQueryDialog* CAknMultiLineDataQueryDialog::NewL TDes &  aText1,
TDes &  aText2,
TTone  aTone = ENoTone
[static]
 

Creates a new instance of a multiline dialog.

Parameters:
aText1  First line parameter.
aText2  Second line parameter.
aTone  Reference to TTone enumeration. Default is ENoTone.
Returns:
Pointer to a multiline dialog object.
static IMPORT_C CAknMultiLineDataQueryDialog* CAknMultiLineDataQueryDialog::NewL TTime &  aTime1,
TTime &  aTime2,
TTone  aTone = ENoTone
[static]
 

Creates a new instance of a multiline dialog.

Parameters:
aTime1  First line parameter.
aTime2  Second line parameter.
aTone  Reference to TTone enumeration. Default is ENoTone.
Returns:
Pointer to a multiline dialog object.
virtual IMPORT_C TBool CAknMultiLineDataQueryDialog::OkToExitL TInt  aButtonId  )  [protected, virtual]
 

From CEikdialog.

This function is called by the EIKON framework if the user activates a button in the button panel. It is not called if the Cancel button is activated, unless the EEikDialogFlagNotifyEsc flag is set.

Parameters:
aButtonId  The ID of the button that was activated.
Returns:
ETrue if the dialog should exit and EFalse if it should not exit.

Reimplemented from CAknQueryDialog.

Reimplemented in CAknMultiLineIpQueryDialog.

IMPORT_C void CAknMultiLineDataQueryDialog::PreLayoutDynInitL  )  [protected, virtual]
 

From CEikdialog.

This function is called by the EIKON dialog framework just before the dialog is activated, after it has called PreLayoutDynInitL() and the dialog has been sized. Note:

Control values that should not influence the sizing and layout are set using PostLayoutDynInitL().

Reimplemented from CAknQueryDialog.

Reimplemented in CAknMultiLineIpQueryDialog.

IMPORT_C CAknQueryControl* CAknMultiLineDataQueryDialog::QueryControl  )  const [protected, virtual]
 

Gets a querycontrol.

Returns:
Pointer to the control of the first line.

Reimplemented from CAknQueryDialog.

Reimplemented in CAknMultiLineIpQueryDialog.

IMPORT_C CAknPopupHeadingPane* CAknMultiLineDataQueryDialog::QueryHeading  )  const [protected, virtual]
 

Not implemented.

Returns:
NULL.

Reimplemented from CAknQueryDialog.

IMPORT_C CAknMultilineQueryControl* CAknMultiLineDataQueryDialog::SecondControl  )  const [protected]
 

Access to 2nd query control.

Returns:
Pointer to the control of the second line.

Reimplemented in CAknMultiLineIpQueryDialog.

template<class T>
const T& CAknMultiLineDataQueryDialog::SecondData const T &   )  const [inline, protected]
 

Data access.

Derived class can use this method to get access to the query data. The query data is a reference stored in TAknQueryData, see aknquerydata.h

The client ultimately owns the data this reference references and so it should never need to call these methods.

Derived class however, might need to set or get the data and hence this method have been provided. The derived class is responsible for choosing the correct type, if not the cast will fail.

template<class T>
T& CAknMultiLineDataQueryDialog::SecondData const T &   )  [inline, protected]
 

Data access.

Derived class can use this method to get access to the query data. The query data is a reference stored in TAknQueryData, see aknquerydata.h

The client ultimately owns the data this reference references and so it should never need to call these methods.

Derived class however, might need to set or get the data and hence this method have been provided. The derived class is responsible for choosing the correct type, if not the cast will fail.

IMPORT_C TPtrC CAknMultiLineDataQueryDialog::SecondPrompt  )  const [protected]
 

Prompts access for derived classes.

Returns:
Pointer to the data of the second line.

Reimplemented in CAknMultiLineIpQueryDialog.

template<class T1, class T2>
void CAknMultiLineDataQueryDialog::SetDataL T1 &  aData1,
T2 &  aData2
[inline, protected]
 

Sets the query data for the first and the second line.

Must be called by derived classes during second phase construction (NewL() method).

First line data.

Second line data.

Reimplemented in CAknMultiLineIpQueryDialog.

IMPORT_C void CAknMultiLineDataQueryDialog::SetMaxLengthOfFirstEditor TInt  aFirstTextEditorMaxLength  ) 
 

Sets a max length for the first editor in a query.

Parameters:
aFirstTextEditorMaxLength  Max length for editor

Reimplemented in CAknMultiLineIpQueryDialog.

IMPORT_C void CAknMultiLineDataQueryDialog::SetMaxLengthOfSecondEditor TInt  aSecondTextEditorMaxLength  ) 
 

Sets a max length for the second editor in a query.

Parameters:
aSecondTextEditorMaxLength  Max length for editor.

Reimplemented in CAknMultiLineIpQueryDialog.

IMPORT_C void CAknMultiLineDataQueryDialog::SetPromptL const TDesC &  aFirstPrompt,
const TDesC &  aSecondPrompt
 

Sets a prompt text for the query.

This will override the text given in the constructor.

Parameters:
aFirstPrompt  Text for prompt on the first query line.
aSecondPrompt  Text for prompt on the second query line.

Reimplemented in CAknMultiLineIpQueryDialog.

IMPORT_C void CAknMultiLineDataQueryDialog::UpdateLeftSoftKeyL  )  [protected, virtual]
 

If the query text is ok (retrieved form query controls) the left soft key is displayed, otherwise it is hidden.

Reimplemented from CAknQueryDialog.

Reimplemented in CAknMultiLineIpQueryDialog.


Field Documentation

TDes16* CAknMultiLineDataQueryDialog::iSecondText [protected]
 

Deprecated do not use A text of the secondline.

Deprecated:
Use data access template methods instead.
TDes16* CAknMultiLineDataQueryDialog::iText [protected]
 

Deprecated - use data access template methods instead A text of the first line.

Deprecated:
Use data access template methods instead.

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

Copyright © Nokia Corporation 2001-2008
Back to top