LunaSysMgr
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SysmgrIMEDataInterface.h
Go to the documentation of this file.
1 /* @@@LICENSE
2 *
3 * Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 * LICENSE@@@ */
18 
19 
20 
21 
22 #ifndef SYSMGRDATAINTERFACE_H
23 #define SYSMGRDATAINTERFACE_H
24 
25 #include "IMEDataInterface.h"
26 #include "InputMethod.h"
27 #include <lunaservice.h>
28 #include <qnamespace.h>
29 #include <QString>
30 #include <string>
31 
33 
35 {
36  Q_OBJECT
37 
38 public:
40  virtual ~SysmgrIMEModel() {}
41 
42  virtual void touchEvent(const QTouchEvent& te);
43  virtual void paint(QPainter& painter);
44  virtual void tapEvent(const QPoint& tapPt);
45  virtual void screenEdgeFlickEvent();
46 
47  virtual void setComposingText(const std::string& text);
48  virtual void commitComposingText();
49 
50  virtual void commitText(const std::string& text);
51 
52  virtual void performEditorAction(PalmIME::FieldAction action);
53 
54  virtual void sendKeyEvent(QEvent::Type type, Qt::Key key, Qt::KeyboardModifiers modifiers);
55 
56  virtual void requestHide();
57 
58  virtual bool isUIAnimationActive();
59 
60  virtual void keyDownAudioFeedback(Qt::Key key);
61 
62  virtual void applyInitSettings(VirtualKeyboard *ime);
63  virtual void activateCombo();
64  virtual void selectKeyboardCombo(int index);
65  virtual void selectLayoutCombo(const char * layoutName);
66  virtual void selectNextKeyboardCombo();
67  virtual void createDefaultKeyboards();
68  virtual void clearDefaultDeyboards();
69  virtual void toggleTapSounds();
70  virtual bool getTapSounds() const;
71  virtual int getKeyboardComboCount() const;
72  virtual bool getSpaces2period() const;
73  virtual void selectKeyboardSize(int size);
74  virtual const char *getLanguageFromKeyboardCombo(int index);
75  virtual const char* getLayoutFromKeyboardCombo(int index);
76 
77  void setInputMethod(InputMethod * inputMethod);
78 
79  virtual QVariant getLunaSystemSetting(const QString &key);
80 
81  virtual QString getLocalizedString(const std::string &str);
82 
83  virtual std::string getLocale();
84 
85  virtual void createRemoveBannerMessage(const std::string &appId,
86  const std::string&msgId);
87 
88  virtual std::string createAddBannerMessage(const std::string &appId,
89  const std::string &msg,
90  const std::string &launchParams,
91  const std::string &icon,
92  const std::string &soundClass,
93  const std::string &soundFile,
94  int duration,
95  bool doNotSuppress);
96 
98 
99  virtual LSHandle *getLunaServiceHandle();
100 
101 
102 private:
103  InputMethod * m_inputMethod;
104  LSHandle * m_serviceHandle;
105 };
106 
107 #endif // SYSMGRDATAINTERFACE_H