Class QAccelPlot::PlotMouseEvent¶
ClassList > QAccelPlot > PlotMouseEvent
Carries mouse event data for the mouse signals. More...
#include <PlotMouseEvent.hpp>
Inherits the following classes: QObject
Inheritance diagram¶
flowchart TB
classQAccelPlot_1_1PlotMouseEvent["QAccelPlot::PlotMouseEvent"]
external_base_classQAccelPlot_1_1PlotMouseEvent_1["QObject"]
external_base_classQAccelPlot_1_1PlotMouseEvent_1 --> classQAccelPlot_1_1PlotMouseEvent
Public Properties¶
| Type | Name |
|---|---|
| property bool | accepted Whether this event has been accepted by a handler. Read via isAccepted() ; set viaaccept() orignore() . |
| property Qt::MouseButton | button The mouse button that caused the event; Qt.NoButton for a move. |
| property Qt::MouseButtons | buttons The mouse buttons held down during the event. |
| property Qt::KeyboardModifiers | modifiers Active keyboard modifiers at the time of the event. |
| property qreal | x Item-local pixel X coordinate of the event. |
| property qreal | y Item-local pixel Y coordinate of the event. |
Public Functions¶
| Type | Name |
|---|---|
| PlotMouseEvent (QObject * parent=nullptr) Constructs a PlotMouseEvent with an optional parent . |
|
| Q_INVOKABLE void | accept () Accepts the event, suppressing the plot's built-in handling. |
| Qt::MouseButton | button () const Returns the mouse button that caused the event; Qt::NoButton for a move. |
| Qt::MouseButtons | buttons () const Returns the mouse buttons held down during the event. |
| Q_INVOKABLE void | ignore () Ignores the event, allowing the plot's built-in handling to proceed. |
| bool | isAccepted () const Returns true if the event has been accepted by a handler. |
| Qt::KeyboardModifiers | modifiers () const Returns the active keyboard modifiers at the time of the event. |
| void | setAccepted (bool accepted) Sets whether the event is accepted. Equivalent to accept() ifaccepted is true, orignore() if false. |
| qreal | x () const Returns the item-local pixel X coordinate of the event. |
| qreal | y () const Returns the item-local pixel Y coordinate of the event. |
Detailed Description¶
An instance of this class is passed to each mouse signal. Mirrors the Qt QEvent API: call accept() in a handler to consume the event and suppress the plot's built-in handling (dragging, double-click rescaling, etc.).
Note:
The object is owned by QAccelPlot and is reused across events — do not store a reference to it beyond the signal handler.
Public Properties Documentation¶
property accepted¶
Whether this event has been accepted by a handler. Read via isAccepted() ; set viaaccept() orignore() .
property button¶
The mouse button that caused the event; Qt.NoButton for a move.
property buttons¶
The mouse buttons held down during the event.
property modifiers¶
Active keyboard modifiers at the time of the event.
property x¶
Item-local pixel X coordinate of the event.
property y¶
Item-local pixel Y coordinate of the event.
Public Functions Documentation¶
function PlotMouseEvent¶
Constructs a PlotMouseEvent with an optionalparent .
function accept¶
Accepts the event, suppressing the plot's built-in handling.
function button¶
Returns the mouse button that caused the event; Qt::NoButton for a move.
function buttons¶
Returns the mouse buttons held down during the event.
function ignore¶
Ignores the event, allowing the plot's built-in handling to proceed.
function isAccepted¶
Returns true if the event has been accepted by a handler.
function modifiers¶
Returns the active keyboard modifiers at the time of the event.
function setAccepted¶
Sets whether the event is accepted. Equivalent to accept() ifaccepted is true, orignore() if false.
function x¶
Returns the item-local pixel X coordinate of the event.
function y¶
Returns the item-local pixel Y coordinate of the event.
The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/PlotMouseEvent.hpp