From bd0f3345a938b35ce6a12f6150373b0955b8dd12 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 10 Jul 2011 15:24:15 -0500 Subject: Add Qt3 development HEAD version --- examples/chart/canvastext.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 examples/chart/canvastext.h (limited to 'examples/chart/canvastext.h') diff --git a/examples/chart/canvastext.h b/examples/chart/canvastext.h new file mode 100644 index 0000000..599bd09 --- /dev/null +++ b/examples/chart/canvastext.h @@ -0,0 +1,31 @@ +#ifndef CANVASTEXT_H +#define CANVASTEXT_H + +#include + +class QFont; + + +class CanvasText : public QCanvasText +{ +public: + enum { CANVAS_TEXT = 1100 }; + + CanvasText( int index, QCanvas *canvas ) + : QCanvasText( canvas ), m_index( index ) {} + CanvasText( int index, const QString& text, QCanvas *canvas ) + : QCanvasText( text, canvas ), m_index( index ) {} + CanvasText( int index, const QString& text, QFont font, QCanvas *canvas ) + : QCanvasText( text, font, canvas ), m_index( index ) {} + + int index() const { return m_index; } + void setIndex( int index ) { m_index = index; } + + int rtti() const { return CANVAS_TEXT; } + +private: + int m_index; +}; + +#endif + -- cgit v1.2.1