16 #ifndef QGSLAYOUTGRIDSETTINGS_H 17 #define QGSLAYOUTGRIDSETTINGS_H 19 #include "qgis_core.h" 53 QString
stringType()
const override {
return QStringLiteral(
"LayoutGrid" ); }
89 void setPen(
const QPen &pen ) { mGridPen = pen; }
96 QPen
pen()
const {
return mGridPen; }
115 void loadFromSettings();
134 UndoGridResolution = 1,
141 Style mGridStyle = StyleLines;
146 #endif //QGSLAYOUTGRIDSETTINGS_H The class is used as a container of context for various read/write operations on other objects...
QgsLayoutPoint offset() const
Returns the offset of the page/snap grid.
Style style() const
Returns the style used for drawing the page/snap grids.
virtual bool writeXml(QDomElement &parentElement, QDomDocument &document, const QgsReadWriteContext &context) const =0
Stores the objects's state in a DOM element.
QgsLayoutMeasurement resolution() const
Returns the page/snap grid resolution.
Style
Style for drawing the page/snapping grid.
QPen pen() const
Returns the pen used for drawing page/snap grids.
This class provides a method of storing points, consisting of an x and y coordinate, for use in QGIS layouts.
void setPen(const QPen &pen)
Sets the pen used for drawing page/snap grids.
This class provides a method of storing measurements for use in QGIS layouts using a variety of diffe...
QString stringType() const override
Returns the object type as a string.
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.
Contains settings relating to the appearance, spacing and offset for layout grids.
An interface for layout objects which can be stored and read from DOM elements.
virtual bool readXml(const QDomElement &element, const QDomDocument &document, const QgsReadWriteContext &context)=0
Sets the objects's state from a DOM element.
void setStyle(const Style style)
Sets the style used for drawing the page/snap grids.