2017-05-23 14:49:24 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsmapcanvastracer.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-11 20:57:28 +01:00
|
|
|
class QgsMapCanvasTracer : QgsTracer
|
|
|
|
{
|
2017-05-23 14:49:24 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Extension of QgsTracer that provides extra functionality:
|
|
|
|
- automatic updates of own configuration based on canvas settings
|
|
|
|
- reporting of issues to the user via message bar
|
|
|
|
- determines whether tracing is currently enabled by the user
|
2017-05-23 14:49:24 +02:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
A simple registry of tracer instances associated to map canvas instances
|
|
|
|
is kept for convenience. (Map tools do not need to create their local
|
|
|
|
tracer instances and map canvas API is not "polluted" by this optional
|
|
|
|
functionality).
|
2017-05-23 14:49:24 +02:00
|
|
|
|
|
|
|
.. versionadded:: 2.14
|
2016-01-11 20:57:28 +01:00
|
|
|
%End
|
|
|
|
|
2017-05-23 14:49:24 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsmapcanvastracer.h"
|
|
|
|
%End
|
2016-01-11 20:57:28 +01:00
|
|
|
public:
|
2017-05-01 16:42:33 +02:00
|
|
|
explicit QgsMapCanvasTracer( QgsMapCanvas *canvas, QgsMessageBar *messageBar = 0 );
|
2017-05-23 14:49:24 +02:00
|
|
|
%Docstring
|
|
|
|
Create tracer associated with a particular map canvas, optionally message bar for reporting
|
|
|
|
%End
|
2016-01-11 20:57:28 +01:00
|
|
|
~QgsMapCanvasTracer();
|
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
QAction *actionEnableTracing() const;
|
2017-05-23 14:49:24 +02:00
|
|
|
%Docstring
|
|
|
|
Access to action that user may use to toggle tracing on/off. May be null if no action was associated
|
|
|
|
%End
|
2016-01-19 18:03:15 +01:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setActionEnableTracing( QAction *action );
|
2017-05-23 14:49:24 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Assign "enable tracing" checkable action to the tracer.
|
|
|
|
The action is used to determine whether tracing is currently enabled by the user
|
2018-01-04 11:05:58 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QAction *actionEnableSnapping() const;
|
|
|
|
%Docstring
|
|
|
|
Access to action that user may use to toggle snapping on/off. May be null if no action was associated.
|
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
|
|
|
void setActionEnableSnapping( QAction *action );
|
|
|
|
%Docstring
|
|
|
|
Assign "enable snapping" checkable action to the tracer.
|
|
|
|
The action is used to determine whether snapping is currently enabled by the user.
|
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
2017-05-23 14:49:24 +02:00
|
|
|
%End
|
2016-01-11 20:57:28 +01:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
static QgsMapCanvasTracer *tracerForCanvas( QgsMapCanvas *canvas );
|
2017-05-23 14:49:24 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Retrieve instance of this class associated with given canvas (if any).
|
|
|
|
The class keeps a simple registry of tracers associated with map canvas
|
|
|
|
instances for easier access to the common tracer by various map tools
|
2017-05-23 14:49:24 +02:00
|
|
|
%End
|
2016-01-11 20:57:28 +01:00
|
|
|
|
2017-05-23 14:49:24 +02:00
|
|
|
void reportError( PathError err, bool addingVertex );
|
|
|
|
%Docstring
|
|
|
|
Report a path finding error to the user
|
|
|
|
%End
|
2016-01-11 20:57:28 +01:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void configure();
|
2017-12-12 11:44:10 +10:00
|
|
|
|
2017-05-23 14:49:24 +02:00
|
|
|
%Docstring
|
|
|
|
Sets configuration from current snapping settings and canvas settings
|
|
|
|
%End
|
|
|
|
|
2016-01-11 20:57:28 +01:00
|
|
|
};
|
2017-05-23 14:49:24 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsmapcanvastracer.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|