aknqueryvaluedate.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : AknQueryValueDate.h
00004 *  Part of  : Avkon
00005 *
00006 *  Description:
00007 *  Version:
00008 *
00009 *  Copyright © 2002 Nokia Corporation.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation. All rights are reserved. Copying, 
00013 *  including reproducing, storing,  adapting or translating, any 
00014 *  or all of this material requires the prior written consent of 
00015 *  Nokia Corporation. This material also contains confidential 
00016 *  information which may not be disclosed to others without the 
00017 *  prior written consent of Nokia Corporation.
00018 * ============================================================================
00019 */
00020 // AknQueryValueDate.h
00021 //
00022 // Copyright (c) 2001 Symbian Ltd.  All rights reserved.
00023 //
00024 
00025 #if !defined(__AKNQUERYVALUEDATE_H__)
00026 #define __AKNQUERYVALUEDATE_H__
00027 
00028 #include <bamdesca.h>
00029 #include <eikdialg.h>
00030 #include "AknQueryValue.h"
00031 
00032 class CAknQueryValueDateArray;
00033 
00040 NONSHARABLE_CLASS(CAknQueryValueDate) : public CAknQueryValue
00041     {
00042 public:
00047         IMPORT_C static CAknQueryValueDate* NewL();
00048         
00053         IMPORT_C static CAknQueryValueDate* NewLC();
00054 
00059         IMPORT_C virtual ~CAknQueryValueDate();
00060         
00066         IMPORT_C void SetArrayL(const CAknQueryValueDateArray* aArray);
00067         
00074         IMPORT_C void SetQueryCaption(TInt aResourceId);
00075         
00080         IMPORT_C TTime Value() const;
00081 
00082 public: // from MAknQueryValue
00083     IMPORT_C virtual const MDesCArray* MdcArray() const;
00084     IMPORT_C virtual HBufC* CurrentValueTextLC();
00085     IMPORT_C virtual TInt CurrentValueIndex() const;
00086     IMPORT_C virtual void SetCurrentValueIndex(const TInt aIndex);
00087     IMPORT_C virtual TBool CreateEditorL();
00088     
00089 protected:
00090         CAknQueryValueDate();
00091         
00096         void ConstructL();
00097         
00103         void CalculateCurrentIndex();
00104         
00105         virtual void AppendValueIfNewL();
00106         
00107 private: // from MAknQueryValue
00108         IMPORT_C void Reserved_MAknQueryValue();
00109 
00110 private:
00111         // the following are member variables
00112         TInt iQueryCaptionId;
00113         TTime iTime;
00114         TInt iCurrentIndex;
00115         // the following are not owned
00116         const CAknQueryValueDateArray* iArray;
00117     };
00118 
00119 
00124 NONSHARABLE_CLASS(CAknQueryValueDateArray) : public CBase, public MDesCArray
00125         {
00126 public:
00131         typedef CArrayFix<TTime> TimeArray;
00132         
00133 
00134         enum {KSafeSizeOfDescriptorForTTimeFormat = 128};
00135         
00136 public:
00141         IMPORT_C static CAknQueryValueDateArray* NewL(TInt aResourceId);
00142         
00147         IMPORT_C static CAknQueryValueDateArray* NewLC(TInt aResourceId);
00148         
00149         IMPORT_C ~CAknQueryValueDateArray();
00150         
00158         IMPORT_C void SetArray(TimeArray& aArray);
00159         
00167         IMPORT_C TimeArray* Array() const;
00168         
00174         IMPORT_C const HBufC* FormatString() const;
00175         
00176 #ifdef __WINS__
00177 
00184         IMPORT_C const TInt FormattedStringSize() const;
00185 #else
00186 
00190         IMPORT_C TInt FormattedStringSize() const;
00191 // __WINS__
00192 #endif
00193 
00194 public:
00195         // from MDesCArray
00200     IMPORT_C virtual TInt MdcaCount() const;
00201     
00210     IMPORT_C virtual TPtrC MdcaPoint(TInt aIndex) const;
00211     
00212 protected:
00213         CAknQueryValueDateArray();
00214         
00219         void ConstructL(TInt aResourceId);
00220         
00221 private:
00222         // the following members are owned
00223         HBufC* iLastGeneratedTextValue;
00224         HBufC* iFormatString;
00225         // the following members are not owned
00226         TimeArray* iArray;
00227         TInt iFormattedStringSize;
00228         };
00229 
00230 // __AKNQUERYVALUEDATE_H__
00231 #endif
00232 

Copyright © Nokia Corporation 2001-2008
Back to top