plugins/contacts/symbian/contactsmodel/cntplsql/inc/cntsqlsearch.h
changeset 5 603d3f8b6302
parent 0 876b1a06bc25
equal deleted inserted replaced
3:e4ebb16b39ea 5:603d3f8b6302
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 /*
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     6 **
     6 * All rights reserved.
     7 ** This file is part of the examples of the Qt Toolkit.
     7 * This component and the accompanying materials are made available
     8 **
     8 * under the terms of "Eclipse Public License v1.0"
     9 ** $QT_BEGIN_LICENSE:LGPL$
     9 * which accompanies this distribution, and is available
    10 ** No Commercial Usage
    10 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    11 ** This file contains pre-release code and may not be distributed.
    11 *
    12 ** You may use this file in accordance with the terms and conditions
    12 * Initial Contributors:
    13 ** contained in the Technology Preview License Agreement accompanying
    13 * Nokia Corporation - initial contribution.
    14 ** this package.
    14 *
    15 **
    15 * Contributors:
    16 ** GNU Lesser General Public License Usage
    16 *
    17 ** Alternatively, this file may be used under the terms of the GNU Lesser
    17 * Description: Retrieves the character map for each of the numeric keys.
    18 ** General Public License version 2.1 as published by the Free Software
    18 */
    19 ** Foundation and appearing in the file LICENSE.LGPL included in the
       
    20 ** packaging of this file.  Please review the following information to
       
    21 ** ensure the GNU Lesser General Public License version 2.1 requirements
       
    22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
       
    23 **
       
    24 ** In addition, as a special exception, Nokia gives you certain additional
       
    25 ** rights.  These rights are described in the Nokia Qt LGPL Exception
       
    26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
       
    27 **
       
    28 ** If you have questions regarding the use of this file, please contact
       
    29 ** Nokia at qt-info@nokia.com.
       
    30 **
       
    31 **
       
    32 **
       
    33 **
       
    34 **
       
    35 **
       
    36 **
       
    37 **
       
    38 ** $QT_END_LICENSE$
       
    39 **
       
    40 ****************************************************************************/
       
    41 //#ifdef SYMBIAN_BACKEND_USE_SQLITE
       
    42 
    19 
    43 #include <QObject>
    20 #include <QObject>
    44 #include <QString>
    21 #include <QString>
    45 
    22 
    46 // If this macro is defined, searches like "102" are made on one table only
    23 // If this macro is defined, searches like "102" are made on one table only
    48 
    25 
    49 // If defined, De Morgan's laws are used to replace ORs with ANDs in the
    26 // If defined, De Morgan's laws are used to replace ORs with ANDs in the
    50 // SELECT statement.
    27 // SELECT statement.
    51 #define USE_DEMORGAN
    28 #define USE_DEMORGAN
    52 
    29 
    53 class CQwertyKeyMap;
    30 class CPcsKeyMap; 
       
    31 class CQwertyKeyMap; 
    54 class C12keyKeyMap;
    32 class C12keyKeyMap;
    55 
    33 
    56 class CntSqlSearch// : public QObject
    34 class CntSqlSearch// : public QObject
    57 {
    35 {
    58     //Q_OBJECT
    36     //Q_OBJECT
    67         QwertyEmail,
    45         QwertyEmail,
    68         QwertyContact
    46         QwertyContact
    69         };
    47         };
    70 
    48 
    71 public:
    49 public:
    72     CntSqlSearch();
    50     CntSqlSearch( const CPcsKeyMap& twelveKeyKeyMap,
       
    51                   const CPcsKeyMap& qertyKeyMap );
    73     
    52     
    74     ~CntSqlSearch();
    53     ~CntSqlSearch();
    75 
    54 
    76     QString CreatePredictiveSearch(const QString &pattern);
    55     QString CreatePredictiveSearch(const QString &pattern);
    77     
    56     
   146     
   125     
   147     QStringList qwertyTokens(const QString &pattern) const;
   126     QStringList qwertyTokens(const QString &pattern) const;
   148     
   127     
   149 private:
   128 private:
   150     
   129     
   151     CQwertyKeyMap* mQertyKeyMap; 
   130     const C12keyKeyMap* mkeyKeyMap;
   152     C12keyKeyMap* mkeyKeyMap;
   131     const CQwertyKeyMap* mQertyKeyMap; 
   153     
   132     
   154     friend class UT_CntSqlSearch;
   133     friend class UT_CntSqlSearch;
   155 };
   134 };
   156 //#endif
   135 //#endif