QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
layout
qgslayoutviewtoolselect.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgslayoutviewtoolselect.h
3
-------------------------
4
Date : July 2017
5
Copyright : (C) 2017 Nyall Dawson
6
Email : nyall dot dawson at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSLAYOUTVIEWTOOLSELECT_H
17
#define QGSLAYOUTVIEWTOOLSELECT_H
18
19
#include <memory>
20
21
#include "qgis_gui.h"
22
#include "
qgis_sip.h
"
23
#include "
qgslayoutviewrubberband.h
"
24
#include "
qgslayoutviewtool.h
"
25
26
class
QgsLayoutMouseHandles;
27
32
class
GUI_EXPORT
QgsLayoutViewToolSelect
:
public
QgsLayoutViewTool
33
{
34
Q_OBJECT
35
36
public
:
40
QgsLayoutViewToolSelect
(
QgsLayoutView
*
view
SIP_TRANSFERTHIS
);
41
~QgsLayoutViewToolSelect
()
override
;
42
43
void
layoutPressEvent
(
QgsLayoutViewMouseEvent
*event )
override
;
44
void
layoutMoveEvent
(
QgsLayoutViewMouseEvent
*event )
override
;
45
void
layoutReleaseEvent
(
QgsLayoutViewMouseEvent
*event )
override
;
46
void
wheelEvent
( QWheelEvent *event )
override
;
47
void
keyPressEvent
( QKeyEvent *event )
override
;
48
void
deactivate
()
override
;
49
51
56
SIP_SKIP
QgsLayoutMouseHandles *mouseHandles();
58
60
void
setLayout
(
QgsLayout
*
layout
);
61
66
double
searchToleranceInLayoutUnits
();
67
68
private
:
69
bool
mIsSelecting =
false
;
70
72
std::unique_ptr<QgsLayoutViewRubberBand> mRubberBand;
73
75
QPoint mMousePressStartPos;
76
78
QPointF mRubberBandStartPos;
79
80
QPointer<QgsLayoutMouseHandles> mMouseHandles;
//owned by scene
81
83
static
const
double
sSearchToleranceInMillimeters;
84
};
85
86
#endif
// QGSLAYOUTVIEWTOOLSELECT_H
QgsLayoutViewMouseEvent
A mouse event which is the result of a user interaction with a QgsLayoutView.
Definition
qgslayoutviewmouseevent.h:35
QgsLayoutViewToolSelect::searchToleranceInLayoutUnits
double searchToleranceInLayoutUnits()
Compute the search tolerance in layout units from the view current scale.
QgsLayoutViewToolSelect::QgsLayoutViewToolSelect
QgsLayoutViewToolSelect(QgsLayoutView *view)
Constructor for QgsLayoutViewToolSelect.
Definition
qgslayoutviewtoolselect.cpp:32
QgsLayoutViewToolSelect::setLayout
void setLayout(QgsLayout *layout)
Sets the a layout.
QgsLayoutViewTool::view
QgsLayoutView * view() const
Returns the view associated with the tool.
Definition
qgslayoutviewtool.cpp:38
QgsLayoutViewTool::deactivate
virtual void deactivate()
Called when tool is deactivated.
Definition
qgslayoutviewtool.cpp:129
QgsLayoutViewTool::wheelEvent
virtual void wheelEvent(QWheelEvent *event)
Mouse wheel event for overriding.
Definition
qgslayoutviewtool.cpp:89
QgsLayoutViewTool::layout
QgsLayout * layout() const
Returns the layout associated with the tool.
Definition
qgslayoutviewtool.cpp:43
QgsLayoutViewTool::layoutMoveEvent
virtual void layoutMoveEvent(QgsLayoutViewMouseEvent *event)
Mouse move event for overriding.
Definition
qgslayoutviewtool.cpp:69
QgsLayoutViewTool::layoutPressEvent
virtual void layoutPressEvent(QgsLayoutViewMouseEvent *event)
Mouse press event for overriding.
Definition
qgslayoutviewtool.cpp:79
QgsLayoutViewTool::QgsLayoutViewTool
QgsLayoutViewTool(QgsLayoutView *view, const QString &name)
Constructor for QgsLayoutViewTool, taking a layout view and tool name as parameters.
Definition
qgslayoutviewtool.cpp:23
QgsLayoutViewTool::layoutReleaseEvent
virtual void layoutReleaseEvent(QgsLayoutViewMouseEvent *event)
Mouse release event for overriding.
Definition
qgslayoutviewtool.cpp:84
QgsLayoutViewTool::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event)
Key press event for overriding.
Definition
qgslayoutviewtool.cpp:94
QgsLayoutView
A graphical widget to display and interact with QgsLayouts.
Definition
qgslayoutview.h:52
QgsLayout
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Definition
qgslayout.h:51
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
SIP_SKIP
#define SIP_SKIP
Definition
qgis_sip.h:138
qgslayoutviewrubberband.h
qgslayoutviewtool.h
Generated on
for QGIS API Documentation by
1.17.0