mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
The plot_text function from the cairo-methods are now ported on the qt version. this patch moves around some code since quite defines are already used and I didn't want to reinvent the whell. Original code used varargs, but I prefered to change it , so now it receives just a reference to a QString object and the string must be constructed before sending, using the .arg methods. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
28 lines
654 B
C++
28 lines
654 B
C++
#ifndef PROFILEGRAPHICS_H
|
|
#define PROFILEGRAPHICS_H
|
|
|
|
#include <QGraphicsView>
|
|
|
|
struct text_render_options;
|
|
struct graphics_context;
|
|
struct plot_info;
|
|
typedef struct text_render_options text_render_options_t;
|
|
|
|
class ProfileGraphicsView : public QGraphicsView {
|
|
Q_OBJECT
|
|
public:
|
|
ProfileGraphicsView(QWidget* parent = 0);
|
|
void plot(struct dive *d);
|
|
|
|
protected:
|
|
void resizeEvent(QResizeEvent *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);
|
|
|
|
QPen defaultPen;
|
|
QBrush defaultBrush;
|
|
};
|
|
|
|
#endif
|