ExternalUserEventEater Class
The ExternalUserEventEater will eat all user events that occur outside the provided widget. More...
| Header: | #include <CDPBaseWidgets/ExternalUserEventEater.h> |
Public Types
| enum | UserEventAction { Ignore, Allow, HideDialog } |
Public Functions
| ExternalUserEventEater(QWidget *parent) | |
| virtual void | setUserEventAction(ExternalUserEventEater::UserEventAction action) |
| virtual ExternalUserEventEater::UserEventAction | userEventAction() |
Protected Functions
| virtual bool | eventFilter(QObject *obj, QEvent *ev) |
| virtual bool | isChild(QObject *obj, QObject *parent = NULL) |
| virtual bool | isExternalEvent(QObject *obj, QEvent *ev) |
| virtual bool | isKeyPadObj(QObject *obj) |
Detailed Description
The ExternalUserEventEater will eat all user events that occur outside the provided widget.
Note: The filter object must be installed on the application and the widget has to be visible for the filtering to activate. Add the following in the constructor of the widget/dialog: qApp->installEventFilter(new ExternalUserEventEater(this));
Member Type Documentation
enum ExternalUserEventEater::UserEventAction
This enum type specifies user event actions:
| Constant | Value | Description |
|---|---|---|
ExternalUserEventEater::Ignore | 0 | Makes any actions outside of the widget/dialog ignored. |
ExternalUserEventEater::Allow | 1 | Makes interactions outside the widget/dialog possible. |
ExternalUserEventEater::HideDialog | 2 | Hides the widget/dialog when clicking/tabbing outside the widget. |
Member Function Documentation
ExternalUserEventEater::ExternalUserEventEater(QWidget *parent)
Default constructs an instance of ExternalUserEventEater.
[virtual protected] bool ExternalUserEventEater::eventFilter(QObject *obj, QEvent *ev)
[virtual protected] bool ExternalUserEventEater::isChild(QObject *obj, QObject *parent = NULL)
[virtual protected] bool ExternalUserEventEater::isExternalEvent(QObject *obj, QEvent *ev)
[virtual protected] bool ExternalUserEventEater::isKeyPadObj(QObject *obj)
[virtual] void ExternalUserEventEater::setUserEventAction(ExternalUserEventEater::UserEventAction action)
See also userEventAction().
[virtual] ExternalUserEventEater::UserEventAction ExternalUserEventEater::userEventAction()
See also setUserEventAction().
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.