QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
QgsScaleBarRenderer::ScaleBarContext Struct Reference

Contains parameters regarding scalebar calculations. More...

#include <qgsscalebarrenderer.h>

Public Member Functions

bool isValid () const
 Returns true if the context has valid settings.
 

Public Attributes

Flags flags
 Scalebar renderer flags.
 
double scale { 1.0 }
 Scale denominator.
 
double segmentWidth { 0.0 }
 The width, in millimeters, of each individual segment drawn.
 
QSizeF size
 Destination size for scalebar.
 

Detailed Description

Contains parameters regarding scalebar calculations.

Note
The need to attribute the parameters vary depending on the targeted scalebar.

Definition at line 69 of file qgsscalebarrenderer.h.

Member Function Documentation

◆ isValid()

bool QgsScaleBarRenderer::ScaleBarContext::isValid ( ) const

Returns true if the context has valid settings.

Since
QGIS 3.40

Definition at line 422 of file qgsscalebarrenderer.cpp.

Member Data Documentation

◆ flags

Flags QgsScaleBarRenderer::ScaleBarContext::flags

Scalebar renderer flags.

Definition at line 89 of file qgsscalebarrenderer.h.

◆ scale

double QgsScaleBarRenderer::ScaleBarContext::scale { 1.0 }

Scale denominator.

Definition at line 86 of file qgsscalebarrenderer.h.

◆ segmentWidth

double QgsScaleBarRenderer::ScaleBarContext::segmentWidth { 0.0 }

The width, in millimeters, of each individual segment drawn.

Note
The number of map units per segment needs to be set via QgsScaleBarSettings::setUnitsPerSegment.

Definition at line 76 of file qgsscalebarrenderer.h.

◆ size

QSizeF QgsScaleBarRenderer::ScaleBarContext::size

Destination size for scalebar.

This is used for scalebars which alter their appearance or alignment based on the desired scalebar size (e.g. correctly aligning text in a numeric scale bar).

Definition at line 83 of file qgsscalebarrenderer.h.


The documentation for this struct was generated from the following files: