Unity 8
WindowInputMonitor Class Reference

#include <plugins/Utils/WindowInputMonitor.h>

Inherits QQuickItem.

Signals

void homeKeyActivated ()
 
void touchBegun ()
 
void touchEnded (const QPointF &pos)
 

Public Member Functions

 WindowInputMonitor (QQuickItem *parent=0)
 
 WindowInputMonitor (UnityUtil::AbstractTimer *timer, UnityUtil::AbstractElapsedTimer *elapsedTimer, QQuickItem *parent=0)
 
bool eventFilter (QObject *watched, QEvent *event) override
 
void update (QEvent *event)
 

Public Attributes

const qint64 msecsWithoutTouches = 150
 

Detailed Description

Monitors input events received by the window holding this item and the Home (Win aka Super_L) key presses.

Additionally, this class monitors for generic touch events on the screen, to help with hiding/revealing the mouse pointer.

Definition at line 34 of file WindowInputMonitor.h.

Member Function Documentation

◆ homeKeyActivated

void WindowInputMonitor::homeKeyActivated ( )
signal

Emitted when the home key has been intentionally tapped

It only says the home key has been activated if it has been tapped in isolation, that is, without being accompanied by touches on the screen. Home key taps that happen along with (or immediately after, or immediately before) touches on the screen are considered to have happened unintentionally and are thus ignored.

Rationale being that it's easy to accidentally hit the home key while performing a swipe from a screen edge, for instance. That's particularly the case when the home key is a capacitive key.

◆ touchBegun

void WindowInputMonitor::touchBegun ( )
signal

Emitted when a touch begin event is detected

◆ touchEnded

void WindowInputMonitor::touchEnded ( const QPointF &  pos)
signal

Emitted when a touch end event is detected

Parameters
posthe position in screen coordinates

The documentation for this class was generated from the following files: