plugins/contacts/symbian/contactsmodel/cntplsql/inc/c12keykeymap.h
changeset 0 876b1a06bc25
child 5 603d3f8b6302
equal deleted inserted replaced
-1:000000000000 0:876b1a06bc25
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: Class to hold the character to key mappings for a virtual
       
    15 *   12 key keyboard.
       
    16 */
       
    17 
       
    18 #ifndef __C12KEYKEYMAP_H__
       
    19 #define __C12KEYKEYMAP_H__
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include "cpcskeymap.h"
       
    23 
       
    24 // FORWARD DECLARATIONS
       
    25 class QTextCodec;	// if Thai-recog is needed also in qwerty, move QTextCodecs to CPcsKeyMap
       
    26 
       
    27 // CLASS DECLARATION
       
    28 NONSHARABLE_CLASS(C12keyKeyMap) : public CPcsKeyMap
       
    29 	{
       
    30     public: // Constructors and destructor
       
    31         /**
       
    32          * Two phase construction
       
    33          */
       
    34         static C12keyKeyMap* NewL();
       
    35         
       
    36         /**
       
    37          * Destructor
       
    38          */
       
    39 		virtual ~C12keyKeyMap();
       
    40 
       
    41 	public: // From CPcsKeyMap
       
    42 		virtual const QChar ArrayIndexToMappedChar(TInt aArrayIndex) const;
       
    43 #if !defined(USE_ORBIT_KEYMAP)
       
    44 		virtual const QChar UseHardcodedKeyMap(const QChar input) const;
       
    45 #endif
       
    46 
       
    47 	private: // From CPcsKeyMap
       
    48 		virtual TInt ComputeValue(QString aString,
       
    49 								  TBool aUpperLimit,
       
    50 								  QString& aValue) const;
       
    51 #if defined(USE_ORBIT_KEYMAP)
       
    52 		virtual QList<HbInputLanguage> SelectLanguages();
       
    53 
       
    54 		virtual void SetHardcodedCharacters();
       
    55 #endif
       
    56 
       
    57 		/**
       
    58          * Returns ETrue if characters that are mapped to * and # keys, should
       
    59 		 * be skipped.
       
    60          */
       
    61 		virtual TBool DetermineSpecialCharBehaviour(QString aSource) const;
       
    62 		virtual TBool ShouldSkipChar(QChar aChar, TBool aSkipHashStar) const;
       
    63 
       
    64 	private: // Constructors
       
    65         /**
       
    66          * Constructor
       
    67          */
       
    68 		C12keyKeyMap();
       
    69 		
       
    70 		/**
       
    71 		 * Second phase constructor
       
    72 		 */
       
    73 		void ConstructL();
       
    74 
       
    75 	private: // New functions
       
    76 		void GetTextCodecs();
       
    77 
       
    78     private: // Data
       
    79 		// Not owned
       
    80 		QTextCodec* iLatinCodec;
       
    81 		QTextCodec* iThaiCodec;
       
    82 
       
    83 		// For unit testing
       
    84 		friend class UT_CPcsKeyMap;
       
    85 	};
       
    86 
       
    87 #endif // __C12KEYKEYMAP_H__
       
    88 
       
    89 // End of file