16#ifndef QGSLAYOUTGRIDSETTINGS_H
17#define QGSLAYOUTGRIDSETTINGS_H
53 QString
stringType()
const override {
return QStringLiteral(
"LayoutGrid" ); }
96 QPen
pen()
const {
return mGridPen; }
115 void loadFromSettings();
134 UndoGridResolution = 1,
138 QgsLayoutMeasurement mGridResolution;
139 QgsLayoutPoint mGridOffset;
141 Style mGridStyle = StyleLines;
142 QgsLayout *mLayout =
nullptr;
Contains settings relating to the appearance, spacing and offset for layout grids.
QgsLayoutMeasurement resolution() const
Returns the page/snap grid resolution.
Style
Style for drawing the page/snapping grid.
QgsLayoutGridSettings(QgsLayout *layout)
Constructor for QgsLayoutGridSettings.
QgsLayoutPoint offset() const
Returns the offset of the page/snap grid.
Style style() const
Returns the style used for drawing the page/snap grids.
void setPen(const QPen &pen)
Sets the pen used for drawing page/snap grids.
void setStyle(const Style style)
Sets the style used for drawing the page/snap grids.
QPen pen() const
Returns the pen used for drawing page/snap grids.
QString stringType() const override
Returns the object type as a string.
Provides a method of storing measurements for use in QGIS layouts using a variety of different measur...
Provides a method of storing points, consisting of an x and y coordinate, for use in QGIS layouts.
An interface for layout objects which can be stored and read from DOM elements.
virtual bool writeXml(QDomElement &parentElement, QDomDocument &document, const QgsReadWriteContext &context) const =0
Stores the objects's state in a DOM element.
virtual bool readXml(const QDomElement &element, const QDomDocument &document, const QgsReadWriteContext &context)=0
Sets the objects's state from a DOM element.
virtual QgsLayout * layout()=0
Returns the layout the object belongs to.
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.