summaryrefslogtreecommitdiffstats
path: root/qt-ui/profilegraphics.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-08 14:56:06 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-08 15:01:49 -0700
commit6f06c31d0b9db9ffae45d409557864469ab169b0 (patch)
treed4197bd97aee1fbd6c752d8b6667c99db4786707 /qt-ui/profilegraphics.h
parent688276b6f200c5d8b44ab5b6092265a93f7c0b41 (diff)
downloadsubsurface-6f06c31d0b9db9ffae45d409557864469ab169b0.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profilegraphics.h')
-rw-r--r--qt-ui/profilegraphics.h12
1 files changed, 7 insertions, 5 deletions
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 <QGraphicsView>
#include <QGraphicsItem>
#include <QIcon>
@@ -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