qtah-qt5-0.5.1: Qt bindings for Haskell

Safe HaskellNone
LanguageHaskell2010

Graphics.UI.Qtah.Event

Contents

Description

General routines for managing QEvents.

Synopsis

High-level interface.

class SceneEvent e => Event e where Source #

A typeclass for Qt event classes (subclasses of QEvent).

Minimal complete definition

onEvent

Methods

onEvent :: QObjectPtr this => this -> (e -> IO Bool) -> IO EventRegistration Source #

Registers a callback function to be invoked when an event of type e is sent to an object. This is a wrapper around onAnyEvent, so for details, see that function; all comments about EventFilters apply equally to handlers given here.

Instances
Event QEvent Source # 
Instance details

Defined in Graphics.UI.Qtah.Core.QEvent

Methods

onEvent :: QObjectPtr this => this -> (QEvent -> IO Bool) -> IO EventRegistration Source #

Event QTimerEvent Source # 
Instance details

Defined in Graphics.UI.Qtah.Core.QTimerEvent

Methods

onEvent :: QObjectPtr this => this -> (QTimerEvent -> IO Bool) -> IO EventRegistration Source #

Event QCloseEvent Source # 
Instance details

Defined in Graphics.UI.Qtah.Gui.QCloseEvent

Methods

onEvent :: QObjectPtr this => this -> (QCloseEvent -> IO Bool) -> IO EventRegistration Source #

Event QEnterEvent Source # 
Instance details

Defined in Graphics.UI.Qtah.Gui.QEnterEvent

Methods

onEvent :: QObjectPtr this => this -> (QEnterEvent -> IO Bool) -> IO EventRegistration Source #

Event QFocusEvent Source # 
Instance details

Defined in Graphics.UI.Qtah.Gui.QFocusEvent

Methods

onEvent :: QObjectPtr this => this -> (QFocusEvent -> IO Bool) -> IO EventRegistration Source #

Event QHideEvent Source # 
Instance details

Defined in Graphics.UI.Qtah.Gui.QHideEvent

Methods

onEvent :: QObjectPtr this => this -> (QHideEvent -> IO Bool) -> IO EventRegistration Source #

Event QInputEvent Source # 
Instance details

Defined in Graphics.UI.Qtah.Gui.QInputEvent

Methods

onEvent :: QObjectPtr this => this -> (QInputEvent -> IO Bool) -> IO EventRegistration Source #

Event QHoverEvent Source # 
Instance details

Defined in Graphics.UI.Qtah.Gui.QHoverEvent

Methods

onEvent :: QObjectPtr this => this -> (QHoverEvent -> IO Bool) -> IO EventRegistration Source #

Event QMouseEvent Source # 
Instance details

Defined in Graphics.UI.Qtah.Gui.QMouseEvent

Methods

onEvent :: QObjectPtr this => this -> (QMouseEvent -> IO Bool) -> IO EventRegistration Source #

Event QPaintEvent Source # 
Instance details

Defined in Graphics.UI.Qtah.Gui.QPaintEvent

Methods

onEvent :: QObjectPtr this => this -> (QPaintEvent -> IO Bool) -> IO EventRegistration Source #

Event QExposeEvent Source # 
Instance details

Defined in Graphics.UI.Qtah.Gui.QExposeEvent

Methods

onEvent :: QObjectPtr this => this -> (QExposeEvent -> IO Bool) -> IO EventRegistration Source #

Event QShowEvent Source # 
Instance details

Defined in Graphics.UI.Qtah.Gui.QShowEvent

Methods

onEvent :: QObjectPtr this => this -> (QShowEvent -> IO Bool) -> IO EventRegistration Source #

Event QWheelEvent Source # 
Instance details

Defined in Graphics.UI.Qtah.Gui.QWheelEvent

Methods

onEvent :: QObjectPtr this => this -> (QWheelEvent -> IO Bool) -> IO EventRegistration Source #

Event QKeyEvent Source # 
Instance details

Defined in Graphics.UI.Qtah.Gui.QKeyEvent

Methods

onEvent :: QObjectPtr this => this -> (QKeyEvent -> IO Bool) -> IO EventRegistration Source #

Event QGraphicsSceneEvent Source # 
Instance details

Defined in Graphics.UI.Qtah.Widgets.QGraphicsSceneEvent

Event QGraphicsSceneWheelEvent Source # 
Instance details

Defined in Graphics.UI.Qtah.Widgets.QGraphicsSceneWheelEvent

Event QGraphicsSceneMouseEvent Source # 
Instance details

Defined in Graphics.UI.Qtah.Widgets.QGraphicsSceneMouseEvent

Event QActionEvent Source # 
Instance details

Defined in Graphics.UI.Qtah.Gui.QActionEvent

Methods

onEvent :: QObjectPtr this => this -> (QActionEvent -> IO Bool) -> IO EventRegistration Source #

Event QChildEvent Source # 
Instance details

Defined in Graphics.UI.Qtah.Core.QChildEvent

Methods

onEvent :: QObjectPtr this => this -> (QChildEvent -> IO Bool) -> IO EventRegistration Source #

data EventRegistration Source #

A record that an event handler was registered with a receiver object. This can be given to unregister to destroy the corresponding handler.

unregister :: EventRegistration -> IO () Source #

Disconnects an event handler and frees its resources. This function is idempotent.

Low-level interface

type EventFilter = QObject -> QEvent -> IO Bool Source #

An filter that can handle any type of event.

onAnyEvent :: QObjectPtr target => target -> EventFilter -> IO EventRegistration Source #

Registers an EventFilter to listen to events that a QObject receives. A filter can return false to allow the event to propagate further, or true to indicate that the event has been handled, and stop propagation. When multiple filters are attached to an object, the last one installed is called first. The filter will stay active until the receiver is deleted, or unregister is called.

This function uses installEventFilter under the hood.

Internal