18#ifndef QGSELEVATIONCONTROLLERWIDGET_H
19#define QGSELEVATIONCONTROLLERWIDGET_H
27#include <QWidgetAction>
38class GUI_EXPORT QgsElevationControllerLabels :
public QWidget
SIP_SKIP
45 void paintEvent( QPaintEvent *event )
override;
47 void setLimits(
const QgsDoubleRange &limits );
48 void setRange(
const QgsDoubleRange &range );
49 void setInverted(
bool inverted );
50 void setSignificantElevations(
const QList<double> &elevations );
53 QgsDoubleRange mLimits;
54 QgsDoubleRange mRange;
55 bool mInverted =
false;
56 QList<double> mSignificantElevations;
59class GUI_EXPORT QgsElevationControllerSettingsAction :
public QWidgetAction
SIP_SKIP
64 QgsElevationControllerSettingsAction( QWidget *parent =
nullptr );
70 void setLimits(
const QgsDoubleRange &limits );
73 void setFixedRangeSize(
double size );
76 void updateRangeSize(
double size );
81 void limitsChanged(
const QgsDoubleRange &limits );
84 void fixedRangeSizeChanged(
double size );
87 void fullRangeRequested();
90 bool eventFilter( QObject *watched, QEvent *event )
override;
95 QMenu *mMenu =
nullptr;
96 bool mSuppressRecurse =
false;
97 QgsDoubleSpinBox *mLowerSpin =
nullptr;
98 QgsDoubleSpinBox *mUpperSpin =
nullptr;
99 QToolButton *mLimitsButton =
nullptr;
100 QMenu *mLimitsMenu =
nullptr;
101 QgsDoubleSpinBox *mSizeSpin =
nullptr;
102 QToolButton *mLockButton =
nullptr;
118 if ( qobject_cast<QgsElevationControllerWidget *>( sipCpp ) !=
nullptr )
119 sipType = sipType_QgsElevationControllerWidget;
257 void updateWidgetMask();
263 void setLimitsFromLayers(
const QList<QgsMapLayer *> &layers );
265 static bool layerHasElevation(
QgsMapLayer *layer );
274 double snapValue(
double value )
const;
285 QToolButton *mConfigureButton =
nullptr;
286 QgsElevationControllerSettingsAction *mSettingsAction =
nullptr;
287 QMenu *mMenu =
nullptr;
288 QAction *mInvertDirectionAction =
nullptr;
290 QgsElevationControllerLabels *mSliderLabels =
nullptr;
291 QPointer<QgsMapCanvas> mMapCanvas;
294 QList<double> mSignificantElevations;
295 double mSnapInterval = 0;
296 int mSnapDecimals = 0;
297 double mFixedRangeSize = -1;
298 int mBlockSliderChanges = 0;
299 double mSliderPrecision = 100;
QgsRange which stores a range of double values.
The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value.
Map canvas is a class for displaying all GIS data types on a canvas.
Base class for all map layer types.
A slider control with two interactive endpoints, for interactive selection of a range of values.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)