51 mCopyFromDockMenu =
new QMenu(
this );
52 connect( mCopyFromDockMenu, &QMenu::aboutToShow,
this, [ = ]
57 connect( mActionRefresh, &QAction::triggered,
this, [ = ]
63 mProfile->invalidateCache();
67 QToolButton *copyFromDockButton =
new QToolButton();
68 copyFromDockButton->setAutoRaise(
true );
69 copyFromDockButton->setToolTip( tr(
"Copy From Profile" ) );
70 copyFromDockButton->setMenu( mCopyFromDockMenu );
71 copyFromDockButton->setPopupMode( QToolButton::InstantPopup );
74 mDockToolbar->addWidget( copyFromDockButton );
78 mainLayout->addWidget( mItemPropertiesWidget );
83 mSpinTolerance->setClearValue( 0 );
84 connect( mSpinTolerance, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double value )
86 if ( !mProfile || mBlockChanges )
90 mProfile->setTolerance( value );
91 mProfile->invalidateCache();
93 mProfile->endCommand();
96 connect( mCheckControlledByAtlas, &QCheckBox::toggled,
this, [ = ]
98 if ( !mProfile || mBlockChanges )
101 mProfile->beginCommand( tr(
"Change Profile Atlas Control" ) );
102 mProfile->setAtlasDriven( mCheckControlledByAtlas->isChecked() );
103 mProfile->invalidateCache();
105 mProfile->endCommand();
108 mSpinMinDistance->setClearValue( 0 );
109 connect( mSpinMinDistance, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double value )
111 if ( !mProfile || mBlockChanges )
115 mProfile->plot()->setXMinimum( value );
116 mProfile->invalidateCache();
118 mProfile->endCommand();
121 connect( mSpinMaxDistance, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double value )
123 if ( !mProfile || mBlockChanges )
127 mProfile->plot()->setXMaximum( value );
128 mProfile->invalidateCache();
130 mProfile->endCommand();
133 mSpinMinElevation->setClearValue( 0 );
134 connect( mSpinMinElevation, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double value )
136 if ( !mProfile || mBlockChanges )
140 mProfile->plot()->setYMinimum( value );
141 mProfile->invalidateCache();
143 mProfile->endCommand();
146 connect( mSpinMaxElevation, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double value )
148 if ( !mProfile || mBlockChanges )
152 mProfile->plot()->setYMaximum( value );
153 mProfile->invalidateCache();
155 mProfile->endCommand();
161 if ( !mProfile || mBlockChanges )
165 mProfile->plot()->xAxis().setGridMajorSymbol( mDistanceAxisMajorLinesSymbolButton->clonedSymbol<
QgsLineSymbol>() );
166 mProfile->invalidateCache();
168 mProfile->endCommand();
175 if ( !mProfile || mBlockChanges )
179 mProfile->plot()->xAxis().setGridMinorSymbol( mDistanceAxisMinorLinesSymbolButton->clonedSymbol<
QgsLineSymbol>() );
180 mProfile->invalidateCache();
182 mProfile->endCommand();
186 connect( mDistanceAxisMajorIntervalSpin, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double value )
188 if ( !mProfile || mBlockChanges )
192 mProfile->plot()->xAxis().setGridIntervalMajor( value );
193 mProfile->invalidateCache();
195 mProfile->endCommand();
198 connect( mDistanceAxisMinorIntervalSpin, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double value )
200 if ( !mProfile || mBlockChanges )
204 mProfile->plot()->xAxis().setGridIntervalMinor( value );
205 mProfile->invalidateCache();
207 mProfile->endCommand();
210 connect( mDistanceAxisLabelIntervalSpin, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double value )
212 if ( !mProfile || mBlockChanges )
216 mProfile->plot()->xAxis().setLabelInterval( value );
217 mProfile->invalidateCache();
219 mProfile->endCommand();
225 if ( !mProfile || mBlockChanges )
229 mProfile->plot()->yAxis().setGridMajorSymbol( mElevationAxisMajorLinesSymbolButton->clonedSymbol<
QgsLineSymbol>() );
230 mProfile->invalidateCache();
232 mProfile->endCommand();
239 if ( !mProfile || mBlockChanges )
243 mProfile->plot()->yAxis().setGridMinorSymbol( mElevationAxisMinorLinesSymbolButton->clonedSymbol<
QgsLineSymbol>() );
244 mProfile->invalidateCache();
246 mProfile->endCommand();
250 connect( mElevationAxisLabelIntervalSpin, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double value )
252 if ( !mProfile || mBlockChanges )
256 mProfile->plot()->yAxis().setLabelInterval( value );
257 mProfile->invalidateCache();
259 mProfile->endCommand();
262 connect( mElevationAxisMajorIntervalSpin, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double value )
264 if ( !mProfile || mBlockChanges )
268 mProfile->plot()->yAxis().setGridIntervalMajor( value );
269 mProfile->invalidateCache();
271 mProfile->endCommand();
274 connect( mElevationAxisMinorIntervalSpin, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double value )
276 if ( !mProfile || mBlockChanges )
280 mProfile->plot()->yAxis().setGridIntervalMinor( value );
281 mProfile->invalidateCache();
283 mProfile->endCommand();
289 if ( !mProfile || mBlockChanges )
293 mProfile->plot()->setChartBackgroundSymbol( mChartBackgroundSymbolButton->clonedSymbol<
QgsFillSymbol>() );
294 mProfile->invalidateCache();
296 mProfile->endCommand();
303 if ( !mProfile || mBlockChanges )
307 mProfile->plot()->setChartBorderSymbol( mChartBorderSymbolButton->clonedSymbol<
QgsFillSymbol>() );
308 mProfile->invalidateCache();
310 mProfile->endCommand();
314 connect( mDistanceAxisLabelFormatButton, &QPushButton::clicked,
this, [ = ]
316 if ( !mProfile || mBlockChanges )
321 widget->
setFormat( mProfile->plot()->xAxis().numericFormat() );
325 mProfile->plot()->xAxis().setNumericFormat( widget->
format() );
326 mProfile->invalidateCache();
327 mProfile->endCommand();
333 connect( mElevationAxisLabelFormatButton, &QPushButton::clicked,
this, [ = ]
335 if ( !mProfile || mBlockChanges )
340 widget->
setFormat( mProfile->plot()->yAxis().numericFormat() );
344 mProfile->plot()->yAxis().setNumericFormat( widget->
format() );
345 mProfile->invalidateCache();
346 mProfile->endCommand();
352 mDistanceAxisLabelFontButton->setDialogTitle( tr(
"Distance Label Font" ) );
353 mElevationAxisLabelFontButton->setDialogTitle( tr(
"Elevation Label Font" ) );
359 if ( !mProfile || mBlockChanges )
363 mProfile->plot()->xAxis().setTextFormat( mDistanceAxisLabelFontButton->textFormat() );
364 mProfile->invalidateCache();
365 mProfile->endCommand();
371 if ( !mProfile || mBlockChanges )
375 mProfile->plot()->yAxis().setTextFormat( mElevationAxisLabelFontButton->textFormat() );
376 mProfile->invalidateCache();
377 mProfile->endCommand();
381 mSpinLeftMargin->setClearValue( 0 );
382 connect( mSpinLeftMargin, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double value )
384 if ( !mProfile || mBlockChanges )
388 QgsMargins margins = mProfile->plot()->margins();
390 mProfile->plot()->setMargins( margins );
391 mProfile->invalidateCache();
393 mProfile->endCommand();
396 mSpinRightMargin->setClearValue( 0 );
397 connect( mSpinRightMargin, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double value )
399 if ( !mProfile || mBlockChanges )
403 QgsMargins margins = mProfile->plot()->margins();
405 mProfile->plot()->setMargins( margins );
406 mProfile->invalidateCache();
408 mProfile->endCommand();
411 mSpinTopMargin->setClearValue( 0 );
412 connect( mSpinTopMargin, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double value )
414 if ( !mProfile || mBlockChanges )
418 QgsMargins margins = mProfile->plot()->margins();
420 mProfile->plot()->setMargins( margins );
421 mProfile->invalidateCache();
423 mProfile->endCommand();
426 mSpinBottomMargin->setClearValue( 0 );
427 connect( mSpinBottomMargin, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double value )
429 if ( !mProfile || mBlockChanges )
433 QgsMargins margins = mProfile->plot()->margins();
435 mProfile->plot()->setMargins( margins );
436 mProfile->invalidateCache();
438 mProfile->endCommand();
443 Qgis::DistanceUnit::Kilometers,
444 Qgis::DistanceUnit::Meters,
445 Qgis::DistanceUnit::Centimeters,
446 Qgis::DistanceUnit::Millimeters,
447 Qgis::DistanceUnit::Miles,
448 Qgis::DistanceUnit::NauticalMiles,
449 Qgis::DistanceUnit::Yards,
450 Qgis::DistanceUnit::Feet,
452 Qgis::DistanceUnit::Degrees,
464 mDistanceUnitCombo->addItem( title, QVariant::fromValue( unit ) );
467 connect( mDistanceUnitCombo, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ](
int )
469 if ( !mProfile || mBlockChanges )
472 mProfile->beginCommand( tr(
"Change Profile Chart Units" ) );
473 mProfile->setDistanceUnit( mDistanceUnitCombo->currentData().value<
Qgis::DistanceUnit >() );
474 mProfile->invalidateCache();
476 mProfile->endCommand();
484 connect( mDistanceLabelsCombo, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ](
int )
486 if ( !mProfile || mBlockChanges )
489 mProfile->beginCommand( tr(
"Change Profile Chart Label Placement" ) );
491 mProfile->invalidateCache();
493 mProfile->endCommand();
515 QVBoxLayout *vl =
new QVBoxLayout();
516 vl->setContentsMargins( 0, 0, 0, 0 );
517 vl->addWidget( mLayerTreeView );
518 mTreeViewContainer->setLayout( vl );
524 setGuiElementValues();
526 mDistanceAxisMajorLinesSymbolButton->registerExpressionContextGenerator( mProfile );
527 mDistanceAxisMinorLinesSymbolButton->registerExpressionContextGenerator( mProfile );
528 mElevationAxisMajorLinesSymbolButton->registerExpressionContextGenerator( mProfile );
529 mElevationAxisMinorLinesSymbolButton->registerExpressionContextGenerator( mProfile );
530 mChartBackgroundSymbolButton->registerExpressionContextGenerator( mProfile );
531 mChartBorderSymbolButton->registerExpressionContextGenerator( mProfile );
532 mDistanceAxisLabelFontButton->registerExpressionContextGenerator( mProfile );
533 mElevationAxisLabelFontButton->registerExpressionContextGenerator( mProfile );
535 mDistanceAxisMajorLinesSymbolButton->setLayer(
coverageLayer() );
536 mDistanceAxisMinorLinesSymbolButton->setLayer(
coverageLayer() );
537 mElevationAxisMajorLinesSymbolButton->setLayer(
coverageLayer() );
538 mElevationAxisMinorLinesSymbolButton->setLayer(
coverageLayer() );
544 if ( mProfile->layout() )
548 mDistanceAxisMajorLinesSymbolButton->setLayer( layer );
549 mDistanceAxisMinorLinesSymbolButton->setLayer( layer );
550 mElevationAxisMajorLinesSymbolButton->setLayer( layer );
551 mElevationAxisMinorLinesSymbolButton->setLayer( layer );
552 mDistanceAxisLabelFontButton->setLayer( layer );
553 mElevationAxisLabelFontButton->setLayer( layer );
554 mChartBackgroundSymbolButton->setLayer( layer );
555 mChartBorderSymbolButton->setLayer( layer );
559 this, &QgsLayoutElevationProfileWidget::atlasLayerChanged );
565 layoutAtlasToggled( atlas->enabled() );
573 if ( mItemPropertiesWidget )
579 return mProfile->createExpressionContext();
590 mCheckControlledByAtlas->setText( tr(
"Controlled by %1" ).arg(
string == tr(
"atlas" ) ? tr(
"Atlas" ) : tr(
"Report" ) ) );
597 mProfile->setCrs( canvas->
crs() );
599 mSpinTolerance->setValue( canvas->
tolerance() );
600 mProfile->setTolerance( canvas->
tolerance() );
603 mDistanceUnitCombo->setCurrentIndex( mDistanceUnitCombo->findData( QVariant::fromValue( canvas->
distanceUnit() ) ) );
606 mDistanceLabelsCombo->setCurrentIndex( mDistanceLabelsCombo->findData( QVariant::fromValue( canvas->
plot().
xAxis().
labelSuffixPlacement() ) ) );
609 mProfile->setProfileCurve( curve->clone() );
611 mSpinMinDistance->setValue( canvas->
plot().
xMinimum() );
612 mSpinMinDistance->setClearValue( canvas->
plot().
xMinimum() );
613 mProfile->plot()->setXMinimum( canvas->
plot().
xMinimum() );
615 mSpinMaxDistance->setValue( canvas->
plot().
xMaximum() );
616 mSpinMaxDistance->setClearValue( canvas->
plot().
xMaximum() );
617 mProfile->plot()->setXMaximum( canvas->
plot().
xMaximum() );
631 mSpinMinElevation->setValue( canvas->
plot().
xMinimum() );
632 mSpinMinElevation->setClearValue( canvas->
plot().
yMinimum() );
633 mProfile->plot()->setYMinimum( canvas->
plot().
yMinimum() );
635 mSpinMaxElevation->setValue( canvas->
plot().
yMaximum() );
636 mSpinMaxElevation->setClearValue( canvas->
plot().
yMaximum() );
637 mProfile->plot()->setYMaximum( canvas->
plot().
yMaximum() );
651 QList<QgsMapLayer *> canvasLayers = canvas->
layers();
653 std::reverse( canvasLayers.begin(), canvasLayers.end() );
654 mProfile->setLayers( canvasLayers );
655 const QList<QgsLayerTreeLayer *> layers = mLayerTree->findLayers();
658 layer->setItemVisibilityChecked( mProfile->layers().contains( layer->layer() ) );
660 mLayerTree->reorderGroupLayers( mProfile->layers() );
662 mProfile->invalidateCache();
677 mProfile = qobject_cast< QgsLayoutItemElevationProfile * >( item );
678 mItemPropertiesWidget->
setItem( mProfile );
683 mDistanceAxisMajorLinesSymbolButton->registerExpressionContextGenerator( mProfile );
684 mDistanceAxisMinorLinesSymbolButton->registerExpressionContextGenerator( mProfile );
685 mElevationAxisMajorLinesSymbolButton->registerExpressionContextGenerator( mProfile );
686 mElevationAxisMinorLinesSymbolButton->registerExpressionContextGenerator( mProfile );
687 mDistanceAxisLabelFontButton->registerExpressionContextGenerator( mProfile );
688 mElevationAxisLabelFontButton->registerExpressionContextGenerator( mProfile );
689 mChartBackgroundSymbolButton->registerExpressionContextGenerator( mProfile );
690 mChartBorderSymbolButton->registerExpressionContextGenerator( mProfile );
693 setGuiElementValues();
698void QgsLayoutElevationProfileWidget::setGuiElementValues()
702 mSpinTolerance->setValue( mProfile->tolerance() );
703 mCheckControlledByAtlas->setChecked( mProfile->atlasDriven() );
705 mSpinMinDistance->setValue( mProfile->plot()->xMinimum() );
706 mSpinMaxDistance->setValue( mProfile->plot()->xMaximum() );
707 mSpinMinElevation->setValue( mProfile->plot()->yMinimum() );
708 mSpinMaxElevation->setValue( mProfile->plot()->yMaximum() );
710 if ( mProfile->plot()->xAxis().gridMajorSymbol() )
711 mDistanceAxisMajorLinesSymbolButton->setSymbol( mProfile->plot()->xAxis().gridMajorSymbol()->clone() );
712 if ( mProfile->plot()->xAxis().gridMinorSymbol() )
713 mDistanceAxisMinorLinesSymbolButton->setSymbol( mProfile->plot()->xAxis().gridMinorSymbol()->clone() );
714 if ( mProfile->plot()->yAxis().gridMajorSymbol() )
715 mElevationAxisMajorLinesSymbolButton->setSymbol( mProfile->plot()->yAxis().gridMajorSymbol()->clone() );
716 if ( mProfile->plot()->yAxis().gridMajorSymbol() )
717 mElevationAxisMinorLinesSymbolButton->setSymbol( mProfile->plot()->yAxis().gridMinorSymbol()->clone() );
719 mDistanceAxisLabelFontButton->setTextFormat( mProfile->plot()->xAxis().textFormat() );
720 mElevationAxisLabelFontButton->setTextFormat( mProfile->plot()->yAxis().textFormat() );
722 mDistanceUnitCombo->setCurrentIndex( mDistanceUnitCombo->findData( QVariant::fromValue( mProfile->distanceUnit() ) ) );
723 mDistanceLabelsCombo->setCurrentIndex( mDistanceLabelsCombo->findData( QVariant::fromValue( mProfile->plot()->xAxis().labelSuffixPlacement() ) ) );
725 mDistanceAxisMajorIntervalSpin->setValue( mProfile->plot()->xAxis().gridIntervalMajor() );
726 mDistanceAxisMinorIntervalSpin->setValue( mProfile->plot()->xAxis().gridIntervalMinor() );
727 mDistanceAxisLabelIntervalSpin->setValue( mProfile->plot()->xAxis().labelInterval() );
729 mElevationAxisMajorIntervalSpin->setValue( mProfile->plot()->yAxis().gridIntervalMajor() );
730 mElevationAxisMinorIntervalSpin->setValue( mProfile->plot()->yAxis().gridIntervalMinor() );
731 mElevationAxisLabelIntervalSpin->setValue( mProfile->plot()->yAxis().labelInterval() );
733 if ( mProfile->plot()->chartBackgroundSymbol() )
734 mChartBackgroundSymbolButton->setSymbol( mProfile->plot()->chartBackgroundSymbol()->clone() );
735 if ( mProfile->plot()->chartBorderSymbol() )
736 mChartBorderSymbolButton->setSymbol( mProfile->plot()->chartBorderSymbol()->clone() );
738 mSpinLeftMargin->setValue( mProfile->plot()->margins().left() );
739 mSpinRightMargin->setValue( mProfile->plot()->margins().right() );
740 mSpinTopMargin->setValue( mProfile->plot()->margins().top() );
741 mSpinBottomMargin->setValue( mProfile->plot()->margins().bottom() );
743 const QList<QgsLayerTreeLayer *> layers = mLayerTree->findLayers();
746 layer->setItemVisibilityChecked( mProfile->layers().contains( layer->layer() ) );
748 mLayerTree->reorderGroupLayers( mProfile->layers() );
769void QgsLayoutElevationProfileWidget::updateItemLayers()
774 QList<QgsMapLayer *> layers;
775 const QList< QgsMapLayer * > layerOrder = mLayerTree->layerOrder();
776 layers.reserve( layerOrder.size() );
779 if ( mLayerTree->findLayer( layer )->isVisible() )
783 mProfile->setLayers( layers );
787void QgsLayoutElevationProfileWidget::layoutAtlasToggled(
bool atlasEnabled )
790 mProfile && mProfile->layout() && mProfile->layout()->reportContext().layer()
791 && mProfile->layout()->reportContext().layer()->geometryType() == Qgis::GeometryType::Line )
793 mCheckControlledByAtlas->setEnabled(
true );
797 mCheckControlledByAtlas->setEnabled(
false );
798 mCheckControlledByAtlas->setChecked(
false );
802void QgsLayoutElevationProfileWidget::atlasLayerChanged(
QgsVectorLayer *layer )
804 if ( !layer || layer->
geometryType() != Qgis::GeometryType::Line )
807 mCheckControlledByAtlas->setChecked(
false );
808 mCheckControlledByAtlas->setEnabled(
false );
813 mCheckControlledByAtlas->setEnabled(
true );
PlotAxisSuffixPlacement
Placement options for suffixes in the labels for axis of plots.
@ FirstAndLastLabels
Place suffix after the first and last label values only.
@ EveryLabel
Place suffix after every value label.
@ FirstLabel
Place suffix after the first label value only.
@ LastLabel
Place suffix after the last label value only.
@ NoLabels
Do not place suffixes.
DistanceUnit
Units of distance.
@ Inches
Inches (since QGIS 3.32)
@ TitleCase
Simple title case conversion - does not fully grammatically parse the text and uses simple rules only...
double yMaximum() const
Returns the maximum value of the y axis.
QgsPlotAxis & xAxis()
Returns a reference to the plot's x axis.
double xMaximum() const
Returns the maximum value of the x axis.
double xMinimum() const
Returns the minimum value of the x axis.
QgsPlotAxis & yAxis()
Returns a reference to the plot's y axis.
double yMinimum() const
Returns the minimum value of the y axis.
static QIcon getThemeIcon(const QString &name, const QColor &fillColor=QColor(), const QColor &strokeColor=QColor())
Helper to get a theme icon.
Abstract base class for curved geometry type.
A canvas for elevation profiles.
QgsCurve * profileCurve() const
Returns the profile curve.
QgsCoordinateReferenceSystem crs() const override
Returns the coordinate reference system (CRS) for map coordinates used by the canvas.
QList< QgsMapLayer * > layers() const
Returns the list of layers included in the profile.
const Qgs2DPlot & plot() const
Returns a reference to the 2D plot used by the widget.
Qgis::DistanceUnit distanceUnit() const
Returns the distance unit used by the canvas.
double tolerance() const
Returns the tolerance of the profile (in crs() units).
A layer tree view for elevation profiles.
void populateInitialLayers(QgsProject *project)
Initially populates the tree view using layers from a project.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
@ HigDialogTitleIsTitleCase
Dialog titles should be title case.
static QgsGui::HigFlags higFlags()
Returns the platform's HIG flags.
Layer tree node points to a map layer.
void visibilityChanged(QgsLayerTreeNode *node)
Emitted when check state of a node within the tree has been changed.
Listens to the updates in map layer registry and does changes in layer tree.
Namespace with helper functions for layer tree operations.
void layerOrderChanged()
Emitted when the layer order has changed.
Class used to render QgsLayout as an atlas, by iterating over the features from an associated vector ...
void toggled(bool)
Emitted when atlas is enabled or disabled.
A common interface for layout designer dialogs and widgets.
A layout item subclass for elevation profile plots.
@ LayoutElevationProfile
Elevation profile item (since QGIS 3.30)
Base class for graphical items within a QgsLayout.
@ UndoElevationProfileElevationMajorGridlines
Change elevation profile elevation axis major gridlines.
@ UndoElevationProfileMaximumDistance
Change elevation profile maximum distance.
@ UndoElevationProfileChartBackground
Change elevation profile chart background.
@ UndoElevationProfileDistanceMinorGridlines
Change elevation profile distance axis minor gridlines.
@ UndoMarginTop
Top margin (since QGIS 3.30)
@ UndoElevationProfileChartBorder
Change elevation profile chart border.
@ UndoElevationProfileMaximumElevation
Change elevation profile maximum elevation.
@ UndoMarginLeft
Left margin (since QGIS 3.30)
@ UndoMarginRight
Right margin (since QGIS 3.30)
@ UndoElevationProfileTolerance
Change elevation profile distance tolerance.
@ UndoElevationProfileElevationFormat
Change elevation profile elevation axis number format.
@ UndoElevationProfileMinimumElevation
Change elevation profile minimum elevation.
@ UndoElevationProfileDistanceLabels
Change elevation profile distance axis label interval.
@ UndoMarginBottom
Bottom margin (since QGIS 3.30)
@ UndoElevationProfileElevationFont
Change elevation profile elevation axis number font.
@ UndoElevationProfileDistanceFormat
Change elevation profile distance axis number format.
@ UndoElevationProfileElevationMinorGridlines
Change elevation profile elevation axis minor gridlines.
@ UndoElevationProfileDistanceFont
Change elevation profile distance axis number font.
@ UndoElevationProfileElevationLabels
Change elevation profile elevation axis label interval.
@ UndoElevationProfileDistanceMajorGridlines
Change elevation profile distance axis major gridlines.
@ UndoElevationProfileMinimumDistance
Change elevation profile minimum distance.
int type() const override
Returns a unique graphics item type identifier.
void changed()
Emitted when the object's properties change.
@ ElevationProfileTolerance
Tolerance distance for elevation profiles (since QGIS 3.30)
@ ElevationProfileElevationLabelInterval
Label interval for elevation profile elevation axis (since QGIS 3.30)
@ ElevationProfileDistanceMajorInterval
Major grid line interval for elevation profile distance axis (since QGIS 3.30)
@ MarginTop
Top margin (since QGIS 3.30)
@ ElevationProfileDistanceLabelInterval
Label interval for elevation profile distance axis (since QGIS 3.30)
@ ElevationProfileElevationMinorInterval
Minor grid line interval for elevation profile elevation axis (since QGIS 3.30)
@ MarginLeft
Left margin (since QGIS 3.30)
@ ElevationProfileMaximumDistance
Maximum distance value for elevation profile (since QGIS 3.30)
@ MarginRight
Right margin (since QGIS 3.30)
@ ElevationProfileMinimumElevation
Minimum elevation value for elevation profile (since QGIS 3.30)
@ ElevationProfileElevationMajorInterval
Major grid line interval for elevation profile elevation axis (since QGIS 3.30)
@ ElevationProfileMinimumDistance
Minimum distance value for elevation profile (since QGIS 3.30)
@ MarginBottom
Bottom margin (since QGIS 3.30)
@ ElevationProfileDistanceMinorInterval
Minor grid line interval for elevation profile distance axis (since QGIS 3.30)
@ ElevationProfileMaximumElevation
Maximum elevation value for elevation profile (since QGIS 3.30)
void layerChanged(QgsVectorLayer *layer)
Emitted when the context's layer is changed.
A line symbol type, for rendering LineString and MultiLineString geometries.
Base class for all map layer types.
The QgsMargins class defines the four margins of a rectangle.
void setBottom(double bottom)
Sets the bottom margin to bottom.
void setLeft(double left)
Sets the left margin to left.
void setRight(double right)
Sets the right margin to right.
void setTop(double top)
Sets the top margin to top.
Interface for master layout type objects, such as print layouts and reports.
double gridIntervalMinor() const
Returns the interval of minor grid lines for the axis.
double gridIntervalMajor() const
Returns the interval of major grid lines for the axis.
double labelInterval() const
Returns the interval of labels for the axis.
Qgis::PlotAxisSuffixPlacement labelSuffixPlacement() const
Returns the placement for the axis label suffixes.
static QgsFillSymbol * chartBorderSymbol()
Returns the default fill symbol to use for the chart area border.
static QgsLineSymbol * axisGridMinorSymbol()
Returns the default line symbol to use for axis minor grid lines.
static QgsFillSymbol * chartBackgroundSymbol()
Returns the default fill symbol to use for the chart area background fill.
static QgsLineSymbol * axisGridMajorSymbol()
Returns the default line symbol to use for axis major grid lines.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
static QgsProject * instance()
Returns the QgsProject singleton instance.
static QString capitalize(const QString &string, Qgis::Capitalization capitalization)
Converts a string by applying capitalization rules to the string.
static Q_INVOKABLE QString toString(Qgis::DistanceUnit unit)
Returns a translated string representing a distance unit.
Represents a vector layer which manages a vector based data sets.
Q_INVOKABLE Qgis::GeometryType geometryType() const
Returns point, line or polygon.