File: qgslayoutviewmouseevent.sip.in

package info (click to toggle)
qgis 3.40.10%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,183,672 kB
  • sloc: cpp: 1,595,771; python: 372,544; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 161
file content (87 lines) | stat: -rw-r--r-- 3,135 bytes parent folder | download | duplicates (12)
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
87
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/layout/qgslayoutviewmouseevent.h                             *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/





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

It is sent whenever the user moves, clicks, releases or double clicks
the mouse. In addition to the coordinates in pixel space it also knows
the coordinates the layout space.
%End

%TypeHeaderCode
#include "qgslayoutviewmouseevent.h"
%End
%ConvertToSubClassCode
    if ( dynamic_cast<QgsLayoutViewMouseEvent *>( sipCpp ) )
      sipType = sipType_QgsLayoutViewMouseEvent;
    else
      sipType = 0;
%End
  public:
    QgsLayoutViewMouseEvent( QgsLayoutView *view, QMouseEvent *event, bool snap = false );
%Docstring
Constructor for QgsLayoutViewMouseEvent. Should only be required to be
called from the QgsLayoutView.

:param view: The view in which the event occurred.
:param event: The original mouse event
:param snap: set to ``True`` to snap the point using the layout's
             snapping settings
%End

    void snapPoint( QGraphicsLineItem *horizontalSnapLine = 0, QGraphicsLineItem *verticalSnapLine = 0, const QList<QgsLayoutItem *> &ignoreItems = QList<QgsLayoutItem *>() );
%Docstring
Manually triggers a snap for the mouse event position using the layout's
snapper.

If the ``horizontalSnapLine`` and ``verticalSnapLine`` arguments are
specified, then the snapper will automatically display and position
these lines to indicate snapping positions to item bounds.

The ``ignoreItems`` argument can be used to specify a list of items to
avoid snapping to.
%End

    QPointF layoutPoint() const;
%Docstring
Returns the event point location in layout coordinates.
%End

    QPointF snappedPoint() const;
%Docstring
Returns the snapped event point location in layout coordinates. The
snapped point will consider all possible snapping methods, such as
snapping to grid or guide lines.

.. seealso:: :py:func:`isSnapped`
%End

    bool isSnapped() const;
%Docstring
Returns ``True`` if point was snapped, e.g. to grid or guide lines.

.. seealso:: :py:func:`snappedPoint`
%End

};

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