QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
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
[legend]

Public Types

enum  TickPosition { TicksUp, TicksDown, TicksMiddle }
 

Public Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from QgsScaleBarStyle
const QgsComposerScaleBarmScaleBar
 

Detailed Description

A scale bar that draws segments using short ticks.

Definition at line 25 of file qgsticksscalebarstyle.h.

Member Enumeration Documentation

◆ TickPosition

Enumerator
TicksUp 
TicksDown 
TicksMiddle 

Definition at line 28 of file qgsticksscalebarstyle.h.

Constructor & Destructor Documentation

◆ QgsTicksScaleBarStyle()

QgsTicksScaleBarStyle::QgsTicksScaleBarStyle ( const QgsComposerScaleBar bar)

Definition at line 22 of file qgsticksscalebarstyle.cpp.

◆ ~QgsTicksScaleBarStyle()

QgsTicksScaleBarStyle::~QgsTicksScaleBarStyle ( )

Definition at line 32 of file qgsticksscalebarstyle.cpp.

Member Function Documentation

◆ draw()

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

Draw method.

Parameters
ppainter object
xOffsetoffset

Implements QgsScaleBarStyle.

Definition at line 51 of file qgsticksscalebarstyle.cpp.

◆ name()

QString QgsTicksScaleBarStyle::name ( ) const
overridevirtual

Implements QgsScaleBarStyle.

Definition at line 37 of file qgsticksscalebarstyle.cpp.

◆ setTickPosition()

void QgsTicksScaleBarStyle::setTickPosition ( TickPosition  p)
inline

Definition at line 46 of file qgsticksscalebarstyle.h.


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