Add QInputMethod::inputItemClipRectangle()
This property allows a convenient way of getting notified about changes in the input item clipped rectangle, similar to QIM::cursorRectangle(). Change-Id: I26bf97eeb1f5ef1b7d3aafb03565023091d6df3d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
This commit is contained in:
parent
eb63c0fa47
commit
9180797247
@ -182,6 +182,18 @@ QRectF QInputMethod::keyboardRectangle() const
|
||||
return QRectF();
|
||||
}
|
||||
|
||||
/*!
|
||||
\property QInputMethod::inputItemClipRectangle
|
||||
\brief Input item's clipped rectangle in window coordinates.
|
||||
|
||||
The clipped input rectangle is often used by various input methods to determine
|
||||
how much screen real estate is available for the input method (e.g. Virtual Keyboard).
|
||||
*/
|
||||
QRectF QInputMethod::inputItemClipRectangle() const
|
||||
{
|
||||
Q_D(const QInputMethod);
|
||||
return inputMethodQueryRectangle_helper(Qt::ImInputItemClipRectangle, d->inputItemTransform);
|
||||
}
|
||||
/*!
|
||||
Requests virtual keyboard to open. If the platform
|
||||
doesn't provide virtual keyboard the visibility
|
||||
@ -320,6 +332,8 @@ void QInputMethod::update(Qt::InputMethodQueries queries)
|
||||
if (queries & (Qt::ImAnchorRectangle))
|
||||
emit anchorRectangleChanged();
|
||||
|
||||
if (queries & (Qt::ImInputItemClipRectangle))
|
||||
emit inputItemClipRectangleChanged();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -57,6 +57,7 @@ class Q_GUI_EXPORT QInputMethod : public QObject
|
||||
Q_PROPERTY(QRectF cursorRectangle READ cursorRectangle NOTIFY cursorRectangleChanged)
|
||||
Q_PROPERTY(QRectF anchorRectangle READ anchorRectangle NOTIFY anchorRectangleChanged)
|
||||
Q_PROPERTY(QRectF keyboardRectangle READ keyboardRectangle NOTIFY keyboardRectangleChanged)
|
||||
Q_PROPERTY(QRectF inputItemClipRectangle READ inputItemClipRectangle NOTIFY inputItemClipRectangleChanged)
|
||||
Q_PROPERTY(bool visible READ isVisible NOTIFY visibleChanged)
|
||||
Q_PROPERTY(bool animating READ isAnimating NOTIFY animatingChanged)
|
||||
Q_PROPERTY(QLocale locale READ locale NOTIFY localeChanged)
|
||||
@ -76,6 +77,8 @@ public:
|
||||
// keyboard geometry in window coords
|
||||
QRectF keyboardRectangle() const;
|
||||
|
||||
QRectF inputItemClipRectangle() const;
|
||||
|
||||
enum Action {
|
||||
Click,
|
||||
ContextMenu
|
||||
@ -106,6 +109,7 @@ Q_SIGNALS:
|
||||
void cursorRectangleChanged();
|
||||
void anchorRectangleChanged();
|
||||
void keyboardRectangleChanged();
|
||||
void inputItemClipRectangleChanged();
|
||||
void visibleChanged();
|
||||
void animatingChanged();
|
||||
void localeChanged();
|
||||
|
Loading…
x
Reference in New Issue
Block a user