11 #ifndef KDREPORTSREPORTBUILDER_H
12 #define KDREPORTSREPORTBUILDER_H
16 #include <QTextCursor>
26 class TextDocumentData;
28 #define REPORTBUILDER_CTOR_ARGDEFS KDReports::TextDocumentData &contentDocument, const QTextCursor &cursor, KDReports::Report *report
30 #define REPORTBUILDER_CTOR_ARGNAMES contentDocument, cursor, report
55 virtual void addPageBreakPublic();
60 virtual void insertFragmentPublic(
const QTextDocumentFragment &fragment);
63 virtual void addInlineElement(
const Element &element);
64 virtual void addBlockElement(
const Element &element, Qt::AlignmentFlag horizontalAlignment,
const QColor &backgroundColor = QColor());
66 virtual void addVerticalSpacing(qreal space);
70 return m_contentDocument;
75 return currentDocumentData().document();
93 return m_contentDocument;
100 void setupBlockFormat(QTextBlockFormat &blockFormat)
const;
106 int currentPosition();
108 static QTextCharFormat::VerticalAlignment toVerticalAlignment(Qt::Alignment alignment);
115 QTextCursor m_cursor;
116 QTextCursor m_layoutDocCursor;
118 qreal m_leftMargin = 0;
119 qreal m_rightMargin = 0;
120 qreal m_topMargin = 0;
121 qreal m_bottomMargin = 0;
QDebug operator<<(QDebug &dbg, const QTextOption::Tab &tab)
ReportBuilder(KDReports::TextDocumentData &contentDocument, const QTextCursor &cursor, Report *report)
void setDefaultFont(const QFont &font)
QTextCursor & contentDocumentCursor()
virtual void addVerticalSpacingPublic(qreal space)
TextDocumentData & currentDocumentData()
QTextDocument & currentDocument()
virtual void addBlockElementPublic(const Element &element, Qt::AlignmentFlag horizontalAlignment, const QColor &backgroundColor=QColor())
TextDocumentData & contentDocumentData()
virtual void addVariablePublic(KDReports::VariableType variable)
virtual void addInlineElementPublic(const Element &element)
void setParagraphMargins(qreal left, qreal top, qreal right, qreal bottom)
QFont defaultFont() const