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>
This commit is contained in:
Tomaz Canabrava 2013-05-06 15:35:17 -03:00 committed by Dirk Hohndel
parent b3fce3497c
commit 1b392b35bc
5 changed files with 57 additions and 76 deletions

View file

@ -54,6 +54,30 @@ int get_maxtime(struct plot_info *pi);
* partial pressure graphs */
int get_maxdepth(struct plot_info *pi);
#define ALIGN_LEFT 1
#define ALIGN_RIGHT 2
#define INVISIBLE 4
#define UNSORTABLE 8
#define EDITABLE 16
#ifndef TEXT_SCALE
#define TEXT_SCALE 1.0
#endif
#define DEPTH_TEXT_SIZE (10 * TEXT_SCALE)
#define PRESSURE_TEXT_SIZE (10 * TEXT_SCALE)
#define DC_TEXT_SIZE (10.5 * TEXT_SCALE)
#define PP_TEXT_SIZE (11 * TEXT_SCALE)
#define TEMP_TEXT_SIZE (12 * TEXT_SCALE)
#define RIGHT (-1.0)
#define CENTER (-0.5)
#define LEFT (0.0)
#define TOP (1)
#define MIDDLE (0)
#define BOTTOM (-1)
#ifdef __cplusplus
}
#endif