00001 /* 00002 * ============================================================================ 00003 * Name : AknQueryDialog.h 00004 * Part of : Avkon 00005 * 00006 * Description: 00007 * Implementation of Query dialogs 00008 * Version: 00009 * 00010 * Copyright © 2002 Nokia Corporation. 00011 * This material, including documentation and any related 00012 * computer programs, is protected by copyright controlled by 00013 * Nokia Corporation. All rights are reserved. Copying, 00014 * including reproducing, storing, adapting or translating, any 00015 * or all of this material requires the prior written consent of 00016 * Nokia Corporation. This material also contains confidential 00017 * information which may not be disclosed to others without the 00018 * prior written consent of Nokia Corporation. 00019 * ============================================================================ 00020 */ 00021 00022 #ifndef AKNQUERYDIALOG_H 00023 #define AKNQUERYDIALOG_H 00024 00025 // INCLUDES 00026 #include <eikdialg.h> 00027 #include <aknform.h> 00028 #include <eiklbx.h> 00029 #include <eiktxlbx.h> 00030 #include <eikcmobs.h> 00031 #include <aknpopuplayout.h> 00032 #include <aknintermediate.h> 00033 #include <aknquerycontrol.h> 00034 #include <aknpopuplayout.h> 00035 #include <aknmultilinequerycontrol.h> 00036 #include <aknlistquerycontrol.h> 00037 #include <aknintermediate.h> 00038 #include <aknquerydata.h> 00039 #include <avkon.hrh> 00040 00041 class CAknKeySoundSystem; 00042 class TInetAddr; 00043 00044 00050 class CAknQueryDialog : public CAknDialog , public MAknQueryControlObserver 00051 { 00052 public: 00053 00061 enum TTone { 00062 00066 ENoTone = 0, 00067 00071 EConfirmationTone = EAvkonSIDConfirmationTone, 00072 00076 EWarningTone = EAvkonSIDWarningTone, 00077 00081 EErrorTone = EAvkonSIDErrorTone 00082 }; 00083 00084 public: 00085 00093 IMPORT_C static CAknQueryDialog* NewL(const TTone& aTone = ENoTone); 00094 00099 IMPORT_C static CAknQueryDialog* NewL(TDes& aText, const TTone& aTone = ENoTone); 00100 00105 IMPORT_C static CAknQueryDialog* NewL(TInt& aNumber, const TTone& aTone = ENoTone); 00106 00111 IMPORT_C static CAknQueryDialog* NewL(TTime& aTime, const TTone& aTone = ENoTone); 00112 00117 IMPORT_C static CAknQueryDialog* NewL(TTimeIntervalSeconds& aTime, const TTone& aTone = ENoTone); 00118 00123 IMPORT_C static CAknQueryDialog* NewL(TReal& aNumber, const TTone& aTone = ENoTone); 00124 00129 IMPORT_C static CAknQueryDialog* NewL(TInetAddr& aInetAddr, const TTone& aTone = ENoTone); 00130 00131 #start_since SINCE_3_1_SDK 00132 00138 IMPORT_C static CAknQueryDialog* NewL(TPosition &aValue, const TTone &aTone = ENoTone); 00139 #end_since SINCE_3_1_SDK 00140 public: 00141 IMPORT_C virtual ~CAknQueryDialog(); 00142 00148 IMPORT_C CAknQueryDialog(const TTone& aTone); 00149 00150 public: 00151 00156 IMPORT_C virtual CAknPopupHeadingPane* QueryHeading() const; 00157 00163 IMPORT_C CAknPopupHeadingPane* Heading() const; 00164 00170 IMPORT_C void SetPromptL(const TDesC& aPrompt); 00171 00176 IMPORT_C void MakeLeftSoftkeyVisible(TBool aVisible); 00177 00187 IMPORT_C void SetEmergencyCallSupport( TBool aOnOff ); 00188 00194 IMPORT_C void RemoveEditorIndicator(); 00195 00206 IMPORT_C void SetPredictiveTextInputPermitted( TBool aPermitted ); 00207 00213 IMPORT_C TInt RunLD(); 00214 00225 IMPORT_C TInt ExecuteLD(TInt aResourceId); 00226 00233 IMPORT_C TInt ExecuteLD(TInt aResourceId, const TDesC& aPrompt); 00234 00235 public:// from CCoeControl 00236 00246 IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); 00247 00251 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); 00252 00253 public: 00254 00265 IMPORT_C static TInt MaxTextLength(const CAknQueryControl* aControl, const TDes& aDataText, TInt aApiValue) ; 00266 00267 protected://from CEikdialog 00268 00276 IMPORT_C void SetSizeAndPosition(const TSize& aSize); 00277 00283 IMPORT_C void PreLayoutDynInitL(void); 00284 00290 IMPORT_C void PostLayoutDynInitL(); 00291 00301 IMPORT_C virtual TBool OkToExitL(TInt aButtonId); 00302 00303 public://from MAknQueryControlObeserver 00304 00311 IMPORT_C TBool HandleQueryEditorSizeEventL(CAknQueryControl* aQueryControl, TQueryControlEvent aEventType); 00312 00320 IMPORT_C TBool HandleQueryEditorStateEventL(CAknQueryControl* aQueryControl, TQueryControlEvent aEventType, TQueryValidationStatus aStatus); 00321 00326 IMPORT_C virtual TBool NeedToDismissQueryL(const TKeyEvent& aKeyEvent); 00327 00334 IMPORT_C virtual void DismissQueryL(); 00335 00336 protected: 00337 00342 IMPORT_C virtual void UpdateLeftSoftKeyL(); 00343 00348 IMPORT_C virtual void DoSetPromptL(); 00349 00354 IMPORT_C virtual CAknQueryControl* QueryControl() const; 00355 00356 protected: //implementation, intended to be used but not overwritten 00357 00361 void PlayTone(); 00362 00366 void ReportUserActivity() const ; 00367 00371 void LayoutAndDraw(); 00372 00377 TInt GetLeftCBAShortKeyPress(); 00378 00383 TInt GetRightCBAShortKeyPress(); 00384 00389 TBool IsLeftSoftkeyVisible(); 00390 00391 protected: 00392 00396 IMPORT_C TPtrC Prompt() const; 00397 00401 TTone& Tone() { return iTone; } 00402 00406 const TTone& Tone() const { return iTone; } 00407 00411 TBitFlags16& Flags() { return iFlags; } 00412 00416 const TBitFlags16& Flags() const { return iFlags; } 00417 00421 CAknKeySoundSystem* SoundSystem() const { return iSoundSystem; } 00422 00423 protected: // collected code for accessing Dialog state. 00424 00438 CCoeControl* CAknQueryDialog::FindControlOnAnyPageWithControlType(TInt aControlType, TInt* aLineIndex=0, TInt* aPageIndex=0) const; 00439 00440 protected: 00441 00448 TTone iTone; 00449 00451 TDesC *iPrompt; 00452 00454 TAny* iSpare_2; 00455 00460 TBitFlags16 iFlags; 00461 00463 TInt iSpare_1; 00464 00466 CAknKeySoundSystem* iSoundSystem; 00467 00468 public: 00469 00473 IMPORT_C CAknQueryDialog(); 00474 00478 IMPORT_C CAknQueryDialog(TDesC& aPrompt,const TTone& aTone = ENoTone); 00479 00483 IMPORT_C void SetHeaderTextL(const TDesC& aHeader); 00484 00488 IMPORT_C void SetHeaderImageL(CEikImage* aImage); 00489 00493 IMPORT_C TInt RunDlgLD(TInt aResourceId); 00494 00498 IMPORT_C static TInt MaxTextLength(const CAknQueryControl* aControl, const TDes* aDataText, TInt aApiValue); 00499 00500 private: 00501 //From CAknControl 00502 IMPORT_C void* ExtensionInterface( TUid aInterface ); 00503 00504 private: 00505 IMPORT_C virtual void CEikDialog_Reserved_1(); 00506 IMPORT_C virtual void CEikDialog_Reserved_2(); 00507 00508 private: 00509 IMPORT_C virtual void CAknDialog_Reserved(); 00510 00511 private:// new function 00512 IMPORT_C virtual void CAknQueryDialog_Reserved(); 00513 }; 00514 00515 //------------------------------------- 00516 //class CAknTextQuerydialog 00517 //------------------------------------- 00518 00519 //Deprecated 00520 #define CAknStaticSizeDataQuerydialog CAknTextQueryDialog 00521 00525 class CAknTextQueryDialog : public CAknQueryDialog 00526 { 00527 00528 public://construction and destruction 00529 00534 IMPORT_C static CAknTextQueryDialog* NewL(TDes& aDataText, const TTone& aTone = ENoTone); 00535 00536 public: 00537 00542 IMPORT_C CAknTextQueryDialog(TDes& aDataText, const TTone& aTone = ENoTone); 00543 00547 IMPORT_C virtual ~CAknTextQueryDialog(); 00548 00549 public://New functions 00550 00556 IMPORT_C void SetMaxLength(TInt aLength); 00557 00563 IMPORT_C virtual TBool CheckIfEntryTextOk() const; 00564 00576 IMPORT_C void SetDefaultInputMode(TInt aInputMode); 00577 00578 protected://from CEikDialog 00579 00586 IMPORT_C void PreLayoutDynInitL(); 00587 00597 IMPORT_C virtual TBool OkToExitL(TInt aButtonId); 00598 00599 public://from MAknQueryControlObserver 00600 00607 IMPORT_C TBool HandleQueryEditorSizeEventL(CAknQueryControl* aQueryControl, TQueryControlEvent aEventType); 00608 00609 public://from CCoeControl 00610 00614 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); 00615 00616 protected: 00617 00622 void SetControlTextL(); 00623 00627 inline TDes& Text() { return iDataText; } 00628 00632 inline const TDesC& Text() const { return iDataText; } 00633 00634 protected: 00635 00643 TInt iTextMaxLength; 00644 00648 TDes& iDataText; 00649 00651 TBool iEditorTextOk; 00652 00653 public: 00654 00658 IMPORT_C CAknTextQueryDialog(TDes& aDataText, TDesC& aPrompt,const TTone& aTone = ENoTone); 00659 00660 private: 00664 IMPORT_C void* ExtensionInterface( TUid aInterface ); 00665 00666 private: 00667 IMPORT_C virtual void CEikDialog_Reserved_1(); 00668 IMPORT_C virtual void CEikDialog_Reserved_2(); 00669 00670 private: 00671 IMPORT_C virtual void CAknDialog_Reserved(); 00672 00673 private: 00674 IMPORT_C virtual void CAknQueryDialog_Reserved(); 00675 00676 private: // Data 00677 TInt iSpare; 00678 }; 00679 00680 //--------------------------------- 00681 //class CAknNumberQuerydialog 00682 //--------------------------------- 00683 00687 class CAknNumberQueryDialog : public CAknQueryDialog 00688 { 00689 00690 public: 00691 00696 IMPORT_C static CAknNumberQueryDialog* NewL(TInt& aNumber, const TTone& aTone = ENoTone); 00697 00698 public: 00699 00703 IMPORT_C CAknNumberQueryDialog(TInt& aNumber, const TTone& aTone = ENoTone); 00704 00708 IMPORT_C virtual ~CAknNumberQueryDialog(); 00709 00710 public: 00711 00718 IMPORT_C void SetMinimumAndMaximum(TInt aMinimumValue, TInt aMaximumValue); // only values inside the initial minimum and maximum are permitted 00719 00720 public://from CCoeControl 00721 00725 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); 00726 00727 protected://from CEikDialog 00728 00735 IMPORT_C void PreLayoutDynInitL(); 00736 00746 IMPORT_C virtual TBool OkToExitL(TInt aButtonId); 00747 00751 inline TInt& Number() { return iNumber; } 00752 00756 inline const TInt& Number() const { return iNumber; } 00757 00758 private: 00762 IMPORT_C void* ExtensionInterface( TUid aInterface ); 00763 00764 private: 00765 IMPORT_C virtual void CEikDialog_Reserved_1(); 00766 IMPORT_C virtual void CEikDialog_Reserved_2(); 00767 00768 private: 00769 IMPORT_C virtual void CAknDialog_Reserved(); 00770 00771 private: 00772 IMPORT_C virtual void CAknQueryDialog_Reserved(); 00773 00774 protected: 00775 00779 TInt& iNumber; 00780 00781 private: // Data 00782 TInt iSpare; 00783 }; 00784 00785 //------------------------------------- 00786 //class CAknTimeQueryDialog 00787 //------------------------------------- 00788 00792 class CAknTimeQueryDialog : public CAknQueryDialog 00793 { 00794 00795 public: 00796 00801 IMPORT_C static CAknTimeQueryDialog* NewL(TTime& aTime, const TTone& aTone = ENoTone); 00802 00803 public: 00804 00808 IMPORT_C CAknTimeQueryDialog(TTime& aTime, const TTone& aTone = ENoTone); 00809 00813 IMPORT_C virtual ~CAknTimeQueryDialog(); 00814 00815 public://New functions 00816 00824 IMPORT_C void SetMinimumAndMaximum(const TTime& aMinimum, const TTime& aMaximum); 00825 00826 public://From CCoeControl 00827 00831 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); 00832 00833 protected://from CEikDialog 00834 00841 IMPORT_C void PreLayoutDynInitL(); 00842 00852 IMPORT_C virtual TBool OkToExitL(TInt aButtonId); 00853 00857 inline TTime& Time() { return iTime; } 00858 00862 inline const TTime& Time() const { return iTime; } 00863 00864 protected: 00865 00869 TTime& iTime; 00870 00871 public: 00872 00876 IMPORT_C CAknTimeQueryDialog(TTime& aTime,TDesC& aPrompt,const TTone& aTone = ENoTone); 00877 00878 private: 00882 IMPORT_C void* ExtensionInterface( TUid aInterface ); 00883 00884 private: 00885 IMPORT_C virtual void CEikDialog_Reserved_1(); 00886 IMPORT_C virtual void CEikDialog_Reserved_2(); 00887 00888 private: 00889 IMPORT_C virtual void CAknDialog_Reserved(); 00890 00891 private: 00892 IMPORT_C virtual void CAknQueryDialog_Reserved(); 00893 00894 private: // Data 00895 TInt iSpare; 00896 }; 00897 00898 //---------------------------------- 00899 //class CAknDurationQuerydialog 00900 //---------------------------------- 00901 00905 class CAknDurationQueryDialog : public CAknQueryDialog 00906 { 00907 00908 public: 00909 00914 IMPORT_C static CAknDurationQueryDialog* NewL(TTimeIntervalSeconds& aTime, const TTone& aTone = ENoTone); 00915 00916 public: 00917 00921 IMPORT_C CAknDurationQueryDialog(TTimeIntervalSeconds& aDuration, const TTone& aTone = ENoTone); 00922 00926 IMPORT_C virtual ~CAknDurationQueryDialog(); 00927 00928 public://new 00929 00937 IMPORT_C void SetMinimumAndMaximum(const TTimeIntervalSeconds& aMinimumDuration, const TTimeIntervalSeconds& aMaximumDuration); 00938 00939 public: // From CCoeControl 00940 00944 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); 00945 00946 protected://from CEikDialog 00947 00954 IMPORT_C void PreLayoutDynInitL(); 00955 00965 IMPORT_C virtual TBool OkToExitL(TInt aButtonId); 00966 00970 inline TTimeIntervalSeconds& Duration() { return iDuration; } 00971 00975 inline const TTimeIntervalSeconds& Duration() const { return iDuration; } 00976 00977 private: 00981 IMPORT_C void* ExtensionInterface( TUid aInterface ); 00982 00983 private: 00984 IMPORT_C virtual void CEikDialog_Reserved_1(); 00985 IMPORT_C virtual void CEikDialog_Reserved_2(); 00986 00987 private: 00988 IMPORT_C virtual void CAknDialog_Reserved(); 00989 00990 private: 00991 IMPORT_C virtual void CAknQueryDialog_Reserved(); 00992 00993 protected: 00997 TTimeIntervalSeconds& iDuration; 00998 00999 private: // Data 01000 TInt iSpare; 01001 }; 01002 01003 //---------------------------------- 01004 //class CAknFloatingPointQueryDialog 01005 //---------------------------------- 01006 01010 class CAknFloatingPointQueryDialog : public CAknQueryDialog 01011 { 01012 01013 public: 01018 IMPORT_C static CAknFloatingPointQueryDialog* NewL(TReal& aNumber, const TTone& aTone = ENoTone); 01019 01020 public: 01024 IMPORT_C CAknFloatingPointQueryDialog(TReal& aNumber, const TTone& aTone = ENoTone); 01025 01029 IMPORT_C virtual ~CAknFloatingPointQueryDialog(); 01030 01031 public: 01039 IMPORT_C void SetMinimumAndMaximum(const TReal& aMinimumNumber, const TReal& aMaximumNumber); 01040 01041 public://From CCoeControl 01042 01046 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); 01047 01048 protected://from CEikDialog 01049 01056 IMPORT_C void PreLayoutDynInitL(); 01057 01067 IMPORT_C virtual TBool OkToExitL(TInt aButtonId); 01068 01072 inline TReal& Number() { return iNumber; } 01073 01077 inline const TReal& Number() const { return iNumber; } 01078 01079 private: 01083 IMPORT_C void* ExtensionInterface( TUid aInterface ); 01084 01085 private: 01086 IMPORT_C virtual void CEikDialog_Reserved_1(); 01087 IMPORT_C virtual void CEikDialog_Reserved_2(); 01088 01089 private: 01090 IMPORT_C virtual void CAknDialog_Reserved(); 01091 01092 private: 01093 IMPORT_C virtual void CAknQueryDialog_Reserved(); 01094 01095 protected: 01099 TReal& iNumber; 01100 01101 private: 01102 TInt iSpare; 01103 }; 01104 01105 01106 //-------------------------------------- 01107 //class CAknMultilineDataQuerydialog 01108 //-------------------------------------- 01109 01129 class CAknMultiLineDataQueryDialog : public CAknQueryDialog 01130 { 01131 01132 public: 01133 01143 IMPORT_C static CAknMultiLineDataQueryDialog* NewL( 01144 TTime& aTime1, 01145 TTime& aTime2, 01146 TTone aTone = ENoTone); 01147 01157 IMPORT_C static CAknMultiLineDataQueryDialog* NewL( 01158 TDes& aText1, 01159 TDes& aText2, 01160 TTone aTone = ENoTone); 01161 01171 IMPORT_C static CAknMultiLineDataQueryDialog* NewL( 01172 TDes& aText1, 01173 TTime& aTime2, 01174 TTone aTone = ENoTone); 01175 01185 IMPORT_C static CAknMultiLineDataQueryDialog* NewL( 01186 TDes& aText1, 01187 TInt& aNum2, 01188 TTone aTone = ENoTone); 01189 01199 IMPORT_C static CAknMultiLineDataQueryDialog* NewL( 01200 TDes& aText1, 01201 TTimeIntervalSeconds& aDur2, 01202 TTone aTone = ENoTone); 01203 01213 IMPORT_C static CAknMultiLineDataQueryDialog* NewL( 01214 TTime& aTime1, 01215 TTimeIntervalSeconds& aDur2, 01216 TTone aTone = ENoTone); 01217 01218 #start_since SINCE_3_1_SDK 01219 01229 IMPORT_C static CAknMultiLineDataQueryDialog* NewL( 01230 TInt& aNum1, 01231 TInt& aNum2, 01232 TTone aTone = ENoTone); 01233 01242 IMPORT_C static CAknMultiLineDataQueryDialog* NewL(TPosition &aPos, TTone aTone = ENoTone); 01243 #end_since SINCE_3_1_SDK 01244 01245 01249 IMPORT_C virtual ~CAknMultiLineDataQueryDialog(); 01250 01251 protected: 01252 01258 template <class T1, class T2> void SetDataL(T1& aData1, T2& aData2) 01259 { 01261 iFirstData = new (ELeave) TAknQueryData<T1>(aData1); 01262 01264 iSecondData = new (ELeave) TAknQueryData<T2>(aData2); 01265 } 01266 01279 template <class T1, class T2> static CAknMultiLineDataQueryDialog* 01280 DoNewL(T1& aData1, T2& aData2, const TTone& aTone) 01281 { 01282 CAknMultiLineDataQueryDialog* self = 01283 new (ELeave) CAknMultiLineDataQueryDialog(aTone); 01284 01285 CleanupStack::PushL(self); 01286 01287 self->SetDataL(aData1,aData2); 01288 01289 CleanupStack::Pop(self); 01290 return self; 01291 } 01292 01293 protected: 01294 01301 IMPORT_C CAknMultiLineDataQueryDialog(const TTone& aTone); 01302 01303 public: 01304 01312 IMPORT_C void SetPromptL(const TDesC& aFirstPrompt, 01313 const TDesC& aSecondPrompt); 01314 01315 public: 01316 01322 IMPORT_C void SetMaxLengthOfFirstEditor( 01323 TInt aFirstTextEditorMaxLength); 01324 01330 IMPORT_C void SetMaxLengthOfSecondEditor( 01331 TInt aSecondTextEditorMaxLength); 01332 01333 public: // From CCoeControl 01334 01342 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); 01343 01344 protected://from CEikDialog 01345 01357 IMPORT_C virtual TBool OkToExitL(TInt aButtonId); 01358 01368 IMPORT_C void PreLayoutDynInitL(); 01369 01387 IMPORT_C void HandleResourceChange(TInt aType); 01388 01389 protected: 01390 01395 IMPORT_C void UpdateLeftSoftKeyL(); 01396 01400 IMPORT_C void DoSetPromptL(); 01401 01402 protected: 01403 01408 IMPORT_C TBool NeedToDismissQueryL(const TKeyEvent& aKeyEvent); 01409 01410 protected: 01411 01417 IMPORT_C CAknMultilineQueryControl* FirstControl() const; 01418 01424 IMPORT_C CAknMultilineQueryControl* SecondControl() const; 01425 01431 IMPORT_C CAknQueryControl* QueryControl() const; 01432 01438 IMPORT_C CAknPopupHeadingPane* QueryHeading() const; 01439 01440 protected: 01441 01456 template<class T> 01457 T& FirstData(const T&) 01458 { return STATIC_CAST(TAknQueryData<T>*,iFirstData)->iData; } 01459 01474 template<class T> 01475 T& SecondData(const T&) 01476 { return STATIC_CAST(TAknQueryData<T>*,iSecondData)->iData; } 01477 01492 template<class T> 01493 const T& FirstData(const T&) const 01494 { return STATIC_CAST(TAknQueryData<T>*,iFirstData)->iData; } 01495 01510 template<class T> 01511 const T& SecondData(const T&) const 01512 { return STATIC_CAST(TAknQueryData<T>*,iSecondData)->iData; } 01513 01519 IMPORT_C TPtrC SecondPrompt() const; 01520 01521 private: 01522 void HandleOrientationSwitch(); 01523 TBool FirstLineEnabled() const; 01524 TBool SecondLineEnabled() const; 01525 TInt CurrentLine() const; 01526 01527 private: 01528 TDesC* iSecondPrompt; 01529 MAknQueryData* iFirstData; 01530 MAknQueryData* iSecondData; 01531 01532 TInt iFirstEditorMaxLength; 01533 TInt iSecondEditorMaxLength; 01534 01535 public: 01536 01546 IMPORT_C CAknMultiLineDataQueryDialog( 01547 TTime* aTime, 01548 TTime* aTime2, 01549 TDesC* aPrompt=NULL, 01550 TDesC* aPrompt2=NULL, 01551 const TTone& aTone = ENoTone); 01552 01562 IMPORT_C CAknMultiLineDataQueryDialog( 01563 TDes* aDataText, 01564 TDes* aDataText2, 01565 TDesC* aPrompt=NULL, 01566 TDesC* aPrompt2=NULL, 01567 const TTone& aTone = ENoTone); 01568 01578 IMPORT_C CAknMultiLineDataQueryDialog( 01579 TDes* aDataText, 01580 TTime* aTime, 01581 TDesC* aPrompt=NULL, 01582 TDesC* aPrompt2=NULL, 01583 const TTone& aTone = ENoTone); 01584 01594 IMPORT_C CAknMultiLineDataQueryDialog( 01595 TDes* aDataText, 01596 TInt* aNumber, 01597 TDesC* aPrompt=NULL, 01598 TDesC* aPrompt2=NULL, 01599 const TTone& aTone = ENoTone); 01600 01610 IMPORT_C CAknMultiLineDataQueryDialog( 01611 TDes* aDataText, 01612 TTimeIntervalSeconds* aDuration, 01613 TDesC* aPrompt=NULL, 01614 TDesC* aPrompt2=NULL, 01615 const TTone& aTone = ENoTone); 01616 01626 IMPORT_C CAknMultiLineDataQueryDialog( 01627 TTime* aTime, 01628 TTimeIntervalSeconds* aDuration, 01629 TDesC* aPrompt=NULL, 01630 TDesC* aPrompt2=NULL, 01631 const TTone& aTone = ENoTone); 01632 01642 IMPORT_C CAknMultiLineDataQueryDialog( 01643 TInt* aNumber, 01644 TInt* aNumber2, 01645 TDesC* aPrompt=NULL, 01646 TDesC* aPrompt2=NULL, 01647 const TTone& aTone = ENoTone); 01648 01649 private: 01653 IMPORT_C void* ExtensionInterface( TUid aInterface ); 01654 01655 private: 01656 IMPORT_C virtual void CEikDialog_Reserved_1(); 01657 IMPORT_C virtual void CEikDialog_Reserved_2(); 01658 01659 private: 01660 IMPORT_C virtual void CAknDialog_Reserved(); 01661 01662 private: 01663 IMPORT_C virtual void CAknQueryDialog_Reserved(); 01664 01665 protected: 01671 TDes16* iText; 01672 01678 TDes16* iSecondText; 01679 }; 01680 01681 //Deprecated 01682 //This one is included here for backwards compatibility 01683 //and will be removed as soon as apps using listquerydialog 01684 //include it directly 01685 #include <aknlistquerydialog.h> 01686 01687 01688 //--------------------------------- 01689 //class CAknIpAddressQueryDialog 01690 //--------------------------------- 01691 01698 NONSHARABLE_CLASS(CAknIpAddressQueryDialog) : public CAknQueryDialog 01699 { 01700 01701 public: 01706 IMPORT_C static CAknIpAddressQueryDialog* NewL(TInetAddr& aInetAddr, const TTone& aTone = ENoTone); 01707 01708 private: 01709 CAknIpAddressQueryDialog(TInetAddr& aInetAddr, const TTone& aTone = ENoTone); 01710 01711 public: 01715 IMPORT_C virtual ~CAknIpAddressQueryDialog(); 01716 01717 public: 01725 IMPORT_C void SetMinimumAndMaximum(const TInetAddr& aMinimumAddress, const TInetAddr& aMaximumAddress); 01726 01732 IMPORT_C virtual TBool NeedToDismissQueryL(const TKeyEvent& aKeyEvent); 01733 01734 01735 protected: 01736 01741 IMPORT_C virtual CAknQueryControl* QueryControl() const; 01742 01743 protected://from CEikDialog 01744 01751 IMPORT_C void SetSizeAndPosition(const TSize& aSize); 01752 01758 IMPORT_C void PreLayoutDynInitL(); 01759 01765 IMPORT_C void PostLayoutDynInitL(); 01766 01771 IMPORT_C virtual void DoSetPromptL(); 01772 01782 IMPORT_C virtual TBool OkToExitL(TInt aButtonId); 01783 01788 IMPORT_C void UpdateLeftSoftKeyL(); 01789 01793 inline TInetAddr& InetAddr() { return iInetAddr; } 01794 01798 inline const TInetAddr& InetAddr() const { return iInetAddr; } 01799 01800 private: 01801 IMPORT_C virtual void CEikDialog_Reserved_1(); 01802 IMPORT_C virtual void CEikDialog_Reserved_2(); 01803 01804 private: 01805 IMPORT_C virtual void CAknDialog_Reserved(); 01806 01807 private: 01808 IMPORT_C virtual void CAknQueryDialog_Reserved(); 01809 01810 protected: 01814 TInetAddr& iInetAddr; 01815 }; 01816 01817 01818 //--------------------------------- 01819 //class CAknFixedPointQueryDialog 01820 //--------------------------------- 01821 01828 NONSHARABLE_CLASS(CAknFixedPointQueryDialog) : public CAknQueryDialog 01829 { 01830 public: 01835 IMPORT_C static CAknFixedPointQueryDialog* NewL(TInt& aNumber, const TTone& aTone); 01836 01837 private: 01838 CAknFixedPointQueryDialog(TInt& aNumber, const TTone& aTone = ENoTone); 01839 01840 public: 01841 01845 IMPORT_C virtual ~CAknFixedPointQueryDialog(); 01846 01847 public: //new 01854 IMPORT_C void SetMinimumAndMaximum(TInt aMinimumValue, TInt aMaximumValue); // only values inside the initial minimum and maximum are permitted 01855 01856 IMPORT_C virtual TBool NeedToDismissQueryL(const TKeyEvent& aKeyEvent); 01857 01858 01859 protected: 01860 01866 IMPORT_C virtual CAknQueryControl* QueryControl() const; 01867 01868 protected://from CEikDialog 01869 01876 IMPORT_C void SetSizeAndPosition(const TSize& aSize); 01877 01883 IMPORT_C void PreLayoutDynInitL(); 01884 01890 IMPORT_C void PostLayoutDynInitL(); 01891 01896 IMPORT_C virtual void DoSetPromptL(); 01897 01907 IMPORT_C virtual TBool OkToExitL(TInt aButtonId); 01908 01913 IMPORT_C void UpdateLeftSoftKeyL(); 01914 01918 inline TInt& Number() { return iNumber; } 01919 01923 inline const TInt& Number() const { return iNumber; } 01924 01925 private: 01926 IMPORT_C virtual void CEikDialog_Reserved_1(); 01927 IMPORT_C virtual void CEikDialog_Reserved_2(); 01928 private: 01929 IMPORT_C virtual void CAknDialog_Reserved(); 01930 private: 01931 IMPORT_C virtual void CAknQueryDialog_Reserved(); 01932 private: 01933 TInt& iNumber; 01934 }; 01935 01936 01937 //-------------------------------------- 01938 //class CAknMultilineIpQueryDialog 01939 //-------------------------------------- 01940 01952 NONSHARABLE_CLASS(CAknMultiLineIpQueryDialog) : public CAknMultiLineDataQueryDialog 01953 { 01954 public: 01959 IMPORT_C static CAknMultiLineIpQueryDialog* NewL(TInetAddr& aAddress1, TInetAddr& aAddress2, TTone aTone = ENoTone); 01960 01961 IMPORT_C virtual ~CAknMultiLineIpQueryDialog(); 01962 01963 protected: 01969 template <class T1, class T2> void SetDataL(T1& aData1, T2& aData2) 01970 { 01971 iFirstData = new (ELeave) TAknQueryData<T1>(aData1); 01972 iSecondData = new (ELeave) TAknQueryData<T2>(aData2); 01973 } 01974 01980 template <class T1, class T2> static CAknMultiLineIpQueryDialog* 01981 DoNewL(T1& aData1, T2& aData2, const TTone& aTone) 01982 { 01983 CAknMultiLineIpQueryDialog* self = new (ELeave) CAknMultiLineIpQueryDialog(aTone); 01984 CleanupStack::PushL(self); 01985 01986 self->SetDataL(aData1,aData2); 01987 01988 CleanupStack::Pop(self); 01989 return self; 01990 } 01991 01992 private: 01993 CAknMultiLineIpQueryDialog(const TTone& aTone); 01994 01995 public: 01996 02003 IMPORT_C void SetPromptL(const TDesC& aFirstPrompt, const TDesC& aSecondPrompt); 02004 02005 public: 02006 02011 IMPORT_C void SetMaxLengthOfFirstEditor(TInt aFirstTextEditorMaxLength); 02012 02017 IMPORT_C void SetMaxLengthOfSecondEditor(TInt aSecondTextEditorMaxLength); 02018 02019 protected://from CEikDialog 02020 02030 IMPORT_C virtual TBool OkToExitL(TInt aButtonId); 02031 02037 IMPORT_C void PreLayoutDynInitL(); 02038 02039 #start_since SINCE_3_1_SDK 02040 02043 IMPORT_C void HandleResourceChange(TInt aType); 02044 #end_since SINCE_3_1_SDK 02045 protected: 02050 IMPORT_C void UpdateLeftSoftKeyL(); 02051 02056 IMPORT_C void DoSetPromptL(); 02057 02058 protected: 02066 IMPORT_C TBool NeedToDismissQueryL(const TKeyEvent& aKeyEvent); 02067 02068 protected: 02074 IMPORT_C CAknExtMultilineQueryControl* FirstControl() const; 02075 02081 IMPORT_C CAknExtMultilineQueryControl* SecondControl() const; 02082 02088 IMPORT_C CAknQueryControl* QueryControl() const; 02089 02090 protected: 02094 IMPORT_C TPtrC SecondPrompt() const; 02095 02096 private: 02097 void HandleOrientationSwitch(); 02098 TBool FirstLineEnabled() const; 02099 TBool SecondLineEnabled() const; 02100 TInt CurrentLine() const; 02101 02102 private: 02103 TDesC* iSecondPrompt; 02104 02105 MAknQueryData* iFirstData; 02106 MAknQueryData* iSecondData; 02107 02108 TInt iFirstEditorMaxLength; 02109 TInt iSecondEditorMaxLength; 02110 02111 private: 02112 TDes16* iText; 02113 TDes16* iSecondText; 02114 }; 02115 02116 #endif