Skip to content
Permalink
Browse files

[FEATURE][needs-docs] add a floater showing advanced input editlines …

…next to the mouse

Sponsored by Kanton Schaffhausen in collaboration with OPENGIS.ch
  • Loading branch information
olivierdalang committed May 13, 2019
1 parent fe39b26 commit d6ac603556f4923df298407c812afbef8dad0253
@@ -614,6 +614,7 @@
<file>themes/default/mActionPanHighlightFeature.svg</file>
<file>themes/default/cadtools/construction.svg</file>
<file>themes/default/cadtools/delta.svg</file>
<file>themes/default/cadtools/floater.svg</file>
<file>themes/default/cadtools/cad.svg</file>
<file>themes/default/cadtools/lock.svg</file>
<file>themes/default/cadtools/parallel.svg</file>
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
<style type="text/css">
.st0{fill-rule:evenodd;clip-rule:evenodd;fill:#FFEE7F;stroke:#80752A;stroke-width:1.1256;stroke-linecap:square;}
.st1{fill-rule:evenodd;clip-rule:evenodd;fill:#FFEE7F;stroke:#B8A93D;stroke-width:1.1256;}
.st2{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:0.6;stroke-linecap:round;stroke-linejoin:round;}
</style>
<g>
<path class="st0" d="M22.8,22.5V11H8.9v11.5H22.8z"/>
<path class="st1" d="M21.6,20.9H17"/>
<path class="st1" d="M21.6,19.2h-6.9"/>
<path class="st1" d="M21.6,17.6H17"/>
<path class="st1" d="M21.6,15.9h-6.9"/>
<path class="st1" d="M21.6,14.3H17"/>
<path class="st1" d="M21.6,12.6h-6.9"/>
</g>
<path class="st2" d="M12.9,7.6L1.7,1.5l4.8,11.9l1.9-3.1l3.8,4.1l1.4-1.4L9.8,9C9.8,9,12.9,7.6,12.9,7.6z"/>
</svg>
@@ -161,12 +161,6 @@ Create an advanced digitizing dock widget

:param canvas: The map canvas on which the widget operates
:param parent: The parent
%End

virtual void hideEvent( QHideEvent * );

%Docstring
Disables the CAD tools when hiding the dock
%End

bool canvasKeyPressEventFilter( QKeyEvent *e );
@@ -336,6 +330,54 @@ Disable the widget. Normally done automatically from :py:func:`QgsMapToolAdvance
Updates canvas item that displays constraints on the ma

.. versionadded:: 3.0
%End

void setX( const QString &value );
%Docstring
Set and lock the X ``value``.
Can be used to set constraints.

.. note::

The value is a QString, as it could be an expression.

.. versionadded:: 3.8
%End

void setY( const QString &value );
%Docstring
Set and lock the Y ``value``.
Can be used to set constraints.

.. note::

The value is a QString, as it could be an expression.

.. versionadded:: 3.8
%End

void setAngle( const QString &value );
%Docstring
Set and lock the angle ``value``.
Can be used to set constraints.

.. note::

The value is a QString, as it could be an expression.

.. versionadded:: 3.8
%End

void setDistance( const QString &value );
%Docstring
Set and lock the distance ``value``.
Can be used to set constraints.

.. note::

The value is a QString, as it could be an expression.

.. versionadded:: 3.8
%End

signals:
@@ -360,6 +402,186 @@ when a constraint is toggled.
:param point: The last known digitizing point. Can be used to emulate a mouse event.
%End


void cadEnabledChanged( bool enabled );
%Docstring
Emitted whenever CAD is enabled or disabled

:param enabled: Whether CAD is enabled or not.

.. versionadded:: 3.8
%End

void valueXChanged( const QString &value );
%Docstring
Emitted whenever the X ``value`` changes (either the mouse moved, or the user changed the input).
Could be used by widgets that must reflect the current advanced digitizing state.

.. versionadded:: 3.8
%End

void valueYChanged( const QString &value );
%Docstring
Emitted whenever the Y ``value`` changes (either the mouse moved, or the user changed the input).
Could be used by widgets that must reflect the current advanced digitizing state.

.. versionadded:: 3.8
%End

void valueAngleChanged( const QString &value );
%Docstring
Emitted whenever the angle ``value`` changes (either the mouse moved, or the user changed the input).
Could be used by widgets that must reflect the current advanced digitizing state.

.. versionadded:: 3.8
%End

void valueDistanceChanged( const QString &value );
%Docstring
Emitted whenever the distance ``value`` changes (either the mouse moved, or the user changed the input).
Could be used by widgets that must reflect the current advanced digitizing state.

.. versionadded:: 3.8
%End

void lockXChanged( bool locked );
%Docstring
Emitted whenever the X parameter is ``locked``.
Could be used by widgets that must reflect the current advanced digitizing state.

.. versionadded:: 3.8
%End

void lockYChanged( bool locked );
%Docstring
Emitted whenever the Y parameter is ``locked``.
Could be used by widgets that must reflect the current advanced digitizing state.

.. versionadded:: 3.8
%End

void lockAngleChanged( bool locked );
%Docstring
Emitted whenever the angle parameter is ``locked``.
Could be used by widgets that must reflect the current advanced digitizing state.
%End

void lockDistanceChanged( bool locked );
%Docstring
Emitted whenever the distance parameter is ``locked``.
Could be used by widgets that must reflect the current advanced digitizing state.

.. versionadded:: 3.8
%End

void relativeXChanged( bool relative );
%Docstring
Emitted whenever the X parameter is toggled between absolute and relative.
Could be used by widgets that must reflect the current advanced digitizing state.

:param relative: Whether the X parameter is relative or not.

.. versionadded:: 3.8
%End

void relativeYChanged( bool relative );
%Docstring
Emitted whenever the Y parameter is toggled between absolute and relative.
Could be used by widgets that must reflect the current advanced digitizing state.

:param relative: Whether the Y parameter is relative or not.

.. versionadded:: 3.8
%End

void relativeAngleChanged( bool relative );
%Docstring
Emitted whenever the angleX parameter is toggled between absolute and relative.
Could be used by widgets that must reflect the current advanced digitizing state.

:param relative: Whether the angle parameter is relative or not.

.. versionadded:: 3.8
%End


void enabledChangedX( bool enabled );
%Docstring
Emitted whenever the X field is enabled or disabled. Depending on the context, some parameters
do not make sense (e.g. you need a previous point to define a distance).
Could be used by widgets that must reflect the current advanced digitizing state.

:param enabled: Whether the X parameter is enabled or not.

.. versionadded:: 3.8
%End

void enabledChangedY( bool enabled );
%Docstring
Emitted whenever the Y field is enabled or disabled. Depending on the context, some parameters
do not make sense (e.g. you need a previous point to define a distance).
Could be used by widgets that must reflect the current advanced digitizing state.

:param enabled: Whether the Y parameter is enabled or not.

.. versionadded:: 3.8
%End

void enabledChangedAngle( bool enabled );
%Docstring
Emitted whenever the angle field is enabled or disabled. Depending on the context, some parameters
do not make sense (e.g. you need a previous point to define a distance).
Could be used by widgets that must reflect the current advanced digitizing state.

:param enabled: Whether the angle parameter is enabled or not.

.. versionadded:: 3.8
%End

void enabledChangedDistance( bool enabled );
%Docstring
Emitted whenever the distance field is enabled or disabled. Depending on the context, some parameters
do not make sense (e.g. you need a previous point to define a distance).
Could be used by widgets that must reflect the current advanced digitizing state.

:param enabled: Whether the distance parameter is enabled or not.

.. versionadded:: 3.8
%End

void focusOnXRequested();
%Docstring
Emitted whenever the X field should get the focus using the shortcuts (X).
Could be used by widgets to capture the focus when a field is being edited.

.. versionadded:: 3.8
%End

void focusOnYRequested();
%Docstring
Emitted whenever the Y field should get the focus using the shortcuts (Y).
Could be used by widgets to capture the focus when a field is being edited.

.. versionadded:: 3.8
%End

void focusOnAngleRequested();
%Docstring
Emitted whenever the angle field should get the focus using the shortcuts (A).
Could be used by widgets to capture the focus when a field is being edited.

.. versionadded:: 3.8
%End

void focusOnDistanceRequested();
%Docstring
Emitted whenever the distance field should get the focus using the shortcuts (D).
Could be used by widgets to capture the focus when a field is being edited.

.. versionadded:: 3.8
%End


private:
//! event filter for line edits in the dock UI (angle/distance/x/y line edits)
bool eventFilter( QObject *obj, QEvent *event );
@@ -214,6 +214,7 @@ SET(QGIS_GUI_SRCS
qgsactionmenu.cpp
qgsadvanceddigitizingcanvasitem.cpp
qgsadvanceddigitizingdockwidget.cpp
qgsadvanceddigitizingfloater.cpp
qgsaggregatetoolbutton.cpp
qgsattributedialog.cpp
qgsattributeform.cpp
@@ -401,6 +402,7 @@ SET(QGIS_GUI_MOC_HDRS
qgisinterface.h
qgsactionmenu.h
qgsadvanceddigitizingdockwidget.h
qgsadvanceddigitizingfloater.h
qgsaggregatetoolbutton.h
qgsattributedialog.h
qgsattributeform.h

0 comments on commit d6ac603

Please sign in to comment.
You can’t perform that action at this time.