classicui_plat/dialogs_api/tsrc/inc/testsdkdialogscontrol.h
branchRCL_3
changeset 19 aecbbf00d063
equal deleted inserted replaced
18:fcdfafb36fe7 19:aecbbf00d063
       
     1 /*
       
     2 * Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Test EIKDIALG.H
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_TESTSDKDIALOGSCONTROL_H
       
    20 #define C_TESTSDKDIALOGSCONTROL_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <eikdialg.h>
       
    24 #include <eikcapc.h> 
       
    25 #include <aknmediatorobserver.h>
       
    26 #include <fldbase.h>
       
    27 #include <eikmfne.h> 
       
    28 
       
    29 class CTestSDKDialogsControl : public CEikDialog, 
       
    30                                public MAknDialogMediatorObserver, 
       
    31                                public MTextFieldFactory
       
    32     {
       
    33 public:// Constructors and destructor
       
    34     
       
    35     /**
       
    36     * C++ default constructor.
       
    37     */
       
    38     CTestSDKDialogsControl();
       
    39     
       
    40     /**
       
    41     * Destructor.
       
    42     */
       
    43     ~CTestSDKDialogsControl();
       
    44 
       
    45     /**
       
    46     *  CTestSDKDialogsSetInitialCurrentLine test function for testing the 
       
    47     * Test SetInitialCurrentLine function
       
    48     */
       
    49     void CTestSDKDialogsSetInitialCurrentLine();
       
    50     
       
    51     /**
       
    52     *  CTestSDKDialogsSetInitialCurrentLine test function for testing the 
       
    53     * Test CurrentLine function
       
    54     */
       
    55     CEikCaptionedControl* CTestSDKDialogsCurrentLine();
       
    56     
       
    57     /**
       
    58     *  MediatorCommandL test function for testing the 
       
    59     * Test MediatorCommandL function
       
    60     */
       
    61     TAknDialogMediatorObserverCommand MediatorCommandL( TUid aDomain,
       
    62         TUid aCategory, 
       
    63         TInt aCommandId,
       
    64         const TDesC8& aData );
       
    65     
       
    66     /**
       
    67     *  NotifyMediatorExit test function for testing the 
       
    68     * Test NotifyMediatorExit function
       
    69     */
       
    70     void NotifyMediatorExit();
       
    71     
       
    72     /**
       
    73     *  CTestSDKSetMediatorObserver test function for testing the 
       
    74     * Test SetMediatorObserver function
       
    75     */
       
    76     void CTestSDKSetMediatorObserver();
       
    77     
       
    78     /**
       
    79     *  NewFieldL test function for testing the 
       
    80     * Test NewFieldL function
       
    81     */
       
    82     CTextField* NewFieldL( TUid aFieldType );
       
    83     
       
    84     /**
       
    85     *  PrepareForFocusTransitionL test function for testing the 
       
    86     * Test PrepareForFocusTransitionL function
       
    87     */
       
    88     void PrepareForFocusTransitionL();
       
    89     
       
    90     /**
       
    91     *  IdOfFocusControl test function for testing the 
       
    92     * Test IdOfFocusControl function
       
    93     */
       
    94     TInt IdOfFocusControl();
       
    95     
       
    96     /**
       
    97     *  PageChangedL test function for testing the 
       
    98     * Test PageChangedL function
       
    99     */
       
   100     void PageChangedL( TInt aPageId );
       
   101     
       
   102     /**
       
   103     *  LineChangedL test function for testing the 
       
   104     * Test LineChangedL function
       
   105     */
       
   106     void LineChangedL( TInt aControlId );
       
   107     
       
   108     /**
       
   109     *  PrepareContext test function for testing the 
       
   110     * Test PrepareContext function
       
   111     */
       
   112     void PrepareContext() const;
       
   113     
       
   114     /**
       
   115     *  WriteInternalStateL test function for testing the 
       
   116     * Test WriteInternalStateL function
       
   117     */
       
   118     void WriteInternalStateL( RWriteStream& aWriteStream ) const;
       
   119     
       
   120     /**
       
   121     *  CountComponentControls test function for testing the 
       
   122     * Test CountComponentControls function
       
   123     */
       
   124     TInt CountComponentControls() const;
       
   125     
       
   126     /**
       
   127     *  ComponentControl test function for testing the 
       
   128     * Test ComponentControl function
       
   129     */
       
   130     CCoeControl* ComponentControl( TInt aIndex ) const;
       
   131     
       
   132     /**
       
   133     *  GetNumberOfLinesOnPage test function for testing the 
       
   134     * Test GetNumberOfLinesOnPage function
       
   135     */
       
   136     TInt GetNumberOfLinesOnPage( TInt aPageIndex ) const;
       
   137     
       
   138     /**
       
   139     *  GetNumberOfPages test function for testing the 
       
   140     * Test GetNumberOfPages function
       
   141     */
       
   142     TInt GetNumberOfPages() const;
       
   143     
       
   144     /**
       
   145     *  GetLineByLineAndPageIndex test function for testing the 
       
   146     * Test GetLineByLineAndPageIndex function
       
   147     */
       
   148     CEikCaptionedControl* GetLineByLineAndPageIndex( TInt aLineIndex, TInt aPageIndex ) const;
       
   149     
       
   150     /**
       
   151     *  HandleControlEventL test function for testing the 
       
   152     * Test HandleControlEventL function
       
   153     */
       
   154     void HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType );
       
   155     
       
   156     /**
       
   157     *  TryExitL test function for testing the 
       
   158     * Test TryExitL function
       
   159     */
       
   160     void TryExitL(TInt aButtonId);
       
   161     
       
   162     /**
       
   163     *  AdjustAllIdsOnPage test function for testing the 
       
   164     * Test AdjustAllIdsOnPage function
       
   165     */
       
   166     void AdjustAllIdsOnPage( TInt aPageId, TInt aControlIdDelta );
       
   167     
       
   168     /**
       
   169     *  ConstructSleepingDialogL test function for testing the 
       
   170     * Test ConstructSleepingDialogL function
       
   171     */
       
   172     void ConstructSleepingDialogL( TInt aResourceId );
       
   173     
       
   174     /**
       
   175     *  ConstructSleepingAlertDialogL test function for testing the 
       
   176     * Test ConstructSleepingAlertDialogL function
       
   177     */
       
   178     void ConstructSleepingAlertDialogL( TInt aResourceId );
       
   179     
       
   180     /**
       
   181     *  RouseSleepingDialog test function for testing the 
       
   182     * Test RouseSleepingDialog function
       
   183     */
       
   184     TInt RouseSleepingDialog();
       
   185     
       
   186     /**
       
   187     *  ExitSleepingDialog test function for testing the 
       
   188     * Test ExitSleepingDialog function
       
   189     */
       
   190     void ExitSleepingDialog();
       
   191     
       
   192     /**
       
   193     *  IdOfFocusControl test function for testing the 
       
   194     * Test IdOfFocusControl function
       
   195     */
       
   196     TInt IdOfFocusControl() const;
       
   197     
       
   198     /**
       
   199     *  FindLineIndex test function for testing the 
       
   200     * Test FindLineIndex function
       
   201     */
       
   202     TInt FindLineIndex( const CCoeControl& aControl ) const;
       
   203     
       
   204     /**
       
   205     *  Line test function for testing the 
       
   206     * Test Line function
       
   207     */
       
   208     CEikCaptionedControl* Line( TInt aControlId ) const;
       
   209     
       
   210     /**
       
   211     *  CurrentLine test function for testing the 
       
   212     * Test CurrentLine function
       
   213     */
       
   214     CEikCaptionedControl* CurrentLine() const;
       
   215     
       
   216     /**
       
   217     *  RotateFocusByL test function for testing the 
       
   218     * Test RotateFocusByL function
       
   219     */
       
   220     TBool RotateFocusByL( TInt aDelta );
       
   221     
       
   222     /**
       
   223     *  ActivePageIndex test function for testing the 
       
   224     * Test ActivePageIndex function
       
   225     */
       
   226     TInt ActivePageIndex() const;
       
   227     
       
   228     /**
       
   229     *  ResetLineMinimumSizes test function for testing the 
       
   230     * Test ResetLineMinimumSizes function
       
   231     */
       
   232     void ResetLineMinimumSizes();
       
   233     
       
   234     /**
       
   235     *  SwapButtonGroupContainer test function for testing the 
       
   236     * Test SwapButtonGroupContainer function
       
   237     */
       
   238     CEikButtonGroupContainer* SwapButtonGroupContainer( CEikButtonGroupContainer* aContainer );
       
   239     
       
   240     /**
       
   241     *  ButtonCommandObserver test function for testing the 
       
   242     * Test ButtonCommandObserver function
       
   243     */
       
   244     MEikCommandObserver* ButtonCommandObserver() const;
       
   245     
       
   246     /**
       
   247     *  ActivateGc test function for testing the 
       
   248     * Test ActivateGc function
       
   249     */
       
   250     void ActivateGc() const;
       
   251     
       
   252     /**
       
   253     *  DeactivateGc test function for testing the 
       
   254     * Test DeactivateGc function
       
   255     */
       
   256     void DeactivateGc() const;
       
   257     
       
   258     /**
       
   259     *  OkToExitL test function for testing the 
       
   260     * Test OkToExitL function
       
   261     */
       
   262     TBool OkToExitL( TInt aButtonId );
       
   263     
       
   264     /**
       
   265     *  PreLayoutDynInitL test function for testing the 
       
   266     * Test PreLayoutDynInitL function
       
   267     */
       
   268     void PreLayoutDynInitL();
       
   269     
       
   270     /**
       
   271     *  PostLayoutDynInitL test function for testing the 
       
   272     * Test PostLayoutDynInitL function
       
   273     */
       
   274     void PostLayoutDynInitL();
       
   275     
       
   276     /**
       
   277     *  SetInitialCurrentLine test function for testing the 
       
   278     * Test SetInitialCurrentLine function
       
   279     */
       
   280     void SetInitialCurrentLine();
       
   281     
       
   282     /**
       
   283     *  HandleControlStateChangeL test function for testing the 
       
   284     * Test HandleControlStateChangeL function
       
   285     */
       
   286     void HandleControlStateChangeL( TInt aControlId );
       
   287     
       
   288     /**
       
   289     *  HandleInteractionRefused test function for testing the 
       
   290     * Test HandleInteractionRefused function
       
   291     */
       
   292     void HandleInteractionRefused( TInt aControlId );
       
   293     
       
   294     /**
       
   295     *  SetSizeAndPosition test function for testing the 
       
   296     * Test SetSizeAndPosition function
       
   297     */
       
   298     void SetSizeAndPosition( const TSize& aSize );
       
   299     
       
   300     /**
       
   301     *  MappedCommandId test function for testing the 
       
   302     * Test MappedCommandId function
       
   303     */
       
   304     TInt BorderStyle();
       
   305     
       
   306     /**
       
   307     *  MappedCommandId test function for testing the 
       
   308     * Test MappedCommandId function
       
   309     */
       
   310     
       
   311     TInt MappedCommandId( TInt aButtonId );
       
   312     
       
   313     /**
       
   314     *  FormFlagsFromActivePage test function for testing the 
       
   315     * Test FormFlagsFromActivePage function
       
   316     */
       
   317     TInt FormFlagsFromActivePage();
       
   318     
       
   319     /**
       
   320     *  GetFirstLineOnFirstPageOrNull test function for testing the 
       
   321     * Test GetFirstLineOnFirstPageOrNull function
       
   322     */
       
   323     CEikCaptionedControl* GetFirstLineOnFirstPageOrNull();
       
   324     
       
   325     /**
       
   326     *  ControlsOnPage test function for testing the 
       
   327     * Test ControlsOnPage function
       
   328     */
       
   329     void ControlsOnPage( RArray<CEikCaptionedControl*>& aControls, TInt aPageId ) const;
       
   330     
       
   331     /**
       
   332     *  MopSupplyObject test function for testing the 
       
   333     * Test MopSupplyObject function
       
   334     */
       
   335     TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
       
   336     
       
   337     /**
       
   338     *  SetLabelL test function for testing the 
       
   339     * Test SetLabelL function
       
   340     */
       
   341     void SetLabelL( TInt aControlId, const TDesC& aDes );
       
   342     
       
   343     /**
       
   344     *  GetLabelText test function for testing the 
       
   345     * Test GetLabelText function
       
   346     */
       
   347     void GetLabelText( TDes& aDes,TInt aControlId ) const;
       
   348     
       
   349     /**
       
   350     *  SetLabelL test function for testing the  
       
   351     * Test SetLabelL function
       
   352     */
       
   353     void SetLabelL( TInt aControlId, TInt aResourceId );
       
   354     
       
   355     /**
       
   356     *  SetLabelReserveLengthL test function for testing the  
       
   357     * Test SetLabelReserveLengthL function
       
   358     */
       
   359     void SetLabelReserveLengthL( TInt aControlId, TInt aLength );
       
   360     
       
   361     /**
       
   362     *  SetEdwinTextL test function for testing the  
       
   363     * Test SetEdwinTextL function
       
   364     */
       
   365     void SetEdwinTextL( TInt aControlId, const TDesC* aDes );
       
   366     
       
   367     /**
       
   368     *  GetEdwinText test function for testing the  
       
   369     * Test GetEdwinText function
       
   370     */
       
   371     void GetEdwinText( TDes& aDes, TInt aControlId ) const;
       
   372     
       
   373     /**
       
   374     *  ResetSecretEditor test function for testing the  
       
   375     * Test ResetSecretEditor function
       
   376     */
       
   377     void ResetSecretEditor( TInt aControlId );
       
   378     
       
   379     /**
       
   380     *  SetTextEditorTextL test function for testing the  
       
   381     * Test SetTextEditorTextL function
       
   382     */
       
   383     void SetTextEditorTextL( TInt aControlId, const CGlobalText* aGlobalText );
       
   384     
       
   385     /**
       
   386     *  GetTextEditorText test function for testing the  
       
   387     * Test GetTextEditorText function
       
   388     */
       
   389     void GetTextEditorText( CGlobalText*& aGlobalText, TInt aControlId );
       
   390     
       
   391     /**
       
   392     *  GetSecretEditorText test function for testing the  
       
   393     * Test GetSecretEditorText function
       
   394     */
       
   395     void GetSecretEditorText( TDes& aDes, TInt aControlId ) const;
       
   396     
       
   397     /**
       
   398     *  SetFloatingPointEditorValueL test function for testing the 
       
   399     * Test SetFloatingPointEditorValueL function
       
   400     */
       
   401     void SetFloatingPointEditorValueL( TInt aControlId, const TReal* aValue );
       
   402     
       
   403     /**
       
   404     *  FloatingPointEditorValue test function for testing the  
       
   405     * Test FloatingPointEditorValue function
       
   406     */
       
   407     TReal FloatingPointEditorValue( TInt aControlId ) const;
       
   408     
       
   409     /**
       
   410     *  SetFixedPointEditorValueL test function for testing the  
       
   411     * Test SetFixedPointEditorValueL function
       
   412     */
       
   413     void SetFixedPointEditorValueL( TInt aControlId, TInt aValue );
       
   414     
       
   415     /**
       
   416     *  FixedPointEditorValue test function for testing the 
       
   417     * Test FixedPointEditorValue function
       
   418     */
       
   419     TInt FixedPointEditorValue( TInt aControlId ) const;
       
   420     
       
   421     /**
       
   422     *  SetFixedPointEditorDecimal test function for testing the  
       
   423     * Test SetFixedPointEditorDecimal function
       
   424     */
       
   425     void SetFixedPointEditorDecimal( TInt aControlId, TInt aDecimal );
       
   426     
       
   427     /**
       
   428     *  FixedPointEditorDecimal test function for testing the 
       
   429     * Test FixedPointEditorDecimal function
       
   430     */
       
   431     TInt FixedPointEditorDecimal( TInt aControlId ) const;
       
   432     
       
   433     /**
       
   434     *  SetNumberEditorMinAndMax test function for testing the  
       
   435     * Test SetNumberEditorMinAndMax function
       
   436     */
       
   437     void SetNumberEditorMinAndMax( TInt aControlId, TInt aMinimumValue, TInt aMaximumValue );
       
   438     
       
   439     /**
       
   440     *  SetNumberEditorValue test function for testing the  
       
   441     * Test SetNumberEditorValue function
       
   442     */
       
   443     void SetNumberEditorValue( TInt aControlId, TInt aNumber );
       
   444     
       
   445     /**
       
   446     *  SetFloatEditorMinAndMax test function for testing the  
       
   447     * Test SetFloatEditorMinAndMax function
       
   448     */
       
   449     void SetFloatEditorMinAndMax( TInt aControlId, TInt aMin, TInt aMax );
       
   450     
       
   451     /**
       
   452     *  NumberEditorValue test function for testing the  
       
   453     * Test NumberEditorValue function
       
   454     */
       
   455     TInt NumberEditorValue( TInt aControlId ) const;
       
   456     
       
   457     /**
       
   458     *  FloatEditorValue test function for testing the  
       
   459     * Test FloatEditorValue function
       
   460     */
       
   461     TReal FloatEditorValue( TInt aControlId ) const;
       
   462     
       
   463     /**
       
   464     *  SetFloatEditorValueL test function for testing the  
       
   465     * Test SetFloatEditorValueL function
       
   466     */
       
   467     void SetFloatEditorValueL( TInt aControlId, TReal aFloat );
       
   468     
       
   469     /**
       
   470     *  SetRangeEditorMinAndMax test function for testing the  
       
   471     * Test SetRangeEditorMinAndMax function
       
   472     */
       
   473     void SetRangeEditorMinAndMax( TInt aControlId, TInt aMinimumValue, TInt aMaximumValue );
       
   474     
       
   475     /**
       
   476     *  RangeEditorValue test function for testing the  
       
   477     * Test RangeEditorValue function
       
   478     */
       
   479     SEikRange RangeEditorValue( TInt aControlId ) const;
       
   480     
       
   481     /**
       
   482     *  SetRangeEditorValue test function for testing the  
       
   483     * Test SetRangeEditorValue function
       
   484     */
       
   485     void SetRangeEditorValue( TInt aControlId, const SEikRange& aRange );
       
   486     
       
   487     /**
       
   488     *  SetTTimeEditorMinAndMax test function for testing the  
       
   489     * Test SetTTimeEditorMinAndMax function
       
   490     */
       
   491     void SetTTimeEditorMinAndMax( TInt aControlId, 
       
   492                                   const TTime& aMinimumTime, 
       
   493                                   const TTime& aMaximumTime );
       
   494     
       
   495     /**
       
   496     *  TTimeEditorValue test function for testing the  
       
   497     * Test TTimeEditorValue function
       
   498     */
       
   499     TTime TTimeEditorValue( TInt aControlId ) const;
       
   500     
       
   501     /**
       
   502     *  SetTTimeEditorValue test function for testing the  
       
   503     * Test SetTTimeEditorValue function
       
   504     */
       
   505     void SetTTimeEditorValue( TInt aControlId, const TTime& aTime );
       
   506     
       
   507     /**
       
   508     *  SetDurationEditorMinAndMax test function for testing the  
       
   509     * Test SetDurationEditorMinAndMax function
       
   510     */
       
   511     void SetDurationEditorMinAndMax( TInt aControlId, 
       
   512                                      const TTimeIntervalSeconds& aMinimumDuration, 
       
   513                                      const TTimeIntervalSeconds& aMaximumDuration );
       
   514     
       
   515     /**
       
   516     *  SetDurationEditorValue test function for testing the  
       
   517     * Test SetDurationEditorValue function
       
   518     */
       
   519     void SetDurationEditorValue( TInt aControlId, const TTimeIntervalSeconds& aDuration );
       
   520     
       
   521     /**
       
   522     *  DurationEditorValue test function for testing the 
       
   523     * Test DurationEditorValue function
       
   524     */
       
   525     TTimeIntervalSeconds DurationEditorValue( TInt aControlId ) const;
       
   526     
       
   527     /**
       
   528     *  SetTimeOffsetEditorMinAndMax test function for testing the 
       
   529     * Test SetTimeOffsetEditorMinAndMax function
       
   530     */
       
   531     void SetTimeOffsetEditorMinAndMax( TInt aControlId, 
       
   532                                        const TTimeIntervalSeconds& aMinimumTimeOffset, 
       
   533                                        const TTimeIntervalSeconds& aMaximumTimeOffset );
       
   534     
       
   535     /**
       
   536     *  TimeOffsetEditorValue test function for testing the  
       
   537     * Test TimeOffsetEditorValue function
       
   538     */
       
   539     TTimeIntervalSeconds TimeOffsetEditorValue( TInt aControlId ) const;
       
   540     
       
   541     /**
       
   542     *  SetTimeOffsetEditorValue test function for testing the 
       
   543     * Test SetTimeOffsetEditorValue function
       
   544     */
       
   545     void SetTimeOffsetEditorValue( TInt aControlId, const TTimeIntervalSeconds& aTimeOffset );
       
   546     
       
   547     /**
       
   548     *  SetListBoxCurrentItem test function for testing the 
       
   549     * Test SetListBoxCurrentItem function
       
   550     */
       
   551     void SetListBoxCurrentItem( TInt aControlId, TInt aItem );
       
   552     
       
   553     /**
       
   554     *  ListBoxCurrentItem test function for testing the 
       
   555     * Test ListBoxCurrentItem function
       
   556     */
       
   557     TInt ListBoxCurrentItem( TInt aControlId ) const;
       
   558     
       
   559     /**
       
   560     *  SetFileNameL test function for testing the  
       
   561     * Test SetFileNameL function
       
   562     */
       
   563     void SetFileNameL( TInt aControlId, const TDesC* aFileName );
       
   564     
       
   565     /**
       
   566     *  GetFileName test function for testing the  
       
   567     * Test GetFileName function
       
   568     */
       
   569     void GetFileName( TFileName* aFileName, TInt aControlId ) const;
       
   570     
       
   571     /**
       
   572     *  UpdatePageL test function for testing the 
       
   573     * Test UpdatePageL function
       
   574     */
       
   575     void UpdatePageL( TBool aRedraw );
       
   576     
       
   577     /**
       
   578     *  GetAutoValuesFromPage test function for testing the  
       
   579     * Test GetAutoValuesFromPage function
       
   580     */
       
   581     void GetAutoValuesFromPage( CEikCapCArray* aLines );
       
   582     };
       
   583 
       
   584 
       
   585 class CMyDateTimeField : public CTextField
       
   586     {
       
   587 public:
       
   588     // from CTextField
       
   589     void InternalizeL(RReadStream& aStream)
       
   590         {
       
   591         }
       
   592     TInt Value( TPtr& aValueText )
       
   593         {
       
   594         if (aValueText.Length() == 0 )
       
   595             {
       
   596             return 0;
       
   597             }
       
   598         else
       
   599             {
       
   600             return aValueText.Length();
       
   601             }
       
   602         }
       
   603     TUid Type() const
       
   604         {
       
   605         return KDateTimeFieldUid;
       
   606         }
       
   607     };
       
   608 
       
   609 
       
   610 #endif /*C_TESTSDKDIALOGSCONTROL_H*/