This class implements a concrete tool to geographic zoom operation using the mouse click.
More...
#include <ZoomClick.h>
|
|
Methods related to instantiation and destruction.
|
| ZoomClick (MapDisplay *display, const QCursor &cursor, const double &zoomFactor=2.0, const ZoomType &type=In, QObject *parent=0) |
| It constructs a zoom click tool associated with the given map display.
|
|
| ~ZoomClick () |
| Destructor.
|
|
|
Methods related to instantiation and destruction.
|
virtual void | init () |
|
|
Methods related with tool behavior.
|
bool | m_zoomStarted |
|
bool | mousePressEvent (QMouseEvent *e) |
| This event handler can be reimplemented in a concrete tool class to receive mouse press events for the watched object.
|
|
bool | mouseMoveEvent (QMouseEvent *e) |
| This event handler can be reimplemented in a concrete tool class to receive mouse move events for the watched object.
|
|
bool | mouseReleaseEvent (QMouseEvent *e) |
| This event handler can be reimplemented in a concrete tool class to receive mouse release events for the watched object.
|
|
|
Methods related to instantiation and destruction.
|
void | setZoomType (const ZoomType &type) |
| Sets the zoom operation type.
|
|
void | applyZoom (const QPointF &point=QPointF(), bool centralize=true) |
| Performs the zoom operation on map display, considering the zoom factor, zoom type and the given point.
|
|
double | m_zoomFactor |
| Factor used to zoom. i.e. A factor value of 2.0 (default) will generate a new extent twice (%) bigger or smaller, depending of ZoomType.
|
|
ZoomType | m_zoomType |
| Enum that indicates the zoom type.
|
|
|
Methods related with tool behavior.
|
virtual bool | eventFilter (QObject *watched, QEvent *e) |
| Filters events if this object has been installed as an event filter for the watched object.
|
|
virtual bool | mouseDoubleClickEvent (QMouseEvent *e) |
| This event handler can be reimplemented in a concrete tool class to receive mouse double click events for the watched object.
|
|
virtual bool | keyPressEvent (QKeyEvent *e) |
| This event handler can be reimplemented in a concrete tool class to receive key press events for the watched object.
|
|
virtual void | setCursor (const QCursor &cursor) |
| It sets the tool cursor.
|
|
MapDisplay * | m_display |
| The map display associated with the tool.
|
|
QCursor | m_cursor |
| The default tool cursor.
|
|
QCursor | m_curCursor |
| The current mapdisplay cursor.
|
|
This class implements a concrete tool to geographic zoom operation using the mouse click.
Definition at line 49 of file ZoomClick.h.
◆ ZoomType
Defines the zoom type.
Enumerator |
---|
In | Performs the zoom in operation.
|
Out | Performs the zoom out operation.
|
Definition at line 58 of file Zoom.h.
◆ ZoomClick()
te::qt::widgets::ZoomClick::ZoomClick |
( |
MapDisplay * |
display, |
|
|
const QCursor & |
cursor, |
|
|
const double & |
zoomFactor = 2.0 , |
|
|
const ZoomType & |
type = In , |
|
|
QObject * |
parent = 0 |
|
) |
| |
It constructs a zoom click tool associated with the given map display.
- Parameters
-
display | The map display associated with the tool. |
cursor | The tool cursor. |
zoomFactor | The factor used to zoom. i.e. A factor value of 2.0 (default) will generate a new extent twice (%) bigger or smaller. \para zoomType The zoom operation type - ZoomIn | ZoomOut. |
parent | The tool's parent. |
- Note
- The tool will NOT take the ownership of the given pointers.
◆ ~ZoomClick()
te::qt::widgets::ZoomClick::~ZoomClick |
( |
| ) |
|
◆ applyZoom()
void te::qt::widgets::Zoom::applyZoom |
( |
const QPointF & |
point = QPointF() , |
|
|
bool |
centralize = true |
|
) |
| |
|
inherited |
Performs the zoom operation on map display, considering the zoom factor, zoom type and the given point.
- Parameters
-
point | A point in world coordinates. |
centralize | If the reference point is given, its possible to choose between centering this reference point or keeping it in the same position that it was. |
- Note
- If the given point is not null, the new extent will be centered on this point. Otherwise, the current center will be kepped.
◆ eventFilter()
virtual bool te::qt::widgets::AbstractTool::eventFilter |
( |
QObject * |
watched, |
|
|
QEvent * |
e |
|
) |
| |
|
virtualinherited |
◆ init()
virtual void te::qt::widgets::AbstractTool::init |
( |
| ) |
|
|
virtualinherited |
◆ keyPressEvent()
virtual bool te::qt::widgets::AbstractTool::keyPressEvent |
( |
QKeyEvent * |
e | ) |
|
|
virtualinherited |
◆ mouseDoubleClickEvent()
virtual bool te::qt::widgets::AbstractTool::mouseDoubleClickEvent |
( |
QMouseEvent * |
e | ) |
|
|
virtualinherited |
This event handler can be reimplemented in a concrete tool class to receive mouse double click events for the watched object.
- Parameters
-
- Returns
- If you want to filter the event out, i.e. stop it being handled further, return true; otherwise return false.
- Note
- The AbstractTool will also receive mouse press and mouse release events in addition to the double click event. It is up to the developer to ensure that the application interprets these events correctly.
Reimplemented in te::edit::AggregateAreaTool, te::edit::CreateLineTool, te::edit::CreatePointTool, te::edit::CreatePolygonTool, te::edit::SplitPolygonTool, te::edit::SubtractAreaTool, te::edit::VertexTool, te::mnt::ProfileTools, te::qt::widgets::Measure, and te::qt::widgets::PolygonAcquire.
◆ mouseMoveEvent()
bool te::qt::widgets::ZoomClick::mouseMoveEvent |
( |
QMouseEvent * |
e | ) |
|
|
virtual |
This event handler can be reimplemented in a concrete tool class to receive mouse move events for the watched object.
- Parameters
-
- Returns
- If you want to filter the event out, i.e. stop it being handled further, return true; otherwise return false.
Reimplemented from te::qt::widgets::AbstractTool.
◆ mousePressEvent()
bool te::qt::widgets::ZoomClick::mousePressEvent |
( |
QMouseEvent * |
e | ) |
|
|
virtual |
This event handler can be reimplemented in a concrete tool class to receive mouse press events for the watched object.
- Parameters
-
- Returns
- If you want to filter the event out, i.e. stop it being handled further, return true; otherwise return false.
Reimplemented from te::qt::widgets::AbstractTool.
◆ mouseReleaseEvent()
bool te::qt::widgets::ZoomClick::mouseReleaseEvent |
( |
QMouseEvent * |
e | ) |
|
|
virtual |
This event handler can be reimplemented in a concrete tool class to receive mouse release events for the watched object.
- Parameters
-
- Returns
- If you want to filter the event out, i.e. stop it being handled further, return true; otherwise return false.
Reimplemented from te::qt::widgets::AbstractTool.
◆ setCursor()
virtual void te::qt::widgets::AbstractTool::setCursor |
( |
const QCursor & |
cursor | ) |
|
|
virtualinherited |
It sets the tool cursor.
- Parameters
-
cursor | The cursor that will be used during the tool operation. |
◆ setZoomType()
void te::qt::widgets::Zoom::setZoomType |
( |
const ZoomType & |
type | ) |
|
|
inherited |
Sets the zoom operation type.
- Parameters
-
type | The zoom operation type - ZoomIn | ZoomOut; |
◆ m_curCursor
QCursor te::qt::widgets::AbstractTool::m_curCursor |
|
protectedinherited |
◆ m_cursor
QCursor te::qt::widgets::AbstractTool::m_cursor |
|
protectedinherited |
◆ m_display
MapDisplay* te::qt::widgets::AbstractTool::m_display |
|
protectedinherited |
The map display associated with the tool.
Definition at line 173 of file AbstractTool.h.
◆ m_zoomFactor
double te::qt::widgets::Zoom::m_zoomFactor |
|
protectedinherited |
Factor used to zoom. i.e. A factor value of 2.0 (default) will generate a new extent twice (%) bigger or smaller, depending of ZoomType.
Definition at line 102 of file Zoom.h.
◆ m_zoomStarted
bool te::qt::widgets::ZoomClick::m_zoomStarted |
|
private |
◆ m_zoomType
ZoomType te::qt::widgets::Zoom::m_zoomType |
|
protectedinherited |
Enum that indicates the zoom type.
Definition at line 103 of file Zoom.h.
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_release/src/terralib/qt/widgets/tools/ZoomClick.h