23 #include <QDomElement>
44 mBearingFormat.reset( format );
50 return mBearingFormat.get();
55 QDomElement bearingElement = element.firstChildElement( QStringLiteral(
"BearingFormat" ) );
64 QDomElement element = doc.createElement( QStringLiteral(
"ProjectDisplaySettings" ) );
66 QDomElement bearingElement = doc.createElement( QStringLiteral(
"BearingFormat" ) );
67 mBearingFormat->writeXml( bearingElement, doc, context );
68 element.appendChild( bearingElement );
static QgsNumericFormatRegistry * numericFormatRegistry()
Gets the registry of available numeric formats.
static QgsBearingNumericFormat * bearingFormat()
Returns the default bearing format, which controls how angular bearings are displayed.
void reset()
Resets the settings to a default state.
const QgsBearingNumericFormat * bearingFormat() const
Returns the project bearing's format, which controls how bearings associated with the project are dis...
void bearingFormatChanged()
Emitted when the bearing format changes.
QgsProjectDisplaySettings(QObject *parent=nullptr)
Constructor for QgsProjectDisplaySettings with the specified parent object.
bool readXml(const QDomElement &element, const QgsReadWriteContext &context)
Reads the settings's state from a DOM element.
~QgsProjectDisplaySettings() override
void setBearingFormat(QgsBearingNumericFormat *format)
Sets the project bearing format, which controls how bearings associated with the project are displaye...
QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context) const
Returns a DOM element representing the settings.
The class is used as a container of context for various read/write operations on other objects.