22QgsReportSectionLayout::QgsReportSectionLayout( QgsAbstractReportSection *parent )
 
   23  : QgsAbstractReportSection( parent )
 
   26QIcon QgsReportSectionLayout::icon()
 const 
   31QgsReportSectionLayout *QgsReportSectionLayout::clone()
 const 
   33  auto copy = std::make_unique< QgsReportSectionLayout >( 
nullptr );
 
   34  copyCommonProperties( copy.get() );
 
   38    copy->mBody.reset( mBody->clone() );
 
   43  copy->mBodyEnabled = mBodyEnabled;
 
   45  return copy.release();
 
   48bool QgsReportSectionLayout::beginRender()
 
   50  mExportedBody = 
false;
 
   51  return QgsAbstractReportSection::beginRender();
 
   54QgsLayout *QgsReportSectionLayout::nextBody( 
bool &ok )
 
   56  if ( !mExportedBody && mBody && mBodyEnabled )
 
   69void QgsReportSectionLayout::reloadSettings()
 
   71  QgsAbstractReportSection::reloadSettings();
 
   73    mBody->reloadSettings();
 
   76bool QgsReportSectionLayout::writePropertiesToElement( QDomElement &element, QDomDocument &doc, 
const QgsReadWriteContext &context )
 const 
   80    QDomElement bodyElement = doc.createElement( QStringLiteral( 
"body" ) );
 
   81    bodyElement.appendChild( mBody->writeXml( doc, context ) );
 
   82    element.appendChild( bodyElement );
 
   84  element.setAttribute( QStringLiteral( 
"bodyEnabled" ), mBodyEnabled ? QStringLiteral( 
"1" ) : QStringLiteral( 
"0" ) );
 
   88bool QgsReportSectionLayout::readPropertiesFromElement( 
const QDomElement &element, 
const QDomDocument &doc, 
const QgsReadWriteContext &context )
 
   90  const QDomElement bodyElement = element.firstChildElement( QStringLiteral( 
"body" ) );
 
   91  if ( !bodyElement.isNull() )
 
   93    const QDomElement bodyLayoutElem = bodyElement.firstChild().toElement();
 
   94    auto body = std::make_unique< QgsLayout >( project() );
 
   95    body->readXml( bodyLayoutElem, doc, context );
 
   96    mBody = std::move( body );
 
   98  mBodyEnabled = element.attribute( QStringLiteral( 
"bodyEnabled" ) ).toInt();
 
static QIcon getThemeIcon(const QString &name, const QColor &fillColor=QColor(), const QColor &strokeColor=QColor())
Helper to get a theme icon.
 
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
 
A container for the context for various read/write operations on objects.