27 #include "../../../geometry/Envelope.h" 28 #include "../../../geometry/Geometry.h" 29 #include "../../../geometry/LinearRing.h" 30 #include "../../../geometry/LineString.h" 31 #include "../../../geometry/Point.h" 32 #include "../../../qt/widgets/canvas/MapDisplay.h" 33 #include "../../../qt/widgets/Utils.h" 34 #include "../../Feature.h" 35 #include "../../RepositoryManager.h" 36 #include "../../Utils.h" 37 #include "../Renderer.h" 42 #include <QMessageBox> 43 #include <QMouseEvent> 53 m_continuousMode(false),
68 if (e->button() != Qt::LeftButton)
105 if (e->buttons() & Qt::LeftButton)
117 if(e->button() != Qt::LeftButton)
137 draft->fill(Qt::transparent);
150 renderer.
draw(line,
true);
173 for(std::size_t i = 0; i <
m_coords.size(); ++i)
virtual const std::string & getId() const
It returns the layer id.
An utility struct for representing 2D coordinates.
LineString is a curve with linear interpolation between points.
void setOperationTypeId(const te::edit::OperationType ¤tOperationType)
static T & getInstance()
It returns a reference to the singleton instance.
void setPoint(std::size_t i, const double &x, const double &y)
It sets the value of the specified point.
An Envelope defines a 2D rectangular region.
virtual int getSRID() const
It return the Spatial Reference System used by the Map Display.
TEEDITQTEXPORT QPointF GetPosition(QMouseEvent *e)
virtual const te::gm::Envelope & getExtent() const
It returns the world extent showned by the MapDisplay.
void draw(te::gm::Geometry *geom, bool showVertexes=false)
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
This is a singleton for rendering geometries and features.
TEEDITEXPORT void TrySnap(te::gm::Coord2D &coord, int srid)
void begin(QPaintDevice *device, const te::gm::Envelope &e, int srid)
void drawRepository(const std::string &source, const te::gm::Envelope &e, int srid)
void setSRID(int srid)
It sets the Spatial Reference System ID of the linestring.
void setGeometry(te::gm::Geometry *geom)
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
bool isValid() const
It tells if the rectangle is valid or not.