aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/qpytextobject.h
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-09-01 20:58:41 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2010-09-02 15:07:59 -0300
commit8f4246a522aa02c9e1d7e44ab6a18d13075d53b9 (patch)
tree34e4551d31960708e3850ca03f8231211dd3fcd3 /PySide/qpytextobject.h
parent94ce2814e9a3709ab7d60f3acee6576fe9476b1d (diff)
Fix bug#125 - "QAbstractTextDocumentLayout.registerHandler apparently not working"
Added class QPyTextObject which inherits from QObject and QTextObjectInterface to solve the issue with registerHandler, the same approach used by PyQt. Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'PySide/qpytextobject.h')
-rw-r--r--PySide/qpytextobject.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/PySide/qpytextobject.h b/PySide/qpytextobject.h
new file mode 100644
index 000000000..80c5b7ebd
--- /dev/null
+++ b/PySide/qpytextobject.h
@@ -0,0 +1,16 @@
+#ifndef QPYTEXTOBJECT
+#define QPYTEXTOBJECT
+
+#include <QObject>
+#include <QTextObjectInterface>
+
+class QPyTextObject : public QObject, public QTextObjectInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QTextObjectInterface)
+public:
+ QPyTextObject(QObject* parent = 0) : QObject(parent) {}
+ void drawObject(QPainter* painter, const QRectF& rect, QTextDocument* doc, int posInDocument, const QTextFormat& format ) = 0;
+ QSizeF intrinsicSize(QTextDocument* doc, int posInDocument, const QTextFormat& format ) = 0;
+};
+#endif \ No newline at end of file