Back to index

im-sdk  12.3.91
iiimqcplugin.cpp
Go to the documentation of this file.
00001 /*
00002   iiimqcplugin.cpp 
00003   Copyright (C) 2003 Free Standards Group
00004 
00005   Permission is hereby granted, free of charge, to any person obtaining a
00006   copy of this software and associated documentation files (the
00007   "Software"), to deal in the Software without restriction, including
00008   without limitation the rights to use, copy, modify, merge, publish,
00009   distribute, sublicense, and/or sell copies of the Software, and to
00010   permit persons to whom the Software is furnished to do so, subject to
00011   the following conditions: The above copyright notice and this
00012   permission notice shall be included in all copies or substantial
00013   portions of the Software.
00014 
00015   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00016   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00017   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00018   IN NO EVENT SHALL OPENI18N WG OR FREE STANDARDS GROUP. BE LIABLE
00019   FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
00020   CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
00021   THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF
00022   ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
00023 
00024   Except as contained in this notice, the names of OpenI18N WG and/or
00025   Free Standards Group shall not be used in advertising or otherwise to
00026   promote the sale, use or other dealings in this Software without prior
00027   written authorization from OpenI18N WG and/or Free Standards Group
00028   as applicable.
00029 
00030   Author: ILGYOUNG PARK <Karl.Park@Sun.COM>
00031          TuBo <Gavin.Tu@Sun.COM>
00032 
00033 */
00034 #include <qinputcontextplugin.h>
00035 #include <qinputcontext.h>
00036 
00037 #include "iiimqccontext.h"
00038 #include "debug.h"
00039 
00040 
00041 class IIIMInputContextPlugin : public QInputContextPlugin
00042 {
00043 public:
00044     IIIMInputContextPlugin() : QInputContextPlugin() {
00045         DEBUG_DO(qDebug("**IIIMQCF: IIIMInputContextPlugin()"));
00046     }
00047 
00048     ~IIIMInputContextPlugin()
00049     {
00050         DEBUG_DO(qDebug("**IIIMQCF: ~IIIMInputContextPlugin()"));
00051     }
00052 
00053     QStringList keys() const {
00054         QStringList keylist;
00055         keylist.push_back("iiimqcf");
00056         DEBUG_DO(qDebug("**IIIQCF: IIIMInputContextPlugin, keys return iiimqcf"));
00057         return keylist;
00058     }
00059 
00060     QStringList languages(const QString&) {  //FIXME
00061         return QStringList("");
00062     }
00063 
00064     QString description(const QString&) {
00065         return QString::fromUtf8(tr("Qt immodule plugin for IIIM"));
00066     }
00067 
00068     QInputContext *create(const QString &s ) {
00069         if (s.lower() != "iiimqcf") {
00070             return 0;
00071         }
00072         DEBUG_DO(qDebug("**IIIQCF: IIIMInputContextPlugin, create QInputContext"));
00073         /*return   IIIMInputContext::getIIIMInputContext();*/
00074        return new IIIMInputContext;
00075     }
00076 
00077     QString displayName( const QString &key ) {
00078            return key;
00079     }
00080 };
00081 
00082 Q_EXPORT_PLUGIN(IIIMInputContextPlugin)