QGIS API Documentation  master-59fd5e0
QgsNumericScaleBarStyle Class Reference

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

#include <qgsnumericscalebarstyle.h>

+ Inheritance diagram for QgsNumericScaleBarStyle:
+ Collaboration diagram for QgsNumericScaleBarStyle:

List of all members.

Public Member Functions

 QgsNumericScaleBarStyle (QgsComposerScaleBar *bar)
 ~QgsNumericScaleBarStyle ()
QRectF calculateBoxSize () const
void draw (QPainter *p, double xOffset=0) const
 Draws the style.
QString name () const

Private Member Functions

 QgsNumericScaleBarStyle ()
QString scaleText () const
 Returns the text for the scale bar or an empty string in case of error.

Private Attributes

double mLastScaleBarWidth
 Store last width (in mm) to keep alignment to left/middle/right side.

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


Member Function Documentation

QString QgsNumericScaleBarStyle::name ( ) const [virtual]

Implements QgsScaleBarStyle.

Definition at line 38 of file qgsnumericscalebarstyle.cpp.

QString QgsNumericScaleBarStyle::scaleText ( ) const [private]

Returns the text for the scale bar or an empty string in case of error.

Definition at line 110 of file qgsnumericscalebarstyle.cpp.

References QgsComposerScaleBar::composerMap(), QgsScaleBarStyle::mScaleBar, and QgsComposerMap::scale().

Referenced by calculateBoxSize(), and draw().


Member Data Documentation

Store last width (in mm) to keep alignment to left/middle/right side.

Definition at line 44 of file qgsnumericscalebarstyle.h.

Referenced by calculateBoxSize().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines