7#include "inputmethod.h"
9#include "virtualkeyboardwatcher.h"
16class KIRIGAMIPLATFORM_NO_EXPORT InputMethod::Private
19 bool available =
false;
25InputMethod::InputMethod(
QObject *parent)
27 , d(std::make_unique<Private>())
29 auto watcher = VirtualKeyboardWatcher::self();
31 connect(watcher, &VirtualKeyboardWatcher::availableChanged,
this, [
this]() {
32 d->available = VirtualKeyboardWatcher::self()->available();
33 Q_EMIT availableChanged();
36 connect(watcher, &VirtualKeyboardWatcher::enabledChanged,
this, [
this]() {
37 d->enabled = VirtualKeyboardWatcher::self()->enabled();
38 Q_EMIT enabledChanged();
41 connect(watcher, &VirtualKeyboardWatcher::activeChanged,
this, [
this]() {
42 d->active = VirtualKeyboardWatcher::self()->active();
43 Q_EMIT activeChanged();
46 connect(watcher, &VirtualKeyboardWatcher::visibleChanged,
this, [
this]() {
47 d->visible = VirtualKeyboardWatcher::self()->visible();
48 Q_EMIT visibleChanged();
51 connect(watcher, &VirtualKeyboardWatcher::willShowOnActiveChanged,
this, [
this]() {
52 Q_EMIT willShowOnActiveChanged();
55 d->available = watcher->available();
56 d->enabled = watcher->enabled();
57 d->active = watcher->active();
58 d->visible = watcher->visible();
61InputMethod::~InputMethod() =
default;
63bool InputMethod::available()
const
68bool InputMethod::enabled()
const
73bool InputMethod::active()
const
78bool InputMethod::visible()
const
83bool InputMethod::willShowOnActive()
const
85 return VirtualKeyboardWatcher::self()->willShowOnActive();
91#include "moc_inputmethod.cpp"
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)