equal
deleted
inserted
replaced
|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef LOGSPREDICTIVE12KEYTRANSLATOR_H |
|
19 #define LOGSPREDICTIVE12KEYTRANSLATOR_H |
|
20 |
|
21 #include <QObject> |
|
22 #include <QChar> |
|
23 #include <QHash> |
|
24 |
|
25 #include "logspredictivetranslator.h" |
|
26 |
|
27 |
|
28 /** |
|
29 * abstract translator for ITU-T 12 keys keyboard |
|
30 * |
|
31 */ |
|
32 class LogsPredictive12KeyTranslator : public LogsPredictiveTranslator |
|
33 { |
|
34 |
|
35 public: |
|
36 |
|
37 explicit LogsPredictive12KeyTranslator(); |
|
38 ~LogsPredictive12KeyTranslator(); |
|
39 |
|
40 public: //from LogsPredictiveTranslator |
|
41 |
|
42 QStringList patternTokens( const QString& pattern ) const; |
|
43 int hasPatternSeparators( const QString& pattern ) const; |
|
44 const QChar translateChar( const QChar character ) const; |
|
45 |
|
46 private: |
|
47 |
|
48 void padWithZeros( QString& token, const QString& source, int padIndex ) const; |
|
49 |
|
50 |
|
51 private: |
|
52 |
|
53 friend class UT_LogsPredictive12KeyTranslator; |
|
54 |
|
55 }; |
|
56 |
|
57 #endif //LOGSPREDICTIVE12KEYTRANSLATOR_H |