aknquerydialog.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name        : AknQueryDialog.h
00004 *  Part of     : UI Framework Core / AVKON
00005 *  Description : Implementation of query dialogs.
00006 *  Version     : %version: tr1s60#22.1.5 %
00007 *
00008 *  Copyright © 2002-2007 Nokia.  All rights reserved.
00009 *  This material, including documentation and any related computer
00010 *  programs, is protected by copyright controlled by Nokia.  All
00011 *  rights are reserved.  Copying, including reproducing, storing,
00012 *  adapting or translating, any or all of this material requires the
00013 *  prior written consent of Nokia.  This material also contains
00014 *  confidential information which may not be disclosed to others
00015 *  without the prior written consent of Nokia.
00016 * ============================================================================
00017 */
00018 
00019 #ifndef AKNQUERYDIALOG_H
00020 #define AKNQUERYDIALOG_H
00021 
00022 //  INCLUDES
00023 #include <eikdialg.h>
00024 #include <aknform.h>
00025 #include <eiklbx.h>
00026 #include <eiktxlbx.h>
00027 #include <eikcmobs.h>
00028 #include <aknpopuplayout.h>
00029 #include <aknintermediate.h>
00030 #include <aknquerycontrol.h>
00031 #include <aknpopuplayout.h>
00032 #include <aknmultilinequerycontrol.h>
00033 #include <aknlistquerycontrol.h>
00034 #include <aknintermediate.h>
00035 #include <aknquerydata.h>
00036 #include <avkon.hrh>
00037 
00038 class CAknKeySoundSystem;
00039 class TInetAddr;
00040 
00041 
00047 class CAknQueryDialog : public CAknDialog , public MAknQueryControlObserver
00048     {
00049     public:
00050 
00058       enum TTone {
00059 
00063         ENoTone = 0,
00064 
00068         EConfirmationTone = EAvkonSIDConfirmationTone,
00069 
00073         EWarningTone = EAvkonSIDWarningTone,
00074 
00078         EErrorTone = EAvkonSIDErrorTone
00079         };
00080 
00081     public:
00082 
00090         IMPORT_C static CAknQueryDialog* NewL(const TTone& aTone = ENoTone);
00091 
00096         IMPORT_C static CAknQueryDialog* NewL(TDes& aText, const TTone& aTone = ENoTone);
00097 
00102         IMPORT_C static CAknQueryDialog* NewL(TInt& aNumber, const TTone& aTone = ENoTone);
00103 
00108         IMPORT_C static CAknQueryDialog* NewL(TTime& aTime, const TTone& aTone = ENoTone);
00109 
00114         IMPORT_C static CAknQueryDialog* NewL(TTimeIntervalSeconds& aTime, const TTone& aTone = ENoTone);
00115 
00120         IMPORT_C static CAknQueryDialog* NewL(TReal& aNumber, const TTone& aTone = ENoTone);
00121 
00126         IMPORT_C static CAknQueryDialog* NewL(TInetAddr& aInetAddr, const TTone& aTone = ENoTone);
00127 
00133         IMPORT_C static CAknQueryDialog* NewL(TPosition &aValue, const TTone &aTone = ENoTone);
00134 
00135     public:
00136         IMPORT_C virtual ~CAknQueryDialog();
00137 
00143         IMPORT_C CAknQueryDialog(const TTone& aTone);
00144 
00145     public:
00146 
00151         IMPORT_C virtual CAknPopupHeadingPane* QueryHeading() const;
00152 
00158         IMPORT_C CAknPopupHeadingPane* Heading() const;
00159 
00165         IMPORT_C void SetPromptL(const TDesC& aPrompt);
00166 
00171         IMPORT_C void MakeLeftSoftkeyVisible(TBool aVisible);
00172 
00182         IMPORT_C void SetEmergencyCallSupport( TBool aOnOff );
00183 
00189         IMPORT_C void RemoveEditorIndicator();
00190 
00201         IMPORT_C void SetPredictiveTextInputPermitted( TBool aPermitted );
00202 
00208         IMPORT_C TInt RunLD();
00209 
00220         IMPORT_C TInt ExecuteLD(TInt aResourceId);
00221 
00228         IMPORT_C TInt ExecuteLD(TInt aResourceId, const TDesC& aPrompt);
00229 
00230     public:// from CCoeControl
00231 
00241         IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
00242 
00246         IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00247 
00248     public:
00249 
00260         IMPORT_C static TInt MaxTextLength(const CAknQueryControl* aControl, const TDes& aDataText, TInt aApiValue) ;
00261 
00262     protected://from CEikdialog
00263 
00271         IMPORT_C void SetSizeAndPosition(const TSize& aSize);
00272 
00278         IMPORT_C void PreLayoutDynInitL(void);
00279 
00285         IMPORT_C void PostLayoutDynInitL();
00286 
00296         IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
00297 
00298     public://from MAknQueryControlObeserver
00299 
00306         IMPORT_C TBool HandleQueryEditorSizeEventL(CAknQueryControl* aQueryControl, TQueryControlEvent aEventType);
00307 
00315         IMPORT_C TBool HandleQueryEditorStateEventL(CAknQueryControl* aQueryControl, TQueryControlEvent aEventType, TQueryValidationStatus aStatus);
00316 
00321         IMPORT_C virtual TBool NeedToDismissQueryL(const TKeyEvent& aKeyEvent);
00322 
00329         IMPORT_C virtual void DismissQueryL();
00330 
00331     protected:
00332 
00337         IMPORT_C virtual void  UpdateLeftSoftKeyL();
00338 
00343         IMPORT_C virtual void DoSetPromptL();
00344 
00349         IMPORT_C virtual CAknQueryControl* QueryControl() const;
00350 
00351     protected: //implementation, intended to be used but not overwritten
00352 
00356         void  PlayTone();
00357 
00361         void  ReportUserActivity() const ;
00362 
00366         void  LayoutAndDraw();
00367 
00372         TInt  GetLeftCBAShortKeyPress();
00373 
00378         TInt  GetRightCBAShortKeyPress();
00379 
00384         TBool IsLeftSoftkeyVisible();
00385 
00386     protected:
00387 
00391         IMPORT_C TPtrC Prompt() const;
00392 
00396         TTone& Tone() { return iTone; }
00397 
00401         const TTone& Tone() const { return iTone; }
00402 
00406         TBitFlags16& Flags() { return iFlags; }
00407 
00411         const TBitFlags16& Flags() const { return iFlags; }
00412 
00416         CAknKeySoundSystem* SoundSystem() const { return iSoundSystem; }
00417 
00418     protected: // collected code for accessing Dialog state.
00419 
00433         CCoeControl* FindControlOnAnyPageWithControlType(TInt aControlType, TInt* aLineIndex=0, TInt* aPageIndex=0) const;
00434 
00435     protected:
00436 
00443         TTone  iTone;
00444 
00446         TDesC *iPrompt;
00447 
00449         TAny* iSpare_2;
00450 
00455         TBitFlags16 iFlags;
00456 
00458         TInt iSpare_1;
00459 
00461         CAknKeySoundSystem* iSoundSystem;
00462 
00463     public:
00464 
00468         IMPORT_C CAknQueryDialog();
00469 
00473         IMPORT_C CAknQueryDialog(TDesC& aPrompt,const TTone& aTone = ENoTone);
00474 
00478         IMPORT_C void SetHeaderTextL(const TDesC& aHeader);
00479 
00483         IMPORT_C void SetHeaderImageL(CEikImage* aImage);
00484 
00488         IMPORT_C TInt RunDlgLD(TInt aResourceId);
00489 
00493         IMPORT_C static TInt MaxTextLength(const CAknQueryControl* aControl, const TDes* aDataText, TInt aApiValue);
00494 
00495     private:
00496         //From CAknControl
00497         IMPORT_C void* ExtensionInterface( TUid aInterface );
00498 
00499     private:
00500         IMPORT_C virtual void CEikDialog_Reserved_1();
00501         IMPORT_C virtual void CEikDialog_Reserved_2();
00502 
00503     private:
00504         IMPORT_C virtual void CAknDialog_Reserved();
00505 
00506     private:// new function
00507         IMPORT_C virtual void CAknQueryDialog_Reserved();
00508     };
00509 
00510 //-------------------------------------
00511 //class CAknTextQuerydialog
00512 //-------------------------------------
00513 
00514 //Deprecated
00515 #define CAknStaticSizeDataQuerydialog CAknTextQueryDialog
00516 
00520 class CAknTextQueryDialog : public CAknQueryDialog
00521     {
00522 
00523     public://construction and destruction
00524 
00529         IMPORT_C static CAknTextQueryDialog* NewL(TDes& aDataText, const TTone& aTone = ENoTone);
00530 
00531     public:
00532 
00537         IMPORT_C CAknTextQueryDialog(TDes& aDataText, const TTone& aTone = ENoTone);
00538 
00542         IMPORT_C virtual ~CAknTextQueryDialog();
00543 
00544     public://New functions
00545 
00551         IMPORT_C void SetMaxLength(TInt aLength);
00552 
00558         IMPORT_C  virtual TBool CheckIfEntryTextOk() const;
00559 
00571         IMPORT_C void SetDefaultInputMode(TInt aInputMode);
00572 
00573     protected://from CEikDialog
00574 
00581         IMPORT_C void PreLayoutDynInitL();
00582 
00592         IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
00593 
00594     public://from MAknQueryControlObserver
00595 
00602         IMPORT_C TBool HandleQueryEditorSizeEventL(CAknQueryControl* aQueryControl, TQueryControlEvent aEventType);
00603 
00604     public://from CCoeControl
00605 
00609         IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00610 
00611     protected:
00612 
00617         void SetControlTextL();
00618 
00622         inline TDes& Text() { return iDataText; }
00623 
00627         inline const TDesC& Text() const { return iDataText; }
00628 
00629     protected:
00630 
00638         TInt  iTextMaxLength;
00639 
00643         TDes& iDataText;
00644 
00646         TBool iEditorTextOk;
00647 
00648     public:
00649 
00653         IMPORT_C CAknTextQueryDialog(TDes& aDataText, TDesC& aPrompt,const TTone& aTone = ENoTone);
00654 
00655     private:
00659         IMPORT_C void* ExtensionInterface( TUid aInterface );
00660 
00661     private:
00662         IMPORT_C virtual void CEikDialog_Reserved_1();
00663         IMPORT_C virtual void CEikDialog_Reserved_2();
00664 
00665     private:
00666         IMPORT_C virtual void CAknDialog_Reserved();
00667 
00668     private:
00669         IMPORT_C virtual void CAknQueryDialog_Reserved();
00670 
00671     private: // Data
00672         TInt iSpare;
00673     };
00674 
00675 //---------------------------------
00676 //class CAknNumberQuerydialog
00677 //---------------------------------
00678 
00682 class CAknNumberQueryDialog : public CAknQueryDialog
00683     {
00684 
00685     public:
00686 
00691         IMPORT_C static CAknNumberQueryDialog* NewL(TInt& aNumber, const TTone& aTone = ENoTone);
00692 
00693     public:
00694 
00698         IMPORT_C CAknNumberQueryDialog(TInt& aNumber, const TTone& aTone = ENoTone);
00699 
00703         IMPORT_C virtual ~CAknNumberQueryDialog();
00704 
00705     public:
00706 
00713         IMPORT_C void SetMinimumAndMaximum(TInt aMinimumValue, TInt aMaximumValue); // only values inside the initial minimum and maximum are permitted
00714 
00715     public://from CCoeControl
00716 
00720         IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00721 
00722     protected://from CEikDialog
00723 
00730         IMPORT_C void PreLayoutDynInitL();
00731 
00741         IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
00742 
00746         inline TInt& Number() { return iNumber; }
00747 
00751         inline const TInt& Number() const { return iNumber; }
00752 
00753     private:
00757         IMPORT_C void* ExtensionInterface( TUid aInterface );
00758 
00759     private:
00760         IMPORT_C virtual void CEikDialog_Reserved_1();
00761         IMPORT_C virtual void CEikDialog_Reserved_2();
00762 
00763     private:
00764         IMPORT_C virtual void CAknDialog_Reserved();
00765 
00766     private:
00767         IMPORT_C virtual void CAknQueryDialog_Reserved();
00768 
00769     protected:
00770 
00774          TInt& iNumber;
00775 
00776     private: // Data
00777         TInt iSpare;
00778     };
00779 
00780 //-------------------------------------
00781 //class CAknTimeQueryDialog
00782 //-------------------------------------
00783 
00787 class CAknTimeQueryDialog : public CAknQueryDialog
00788     {
00789 
00790     public:
00791 
00796         IMPORT_C static CAknTimeQueryDialog* NewL(TTime& aTime, const TTone& aTone = ENoTone);
00797 
00798     public:
00799 
00803         IMPORT_C CAknTimeQueryDialog(TTime& aTime, const TTone& aTone = ENoTone);
00804 
00808         IMPORT_C virtual ~CAknTimeQueryDialog();
00809 
00810     public://New functions
00811 
00819         IMPORT_C void SetMinimumAndMaximum(const TTime& aMinimum, const TTime& aMaximum);
00820 
00821     public://From CCoeControl
00822 
00826         IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00827 
00828     protected://from CEikDialog
00829 
00836         IMPORT_C void PreLayoutDynInitL();
00837 
00847         IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
00848 
00852         inline TTime& Time() { return iTime; }
00853 
00857         inline const TTime& Time() const { return iTime; }
00858 
00859     protected:
00860 
00864         TTime& iTime;
00865 
00866     public:
00867 
00871         IMPORT_C CAknTimeQueryDialog(TTime& aTime,TDesC& aPrompt,const TTone& aTone = ENoTone);
00872 
00873     private:
00877         IMPORT_C void* ExtensionInterface( TUid aInterface );
00878 
00879     private:
00880         IMPORT_C virtual void CEikDialog_Reserved_1();
00881         IMPORT_C virtual void CEikDialog_Reserved_2();
00882 
00883     private:
00884         IMPORT_C virtual void CAknDialog_Reserved();
00885 
00886     private:
00887         IMPORT_C virtual void CAknQueryDialog_Reserved();
00888 
00889     private: // Data
00890         TInt iSpare;
00891     };
00892 
00893 //----------------------------------
00894 //class CAknDurationQuerydialog
00895 //----------------------------------
00896 
00900 class CAknDurationQueryDialog : public CAknQueryDialog
00901     {
00902 
00903     public:
00904 
00909         IMPORT_C static CAknDurationQueryDialog* NewL(TTimeIntervalSeconds& aTime, const TTone& aTone = ENoTone);
00910 
00911     public:
00912 
00916         IMPORT_C CAknDurationQueryDialog(TTimeIntervalSeconds& aDuration, const TTone& aTone = ENoTone);
00917 
00921         IMPORT_C virtual ~CAknDurationQueryDialog();
00922 
00923     public://new
00924 
00932         IMPORT_C void SetMinimumAndMaximum(const TTimeIntervalSeconds& aMinimumDuration, const TTimeIntervalSeconds& aMaximumDuration);
00933 
00934     public: // From CCoeControl
00935 
00939         IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00940 
00941     protected://from CEikDialog
00942 
00949         IMPORT_C void PreLayoutDynInitL();
00950 
00960         IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
00961 
00965         inline TTimeIntervalSeconds& Duration() { return iDuration; }
00966 
00970         inline const TTimeIntervalSeconds& Duration() const { return iDuration; }
00971 
00972     private:
00976         IMPORT_C void* ExtensionInterface( TUid aInterface );
00977 
00978     private:
00979         IMPORT_C virtual void CEikDialog_Reserved_1();
00980         IMPORT_C virtual void CEikDialog_Reserved_2();
00981 
00982     private:
00983         IMPORT_C virtual void CAknDialog_Reserved();
00984 
00985     private:
00986         IMPORT_C virtual void CAknQueryDialog_Reserved();
00987 
00988     protected:
00992          TTimeIntervalSeconds& iDuration;
00993 
00994     private: // Data
00995         TInt iSpare;
00996     };
00997 
00998 //----------------------------------
00999 //class CAknFloatingPointQueryDialog
01000 //----------------------------------
01001 
01005 class CAknFloatingPointQueryDialog : public CAknQueryDialog
01006     {
01007 
01008     public:
01013         IMPORT_C static CAknFloatingPointQueryDialog* NewL(TReal& aNumber, const TTone& aTone = ENoTone);
01014 
01015     public:
01019         IMPORT_C CAknFloatingPointQueryDialog(TReal& aNumber, const TTone& aTone = ENoTone);
01020 
01024         IMPORT_C virtual ~CAknFloatingPointQueryDialog();
01025 
01026     public:
01034         IMPORT_C void SetMinimumAndMaximum(const TReal& aMinimumNumber, const TReal& aMaximumNumber);
01035 
01036     public://From CCoeControl
01037 
01041         IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
01042 
01043     protected://from CEikDialog
01044 
01051         IMPORT_C void PreLayoutDynInitL();
01052 
01062         IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
01063 
01067         inline TReal& Number() { return iNumber; }
01068 
01072         inline const TReal& Number() const { return iNumber; }
01073 
01074     private:
01078         IMPORT_C void* ExtensionInterface( TUid aInterface );
01079 
01080     private:
01081         IMPORT_C virtual void CEikDialog_Reserved_1();
01082         IMPORT_C virtual void CEikDialog_Reserved_2();
01083 
01084     private:
01085         IMPORT_C virtual void CAknDialog_Reserved();
01086 
01087     private:
01088         IMPORT_C virtual void CAknQueryDialog_Reserved();
01089 
01090     protected:
01094         TReal& iNumber;
01095 
01096     private:
01097         TInt iSpare;
01098     };
01099 
01100 
01101 //--------------------------------------
01102 //class CAknMultilineDataQuerydialog
01103 //--------------------------------------
01104 
01124 class CAknMultiLineDataQueryDialog : public CAknQueryDialog
01125     {
01126 
01127     public:
01128 
01138         IMPORT_C static CAknMultiLineDataQueryDialog* NewL(
01139                 TTime& aTime1,
01140                 TTime& aTime2,
01141                 TTone aTone = ENoTone);
01142 
01152         IMPORT_C static CAknMultiLineDataQueryDialog* NewL(
01153                 TDes& aText1,
01154                 TDes& aText2,
01155                 TTone aTone = ENoTone);
01156 
01166         IMPORT_C static CAknMultiLineDataQueryDialog* NewL(
01167                 TDes& aText1,
01168                 TTime& aTime2,
01169                 TTone aTone = ENoTone);
01170 
01180         IMPORT_C static CAknMultiLineDataQueryDialog* NewL(
01181                 TDes& aText1,
01182                 TInt& aNum2,
01183                 TTone aTone = ENoTone);
01184 
01194         IMPORT_C static CAknMultiLineDataQueryDialog* NewL(
01195                 TDes& aText1,
01196                 TTimeIntervalSeconds& aDur2,
01197                 TTone aTone = ENoTone);
01198 
01208         IMPORT_C static CAknMultiLineDataQueryDialog* NewL(
01209                 TTime& aTime1,
01210                 TTimeIntervalSeconds& aDur2,
01211                 TTone aTone = ENoTone);
01212 
01222         IMPORT_C static CAknMultiLineDataQueryDialog* NewL(
01223                 TInt& aNum1,
01224                 TInt& aNum2,
01225                 TTone aTone = ENoTone);
01226 
01235         IMPORT_C static CAknMultiLineDataQueryDialog* NewL(TPosition &aPos, TTone aTone = ENoTone);
01236 
01237 
01241         IMPORT_C virtual ~CAknMultiLineDataQueryDialog();
01242 
01243     protected:
01244 
01250         template <class T1, class T2> void SetDataL(T1& aData1, T2& aData2)
01251             {
01253             iFirstData  = new (ELeave) TAknQueryData<T1>(aData1);
01254 
01256             iSecondData = new (ELeave) TAknQueryData<T2>(aData2);
01257             }
01258 
01271         template <class T1, class T2> static CAknMultiLineDataQueryDialog*
01272             DoNewL(T1& aData1, T2& aData2, const TTone& aTone)
01273             {
01274                 CAknMultiLineDataQueryDialog* self =
01275                             new (ELeave) CAknMultiLineDataQueryDialog(aTone);
01276 
01277                 CleanupStack::PushL(self);
01278 
01279                 self->SetDataL(aData1,aData2);
01280 
01281                 CleanupStack::Pop(self);
01282                 return self;
01283             }
01284 
01285     protected:
01286 
01292         IMPORT_C CAknMultiLineDataQueryDialog(const TTone& aTone);
01293 
01294     public:
01295 
01303         IMPORT_C void SetPromptL(const TDesC& aFirstPrompt,
01304                                  const TDesC& aSecondPrompt);
01305 
01306     public:
01307 
01313         IMPORT_C void SetMaxLengthOfFirstEditor(
01314                                 TInt aFirstTextEditorMaxLength);
01315 
01321         IMPORT_C void SetMaxLengthOfSecondEditor(
01322                                 TInt aSecondTextEditorMaxLength);
01323 
01324     public: // From CCoeControl
01325 
01333         IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
01334 
01335     protected://from CEikDialog
01336 
01348         IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
01349 
01359         IMPORT_C void PreLayoutDynInitL();
01360 
01378         IMPORT_C void HandleResourceChange(TInt aType);
01379 
01380     protected:
01381 
01386         IMPORT_C void UpdateLeftSoftKeyL();
01387 
01391         IMPORT_C void DoSetPromptL();
01392 
01393     protected:
01394 
01399         IMPORT_C TBool NeedToDismissQueryL(const TKeyEvent& aKeyEvent);
01400 
01401     protected:
01402 
01408         IMPORT_C CAknMultilineQueryControl* FirstControl() const;
01409 
01415         IMPORT_C CAknMultilineQueryControl* SecondControl() const;
01416 
01422          IMPORT_C CAknQueryControl* QueryControl() const;
01423 
01429         IMPORT_C CAknPopupHeadingPane* QueryHeading() const;
01430 
01431     protected:
01432 
01447         template<class T>
01448             T& FirstData(const T&)
01449             { return STATIC_CAST(TAknQueryData<T>*,iFirstData)->iData; }
01450 
01465         template<class T>
01466             T& SecondData(const T&)
01467             { return STATIC_CAST(TAknQueryData<T>*,iSecondData)->iData; }
01468 
01483         template<class T>
01484             const T& FirstData(const T&) const
01485             { return STATIC_CAST(TAknQueryData<T>*,iFirstData)->iData; }
01486 
01501         template<class T>
01502             const T& SecondData(const T&) const
01503             { return STATIC_CAST(TAknQueryData<T>*,iSecondData)->iData; }
01504 
01510         IMPORT_C TPtrC SecondPrompt() const;
01511 
01512     private:
01513         void HandleOrientationSwitch();
01514         TBool FirstLineEnabled() const;
01515         TBool SecondLineEnabled() const;
01516         TInt CurrentLine() const;
01517 
01518     private:
01519         TDesC* iSecondPrompt;
01520         MAknQueryData* iFirstData;
01521         MAknQueryData* iSecondData;
01522 
01523         TInt iFirstEditorMaxLength;
01524         TInt iSecondEditorMaxLength;
01525 
01526     public:
01527 
01537         IMPORT_C CAknMultiLineDataQueryDialog(
01538                 TTime* aTime,
01539                 TTime* aTime2,
01540                 TDesC* aPrompt=NULL,
01541                 TDesC* aPrompt2=NULL,
01542                 const TTone& aTone = ENoTone);
01543 
01553         IMPORT_C CAknMultiLineDataQueryDialog(
01554                 TDes* aDataText,
01555                 TDes* aDataText2,
01556                 TDesC* aPrompt=NULL,
01557                 TDesC* aPrompt2=NULL,
01558                 const TTone& aTone = ENoTone);
01559 
01569         IMPORT_C CAknMultiLineDataQueryDialog(
01570                 TDes* aDataText,
01571                 TTime* aTime,
01572                 TDesC* aPrompt=NULL,
01573                 TDesC* aPrompt2=NULL,
01574                 const TTone& aTone = ENoTone);
01575 
01585         IMPORT_C CAknMultiLineDataQueryDialog(
01586                 TDes* aDataText,
01587                 TInt* aNumber,
01588                 TDesC* aPrompt=NULL,
01589                 TDesC* aPrompt2=NULL,
01590                 const TTone& aTone = ENoTone);
01591 
01601         IMPORT_C CAknMultiLineDataQueryDialog(
01602                 TDes* aDataText,
01603                 TTimeIntervalSeconds* aDuration,
01604                 TDesC* aPrompt=NULL,
01605                 TDesC* aPrompt2=NULL,
01606                 const TTone& aTone = ENoTone);
01607 
01617         IMPORT_C CAknMultiLineDataQueryDialog(
01618                 TTime* aTime,
01619                 TTimeIntervalSeconds* aDuration,
01620                 TDesC* aPrompt=NULL,
01621                 TDesC* aPrompt2=NULL,
01622                 const TTone& aTone = ENoTone);
01623 
01633         IMPORT_C CAknMultiLineDataQueryDialog(
01634                 TInt* aNumber,
01635                 TInt* aNumber2,
01636                 TDesC* aPrompt=NULL,
01637                 TDesC* aPrompt2=NULL,
01638                 const TTone& aTone = ENoTone);
01639 
01640     private:
01644         IMPORT_C void* ExtensionInterface( TUid aInterface );
01645 
01646     private:
01647         IMPORT_C virtual void CEikDialog_Reserved_1();
01648         IMPORT_C virtual void CEikDialog_Reserved_2();
01649 
01650     private:
01651         IMPORT_C virtual void CAknDialog_Reserved();
01652 
01653     private:
01654         IMPORT_C virtual void CAknQueryDialog_Reserved();
01655 
01656     protected:
01662         TDes16* iText;
01663 
01669         TDes16* iSecondText;
01670     };
01671 
01672 //Deprecated
01673 //This one is included here for backwards compatibility
01674 //and will be removed as soon as apps using listquerydialog
01675 //include it directly
01676 #include <aknlistquerydialog.h>
01677 
01678 
01679 //---------------------------------
01680 //class CAknIpAddressQueryDialog
01681 //---------------------------------
01682 
01689 NONSHARABLE_CLASS(CAknIpAddressQueryDialog) : public CAknQueryDialog
01690     {
01691 
01692     public:
01697         IMPORT_C static CAknIpAddressQueryDialog* NewL(TInetAddr& aInetAddr, const TTone& aTone = ENoTone);
01698 
01699     private:
01700         CAknIpAddressQueryDialog(TInetAddr& aInetAddr, const TTone& aTone = ENoTone);
01701 
01702     public:
01706         IMPORT_C virtual ~CAknIpAddressQueryDialog();
01707 
01708     public:
01716         IMPORT_C void SetMinimumAndMaximum(const TInetAddr& aMinimumAddress, const TInetAddr& aMaximumAddress);
01717 
01723         IMPORT_C virtual TBool NeedToDismissQueryL(const TKeyEvent& aKeyEvent);
01724 
01725 
01726     protected:
01727 
01732         IMPORT_C virtual CAknQueryControl* QueryControl() const;
01733 
01734     protected://from CEikDialog
01735 
01742         IMPORT_C void SetSizeAndPosition(const TSize& aSize);
01743 
01749         IMPORT_C void PreLayoutDynInitL();
01750 
01756         IMPORT_C void PostLayoutDynInitL();
01757 
01762         IMPORT_C virtual void DoSetPromptL();
01763 
01773         IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
01774 
01779          IMPORT_C void UpdateLeftSoftKeyL();
01780 
01784          inline TInetAddr& InetAddr() { return iInetAddr; }
01785 
01789          inline const TInetAddr& InetAddr() const { return iInetAddr; }
01790 
01791     private:
01792         IMPORT_C virtual void CEikDialog_Reserved_1();
01793         IMPORT_C virtual void CEikDialog_Reserved_2();
01794 
01795     private:
01796         IMPORT_C virtual void CAknDialog_Reserved();
01797 
01798     private:
01799         IMPORT_C virtual void CAknQueryDialog_Reserved();
01800 
01801     protected:
01805          TInetAddr& iInetAddr;
01806     };
01807 
01808 
01809 //---------------------------------
01810 //class CAknFixedPointQueryDialog
01811 //---------------------------------
01812 
01819 NONSHARABLE_CLASS(CAknFixedPointQueryDialog) : public CAknQueryDialog
01820     {
01821     public:
01826         IMPORT_C static CAknFixedPointQueryDialog* NewL(TInt& aNumber, const TTone& aTone);
01827 
01828     private:
01829         CAknFixedPointQueryDialog(TInt& aNumber, const TTone& aTone = ENoTone);
01830 
01831     public:
01832 
01836         IMPORT_C virtual ~CAknFixedPointQueryDialog();
01837 
01838     public: //new
01845         IMPORT_C void SetMinimumAndMaximum(TInt aMinimumValue, TInt aMaximumValue); // only values inside the initial minimum and maximum are permitted
01846 
01847         IMPORT_C virtual TBool NeedToDismissQueryL(const TKeyEvent& aKeyEvent);
01848 
01849 
01850     protected:
01851 
01857         IMPORT_C virtual CAknQueryControl* QueryControl() const;
01858 
01859     protected://from CEikDialog
01860 
01867         IMPORT_C void SetSizeAndPosition(const TSize& aSize);
01868 
01874         IMPORT_C void PreLayoutDynInitL();
01875 
01881         IMPORT_C void PostLayoutDynInitL();
01882 
01887         IMPORT_C virtual void DoSetPromptL();
01888 
01898         IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
01899 
01904         IMPORT_C void UpdateLeftSoftKeyL();
01905 
01909         inline TInt& Number() { return iNumber; }
01910 
01914         inline const TInt& Number() const { return iNumber; }
01915 
01916     private:
01917         IMPORT_C virtual void CEikDialog_Reserved_1();
01918         IMPORT_C virtual void CEikDialog_Reserved_2();
01919     private:
01920         IMPORT_C virtual void CAknDialog_Reserved();
01921     private:
01922         IMPORT_C virtual void CAknQueryDialog_Reserved();
01923     private:
01924          TInt& iNumber;
01925     };
01926 
01927 
01928 //--------------------------------------
01929 //class CAknMultilineIpQueryDialog
01930 //--------------------------------------
01931 
01943 NONSHARABLE_CLASS(CAknMultiLineIpQueryDialog) : public CAknMultiLineDataQueryDialog
01944     {
01945     public:
01950         IMPORT_C static CAknMultiLineIpQueryDialog* NewL(TInetAddr&  aAddress1,  TInetAddr&  aAddress2, TTone aTone = ENoTone);
01951 
01952         IMPORT_C virtual ~CAknMultiLineIpQueryDialog();
01953 
01954     protected:
01960         template <class T1, class T2> void SetDataL(T1& aData1, T2& aData2)
01961             {
01962             iFirstData  = new (ELeave) TAknQueryData<T1>(aData1);
01963             iSecondData = new (ELeave) TAknQueryData<T2>(aData2);
01964             }
01965 
01971         template <class T1, class T2> static CAknMultiLineIpQueryDialog*
01972             DoNewL(T1& aData1, T2& aData2, const TTone& aTone)
01973             {
01974                 CAknMultiLineIpQueryDialog* self = new (ELeave) CAknMultiLineIpQueryDialog(aTone);
01975                 CleanupStack::PushL(self);
01976 
01977                 self->SetDataL(aData1,aData2);
01978 
01979                 CleanupStack::Pop(self);
01980                 return self;
01981             }
01982 
01983     private:
01984         CAknMultiLineIpQueryDialog(const TTone& aTone);
01985 
01986     public:
01987 
01994         IMPORT_C void SetPromptL(const TDesC& aFirstPrompt, const TDesC& aSecondPrompt);
01995 
01996     public:
01997 
02002         IMPORT_C void SetMaxLengthOfFirstEditor(TInt aFirstTextEditorMaxLength);
02003 
02008         IMPORT_C void SetMaxLengthOfSecondEditor(TInt aSecondTextEditorMaxLength);
02009 
02010     protected://from CEikDialog
02011 
02021         IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
02022 
02028         IMPORT_C void PreLayoutDynInitL();
02029 
02030         IMPORT_C void HandleResourceChange(TInt aType);
02031 
02032     protected:
02037         IMPORT_C void UpdateLeftSoftKeyL();
02038 
02043         IMPORT_C void DoSetPromptL();
02044 
02045     protected:
02053         IMPORT_C TBool NeedToDismissQueryL(const TKeyEvent& aKeyEvent);
02054 
02055     protected:
02061         IMPORT_C CAknExtMultilineQueryControl* FirstControl() const;
02062 
02068         IMPORT_C CAknExtMultilineQueryControl* SecondControl() const;
02069 
02075         IMPORT_C CAknQueryControl* QueryControl() const;
02076 
02077     protected:
02081         IMPORT_C TPtrC SecondPrompt() const;
02082 
02083     private:
02084         void HandleOrientationSwitch();
02085         TBool FirstLineEnabled() const;
02086         TBool SecondLineEnabled() const;
02087         TInt CurrentLine() const;
02088 
02089     private:
02090         TDesC* iSecondPrompt;
02091 
02092         MAknQueryData* iFirstData;
02093         MAknQueryData* iSecondData;
02094 
02095         TInt iFirstEditorMaxLength;
02096         TInt iSecondEditorMaxLength;
02097 
02098     private:
02099         TDes16* iText;
02100         TDes16* iSecondText;
02101     };
02102 
02103 // AKNQUERYDIALOG_H
02104 #endif

Copyright © Nokia Corporation 2001-2008
Back to top