libosmscout  0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules
osmscout::ElevationChartWidget Class Reference

#include <ElevationChartWidget.h>

+ Inheritance diagram for osmscout::ElevationChartWidget:

Public Slots

void onElevationProfileAppend (ElevationModule::ElevationPoints points, int requestId)
 
void onError (int requestId)
 
void onLoadingFinished (int requestId)
 

Signals

void elevationProfileRequest (std::shared_ptr< OverlayWay > way, int requestId, osmscout::BreakerRef breaker)
 
void gradientBottomColorChanged ()
 
void gradientTopColorChanged ()
 
void lineColorChanged ()
 
void lineWidthChanged ()
 
void loadingChanged ()
 
void pointsUpdated ()
 
void textColorChanged ()
 
void textPaddingChanged ()
 
void textPixelSizeChanged ()
 
void wayChanged ()
 

Public Member Functions

 ElevationChartWidget (QQuickItem *parent=nullptr)
 
double getAscent () const
 
double getDescent () const
 
QColor getGradientBottomColor () const
 
QColor getGradientTopColor () const
 
double getHighestElevation () const
 
QColor getLineColor () const
 
qreal getLineWidth () const
 
double getLowestElevation () const
 
qint64 getPointCount () const
 
QColor getTextColor () const
 
int getTextPadding () const
 
int getTextPixelSize () const
 
QObject * getWay () const
 
bool isLoading () const
 
void paint (QPainter *painter) override
 
void setGradientBottomColor (const QColor &c)
 
void setGradientTopColor (const QColor &c)
 
void setLineColor (const QColor &color)
 
void setLineWidth (qreal w)
 
void setTextColor (const QColor &c)
 
void setTextPadding (int size)
 
void setTextPixelSize (int size)
 
void setWay (QObject *o)
 
 ~ElevationChartWidget () override
 

Protected Member Functions

void reset ()
 

Protected Attributes

osmscout::Distance ascent
 
osmscout::BreakerRef breaker
 
osmscout::Distance descent
 
ElevationModuleelevationModule =nullptr
 
std::optional< ElevationPointhighest
 
Locale locale =Locale::ByEnvironmentSafe()
 
std::optional< ElevationPointlowest
 
ElevationModule::ElevationPoints points
 
int requestId =0
 
std::shared_ptr< OverlayWayway
 

Properties

double ascent
 
double descent
 
QColor gradientBottomColor =Qt::transparent
 
QColor gradientTopColor =QColor(lineColor.red(), lineColor.green(), lineColor.blue(), 0xA0)
 
double highestElevation
 
QColor lineColor =Qt::darkBlue
 
qreal lineWidth =5
 
bool loading =false
 
double lowestElevation
 
qint64 pointCount
 
QColor textColor =Qt::darkBlue
 
int textPadding =4
 
int textPixelSize =14
 
QObject way
 

Constructor & Destructor Documentation

◆ ElevationChartWidget()

◆ ~ElevationChartWidget()

osmscout::ElevationChartWidget::~ElevationChartWidget ( )
override

References breaker, and elevationModule.

Member Function Documentation

◆ elevationProfileRequest

void osmscout::ElevationChartWidget::elevationProfileRequest ( std::shared_ptr< OverlayWay way,
int  requestId,
osmscout::BreakerRef  breaker 
)
signal

Referenced by ElevationChartWidget(), and setWay().

◆ getAscent()

double osmscout::ElevationChartWidget::getAscent ( ) const
inline

◆ getDescent()

double osmscout::ElevationChartWidget::getDescent ( ) const
inline

◆ getGradientBottomColor()

QColor osmscout::ElevationChartWidget::getGradientBottomColor ( ) const
inline

◆ getGradientTopColor()

QColor osmscout::ElevationChartWidget::getGradientTopColor ( ) const
inline

◆ getHighestElevation()

double osmscout::ElevationChartWidget::getHighestElevation ( ) const
inline

◆ getLineColor()

QColor osmscout::ElevationChartWidget::getLineColor ( ) const
inline

◆ getLineWidth()

qreal osmscout::ElevationChartWidget::getLineWidth ( ) const
inline

◆ getLowestElevation()

double osmscout::ElevationChartWidget::getLowestElevation ( ) const
inline

◆ getPointCount()

qint64 osmscout::ElevationChartWidget::getPointCount ( ) const
inline

◆ getTextColor()

QColor osmscout::ElevationChartWidget::getTextColor ( ) const
inline

◆ getTextPadding()

int osmscout::ElevationChartWidget::getTextPadding ( ) const
inline

◆ getTextPixelSize()

int osmscout::ElevationChartWidget::getTextPixelSize ( ) const
inline

◆ getWay()

QObject * osmscout::ElevationChartWidget::getWay ( ) const

References way.

◆ gradientBottomColorChanged

void osmscout::ElevationChartWidget::gradientBottomColorChanged ( )
signal

Referenced by setGradientBottomColor().

◆ gradientTopColorChanged

void osmscout::ElevationChartWidget::gradientTopColorChanged ( )
signal

Referenced by setGradientTopColor().

◆ isLoading()

bool osmscout::ElevationChartWidget::isLoading ( ) const
inline

◆ lineColorChanged

void osmscout::ElevationChartWidget::lineColorChanged ( )
signal

Referenced by setLineColor().

◆ lineWidthChanged

void osmscout::ElevationChartWidget::lineWidthChanged ( )
signal

Referenced by setLineWidth().

◆ loadingChanged

void osmscout::ElevationChartWidget::loadingChanged ( )
signal

Referenced by onError(), onLoadingFinished(), and setWay().

◆ onElevationProfileAppend

void osmscout::ElevationChartWidget::onElevationProfileAppend ( ElevationModule::ElevationPoints  points,
int  requestId 
)
slot

◆ onError

void osmscout::ElevationChartWidget::onError ( int  requestId)
slot

References loading, loadingChanged(), and requestId.

Referenced by ElevationChartWidget().

◆ onLoadingFinished

void osmscout::ElevationChartWidget::onLoadingFinished ( int  requestId)
slot

References loading, loadingChanged(), and requestId.

Referenced by ElevationChartWidget().

◆ paint()

◆ pointsUpdated

void osmscout::ElevationChartWidget::pointsUpdated ( )
signal

Referenced by onElevationProfileAppend(), and reset().

◆ reset()

void osmscout::ElevationChartWidget::reset ( )
protected

◆ setGradientBottomColor()

void osmscout::ElevationChartWidget::setGradientBottomColor ( const QColor &  c)

◆ setGradientTopColor()

void osmscout::ElevationChartWidget::setGradientTopColor ( const QColor &  c)

◆ setLineColor()

void osmscout::ElevationChartWidget::setLineColor ( const QColor &  color)

References lineColor, and lineColorChanged().

◆ setLineWidth()

void osmscout::ElevationChartWidget::setLineWidth ( qreal  w)

References lineWidth, and lineWidthChanged().

◆ setTextColor()

void osmscout::ElevationChartWidget::setTextColor ( const QColor &  c)

References textColor, and textColorChanged().

◆ setTextPadding()

void osmscout::ElevationChartWidget::setTextPadding ( int  size)

◆ setTextPixelSize()

void osmscout::ElevationChartWidget::setTextPixelSize ( int  size)

◆ setWay()

void osmscout::ElevationChartWidget::setWay ( QObject *  o)

◆ textColorChanged

void osmscout::ElevationChartWidget::textColorChanged ( )
signal

Referenced by setTextColor().

◆ textPaddingChanged

void osmscout::ElevationChartWidget::textPaddingChanged ( )
signal

Referenced by setTextPadding().

◆ textPixelSizeChanged

void osmscout::ElevationChartWidget::textPixelSizeChanged ( )
signal

Referenced by setTextPixelSize().

◆ wayChanged

void osmscout::ElevationChartWidget::wayChanged ( )
signal

Referenced by setWay().

Member Data Documentation

◆ ascent

osmscout::Distance osmscout::ElevationChartWidget::ascent
protected

◆ breaker

osmscout::BreakerRef osmscout::ElevationChartWidget::breaker
protected

Referenced by setWay(), and ~ElevationChartWidget().

◆ descent

osmscout::Distance osmscout::ElevationChartWidget::descent
protected

◆ elevationModule

ElevationModule* osmscout::ElevationChartWidget::elevationModule =nullptr
protected

◆ highest

std::optional<ElevationPoint> osmscout::ElevationChartWidget::highest
protected

◆ locale

Locale osmscout::ElevationChartWidget::locale =Locale::ByEnvironmentSafe()
protected

Referenced by ElevationChartWidget(), and paint().

◆ lowest

std::optional<ElevationPoint> osmscout::ElevationChartWidget::lowest
protected

◆ points

ElevationModule::ElevationPoints osmscout::ElevationChartWidget::points
protected

◆ requestId

int osmscout::ElevationChartWidget::requestId =0
protected

◆ way

std::shared_ptr<OverlayWay> osmscout::ElevationChartWidget::way
protected

Property Documentation

◆ ascent

double osmscout::ElevationChartWidget::ascent
read

Referenced by onElevationProfileAppend(), and reset().

◆ descent

double osmscout::ElevationChartWidget::descent
read

Referenced by onElevationProfileAppend(), and reset().

◆ gradientBottomColor

QColor osmscout::ElevationChartWidget::gradientBottomColor =Qt::transparent
readwrite

Referenced by paint(), and setGradientBottomColor().

◆ gradientTopColor

QColor osmscout::ElevationChartWidget::gradientTopColor =QColor(lineColor.red(), lineColor.green(), lineColor.blue(), 0xA0)
readwrite

Referenced by paint(), and setGradientTopColor().

◆ highestElevation

double osmscout::ElevationChartWidget::highestElevation
read

◆ lineColor

QColor osmscout::ElevationChartWidget::lineColor =Qt::darkBlue
readwrite

Referenced by paint(), and setLineColor().

◆ lineWidth

qreal osmscout::ElevationChartWidget::lineWidth =5
readwrite

Referenced by paint(), and setLineWidth().

◆ loading

bool osmscout::ElevationChartWidget::loading =false
read

Referenced by onError(), onLoadingFinished(), and setWay().

◆ lowestElevation

double osmscout::ElevationChartWidget::lowestElevation
read

◆ pointCount

qint64 osmscout::ElevationChartWidget::pointCount
read

◆ textColor

QColor osmscout::ElevationChartWidget::textColor =Qt::darkBlue
readwrite

Referenced by paint(), and setTextColor().

◆ textPadding

int osmscout::ElevationChartWidget::textPadding =4
readwrite

Referenced by paint(), and setTextPadding().

◆ textPixelSize

int osmscout::ElevationChartWidget::textPixelSize =14
readwrite

Referenced by paint(), and setTextPixelSize().

◆ way

QObject osmscout::ElevationChartWidget::way
readwrite

Referenced by getWay(), reset(), and setWay().


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