aknqueryvaluetime.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : AknQueryValueTime.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 // AknQueryValueTime.h
00021 //
00022 // Copyright (c) 2001 Symbian Ltd.  All rights reserved.
00023 //
00024 
00025 #if !defined(__AKNQUERYVALUETIME_H__)
00026 #define __AKNQUERYVALUETIME_H__
00027 
00028 #include <bamdesca.h>
00029 #include <eikdialg.h>
00030 #include "AknQueryValue.h"
00031 
00032 class CAknQueryValueTimeArray;
00033 
00040 NONSHARABLE_CLASS(CAknQueryValueTime) : public CAknQueryValue
00041     {
00042 public:
00046         IMPORT_C static CAknQueryValueTime* NewL();
00047         
00051         IMPORT_C static CAknQueryValueTime* NewLC();
00052     
00053     IMPORT_C virtual ~CAknQueryValueTime();
00054         
00060         IMPORT_C void SetArrayL(const CAknQueryValueTimeArray* aArray);
00061         
00068         IMPORT_C void SetQueryCaption(TInt aResourceId);
00069         
00076         IMPORT_C TTime Value() const;
00077         
00078 public: // from MAknQueryValue
00079     IMPORT_C virtual const MDesCArray* MdcArray() const;
00080     IMPORT_C virtual HBufC* CurrentValueTextLC();
00081     IMPORT_C virtual TInt CurrentValueIndex() const;
00082     IMPORT_C virtual void SetCurrentValueIndex(const TInt aIndex);
00083     IMPORT_C virtual TBool CreateEditorL();
00084     
00085 protected:
00086         CAknQueryValueTime();
00087         
00092         void ConstructL();
00093         
00099         void CalculateCurrentIndex();
00100         
00101         virtual void AppendValueIfNewL();
00102         
00103 private: // from MAknQueryValue
00104         IMPORT_C void Reserved_MAknQueryValue();
00105         
00106 private:
00107         // the following are member variables
00108         TInt iQueryCaptionId;
00109         TTime iTime;
00110         TInt iCurrentIndex;
00111         // the following are not owned
00112         const CAknQueryValueTimeArray* iArray;
00113     };
00114 
00115 
00120 NONSHARABLE_CLASS(CAknQueryValueTimeArray) : public CBase, public MDesCArray
00121         {
00122 public:
00127         typedef CArrayFix<TTime> TimeArray;
00128         
00129         enum {KSafeSizeOfDescriptorForTTimeFormat = 128};
00130         
00131 public:
00132 
00140         IMPORT_C static CAknQueryValueTimeArray* NewL(TInt aResourceId);
00141         
00146         IMPORT_C static CAknQueryValueTimeArray* NewLC(TInt aResourceId);
00147         
00148         IMPORT_C ~CAknQueryValueTimeArray();
00149         
00157         IMPORT_C void SetArray(TimeArray& aArray);
00158         
00166         IMPORT_C TimeArray* Array() const;
00167         
00173         IMPORT_C const HBufC* FormatString() const;
00174     
00182 #ifdef __WINS__
00183         IMPORT_C const TInt FormattedStringSize() const;
00184 #else
00185         IMPORT_C TInt FormattedStringSize() const;
00186 // __WINS__
00187 #endif
00188 
00189 public:
00190         // from MDesCArray
00195     IMPORT_C virtual TInt MdcaCount() const;
00196     
00205     IMPORT_C virtual TPtrC MdcaPoint(TInt aIndex) const;
00206     
00207 protected:
00208         CAknQueryValueTimeArray();
00209         
00215         void ConstructL(TInt aResourceId);
00216         
00217 private:
00218         // the following members are owned
00219         HBufC* iLastGeneratedTextValue;
00220         HBufC* iFormatString;
00221         // the following members are not owned
00222         TimeArray* iArray;
00223         TInt iFormattedStringSize;
00224         };
00225 
00226 // __AKNQUERYVALUETIME_H__
00227 #endif
00228 

Copyright © Nokia Corporation 2001-2008
Back to top