QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgsadvanceddigitizingfloater.cpp
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
6  email : [email protected]
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 #include <QMouseEvent>
17 #include <QEnterEvent>
18 #include <QLocale>
19 
21 #include "qgsmessagelog.h"
22 #include "qgsmapcanvas.h"
23 #include "qgssettings.h"
24 #include "qgsfocuswatcher.h"
25 
27  : QWidget( canvas->viewport() )
28  , mMapCanvas( canvas )
29  , mCadDockWidget( cadDockWidget )
30 {
31  setupUi( this );
32 
33  setAttribute( Qt::WA_TransparentForMouseEvents );
34  adjustSize();
35 
36  setActive( QgsSettings().value( QStringLiteral( "/Cad/Floater" ), false ).toBool() );
37 
38  hideIfDisabled();
39 
40  // This is required to be able to track mouse move events
41  mMapCanvas->viewport()->installEventFilter( this );
42  mMapCanvas->viewport()->setMouseTracking( true );
43 
44  // We reuse cadDockWidget's eventFilter for the CAD specific shortcuts
45  mAngleLineEdit->installEventFilter( cadDockWidget );
46  mDistanceLineEdit->installEventFilter( cadDockWidget );
47  mXLineEdit->installEventFilter( cadDockWidget );
48  mYLineEdit->installEventFilter( cadDockWidget );
49  mZLineEdit->installEventFilter( cadDockWidget );
50  mMLineEdit->installEventFilter( cadDockWidget );
51 
52  // Connect all cadDockWidget's signals to update the widget's display
53  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::cadEnabledChanged, this, &QgsAdvancedDigitizingFloater::hideIfDisabled );
54 
55  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::valueXChanged, this, &QgsAdvancedDigitizingFloater::changeX );
56  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::valueYChanged, this, &QgsAdvancedDigitizingFloater::changeY );
57  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::valueZChanged, this, &QgsAdvancedDigitizingFloater::changeZ );
58  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::valueMChanged, this, &QgsAdvancedDigitizingFloater::changeM );
59  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::valueAngleChanged, this, &QgsAdvancedDigitizingFloater::changeAngle );
60  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::valueDistanceChanged, this, &QgsAdvancedDigitizingFloater::changeDistance );
61 
62  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::lockXChanged, this, &QgsAdvancedDigitizingFloater::changeLockX );
63  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::lockYChanged, this, &QgsAdvancedDigitizingFloater::changeLockY );
64  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::lockZChanged, this, &QgsAdvancedDigitizingFloater::changeLockZ );
65  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::lockMChanged, this, &QgsAdvancedDigitizingFloater::changeLockM );
66  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::lockAngleChanged, this, &QgsAdvancedDigitizingFloater::changeLockAngle );
67  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::lockDistanceChanged, this, &QgsAdvancedDigitizingFloater::changeLockDistance );
68 
69  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::relativeXChanged, this, &QgsAdvancedDigitizingFloater::changeRelativeX );
70  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::relativeYChanged, this, &QgsAdvancedDigitizingFloater::changeRelativeY );
71  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::relativeZChanged, this, &QgsAdvancedDigitizingFloater::changeRelativeZ );
72  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::relativeMChanged, this, &QgsAdvancedDigitizingFloater::changeRelativeM );
73  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::relativeAngleChanged, this, &QgsAdvancedDigitizingFloater::changeRelativeAngle );
74  // distance is always relative
75 
76  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::focusOnXRequested, this, &QgsAdvancedDigitizingFloater::focusOnX );
77  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::focusOnYRequested, this, &QgsAdvancedDigitizingFloater::focusOnY );
78  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::focusOnZRequested, this, &QgsAdvancedDigitizingFloater::focusOnZ );
79  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::focusOnMRequested, this, &QgsAdvancedDigitizingFloater::focusOnM );
80  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::focusOnAngleRequested, this, &QgsAdvancedDigitizingFloater::focusOnAngle );
81  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::focusOnDistanceRequested, this, &QgsAdvancedDigitizingFloater::focusOnDistance );
82 
83  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::enabledChangedX, this, &QgsAdvancedDigitizingFloater::enabledChangedX );
84  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::enabledChangedY, this, &QgsAdvancedDigitizingFloater::enabledChangedY );
85  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::enabledChangedZ, this, &QgsAdvancedDigitizingFloater::enabledChangedZ );
86  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::enabledChangedM, this, &QgsAdvancedDigitizingFloater::enabledChangedM );
87  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::enabledChangedAngle, this, &QgsAdvancedDigitizingFloater::enabledChangedAngle );
88  connect( cadDockWidget, &QgsAdvancedDigitizingDockWidget::enabledChangedDistance, this, &QgsAdvancedDigitizingFloater::enabledChangedDistance );
89 
90  // Connect our line edits signals to update cadDockWidget's state (implementation copied from QgsAdvancedDigitizingDockWidget)
91  connect( mXLineEdit, &QLineEdit::returnPressed, cadDockWidget, [ = ]() { cadDockWidget->setX( mXLineEdit->text(), QgsAdvancedDigitizingDockWidget::WidgetSetMode::ReturnPressed ); } );
92  connect( mYLineEdit, &QLineEdit::returnPressed, cadDockWidget, [ = ]() { cadDockWidget->setY( mYLineEdit->text(), QgsAdvancedDigitizingDockWidget::WidgetSetMode::ReturnPressed ); } );
93  connect( mZLineEdit, &QLineEdit::returnPressed, cadDockWidget, [ = ]() { cadDockWidget->setZ( mZLineEdit->text(), QgsAdvancedDigitizingDockWidget::WidgetSetMode::ReturnPressed ); } );
94  connect( mMLineEdit, &QLineEdit::returnPressed, cadDockWidget, [ = ]() { cadDockWidget->setM( mMLineEdit->text(), QgsAdvancedDigitizingDockWidget::WidgetSetMode::ReturnPressed ); } );
95  connect( mAngleLineEdit, &QLineEdit::returnPressed, cadDockWidget, [ = ]() { cadDockWidget->setAngle( mAngleLineEdit->text(), QgsAdvancedDigitizingDockWidget::WidgetSetMode::ReturnPressed ); } );
96  connect( mDistanceLineEdit, &QLineEdit::returnPressed, cadDockWidget, [ = ]() { cadDockWidget->setDistance( mDistanceLineEdit->text(), QgsAdvancedDigitizingDockWidget::WidgetSetMode::ReturnPressed ); } );
97 
98  connect( mXLineEdit, &QLineEdit::textEdited, cadDockWidget, [ = ]() { cadDockWidget->setX( mXLineEdit->text(), QgsAdvancedDigitizingDockWidget::WidgetSetMode::TextEdited ); } );
99  connect( mYLineEdit, &QLineEdit::textEdited, cadDockWidget, [ = ]() { cadDockWidget->setY( mYLineEdit->text(), QgsAdvancedDigitizingDockWidget::WidgetSetMode::TextEdited ); } );
100  connect( mZLineEdit, &QLineEdit::textEdited, cadDockWidget, [ = ]() { cadDockWidget->setZ( mZLineEdit->text(), QgsAdvancedDigitizingDockWidget::WidgetSetMode::TextEdited ); } );
101  connect( mMLineEdit, &QLineEdit::textEdited, cadDockWidget, [ = ]() { cadDockWidget->setM( mMLineEdit->text(), QgsAdvancedDigitizingDockWidget::WidgetSetMode::TextEdited ); } );
102  connect( mAngleLineEdit, &QLineEdit::textEdited, cadDockWidget, [ = ]() { cadDockWidget->setAngle( mAngleLineEdit->text(), QgsAdvancedDigitizingDockWidget::WidgetSetMode::TextEdited ); } );
103  connect( mDistanceLineEdit, &QLineEdit::textEdited, cadDockWidget, [ = ]() { cadDockWidget->setDistance( mDistanceLineEdit->text(), QgsAdvancedDigitizingDockWidget::WidgetSetMode::TextEdited ); } );
104 
105  QgsFocusWatcher *xWatcher = new QgsFocusWatcher( mXLineEdit );
106  connect( xWatcher, &QgsFocusWatcher::focusOut, cadDockWidget, [ = ]() { cadDockWidget->setX( mXLineEdit->text(), QgsAdvancedDigitizingDockWidget::WidgetSetMode::FocusOut ); } );
107  QgsFocusWatcher *yWatcher = new QgsFocusWatcher( mYLineEdit );
108  connect( yWatcher, &QgsFocusWatcher::focusOut, cadDockWidget, [ = ]() { cadDockWidget->setY( mYLineEdit->text(), QgsAdvancedDigitizingDockWidget::WidgetSetMode::FocusOut ); } );
109  QgsFocusWatcher *zWatcher = new QgsFocusWatcher( mZLineEdit );
110  connect( zWatcher, &QgsFocusWatcher::focusOut, cadDockWidget, [ = ]() { cadDockWidget->setZ( mZLineEdit->text(), QgsAdvancedDigitizingDockWidget::WidgetSetMode::FocusOut ); } );
111  QgsFocusWatcher *mWatcher = new QgsFocusWatcher( mYLineEdit );
112  connect( mWatcher, &QgsFocusWatcher::focusOut, cadDockWidget, [ = ]() { cadDockWidget->setM( mMLineEdit->text(), QgsAdvancedDigitizingDockWidget::WidgetSetMode::FocusOut ); } );
113  QgsFocusWatcher *angleWatcher = new QgsFocusWatcher( mAngleLineEdit );
114  connect( angleWatcher, &QgsFocusWatcher::focusOut, cadDockWidget, [ = ]() { cadDockWidget->setAngle( mAngleLineEdit->text(), QgsAdvancedDigitizingDockWidget::WidgetSetMode::FocusOut ); } );
115  QgsFocusWatcher *distanceWatcher = new QgsFocusWatcher( mDistanceLineEdit );
116  connect( distanceWatcher, &QgsFocusWatcher::focusOut, cadDockWidget, [ = ]() { cadDockWidget->setDistance( mDistanceLineEdit->text(), QgsAdvancedDigitizingDockWidget::WidgetSetMode::FocusOut ); } );
117 
118 }
119 
120 bool QgsAdvancedDigitizingFloater::eventFilter( QObject *obj, QEvent *event )
121 {
122  if ( mCadDockWidget && mCadDockWidget->cadEnabled() && mActive )
123  {
124  if ( event->type() == QEvent::MouseMove )
125  {
126  // We update the position when mouse moves
127  QMouseEvent *mouseEvent = dynamic_cast<QMouseEvent *>( event );
128  updatePos( mouseEvent->pos() );
129  }
130  else if ( event->type() == QEvent::Enter )
131  {
132  // We show the widget when mouse enters
133  QEnterEvent *enterEvent = dynamic_cast<QEnterEvent *>( event );
134  updatePos( enterEvent->pos() );
135  setVisible( true );
136  }
137  else if ( event->type() == QEvent::Leave )
138  {
139  // We hide the widget when mouse leaves
140  setVisible( false );
141  }
142  }
143  return QWidget::eventFilter( obj, event );
144 }
145 
147 {
148  return mActive;
149 }
150 
152 {
153  QgsSettings().setValue( QStringLiteral( "/Cad/Floater" ), active );
154 
155  mActive = active;
156 
157  hideIfDisabled();
158 }
159 
160 void QgsAdvancedDigitizingFloater::updatePos( const QPoint &pos )
161 {
162  // We hardcode a small delta between the mouse position and the widget's position
163  move( pos + QPoint( 15, 5 ) );
164 }
165 
166 void QgsAdvancedDigitizingFloater::hideIfDisabled()
167 {
168  if ( !mCadDockWidget || ! mCadDockWidget->cadEnabled() || ! mActive )
169  {
170  setVisible( false );
171  }
172 }
173 
174 void QgsAdvancedDigitizingFloater::changeX( const QString &text )
175 {
176  mXLineEdit->setText( text );
177 }
178 
179 void QgsAdvancedDigitizingFloater::changeY( const QString &text )
180 {
181  mYLineEdit->setText( text );
182 }
183 
184 void QgsAdvancedDigitizingFloater::changeZ( const QString &text )
185 {
186  mZLineEdit->setText( text );
187 }
188 
189 void QgsAdvancedDigitizingFloater::changeM( const QString &text )
190 {
191  mMLineEdit->setText( text );
192 }
193 
194 void QgsAdvancedDigitizingFloater::changeDistance( const QString &text )
195 {
196  mDistanceLineEdit->setText( text );
197 }
198 
199 void QgsAdvancedDigitizingFloater::changeAngle( const QString &text )
200 {
201  mAngleLineEdit->setText( text );
202 }
203 
204 void QgsAdvancedDigitizingFloater::changeLockX( bool locked )
205 {
206  if ( !locked )
207  {
208  mXLineEdit->setStyleSheet( QString() );
209  mXLabel->setStyleSheet( QString() );
210  }
211  else
212  {
213  mXLineEdit->setStyleSheet( QStringLiteral( "font-weight: bold" ) );
214  mXLabel->setStyleSheet( QStringLiteral( "font-weight: bold" ) );
215  }
216 }
217 
218 void QgsAdvancedDigitizingFloater::changeLockY( bool locked )
219 {
220  if ( !locked )
221  {
222  mYLineEdit->setStyleSheet( QString() );
223  mYLabel->setStyleSheet( QString() );
224  }
225  else
226  {
227  mYLineEdit->setStyleSheet( QStringLiteral( "font-weight: bold" ) );
228  mYLabel->setStyleSheet( QStringLiteral( "font-weight: bold" ) );
229  }
230 }
231 
232 void QgsAdvancedDigitizingFloater::changeLockZ( bool locked )
233 {
234  if ( !locked )
235  {
236  mZLineEdit->setStyleSheet( QString() );
237  mZLabel->setStyleSheet( QString() );
238  }
239  else
240  {
241  mZLineEdit->setStyleSheet( QStringLiteral( "font-weight: bold" ) );
242  mZLabel->setStyleSheet( QStringLiteral( "font-weight: bold" ) );
243  }
244 }
245 
246 void QgsAdvancedDigitizingFloater::changeLockM( bool locked )
247 {
248  if ( !locked )
249  {
250  mMLineEdit->setStyleSheet( QString() );
251  mMLabel->setStyleSheet( QString() );
252  }
253  else
254  {
255  mMLineEdit->setStyleSheet( QStringLiteral( "font-weight: bold" ) );
256  mMLabel->setStyleSheet( QStringLiteral( "font-weight: bold" ) );
257  }
258 }
259 
260 void QgsAdvancedDigitizingFloater::changeLockDistance( bool locked )
261 {
262  if ( !locked )
263  {
264  mDistanceLineEdit->setStyleSheet( QString() );
265  mDistanceLabel->setStyleSheet( QString() );
266  }
267  else
268  {
269  mDistanceLineEdit->setStyleSheet( QStringLiteral( "font-weight: bold" ) );
270  mDistanceLabel->setStyleSheet( QStringLiteral( "font-weight: bold" ) );
271  }
272 }
273 
274 void QgsAdvancedDigitizingFloater::changeLockAngle( bool locked )
275 {
276  if ( !locked )
277  {
278  mAngleLineEdit->setStyleSheet( QString() );
279  mAngleLabel->setStyleSheet( QString() );
280  }
281  else
282  {
283  mAngleLineEdit->setStyleSheet( QStringLiteral( "font-weight: bold" ) );
284  mAngleLabel->setStyleSheet( QStringLiteral( "font-weight: bold" ) );
285  }
286 }
287 
288 
289 void QgsAdvancedDigitizingFloater::changeRelativeX( bool relative )
290 {
291  if ( !relative )
292  {
293  mXLabel->setText( "x" );
294  }
295  else
296  {
297  mXLabel->setText( "Δx" );
298  }
299  adjustSize();
300 }
301 
302 void QgsAdvancedDigitizingFloater::changeRelativeY( bool relative )
303 {
304  if ( !relative )
305  {
306  mYLabel->setText( "y" );
307  }
308  else
309  {
310  mYLabel->setText( "Δy" );
311  }
312  adjustSize();
313 }
314 
315 void QgsAdvancedDigitizingFloater::changeRelativeZ( bool relative )
316 {
317  if ( !relative )
318  {
319  mZLabel->setText( "z" );
320  }
321  else
322  {
323  mZLabel->setText( "Δz" );
324  }
325  adjustSize();
326 }
327 
328 void QgsAdvancedDigitizingFloater::changeRelativeM( bool relative )
329 {
330  if ( !relative )
331  {
332  mMLabel->setText( "m" );
333  }
334  else
335  {
336  mMLabel->setText( "Δm" );
337  }
338  adjustSize();
339 }
340 
341 // distance is always relative
342 
343 void QgsAdvancedDigitizingFloater::changeRelativeAngle( bool relative )
344 {
345  if ( !relative )
346  {
347  mAngleLabel->setText( "a" );
348  }
349  else
350  {
351  mAngleLabel->setText( "Δa" );
352  }
353  adjustSize();
354 }
355 
356 void QgsAdvancedDigitizingFloater::focusOnX()
357 {
358  if ( mActive )
359  {
360  mXLineEdit->setFocus();
361  mXLineEdit->selectAll();
362  }
363 }
364 
365 void QgsAdvancedDigitizingFloater::focusOnY()
366 {
367  if ( mActive )
368  {
369  mYLineEdit->setFocus();
370  mYLineEdit->selectAll();
371  }
372 }
373 
374 void QgsAdvancedDigitizingFloater::focusOnZ()
375 {
376  if ( mActive )
377  {
378  mZLineEdit->setFocus();
379  mZLineEdit->selectAll();
380  }
381 }
382 
383 void QgsAdvancedDigitizingFloater::focusOnM()
384 {
385  if ( mActive )
386  {
387  mMLineEdit->setFocus();
388  mMLineEdit->selectAll();
389  }
390 }
391 
392 void QgsAdvancedDigitizingFloater::focusOnDistance()
393 {
394  if ( mActive )
395  {
396  mDistanceLineEdit->setFocus();
397  mDistanceLineEdit->selectAll();
398  }
399 }
400 
401 void QgsAdvancedDigitizingFloater::focusOnAngle()
402 {
403  if ( mActive )
404  {
405  mAngleLineEdit->setFocus();
406  mAngleLineEdit->selectAll();
407  }
408 }
409 
410 
411 void QgsAdvancedDigitizingFloater::enabledChangedX( bool enabled )
412 {
413  mXLineEdit->setVisible( enabled );
414  mXLabel->setVisible( enabled );
415  adjustSize();
416 }
417 
418 void QgsAdvancedDigitizingFloater::enabledChangedY( bool enabled )
419 {
420  mYLineEdit->setVisible( enabled );
421  mYLabel->setVisible( enabled );
422  adjustSize();
423 }
424 
425 void QgsAdvancedDigitizingFloater::enabledChangedZ( bool enabled )
426 {
427  mZLineEdit->setVisible( enabled );
428  mZLabel->setVisible( enabled );
429  adjustSize();
430 }
431 
432 void QgsAdvancedDigitizingFloater::enabledChangedM( bool enabled )
433 {
434  mMLineEdit->setVisible( enabled );
435  mMLabel->setVisible( enabled );
436  adjustSize();
437 }
438 
439 void QgsAdvancedDigitizingFloater::enabledChangedDistance( bool enabled )
440 {
441  mDistanceLineEdit->setVisible( enabled );
442  mDistanceLabel->setVisible( enabled );
443  adjustSize();
444 }
445 
446 void QgsAdvancedDigitizingFloater::enabledChangedAngle( bool enabled )
447 {
448  mAngleLineEdit->setVisible( enabled );
449  mAngleLabel->setVisible( enabled );
450  adjustSize();
451 }
QgsAdvancedDigitizingDockWidget::enabledChangedZ
void enabledChangedZ(bool enabled)
Emitted whenever the Z field is enabled or disabled.
QgsAdvancedDigitizingDockWidget::lockMChanged
void lockMChanged(bool locked)
Emitted whenever the M parameter is locked.
qgsmapcanvas.h
QgsAdvancedDigitizingDockWidget::enabledChangedY
void enabledChangedY(bool enabled)
Emitted whenever the Y field is enabled or disabled.
QgsAdvancedDigitizingDockWidget::setAngle
void setAngle(const QString &value, WidgetSetMode mode)
Set the angle value on the widget.
Definition: qgsadvanceddigitizingdockwidget.cpp:298
QgsAdvancedDigitizingDockWidget::valueZChanged
void valueZChanged(const QString &value)
Emitted whenever the Z value changes (either the mouse moved, or the user changed the input).
QgsAdvancedDigitizingDockWidget::lockXChanged
void lockXChanged(bool locked)
Emitted whenever the X parameter is locked.
QgsAdvancedDigitizingDockWidget::focusOnMRequested
void focusOnMRequested()
Emitted whenever the M field should get the focus using the shortcuts (M).
QgsAdvancedDigitizingFloater::setActive
void setActive(bool active)
Set whether the floater should be active or not.
Definition: qgsadvanceddigitizingfloater.cpp:151
QgsAdvancedDigitizingDockWidget::setZ
void setZ(const QString &value, WidgetSetMode mode)
Set the Z value on the widget.
Definition: qgsadvanceddigitizingdockwidget.cpp:264
QgsAdvancedDigitizingDockWidget::focusOnZRequested
void focusOnZRequested()
Emitted whenever the Z field should get the focus using the shortcuts (Z).
QgsAdvancedDigitizingDockWidget::setDistance
void setDistance(const QString &value, WidgetSetMode mode)
Set the distance value on the widget.
Definition: qgsadvanceddigitizingdockwidget.cpp:310
QgsMapCanvas
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:89
QgsAdvancedDigitizingDockWidget::valueMChanged
void valueMChanged(const QString &value)
Emitted whenever the M value changes (either the mouse moved, or the user changed the input).
QgsSettings
This class is a composition of two QSettings instances:
Definition: qgssettings.h:61
QgsFocusWatcher
A event filter for watching for focus events on a parent object. Usually QObjects must subclass and o...
Definition: qgsfocuswatcher.h:33
QgsAdvancedDigitizingDockWidget::valueDistanceChanged
void valueDistanceChanged(const QString &value)
Emitted whenever the distance value changes (either the mouse moved, or the user changed the input).
QgsAdvancedDigitizingFloater::QgsAdvancedDigitizingFloater
QgsAdvancedDigitizingFloater(QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget)
Create an advanced digitizing floater widget.
Definition: qgsadvanceddigitizingfloater.cpp:26
QgsAdvancedDigitizingDockWidget::focusOnAngleRequested
void focusOnAngleRequested()
Emitted whenever the angle field should get the focus using the shortcuts (A).
QgsAdvancedDigitizingDockWidget::lockDistanceChanged
void lockDistanceChanged(bool locked)
Emitted whenever the distance parameter is locked.
QgsAdvancedDigitizingDockWidget::relativeYChanged
void relativeYChanged(bool relative)
Emitted whenever the Y parameter is toggled between absolute and relative.
QgsAdvancedDigitizingDockWidget::valueXChanged
void valueXChanged(const QString &value)
Emitted whenever the X value changes (either the mouse moved, or the user changed the input).
QgsAdvancedDigitizingDockWidget::focusOnXRequested
void focusOnXRequested()
Emitted whenever the X field should get the focus using the shortcuts (X).
QgsAdvancedDigitizingDockWidget::setX
void setX(const QString &value, WidgetSetMode mode)
Set the X value on the widget.
Definition: qgsadvanceddigitizingdockwidget.cpp:230
QgsAdvancedDigitizingDockWidget::cadEnabledChanged
void cadEnabledChanged(bool enabled)
Signals for external widgets that need to update according to current values.
QgsAdvancedDigitizingDockWidget::enabledChangedDistance
void enabledChangedDistance(bool enabled)
Emitted whenever the distance field is enabled or disabled.
QgsAdvancedDigitizingDockWidget::enabledChangedAngle
void enabledChangedAngle(bool enabled)
Emitted whenever the angle field is enabled or disabled.
QgsAdvancedDigitizingDockWidget::relativeMChanged
void relativeMChanged(bool relative)
Emitted whenever the M parameter is toggled between absolute and relative.
QgsAdvancedDigitizingDockWidget::lockAngleChanged
void lockAngleChanged(bool locked)
Emitted whenever the angle parameter is locked.
QgsSettings::setValue
void setValue(const QString &key, const QVariant &value, QgsSettings::Section section=QgsSettings::NoSection)
Sets the value of setting key to value.
Definition: qgssettings.cpp:279
qgsfocuswatcher.h
qgsadvanceddigitizingfloater.h
QgsFocusWatcher::focusOut
void focusOut()
Emitted when parent object loses focus.
QgsAdvancedDigitizingDockWidget
The QgsAdvancedDigitizingDockWidget class is a dockable widget used to handle the CAD tools on top of...
Definition: qgsadvanceddigitizingdockwidget.h:50
QgsAdvancedDigitizingDockWidget::valueAngleChanged
void valueAngleChanged(const QString &value)
Emitted whenever the angle value changes (either the mouse moved, or the user changed the input).
QgsAdvancedDigitizingDockWidget::enabledChangedX
void enabledChangedX(bool enabled)
Emitted whenever the X field is enabled or disabled.
QgsAdvancedDigitizingDockWidget::setM
void setM(const QString &value, WidgetSetMode mode)
Set the M value on the widget.
Definition: qgsadvanceddigitizingdockwidget.cpp:281
QgsAdvancedDigitizingDockWidget::valueYChanged
void valueYChanged(const QString &value)
Emitted whenever the Y value changes (either the mouse moved, or the user changed the input).
QgsAdvancedDigitizingDockWidget::relativeXChanged
void relativeXChanged(bool relative)
Emitted whenever the X parameter is toggled between absolute and relative.
qgssettings.h
QgsAdvancedDigitizingFloater::active
bool active()
Whether the floater is active or not.
Definition: qgsadvanceddigitizingfloater.cpp:146
QgsAdvancedDigitizingDockWidget::focusOnDistanceRequested
void focusOnDistanceRequested()
Emitted whenever the distance field should get the focus using the shortcuts (D).
QgsAdvancedDigitizingDockWidget::relativeAngleChanged
void relativeAngleChanged(bool relative)
Emitted whenever the angleX parameter is toggled between absolute and relative.
QgsAdvancedDigitizingDockWidget::focusOnYRequested
void focusOnYRequested()
Emitted whenever the Y field should get the focus using the shortcuts (Y).
QgsAdvancedDigitizingDockWidget::setY
void setY(const QString &value, WidgetSetMode mode)
Set the Y value on the widget.
Definition: qgsadvanceddigitizingdockwidget.cpp:247
QgsAdvancedDigitizingDockWidget::lockYChanged
void lockYChanged(bool locked)
Emitted whenever the Y parameter is locked.
QgsAdvancedDigitizingDockWidget::lockZChanged
void lockZChanged(bool locked)
Emitted whenever the Z parameter is locked.
QgsAdvancedDigitizingDockWidget::relativeZChanged
void relativeZChanged(bool relative)
Emitted whenever the Z parameter is toggled between absolute and relative.
QgsAdvancedDigitizingDockWidget::enabledChangedM
void enabledChangedM(bool enabled)
Emitted whenever the M field is enabled or disabled.
qgsmessagelog.h