-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathinputcontext.h
43 lines (38 loc) · 1.06 KB
/
inputcontext.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef MOCKUPINPUTCONTEXT_H
#define MOCKUPINPUTCONTEXT_H
#include <QRectF>
#include <qpa/qplatforminputcontext.h>
#include "keyeventdispatcher.h"
#include "KeyboardForm.h"
class InputContextPrivate;
class InputContext : public QPlatformInputContext
{
Q_OBJECT
public:
InputContext();
~InputContext();
//retur true if plugin is enabled
bool isValid() const;
//this value will be available in QGuiApplication::inputMethod()->keyboardRectangle()
QRectF keyboardRect() const;
//this value will be available in QGuiApplication::inputMethod()->isVisible()
bool isInputPanelVisible() const;
//editor pointer
void setFocusObject(QObject *object);
static InputContext* Instance();
public slots:
void hideInputPanel();
//show and hide invoked by Qt when editor gets focus
void showInputPanel();
public:
InputContextPrivate *d;
};
class InputContextPrivate
{
public:
InputContextPrivate();
~InputContextPrivate();
KeyboardForm *KeyBoard;
KeyEventDispatcher keyEventDispatcher;
};
#endif // MOCKUPINPUTCONTEXT_H