QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
qgsadvanceddigitizingfloater.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsadvanceddigitizingfloater.cpp - floater for CAD tools
3 ----------------------
4 begin : May 2019
5 copyright : (C) Olivier Dalang
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 QGSADVANCEDDIGITIZINGFLOATER
17#define QGSADVANCEDDIGITIZINGFLOATER
18
19#include <QWidget>
20#include <QString>
21
22#include "ui_qgsadvanceddigitizingfloaterbase.h"
24#include "qgis_gui.h"
25#include "qgis_sip.h"
26
27#include <QPointer>
28
29class QgsMapCanvas;
31
40class GUI_EXPORT QgsAdvancedDigitizingFloater : public QWidget, private Ui::QgsAdvancedDigitizingFloaterBase
41{
42 Q_OBJECT
43
44 public:
45
53
59 bool active();
60
61 public slots:
62
70 void setActive( bool active );
71
72 private slots:
73
74 void changeX( const QString &text );
75 void changeY( const QString &text );
76 void changeZ( const QString &text );
77 void changeM( const QString &text );
78 void changeDistance( const QString &text );
79 void changeAngle( const QString &text );
80 void changeLockX( bool locked );
81 void changeLockY( bool locked );
82 void changeLockZ( bool locked );
83 void changeLockM( bool locked );
84 void changeLockDistance( bool locked );
85 void changeLockAngle( bool locked );
86 void changeRelativeX( bool relative );
87 void changeRelativeY( bool relative );
88 void changeRelativeZ( bool relative );
89 void changeRelativeM( bool relative );
90 // void changeRelativeDistance( bool relative ); // doesn't happen
91 void changeRelativeAngle( bool relative );
92 void focusOnX();
93 void focusOnY();
94 void focusOnZ();
95 void focusOnM();
96 void focusOnAngle();
97 void focusOnDistance();
98 void enabledChangedX( bool enabled );
99 void enabledChangedY( bool enabled );
100 void enabledChangedZ( bool enabled );
101 void enabledChangedM( bool enabled );
102 void enabledChangedAngle( bool enabled );
103 void enabledChangedDistance( bool enabled );
104
105 private:
106
108 QgsMapCanvas *mMapCanvas = nullptr;
109
111 QPointer< QgsAdvancedDigitizingDockWidget > mCadDockWidget;
112
117 bool eventFilter( QObject *obj, QEvent *event ) override SIP_FORCE;
118
123 void updatePos( const QPoint &pos );
124
128 void hideIfDisabled();
129
131 bool mActive = false;
132};
133
134#endif // QGSADVANCEDDIGITIZINGFLOATER_H
The QgsAdvancedDigitizingDockWidget class is a dockable widget used to handle the CAD tools on top of...
The QgsAdvancedDigitizingFloater class is widget that floats next to the mouse pointer,...
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:90
#define SIP_FORCE
Definition: qgis_sip.h:131