Subgroup: Layout
Class: QgsLayoutGridSettings¶
-
class
qgis.core.
QgsLayoutGridSettings
(layout: QgsLayout)¶ Bases:
qgis._core.QgsLayoutSerializableObject
Constructor for QgsLayoutGridSettings.
QgsLayoutGridSettings(QgsLayoutGridSettings)
Contains settings relating to the appearance, spacing and offset for layout grids.
New in version 3.0: Methods
layout
loadFromSettings
Loads grid settings from the application layout settings. offset
Returns the offset of the page/snap grid. pen
Returns the pen used for drawing page/snap grids. readXml
Sets the grid’s state from a DOM element. resolution
Returns the page/snap grid resolution. setOffset
Sets the offset
of the page/snap grid.setPen
Sets the pen
used for drawing page/snap grids.setResolution
Sets the page/snap grid resolution
.setStyle
Sets the style
used for drawing the page/snap grids.stringType
style
Returns the style used for drawing the page/snap grids. writeXml
Stores the grid’s state in a DOM element. Signals
Attributes
StyleCrosses
StyleDots
StyleLines
-
class
Style
¶ Bases:
int
-
StyleCrosses
= 2¶
-
StyleDots
= 1¶
-
StyleLines
= 0¶
-
layout
(self) → QgsLayout¶
-
loadFromSettings
(self)¶ Loads grid settings from the application layout settings.
-
offset
(self) → QgsLayoutPoint¶ Returns the offset of the page/snap grid.
See also
See also
-
pen
(self) → QPen¶ Returns the pen used for drawing page/snap grids.
See also
See also
-
readXml
(self, gridElement: QDomElement, document: QDomDocument, context: QgsReadWriteContext) → bool¶ Sets the grid’s state from a DOM element. gridElement is the DOM node corresponding to the grid.
See also
-
resolution
(self) → QgsLayoutMeasurement¶ Returns the page/snap grid resolution.
See also
See also
-
setOffset
(self, offset: QgsLayoutPoint)¶ Sets the
offset
of the page/snap grid.See also
See also
-
setPen
(self, pen: Union[QPen, QColor, Qt.GlobalColor, QGradient])¶ Sets the
pen
used for drawing page/snap grids.See also
See also
-
setResolution
(self, resolution: QgsLayoutMeasurement)¶ Sets the page/snap grid
resolution
.See also
See also
-
setStyle
(self, style: QgsLayoutGridSettings.Style)¶ Sets the
style
used for drawing the page/snap grids.See also
See also
-
stringType
(self) → str¶
-
style
(self) → QgsLayoutGridSettings.Style¶ Returns the style used for drawing the page/snap grids.
See also
See also
-
class