File: qgsplotmouseevent.sip.in

package info (click to toggle)
qgis 3.40.14%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,185,400 kB
  • sloc: cpp: 1,616,418; python: 372,869; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,829; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 155
file content (86 lines) | stat: -rw-r--r-- 2,883 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/plot/qgsplotmouseevent.h                                     *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/





class QgsPlotMouseEvent : QMouseEvent
{
%Docstring(signature="appended")
A :py:class:`QgsPlotMouseEvent` is the result of a user interaction with
the mouse on a :py:class:`QgsPlotCanvas`.

The event is sent whenever the user moves, clicks, releases or double
clicks the mouse.

In addition to the coordinates in pixel space the event may have
knowledge about geographic coordinates corresponding to the event.

.. versionadded:: 3.26
%End

%TypeHeaderCode
#include "qgsplotmouseevent.h"
%End
%ConvertToSubClassCode
    if ( dynamic_cast<QgsPlotMouseEvent *>( sipCpp ) )
      sipType = sipType_QgsPlotMouseEvent;
    else
      sipType = 0;
%End
  public:
    QgsPlotMouseEvent( QgsPlotCanvas *canvas, QMouseEvent *event );
%Docstring
Creates a new QgsPlotMouseEvent.

:param canvas: The map canvas on which the event occurred
:param event: The original mouse event
%End

    QgsPlotMouseEvent( QgsPlotCanvas *canvas, QEvent::Type type, QPoint pos, Qt::MouseButton button = Qt::NoButton, Qt::MouseButtons buttons = Qt::NoButton, Qt::KeyboardModifiers modifiers = Qt::NoModifier );
%Docstring
Creates a new QgsPlotMouseEvent.

:param canvas: The canvas on which the event occurred
:param type: The type of the event
:param pos: The pixel position of the mouse
:param button: The pressed button
:param buttons: Further buttons that are pressed
:param modifiers: Keyboard modifiers
%End

    QgsPoint mapPoint() const;
%Docstring
Returns the point in map coordinates corresponding to the event.

May return an empty point if the event cannot be converted to a map
point.
%End

    QgsPointXY snappedPoint();
%Docstring
Returns the point snapped to the plot, if possible.

Returns the original canvas point if snapping was not possible.
%End

    bool isSnapped();
%Docstring
Returns ``True`` if the point can be snapped to the plot.
%End

};

/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/plot/qgsplotmouseevent.h                                     *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/