diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-05-06 15:35:17 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-05-06 13:55:06 -0700 |
commit | 1b392b35bca24ce25da9073dbe9a1bb0186c47af (patch) | |
tree | fba8fbcb37564086f62ae40d19e0edb84a0067f5 /qt-ui/profilegraphics.h | |
parent | b3fce3497cc6cd801afae01f713b56b1d8e883b8 (diff) | |
download | subsurface-1b392b35bca24ce25da9073dbe9a1bb0186c47af.tar.gz |
Port the plot text method to Qt, also test it by actually plotting something
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>
Diffstat (limited to 'qt-ui/profilegraphics.h')
-rw-r--r-- | qt-ui/profilegraphics.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/profilegraphics.h b/qt-ui/profilegraphics.h index a62e55c4d..0b472f8b5 100644 --- a/qt-ui/profilegraphics.h +++ b/qt-ui/profilegraphics.h @@ -3,6 +3,11 @@ #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: @@ -14,6 +19,7 @@ protected: 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; |