mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
688276b6f2
commit
6f06c31d0b
5 changed files with 103 additions and 98 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue