aknqueryvalue.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : AknQueryValue.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 // AknQueryValue.h
00021 //
00022 // Copyright (c) 2001 Symbian Ltd.  All rights reserved.
00023 //
00024 
00025 #if !defined(__AKNQUERYVALUE_H__)
00026 #define __AKNQUERYVALUE_H__
00027 
00028 
00029 #include <eikenv.h>
00030 #include <babitflags.h>
00031 
00032 class MDesCArray;
00033 
00042 class MAknQueryValue
00043         {
00044 public:
00049         enum TMode
00050                 {
00051                 EQueryMode,
00052                 ESettingPageMode
00053                 };
00054 protected:
00059         enum TFlagBits
00060                 {
00061                 ESettingPageModeBitIndex = 0,
00062                 EAutoAppendBitIndex
00063                 };
00064 public:
00065         virtual ~MAknQueryValue() {}
00066         
00071         virtual const MDesCArray* MdcArray() const = 0;
00072         
00079         virtual HBufC* CurrentValueTextLC() = 0;
00080         
00086         virtual TInt CurrentValueIndex() const = 0;
00087         
00093         virtual void SetCurrentValueIndex(const TInt aIndex) = 0;
00094         
00102         virtual TBool CreateEditorL() = 0;
00103         
00109         virtual void SetQueryMode( MAknQueryValue::TMode aMode ) = 0;
00110 
00134         virtual void SetSettingPageResourceIds( 
00135                 TInt aSettingPageResourceId, 
00136                 TInt aSettingPageEditorResourceId ) = 0;
00137         
00143         virtual void SetAutoAppend( TBool aAppend ) = 0;
00144 
00145 protected:
00151         virtual void AppendValueIfNewL() = 0;
00152 private:
00153         IMPORT_C virtual void Reserved_MAknQueryValue();
00154    };
00155 
00160 class CAknQueryValue : public CBase, public MAknQueryValue
00161         {
00162 public:
00168         IMPORT_C virtual void SetQueryMode( MAknQueryValue::TMode aMode );
00169         
00177         IMPORT_C virtual void SetSettingPageResourceIds( TInt aSettingPageResourceId, TInt aSettingPageEditorResourceId );
00178         
00184         IMPORT_C virtual void SetAutoAppend( TBool aAppend );
00185         
00191         IMPORT_C virtual void AppendValueIfNewL();
00192 protected:
00198         TBool IsValidIndex(TInt aIndex) 
00199         {
00200         if (MdcArray()->MdcaCount() < 1) return ETrue;
00201         if (aIndex < 0 || aIndex >= MdcArray()->MdcaCount())
00202             return EFalse;
00203         return ETrue;
00204         }
00205 
00206 protected:
00211         TBitFlags16     iFlags;
00216         TInt iSettingPageResourceId;
00221         TInt iSettingPageEditorResourceId;
00222 private:
00223         TInt iSpare;
00224 // from MAknQueryValue
00225         IMPORT_C void Reserved_MAknQueryValue();
00226         };
00227 
00228 // __AKNQUERYVALUE_H__
00229 #endif
00230 

Copyright © Nokia Corporation 2001-2008
Back to top