23 : QgsAbstractReportSection( nullptr )
27 QIcon QgsReport::icon()
const 32 QgsReport *QgsReport::clone()
const 34 std::unique_ptr< QgsReport > copy = qgis::make_unique< QgsReport >( mProject );
35 copyCommonProperties( copy.get() );
36 return copy.release();
39 void QgsReport::setName(
const QString &
name )
45 QDomElement QgsReport::writeLayoutXml( QDomDocument &document,
const QgsReadWriteContext &context )
const 47 QDomElement element = document.createElement( QStringLiteral(
"Report" ) );
48 writeXml( element, document, context );
49 element.setAttribute( QStringLiteral(
"name" ), mName );
53 bool QgsReport::readLayoutXml(
const QDomElement &layoutElement,
const QDomDocument &document,
const QgsReadWriteContext &context )
55 const QDomNodeList sectionList = layoutElement.elementsByTagName( QStringLiteral(
"Section" ) );
56 if ( sectionList.count() > 0 )
58 readXml( sectionList.at( 0 ).toElement(), document, context );
60 setName( layoutElement.attribute( QStringLiteral(
"name" ) ) );
64 void QgsReport::updateSettings()
The class is used as a container of context for various read/write operations on other objects...
static QIcon getThemeIcon(const QString &name)
Helper to get a theme icon.
bool readXml(const QDomElement &layoutElement, const QDomDocument &document, const QgsReadWriteContext &context) override
Sets the collection's state from a DOM element.
An interface for classes which can visit style entity (e.g.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts, annotations, canvases, etc.
QDomElement writeXml(QDomDocument &document, const QgsReadWriteContext &context) const override
Returns the layout's state encapsulated in a DOM element.
void nameChanged(const QString &name)
Emitted when the layout's name is changed.
void setName(const QString &name) override
Sets the layout's name.
bool accept(QgsStyleEntityVisitorInterface *visitor) const
Accepts the specified style entity visitor, causing it to visit all style entities associated with th...
void reloadSettings()
Refreshes the layout when global layout related options change.
QString name() const override
Returns the layout's name.