From 6f06c31d0b9db9ffae45d409557864469ab169b0 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 8 May 2013 14:56:06 -0700 Subject: Stop passing around gc and pi Make the graphics_context part of the ProfileGraphicsView and remember that the plot info is already a part of the graphics_context (we kept passing around both of them in the Gtk code... pointless but a leftover from before adding the pi to the gc...) Signed-off-by: Dirk Hohndel --- qt-ui/profilegraphics.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'qt-ui/profilegraphics.h') diff --git a/qt-ui/profilegraphics.h b/qt-ui/profilegraphics.h index becad197a..e1cb417f9 100644 --- a/qt-ui/profilegraphics.h +++ b/qt-ui/profilegraphics.h @@ -1,6 +1,7 @@ #ifndef PROFILEGRAPHICS_H #define PROFILEGRAPHICS_H +#include "../display.h" #include #include #include @@ -90,15 +91,16 @@ protected: void mouseMoveEvent(QMouseEvent* event); private: - void plot_depth_profile(struct graphics_context *gc, struct plot_info *pi); - void plot_text(struct graphics_context *gc, text_render_options_t *tro, double x, double y, const QString &text); - void plot_events(struct graphics_context *gc, struct plot_info *pi, struct divecomputer *dc); - void plot_one_event(struct graphics_context *gc, struct plot_info *pi, struct event *event); - void plot_temperature_profile(struct graphics_context *gc, struct plot_info *pi); + void plot_depth_profile(); + void plot_text(text_render_options_t *tro, double x, double y, const QString &text); + void plot_events(struct divecomputer *dc); + void plot_one_event(struct event *event); + void plot_temperature_profile(); QPen defaultPen; QBrush defaultBrush; ToolTipItem *toolTip; + graphics_context gc; }; #endif -- cgit v1.2.3-70-g09d2