Back to index

im-sdk  12.3.91
keymapper.h
Go to the documentation of this file.
00001 /*
00002   keymapper.h
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 #ifndef _IIIMQCF_KEYMAN_H__
00035 #define _IIIMQCF_KEYMAN_H__
00036 
00037 class KeyMapper{
00038 public:
00039   KeyMapper ();
00040   //static KeyMapper *getKeyMapper ();
00041   //int operator ()(int keycode);
00042   int modifier (Qt::ButtonState);
00043   int q2i (int keycode);
00044   int i2q (int keycode);
00045 private:
00046   enum IIIMF_MODIFIERS
00047     {
00048       IIIMF_SHIFT_MODIFIER = 1,
00049       IIIMF_CONTROL_MODIFIER = 2,
00050       IIIMF_META_MODIFIER = 4,
00051       IIIMF_ALT_MODIFIER = 8
00052     };
00053 };
00054 
00055 #endif /* _IIIMQCF_KEYMAN_H__ */