Skip to content

Class GridModel

ClassList > GridModel

More...

  • #include <gridmodel.h>

Inherits the following classes: QObject

Public Properties

Type Name
property QColor annotationColor
property bool annotationHasOutline
property QColor annotationOutlineColor
property int annotationPrecision
property QList< GridAnnotation > annotations
property bool autoColor
property bool enabled
property bool indeterminate
property QColor majorLineColor
property QString majorLinesPath
property QgsQuickMapSettings * mapSettings
property QColor markerColor
property QString markersPath
property QColor minorLineColor
property QString minorLinesPath
property bool prepareAnnotations
property bool prepareLines
property bool prepareMarkers
property double xInterval
property double xOffset
property double yInterval
property double yOffset

Public Signals

Type Name
signal void annotationColorChanged
Emitted when the grid annotation text color has changed.
signal void annotationHasOutlineChanged
Emitted when the grid annotation text outline visibility has changed.
signal void annotationOutlineColorChanged
Emitted when the grid annotation text outline color has changed.
signal void annotationPrecisionChanged
Emitted when the grid annotation text decimal precision has changed.
signal void annotationsChanged
Emitted when the grid annotations have changed.
signal void autoColorChanged
Emitted when the grid line and marker colors are automatically assigned.
signal void enabledChanged
Emitted when the grid enabled setting has changed.
signal void indeterminateChanged
Emitted when the grid indeterminate setting has changed.
signal void majorLineColorChanged
Emitted when the grid major line color has changed.
signal void majorLinesChanged
Emitted when the grid major lines have changed.
signal void mapSettingsChanged
Emitted when the map settings object has changed.
signal void markerColorChanged
Emitted when the grid marker color has changed.
signal void markersChanged
Emitted when the grid markers have changed.
signal void minorLineColorChanged
Emitted when the grid minor line color has changed.
signal void minorLinesChanged
Emitted when the grid minor lines have changed.
signal void prepareAnnotationsChanged
Emitted when grid annotations preparation setting has changed.
signal void prepareLinesChanged
Emitted when grid lines preparation setting has changed.
signal void prepareMarkersChanged
Emitted when grid markers preparation setting has changed.
signal void xIntervalChanged
Emitted when the grid X interval has changed.
signal void xOffsetChanged
Emitted when the grid X offset has changed.
signal void yIntervalChanged
Emitted when the grid Y interval has changed.
signal void yOffsetChanged
Emitted when the grid Y offset has changed.

Public Functions

Type Name
GridModel (QObject * parent=nullptr)
Default constructor.
QColor annotationColor () const
Returns the grid annotation text color.
bool annotationHasOutline () const
Returns whether annotation text have an outline color.
QColor annotationOutlineColor () const
Returns the grid annotation text outline color.
int annotationPrecision () const
Returns the annotation text decimal precision.
QList< GridAnnotation > annotations () const
Returns the grid annotations.
bool autoColor () const
bool enabled () const
Returns TRUE when grid elements will be prepared.
bool indeterminate () const
QColor majorLineColor () const
Returns the grid major line color.
QString majorLinesPath () const
Returns the grid major lines.
QgsQuickMapSettings * mapSettings () const
Returns the map settings object.
QColor markerColor () const
Returns the grid marker color.
QString markersPath () const
Returns the grid markers.
QColor minorLineColor () const
Returns the grid minor line color.
QString minorLinesPath () const
Returns the grid minor lines.
bool prepareAnnotations () const
Returns whether grid annotations will be prepared.
bool prepareLines () const
Returns whether grid lines will be prepared.
bool prepareMarkers () const
Returns whether grid markers will be prepared.
void setAnnotationColor (const QColor & color)
Sets the grid annotation text color.
void setAnnotationHasOutline (bool hasOutline)
Sets whether annotation text have an outline color.
void setAnnotationOutlineColor (const QColor & color)
Sets the grid annotation text outline color.
void setAnnotationPrecision (int precision)
Sets the annotation text decimal precision.
void setAutoColor (bool autoColor)
void setEnabled (bool enabled)
Sets whether grid elements will be prepared.
void setIndeterminate (bool indeterminate)
void setMajorLineColor (const QColor & color)
Sets the grid major line color.
void setMapSettings (QgsQuickMapSettings * mapSettings)
Sets the map settings object.
void setMarkerColor (const QColor & color)
Sets the grid marker color.
void setMinorLineColor (const QColor & color)
Sets the grid minor line color.
void setPrepareAnnotations (bool prepare)
Sets whether grid annotations will be prepared.
void setPrepareLines (bool prepare)
Sets whether grid lines will be prepared.
void setPrepareMarkers (bool prepare)
Sets whether grid markers will be prepared.
void setXInterval (double interval)
Sets the grid X interval.
void setXOffset (double offset)
Sets the grid X interval.
void setYInterval (double interval)
Sets the grid Y interval.
void setYOffset (double offset)
Sets the grid Y interval.
double xInterval () const
Returns the grid X interval.
double xOffset () const
Returns the grid X interval.
double yInterval () const
Returns the grid Y interval.
double yOffset () const
Returns the grid Y interval.

Detailed Description

This model manages lists of lines, markers, and annotations representing a grid.

Public Properties Documentation

property annotationColor [1/2]

QColor GridModel::annotationColor;

property annotationHasOutline [1/2]

bool GridModel::annotationHasOutline;

property annotationOutlineColor [1/2]

QColor GridModel::annotationOutlineColor;

property annotationPrecision [1/2]

int GridModel::annotationPrecision;

property annotations [1/2]

QList<GridAnnotation> GridModel::annotations;

property autoColor [1/2]

bool GridModel::autoColor;

property enabled [1/2]

bool GridModel::enabled;

property indeterminate [1/2]

bool GridModel::indeterminate;

property majorLineColor [1/2]

QColor GridModel::majorLineColor;

property majorLinesPath [1/2]

QString GridModel::majorLinesPath;

property mapSettings [1/2]

QgsQuickMapSettings * GridModel::mapSettings;

property markerColor [1/2]

QColor GridModel::markerColor;

property markersPath [1/2]

QString GridModel::markersPath;

property minorLineColor [1/2]

QColor GridModel::minorLineColor;

property minorLinesPath [1/2]

QString GridModel::minorLinesPath;

property prepareAnnotations [1/2]

bool GridModel::prepareAnnotations;

property prepareLines [1/2]

bool GridModel::prepareLines;

property prepareMarkers [1/2]

bool GridModel::prepareMarkers;

property xInterval [1/2]

double GridModel::xInterval;

property xOffset [1/2]

double GridModel::xOffset;

property yInterval [1/2]

double GridModel::yInterval;

property yOffset [1/2]

double GridModel::yOffset;

Public Signals Documentation

signal annotationColorChanged

Emitted when the grid annotation text color has changed.

void GridModel::annotationColorChanged;


signal annotationHasOutlineChanged

Emitted when the grid annotation text outline visibility has changed.

void GridModel::annotationHasOutlineChanged;


signal annotationOutlineColorChanged

Emitted when the grid annotation text outline color has changed.

void GridModel::annotationOutlineColorChanged;


signal annotationPrecisionChanged

Emitted when the grid annotation text decimal precision has changed.

void GridModel::annotationPrecisionChanged;


signal annotationsChanged

Emitted when the grid annotations have changed.

void GridModel::annotationsChanged;


signal autoColorChanged

Emitted when the grid line and marker colors are automatically assigned.

void GridModel::autoColorChanged;


signal enabledChanged

Emitted when the grid enabled setting has changed.

void GridModel::enabledChanged;


signal indeterminateChanged

Emitted when the grid indeterminate setting has changed.

void GridModel::indeterminateChanged;


signal majorLineColorChanged

Emitted when the grid major line color has changed.

void GridModel::majorLineColorChanged;


signal majorLinesChanged

Emitted when the grid major lines have changed.

void GridModel::majorLinesChanged;


signal mapSettingsChanged

Emitted when the map settings object has changed.

void GridModel::mapSettingsChanged;


signal markerColorChanged

Emitted when the grid marker color has changed.

void GridModel::markerColorChanged;


signal markersChanged

Emitted when the grid markers have changed.

void GridModel::markersChanged;


signal minorLineColorChanged

Emitted when the grid minor line color has changed.

void GridModel::minorLineColorChanged;


signal minorLinesChanged

Emitted when the grid minor lines have changed.

void GridModel::minorLinesChanged;


signal prepareAnnotationsChanged

Emitted when grid annotations preparation setting has changed.

void GridModel::prepareAnnotationsChanged;


signal prepareLinesChanged

Emitted when grid lines preparation setting has changed.

void GridModel::prepareLinesChanged;


signal prepareMarkersChanged

Emitted when grid markers preparation setting has changed.

void GridModel::prepareMarkersChanged;


signal xIntervalChanged

Emitted when the grid X interval has changed.

void GridModel::xIntervalChanged;


signal xOffsetChanged

Emitted when the grid X offset has changed.

void GridModel::xOffsetChanged;


signal yIntervalChanged

Emitted when the grid Y interval has changed.

void GridModel::yIntervalChanged;


signal yOffsetChanged

Emitted when the grid Y offset has changed.

void GridModel::yOffsetChanged;


Public Functions Documentation

function GridModel

Default constructor.

explicit GridModel::GridModel (
    QObject * parent=nullptr
) 


function annotationColor [2/2]

Returns the grid annotation text color.

inline QColor GridModel::annotationColor () const


function annotationHasOutline [2/2]

Returns whether annotation text have an outline color.

inline bool GridModel::annotationHasOutline () const


function annotationOutlineColor [2/2]

Returns the grid annotation text outline color.

inline QColor GridModel::annotationOutlineColor () const


function annotationPrecision [2/2]

Returns the annotation text decimal precision.

inline int GridModel::annotationPrecision () const


function annotations [2/2]

Returns the grid annotations.

inline QList< GridAnnotation > GridModel::annotations () const


function autoColor [2/2]

inline bool GridModel::autoColor () const

Returns whether grid line and marker colors will be automatically assigned to colors derived from the map canvas background color.


function enabled [2/2]

Returns TRUE when grid elements will be prepared.

inline bool GridModel::enabled () const


function indeterminate [2/2]

inline bool GridModel::indeterminate () const

Returns TRUE when grid will adopt an indeterminate behavior and ignore the interval and offset values.


function majorLineColor [2/2]

Returns the grid major line color.

inline QColor GridModel::majorLineColor () const


function majorLinesPath [2/2]

Returns the grid major lines.

inline QString GridModel::majorLinesPath () const


function mapSettings [2/2]

Returns the map settings object.

inline QgsQuickMapSettings * GridModel::mapSettings () const


function markerColor [2/2]

Returns the grid marker color.

inline QColor GridModel::markerColor () const


function markersPath [2/2]

Returns the grid markers.

inline QString GridModel::markersPath () const


function minorLineColor [2/2]

Returns the grid minor line color.

inline QColor GridModel::minorLineColor () const


function minorLinesPath [2/2]

Returns the grid minor lines.

inline QString GridModel::minorLinesPath () const


function prepareAnnotations [2/2]

Returns whether grid annotations will be prepared.

inline bool GridModel::prepareAnnotations () const


function prepareLines [2/2]

Returns whether grid lines will be prepared.

inline bool GridModel::prepareLines () const


function prepareMarkers [2/2]

Returns whether grid markers will be prepared.

inline bool GridModel::prepareMarkers () const


function setAnnotationColor

Sets the grid annotation text color.

void GridModel::setAnnotationColor (
    const QColor & color
) 


function setAnnotationHasOutline

Sets whether annotation text have an outline color.

void GridModel::setAnnotationHasOutline (
    bool hasOutline
) 


function setAnnotationOutlineColor

Sets the grid annotation text outline color.

void GridModel::setAnnotationOutlineColor (
    const QColor & color
) 


function setAnnotationPrecision

Sets the annotation text decimal precision.

void GridModel::setAnnotationPrecision (
    int precision
) 


function setAutoColor

void GridModel::setAutoColor (
    bool autoColor
) 

Set whether grid line and marker colors will be automatically assigned to colors derived from the map canvas background color.


function setEnabled

Sets whether grid elements will be prepared.

void GridModel::setEnabled (
    bool enabled
) 


function setIndeterminate

void GridModel::setIndeterminate (
    bool indeterminate
) 

Sets whether the grid will adopt an indeterminate behavior and ignore the interval and offset values.


function setMajorLineColor

Sets the grid major line color.

void GridModel::setMajorLineColor (
    const QColor & color
) 


function setMapSettings

Sets the map settings object.

void GridModel::setMapSettings (
    QgsQuickMapSettings * mapSettings
) 


function setMarkerColor

Sets the grid marker color.

void GridModel::setMarkerColor (
    const QColor & color
) 


function setMinorLineColor

Sets the grid minor line color.

void GridModel::setMinorLineColor (
    const QColor & color
) 


function setPrepareAnnotations

Sets whether grid annotations will be prepared.

void GridModel::setPrepareAnnotations (
    bool prepare
) 


function setPrepareLines

Sets whether grid lines will be prepared.

void GridModel::setPrepareLines (
    bool prepare
) 


function setPrepareMarkers

Sets whether grid markers will be prepared.

void GridModel::setPrepareMarkers (
    bool prepare
) 


function setXInterval

Sets the grid X interval.

void GridModel::setXInterval (
    double interval
) 


function setXOffset

Sets the grid X interval.

void GridModel::setXOffset (
    double offset
) 


function setYInterval

Sets the grid Y interval.

void GridModel::setYInterval (
    double interval
) 


function setYOffset

Sets the grid Y interval.

void GridModel::setYOffset (
    double offset
) 


function xInterval [2/2]

Returns the grid X interval.

inline double GridModel::xInterval () const


function xOffset [2/2]

Returns the grid X interval.

inline double GridModel::xOffset () const


function yInterval [2/2]

Returns the grid Y interval.

inline double GridModel::yInterval () const


function yOffset [2/2]

Returns the grid Y interval.

inline double GridModel::yOffset () const



The documentation for this class was generated from the following file src/core/gridmodel.h