18 #ifndef QGSCOMPOSERMAPGRID_H    19 #define QGSCOMPOSERMAPGRID_H    72     void removeGrid( 
const QString& gridId );
    80     void moveGridUp( 
const QString& gridId );
    88     void moveGridDown( 
const QString& gridId );
   137     double maxGridExtension() 
const;
   149     void calculateMaxGridExtension( 
double& top, 
double& right, 
double& bottom, 
double& left ) 
const;
   318     void setBlendMode( 
const QPainter::CompositionMode mode ) { mBlendMode = mode; }
   324     QPainter::CompositionMode 
blendMode()
 const { 
return mBlendMode; }
   332     double maxExtension();
   344     void calculateMaxExtension( 
double& top, 
double& right, 
double& bottom, 
double& left );
   355     void setUnits( 
const GridUnit unit );
   370     void setIntervalX( 
const double interval );
   386     void setIntervalY( 
const double interval );
   402     void setOffsetX( 
const double offset );
   410     double offsetX()
 const { 
return mGridOffsetX; }
   418     void setOffsetY( 
const double offset );
   426     double offsetY()
 const { 
return mGridOffsetY; }
   467     void setGridLineWidth( 
const double width );
   476     void setGridLineColor( 
const QColor& color );
   720     void setFrameSideFlags( 
const FrameSideFlags& flags );
   729     void setFrameSideFlag( 
const FrameSideFlag flag, 
bool on = 
true );
   738     FrameSideFlags frameSideFlags() 
const;
   838       GridExtension() : top( 0.0 ), right( 0.0 ), bottom( 0.0 ), left( 0.0 ) {}
   846     bool mTransformDirty;
   851     double mGridIntervalX;
   853     double mGridIntervalY;
   859     QFont mGridAnnotationFont;
   861     QColor mGridAnnotationFontColor;
   863     int mGridAnnotationPrecision;
   865     bool mShowGridAnnotation;
   886     double mAnnotationFrameDistance;
   898     QString mGridAnnotationExpressionString;
   902     FrameSideFlags mGridFrameSides;
   903     double mGridFrameWidth;
   904     double mGridFramePenThickness;
   905     QColor mGridFramePenColor;
   906     QColor mGridFrameFillColor1;
   907     QColor mGridFrameFillColor2;
   926     QPainter::CompositionMode mBlendMode;
   934     class QgsMapAnnotation
  1017     void createDefaultGridLineSymbol();
  1019     void createDefaultGridMarkerSymbol();
  1027     void drawGridFrameLineBorder( 
QPainter *p, 
BorderSide border, 
double* extension = 
nullptr ) 
const;
  1029     void calculateCRSTransformLines();
  1034     friend class TestQgsComposerMapGrid;
  1037 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsComposerMapGrid::FrameSideFlags )
  1039 #endif // QGSCOMPOSERMAPGRID_H QColor frameFillColor1() const 
Retrieves the first fill color for the grid frame. 
 
A rectangle specified with double values. 
 
const QgsMarkerSymbolV2 * markerSymbol() const 
Gets the marker symbol used for drawing grid points. 
 
double intervalX() const 
Gets the interval between grid lines in the x-direction. 
 
void setBlendMode(const QPainter::CompositionMode mode)
Sets the blending mode used for drawing the grid. 
 
GridStyle
Grid drawing style. 
 
virtual void draw(QPainter *painter)=0
Draws the item on to a painter. 
 
const QgsLineSymbolV2 * lineSymbol() const 
Gets the line symbol used for drawing grid lines. 
 
void setFramePenSize(const double width)
Sets the width of the outline drawn in the grid frame. 
 
A collection of grids which is drawn above the map content in a QgsComposerMap. 
 
FrameStyle
Style for grid frame. 
 
double annotationFrameDistance() const 
Gets the distance between the map frame and annotations. 
 
QColor frameFillColor2() const 
Retrieves the second fill color for the grid frame. 
 
void setAnnotationExpression(const QString &expression)
Sets the expression used for drawing grid annotations. 
 
FrameStyle frameStyle() const 
Gets the grid frame style. 
 
void setAnnotationFont(const QFont &font)
Sets the font used for drawing grid annotations. 
 
QColor framePenColor() const 
Retrieves the color of the outline drawn in the grid frame. 
 
AnnotationDirection
Direction of grid annotations. 
 
QgsMarkerSymbolV2 * markerSymbol()
Gets the marker symbol used for drawing grid points. 
 
AnnotationFormat annotationFormat() const 
Gets the format for drawing grid annotations. 
 
AnnotationFormat
Format for displaying grid annotations. 
 
An item which is drawn inside a QgsComposerMap, eg a grid or map overview. 
 
double intervalY() const 
Gets the interval between grid lines in the y-direction. 
 
void setCrossLength(const double length)
Sets the length of the cross segments drawn for the grid. 
 
QFont annotationFont() const 
Gets the font used for drawing grid annotations. 
 
virtual QgsExpressionContext * createExpressionContext() const 
Creates an expression context relating to the objects' current state. 
 
QList< QgsComposerMapItem * > asList() const 
Returns a list of QgsComposerMapItems contained by the stack. 
 
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
 
DisplayMode
Display settings for grid annotations and frames. 
 
void setAnnotationFormat(const AnnotationFormat format)
Sets the format for drawing grid annotations. 
 
AnnotationPosition
Position for grid annotations. 
 
double offsetX() const 
Gets the offset for grid lines in the x-direction. 
 
void setAnnotationEnabled(const bool enabled)
Sets whether annotations should be shown for the grid. 
 
QgsComposerMapItem & operator[](int idx)
Returns a reference to an item within the stack. 
 
GridStyle style() const 
Gets the grid's style, which controls how the grid is drawn over the map's contents. 
 
FrameSideFlag
Flags for controlling which side of the map a frame is drawn on. 
 
An individual grid which is drawn above the map content in a QgsComposerMap. 
 
QgsLineSymbolV2 * lineSymbol()
Gets the line symbol used for drawing grid lines. 
 
double offsetY() const 
Gets the offset for grid lines in the y-direction. 
 
double framePenSize() const 
Retrieves the width of the outline drawn in the grid frame. 
 
GridUnit units() const 
Gets the units used for grid measurements such as the interval and offset for grid lines...
 
void setFrameWidth(const double width)
Sets the grid frame width. 
 
void setAnnotationFontColor(const QColor &color)
Sets the font color used for drawing grid annotations. 
 
Object representing map window. 
 
BorderSide
Border sides for annotations. 
 
void setFrameFillColor1(const QColor &color)
Sets the first fill color used for the grid frame. 
 
void setFramePenColor(const QColor &color)
Sets the color of the outline drawn in the grid frame. 
 
int annotationPrecision() const 
Returns the coordinate precision for grid annotations. 
 
QPainter::CompositionMode blendMode() const 
Retrieves the blending mode used for drawing the grid. 
 
QString annotationExpression() const 
Returns the expression used for drawing grid annotations. 
 
virtual bool enabled() const 
Returns whether the item will be drawn. 
 
QColor annotationFontColor() const 
Gets the font color used for drawing grid annotations. 
 
Contains information about the context of a rendering operation. 
 
A collection of map items which are drawn above the map content in a QgsComposerMap. 
 
Class for storing a coordinate reference system (CRS) 
 
void setAnnotationPrecision(const int precision)
Sets the coordinate precision for grid annotations. 
 
bool annotationEnabled() const 
Gets whether annotations are shown for the grid. 
 
double crossLength() const 
Retrieves the length of the cross segments drawn for the grid. 
 
virtual bool readXML(const QDomElement &itemElem, const QDomDocument &doc) override
Sets map item state from a DOM document. 
 
virtual bool usesAdvancedEffects() const 
Returns true if the item is drawn using advanced effects, such as blend modes. 
 
void setFrameFillColor2(const QColor &color)
Sets the second fill color used for the grid frame. 
 
void setFrameStyle(const FrameStyle style)
Sets the grid frame style. 
 
virtual bool writeXML(QDomElement &elem, QDomDocument &doc) const override
Stores map item state in DOM element. 
 
virtual bool readXML(const QDomElement &elem, const QDomDocument &doc)=0
Sets the item stack's state from a DOM document. 
 
QgsCoordinateReferenceSystem crs() const 
Retrieves the CRS for the grid. 
 
GridUnit
Unit for grid values. 
 
AnnotationCoordinate
Annotation coordinate type. 
 
void setAnnotationFrameDistance(const double distance)
Sets the distance between the map frame and annotations. 
 
double frameWidth() const 
Gets the grid frame width.