QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgsadvanceddigitizingcanvasitem.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsadvanceddigitizingcanvasitem.h - map canvas item for CAD tools
3 ----------------------
4 begin : October 2014
5 copyright : (C) Denis Rouzaud
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 QGSADVANCEDDIGITIZINGCANVASITEM_H
17#define QGSADVANCEDDIGITIZINGCANVASITEM_H
18
19#include "qgis_gui.h"
20#include "qgsmapcanvasitem.h"
21
22#include <QPen>
23
25
26#ifdef SIP_RUN
27//%ModuleHeaderCode
28// For ConvertToSubClassCode.
30//%End
31#endif
32
38{
39#ifdef SIP_RUN
41 if ( dynamic_cast<QgsAdvancedDigitizingCanvasItem *>( sipCpp ) )
42 sipType = sipType_QgsAdvancedDigitizingCanvasItem;
43 else
44 sipType = nullptr;
46#endif
47
48 public:
50
51 void paint( QPainter *painter ) override;
52 void updatePosition() override;
53
54 private:
55 QPen mLockedPen;
56 QPen mConstruction1Pen;
57 QPen mConstruction2Pen;
58 QPen mSnapPen;
59 QPen mSnapLinePen;
60 QPen mCursorPen;
61 QPen mConstructionGuidesPen;
62 QgsAdvancedDigitizingDockWidget *mAdvancedDigitizingDockWidget = nullptr;
63};
64
65#endif // QGSADVANCEDDIGITIZINGCANVASITEM_H
QgsAdvancedDigitizingCanvasItem(QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget)
A dockable widget used to handle the CAD tools on top of a selection of map tools.
virtual void paint(QPainter *painter)=0
function to be implemented by derived classes
QgsMapCanvasItem(QgsMapCanvas *mapCanvas)
protected constructor: cannot be constructed directly
virtual void updatePosition()
called on changed extent or resize event to update position of the item
Map canvas is a class for displaying all GIS data types on a canvas.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition qgis_sip.h:199
#define SIP_END
Definition qgis_sip.h:216