Skip to content

Commit 6097e58

Browse files
committedJul 10, 2014
Merge branch 'composer_grid_master'
2 parents 9abeeb6 + 0525c01 commit 6097e58

10 files changed

+3340
-1934
lines changed
 

‎src/app/composer/qgscomposermapwidget.cpp

Lines changed: 690 additions & 429 deletions
Large diffs are not rendered by default.

‎src/app/composer/qgscomposermapwidget.h

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,44 @@ class QgsComposerMapWidget: public QgsComposerItemBaseWidget, private Ui::QgsCom
5656
void on_mYMinLineEdit_editingFinished();
5757
void on_mYMaxLineEdit_editingFinished();
5858

59+
void on_mAtlasMarginRadio_toggled( bool checked );
60+
61+
void on_mAtlasCheckBox_toggled( bool checked );
62+
void on_mAtlasMarginSpinBox_valueChanged( int value );
63+
void on_mAtlasFixedScaleRadio_toggled( bool checked );
64+
void on_mAtlasPredefinedScaleRadio_toggled( bool checked );
65+
66+
void on_mAddGridPushButton_clicked();
67+
void on_mRemoveGridPushButton_clicked();
68+
void on_mGridUpButton_clicked();
69+
void on_mGridDownButton_clicked();
70+
71+
QgsComposerMapGrid* currentGrid();
5972
void on_mGridCheckBox_toggled( bool state );
73+
void on_mGridListWidget_currentItemChanged( QListWidgetItem* current, QListWidgetItem* previous );
74+
void on_mGridListWidget_itemChanged( QListWidgetItem* item );
75+
void setGridItemsEnabled( bool enabled );
76+
void setGridItems( const QgsComposerMapGrid* grid );
77+
void blockGridItemsSignals( bool block );
78+
void updateLineSymbolMarker( const QgsComposerMapGrid* grid );
79+
void on_mGridLineStyleButton_clicked();
6080
void on_mIntervalXSpinBox_editingFinished();
6181
void on_mIntervalYSpinBox_editingFinished();
62-
void on_mOffsetXSpinBox_editingFinished();
63-
void on_mOffsetYSpinBox_editingFinished();
64-
void on_mGridLineStyleButton_clicked();
82+
void on_mOffsetXSpinBox_valueChanged( double value );
83+
void on_mOffsetYSpinBox_valueChanged( double value );
84+
void on_mCrossWidthSpinBox_valueChanged( double val );
85+
void on_mFrameWidthSpinBox_valueChanged( double val );
86+
void on_mFrameStyleComboBox_currentIndexChanged( const QString& text );
87+
void on_mGridFramePenSizeSpinBox_valueChanged( double d );
88+
void on_mGridFramePenColorButton_colorChanged( const QColor& newColor );
89+
void on_mGridFrameFill1ColorButton_colorChanged( const QColor& newColor );
90+
void on_mGridFrameFill2ColorButton_colorChanged( const QColor& newColor );
6591
void on_mGridTypeComboBox_currentIndexChanged( const QString& text );
66-
void on_mCrossWidthSpinBox_valueChanged( double d );
92+
void on_mMapGridCRSButton_clicked();
93+
void on_mMapGridUnitComboBox_currentIndexChanged( const QString& text );
6794
void on_mGridBlendComboBox_currentIndexChanged( int index );
68-
void on_mAnnotationFontButton_clicked();
69-
void on_mAnnotationFontColorButton_colorChanged( const QColor& newFontColor );
70-
void on_mDistanceToMapFrameSpinBox_valueChanged( double d );
71-
72-
void on_mAnnotationFormatComboBox_currentIndexChanged( int index );
7395

96+
void on_mDrawAnnotationGroupBox_toggled( bool state );
7497
//annotation position
7598
void on_mAnnotationPositionLeftComboBox_currentIndexChanged( const QString& text );
7699
void on_mAnnotationPositionRightComboBox_currentIndexChanged( const QString& text );
@@ -83,22 +106,11 @@ class QgsComposerMapWidget: public QgsComposerItemBaseWidget, private Ui::QgsCom
83106
void on_mAnnotationDirectionComboBoxTop_currentIndexChanged( const QString& text );
84107
void on_mAnnotationDirectionComboBoxBottom_currentIndexChanged( const QString& text );
85108

86-
void on_mDrawAnnotationCheckableGroupBox_toggled( bool state );
109+
void on_mAnnotationFormatComboBox_currentIndexChanged( int index );
87110
void on_mCoordinatePrecisionSpinBox_valueChanged( int value );
88-
89-
void on_mFrameStyleComboBox_currentIndexChanged( const QString& text );
90-
void on_mFrameWidthSpinBox_valueChanged( double d );
91-
void on_mGridFramePenSizeSpinBox_valueChanged( double d );
92-
void on_mGridFramePenColorButton_colorChanged( const QColor& newColor );
93-
void on_mGridFrameFill1ColorButton_colorChanged( const QColor& newColor );
94-
void on_mGridFrameFill2ColorButton_colorChanged( const QColor& newColor );
95-
96-
void on_mAtlasMarginRadio_toggled( bool checked );
97-
98-
void on_mAtlasCheckBox_toggled( bool checked );
99-
void on_mAtlasMarginSpinBox_valueChanged( int value );
100-
void on_mAtlasFixedScaleRadio_toggled( bool checked );
101-
void on_mAtlasPredefinedScaleRadio_toggled( bool checked );
111+
void on_mDistanceToMapFrameSpinBox_valueChanged( double d );
112+
void on_mAnnotationFontButton_clicked();
113+
void on_mAnnotationFontColorButton_colorChanged( const QColor &color );
102114

103115
protected:
104116
void showEvent( QShowEvent * event );
@@ -149,9 +161,6 @@ class QgsComposerMapWidget: public QgsComposerItemBaseWidget, private Ui::QgsCom
149161
/**Updates the map combo box with the current composer map ids*/
150162
void refreshMapComboBox();
151163

152-
/**Enables/disables grid frame related controls*/
153-
void toggleFrameControls( bool frameEnabled );
154-
155164
/**Enables or disables the atlas margin and predefined scales radio depending on the atlas coverage layer type*/
156165
void toggleAtlasScalingOptionsByLayerType();
157166

@@ -161,6 +170,9 @@ class QgsComposerMapWidget: public QgsComposerItemBaseWidget, private Ui::QgsCom
161170
/**Is there some predefined scales, globally or as project's options ?*/
162171
bool hasPredefinedScales() const;
163172

173+
QListWidgetItem* addGridListItem( const QString& id, const QString& name );
174+
175+
void loadGridEntries();
164176
};
165177

166178
#endif

‎src/core/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ SET(QGIS_CORE_SRCS
168168
composer/qgscomposerlegenditem.cpp
169169
composer/qgscomposerpicture.cpp
170170
composer/qgscomposermap.cpp
171+
composer/qgscomposermapgrid.cpp
171172
composer/qgscomposertable.cpp
172173
composer/qgscomposertablecolumn.cpp
173174
composer/qgscomposerattributetable.cpp

‎src/core/composer/qgscomposeritem.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,12 +863,13 @@ void QgsComposerItem::setEffectsEnabled( bool effectsEnabled )
863863
mEffect->setEnabled( effectsEnabled );
864864
}
865865

866-
void QgsComposerItem::drawText( QPainter* p, double x, double y, const QString& text, const QFont& font ) const
866+
void QgsComposerItem::drawText( QPainter* p, double x, double y, const QString& text, const QFont& font, const QColor& c ) const
867867
{
868868
QFont textFont = scaledFontPixelSize( font );
869869

870870
p->save();
871871
p->setFont( textFont );
872+
p->setPen( c );
872873
double scaleFactor = 1.0 / FONT_WORKAROUND_SCALE;
873874
p->scale( scaleFactor, scaleFactor );
874875
p->drawText( QPointF( x * FONT_WORKAROUND_SCALE, y * FONT_WORKAROUND_SCALE ), text );

‎src/core/composer/qgscomposeritem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ class CORE_EXPORT QgsComposerItem: public QObject, public QGraphicsRectItem
378378

379379
/**Draws Text. Takes care about all the composer specific issues (calculation to pixel, scaling of font and painter
380380
to work around the Qt font bug)*/
381-
void drawText( QPainter* p, double x, double y, const QString& text, const QFont& font ) const;
381+
void drawText( QPainter* p, double x, double y, const QString& text, const QFont& font, const QColor& c = QColor( 0, 0, 0 ) ) const;
382382

383383
/**Like the above, but with a rectangle for multiline text
384384
* @param p painter to use

‎src/core/composer/qgscomposermap.cpp

Lines changed: 435 additions & 933 deletions
Large diffs are not rendered by default.

‎src/core/composer/qgscomposermap.h

Lines changed: 79 additions & 132 deletions
Large diffs are not rendered by default.

‎src/core/composer/qgscomposermapgrid.cpp

Lines changed: 1273 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 308 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,308 @@
1+
/***************************************************************************
2+
qgscomposermapgrid.h
3+
--------------------
4+
begin : December 2013
5+
copyright : (C) 2013 by Marco Hugentobler
6+
email : marco dot hugentobler at sourcepole dot ch
7+
***************************************************************************/
8+
9+
/***************************************************************************
10+
* *
11+
* This program is free software; you can redistribute it and/or modify *
12+
* it under the terms of the GNU General Public License as published by *
13+
* the Free Software Foundation; either version 2 of the License, or *
14+
* (at your option) any later version. *
15+
* *
16+
***************************************************************************/
17+
18+
#ifndef QGSCOMPOSERMAPGRID_H
19+
#define QGSCOMPOSERMAPGRID_H
20+
21+
#include "qgscoordinatereferencesystem.h"
22+
#include "qgscomposermap.h"
23+
#include <QString>
24+
25+
class QgsCoordinateTransform;
26+
class QgsLineSymbolV2;
27+
class QDomDocument;
28+
class QDomElement;
29+
class QPainter;
30+
31+
class CORE_EXPORT QgsComposerMapGrid
32+
{
33+
public:
34+
35+
enum GridUnit
36+
{
37+
MapUnit,
38+
MM,
39+
CM
40+
};
41+
42+
QgsComposerMapGrid( const QString& name, QgsComposerMap* map );
43+
~QgsComposerMapGrid();
44+
45+
/** \brief Reimplementation of QCanvasItem::paint*/
46+
void drawGrid( QPainter* painter ) const;
47+
48+
/**Draws grid if CRS is different to map CRS*/
49+
void drawGridCRSTransform( QPainter* painter ) const;
50+
51+
/** stores state in Dom element
52+
* @param elem is Dom element corresponding to 'ComposerMap' tag
53+
* @param doc Dom document
54+
*/
55+
bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
56+
57+
/** sets state from Dom document
58+
* @param itemElem is Dom node corresponding to item tag
59+
* @param doc is Dom document
60+
*/
61+
bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
62+
63+
//setters and getters
64+
void setComposerMap( QgsComposerMap* map );
65+
const QgsComposerMap* composerMap() const { return mComposerMap; }
66+
67+
void setName( const QString& name ) { mName = name; }
68+
QString name() const { return mName; }
69+
70+
QString id() const { return mUuid; }
71+
72+
/**Enables a coordinate grid that is shown on top of this composermap.
73+
@note this function was added in version 1.4*/
74+
void setGridEnabled( bool enabled ) {mGridEnabled = enabled;}
75+
bool gridEnabled() const { return mGridEnabled; }
76+
77+
/**Sets coordinate grid style to solid or cross
78+
@note this function was added in version 1.4*/
79+
void setGridStyle( QgsComposerMap::GridStyle style ) {mGridStyle = style;}
80+
QgsComposerMap::GridStyle gridStyle() const { return mGridStyle; }
81+
82+
/**Sets coordinate interval in x-direction for composergrid.
83+
@note this function was added in version 1.4*/
84+
void setGridIntervalX( double interval ) { mGridIntervalX = interval;}
85+
double gridIntervalX() const { return mGridIntervalX; }
86+
87+
/**Sets coordinate interval in y-direction for composergrid.
88+
@note this function was added in version 1.4*/
89+
void setGridIntervalY( double interval ) { mGridIntervalY = interval;}
90+
double gridIntervalY() const { return mGridIntervalY; }
91+
92+
/**Sets x-coordinate offset for composer grid
93+
@note this function was added in version 1.4*/
94+
void setGridOffsetX( double offset ) { mGridOffsetX = offset; }
95+
double gridOffsetX() const { return mGridOffsetX; }
96+
97+
/**Sets y-coordinate offset for composer grid
98+
@note this function was added in version 1.4*/
99+
void setGridOffsetY( double offset ) { mGridOffsetY = offset; }
100+
double gridOffsetY() const { return mGridOffsetY; }
101+
102+
/**Sets the pen to draw composer grid
103+
@note this function was added in version 1.4*/
104+
void setGridPen( const QPen& p );
105+
QPen gridPen() const;
106+
107+
/**Sets with of grid pen
108+
@note this function was added in version 1.4*/
109+
void setGridPenWidth( double w );
110+
111+
/**Sets the color of the grid pen
112+
@note this function was added in version 1.4*/
113+
void setGridPenColor( const QColor& c );
114+
115+
/**Sets font for grid annotations
116+
@note this function was added in version 1.4*/
117+
void setGridAnnotationFont( const QFont& f ) { mGridAnnotationFont = f; }
118+
QFont gridAnnotationFont() const { return mGridAnnotationFont; }
119+
120+
void setGridAnnotationFontColor( const QColor& c ) { mGridAnnotationFontColor = c; }
121+
QColor gridAnnotationFontColor() const { return mGridAnnotationFontColor; }
122+
123+
/**Sets coordinate precision for grid annotations
124+
@note this function was added in version 1.4*/
125+
void setGridAnnotationPrecision( int p ) {mGridAnnotationPrecision = p;}
126+
int gridAnnotationPrecision() const {return mGridAnnotationPrecision;}
127+
128+
/**Sets flag if grid annotation should be shown
129+
@note this function was added in version 1.4*/
130+
void setShowGridAnnotation( bool show ) {mShowGridAnnotation = show;}
131+
bool showGridAnnotation() const {return mShowGridAnnotation;}
132+
133+
void setGridAnnotationPosition( QgsComposerMap::GridAnnotationPosition p, QgsComposerMap::Border border );
134+
QgsComposerMap::GridAnnotationPosition gridAnnotationPosition( QgsComposerMap::Border border ) const;
135+
136+
/**Sets distance between map frame and annotations
137+
@note this function was added in version 1.4*/
138+
void setAnnotationFrameDistance( double d ) {mAnnotationFrameDistance = d;}
139+
double annotationFrameDistance() const {return mAnnotationFrameDistance;}
140+
141+
void setGridAnnotationDirection( QgsComposerMap::GridAnnotationDirection d, QgsComposerMap::Border border );
142+
QgsComposerMap::GridAnnotationDirection gridAnnotationDirection( QgsComposerMap::Border border ) const;
143+
144+
/**Sets grid annotation direction. Can be horizontal, vertical, direction of axis and horizontal and vertical
145+
@note provides compatibility with 1.8 version*/
146+
void setGridAnnotationDirection( QgsComposerMap::GridAnnotationDirection d );
147+
QgsComposerMap::GridAnnotationDirection gridAnnotationDirection() const;
148+
149+
void setGridAnnotationFormat( QgsComposerMap::GridAnnotationFormat f ) { mGridAnnotationFormat = f; }
150+
QgsComposerMap::GridAnnotationFormat gridAnnotationFormat() const { return mGridAnnotationFormat; }
151+
152+
/**Set grid frame style (NoGridFrame or Zebra)
153+
@note: this function was added in version 1.9*/
154+
void setGridFrameStyle( QgsComposerMap::GridFrameStyle style ) { mGridFrameStyle = style; }
155+
QgsComposerMap::GridFrameStyle gridFrameStyle() const { return mGridFrameStyle; }
156+
157+
/**Set grid frame width
158+
@note: this function was added in version 1.9*/
159+
void setGridFrameWidth( double w ) { mGridFrameWidth = w; }
160+
double gridFrameWidth() const { return mGridFrameWidth; }
161+
162+
/**Set grid frame pen thickness
163+
@note: this function was added in version 2.1*/
164+
void setGridFramePenSize( double w ) { mGridFramePenThickness = w; }
165+
double gridFramePenSize() const { return mGridFramePenThickness; }
166+
167+
/**Sets pen color for grid frame
168+
@note: this function was added in version 2.1*/
169+
void setGridFramePenColor( const QColor& c ) { mGridFramePenColor = c;}
170+
/**Get pen color for grid frame
171+
@note: this function was added in version 2.1*/
172+
QColor gridFramePenColor() const {return mGridFramePenColor;}
173+
174+
/**Sets first fill color for grid zebra frame
175+
@note: this function was added in version 2.1*/
176+
void setGridFrameFillColor1( const QColor& c ) { mGridFrameFillColor1 = c;}
177+
/**Get first fill color for grid zebra frame
178+
@note: this function was added in version 2.1*/
179+
QColor gridFrameFillColor1() const {return mGridFrameFillColor1;}
180+
181+
/**Sets second fill color for grid zebra frame
182+
@note: this function was added in version 2.1*/
183+
void setGridFrameFillColor2( const QColor& c ) { mGridFrameFillColor2 = c;}
184+
/**Get second fill color for grid zebra frame
185+
@note: this function was added in version 2.1*/
186+
QColor gridFrameFillColor2() const {return mGridFrameFillColor2;}
187+
188+
/**Sets length of the cros segments (if grid style is cross)
189+
@note this function was added in version 1.4*/
190+
void setCrossLength( double l ) {mCrossLength = l;}
191+
double crossLength() const {return mCrossLength;}
192+
193+
void setGridLineSymbol( QgsLineSymbolV2* symbol );
194+
const QgsLineSymbolV2* gridLineSymbol() const { return mGridLineSymbol; }
195+
QgsLineSymbolV2* gridLineSymbol() { return mGridLineSymbol; }
196+
197+
void setCrs( const QgsCoordinateReferenceSystem& crs ) { mCRS = crs; }
198+
QgsCoordinateReferenceSystem crs() const { return mCRS; }
199+
200+
void setGridUnit( GridUnit u ) { mGridUnit = u; }
201+
GridUnit gridUnit() const { return mGridUnit; }
202+
203+
void setBlendMode( QPainter::CompositionMode mode ) { mBlendMode = mode; }
204+
QPainter::CompositionMode blendMode() const { return mBlendMode; }
205+
206+
double maxExtension() const;
207+
208+
private:
209+
QgsComposerMapGrid(); //forbidden
210+
211+
QgsComposerMap* mComposerMap;
212+
QString mName;
213+
QString mUuid;
214+
215+
/**True if coordinate grid has to be displayed*/
216+
bool mGridEnabled;
217+
/**Solid or crosses*/
218+
QgsComposerMap::GridStyle mGridStyle;
219+
/**Grid line interval in x-direction (map units)*/
220+
double mGridIntervalX;
221+
/**Grid line interval in y-direction (map units)*/
222+
double mGridIntervalY;
223+
/**Grid line offset in x-direction*/
224+
double mGridOffsetX;
225+
/**Grid line offset in y-direction*/
226+
double mGridOffsetY;
227+
/**Font for grid line annotation*/
228+
QFont mGridAnnotationFont;
229+
/**Font color for grid coordinates*/
230+
QColor mGridAnnotationFontColor;
231+
/**Digits after the dot*/
232+
int mGridAnnotationPrecision;
233+
/**True if coordinate values should be drawn*/
234+
bool mShowGridAnnotation;
235+
236+
/**Annotation position for left map side (inside / outside / not shown)*/
237+
QgsComposerMap::GridAnnotationPosition mLeftGridAnnotationPosition;
238+
/**Annotation position for right map side (inside / outside / not shown)*/
239+
QgsComposerMap::GridAnnotationPosition mRightGridAnnotationPosition;
240+
/**Annotation position for top map side (inside / outside / not shown)*/
241+
QgsComposerMap::GridAnnotationPosition mTopGridAnnotationPosition;
242+
/**Annotation position for bottom map side (inside / outside / not shown)*/
243+
QgsComposerMap::GridAnnotationPosition mBottomGridAnnotationPosition;
244+
245+
/**Distance between map frame and annotation*/
246+
double mAnnotationFrameDistance;
247+
248+
/**Annotation direction on left side ( horizontal or vertical )*/
249+
QgsComposerMap::GridAnnotationDirection mLeftGridAnnotationDirection;
250+
/**Annotation direction on right side ( horizontal or vertical )*/
251+
QgsComposerMap::GridAnnotationDirection mRightGridAnnotationDirection;
252+
/**Annotation direction on top side ( horizontal or vertical )*/
253+
QgsComposerMap::GridAnnotationDirection mTopGridAnnotationDirection;
254+
/**Annotation direction on bottom side ( horizontal or vertical )*/
255+
QgsComposerMap::GridAnnotationDirection mBottomGridAnnotationDirection;
256+
QgsComposerMap::GridAnnotationFormat mGridAnnotationFormat;
257+
QgsComposerMap::GridFrameStyle mGridFrameStyle;
258+
double mGridFrameWidth;
259+
double mGridFramePenThickness;
260+
QColor mGridFramePenColor;
261+
QColor mGridFrameFillColor1;
262+
QColor mGridFrameFillColor2;
263+
double mCrossLength;
264+
265+
QgsLineSymbolV2* mGridLineSymbol;
266+
267+
QgsCoordinateReferenceSystem mCRS;
268+
269+
GridUnit mGridUnit;
270+
271+
QPainter::CompositionMode mBlendMode;
272+
273+
/**Draws the map grid*/
274+
void drawGridFrame( QPainter* p, const QList< QPair< double, QLineF > >& hLines, const QList< QPair< double, QLineF > >& vLines ) const;
275+
/**Draw coordinates for mGridAnnotationType Coordinate
276+
@param p drawing painter
277+
@param hLines horizontal coordinate lines in item coordinates
278+
@param vLines vertical coordinate lines in item coordinates*/
279+
void drawCoordinateAnnotations( QPainter* p, const QList< QPair< double, QLineF > >& hLines, const QList< QPair< double, QLineF > >& vLines ) const;
280+
void drawCoordinateAnnotation( QPainter* p, const QPointF& pos, QString annotationString ) const;
281+
/**Draws a single annotation
282+
@param p drawing painter
283+
@param pos item coordinates where to draw
284+
@param rotation text rotation
285+
@param annotationText the text to draw*/
286+
void drawAnnotation( QPainter* p, const QPointF& pos, int rotation, const QString& annotationText ) const;
287+
QString gridAnnotationString( double value, QgsComposerMap::AnnotationCoordinate coord ) const;
288+
/**Returns the grid lines with associated coordinate value
289+
@return 0 in case of success*/
290+
int xGridLines( QList< QPair< double, QLineF > >& lines ) const;
291+
/**Returns the grid lines for the y-coordinates. Not vertical in case of rotation
292+
@return 0 in case of success*/
293+
int yGridLines( QList< QPair< double, QLineF > >& lines ) const;
294+
int xGridLinesCRSTransform( const QgsRectangle& bbox, const QgsCoordinateTransform& t, QList< QPair< double, QPolygonF > >& lines ) const;
295+
int yGridLinesCRSTransform( const QgsRectangle& bbox, const QgsCoordinateTransform& t, QList< QPair< double, QPolygonF > >& lines ) const;
296+
void drawGridLine( const QLineF& line, QPainter* p ) const;
297+
void drawGridLine( const QPolygonF& line, QPainter* p ) const;
298+
void sortGridLinesOnBorders( const QList< QPair< double, QLineF > >& hLines, const QList< QPair< double, QLineF > >& vLines, QMap< double, double >& leftFrameEntries,
299+
QMap< double, double >& rightFrameEntries, QMap< double, double >& topFrameEntries, QMap< double, double >& bottomFrameEntries ) const;
300+
void drawGridFrameBorder( QPainter* p, const QMap< double, double >& borderPos, QgsComposerMap::Border border ) const;
301+
/**Returns the item border of a point (in item coordinates)*/
302+
QgsComposerMap::Border borderForLineCoord( const QPointF& p ) const;
303+
/**Get parameters for drawing grid in CRS different to map CRS*/
304+
int crsGridParams( QgsRectangle& crsRect, QgsCoordinateTransform& inverseTransform ) const;
305+
static QPolygonF trimLineToMap( const QPolygonF& line, const QgsRectangle& rect );
306+
};
307+
308+
#endif // QGSCOMPOSERMAPGRID_H

‎src/ui/qgscomposermapwidgetbase.ui

Lines changed: 512 additions & 411 deletions
Large diffs are not rendered by default.

1 commit comments

Comments
 (1)

nirvn commented on Jul 12, 2014

@nirvn
Contributor

@mhugent very, very nice job :) thanks.

I filed three issues on this:

The third issue is cosmetic in nature, so not as important as the first two. Hope that helps. Cheers, and thanks again.

Please sign in to comment.