QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Member Functions | List of all members
QgsNumericScaleBarStyle Class Reference

A scale bar style that draws text in the form of '1:XXXXX'. More...

#include <qgsnumericscalebarstyle.h>

Inheritance diagram for QgsNumericScaleBarStyle:
Inheritance graph
[legend]

Public Member Functions

 QgsNumericScaleBarStyle (QgsComposerScaleBar *bar)
 
 ~QgsNumericScaleBarStyle ()
 
QRectF calculateBoxSize () const override
 
void draw (QPainter *p, double xOffset=0) const override
 Draws the style. More...
 
QString name () const override
 
- Public Member Functions inherited from QgsScaleBarStyle
 QgsScaleBarStyle (const QgsComposerScaleBar *bar)
 
virtual ~QgsScaleBarStyle ()
 
virtual void drawLabels (QPainter *p) const
 

Additional Inherited Members

- Protected Attributes inherited from QgsScaleBarStyle
const QgsComposerScaleBarmScaleBar
 

Detailed Description

A scale bar style that draws text in the form of '1:XXXXX'.

Definition at line 25 of file qgsnumericscalebarstyle.h.

Constructor & Destructor Documentation

◆ QgsNumericScaleBarStyle()

QgsNumericScaleBarStyle::QgsNumericScaleBarStyle ( QgsComposerScaleBar bar)

Definition at line 24 of file qgsnumericscalebarstyle.cpp.

◆ ~QgsNumericScaleBarStyle()

QgsNumericScaleBarStyle::~QgsNumericScaleBarStyle ( )

Definition at line 34 of file qgsnumericscalebarstyle.cpp.

Member Function Documentation

◆ calculateBoxSize()

QRectF QgsNumericScaleBarStyle::calculateBoxSize ( ) const
overridevirtual

Reimplemented from QgsScaleBarStyle.

Definition at line 88 of file qgsnumericscalebarstyle.cpp.

◆ draw()

void QgsNumericScaleBarStyle::draw ( QPainter p,
double  xOffset = 0 
) const
overridevirtual

Draws the style.

Parameters
ppainter object
xOffsetoffset to account for centered labeling

Implements QgsScaleBarStyle.

Definition at line 44 of file qgsnumericscalebarstyle.cpp.

◆ name()

QString QgsNumericScaleBarStyle::name ( ) const
overridevirtual

Implements QgsScaleBarStyle.

Definition at line 39 of file qgsnumericscalebarstyle.cpp.


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