00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef AKNQUERYDIALOG_H
00020 #define AKNQUERYDIALOG_H
00021
00022
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 class CAknQueryDialogExtension;
00041 class CAknMultilineQueryDialogExtension;
00042
00048 class CAknQueryDialog : public CAknDialog , public MAknQueryControlObserver
00049 {
00050 friend class CAknQueryDialogExtension;
00051 public:
00052
00060 enum TTone {
00061
00065 ENoTone = 0,
00066
00070 EConfirmationTone = EAvkonSIDConfirmationTone,
00071
00075 EWarningTone = EAvkonSIDWarningTone,
00076
00080 EErrorTone = EAvkonSIDErrorTone
00081 };
00082
00083 public:
00084
00092 IMPORT_C static CAknQueryDialog* NewL(const TTone& aTone = ENoTone);
00093
00098 IMPORT_C static CAknQueryDialog* NewL(TDes& aText, const TTone& aTone = ENoTone);
00099
00104 IMPORT_C static CAknQueryDialog* NewL(TInt& aNumber, const TTone& aTone = ENoTone);
00105
00110 IMPORT_C static CAknQueryDialog* NewL(TTime& aTime, const TTone& aTone = ENoTone);
00111
00116 IMPORT_C static CAknQueryDialog* NewL(TTimeIntervalSeconds& aTime, const TTone& aTone = ENoTone);
00117
00122 IMPORT_C static CAknQueryDialog* NewL(TReal& aNumber, const TTone& aTone = ENoTone);
00123
00128 IMPORT_C static CAknQueryDialog* NewL(TInetAddr& aInetAddr, const TTone& aTone = ENoTone);
00129
00135 IMPORT_C static CAknQueryDialog* NewL(TPosition &aValue, const TTone &aTone = ENoTone);
00136
00137 public:
00138 IMPORT_C virtual ~CAknQueryDialog();
00139
00145 IMPORT_C CAknQueryDialog(const TTone& aTone);
00146
00147 public:
00148
00153 IMPORT_C virtual CAknPopupHeadingPane* QueryHeading() const;
00154
00160 IMPORT_C CAknPopupHeadingPane* Heading() const;
00161
00167 IMPORT_C void SetPromptL(const TDesC& aPrompt);
00168
00173 IMPORT_C void MakeLeftSoftkeyVisible(TBool aVisible);
00174
00184 IMPORT_C void SetEmergencyCallSupport( TBool aOnOff );
00185
00191 IMPORT_C void RemoveEditorIndicator();
00192
00203 IMPORT_C void SetPredictiveTextInputPermitted( TBool aPermitted );
00204
00210 IMPORT_C TInt RunLD();
00211
00222 IMPORT_C TInt ExecuteLD(TInt aResourceId);
00223
00230 IMPORT_C TInt ExecuteLD(TInt aResourceId, const TDesC& aPrompt);
00231
00232 public:
00233
00243 IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
00244
00248 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00249
00250 public:
00251
00262 IMPORT_C static TInt MaxTextLength(const CAknQueryControl* aControl, const TDes& aDataText, TInt aApiValue) ;
00263
00264 protected:
00265
00273 IMPORT_C void SetSizeAndPosition(const TSize& aSize);
00274
00280 IMPORT_C void PreLayoutDynInitL(void);
00281
00287 IMPORT_C void PostLayoutDynInitL();
00288
00298 IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
00299
00300 public:
00301
00308 IMPORT_C TBool HandleQueryEditorSizeEventL(CAknQueryControl* aQueryControl, TQueryControlEvent aEventType);
00309
00317 IMPORT_C TBool HandleQueryEditorStateEventL(CAknQueryControl* aQueryControl, TQueryControlEvent aEventType, TQueryValidationStatus aStatus);
00318
00323 IMPORT_C virtual TBool NeedToDismissQueryL(const TKeyEvent& aKeyEvent);
00324
00331 IMPORT_C virtual void DismissQueryL();
00332
00333 protected:
00334
00339 IMPORT_C virtual void UpdateLeftSoftKeyL();
00340
00345 IMPORT_C virtual void DoSetPromptL();
00346
00351 IMPORT_C virtual CAknQueryControl* QueryControl() const;
00352
00353 protected:
00354
00358 void PlayTone();
00359
00363 void ReportUserActivity() const ;
00364
00368 void LayoutAndDraw();
00369
00374 TInt GetLeftCBAShortKeyPress();
00375
00380 TInt GetRightCBAShortKeyPress();
00381
00386 TBool IsLeftSoftkeyVisible();
00387
00388 protected:
00389
00393 IMPORT_C TPtrC Prompt() const;
00394
00398 TTone& Tone() { return iTone; }
00399
00403 const TTone& Tone() const { return iTone; }
00404
00408 TBitFlags16& Flags() { return iFlags; }
00409
00413 const TBitFlags16& Flags() const { return iFlags; }
00414
00418 CAknKeySoundSystem* SoundSystem() const { return iSoundSystem; }
00419
00420 protected:
00421
00435 CCoeControl* FindControlOnAnyPageWithControlType(TInt aControlType, TInt* aLineIndex=0, TInt* aPageIndex=0) const;
00436
00437 protected:
00438
00445 TTone iTone;
00446
00448 TDesC *iPrompt;
00449
00451 CAknQueryDialogExtension* iExtension;
00452
00457 TBitFlags16 iFlags;
00458
00460 TInt iSpare_1;
00461
00463 CAknKeySoundSystem* iSoundSystem;
00464
00465 public:
00466
00470 IMPORT_C CAknQueryDialog();
00471
00475 IMPORT_C CAknQueryDialog(TDesC& aPrompt,const TTone& aTone = ENoTone);
00476
00480 IMPORT_C void SetHeaderTextL(const TDesC& aHeader);
00481
00485 IMPORT_C void SetHeaderImageL(CEikImage* aImage);
00486
00490 IMPORT_C TInt RunDlgLD(TInt aResourceId);
00491
00495 IMPORT_C static TInt MaxTextLength(const CAknQueryControl* aControl, const TDes* aDataText, TInt aApiValue);
00496
00497 private:
00498
00499 IMPORT_C void* ExtensionInterface( TUid aInterface );
00500
00501 private:
00502 IMPORT_C virtual void CEikDialog_Reserved_1();
00503 IMPORT_C virtual void CEikDialog_Reserved_2();
00504
00505 private:
00506 IMPORT_C virtual void CAknDialog_Reserved();
00507
00508 private:
00509 IMPORT_C virtual void CAknQueryDialog_Reserved();
00510
00511 public:
00518 IMPORT_C TCoeInputCapabilities InputCapabilities() const;
00519
00542 IMPORT_C void SetEmergencyCallSupportForCBA( TBool aOnOff );
00543
00544 };
00545
00546
00547
00548
00549
00550
00551 #define CAknStaticSizeDataQuerydialog CAknTextQueryDialog
00552
00556 class CAknTextQueryDialog : public CAknQueryDialog
00557 {
00558
00559 public:
00560
00565 IMPORT_C static CAknTextQueryDialog* NewL(TDes& aDataText, const TTone& aTone = ENoTone);
00566
00567 public:
00568
00573 IMPORT_C CAknTextQueryDialog(TDes& aDataText, const TTone& aTone = ENoTone);
00574
00578 IMPORT_C virtual ~CAknTextQueryDialog();
00579
00580 public:
00581
00587 IMPORT_C void SetMaxLength(TInt aLength);
00588
00594 IMPORT_C virtual TBool CheckIfEntryTextOk() const;
00595
00607 IMPORT_C void SetDefaultInputMode(TInt aInputMode);
00608
00609 protected:
00610
00617 IMPORT_C void PreLayoutDynInitL();
00618
00628 IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
00629
00630 public:
00631
00638 IMPORT_C TBool HandleQueryEditorSizeEventL(CAknQueryControl* aQueryControl, TQueryControlEvent aEventType);
00639
00640 public:
00641
00645 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00646
00647 protected:
00648
00653 void SetControlTextL();
00654
00658 inline TDes& Text() { return iDataText; }
00659
00663 inline const TDesC& Text() const { return iDataText; }
00664
00665 protected:
00666
00674 TInt iTextMaxLength;
00675
00679 TDes& iDataText;
00680
00682 TBool iEditorTextOk;
00683
00684 public:
00685
00689 IMPORT_C CAknTextQueryDialog(TDes& aDataText, TDesC& aPrompt,const TTone& aTone = ENoTone);
00690
00691 private:
00695 IMPORT_C void* ExtensionInterface( TUid aInterface );
00696
00697 private:
00698 IMPORT_C virtual void CEikDialog_Reserved_1();
00699 IMPORT_C virtual void CEikDialog_Reserved_2();
00700
00701 private:
00702 IMPORT_C virtual void CAknDialog_Reserved();
00703
00704 private:
00705 IMPORT_C virtual void CAknQueryDialog_Reserved();
00706
00707 private:
00708 TInt iSpare;
00709 };
00710
00711
00712
00713
00714
00718 class CAknNumberQueryDialog : public CAknQueryDialog
00719 {
00720
00721 public:
00722
00727 IMPORT_C static CAknNumberQueryDialog* NewL(TInt& aNumber, const TTone& aTone = ENoTone);
00728
00729 public:
00730
00734 IMPORT_C CAknNumberQueryDialog(TInt& aNumber, const TTone& aTone = ENoTone);
00735
00739 IMPORT_C virtual ~CAknNumberQueryDialog();
00740
00741 public:
00742
00749 IMPORT_C void SetMinimumAndMaximum(TInt aMinimumValue, TInt aMaximumValue);
00750
00751 public:
00752
00756 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00757
00758 protected:
00759
00766 IMPORT_C void PreLayoutDynInitL();
00767
00777 IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
00778
00782 inline TInt& Number() { return iNumber; }
00783
00787 inline const TInt& Number() const { return iNumber; }
00788
00789 private:
00793 IMPORT_C void* ExtensionInterface( TUid aInterface );
00794
00795 private:
00796 IMPORT_C virtual void CEikDialog_Reserved_1();
00797 IMPORT_C virtual void CEikDialog_Reserved_2();
00798
00799 private:
00800 IMPORT_C virtual void CAknDialog_Reserved();
00801
00802 private:
00803 IMPORT_C virtual void CAknQueryDialog_Reserved();
00804
00805 protected:
00806
00810 TInt& iNumber;
00811
00812 private:
00813 TInt iSpare;
00814 };
00815
00816
00817
00818
00819
00823 class CAknTimeQueryDialog : public CAknQueryDialog
00824 {
00825
00826 public:
00827
00832 IMPORT_C static CAknTimeQueryDialog* NewL(TTime& aTime, const TTone& aTone = ENoTone);
00833
00834 public:
00835
00839 IMPORT_C CAknTimeQueryDialog(TTime& aTime, const TTone& aTone = ENoTone);
00840
00844 IMPORT_C virtual ~CAknTimeQueryDialog();
00845
00846 public:
00847
00855 IMPORT_C void SetMinimumAndMaximum(const TTime& aMinimum, const TTime& aMaximum);
00856
00857 public:
00858
00862 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00863
00864 protected:
00865
00872 IMPORT_C void PreLayoutDynInitL();
00873
00883 IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
00884
00888 inline TTime& Time() { return iTime; }
00889
00893 inline const TTime& Time() const { return iTime; }
00894
00895 protected:
00896
00900 TTime& iTime;
00901
00902 public:
00903
00907 IMPORT_C CAknTimeQueryDialog(TTime& aTime,TDesC& aPrompt,const TTone& aTone = ENoTone);
00908
00909 private:
00913 IMPORT_C void* ExtensionInterface( TUid aInterface );
00914
00915 private:
00916 IMPORT_C virtual void CEikDialog_Reserved_1();
00917 IMPORT_C virtual void CEikDialog_Reserved_2();
00918
00919 private:
00920 IMPORT_C virtual void CAknDialog_Reserved();
00921
00922 private:
00923 IMPORT_C virtual void CAknQueryDialog_Reserved();
00924
00925 private:
00926 TInt iSpare;
00927 };
00928
00929
00930
00931
00932
00936 class CAknDurationQueryDialog : public CAknQueryDialog
00937 {
00938
00939 public:
00940
00945 IMPORT_C static CAknDurationQueryDialog* NewL(TTimeIntervalSeconds& aTime, const TTone& aTone = ENoTone);
00946
00947 public:
00948
00952 IMPORT_C CAknDurationQueryDialog(TTimeIntervalSeconds& aDuration, const TTone& aTone = ENoTone);
00953
00957 IMPORT_C virtual ~CAknDurationQueryDialog();
00958
00959 public:
00960
00968 IMPORT_C void SetMinimumAndMaximum(const TTimeIntervalSeconds& aMinimumDuration, const TTimeIntervalSeconds& aMaximumDuration);
00969
00970 public:
00971
00975 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00976
00977 protected:
00978
00985 IMPORT_C void PreLayoutDynInitL();
00986
00996 IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
00997
01001 inline TTimeIntervalSeconds& Duration() { return iDuration; }
01002
01006 inline const TTimeIntervalSeconds& Duration() const { return iDuration; }
01007
01008 private:
01012 IMPORT_C void* ExtensionInterface( TUid aInterface );
01013
01014 private:
01015 IMPORT_C virtual void CEikDialog_Reserved_1();
01016 IMPORT_C virtual void CEikDialog_Reserved_2();
01017
01018 private:
01019 IMPORT_C virtual void CAknDialog_Reserved();
01020
01021 private:
01022 IMPORT_C virtual void CAknQueryDialog_Reserved();
01023
01024 protected:
01028 TTimeIntervalSeconds& iDuration;
01029
01030 private:
01031 TInt iSpare;
01032 };
01033
01034
01035
01036
01037
01041 class CAknFloatingPointQueryDialog : public CAknQueryDialog
01042 {
01043
01044 public:
01049 IMPORT_C static CAknFloatingPointQueryDialog* NewL(TReal& aNumber, const TTone& aTone = ENoTone);
01050
01051 public:
01055 IMPORT_C CAknFloatingPointQueryDialog(TReal& aNumber, const TTone& aTone = ENoTone);
01056
01060 IMPORT_C virtual ~CAknFloatingPointQueryDialog();
01061
01062 public:
01070 IMPORT_C void SetMinimumAndMaximum(const TReal& aMinimumNumber, const TReal& aMaximumNumber);
01071
01072 public:
01073
01077 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
01078
01079 protected:
01080
01087 IMPORT_C void PreLayoutDynInitL();
01088
01098 IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
01099
01103 inline TReal& Number() { return iNumber; }
01104
01108 inline const TReal& Number() const { return iNumber; }
01109
01110 private:
01114 IMPORT_C void* ExtensionInterface( TUid aInterface );
01115
01116 private:
01117 IMPORT_C virtual void CEikDialog_Reserved_1();
01118 IMPORT_C virtual void CEikDialog_Reserved_2();
01119
01120 private:
01121 IMPORT_C virtual void CAknDialog_Reserved();
01122
01123 private:
01124 IMPORT_C virtual void CAknQueryDialog_Reserved();
01125
01126 protected:
01130 TReal& iNumber;
01131
01132 private:
01133 TInt iSpare;
01134 };
01135
01136
01137
01138
01139
01140
01160 class CAknMultiLineDataQueryDialog : public CAknQueryDialog
01161 {
01162 friend class CAknMultilineQueryDialogExtension;
01163
01164 public:
01165
01175 IMPORT_C static CAknMultiLineDataQueryDialog* NewL(
01176 TTime& aTime1,
01177 TTime& aTime2,
01178 TTone aTone = ENoTone);
01179
01189 IMPORT_C static CAknMultiLineDataQueryDialog* NewL(
01190 TDes& aText1,
01191 TDes& aText2,
01192 TTone aTone = ENoTone);
01193
01203 IMPORT_C static CAknMultiLineDataQueryDialog* NewL(
01204 TDes& aText1,
01205 TTime& aTime2,
01206 TTone aTone = ENoTone);
01207
01217 IMPORT_C static CAknMultiLineDataQueryDialog* NewL(
01218 TDes& aText1,
01219 TInt& aNum2,
01220 TTone aTone = ENoTone);
01221
01231 IMPORT_C static CAknMultiLineDataQueryDialog* NewL(
01232 TDes& aText1,
01233 TTimeIntervalSeconds& aDur2,
01234 TTone aTone = ENoTone);
01235
01245 IMPORT_C static CAknMultiLineDataQueryDialog* NewL(
01246 TTime& aTime1,
01247 TTimeIntervalSeconds& aDur2,
01248 TTone aTone = ENoTone);
01249
01259 IMPORT_C static CAknMultiLineDataQueryDialog* NewL(
01260 TInt& aNum1,
01261 TInt& aNum2,
01262 TTone aTone = ENoTone);
01263
01272 IMPORT_C static CAknMultiLineDataQueryDialog* NewL(TPosition &aPos, TTone aTone = ENoTone);
01273
01274
01278 IMPORT_C virtual ~CAknMultiLineDataQueryDialog();
01279
01280 protected:
01281
01287 template <class T1, class T2> void SetDataL(T1& aData1, T2& aData2)
01288 {
01290 iFirstData = new (ELeave) TAknQueryData<T1>(aData1);
01291
01293 iSecondData = new (ELeave) TAknQueryData<T2>(aData2);
01294 }
01295
01308 template <class T1, class T2> static CAknMultiLineDataQueryDialog*
01309 DoNewL(T1& aData1, T2& aData2, const TTone& aTone)
01310 {
01311 CAknMultiLineDataQueryDialog* self =
01312 new (ELeave) CAknMultiLineDataQueryDialog(aTone);
01313
01314 CleanupStack::PushL(self);
01315
01316 self->SetDataL(aData1,aData2);
01317
01318 CleanupStack::Pop(self);
01319 return self;
01320 }
01321
01322 protected:
01323
01329 IMPORT_C CAknMultiLineDataQueryDialog(const TTone& aTone);
01330
01331 public:
01332
01340 IMPORT_C void SetPromptL(const TDesC& aFirstPrompt,
01341 const TDesC& aSecondPrompt);
01342
01343 public:
01344
01350 IMPORT_C void SetMaxLengthOfFirstEditor(
01351 TInt aFirstTextEditorMaxLength);
01352
01358 IMPORT_C void SetMaxLengthOfSecondEditor(
01359 TInt aSecondTextEditorMaxLength);
01360
01361 public:
01362
01370 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
01371
01372 protected:
01373
01385 IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
01386
01396 IMPORT_C void PreLayoutDynInitL();
01397
01415 IMPORT_C void HandleResourceChange(TInt aType);
01416
01417 protected:
01418
01423 IMPORT_C void UpdateLeftSoftKeyL();
01424
01428 IMPORT_C void DoSetPromptL();
01429
01430 protected:
01431
01436 IMPORT_C TBool NeedToDismissQueryL(const TKeyEvent& aKeyEvent);
01437
01438 protected:
01439
01445 IMPORT_C CAknMultilineQueryControl* FirstControl() const;
01446
01452 IMPORT_C CAknMultilineQueryControl* SecondControl() const;
01453
01459 IMPORT_C CAknQueryControl* QueryControl() const;
01460
01466 IMPORT_C CAknPopupHeadingPane* QueryHeading() const;
01467
01468 protected:
01469
01484 template<class T>
01485 T& FirstData(const T&)
01486 { return STATIC_CAST(TAknQueryData<T>*,iFirstData)->iData; }
01487
01502 template<class T>
01503 T& SecondData(const T&)
01504 { return STATIC_CAST(TAknQueryData<T>*,iSecondData)->iData; }
01505
01520 template<class T>
01521 const T& FirstData(const T&) const
01522 { return STATIC_CAST(TAknQueryData<T>*,iFirstData)->iData; }
01523
01538 template<class T>
01539 const T& SecondData(const T&) const
01540 { return STATIC_CAST(TAknQueryData<T>*,iSecondData)->iData; }
01541
01547 IMPORT_C TPtrC SecondPrompt() const;
01548
01549 private:
01550 void HandleOrientationSwitch();
01551 TBool FirstLineEnabled() const;
01552 TBool SecondLineEnabled() const;
01553 TInt CurrentLine() const;
01554
01555 private:
01556 TDesC* iSecondPrompt;
01557 MAknQueryData* iFirstData;
01558 MAknQueryData* iSecondData;
01559
01560 TInt iFirstEditorMaxLength;
01561 TInt iSecondEditorMaxLength;
01562
01563 public:
01564
01574 IMPORT_C CAknMultiLineDataQueryDialog(
01575 TTime* aTime,
01576 TTime* aTime2,
01577 TDesC* aPrompt=NULL,
01578 TDesC* aPrompt2=NULL,
01579 const TTone& aTone = ENoTone);
01580
01590 IMPORT_C CAknMultiLineDataQueryDialog(
01591 TDes* aDataText,
01592 TDes* aDataText2,
01593 TDesC* aPrompt=NULL,
01594 TDesC* aPrompt2=NULL,
01595 const TTone& aTone = ENoTone);
01596
01606 IMPORT_C CAknMultiLineDataQueryDialog(
01607 TDes* aDataText,
01608 TTime* aTime,
01609 TDesC* aPrompt=NULL,
01610 TDesC* aPrompt2=NULL,
01611 const TTone& aTone = ENoTone);
01612
01622 IMPORT_C CAknMultiLineDataQueryDialog(
01623 TDes* aDataText,
01624 TInt* aNumber,
01625 TDesC* aPrompt=NULL,
01626 TDesC* aPrompt2=NULL,
01627 const TTone& aTone = ENoTone);
01628
01638 IMPORT_C CAknMultiLineDataQueryDialog(
01639 TDes* aDataText,
01640 TTimeIntervalSeconds* aDuration,
01641 TDesC* aPrompt=NULL,
01642 TDesC* aPrompt2=NULL,
01643 const TTone& aTone = ENoTone);
01644
01654 IMPORT_C CAknMultiLineDataQueryDialog(
01655 TTime* aTime,
01656 TTimeIntervalSeconds* aDuration,
01657 TDesC* aPrompt=NULL,
01658 TDesC* aPrompt2=NULL,
01659 const TTone& aTone = ENoTone);
01660
01670 IMPORT_C CAknMultiLineDataQueryDialog(
01671 TInt* aNumber,
01672 TInt* aNumber2,
01673 TDesC* aPrompt=NULL,
01674 TDesC* aPrompt2=NULL,
01675 const TTone& aTone = ENoTone);
01676
01677 private:
01681 IMPORT_C void* ExtensionInterface( TUid aInterface );
01682
01683 private:
01684 IMPORT_C virtual void CEikDialog_Reserved_1();
01685 IMPORT_C virtual void CEikDialog_Reserved_2();
01686
01687 private:
01688 IMPORT_C virtual void CAknDialog_Reserved();
01689
01690 private:
01691 IMPORT_C virtual void CAknQueryDialog_Reserved();
01692
01693 protected:
01699 TDes16* iText;
01700
01706 TDes16* iSecondText;
01707 };
01708
01709
01710
01711
01712
01713 #include <aknlistquerydialog.h>
01714
01715
01716
01717
01718
01719
01726 NONSHARABLE_CLASS(CAknIpAddressQueryDialog) : public CAknQueryDialog
01727 {
01728
01729 public:
01734 IMPORT_C static CAknIpAddressQueryDialog* NewL(TInetAddr& aInetAddr, const TTone& aTone = ENoTone);
01735
01736 private:
01737 CAknIpAddressQueryDialog(TInetAddr& aInetAddr, const TTone& aTone = ENoTone);
01738
01739 public:
01743 IMPORT_C virtual ~CAknIpAddressQueryDialog();
01744
01745 public:
01753 IMPORT_C void SetMinimumAndMaximum(const TInetAddr& aMinimumAddress, const TInetAddr& aMaximumAddress);
01754
01760 IMPORT_C virtual TBool NeedToDismissQueryL(const TKeyEvent& aKeyEvent);
01761
01762
01763 protected:
01764
01769 IMPORT_C virtual CAknQueryControl* QueryControl() const;
01770
01771 protected:
01772
01779 IMPORT_C void SetSizeAndPosition(const TSize& aSize);
01780
01786 IMPORT_C void PreLayoutDynInitL();
01787
01793 IMPORT_C void PostLayoutDynInitL();
01794
01799 IMPORT_C virtual void DoSetPromptL();
01800
01810 IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
01811
01816 IMPORT_C void UpdateLeftSoftKeyL();
01817
01821 inline TInetAddr& InetAddr() { return iInetAddr; }
01822
01826 inline const TInetAddr& InetAddr() const { return iInetAddr; }
01827
01828 private:
01829 IMPORT_C virtual void CEikDialog_Reserved_1();
01830 IMPORT_C virtual void CEikDialog_Reserved_2();
01831
01832 private:
01833 IMPORT_C virtual void CAknDialog_Reserved();
01834
01835 private:
01836 IMPORT_C virtual void CAknQueryDialog_Reserved();
01837
01838 protected:
01842 TInetAddr& iInetAddr;
01843 };
01844
01845
01846
01847
01848
01849
01856 NONSHARABLE_CLASS(CAknFixedPointQueryDialog) : public CAknQueryDialog
01857 {
01858 public:
01863 IMPORT_C static CAknFixedPointQueryDialog* NewL(TInt& aNumber, const TTone& aTone);
01864
01865 private:
01866 CAknFixedPointQueryDialog(TInt& aNumber, const TTone& aTone = ENoTone);
01867
01868 public:
01869
01873 IMPORT_C virtual ~CAknFixedPointQueryDialog();
01874
01875 public:
01882 IMPORT_C void SetMinimumAndMaximum(TInt aMinimumValue, TInt aMaximumValue);
01883
01884 IMPORT_C virtual TBool NeedToDismissQueryL(const TKeyEvent& aKeyEvent);
01885
01886
01887 protected:
01888
01894 IMPORT_C virtual CAknQueryControl* QueryControl() const;
01895
01896 protected:
01897
01904 IMPORT_C void SetSizeAndPosition(const TSize& aSize);
01905
01911 IMPORT_C void PreLayoutDynInitL();
01912
01918 IMPORT_C void PostLayoutDynInitL();
01919
01924 IMPORT_C virtual void DoSetPromptL();
01925
01935 IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
01936
01941 IMPORT_C void UpdateLeftSoftKeyL();
01942
01946 inline TInt& Number() { return iNumber; }
01947
01951 inline const TInt& Number() const { return iNumber; }
01952
01953 private:
01954 IMPORT_C virtual void CEikDialog_Reserved_1();
01955 IMPORT_C virtual void CEikDialog_Reserved_2();
01956 private:
01957 IMPORT_C virtual void CAknDialog_Reserved();
01958 private:
01959 IMPORT_C virtual void CAknQueryDialog_Reserved();
01960 private:
01961 TInt& iNumber;
01962 };
01963
01964
01965
01966
01967
01968
01980 NONSHARABLE_CLASS(CAknMultiLineIpQueryDialog) : public CAknMultiLineDataQueryDialog
01981 {
01982 friend class CAknMultilineQueryDialogExtension;
01983 public:
01988 IMPORT_C static CAknMultiLineIpQueryDialog* NewL(TInetAddr& aAddress1, TInetAddr& aAddress2, TTone aTone = ENoTone);
01989
01990 IMPORT_C virtual ~CAknMultiLineIpQueryDialog();
01991
01992 protected:
01998 template <class T1, class T2> void SetDataL(T1& aData1, T2& aData2)
01999 {
02000 iFirstData = new (ELeave) TAknQueryData<T1>(aData1);
02001 iSecondData = new (ELeave) TAknQueryData<T2>(aData2);
02002 }
02003
02009 template <class T1, class T2> static CAknMultiLineIpQueryDialog*
02010 DoNewL(T1& aData1, T2& aData2, const TTone& aTone)
02011 {
02012 CAknMultiLineIpQueryDialog* self = new (ELeave) CAknMultiLineIpQueryDialog(aTone);
02013 CleanupStack::PushL(self);
02014
02015 self->SetDataL(aData1,aData2);
02016
02017 CleanupStack::Pop(self);
02018 return self;
02019 }
02020
02021 private:
02022 CAknMultiLineIpQueryDialog(const TTone& aTone);
02023
02024 public:
02025
02032 IMPORT_C void SetPromptL(const TDesC& aFirstPrompt, const TDesC& aSecondPrompt);
02033
02034 public:
02035
02040 IMPORT_C void SetMaxLengthOfFirstEditor(TInt aFirstTextEditorMaxLength);
02041
02046 IMPORT_C void SetMaxLengthOfSecondEditor(TInt aSecondTextEditorMaxLength);
02047
02048 protected:
02049
02059 IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
02060
02066 IMPORT_C void PreLayoutDynInitL();
02067
02068 IMPORT_C void HandleResourceChange(TInt aType);
02069
02070 protected:
02075 IMPORT_C void UpdateLeftSoftKeyL();
02076
02081 IMPORT_C void DoSetPromptL();
02082
02083 protected:
02091 IMPORT_C TBool NeedToDismissQueryL(const TKeyEvent& aKeyEvent);
02092
02093 protected:
02099 IMPORT_C CAknExtMultilineQueryControl* FirstControl() const;
02100
02106 IMPORT_C CAknExtMultilineQueryControl* SecondControl() const;
02107
02113 IMPORT_C CAknQueryControl* QueryControl() const;
02114
02115 protected:
02119 IMPORT_C TPtrC SecondPrompt() const;
02120
02121 private:
02122 void HandleOrientationSwitch();
02123 TBool FirstLineEnabled() const;
02124 TBool SecondLineEnabled() const;
02125 TInt CurrentLine() const;
02126
02127 private:
02128 TDesC* iSecondPrompt;
02129
02130 MAknQueryData* iFirstData;
02131 MAknQueryData* iSecondData;
02132
02133 TInt iFirstEditorMaxLength;
02134 TInt iSecondEditorMaxLength;
02135
02136 private:
02137 TDes16* iText;
02138 TDes16* iSecondText;
02139 };
02140
02141 #endif // AKNQUERYDIALOG_H