Added a ruler which can be dragged along the profile

This patch adds a ruler QGraphicsItem which can be dragged
along the profile. The ruler displays minimum, maximum and
average for depth and speed (ascent/descent rate). Also, all used
gas will be displayed.

This also adds a new attribute to struct plot_data to store the
speed (not just as velocity_t).

Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com>
This commit is contained in:
Maximilian Güntner 2013-09-25 02:07:07 +02:00
parent 3312c9a3a4
commit 248f1b86d1
5 changed files with 411 additions and 8 deletions

View file

@ -33,6 +33,7 @@ struct plot_data {
double po2, pn2, phe;
double mod, ead, end, eadd;
velocity_t velocity;
int speed;
struct plot_data *min[3];
struct plot_data *max[3];
int avg[3];
@ -42,6 +43,7 @@ void calculate_max_limits(struct dive *dive, struct divecomputer *dc, struct gra
struct plot_info *create_plot_info(struct dive *dive, struct divecomputer *dc, struct graphics_context *gc);
int setup_temperature_limits(struct graphics_context *gc);
int get_cylinder_pressure_range(struct graphics_context *gc);
void compare_samples(struct plot_data *e1, struct plot_data *e2, char *buf, int bufsize, int sum);
struct ev_select {
char *ev_name;