aknuniteditor.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name        : aknuniteditor.h
00004 *  Part of     : UI Framework core / eikctl
00005 *  Description : Unit multi-field numeric editor
00006 *  Version     : %version: e003sa01#2 % << Don't touch! Updated by Synergy at check-out.
00007 *
00008 *  Copyright © 2006 Nokia.  All rights reserved.
00009 *  This material, including documentation and any related computer
00010 *  programs, is protected by copyright controlled by Nokia.  All
00011 *  rights are reserved.  Copying, including reproducing, storing,
00012 *  adapting or translating, any or all of this material requires the
00013 *  prior written consent of Nokia.  This material also contains
00014 *  confidential information which may not be disclosed to others
00015 *  without the prior written consent of Nokia.
00016 * ============================================================================
00017 * Template version: 4.1
00018 */
00019 
00020 #ifndef CAKNUNITEDITOR_H
00021 #define CAKNUNITEDITOR_H
00022 
00023 #include <eikmfne.h>
00024 
00025 class CAknMfneFloat;
00026 class CAknMfneSeparator;
00027 
00078 NONSHARABLE_CLASS( CAknUnitEditor ) : public CEikMfne
00079     {
00080 public:
00087     IMPORT_C static CAknUnitEditor* NewL();
00088     
00096     IMPORT_C static CAknUnitEditor* NewLC();
00097 
00101     virtual ~CAknUnitEditor();
00102 
00125     IMPORT_C void ConstructL(
00126         TReal aMinimumValue, TReal aMaximumValue,
00127         TReal aInitialValue,
00128         TInt aMaxFractionalDigits, TInt aUnit, TUint aFlags = 0 );
00129     
00141     IMPORT_C void ConstructFromResourceL( TResourceReader& aResourceReader );
00142 
00153     IMPORT_C TBool SetValue( TReal aValue );
00154     
00160     IMPORT_C TReal Value() const;
00161     
00170     IMPORT_C TBool SupportsUnit( TInt aUnit ) const;
00171     
00178     IMPORT_C void SetUnitL( const TDesC& aUnit );
00179     
00190     IMPORT_C void SetUnitL( TInt aUnit );
00191 
00201     IMPORT_C TInt GetUnit( TDes& aDes ) const;
00202     
00212     IMPORT_C TInt Unit() const;
00213 
00225     IMPORT_C void SetMaxFractionalDigits( TInt aMaxFractionalDigits );
00226     
00233     IMPORT_C TInt MaxFractionalDigits() const;
00234     
00242     IMPORT_C void SetMinimumAndMaximum(
00243         TReal aMinimumValue, TReal aMaximumValue );
00244     
00251     IMPORT_C void GetMinimumAndMaximum(
00252         TReal& aMinimumValue, TReal& aMaximumValue ) const;
00253         
00261     IMPORT_C void SetFlags( TUint aFlags );
00262     
00269     IMPORT_C TUint Flags() const;
00270     
00271 // from base class CEikMfne
00272 
00281     IMPORT_C void PrepareForFocusLossL();
00282     
00283 protected:
00284 
00291      void FocusChanged( TDrawNow aDrawNow );
00292 
00293 private:
00294 
00298     CAknUnitEditor();
00299     
00305     TBool UnitFieldVisibility() const;
00306     
00307 private: // data
00308 
00312     TUint iFlags;
00313     
00317     const TInt iUnitLimit;
00318     
00323     TInt iUnitType;
00324 
00329     CAknMfneFloat* iFloatField;
00330     
00335     CAknMfneSeparator* iSeparatorField;
00336     
00341     CAknMfneSeparator* iUnitField;
00342     
00343     };
00344 
00345 // CAKNUNITEDITOR_H
00346 #endif

Copyright © Nokia Corporation 2001-2008
Back to top