1 #ifndef __KEYBOARD_H_7DDFE17F_8AE4_41BB_89D8_D3A3FD80A124__ 2 #define __KEYBOARD_H_7DDFE17F_8AE4_41BB_89D8_D3A3FD80A124__ 3 #pragma once 4 #include "plugin.h" 5 #include "inputcontext.h" 6 #include "plaininputmethod.h" 7 #include "pinyininputmethod.h" 8 #include "shifthandler.h" 9 #include "inputengine.h" 10 #include <QtCore/qglobal.h> 11 #include "dwkeyboard_global.h" 12 13 using namespace QtVirtualKeyboard; 14 15 #define Key_Exit Qt::Key_unknown + 1 // 退出键盘按键 16 #define Key_SwitchNumber Qt::Key_unknown + 2 // 切换数字键 17 #define Key_SwitchLanguage Qt::Key_unknown + 3 // 切换语言键 18 #define Key_Other Qt::Key_unknown + 4 // 键 19 #define Key_Pager Qt::Key_unknown + 10 // 上一页 下一页 20 #define Key_SwitchABC Qt::Key_unknown + 11 // 切换字母 21 #define Key_dian Qt::Key_unknown + 12 // 点 22 #define Key_duihao Qt::Key_unknown + 13 // 对号 23 24 #define Key_QuoteDblRight Qt::Key_unknown + 100 // “” ‘’ "" '' 25 #define Key_ApostropheRight Qt::Key_unknown + 101 // “” ‘’ "" '' 26 27 ////////////////////////////////////////////////////////////////////////// 28 #define QVirtualKeyboardPluginBase JPGlobalKeyBoard::QVirtualKeyboardPluginBase_ // 插件类 29 #define PlatformInputContextBase JPGlobalKeyBoard::PlatformInputContextBase_ // 服务类 30 #define InputContextBase JPGlobalKeyBoard::InputContextBase_ // 文本管理类 31 #define InputEngineBase JPGlobalKeyBoard::InputEngineBase_ // 输入法引擎 32 #define ShiftHandlerBase JPGlobalKeyBoard::ShiftHandlerBase_ 33 #define PlainInputMethodBase JPGlobalKeyBoard::PlainInputMethodBase_ // 英文输入法 34 #define PinyinInputMethodBase JPGlobalKeyBoard::PinyinInputMethodBase_ // 中文输入法 35 36 ////////////////////////////////////////////////////////////////////////// 37 class DWKEYBOARDSHARED_EXPORT JPGlobalKeyBoard{ 38 public: 39 static QVirtualKeyboardPlugin* QVirtualKeyboardPluginBase_; // 插件类 40 static PlatformInputContext* PlatformInputContextBase_; // 服务类 41 static InputContext* InputContextBase_; // 文本管理类 42 static InputEngine* InputEngineBase_; // 输入法引擎 43 static ShiftHandler* ShiftHandlerBase_; 44 static PlainInputMethod* PlainInputMethodBase_; // 英文输入法 45 static PinyinInputMethod* PinyinInputMethodBase_; // 中文输入法 46 }; 47 48 DWKEYBOARDSHARED_EXPORT void GlobalInit(); 49 50 #endif//__KEYBOARD_H_7DDFE17F_8AE4_41BB_89D8_D3A3FD80A124__ 51