• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Doc
  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Products
    • Automation Designer
    • HMI Designer
    • Maritime HMIs
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • GUI - CDP Widgets
  • ExternalUserEventEater

ExternalUserEventEater Class

The ExternalUserEventEater will eat all user events that occur outside the provided widget. More...

Header: #include <ExternalUserEventEater>
  • List of all members, including inherited members

Public Types

enum UserEventAction { Ignore, Allow, HideDialog }

Public Functions

ExternalUserEventEater(QWidget *parent)
virtual void setUserEventAction(ExternalUserEventEater::UserEventAction action)
virtual ExternalUserEventEater::UserEventAction userEventAction()

Protected Functions

QMouseEvent *convertToMouseEvent(QEvent *e)
virtual bool eventFilter(QObject *obj, QEvent *ev)
virtual bool isChild(QObject *obj, QObject *parent = NULL)
bool isDialogLoadedByClickedWidget(CDPBaseDialog *dialog, QEvent *e)
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:

ConstantValueDescription
ExternalUserEventEater::Ignore0Makes any actions outside of the widget/dialog ignored.
ExternalUserEventEater::Allow1Makes interactions outside the widget/dialog possible.
ExternalUserEventEater::HideDialog2Hides the widget/dialog when clicking/tabbing outside the widget.

Member Function Documentation

ExternalUserEventEater::ExternalUserEventEater(QWidget *parent)

Default constructs an instance of ExternalUserEventEater.

[protected] QMouseEvent *ExternalUserEventEater::convertToMouseEvent(QEvent *e)

[virtual protected] bool ExternalUserEventEater::eventFilter(QObject *obj, QEvent *ev)

[virtual protected] bool ExternalUserEventEater::isChild(QObject *obj, QObject *parent = NULL)

[protected] bool ExternalUserEventEater::isDialogLoadedByClickedWidget(CDPBaseDialog *dialog, QEvent *e)

[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().

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

My account

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

© Copyright 2025 CDP Technologies. Privacy and cookie policy.

Return to top