2013-05-04 16:12:43 -03:00
|
|
|
#ifndef PROFILEGRAPHICS_H
|
|
|
|
#define PROFILEGRAPHICS_H
|
|
|
|
|
|
|
|
#include <QGraphicsView>
|
|
|
|
|
2013-05-06 15:35:17 -03:00
|
|
|
struct text_render_options;
|
|
|
|
struct graphics_context;
|
|
|
|
struct plot_info;
|
|
|
|
typedef struct text_render_options text_render_options_t;
|
|
|
|
|
2013-05-04 16:12:43 -03:00
|
|
|
class ProfileGraphicsView : public QGraphicsView {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
ProfileGraphicsView(QWidget* parent = 0);
|
|
|
|
void plot(struct dive *d);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void resizeEvent(QResizeEvent *event);
|
|
|
|
|
2013-05-04 19:20:49 -03:00
|
|
|
private:
|
|
|
|
void plot_depth_profile(struct graphics_context *gc, struct plot_info *pi);
|
2013-05-06 15:35:17 -03:00
|
|
|
void plot_text(struct graphics_context *gc, text_render_options_t *tro, double x, double y, const QString &text);
|
2013-05-04 20:18:16 -03:00
|
|
|
|
|
|
|
QPen defaultPen;
|
|
|
|
QBrush defaultBrush;
|
2013-05-04 16:12:43 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|