Mapper  0.9.0
API documentation
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
OpenOrienteering::AzimuthInfoHelper Class Reference

A utility for displaying azimuth and distance while drawing. More...

#include <tool_helpers.h>

Collaboration diagram for OpenOrienteering::AzimuthInfoHelper:
Collaboration graph
[legend]

Public Member Functions

 AzimuthInfoHelper (const QWidget *widget, QColor color)
 
bool isActive () const
 
void setActive (bool active)
 
QRectF dirtyRect (MapWidget *widget, const MapCoordF &pos_map) const
 Returns this helper's drawing region. More...
 
void draw (QPainter *painter, const MapWidget *widget, const Map *map, const MapCoordF &start_pos, const MapCoordF &end_pos)
 Draws the azimuth and distance info text. More...
 

Protected Attributes

QColor text_color
 
QFont text_font
 
QString azimuth_template
 
QString distance_template
 
QRectF display_rect
 
int line_0_offset
 
int line_1_offset
 
bool active = false
 

Static Protected Attributes

static constexpr int text_offset = 25
 

Detailed Description

A utility for displaying azimuth and distance while drawing.

Constructor & Destructor Documentation

◆ AzimuthInfoHelper()

OpenOrienteering::AzimuthInfoHelper::AzimuthInfoHelper ( const QWidget widget,
QColor  color 
)

Member Function Documentation

◆ dirtyRect()

QRectF OpenOrienteering::AzimuthInfoHelper::dirtyRect ( MapWidget widget,
const MapCoordF pos_map 
) const

Returns this helper's drawing region.

◆ draw()

void OpenOrienteering::AzimuthInfoHelper::draw ( QPainter painter,
const MapWidget widget,
const Map map,
const MapCoordF start_pos,
const MapCoordF end_pos 
)

Draws the azimuth and distance info text.

◆ isActive()

bool OpenOrienteering::AzimuthInfoHelper::isActive ( ) const
inline

◆ setActive()

void OpenOrienteering::AzimuthInfoHelper::setActive ( bool  active)

Member Data Documentation

◆ active

bool OpenOrienteering::AzimuthInfoHelper::active = false
protected

◆ azimuth_template

QString OpenOrienteering::AzimuthInfoHelper::azimuth_template
protected

◆ display_rect

QRectF OpenOrienteering::AzimuthInfoHelper::display_rect
protected

◆ distance_template

QString OpenOrienteering::AzimuthInfoHelper::distance_template
protected

◆ line_0_offset

int OpenOrienteering::AzimuthInfoHelper::line_0_offset
protected

◆ line_1_offset

int OpenOrienteering::AzimuthInfoHelper::line_1_offset
protected

◆ text_color

QColor OpenOrienteering::AzimuthInfoHelper::text_color
protected

◆ text_font

QFont OpenOrienteering::AzimuthInfoHelper::text_font
protected

◆ text_offset

constexpr int OpenOrienteering::AzimuthInfoHelper::text_offset = 25
staticprotected

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