aknqueryvaluenumber.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : AknQueryValueNumber.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 // AknQueryValueNumber.h
00021 //
00022 // Copyright (c) 2001 Symbian Ltd.  All rights reserved.
00023 //
00024 
00025 #if !defined(__AKNQUERYVALUENUMBER_H__)
00026 #define __AKNQUERYVALUENUMBER_H__
00027 
00028 #include <bamdesca.h>
00029 #include <eikdialg.h>
00030 #include "AknQueryValue.h"
00031 
00032 class CAknQueryValueNumberArray;
00033 
00040 NONSHARABLE_CLASS(CAknQueryValueNumber) : public CAknQueryValue
00041     {
00042 public:
00047         IMPORT_C static CAknQueryValueNumber* NewL();
00048         
00053         IMPORT_C static CAknQueryValueNumber* NewLC();
00054         
00055     IMPORT_C virtual ~CAknQueryValueNumber();
00056         
00062         IMPORT_C void SetArrayL(const CAknQueryValueNumberArray* aArray);
00063         
00070         IMPORT_C void SetQueryCaption(TInt aResourceId);
00071         
00078         IMPORT_C TInt Value() const;
00079         
00080 public: // from MAknQueryValue
00081     IMPORT_C virtual const MDesCArray* MdcArray() const;       
00082     IMPORT_C virtual HBufC* CurrentValueTextLC();    
00083     IMPORT_C virtual TInt CurrentValueIndex() const;     
00084     IMPORT_C virtual void SetCurrentValueIndex(const TInt aIndex);    
00085     IMPORT_C virtual TBool CreateEditorL();
00086     
00087 protected:
00088         CAknQueryValueNumber();
00089         
00094         void ConstructL();
00095         
00101         void CalculateCurrentIndex();
00102         virtual void AppendValueIfNewL();
00103 private: // from MAknQueryValue
00104         IMPORT_C void Reserved_MAknQueryValue();
00105 private:
00106         // the following are member variables
00107         TInt iQueryCaptionId;
00108         TInt iNumber;
00109         TInt iCurrentIndex;
00110         // the following are not owned
00111         const CAknQueryValueNumberArray* iArray;
00112     };
00113 
00114 
00119 NONSHARABLE_CLASS(CAknQueryValueNumberArray) : public CBase, public MDesCArray
00120         {
00121 public:
00126         typedef CArrayFix<TInt> NumberArray;
00127         enum {KSafeSizeOfDescriptorForNumberFormat = 32};
00128 public:
00129 
00137         IMPORT_C static CAknQueryValueNumberArray* NewL(TInt aResourceId);
00138         
00143         IMPORT_C static CAknQueryValueNumberArray* NewLC(TInt aResourceId);
00144         
00145         IMPORT_C ~CAknQueryValueNumberArray();
00146         
00154         IMPORT_C void SetArray(NumberArray& aArray);
00155         
00163         IMPORT_C NumberArray* Array() const;
00164         
00170         IMPORT_C const HBufC* FormatString() const;
00171         
00179 #ifdef __WINS__
00180         IMPORT_C const TInt FormattedStringSize() const;
00181 #else
00182         IMPORT_C TInt FormattedStringSize() const;
00183 // __WINS__
00184 #endif
00185 
00186 public:
00187         // from MDesCArray
00192     IMPORT_C virtual TInt MdcaCount() const;
00193     
00202     IMPORT_C virtual TPtrC MdcaPoint(TInt aIndex) const;
00203 protected:
00204         CAknQueryValueNumberArray();
00205         
00211         void ConstructL(TInt aResourceId);
00212 private:
00213         // the following members are owned
00214         HBufC* iLastGeneratedTextValue;
00215         HBufC* iFormatString;
00216         // the following members are not owned
00217         NumberArray* iArray;
00218         TInt iFormattedStringSize;
00219         };
00220 
00221 
00222 // __AKNQUERYVALUENUMBER_H__
00223 #endif
00224 

Copyright © Nokia Corporation 2001-2008
Back to top