QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
An individual grid which is drawn above the map content in a QgsComposerMap. More...
#include <qgscomposermapgrid.h>
Public Member Functions | |
QgsComposerMapGrid (const QString &name, QgsComposerMap *map) | |
Constructor for QgsComposerMapGrid. More... | |
virtual | ~QgsComposerMapGrid () |
AnnotationDirection | annotationDirection (const BorderSide border) const |
Gets the direction for drawing frame annotations. More... | |
DisplayMode | annotationDisplay (const BorderSide border) const |
Gets the display mode for the grid annotations on a specified side of the map frame. More... | |
bool | annotationEnabled () const |
Gets whether annotations are shown for the grid. More... | |
QString | annotationExpression () const |
Returns the expression used for drawing grid annotations. More... | |
QFont | annotationFont () const |
Gets the font used for drawing grid annotations. More... | |
QColor | annotationFontColor () const |
Gets the font color used for drawing grid annotations. More... | |
AnnotationFormat | annotationFormat () const |
Gets the format for drawing grid annotations. More... | |
double | annotationFrameDistance () const |
Gets the distance between the map frame and annotations. More... | |
AnnotationPosition | annotationPosition (const BorderSide border) const |
Gets the position for the grid annotations on a specified side of the map frame. More... | |
int | annotationPrecision () const |
Returns the coordinate precision for grid annotations. More... | |
QPainter::CompositionMode | blendMode () const |
Retrieves the blending mode used for drawing the grid. More... | |
void | calculateMaxExtension (double &top, double &right, double &bottom, double &left) |
Calculates the maximum distance the grid extends beyond the QgsComposerMap's item rect. More... | |
virtual QgsExpressionContext * | createExpressionContext () const override |
Creates an expression context relating to the objects' current state. More... | |
double | crossLength () const |
Retrieves the length of the cross segments drawn for the grid. More... | |
QgsCoordinateReferenceSystem | crs () const |
Retrieves the CRS for the grid. More... | |
void | draw (QPainter *painter) override |
Draws a grid. More... | |
DisplayMode | frameDivisions (const BorderSide border) const |
Gets the type of grid divisions which are used for frames on a specified side of the map. More... | |
QColor | frameFillColor1 () const |
Retrieves the first fill color for the grid frame. More... | |
QColor | frameFillColor2 () const |
Retrieves the second fill color for the grid frame. More... | |
QColor | framePenColor () const |
Retrieves the color of the outline drawn in the grid frame. More... | |
double | framePenSize () const |
Retrieves the width of the outline drawn in the grid frame. More... | |
FrameSideFlags | frameSideFlags () const |
Returns the flags which control which sides of the map item the grid frame is drawn on. More... | |
FrameStyle | frameStyle () const |
Gets the grid frame style. More... | |
double | frameWidth () const |
Gets the grid frame width. More... | |
double | intervalX () const |
Gets the interval between grid lines in the x-direction. More... | |
double | intervalY () const |
Gets the interval between grid lines in the y-direction. More... | |
const QgsLineSymbolV2 * | lineSymbol () const |
Gets the line symbol used for drawing grid lines. More... | |
QgsLineSymbolV2 * | lineSymbol () |
Gets the line symbol used for drawing grid lines. More... | |
const QgsMarkerSymbolV2 * | markerSymbol () const |
Gets the marker symbol used for drawing grid points. More... | |
QgsMarkerSymbolV2 * | markerSymbol () |
Gets the marker symbol used for drawing grid points. More... | |
double | maxExtension () |
Calculates the maximum distance the grid extends beyond the QgsComposerMap's item rect. More... | |
double | offsetX () const |
Gets the offset for grid lines in the x-direction. More... | |
double | offsetY () const |
Gets the offset for grid lines in the y-direction. More... | |
bool | readXML (const QDomElement &itemElem, const QDomDocument &doc) override |
Sets grid state from a DOM document. More... | |
void | setAnnotationDirection (const AnnotationDirection direction, const BorderSide border) |
Sets the direction for drawing frame annotations. More... | |
void | setAnnotationDirection (const AnnotationDirection direction) |
Sets the direction for drawing all frame annotations. More... | |
void | setAnnotationDisplay (const DisplayMode display, const BorderSide border) |
Sets what types of grid annotations should be drawn for a specified side of the map frame, or whether grid annotations should be disabled for the side. More... | |
void | setAnnotationEnabled (const bool enabled) |
Sets whether annotations should be shown for the grid. More... | |
void | setAnnotationExpression (const QString &expression) |
Sets the expression used for drawing grid annotations. More... | |
void | setAnnotationFont (const QFont &font) |
Sets the font used for drawing grid annotations. More... | |
void | setAnnotationFontColor (const QColor &color) |
Sets the font color used for drawing grid annotations. More... | |
void | setAnnotationFormat (const AnnotationFormat format) |
Sets the format for drawing grid annotations. More... | |
void | setAnnotationFrameDistance (const double distance) |
Sets the distance between the map frame and annotations. More... | |
void | setAnnotationPosition (const AnnotationPosition position, const BorderSide border) |
Sets the position for the grid annotations on a specified side of the map frame. More... | |
void | setAnnotationPrecision (const int precision) |
Sets the coordinate precision for grid annotations. More... | |
void | setBlendMode (const QPainter::CompositionMode mode) |
Sets the blending mode used for drawing the grid. More... | |
void | setCrossLength (const double length) |
Sets the length of the cross segments drawn for the grid. More... | |
void | setCrs (const QgsCoordinateReferenceSystem &crs) |
Sets the CRS for the grid. More... | |
void | setFrameDivisions (const DisplayMode divisions, const BorderSide border) |
Sets what type of grid divisions should be used for frames on a specified side of the map. More... | |
void | setFrameFillColor1 (const QColor &color) |
Sets the first fill color used for the grid frame. More... | |
void | setFrameFillColor2 (const QColor &color) |
Sets the second fill color used for the grid frame. More... | |
void | setFramePenColor (const QColor &color) |
Sets the color of the outline drawn in the grid frame. More... | |
void | setFramePenSize (const double width) |
Sets the width of the outline drawn in the grid frame. More... | |
void | setFrameSideFlag (const FrameSideFlag flag, bool on=true) |
Sets whether the grid frame is drawn for a certain side of the map item. More... | |
void | setFrameSideFlags (const FrameSideFlags &flags) |
Sets flags for grid frame sides. More... | |
void | setFrameStyle (const FrameStyle style) |
Sets the grid frame style. More... | |
void | setFrameWidth (const double width) |
Sets the grid frame width. More... | |
void | setGridLineColor (const QColor &color) |
Sets color of grid lines. More... | |
void | setGridLineWidth (const double width) |
Sets width of grid lines. More... | |
void | setIntervalX (const double interval) |
Sets the interval between grid lines in the x-direction. More... | |
void | setIntervalY (const double interval) |
Sets the interval between grid lines in the y-direction. More... | |
void | setLineSymbol (QgsLineSymbolV2 *symbol) |
Sets the line symbol used for drawing grid lines. More... | |
void | setMarkerSymbol (QgsMarkerSymbolV2 *symbol) |
Sets the marker symbol used for drawing grid points. More... | |
void | setOffsetX (const double offset) |
Sets the offset for grid lines in the x-direction. More... | |
void | setOffsetY (const double offset) |
Sets the offset for grid lines in the y-direction. More... | |
void | setStyle (const GridStyle style) |
Sets the grid style, which controls how the grid is drawn over the map's contents. More... | |
void | setUnits (const GridUnit unit) |
Sets the units to use for grid measurements such as the interval and offset for grid lines. More... | |
GridStyle | style () const |
Gets the grid's style, which controls how the grid is drawn over the map's contents. More... | |
bool | testFrameSideFlag (const FrameSideFlag flag) const |
Tests whether the grid frame should be drawn on a specified side of the map item. More... | |
GridUnit | units () const |
Gets the units used for grid measurements such as the interval and offset for grid lines. More... | |
bool | usesAdvancedEffects () const override |
Returns true if the item is drawn using advanced effects, such as blend modes. More... | |
bool | writeXML (QDomElement &elem, QDomDocument &doc) const override |
Stores grid state in DOM element. More... | |
Public Member Functions inherited from QgsComposerMapItem | |
QgsComposerMapItem (const QString &name, QgsComposerMap *map) | |
Constructor for QgsComposerMapItem. More... | |
virtual | ~QgsComposerMapItem () |
virtual const QgsComposerMap * | composerMap () const |
Get composer map for the item. More... | |
virtual bool | enabled () const |
Returns whether the item will be drawn. More... | |
QString | id () const |
Get the unique id for the map item. More... | |
virtual QString | name () const |
Get friendly display name for the item. More... | |
virtual void | setComposerMap (QgsComposerMap *map) |
Sets composer map for the item. More... | |
virtual void | setEnabled (const bool enabled) |
Controls whether the item will be drawn. More... | |
virtual void | setName (const QString &name) |
Sets the friendly display name for the item. More... | |
Public Member Functions inherited from QgsComposerObject | |
QgsComposerObject (QgsComposition *composition) | |
Constructor. More... | |
virtual | ~QgsComposerObject () |
const QgsComposition * | composition () const |
Returns the composition the item is attached to. More... | |
QgsComposition * | composition () |
QStringList | customProperties () const |
Return list of keys stored in custom properties for the object. More... | |
QVariant | customProperty (const QString &key, const QVariant &defaultValue=QVariant()) const |
Read a custom property from the object. More... | |
QgsDataDefined * | dataDefinedProperty (const DataDefinedProperty property) const |
Returns a reference to the data defined settings for one of the item's data defined properties. More... | |
void | removeCustomProperty (const QString &key) |
Remove a custom property from the object. More... | |
void | setCustomProperty (const QString &key, const QVariant &value) |
Set a custom property for the object. More... | |
void | setDataDefinedProperty (const DataDefinedProperty property, const bool active, const bool useExpression, const QString &expression, const QString &field) |
Sets parameters for a data defined property for the item. More... | |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Friends | |
class | TestQgsComposerMapGrid |
Additional Inherited Members | |
Public Slots inherited from QgsComposerObject | |
virtual void | refreshDataDefinedProperty (const DataDefinedProperty property=AllProperties, const QgsExpressionContext *context=nullptr) |
Refreshes a data defined property for the item by reevaluating the property's value and redrawing the item with this new value. More... | |
virtual void | repaint () |
Triggers a redraw for the item. More... | |
Signals inherited from QgsComposerObject | |
void | itemChanged () |
Emitted when the item changes. More... | |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Protected Member Functions inherited from QgsComposerObject | |
bool | dataDefinedEvaluate (const QgsComposerObject::DataDefinedProperty property, QVariant &expressionValue, const QgsExpressionContext &context=QgsExpressionContext()) const |
Evaluate a data defined property and return the calculated value. More... | |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Protected Attributes inherited from QgsComposerMapItem | |
QgsComposerMap * | mComposerMap |
Associated composer map. More... | |
bool | mEnabled |
True if item is to be displayed on map. More... | |
QString | mName |
Friendly display name. More... | |
QString | mUuid |
Unique id. More... | |
Protected Attributes inherited from QgsComposerObject | |
QgsComposition * | mComposition |
QgsObjectCustomProperties | mCustomProperties |
Custom properties for object. More... | |
QMap< QgsComposerObject::DataDefinedProperty, QString > | mDataDefinedNames |
Map of data defined properties for the item to string name to use when exporting item to xml. More... | |
Properties inherited from QObject | |
objectName | |
An individual grid which is drawn above the map content in a QgsComposerMap.
Definition at line 163 of file qgscomposermapgrid.h.
Annotation coordinate type.
Enumerator | |
---|---|
Longitude | coordinate is a longitude value |
Latitude | coordinate is a latitude value |
Definition at line 269 of file qgscomposermapgrid.h.
Direction of grid annotations.
Definition at line 211 of file qgscomposermapgrid.h.
Format for displaying grid annotations.
Definition at line 221 of file qgscomposermapgrid.h.
Position for grid annotations.
Enumerator | |
---|---|
InsideMapFrame | |
OutsideMapFrame | draw annotations outside the map frame |
Disabled | disable annotation
|
Definition at line 201 of file qgscomposermapgrid.h.
Border sides for annotations.
Enumerator | |
---|---|
Left | |
Right | right border |
Bottom | bottom border |
Top | top border |
Definition at line 236 of file qgscomposermapgrid.h.
Display settings for grid annotations and frames.
Definition at line 191 of file qgscomposermapgrid.h.
Flags for controlling which side of the map a frame is drawn on.
Enumerator | |
---|---|
FrameLeft | left side of map |
FrameRight | right side of map |
FrameTop | top side of map |
FrameBottom | bottom side of map |
Definition at line 258 of file qgscomposermapgrid.h.
Style for grid frame.
Definition at line 246 of file qgscomposermapgrid.h.
Grid drawing style.
Definition at line 181 of file qgscomposermapgrid.h.
Unit for grid values.
Enumerator | |
---|---|
MapUnit | grid units follow map units |
MM | grid units in millimeters |
CM | grid units in centimeters |
Definition at line 172 of file qgscomposermapgrid.h.
QgsComposerMapGrid::QgsComposerMapGrid | ( | const QString & | name, |
QgsComposerMap * | map | ||
) |
Constructor for QgsComposerMapGrid.
name | friendly display name for grid |
map | QgsComposerMap the grid is attached to |
Definition at line 166 of file qgscomposermapgrid.cpp.
|
virtual |
Definition at line 233 of file qgscomposermapgrid.cpp.
QgsComposerMapGrid::AnnotationDirection QgsComposerMapGrid::annotationDirection | ( | const BorderSide | border | ) | const |
Gets the direction for drawing frame annotations.
border | side of map for annotations |
Definition at line 2303 of file qgscomposermapgrid.cpp.
QgsComposerMapGrid::DisplayMode QgsComposerMapGrid::annotationDisplay | ( | const BorderSide | border | ) | const |
Gets the display mode for the grid annotations on a specified side of the map frame.
This property also specifies whether annotations have been disabled from a side of the map frame.
border | side of map for annotations |
Definition at line 2057 of file qgscomposermapgrid.cpp.
|
inline |
Gets whether annotations are shown for the grid.
Definition at line 548 of file qgscomposermapgrid.h.
|
inline |
Returns the expression used for drawing grid annotations.
This is only used when annotationFormat() is QgsComposerMapGrid::CustomFormat.
Definition at line 679 of file qgscomposermapgrid.h.
|
inline |
Gets the font used for drawing grid annotations.
Definition at line 560 of file qgscomposermapgrid.h.
|
inline |
Gets the font color used for drawing grid annotations.
Definition at line 572 of file qgscomposermapgrid.h.
|
inline |
Gets the format for drawing grid annotations.
Definition at line 663 of file qgscomposermapgrid.h.
|
inline |
Gets the distance between the map frame and annotations.
Units are in millimeters.
Definition at line 631 of file qgscomposermapgrid.h.
QgsComposerMapGrid::AnnotationPosition QgsComposerMapGrid::annotationPosition | ( | const BorderSide | border | ) | const |
Gets the position for the grid annotations on a specified side of the map frame.
border | side of map for annotations |
Definition at line 2287 of file qgscomposermapgrid.cpp.
|
inline |
Returns the coordinate precision for grid annotations.
Definition at line 584 of file qgscomposermapgrid.h.
|
inline |
Retrieves the blending mode used for drawing the grid.
Definition at line 324 of file qgscomposermapgrid.h.
void QgsComposerMapGrid::calculateMaxExtension | ( | double & | top, |
double & | right, | ||
double & | bottom, | ||
double & | left | ||
) |
Calculates the maximum distance the grid extends beyond the QgsComposerMap's item rect.
This method calculates the distance for each side of the map item separately
top | storage for top extension |
right | storage for right extension |
bottom | storage for bottom extension |
left | storage for left extension |
Definition at line 2083 of file qgscomposermapgrid.cpp.
|
overridevirtual |
Creates an expression context relating to the objects' current state.
The context includes scopes for global, project and composition properties.
Reimplemented from QgsComposerObject.
Definition at line 2237 of file qgscomposermapgrid.cpp.
|
inline |
Retrieves the length of the cross segments drawn for the grid.
This is only used for grids with QgsComposerMapGrid::Cross styles
Definition at line 458 of file qgscomposermapgrid.h.
|
inline |
Retrieves the CRS for the grid.
Definition at line 312 of file qgscomposermapgrid.h.
|
overridevirtual |
Draws a grid.
painter | destination QPainter |
Implements QgsComposerMapItem.
Definition at line 639 of file qgscomposermapgrid.cpp.
QgsComposerMapGrid::DisplayMode QgsComposerMapGrid::frameDivisions | ( | const BorderSide | border | ) | const |
Gets the type of grid divisions which are used for frames on a specified side of the map.
border | side of map for frame |
Definition at line 2350 of file qgscomposermapgrid.cpp.
|
inline |
Retrieves the first fill color for the grid frame.
Definition at line 812 of file qgscomposermapgrid.h.
|
inline |
Retrieves the second fill color for the grid frame.
Definition at line 828 of file qgscomposermapgrid.h.
|
inline |
Retrieves the color of the outline drawn in the grid frame.
Definition at line 796 of file qgscomposermapgrid.h.
|
inline |
Retrieves the width of the outline drawn in the grid frame.
Definition at line 778 of file qgscomposermapgrid.h.
QgsComposerMapGrid::FrameSideFlags QgsComposerMapGrid::frameSideFlags | ( | ) | const |
Returns the flags which control which sides of the map item the grid frame is drawn on.
Definition at line 2232 of file qgscomposermapgrid.cpp.
|
inline |
Gets the grid frame style.
Definition at line 695 of file qgscomposermapgrid.h.
|
inline |
Gets the grid frame width.
This property controls how wide the grid frame is. The size of the line outlines drawn in the frame can be retrieved via the framePenSize method.
Definition at line 764 of file qgscomposermapgrid.h.
|
inline |
Gets the interval between grid lines in the x-direction.
The units are retrieved through the units() method.
Definition at line 378 of file qgscomposermapgrid.h.
|
inline |
Gets the interval between grid lines in the y-direction.
The units are retrieved through the units() method.
Definition at line 394 of file qgscomposermapgrid.h.
|
inline |
Gets the line symbol used for drawing grid lines.
This is only used for grids with QgsComposerMapGrid::Solid or QgsComposerMapGrid::Cross styles.
Definition at line 495 of file qgscomposermapgrid.h.
|
inline |
Gets the line symbol used for drawing grid lines.
This is only used for grids with QgsComposerMapGrid::Solid or QgsComposerMapGrid::Cross styles.
Definition at line 504 of file qgscomposermapgrid.h.
|
inline |
Gets the marker symbol used for drawing grid points.
This is only used for grids with a QgsComposerMapGrid::Markers style.
Definition at line 523 of file qgscomposermapgrid.h.
|
inline |
Gets the marker symbol used for drawing grid points.
This is only used for grids with a QgsComposerMapGrid::Markers style.
Definition at line 532 of file qgscomposermapgrid.h.
double QgsComposerMapGrid::maxExtension | ( | ) |
Calculates the maximum distance the grid extends beyond the QgsComposerMap's item rect.
Definition at line 2073 of file qgscomposermapgrid.cpp.
|
inline |
Gets the offset for grid lines in the x-direction.
The units are retrieved through the units() method.
Definition at line 410 of file qgscomposermapgrid.h.
|
inline |
Gets the offset for grid lines in the y-direction.
The units are retrieved through the units() method.
Definition at line 426 of file qgscomposermapgrid.h.
|
overridevirtual |
Sets grid state from a DOM document.
itemElem | is DOM node corresponding to a 'ComposerMapGrid' tag |
doc | is DOM document |
Reimplemented from QgsComposerMapItem.
Definition at line 343 of file qgscomposermapgrid.cpp.
void QgsComposerMapGrid::setAnnotationDirection | ( | const AnnotationDirection | direction, |
const BorderSide | border | ||
) |
Sets the direction for drawing frame annotations.
direction | direction for frame annotations |
border | side of map for annotations |
Definition at line 2192 of file qgscomposermapgrid.cpp.
void QgsComposerMapGrid::setAnnotationDirection | ( | const AnnotationDirection | direction | ) |
Sets the direction for drawing all frame annotations.
direction | direction for frame annotations |
Definition at line 2252 of file qgscomposermapgrid.cpp.
void QgsComposerMapGrid::setAnnotationDisplay | ( | const DisplayMode | display, |
const BorderSide | border | ||
) |
Sets what types of grid annotations should be drawn for a specified side of the map frame, or whether grid annotations should be disabled for the side.
display | display mode for annotations |
border | side of map for annotations |
Definition at line 2030 of file qgscomposermapgrid.cpp.
|
inline |
Sets whether annotations should be shown for the grid.
enabled | set to true to draw annotations for the grid |
Definition at line 542 of file qgscomposermapgrid.h.
|
inline |
Sets the expression used for drawing grid annotations.
This is only used when annotationFormat() is QgsComposerMapGrid::CustomFormat.
expression | expression for evaluating custom grid annotations |
Definition at line 671 of file qgscomposermapgrid.h.
|
inline |
Sets the font used for drawing grid annotations.
font | font for annotations |
Definition at line 554 of file qgscomposermapgrid.h.
|
inline |
Sets the font color used for drawing grid annotations.
color | font color for annotations |
Definition at line 566 of file qgscomposermapgrid.h.
|
inline |
Sets the format for drawing grid annotations.
format | format for grid annotations |
Definition at line 657 of file qgscomposermapgrid.h.
|
inline |
Sets the distance between the map frame and annotations.
Units are in millimeters.
distance | margin between map frame and annotations |
Definition at line 625 of file qgscomposermapgrid.h.
void QgsComposerMapGrid::setAnnotationPosition | ( | const AnnotationPosition | position, |
const BorderSide | border | ||
) |
Sets the position for the grid annotations on a specified side of the map frame.
position | position to draw grid annotations |
border | side of map for annotations |
Definition at line 2260 of file qgscomposermapgrid.cpp.
|
inline |
Sets the coordinate precision for grid annotations.
precision | number of decimal places to show when drawing grid annotations |
Definition at line 578 of file qgscomposermapgrid.h.
|
inline |
Sets the blending mode used for drawing the grid.
mode | blending mode for grid |
Definition at line 318 of file qgscomposermapgrid.h.
|
inline |
Sets the length of the cross segments drawn for the grid.
This is only used for grids with QgsComposerMapGrid::Cross styles
length | cross length in millimeters |
Definition at line 451 of file qgscomposermapgrid.h.
void QgsComposerMapGrid::setCrs | ( | const QgsCoordinateReferenceSystem & | crs | ) |
Sets the CRS for the grid.
crs | coordinate reference system for grid |
Definition at line 459 of file qgscomposermapgrid.cpp.
void QgsComposerMapGrid::setFrameDivisions | ( | const DisplayMode | divisions, |
const BorderSide | border | ||
) |
Sets what type of grid divisions should be used for frames on a specified side of the map.
divisions | grid divisions for frame |
border | side of map for frame |
Definition at line 2324 of file qgscomposermapgrid.cpp.
|
inline |
Sets the first fill color used for the grid frame.
color | first fill color for grid frame |
Definition at line 804 of file qgscomposermapgrid.h.
|
inline |
Sets the second fill color used for the grid frame.
color | second fill color for grid frame |
Definition at line 820 of file qgscomposermapgrid.h.
|
inline |
Sets the color of the outline drawn in the grid frame.
color | color of grid frame outline |
Definition at line 787 of file qgscomposermapgrid.h.
|
inline |
Sets the width of the outline drawn in the grid frame.
width | width of grid frame outline |
Definition at line 771 of file qgscomposermapgrid.h.
void QgsComposerMapGrid::setFrameSideFlag | ( | const FrameSideFlag | flag, |
bool | on = true |
||
) |
Sets whether the grid frame is drawn for a certain side of the map item.
flag | flag for grid frame side |
on | set to true to draw grid frame on that side of the map |
Definition at line 2224 of file qgscomposermapgrid.cpp.
void QgsComposerMapGrid::setFrameSideFlags | ( | const FrameSideFlags & | flags | ) |
Sets flags for grid frame sides.
Setting these flags controls which sides of the map item the grid frame is drawn on.
flags | flags for grid frame sides |
Definition at line 2219 of file qgscomposermapgrid.cpp.
|
inline |
Sets the grid frame style.
style | style for grid frame |
Definition at line 689 of file qgscomposermapgrid.h.
|
inline |
Sets the grid frame width.
This property controls how wide the grid frame is. The size of the line outlines drawn in the frame is controlled through the setFramePenSize method.
width | width of grid frame in millimeters |
Definition at line 756 of file qgscomposermapgrid.h.
void QgsComposerMapGrid::setGridLineColor | ( | const QColor & | color | ) |
Sets color of grid lines.
This is only used for grids with QgsComposerMapGrid::Solid or QgsComposerMapGrid::Cross styles. For more control over grid line appearance, use setLineSymbol instead.
color | color of grid lines |
Definition at line 267 of file qgscomposermapgrid.cpp.
void QgsComposerMapGrid::setGridLineWidth | ( | const double | width | ) |
Sets width of grid lines.
This is only used for grids with QgsComposerMapGrid::Solid or QgsComposerMapGrid::Cross styles. For more control over grid line appearance, use setLineSymbol instead.
width | grid line width |
Definition at line 259 of file qgscomposermapgrid.cpp.
void QgsComposerMapGrid::setIntervalX | ( | const double | interval | ) |
Sets the interval between grid lines in the x-direction.
The units are controlled through the setUnits method
interval | interval between horizontal grid lines |
Definition at line 2142 of file qgscomposermapgrid.cpp.
void QgsComposerMapGrid::setIntervalY | ( | const double | interval | ) |
Sets the interval between grid lines in the y-direction.
The units are controlled through the setUnits method
interval | interval between vertical grid lines |
Definition at line 2152 of file qgscomposermapgrid.cpp.
void QgsComposerMapGrid::setLineSymbol | ( | QgsLineSymbolV2 * | symbol | ) |
Sets the line symbol used for drawing grid lines.
This is only used for grids with QgsComposerMapGrid::Solid or QgsComposerMapGrid::Cross styles.
symbol | line symbol for grid lines |
Definition at line 2018 of file qgscomposermapgrid.cpp.
void QgsComposerMapGrid::setMarkerSymbol | ( | QgsMarkerSymbolV2 * | symbol | ) |
Sets the marker symbol used for drawing grid points.
This is only used for grids with a QgsComposerMapGrid::Markers style.
symbol | marker symbol for grid intersection points |
Definition at line 2024 of file qgscomposermapgrid.cpp.
void QgsComposerMapGrid::setOffsetX | ( | const double | offset | ) |
Sets the offset for grid lines in the x-direction.
The units are controlled through the setUnits method
offset | offset for horizontal grid lines |
Definition at line 2162 of file qgscomposermapgrid.cpp.
void QgsComposerMapGrid::setOffsetY | ( | const double | offset | ) |
Sets the offset for grid lines in the y-direction.
The units are controlled through the setUnits method
offset | offset for vertical grid lines |
Definition at line 2172 of file qgscomposermapgrid.cpp.
void QgsComposerMapGrid::setStyle | ( | const GridStyle | style | ) |
Sets the grid style, which controls how the grid is drawn over the map's contents.
style | desired grid style |
Definition at line 2182 of file qgscomposermapgrid.cpp.
void QgsComposerMapGrid::setUnits | ( | const GridUnit | unit | ) |
Sets the units to use for grid measurements such as the interval and offset for grid lines.
unit | unit for grid measurements |
Definition at line 2132 of file qgscomposermapgrid.cpp.
|
inline |
Gets the grid's style, which controls how the grid is drawn over the map's contents.
Definition at line 444 of file qgscomposermapgrid.h.
bool QgsComposerMapGrid::testFrameSideFlag | ( | const FrameSideFlag | flag | ) | const |
Tests whether the grid frame should be drawn on a specified side of the map item.
flag | flag for grid frame side |
Definition at line 2247 of file qgscomposermapgrid.cpp.
|
inline |
Gets the units used for grid measurements such as the interval and offset for grid lines.
Definition at line 362 of file qgscomposermapgrid.h.
|
overridevirtual |
Returns true if the item is drawn using advanced effects, such as blend modes.
Reimplemented from QgsComposerMapItem.
Definition at line 465 of file qgscomposermapgrid.cpp.
|
overridevirtual |
Stores grid state in DOM element.
elem | is DOM element corresponding to a 'ComposerMap' tag |
doc | DOM document |
Reimplemented from QgsComposerMapItem.
Definition at line 275 of file qgscomposermapgrid.cpp.
|
friend |
Definition at line 1039 of file qgscomposermapgrid.h.