Commit f58b8ea9 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add define for activate or not header support

parent b0c5813a
......@@ -51,6 +51,8 @@ MarkupDirector::~MarkupDirector()
delete d_ptr;
}
//#define ADD_HEADER_SUPPORT 1
QTextFrame::iterator
MarkupDirector::processBlockContents(QTextFrame::iterator frameIt, const QTextBlock &block)
{
......@@ -60,7 +62,13 @@ MarkupDirector::processBlockContents(QTextFrame::iterator frameIt, const QTextBl
const auto blockAlignment = blockFormat.alignment();
// TODO: decide when to use <h1> etc.
#ifdef ADD_HEADER_SUPPORT
if (blockFormat.headingLevel() > 0) {
//Header
qDebug() << " header " << blockFormat.headingLevel();
m_builder->beginHeader(blockFormat.headingLevel());
}
#endif
if (blockFormat.hasProperty(QTextFormat::BlockTrailingHorizontalRulerWidth)) {
m_builder->insertHorizontalRule();
if (!frameIt.atEnd()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment