summaryrefslogtreecommitdiffstats
path: root/examples/chart/canvastext.h
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-07-10 15:24:15 -0500
committerTimothy Pearson <[email protected]>2011-07-10 15:24:15 -0500
commitbd0f3345a938b35ce6a12f6150373b0955b8dd12 (patch)
tree7a520322212d48ebcb9fbe1087e7fca28b76185c /examples/chart/canvastext.h
downloadqt3-bd0f3345a938b35ce6a12f6150373b0955b8dd12.tar.gz
qt3-bd0f3345a938b35ce6a12f6150373b0955b8dd12.zip
Add Qt3 development HEAD version
Diffstat (limited to 'examples/chart/canvastext.h')
-rw-r--r--examples/chart/canvastext.h31
1 files changed, 31 insertions, 0 deletions
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 <qcanvas.h>
+
+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
+