libosmscout 0.1
Loading...
Searching...
No Matches
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
ElevationModule * elevationModule =nullptr
std::optional< ElevationPoint > highest
Locale locale =Locale::ByEnvironmentSafe()
std::optional< ElevationPoint > lowest
ElevationModule::ElevationPoints points
int requestId =0
std::shared_ptr< OverlayWay > way

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

◆ getAscent()

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

References ascent.

◆ getDescent()

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

References descent.

◆ getGradientBottomColor()

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

References gradientBottomColor.

◆ getGradientTopColor()

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

References gradientTopColor.

◆ getHighestElevation()

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

References highest.

◆ getLineColor()

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

References lineColor.

◆ getLineWidth()

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

References lineWidth.

◆ getLowestElevation()

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

References lowest.

◆ getPointCount()

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

References points.

◆ getTextColor()

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

References textColor.

◆ getTextPadding()

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

References textPadding.

◆ getTextPixelSize()

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

References textPixelSize.

◆ getWay()

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

References way.

Referenced by pointsUpdated().

◆ gradientBottomColorChanged

void osmscout::ElevationChartWidget::gradientBottomColorChanged ( )
signal

◆ gradientTopColorChanged

void osmscout::ElevationChartWidget::gradientTopColorChanged ( )
signal

◆ isLoading()

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

References isLoading(), and loading.

Referenced by isLoading().

◆ lineColorChanged

void osmscout::ElevationChartWidget::lineColorChanged ( )
signal

References lineColorChanged().

Referenced by lineColorChanged(), and setLineColor().

◆ lineWidthChanged

void osmscout::ElevationChartWidget::lineWidthChanged ( )
signal

References lineWidthChanged().

Referenced by lineWidthChanged(), and setLineWidth().

◆ loadingChanged

void osmscout::ElevationChartWidget::loadingChanged ( )
signal

◆ onElevationProfileAppend

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

◆ onError

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

◆ onLoadingFinished

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

◆ paint()

◆ pointsUpdated

void osmscout::ElevationChartWidget::pointsUpdated ( )
signal

◆ 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

References textColorChanged().

Referenced by setTextColor(), and textColorChanged().

◆ textPaddingChanged

void osmscout::ElevationChartWidget::textPaddingChanged ( )
signal

◆ textPixelSizeChanged

void osmscout::ElevationChartWidget::textPixelSizeChanged ( )
signal

◆ wayChanged

void osmscout::ElevationChartWidget::wayChanged ( )
signal

References wayChanged().

Referenced by setWay(), and wayChanged().

Member Data Documentation

◆ ascent

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

◆ breaker

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

◆ 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

◆ descent

double osmscout::ElevationChartWidget::descent
read

◆ gradientBottomColor

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

◆ gradientTopColor

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

◆ highestElevation

double osmscout::ElevationChartWidget::highestElevation
read

◆ lineColor

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

Referenced by getLineColor(), paint(), and setLineColor().

◆ lineWidth

qreal osmscout::ElevationChartWidget::lineWidth =5
readwrite

Referenced by getLineWidth(), paint(), and setLineWidth().

◆ loading

bool osmscout::ElevationChartWidget::loading =false
read

◆ lowestElevation

double osmscout::ElevationChartWidget::lowestElevation
read

◆ pointCount

qint64 osmscout::ElevationChartWidget::pointCount
read

◆ textColor

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

Referenced by getTextColor(), paint(), and setTextColor().

◆ textPadding

int osmscout::ElevationChartWidget::textPadding =4
readwrite

◆ textPixelSize

int osmscout::ElevationChartWidget::textPixelSize =14
readwrite

◆ way

QObject * osmscout::ElevationChartWidget::way
readwrite

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