• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • src
  • plugins
  • render
  • elevationprofilefloatitem
ElevationProfilePlotAxis.h
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2011-2012 Florian Eßer <f.esser@rwth-aachen.de>
9 //
10 
11 #ifndef ELEVATIONPROFILEPLOTAXIS_H
12 #define ELEVATIONPROFILEPLOTAXIS_H
13 
14 #include <QObject>
15 #include <QList>
16 #include <QString>
17 
18 namespace Marble
19 {
20 
21 struct AxisTick {
22  int position;
23  qreal value;
24  AxisTick( const int &position_, const qreal &value_ ) :
25  position( position_ ),
26  value( value_ )
27  {
28  // nothing to do
29  }
30 };
31 typedef QList<AxisTick> AxisTickList;
32 
37 class ElevationProfilePlotAxis : public QObject
38 {
39  Q_OBJECT
40  private:
41  qreal m_minValue;
42  qreal m_maxValue;
43  qreal m_displayScale;
44  int m_pixelLength;
45  int m_minTickCount;
46  int m_maxTickCount;
47  QString m_unitString;
48  AxisTickList m_ticks;
49 
50  void updateTicks();
51  void updateScale();
52 
53  public:
54  explicit ElevationProfilePlotAxis( );
55  void setRange( const qreal &minValue, const qreal &maxValue );
56  void setLength( const int &length );
57  void setTickCount( const int min, const int max );
58  void update();
59  qreal minValue() const;
60  qreal maxValue() const;
61  qreal range() const;
62  qreal scale() const;
63  QString unit() const;
64  AxisTickList ticks() const;
65 };
66 
67 }
68 #endif // ELEVATIONPROFILEPLOTAXIS_H
Marble::AxisTick::position
int position
Definition: ElevationProfilePlotAxis.h:22
Marble::ElevationProfilePlotAxis::setTickCount
void setTickCount(const int min, const int max)
Definition: ElevationProfilePlotAxis.cpp:46
Marble::ElevationProfilePlotAxis::minValue
qreal minValue() const
Definition: ElevationProfilePlotAxis.cpp:58
Marble::ElevationProfilePlotAxis::unit
QString unit() const
Definition: ElevationProfilePlotAxis.cpp:78
Marble::ElevationProfilePlotAxis::setRange
void setRange(const qreal &minValue, const qreal &maxValue)
Definition: ElevationProfilePlotAxis.cpp:33
Marble::ElevationProfilePlotAxis
A helper class handling a plot axis for the Elevation Profile.
Definition: ElevationProfilePlotAxis.h:37
Marble::ElevationProfilePlotAxis::maxValue
qreal maxValue() const
Definition: ElevationProfilePlotAxis.cpp:63
QObject
Marble::ElevationProfilePlotAxis::range
qreal range() const
Definition: ElevationProfilePlotAxis.cpp:68
Marble::AxisTick::value
qreal value
Definition: ElevationProfilePlotAxis.h:23
Marble::AxisTickList
QList< AxisTick > AxisTickList
Definition: ElevationProfilePlotAxis.h:31
Marble::AxisTick
Definition: ElevationProfilePlotAxis.h:21
Marble::ElevationProfilePlotAxis::scale
qreal scale() const
Definition: ElevationProfilePlotAxis.cpp:73
Marble::ElevationProfilePlotAxis::setLength
void setLength(const int &length)
Definition: ElevationProfilePlotAxis.cpp:40
Marble::AxisTick::AxisTick
AxisTick(const int &position_, const qreal &value_)
Definition: ElevationProfilePlotAxis.h:24
Marble::ElevationProfilePlotAxis::ticks
AxisTickList ticks() const
Definition: ElevationProfilePlotAxis.cpp:83
Marble::ElevationProfilePlotAxis::update
void update()
Definition: ElevationProfilePlotAxis.cpp:52
Marble::ElevationProfilePlotAxis::ElevationProfilePlotAxis
ElevationProfilePlotAxis()
Definition: ElevationProfilePlotAxis.cpp:21
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:49 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal