\( \def\bold#1{\bf #1} \newcommand{\d}{\mathrm{d}} \) BTP: Manual and Source Code Documentation

Power Uphill

bike mass [kg]
body mass [kg]
altitude gain [m]
climb length [km]
gradient [%]
time [s]
speed [km/h]
power [W]
power/mass [W/kg]
climbrate [m/min]

average power on climb stage

BTP  3.0
Routing/ClimbAnalysis/PowerCalculation
plot2D Class Reference

plotting 2D-Data sets as the height profile of a track or poweranalysis data More...

#include <plot2D.h>

Inheritance diagram for plot2D:
Collaboration diagram for plot2D:

Public Slots

void zoom_in ()
 
void zoom_out ()
 

Signals

void keypressed (QKeyEvent *event)
 
void mousex (double x)
 
void call_zoom_repaint (double xmin, double xmax)
 indicate wish to be repainted
 
void call_fullview ()
 indicate wish to be rescaled
 
void clicked (double x)
 

Public Member Functions

 plot2D (QWidget *parent=0)
 
 plot2D (plot2D *src)
 deep copy from existing plot
 
void set_data (double **dataxy, int count)
 setting one dataset and repaint plot
 
void set_data (double **data1xy, int count1, double **data2xy, int count2, double **data3xy, int count3)
 setting three datasets (1=points, 2/3=lines) and repaint plot
 
void set_labels (QString title, QString xbarlabel, QString ybarlabel)
 
QSize sizeHint () const
 
QSize minimumSizeHint () const
 
void autoset_axis ()
 autoscale plot to full data view
 
void set_marker (double x)
 draws vertical black line at x pos
 
double get_xmin ()
 
void set_size (int w, int h)
 
void save_to_png (QString filename)
 
void settings (ProfilSettings *s)
 asign settings to plot
 
void refresh_pixmap ()
 repaints the plot's pixmap
 

Protected Member Functions

void paintEvent (QPaintEvent *)
 
void resizeEvent (QResizeEvent *)
 
void mousePressEvent (QMouseEvent *event)
 
void mouseMoveEvent (QMouseEvent *event)
 
void mouseReleaseEvent (QMouseEvent *event)
 
void keyPressEvent (QKeyEvent *event)
 

Private Member Functions

double xtoxdata (int x)
 transform pic-px to data value
 
double ytoydata (int y)
 transform pic-px to data value
 
double xdatatox (double x)
 transform data value to pic-px
 
double ydatatoy (double y)
 transform data value to pic-px
 
void add_axis_labels (QPainter *p)
 rendering subfunction
 
void add_grid (QPainter *p)
 rendering subfunction
 
void add_data (QPainter *p)
 rendering subfunction
 
QColor slopetocolor (double x)
 calc fill color of profil data
 
void init_s0 ()
 initialize intrinsic settings
 

Private Attributes

double * xdata
 
double * ydata
 profile data
 
double * xdata1
 
double * ydata1
 linedata red
 
double * xdata2
 
double * ydata2
 linedata blue
 
int count
 
int count1
 
int count2
 data point count
 
QPixmap pm
 plot pixel data
 
ProfilSettings s0
 intrinsic settings
 
ProfilSettingss
 assigned settings to be used
 
int xsteps
 
int ysteps
 
int showzoombox
 
int xold
 
int yold
 
double xstep
 
double ystep
 
double xstep0
 
double ystep0
 
double xprecission
 
double yprecission
 axis label precission
 
double linewidth
 
double marker
 
float textheight
 
float titleheight
 text size
 
QPoint mouseposition
 
QString title
 
QString xbarlabel
 
QString ybarlabel
 
QRect dataarea
 coordinates of plot inset
 
QRect zoombox
 rect to be drawn green when zoomed
 

Detailed Description

plotting 2D-Data sets as the height profile of a track or poweranalysis data

This plotting class is based on "C++ GUI Programmierung mit Qt 4: Die offizielle Einführung (Programmer's Choice)". It allows plotting profil data set und two line data sets.

Definition at line 20 of file plot2D.h.

Member Function Documentation

void plot2D::mousex ( double  x)
signal

mouse's x value (data, not pixels)


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