9#include <QtCore/QDebug>
10#include <QtGui/QGuiApplication>
11#include <QtGui/QInputMethodEvent>
13#if defined(QQNXINPUTCONTEXT_DEBUG)
14#define qInputContextDebug qDebug
16#define qInputContextDebug QT_NO_QDEBUG_MACRO
23 m_inputPanelVisible(
false),
25 m_integration(integration),
26 m_virtualKeyboard(keyboard)
28 connect(&keyboard,
SIGNAL(heightChanged(
int)),
this,
SLOT(keyboardHeightChanged()));
29 connect(&keyboard,
SIGNAL(visibilityChanged(
bool)),
this,
SLOT(keyboardVisibilityChanged(
bool)));
31 keyboardVisibilityChanged(keyboard.
isVisible());
32 keyboardLocaleChanged(keyboard.
locale());
44bool QQnxInputContext::hasPhysicalKeyboard()
56 if (hasPhysicalKeyboard())
79 screenGeometry.
width(), m_virtualKeyboard.
height());
106 return m_inputPanelVisible;
111 return m_inputPanelLocale;
114void QQnxInputContext::keyboardHeightChanged()
119void QQnxInputContext::keyboardVisibilityChanged(
bool visible)
122 if (m_inputPanelVisible != visible) {
123 m_inputPanelVisible = visible;
128void QQnxInputContext::keyboardLocaleChanged(
const QLocale &locale)
131 if (m_inputPanelLocale !=
locale) {
132 m_inputPanelLocale =
locale;
142 if (m_inputPanelVisible)
155 if (!m_inputPanelVisible)
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
@ CloseSoftwareInputPanel
@ RequestSoftwareInputPanel
The QPlatformInputContext class abstracts the input method dependent data and composing state.
bool inputMethodAccepted() const
Returns true if current focus object supports input method events.
void emitInputPanelVisibleChanged()
Active QPlatformInputContext is responsible for providing visible property to QInputMethod.
void emitKeyboardRectChanged()
Active QPlatformInputContext is responsible for providing keyboardRectangle property to QInputMethod.
void setEnterKeyType(EnterKeyType type)
virtual bool showKeyboard()=0
void setInputHints(int inputHints)
static EnterKeyType qtEnterKeyTypeToQnx(Qt::EnterKeyType type)
virtual bool hideKeyboard()=0
bool handleKeyboardEvent(int flags, int sym, int mod, int scan, int cap, int sequenceId) override
QQnxInputContext(QQnxIntegration *integration, QQnxAbstractVirtualKeyboard &keyboard)
bool isInputPanelVisible() const override
Returns input panel visibility status.
void reset() override
Method to be called when input method needs to be reset.
void hideInputPanel() override
Request to hide input panel.
void setFocusObject(QObject *object) override
This virtual method gets called to notify updated focus to object.
QLocale locale() const override
bool isValid() const override
Returns input context validity.
bool filterEvent(const QEvent *event) override
This function can be reimplemented to filter input events.
QRectF keyboardRect() const override
This function can be reimplemented to return virtual keyboard rectangle in currently active window co...
void showInputPanel() override
Request to show input panel.
QQnxScreen * primaryDisplay() const
QRect geometry() const override
Reimplement in subclass to return the pixel geometry of the screen.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr int height() const noexcept
Returns the height of the rectangle.
constexpr int x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr int width() const noexcept
Returns the width of the rectangle.
Combined button and popup list for selecting options.
#define qInputContextDebug
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)