QGIS API Documentation  2.99.0-Master (a18066b)
Public Types | Public Member Functions | List of all members
QgsTicksScaleBarStyle Class Reference

A scale bar that draws segments using short ticks. More...

#include <qgsticksscalebarstyle.h>

Inheritance diagram for QgsTicksScaleBarStyle:
Inheritance graph

Public Types

enum  TickPosition { TicksUp, TicksDown, TicksMiddle }

Public Member Functions

 QgsTicksScaleBarStyle (const QgsComposerScaleBar *bar)
void draw (QPainter *p, double xOffset=0) const override
 Draw method. More...
QString name () const override
 Get a name for this style. More...
void setTickPosition (TickPosition p)
- Public Member Functions inherited from QgsScaleBarStyle
 QgsScaleBarStyle (const QgsComposerScaleBar *bar)
virtual ~QgsScaleBarStyle ()=default
virtual QRectF calculateBoxSize () const
virtual void drawLabels (QPainter *p) const

Additional Inherited Members

- Protected Attributes inherited from QgsScaleBarStyle
const QgsComposerScaleBarmScaleBar = nullptr

Detailed Description

A scale bar that draws segments using short ticks.

Definition at line 26 of file qgsticksscalebarstyle.h.

Member Enumeration Documentation

◆ TickPosition


Definition at line 29 of file qgsticksscalebarstyle.h.

Constructor & Destructor Documentation

◆ QgsTicksScaleBarStyle()

QgsTicksScaleBarStyle::QgsTicksScaleBarStyle ( const QgsComposerScaleBar bar)

Definition at line 22 of file qgsticksscalebarstyle.cpp.

Member Function Documentation

◆ draw()

void QgsTicksScaleBarStyle::draw ( QPainter *  p,
double  xOffset = 0 
) const

Draw method.

ppainter object

Implements QgsScaleBarStyle.

Definition at line 46 of file qgsticksscalebarstyle.cpp.

◆ name()

QString QgsTicksScaleBarStyle::name ( ) const

Get a name for this style.

Needs to be remiplmeented by subclasses.

Implements QgsScaleBarStyle.

Definition at line 32 of file qgsticksscalebarstyle.cpp.

◆ setTickPosition()

void QgsTicksScaleBarStyle::setTickPosition ( TickPosition  p)

Definition at line 46 of file qgsticksscalebarstyle.h.

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