Skip to content

Commit ac9220d

Browse files
committedNov 4, 2014
[FEATURE][composer] Finer control of frame and annotation display
Previously, for rotated maps or reprojected grids, the composer would draw all coordinates for every map side. This resulted in a mix of latitude/y and longitude/x coordinates showing on a side. This change allows users to control whether they want all coordinates, latitude only or longitude only for each map frame side. Similar options have also been added for controlling how a map grid frame is divided. In related news... the composer map dialog is now the ugliest, most cluttered and un-user friendly dialog in all of QGIS. I'd love suggestions/mockups from the UX team for ways this could be improved.
1 parent 991f94d commit ac9220d

File tree

12 files changed

+732
-92
lines changed

12 files changed

+732
-92
lines changed
 

‎python/core/composer/qgscomposermapgrid.sip

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,25 @@ class QgsComposerMapGrid : QgsComposerMapItem
138138
Markers, /*< draw markers at intersections of grid lines */
139139
FrameAnnotationsOnly /*< no grid lines over the map, only draw frame and annotations */
140140
};
141+
142+
/** Display settings for grid annotations and frames
143+
*/
144+
enum DisplayMode
145+
{
146+
ShowAll = 0, /*< show both latitude and longitude annotations/divisions */
147+
LatitudeOnly, /*< show latitude/y annotations/divisions only */
148+
LongitudeOnly, /*< show longitude/x annotations/divisions only */
149+
HideAll /*< no annotations */
150+
};
141151

142152
/** Position for grid annotations
143153
*/
144154
enum AnnotationPosition
145155
{
146-
InsideMapFrame,
156+
InsideMapFrame = 0,
147157
OutsideMapFrame, /*< draw annotations outside the map frame */
148-
Disabled /*< disable annotation */
158+
Disabled /*< disable annotation
159+
* @deprecated in QGIS 2.7, use QgsComposerMapGrid::HideAll instead */
149160
};
150161

151162
/** Direction of grid annotations
@@ -488,6 +499,25 @@ class QgsComposerMapGrid : QgsComposerMapItem
488499
* @see setAnnotationPrecision
489500
*/
490501
int annotationPrecision() const;
502+
503+
/**Sets what types of grid annotations should be drawn for a specified side of the map frame,
504+
* or whether grid annotations should be disabled for the side.
505+
* @param display display mode for annotations
506+
* @param border side of map for annotations
507+
* @see annotationDisplay
508+
* @note added in QGIS 2.7
509+
*/
510+
void setAnnotationDisplay( const DisplayMode display, const BorderSide border );
511+
512+
/**Gets the display mode for the grid annotations on a specified side of the map
513+
* frame. This property also specifies whether annotations have been disabled
514+
* from a side of the map frame.
515+
* @param border side of map for annotations
516+
* @returns display mode for grid annotations
517+
* @see setAnnotationDisplay
518+
* @note added in QGIS 2.7
519+
*/
520+
DisplayMode annotationDisplay( const BorderSide border ) const;
491521

492522
/**Sets the position for the grid annotations on a specified side of the map
493523
* frame.
@@ -565,6 +595,22 @@ class QgsComposerMapGrid : QgsComposerMapItem
565595
*/
566596
FrameStyle frameStyle() const;
567597

598+
/**Sets what type of grid divisions should be used for frames on a specified side of the map.
599+
* @param divisions grid divisions for frame
600+
* @param border side of map for frame
601+
* @see frameDivisions
602+
* @note added in QGIS 2.7
603+
*/
604+
void setFrameDivisions( const DisplayMode divisions, const BorderSide border );
605+
606+
/**Gets the type of grid divisions which are used for frames on a specified side of the map.
607+
* @param border side of map for frame
608+
* @returns grid divisions for frame
609+
* @see setFrameDivisions
610+
* @note added in QGIS 2.7
611+
*/
612+
DisplayMode frameDivisions( const BorderSide border ) const;
613+
568614
/**Sets flags for grid frame sides. Setting these flags controls which sides
569615
* of the map item the grid frame is drawn on.
570616
* @param flags flags for grid frame sides

‎src/app/composer/qgscomposermapwidget.cpp

Lines changed: 174 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ QgsComposerMapWidget::QgsComposerMapWidget( QgsComposerMap* composerMap ): QgsCo
6969
mGridTypeComboBox->insertItem( 2, tr( "Markers" ) );
7070
mGridTypeComboBox->insertItem( 3, tr( "Frame and annotations only" ) );
7171

72+
insertFrameDisplayEntries( mFrameDivisionsLeftComboBox );
73+
insertFrameDisplayEntries( mFrameDivisionsRightComboBox );
74+
insertFrameDisplayEntries( mFrameDivisionsTopComboBox );
75+
insertFrameDisplayEntries( mFrameDivisionsBottomComboBox );
76+
7277
mAnnotationFormatComboBox->insertItem( 0, tr( "Decimal" ) );
7378
mAnnotationFormatComboBox->insertItem( 1, tr( "Decimal with suffix" ) );
7479
mAnnotationFormatComboBox->insertItem( 2, tr( "Degree, minute" ) );
@@ -78,11 +83,15 @@ QgsComposerMapWidget::QgsComposerMapWidget( QgsComposerMap* composerMap ): QgsCo
7883
mAnnotationFormatComboBox->insertItem( 6, tr( "Degree, minute, second with suffix" ) );
7984
mAnnotationFormatComboBox->insertItem( 7, tr( "Degree, minute, second aligned" ) );
8085

81-
8286
mAnnotationFontColorButton->setColorDialogTitle( tr( "Select font color" ) );
8387
mAnnotationFontColorButton->setAllowAlpha( true );
8488
mAnnotationFontColorButton->setContext( "composer" );
8589

90+
insertAnnotationDisplayEntries( mAnnotationDisplayLeftComboBox );
91+
insertAnnotationDisplayEntries( mAnnotationDisplayRightComboBox );
92+
insertAnnotationDisplayEntries( mAnnotationDisplayTopComboBox );
93+
insertAnnotationDisplayEntries( mAnnotationDisplayBottomComboBox );
94+
8695
insertAnnotationPositionEntries( mAnnotationPositionLeftComboBox );
8796
insertAnnotationPositionEntries( mAnnotationPositionRightComboBox );
8897
insertAnnotationPositionEntries( mAnnotationPositionTopComboBox );
@@ -757,6 +766,50 @@ void QgsComposerMapWidget::blockAllSignals( bool b )
757766
blockOverviewItemsSignals( b );
758767
}
759768

769+
void QgsComposerMapWidget::handleChangedFrameDisplay( QgsComposerMapGrid::BorderSide border, const QgsComposerMapGrid::DisplayMode mode )
770+
{
771+
QgsComposerMapGrid* grid = currentGrid();
772+
if ( !grid )
773+
{
774+
return;
775+
}
776+
777+
mComposerMap->beginCommand( tr( "Frame divisions changed" ) );
778+
grid->setFrameDivisions( mode, border );
779+
mComposerMap->endCommand();
780+
}
781+
782+
void QgsComposerMapWidget::handleChangedAnnotationDisplay( QgsComposerMapGrid::BorderSide border, const QString &text )
783+
{
784+
QgsComposerMapGrid* grid = currentGrid();
785+
if ( !grid )
786+
{
787+
return;
788+
}
789+
790+
mComposerMap->beginCommand( tr( "Annotation display changed" ) );
791+
if ( text == tr( "Show all" ) )
792+
{
793+
grid->setAnnotationDisplay( QgsComposerMapGrid::ShowAll, border );
794+
}
795+
else if ( text == tr( "Show latitude only" ) )
796+
{
797+
grid->setAnnotationDisplay( QgsComposerMapGrid::LatitudeOnly, border );
798+
}
799+
else if ( text == tr( "Show longitude only" ) )
800+
{
801+
grid->setAnnotationDisplay( QgsComposerMapGrid::LongitudeOnly, border );
802+
}
803+
else //disabled
804+
{
805+
grid->setAnnotationDisplay( QgsComposerMapGrid::HideAll, border );
806+
}
807+
808+
mComposerMap->updateBoundingRect();
809+
mComposerMap->update();
810+
mComposerMap->endCommand();
811+
}
812+
760813
void QgsComposerMapWidget::toggleFrameControls( bool frameEnabled, bool frameFillEnabled, bool frameSizeEnabled )
761814
{
762815
//set status of frame controls
@@ -772,6 +825,14 @@ void QgsComposerMapWidget::toggleFrameControls( bool frameEnabled, bool frameFil
772825
mCheckGridRightSide->setEnabled( frameEnabled );
773826
mCheckGridTopSide->setEnabled( frameEnabled );
774827
mCheckGridBottomSide->setEnabled( frameEnabled );
828+
mFrameDivisionsLeftComboBox->setEnabled( frameEnabled );
829+
mFrameDivisionsRightComboBox->setEnabled( frameEnabled );
830+
mFrameDivisionsTopComboBox->setEnabled( frameEnabled );
831+
mFrameDivisionsBottomComboBox->setEnabled( frameEnabled );
832+
mLeftDivisionsLabel->setEnabled( frameEnabled );
833+
mRightDivisionsLabel->setEnabled( frameEnabled );
834+
mTopDivisionsLabel->setEnabled( frameEnabled );
835+
mBottomDivisionsLabel->setEnabled( frameEnabled );
775836
}
776837

777838
void QgsComposerMapWidget::on_mUpdatePreviewButton_clicked()
@@ -849,7 +910,6 @@ void QgsComposerMapWidget::insertAnnotationPositionEntries( QComboBox* c )
849910
{
850911
c->insertItem( 0, tr( "Inside frame" ) );
851912
c->insertItem( 1, tr( "Outside frame" ) );
852-
c->insertItem( 2, tr( "Disabled" ) );
853913
}
854914

855915
void QgsComposerMapWidget::insertAnnotationDirectionEntries( QComboBox* c )
@@ -858,6 +918,40 @@ void QgsComposerMapWidget::insertAnnotationDirectionEntries( QComboBox* c )
858918
c->insertItem( 1, tr( "Vertical" ) );
859919
}
860920

921+
void QgsComposerMapWidget::initFrameDisplayBox( QComboBox *c, QgsComposerMapGrid::DisplayMode display )
922+
{
923+
if ( !c )
924+
{
925+
return;
926+
}
927+
c->setCurrentIndex( c->findData( display ) );
928+
}
929+
930+
void QgsComposerMapWidget::initAnnotationDisplayBox( QComboBox *c, QgsComposerMapGrid::DisplayMode display )
931+
{
932+
if ( !c )
933+
{
934+
return;
935+
}
936+
937+
if ( display == QgsComposerMapGrid::ShowAll )
938+
{
939+
c->setCurrentIndex( c->findText( tr( "Show all" ) ) );
940+
}
941+
else if ( display == QgsComposerMapGrid::LatitudeOnly )
942+
{
943+
c->setCurrentIndex( c->findText( tr( "Show latitude only" ) ) );
944+
}
945+
else if ( display == QgsComposerMapGrid::LongitudeOnly )
946+
{
947+
c->setCurrentIndex( c->findText( tr( "Show longitude only" ) ) );
948+
}
949+
else
950+
{
951+
c->setCurrentIndex( c->findText( tr( "Disabled" ) ) );
952+
}
953+
}
954+
861955
void QgsComposerMapWidget::handleChangedAnnotationPosition( QgsComposerMapGrid::BorderSide border, const QString& text )
862956
{
863957
QgsComposerMapGrid* grid = currentGrid();
@@ -907,6 +1001,21 @@ void QgsComposerMapWidget::handleChangedAnnotationDirection( QgsComposerMapGrid:
9071001
mComposerMap->endCommand();
9081002
}
9091003

1004+
void QgsComposerMapWidget::insertFrameDisplayEntries( QComboBox *c )
1005+
{
1006+
c->addItem( tr( "All" ), QgsComposerMapGrid::ShowAll );
1007+
c->addItem( tr( "Latitude/Y only" ), QgsComposerMapGrid::LatitudeOnly );
1008+
c->addItem( tr( "Longitude/X only" ), QgsComposerMapGrid::LongitudeOnly );
1009+
}
1010+
1011+
void QgsComposerMapWidget::insertAnnotationDisplayEntries( QComboBox *c )
1012+
{
1013+
c->insertItem( 0, tr( "Show all" ) );
1014+
c->insertItem( 1, tr( "Show latitude only" ) );
1015+
c->insertItem( 2, tr( "Show longitude only" ) );
1016+
c->insertItem( 3, tr( "Disabled" ) );
1017+
}
1018+
9101019
void QgsComposerMapWidget::initAnnotationPositionBox( QComboBox* c, QgsComposerMapGrid::AnnotationPosition pos )
9111020
{
9121021
if ( !c )
@@ -918,14 +1027,10 @@ void QgsComposerMapWidget::initAnnotationPositionBox( QComboBox* c, QgsComposerM
9181027
{
9191028
c->setCurrentIndex( c->findText( tr( "Inside frame" ) ) );
9201029
}
921-
else if ( pos == QgsComposerMapGrid::OutsideMapFrame )
1030+
else
9221031
{
9231032
c->setCurrentIndex( c->findText( tr( "Outside frame" ) ) );
9241033
}
925-
else //disabled
926-
{
927-
c->setCurrentIndex( c->findText( tr( "Disabled" ) ) );
928-
}
9291034
}
9301035

9311036
void QgsComposerMapWidget::initAnnotationDirectionBox( QComboBox* c, QgsComposerMapGrid::AnnotationDirection dir )
@@ -1160,6 +1265,10 @@ void QgsComposerMapWidget::setGridItemsEnabled( bool enabled )
11601265
mGridFramePenColorButton->setEnabled( enabled );
11611266
mGridFrameFill1ColorButton->setEnabled( enabled );
11621267
mGridFrameFill2ColorButton->setEnabled( enabled );
1268+
mFrameDivisionsLeftComboBox->setEnabled( enabled );
1269+
mFrameDivisionsRightComboBox->setEnabled( enabled );
1270+
mFrameDivisionsTopComboBox->setEnabled( enabled );
1271+
mFrameDivisionsBottomComboBox->setEnabled( enabled );
11631272
}
11641273

11651274
void QgsComposerMapWidget::blockGridItemsSignals( bool block )
@@ -1185,16 +1294,24 @@ void QgsComposerMapWidget::blockGridItemsSignals( bool block )
11851294
mCheckGridRightSide->blockSignals( block );
11861295
mCheckGridTopSide->blockSignals( block );
11871296
mCheckGridBottomSide->blockSignals( block );
1297+
mFrameDivisionsLeftComboBox->blockSignals( block );
1298+
mFrameDivisionsRightComboBox->blockSignals( block );
1299+
mFrameDivisionsTopComboBox->blockSignals( block );
1300+
mFrameDivisionsBottomComboBox->blockSignals( block );
11881301

11891302
//grid annotation
11901303
mDrawAnnotationGroupBox->blockSignals( block );
11911304
mAnnotationFormatComboBox->blockSignals( block );
1305+
mAnnotationDisplayLeftComboBox->blockSignals( block );
11921306
mAnnotationPositionLeftComboBox->blockSignals( block );
11931307
mAnnotationDirectionComboBoxLeft->blockSignals( block );
1308+
mAnnotationDisplayRightComboBox->blockSignals( block );
11941309
mAnnotationPositionRightComboBox->blockSignals( block );
11951310
mAnnotationDirectionComboBoxRight->blockSignals( block );
1311+
mAnnotationDisplayTopComboBox->blockSignals( block );
11961312
mAnnotationPositionTopComboBox->blockSignals( block );
11971313
mAnnotationDirectionComboBoxTop->blockSignals( block );
1314+
mAnnotationDisplayBottomComboBox->blockSignals( block );
11981315
mAnnotationPositionBottomComboBox->blockSignals( block );
11991316
mAnnotationDirectionComboBoxBottom->blockSignals( block );
12001317
mDistanceToMapFrameSpinBox->blockSignals( block );
@@ -1310,6 +1427,11 @@ void QgsComposerMapWidget::setGridItems( const QgsComposerMapGrid* grid )
13101427
mCheckGridTopSide->setChecked( grid->testFrameSideFlag( QgsComposerMapGrid::FrameTop ) );
13111428
mCheckGridBottomSide->setChecked( grid->testFrameSideFlag( QgsComposerMapGrid::FrameBottom ) );
13121429

1430+
initFrameDisplayBox( mFrameDivisionsLeftComboBox, grid->frameDivisions( QgsComposerMapGrid::Left ) );
1431+
initFrameDisplayBox( mFrameDivisionsRightComboBox, grid->frameDivisions( QgsComposerMapGrid::Right ) );
1432+
initFrameDisplayBox( mFrameDivisionsTopComboBox, grid->frameDivisions( QgsComposerMapGrid::Top ) );
1433+
initFrameDisplayBox( mFrameDivisionsBottomComboBox, grid->frameDivisions( QgsComposerMapGrid::Bottom ) );
1434+
13131435
//line style
13141436
updateGridLineSymbolMarker( grid );
13151437
//marker style
@@ -1318,6 +1440,11 @@ void QgsComposerMapWidget::setGridItems( const QgsComposerMapGrid* grid )
13181440
mGridBlendComboBox->setBlendMode( grid->blendMode() );
13191441

13201442
mDrawAnnotationGroupBox->setChecked( grid->annotationEnabled() );
1443+
initAnnotationDisplayBox( mAnnotationDisplayLeftComboBox, grid->annotationDisplay( QgsComposerMapGrid::Left ) );
1444+
initAnnotationDisplayBox( mAnnotationDisplayRightComboBox, grid->annotationDisplay( QgsComposerMapGrid::Right ) );
1445+
initAnnotationDisplayBox( mAnnotationDisplayTopComboBox, grid->annotationDisplay( QgsComposerMapGrid::Top ) );
1446+
initAnnotationDisplayBox( mAnnotationDisplayBottomComboBox, grid->annotationDisplay( QgsComposerMapGrid::Bottom ) );
1447+
13211448
initAnnotationPositionBox( mAnnotationPositionLeftComboBox, grid->annotationPosition( QgsComposerMapGrid::Left ) );
13221449
initAnnotationPositionBox( mAnnotationPositionRightComboBox, grid->annotationPosition( QgsComposerMapGrid::Right ) );
13231450
initAnnotationPositionBox( mAnnotationPositionTopComboBox, grid->annotationPosition( QgsComposerMapGrid::Top ) );
@@ -1598,6 +1725,26 @@ void QgsComposerMapWidget::on_mCheckGridBottomSide_toggled( bool checked )
15981725
mComposerMap->endCommand();
15991726
}
16001727

1728+
void QgsComposerMapWidget::on_mFrameDivisionsLeftComboBox_currentIndexChanged( int index )
1729+
{
1730+
handleChangedFrameDisplay( QgsComposerMapGrid::Left, ( QgsComposerMapGrid::DisplayMode ) mFrameDivisionsLeftComboBox->itemData( index ).toInt() );
1731+
}
1732+
1733+
void QgsComposerMapWidget::on_mFrameDivisionsRightComboBox_currentIndexChanged( int index )
1734+
{
1735+
handleChangedFrameDisplay( QgsComposerMapGrid::Right, ( QgsComposerMapGrid::DisplayMode ) mFrameDivisionsRightComboBox->itemData( index ).toInt() );
1736+
}
1737+
1738+
void QgsComposerMapWidget::on_mFrameDivisionsTopComboBox_currentIndexChanged( int index )
1739+
{
1740+
handleChangedFrameDisplay( QgsComposerMapGrid::Top, ( QgsComposerMapGrid::DisplayMode ) mFrameDivisionsTopComboBox->itemData( index ).toInt() );
1741+
}
1742+
1743+
void QgsComposerMapWidget::on_mFrameDivisionsBottomComboBox_currentIndexChanged( int index )
1744+
{
1745+
handleChangedFrameDisplay( QgsComposerMapGrid::Bottom, ( QgsComposerMapGrid::DisplayMode ) mFrameDivisionsBottomComboBox->itemData( index ).toInt() );
1746+
}
1747+
16011748
void QgsComposerMapWidget::on_mGridFramePenSizeSpinBox_valueChanged( double d )
16021749
{
16031750
QgsComposerMapGrid* grid = currentGrid();
@@ -1839,6 +1986,26 @@ void QgsComposerMapWidget::on_mDrawAnnotationGroupBox_toggled( bool state )
18391986
mComposerMap->endCommand();
18401987
}
18411988

1989+
void QgsComposerMapWidget::on_mAnnotationDisplayLeftComboBox_currentIndexChanged( const QString &text )
1990+
{
1991+
handleChangedAnnotationDisplay( QgsComposerMapGrid::Left, text );
1992+
}
1993+
1994+
void QgsComposerMapWidget::on_mAnnotationDisplayRightComboBox_currentIndexChanged( const QString &text )
1995+
{
1996+
handleChangedAnnotationDisplay( QgsComposerMapGrid::Right, text );
1997+
}
1998+
1999+
void QgsComposerMapWidget::on_mAnnotationDisplayTopComboBox_currentIndexChanged( const QString &text )
2000+
{
2001+
handleChangedAnnotationDisplay( QgsComposerMapGrid::Top, text );
2002+
}
2003+
2004+
void QgsComposerMapWidget::on_mAnnotationDisplayBottomComboBox_currentIndexChanged( const QString &text )
2005+
{
2006+
handleChangedAnnotationDisplay( QgsComposerMapGrid::Bottom, text );
2007+
}
2008+
18422009
void QgsComposerMapWidget::on_mAnnotationPositionLeftComboBox_currentIndexChanged( const QString& text )
18432010
{
18442011
handleChangedAnnotationPosition( QgsComposerMapGrid::Left, text );

‎src/app/composer/qgscomposermapwidget.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,20 @@ class QgsComposerMapWidget: public QgsComposerItemBaseWidget, private Ui::QgsCom
9898
void on_mCheckGridTopSide_toggled( bool checked );
9999
void on_mCheckGridBottomSide_toggled( bool checked );
100100

101+
//frame divisions display
102+
void on_mFrameDivisionsLeftComboBox_currentIndexChanged( int index );
103+
void on_mFrameDivisionsRightComboBox_currentIndexChanged( int index );
104+
void on_mFrameDivisionsTopComboBox_currentIndexChanged( int index );
105+
void on_mFrameDivisionsBottomComboBox_currentIndexChanged( int index );
106+
101107
void on_mDrawAnnotationGroupBox_toggled( bool state );
108+
109+
//annotation display
110+
void on_mAnnotationDisplayLeftComboBox_currentIndexChanged( const QString& text );
111+
void on_mAnnotationDisplayRightComboBox_currentIndexChanged( const QString& text );
112+
void on_mAnnotationDisplayTopComboBox_currentIndexChanged( const QString& text );
113+
void on_mAnnotationDisplayBottomComboBox_currentIndexChanged( const QString& text );
114+
102115
//annotation position
103116
void on_mAnnotationPositionLeftComboBox_currentIndexChanged( const QString& text );
104117
void on_mAnnotationPositionRightComboBox_currentIndexChanged( const QString& text );
@@ -168,12 +181,18 @@ class QgsComposerMapWidget: public QgsComposerItemBaseWidget, private Ui::QgsCom
168181
/**Blocks / unblocks the signals of all GUI elements*/
169182
void blockAllSignals( bool b );
170183

184+
void handleChangedFrameDisplay( QgsComposerMapGrid::BorderSide border, const QgsComposerMapGrid::DisplayMode mode );
185+
void handleChangedAnnotationDisplay( QgsComposerMapGrid::BorderSide border, const QString& text );
171186
void handleChangedAnnotationPosition( QgsComposerMapGrid::BorderSide border, const QString& text );
172187
void handleChangedAnnotationDirection( QgsComposerMapGrid::BorderSide border, const QString& text );
173188

189+
void insertFrameDisplayEntries( QComboBox* c );
190+
void insertAnnotationDisplayEntries( QComboBox* c );
174191
void insertAnnotationPositionEntries( QComboBox* c );
175192
void insertAnnotationDirectionEntries( QComboBox* c );
176193

194+
void initFrameDisplayBox( QComboBox* c, QgsComposerMapGrid::DisplayMode display );
195+
void initAnnotationDisplayBox( QComboBox* c, QgsComposerMapGrid::DisplayMode display );
177196
void initAnnotationPositionBox( QComboBox* c, QgsComposerMapGrid::AnnotationPosition pos );
178197
void initAnnotationDirectionBox( QComboBox* c, QgsComposerMapGrid::AnnotationDirection dir );
179198

‎src/core/composer/qgscomposermap.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1694,7 +1694,14 @@ bool QgsComposerMap::showGridAnnotation() const
16941694
void QgsComposerMap::setGridAnnotationPosition( QgsComposerMap::GridAnnotationPosition p, QgsComposerMap::Border border )
16951695
{
16961696
QgsComposerMapGrid* g = grid();
1697-
g->setAnnotationPosition(( QgsComposerMapGrid::AnnotationPosition )p, ( QgsComposerMapGrid::BorderSide )border );
1697+
if ( p != QgsComposerMap::Disabled )
1698+
{
1699+
g->setAnnotationPosition(( QgsComposerMapGrid::AnnotationPosition )p, ( QgsComposerMapGrid::BorderSide )border );
1700+
}
1701+
else
1702+
{
1703+
g->setAnnotationDisplay( QgsComposerMapGrid::HideAll, ( QgsComposerMapGrid::BorderSide )border );
1704+
}
16981705
}
16991706

17001707
QgsComposerMap::GridAnnotationPosition QgsComposerMap::gridAnnotationPosition( QgsComposerMap::Border border ) const

‎src/core/composer/qgscomposermapgrid.cpp

Lines changed: 196 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ QgsComposerMapGrid::QgsComposerMapGrid( const QString& name, QgsComposerMap* map
154154
, mGridAnnotationFontColor( Qt::black )
155155
, mGridAnnotationPrecision( 3 )
156156
, mShowGridAnnotation( false )
157+
, mLeftGridAnnotationDisplay( QgsComposerMapGrid::ShowAll )
158+
, mRightGridAnnotationDisplay( QgsComposerMapGrid::ShowAll )
159+
, mTopGridAnnotationDisplay( QgsComposerMapGrid::ShowAll )
160+
, mBottomGridAnnotationDisplay( QgsComposerMapGrid::ShowAll )
157161
, mLeftGridAnnotationPosition( QgsComposerMapGrid::OutsideMapFrame )
158162
, mRightGridAnnotationPosition( QgsComposerMapGrid::OutsideMapFrame )
159163
, mTopGridAnnotationPosition( QgsComposerMapGrid::OutsideMapFrame )
@@ -173,6 +177,10 @@ QgsComposerMapGrid::QgsComposerMapGrid( const QString& name, QgsComposerMap* map
173177
, mGridFrameFillColor1( Qt::white )
174178
, mGridFrameFillColor2( Qt::black )
175179
, mCrossLength( 3 )
180+
, mLeftFrameDivisions( QgsComposerMapGrid::ShowAll )
181+
, mRightFrameDivisions( QgsComposerMapGrid::ShowAll )
182+
, mTopFrameDivisions( QgsComposerMapGrid::ShowAll )
183+
, mBottomFrameDivisions( QgsComposerMapGrid::ShowAll )
176184
, mGridLineSymbol( 0 )
177185
, mGridMarkerSymbol( 0 )
178186
, mGridUnit( MapUnit )
@@ -269,13 +277,21 @@ bool QgsComposerMapGrid::writeXML( QDomElement& elem, QDomDocument& doc ) const
269277
mapGridElem.setAttribute( "gridFramePenColor", QgsSymbolLayerV2Utils::encodeColor( mGridFramePenColor ) );
270278
mapGridElem.setAttribute( "frameFillColor1", QgsSymbolLayerV2Utils::encodeColor( mGridFrameFillColor1 ) );
271279
mapGridElem.setAttribute( "frameFillColor2", QgsSymbolLayerV2Utils::encodeColor( mGridFrameFillColor2 ) );
280+
mapGridElem.setAttribute( "leftFrameDivisions", mLeftFrameDivisions );
281+
mapGridElem.setAttribute( "rightFrameDivisions", mRightFrameDivisions );
282+
mapGridElem.setAttribute( "topFrameDivisions", mTopFrameDivisions );
283+
mapGridElem.setAttribute( "bottomFrameDivisions", mBottomFrameDivisions );
272284
if ( mCRS.isValid() )
273285
{
274286
mCRS.writeXML( mapGridElem, doc );
275287
}
276288

277289
mapGridElem.setAttribute( "annotationFormat", mGridAnnotationFormat );
278290
mapGridElem.setAttribute( "showAnnotation", mShowGridAnnotation );
291+
mapGridElem.setAttribute( "leftAnnotationDisplay", mLeftGridAnnotationDisplay );
292+
mapGridElem.setAttribute( "rightAnnotationDisplay", mRightGridAnnotationDisplay );
293+
mapGridElem.setAttribute( "topAnnotationDisplay", mTopGridAnnotationDisplay );
294+
mapGridElem.setAttribute( "bottomAnnotationDisplay", mBottomGridAnnotationDisplay );
279295
mapGridElem.setAttribute( "leftAnnotationPosition", mLeftGridAnnotationPosition );
280296
mapGridElem.setAttribute( "rightAnnotationPosition", mRightGridAnnotationPosition );
281297
mapGridElem.setAttribute( "topAnnotationPosition", mTopGridAnnotationPosition );
@@ -320,6 +336,10 @@ bool QgsComposerMapGrid::readXML( const QDomElement& itemElem, const QDomDocumen
320336
mGridFramePenColor = QgsSymbolLayerV2Utils::decodeColor( itemElem.attribute( "gridFramePenColor", "0,0,0" ) );
321337
mGridFrameFillColor1 = QgsSymbolLayerV2Utils::decodeColor( itemElem.attribute( "frameFillColor1", "255,255,255,255" ) );
322338
mGridFrameFillColor2 = QgsSymbolLayerV2Utils::decodeColor( itemElem.attribute( "frameFillColor2", "0,0,0,255" ) );
339+
mLeftFrameDivisions = QgsComposerMapGrid::DisplayMode( itemElem.attribute( "leftFrameDivisions", "0" ).toInt() );
340+
mRightFrameDivisions = QgsComposerMapGrid::DisplayMode( itemElem.attribute( "rightFrameDivisions", "0" ).toInt() );
341+
mTopFrameDivisions = QgsComposerMapGrid::DisplayMode( itemElem.attribute( "topFrameDivisions", "0" ).toInt() );
342+
mBottomFrameDivisions = QgsComposerMapGrid::DisplayMode( itemElem.attribute( "bottomFrameDivisions", "0" ).toInt() );
323343

324344
QDomElement lineStyleElem = itemElem.firstChildElement( "lineStyle" );
325345
if ( !lineStyleElem.isNull() )
@@ -371,6 +391,32 @@ bool QgsComposerMapGrid::readXML( const QDomElement& itemElem, const QDomDocumen
371391
mRightGridAnnotationPosition = QgsComposerMapGrid::AnnotationPosition( itemElem.attribute( "rightAnnotationPosition", "0" ).toInt() );
372392
mTopGridAnnotationPosition = QgsComposerMapGrid::AnnotationPosition( itemElem.attribute( "topAnnotationPosition", "0" ).toInt() );
373393
mBottomGridAnnotationPosition = QgsComposerMapGrid::AnnotationPosition( itemElem.attribute( "bottomAnnotationPosition", "0" ).toInt() );
394+
mLeftGridAnnotationDisplay = QgsComposerMapGrid::DisplayMode( itemElem.attribute( "leftAnnotationDisplay", "0" ).toInt() );
395+
mRightGridAnnotationDisplay = QgsComposerMapGrid::DisplayMode( itemElem.attribute( "rightAnnotationDisplay", "0" ).toInt() );
396+
mTopGridAnnotationDisplay = QgsComposerMapGrid::DisplayMode( itemElem.attribute( "topAnnotationDisplay", "0" ).toInt() );
397+
mBottomGridAnnotationDisplay = QgsComposerMapGrid::DisplayMode( itemElem.attribute( "bottomAnnotationDisplay", "0" ).toInt() );
398+
//upgrade pre-2.7 projects
399+
if ( mLeftGridAnnotationPosition == QgsComposerMapGrid::Disabled )
400+
{
401+
mLeftGridAnnotationDisplay = QgsComposerMapGrid::HideAll;
402+
mLeftGridAnnotationPosition = QgsComposerMapGrid::OutsideMapFrame;
403+
}
404+
if ( mRightGridAnnotationPosition == QgsComposerMapGrid::Disabled )
405+
{
406+
mRightGridAnnotationDisplay = QgsComposerMapGrid::HideAll;
407+
mRightGridAnnotationPosition = QgsComposerMapGrid::OutsideMapFrame;
408+
}
409+
if ( mTopGridAnnotationPosition == QgsComposerMapGrid::Disabled )
410+
{
411+
mTopGridAnnotationDisplay = QgsComposerMapGrid::HideAll;
412+
mTopGridAnnotationPosition = QgsComposerMapGrid::OutsideMapFrame;
413+
}
414+
if ( mBottomGridAnnotationPosition == QgsComposerMapGrid::Disabled )
415+
{
416+
mBottomGridAnnotationDisplay = QgsComposerMapGrid::HideAll;
417+
mBottomGridAnnotationPosition = QgsComposerMapGrid::OutsideMapFrame;
418+
}
419+
374420
mLeftGridAnnotationDirection = QgsComposerMapGrid::AnnotationDirection( itemElem.attribute( "leftAnnotationDirection", "0" ).toInt() );
375421
mRightGridAnnotationDirection = QgsComposerMapGrid::AnnotationDirection( itemElem.attribute( "rightAnnotationDirection", "0" ).toInt() );
376422
mTopGridAnnotationDirection = QgsComposerMapGrid::AnnotationDirection( itemElem.attribute( "topAnnotationDirection", "0" ).toInt() );
@@ -1019,6 +1065,12 @@ void QgsComposerMapGrid::drawCoordinateAnnotation( QPainter* p, const QPointF& p
10191065

10201066
if ( frameBorder == QgsComposerMapGrid::Left )
10211067
{
1068+
if ( mLeftGridAnnotationDisplay == QgsComposerMapGrid::HideAll ||
1069+
( coordinateType == Longitude && mLeftGridAnnotationDisplay == QgsComposerMapGrid::LatitudeOnly ) ||
1070+
( coordinateType == Latitude && mLeftGridAnnotationDisplay == QgsComposerMapGrid::LongitudeOnly ) )
1071+
{
1072+
return;
1073+
}
10221074
if ( !testFrameSideFlag( QgsComposerMapGrid::FrameLeft ) )
10231075
{
10241076
gridFrameDistance = 0;
@@ -1068,6 +1120,12 @@ void QgsComposerMapGrid::drawCoordinateAnnotation( QPainter* p, const QPointF& p
10681120
}
10691121
else if ( frameBorder == QgsComposerMapGrid::Right )
10701122
{
1123+
if ( mRightGridAnnotationDisplay == QgsComposerMapGrid::HideAll ||
1124+
( coordinateType == Longitude && mRightGridAnnotationDisplay == QgsComposerMapGrid::LatitudeOnly ) ||
1125+
( coordinateType == Latitude && mRightGridAnnotationDisplay == QgsComposerMapGrid::LongitudeOnly ) )
1126+
{
1127+
return;
1128+
}
10711129
if ( !testFrameSideFlag( QgsComposerMapGrid::FrameRight ) )
10721130
{
10731131
gridFrameDistance = 0;
@@ -1116,6 +1174,12 @@ void QgsComposerMapGrid::drawCoordinateAnnotation( QPainter* p, const QPointF& p
11161174
}
11171175
else if ( frameBorder == QgsComposerMapGrid::Bottom )
11181176
{
1177+
if ( mBottomGridAnnotationDisplay == QgsComposerMapGrid::HideAll ||
1178+
( coordinateType == Longitude && mBottomGridAnnotationDisplay == QgsComposerMapGrid::LatitudeOnly ) ||
1179+
( coordinateType == Latitude && mBottomGridAnnotationDisplay == QgsComposerMapGrid::LongitudeOnly ) )
1180+
{
1181+
return;
1182+
}
11191183
if ( !testFrameSideFlag( QgsComposerMapGrid::FrameBottom ) )
11201184
{
11211185
gridFrameDistance = 0;
@@ -1162,8 +1226,14 @@ void QgsComposerMapGrid::drawCoordinateAnnotation( QPainter* p, const QPointF& p
11621226
return;
11631227
}
11641228
}
1165-
else //Top
1229+
else //top
11661230
{
1231+
if ( mTopGridAnnotationDisplay == QgsComposerMapGrid::HideAll ||
1232+
( coordinateType == Longitude && mTopGridAnnotationDisplay == QgsComposerMapGrid::LatitudeOnly ) ||
1233+
( coordinateType == Latitude && mTopGridAnnotationDisplay == QgsComposerMapGrid::LongitudeOnly ) )
1234+
{
1235+
return;
1236+
}
11671237
if ( !testFrameSideFlag( QgsComposerMapGrid::FrameTop ) )
11681238
{
11691239
gridFrameDistance = 0;
@@ -1663,25 +1733,48 @@ void QgsComposerMapGrid::sortGridLinesOnBorders( const QList< QPair< double, QLi
16631733
for ( ; bIt != borderPositions.constEnd(); ++bIt )
16641734
{
16651735
QgsComposerMapGrid::BorderSide frameBorder = borderForLineCoord( bIt->itemPosition, bIt->coordinateType );
1666-
if ( frameBorder == QgsComposerMapGrid::Left )
1736+
if ( frameBorder == QgsComposerMapGrid::Left && shouldShowDivisionForSide( bIt->coordinateType, QgsComposerMapGrid::Left ) )
16671737
{
16681738
leftFrameEntries.insert( bIt->itemPosition.y(), bIt->coordinate );
16691739
}
1670-
else if ( frameBorder == QgsComposerMapGrid::Right )
1740+
else if ( frameBorder == QgsComposerMapGrid::Right && shouldShowDivisionForSide( bIt->coordinateType, QgsComposerMapGrid::Right ) )
16711741
{
16721742
rightFrameEntries.insert( bIt->itemPosition.y(), bIt->coordinate );
16731743
}
1674-
else if ( frameBorder == QgsComposerMapGrid::Top )
1744+
else if ( frameBorder == QgsComposerMapGrid::Top && shouldShowDivisionForSide( bIt->coordinateType, QgsComposerMapGrid::Top ) )
16751745
{
16761746
topFrameEntries.insert( bIt->itemPosition.x(), bIt->coordinate );
16771747
}
1678-
else //Bottom
1748+
else if ( frameBorder == QgsComposerMapGrid::Bottom && shouldShowDivisionForSide( bIt->coordinateType, QgsComposerMapGrid::Bottom ) )
16791749
{
16801750
bottomFrameEntries.insert( bIt->itemPosition.x(), bIt->coordinate );
16811751
}
16821752
}
16831753
}
16841754

1755+
bool QgsComposerMapGrid::shouldShowDivisionForSide( const QgsComposerMapGrid::AnnotationCoordinate& coordinate, const QgsComposerMapGrid::BorderSide& side ) const
1756+
{
1757+
switch ( side )
1758+
{
1759+
case QgsComposerMapGrid::Left:
1760+
return shouldShowDivisionForDisplayMode( coordinate, mLeftFrameDivisions );
1761+
case QgsComposerMapGrid::Right:
1762+
return shouldShowDivisionForDisplayMode( coordinate, mRightFrameDivisions );
1763+
case QgsComposerMapGrid::Top:
1764+
return shouldShowDivisionForDisplayMode( coordinate, mTopFrameDivisions );
1765+
case QgsComposerMapGrid::Bottom:
1766+
default: //prevent warnings
1767+
return shouldShowDivisionForDisplayMode( coordinate, mBottomFrameDivisions );
1768+
}
1769+
}
1770+
1771+
bool QgsComposerMapGrid::shouldShowDivisionForDisplayMode( const QgsComposerMapGrid::AnnotationCoordinate& coordinate, const QgsComposerMapGrid::DisplayMode& mode ) const
1772+
{
1773+
return mode == QgsComposerMapGrid::ShowAll
1774+
|| ( mode == QgsComposerMapGrid::LatitudeOnly && coordinate == QgsComposerMapGrid::Latitude )
1775+
|| ( mode == QgsComposerMapGrid::LongitudeOnly && coordinate == QgsComposerMapGrid::Longitude );
1776+
}
1777+
16851778
QgsComposerMapGrid::BorderSide QgsComposerMapGrid::borderForLineCoord( const QPointF& p, const AnnotationCoordinate coordinateType ) const
16861779
{
16871780
if ( !mComposerMap )
@@ -1754,15 +1847,65 @@ void QgsComposerMapGrid::setMarkerSymbol( QgsMarkerSymbolV2 *symbol )
17541847
mGridMarkerSymbol = symbol;
17551848
}
17561849

1850+
void QgsComposerMapGrid::setAnnotationDisplay( const QgsComposerMapGrid::DisplayMode display, const QgsComposerMapGrid::BorderSide border )
1851+
{
1852+
switch ( border )
1853+
{
1854+
case QgsComposerMapGrid::Left:
1855+
mLeftGridAnnotationDisplay = display;
1856+
break;
1857+
case QgsComposerMapGrid::Right:
1858+
mRightGridAnnotationDisplay = display;
1859+
break;
1860+
case QgsComposerMapGrid::Top:
1861+
mTopGridAnnotationDisplay = display;
1862+
break;
1863+
case QgsComposerMapGrid::Bottom:
1864+
mBottomGridAnnotationDisplay = display;
1865+
break;
1866+
default:
1867+
return;
1868+
}
1869+
1870+
if ( mComposerMap )
1871+
{
1872+
mComposerMap->updateBoundingRect();
1873+
mComposerMap->update();
1874+
}
1875+
}
1876+
1877+
QgsComposerMapGrid::DisplayMode QgsComposerMapGrid::annotationDisplay( const QgsComposerMapGrid::BorderSide border ) const
1878+
{
1879+
switch ( border )
1880+
{
1881+
case QgsComposerMapGrid::Left:
1882+
return mLeftGridAnnotationDisplay;
1883+
break;
1884+
case QgsComposerMapGrid::Right:
1885+
return mRightGridAnnotationDisplay;
1886+
break;
1887+
case QgsComposerMapGrid::Top:
1888+
return mTopGridAnnotationDisplay;
1889+
break;
1890+
case QgsComposerMapGrid::Bottom:
1891+
default:
1892+
return mBottomGridAnnotationDisplay;
1893+
break;
1894+
}
1895+
}
1896+
17571897
double QgsComposerMapGrid::maxExtension() const
17581898
{
17591899
if ( !mComposerMap )
17601900
{
17611901
return 0;
17621902
}
17631903

1764-
if ( !mEnabled || ( mGridFrameStyle == QgsComposerMapGrid::NoFrame && ( !mShowGridAnnotation || ( mLeftGridAnnotationPosition != QgsComposerMapGrid::OutsideMapFrame && mRightGridAnnotationPosition != QgsComposerMapGrid::OutsideMapFrame
1765-
&& mTopGridAnnotationPosition != QgsComposerMapGrid::OutsideMapFrame && mBottomGridAnnotationPosition != QgsComposerMapGrid::OutsideMapFrame ) ) ) )
1904+
if ( !mEnabled || ( mGridFrameStyle == QgsComposerMapGrid::NoFrame && ( !mShowGridAnnotation ||
1905+
(( mLeftGridAnnotationPosition != QgsComposerMapGrid::OutsideMapFrame || mLeftGridAnnotationDisplay == QgsComposerMapGrid::HideAll ) &&
1906+
( mRightGridAnnotationPosition != QgsComposerMapGrid::OutsideMapFrame || mRightGridAnnotationDisplay == QgsComposerMapGrid::HideAll ) &&
1907+
( mTopGridAnnotationPosition != QgsComposerMapGrid::OutsideMapFrame || mTopGridAnnotationDisplay == QgsComposerMapGrid::HideAll ) &&
1908+
( mBottomGridAnnotationPosition != QgsComposerMapGrid::OutsideMapFrame || mBottomGridAnnotationDisplay == QgsComposerMapGrid::HideAll ) ) ) ) )
17661909
{
17671910
return 0;
17681911
}
@@ -2028,6 +2171,52 @@ QgsComposerMapGrid::AnnotationDirection QgsComposerMapGrid::annotationDirection(
20282171
}
20292172
}
20302173

2174+
void QgsComposerMapGrid::setFrameDivisions( const QgsComposerMapGrid::DisplayMode divisions, const QgsComposerMapGrid::BorderSide border )
2175+
{
2176+
switch ( border )
2177+
{
2178+
case QgsComposerMapGrid::Left:
2179+
mLeftFrameDivisions = divisions;
2180+
break;
2181+
case QgsComposerMapGrid::Right:
2182+
mRightFrameDivisions = divisions;
2183+
break;
2184+
case QgsComposerMapGrid::Top:
2185+
mTopFrameDivisions = divisions;
2186+
break;
2187+
case QgsComposerMapGrid::Bottom:
2188+
mBottomFrameDivisions = divisions;
2189+
break;
2190+
default:
2191+
return;
2192+
}
2193+
2194+
if ( mComposerMap )
2195+
{
2196+
mComposerMap->update();
2197+
}
2198+
}
2199+
2200+
QgsComposerMapGrid::DisplayMode QgsComposerMapGrid::frameDivisions( const QgsComposerMapGrid::BorderSide border ) const
2201+
{
2202+
switch ( border )
2203+
{
2204+
case QgsComposerMapGrid::Left:
2205+
return mLeftFrameDivisions;
2206+
break;
2207+
case QgsComposerMapGrid::Right:
2208+
return mRightFrameDivisions;
2209+
break;
2210+
case QgsComposerMapGrid::Top:
2211+
return mTopFrameDivisions;
2212+
break;
2213+
case QgsComposerMapGrid::Bottom:
2214+
default:
2215+
return mBottomFrameDivisions;
2216+
break;
2217+
}
2218+
}
2219+
20312220
int QgsComposerMapGrid::crsGridParams( QgsRectangle& crsRect, QgsCoordinateTransform& inverseTransform ) const
20322221
{
20332222
if ( !mComposerMap )

‎src/core/composer/qgscomposermapgrid.h

Lines changed: 72 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,24 @@ class CORE_EXPORT QgsComposerMapGrid : public QgsComposerMapItem
174174
FrameAnnotationsOnly /*< no grid lines over the map, only draw frame and annotations */
175175
};
176176

177+
/** Display settings for grid annotations and frames
178+
*/
179+
enum DisplayMode
180+
{
181+
ShowAll = 0, /*< show both latitude and longitude annotations/divisions */
182+
LatitudeOnly, /*< show latitude/y annotations/divisions only */
183+
LongitudeOnly, /*< show longitude/x annotations/divisions only */
184+
HideAll /*< no annotations */
185+
};
186+
177187
/** Position for grid annotations
178188
*/
179189
enum AnnotationPosition
180190
{
181191
InsideMapFrame = 0,
182192
OutsideMapFrame, /*< draw annotations outside the map frame */
183-
Disabled /*< disable annotation */
193+
Disabled /*< disable annotation
194+
* @deprecated in QGIS 2.7, use QgsComposerMapGrid::HideAll instead */
184195
};
185196

186197
/** Direction of grid annotations
@@ -544,6 +555,25 @@ class CORE_EXPORT QgsComposerMapGrid : public QgsComposerMapItem
544555
*/
545556
int annotationPrecision() const { return mGridAnnotationPrecision; }
546557

558+
/**Sets what types of grid annotations should be drawn for a specified side of the map frame,
559+
* or whether grid annotations should be disabled for the side.
560+
* @param display display mode for annotations
561+
* @param border side of map for annotations
562+
* @see annotationDisplay
563+
* @note added in QGIS 2.7
564+
*/
565+
void setAnnotationDisplay( const DisplayMode display, const BorderSide border );
566+
567+
/**Gets the display mode for the grid annotations on a specified side of the map
568+
* frame. This property also specifies whether annotations have been disabled
569+
* from a side of the map frame.
570+
* @param border side of map for annotations
571+
* @returns display mode for grid annotations
572+
* @see setAnnotationDisplay
573+
* @note added in QGIS 2.7
574+
*/
575+
DisplayMode annotationDisplay( const BorderSide border ) const;
576+
547577
/**Sets the position for the grid annotations on a specified side of the map
548578
* frame.
549579
* @param position position to draw grid annotations
@@ -620,6 +650,22 @@ class CORE_EXPORT QgsComposerMapGrid : public QgsComposerMapItem
620650
*/
621651
FrameStyle frameStyle() const { return mGridFrameStyle; }
622652

653+
/**Sets what type of grid divisions should be used for frames on a specified side of the map.
654+
* @param divisions grid divisions for frame
655+
* @param border side of map for frame
656+
* @see frameDivisions
657+
* @note added in QGIS 2.7
658+
*/
659+
void setFrameDivisions( const DisplayMode divisions, const BorderSide border );
660+
661+
/**Gets the type of grid divisions which are used for frames on a specified side of the map.
662+
* @param border side of map for frame
663+
* @returns grid divisions for frame
664+
* @see setFrameDivisions
665+
* @note added in QGIS 2.7
666+
*/
667+
DisplayMode frameDivisions( const BorderSide border ) const;
668+
623669
/**Sets flags for grid frame sides. Setting these flags controls which sides
624670
* of the map item the grid frame is drawn on.
625671
* @param flags flags for grid frame sides
@@ -763,13 +809,22 @@ class CORE_EXPORT QgsComposerMapGrid : public QgsComposerMapItem
763809
/**True if coordinate values should be drawn*/
764810
bool mShowGridAnnotation;
765811

766-
/**Annotation position for left map side (inside / outside / not shown)*/
812+
/**Annotation display mode for left map side*/
813+
DisplayMode mLeftGridAnnotationDisplay;
814+
/**Annotation display mode for right map side*/
815+
DisplayMode mRightGridAnnotationDisplay;
816+
/**Annotation display mode for top map side*/
817+
DisplayMode mTopGridAnnotationDisplay;
818+
/**Annotation display mode for bottom map side*/
819+
DisplayMode mBottomGridAnnotationDisplay;
820+
821+
/**Annotation position for left map side (inside / outside)*/
767822
AnnotationPosition mLeftGridAnnotationPosition;
768-
/**Annotation position for right map side (inside / outside / not shown)*/
823+
/**Annotation position for right map side (inside / outside)*/
769824
AnnotationPosition mRightGridAnnotationPosition;
770-
/**Annotation position for top map side (inside / outside / not shown)*/
825+
/**Annotation position for top map side (inside / outside)*/
771826
AnnotationPosition mTopGridAnnotationPosition;
772-
/**Annotation position for bottom map side (inside / outside / not shown)*/
827+
/**Annotation position for bottom map side (inside / outside)*/
773828
AnnotationPosition mBottomGridAnnotationPosition;
774829

775830
/**Distance between map frame and annotation*/
@@ -793,6 +848,15 @@ class CORE_EXPORT QgsComposerMapGrid : public QgsComposerMapItem
793848
QColor mGridFrameFillColor2;
794849
double mCrossLength;
795850

851+
/**Divisions for frame on left map side*/
852+
DisplayMode mLeftFrameDivisions;
853+
/**Divisions for frame on right map side*/
854+
DisplayMode mRightFrameDivisions;
855+
/**Divisions for frame on top map side*/
856+
DisplayMode mTopFrameDivisions;
857+
/**Divisions for frame on bottom map side*/
858+
DisplayMode mBottomFrameDivisions;
859+
796860
QgsLineSymbolV2* mGridLineSymbol;
797861
QgsMarkerSymbolV2* mGridMarkerSymbol;
798862

@@ -891,6 +955,9 @@ class CORE_EXPORT QgsComposerMapGrid : public QgsComposerMapItem
891955

892956
void calculateCRSTransformLines();
893957

958+
bool shouldShowDivisionForSide( const AnnotationCoordinate &coordinate, const QgsComposerMapGrid::BorderSide& side ) const;
959+
bool shouldShowDivisionForDisplayMode( const QgsComposerMapGrid::AnnotationCoordinate &coordinate, const QgsComposerMapGrid::DisplayMode &mode ) const;
960+
894961
friend class TestQgsComposerMapGrid;
895962
};
896963

‎src/ui/qgscomposermapwidgetbase.ui

Lines changed: 130 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454
<property name="geometry">
5555
<rect>
5656
<x>0</x>
57-
<y>-1149</y>
58-
<width>444</width>
59-
<height>2196</height>
57+
<y>-517</y>
58+
<width>484</width>
59+
<height>2445</height>
6060
</rect>
6161
</property>
6262
<property name="sizePolicy">
@@ -543,7 +543,7 @@
543543
<property name="collapsed" stdset="0">
544544
<bool>false</bool>
545545
</property>
546-
<layout class="QGridLayout" name="gridLayout_6" columnstretch="0,1">
546+
<layout class="QGridLayout" name="gridLayout_6" columnstretch="0,0">
547547
<item row="0" column="0">
548548
<widget class="QLabel" name="mGridTypeLabel_2">
549549
<property name="accessibleName">
@@ -854,7 +854,7 @@
854854
</property>
855855
</widget>
856856
</item>
857-
<item row="4" column="0" colspan="3">
857+
<item row="8" column="0" colspan="3">
858858
<layout class="QGridLayout" name="gridLayout_4">
859859
<item row="0" column="0">
860860
<widget class="QCheckBox" name="mCheckGridLeftSide">
@@ -927,6 +927,46 @@
927927
</property>
928928
</widget>
929929
</item>
930+
<item row="5" column="0">
931+
<widget class="QLabel" name="mRightDivisionsLabel">
932+
<property name="text">
933+
<string>Right divisions</string>
934+
</property>
935+
</widget>
936+
</item>
937+
<item row="4" column="0">
938+
<widget class="QLabel" name="mLeftDivisionsLabel">
939+
<property name="text">
940+
<string>Left divisions</string>
941+
</property>
942+
</widget>
943+
</item>
944+
<item row="6" column="0">
945+
<widget class="QLabel" name="mTopDivisionsLabel">
946+
<property name="text">
947+
<string>Top divisions</string>
948+
</property>
949+
</widget>
950+
</item>
951+
<item row="7" column="0">
952+
<widget class="QLabel" name="mBottomDivisionsLabel">
953+
<property name="text">
954+
<string>Bottom divisions</string>
955+
</property>
956+
</widget>
957+
</item>
958+
<item row="4" column="1" colspan="2">
959+
<widget class="QComboBox" name="mFrameDivisionsLeftComboBox"/>
960+
</item>
961+
<item row="5" column="1" colspan="2">
962+
<widget class="QComboBox" name="mFrameDivisionsRightComboBox"/>
963+
</item>
964+
<item row="6" column="1" colspan="2">
965+
<widget class="QComboBox" name="mFrameDivisionsTopComboBox"/>
966+
</item>
967+
<item row="7" column="1" colspan="2">
968+
<widget class="QComboBox" name="mFrameDivisionsBottomComboBox"/>
969+
</item>
930970
</layout>
931971
</widget>
932972
</item>
@@ -957,15 +997,21 @@
957997
<property name="rightMargin">
958998
<number>6</number>
959999
</property>
960-
<item row="0" column="0">
961-
<widget class="QLabel" name="mAnnotationFormatLabel">
1000+
<item row="4" column="0">
1001+
<widget class="QLabel" name="mAnnotationPositionLabelRight">
9621002
<property name="text">
963-
<string>Format</string>
1003+
<string>Right</string>
1004+
</property>
1005+
<property name="wordWrap">
1006+
<bool>true</bool>
1007+
</property>
1008+
<property name="buddy">
1009+
<cstring>mAnnotationPositionRightComboBox</cstring>
9641010
</property>
9651011
</widget>
9661012
</item>
967-
<item row="0" column="1">
968-
<widget class="QComboBox" name="mAnnotationFormatComboBox"/>
1013+
<item row="4" column="1">
1014+
<widget class="QComboBox" name="mAnnotationDisplayRightComboBox"/>
9691015
</item>
9701016
<item row="1" column="0">
9711017
<widget class="QLabel" name="mAnnotationPositionLabelLeft">
@@ -980,91 +1026,62 @@
9801026
</property>
9811027
</widget>
9821028
</item>
983-
<item row="1" column="1">
984-
<widget class="QComboBox" name="mAnnotationPositionLeftComboBox"/>
985-
</item>
986-
<item row="2" column="1">
987-
<widget class="QComboBox" name="mAnnotationDirectionComboBoxLeft"/>
988-
</item>
989-
<item row="3" column="0">
990-
<widget class="QLabel" name="mAnnotationPositionLabelRight">
1029+
<item row="0" column="0">
1030+
<widget class="QLabel" name="mAnnotationFormatLabel">
9911031
<property name="text">
992-
<string>Right</string>
993-
</property>
994-
<property name="wordWrap">
995-
<bool>true</bool>
996-
</property>
997-
<property name="buddy">
998-
<cstring>mAnnotationPositionRightComboBox</cstring>
1032+
<string>Format</string>
9991033
</property>
10001034
</widget>
10011035
</item>
1036+
<item row="0" column="1">
1037+
<widget class="QComboBox" name="mAnnotationFormatComboBox"/>
1038+
</item>
1039+
<item row="2" column="1">
1040+
<widget class="QComboBox" name="mAnnotationPositionLeftComboBox"/>
1041+
</item>
10021042
<item row="3" column="1">
1043+
<widget class="QComboBox" name="mAnnotationDirectionComboBoxLeft"/>
1044+
</item>
1045+
<item row="5" column="1">
10031046
<widget class="QComboBox" name="mAnnotationPositionRightComboBox"/>
10041047
</item>
1005-
<item row="4" column="1">
1048+
<item row="6" column="1">
10061049
<widget class="QComboBox" name="mAnnotationDirectionComboBoxRight"/>
10071050
</item>
1008-
<item row="5" column="0">
1009-
<widget class="QLabel" name="mAnnotationPositionLabelTop">
1010-
<property name="text">
1011-
<string>Top</string>
1012-
</property>
1013-
<property name="wordWrap">
1014-
<bool>true</bool>
1015-
</property>
1016-
<property name="buddy">
1017-
<cstring>mAnnotationPositionTopComboBox</cstring>
1018-
</property>
1019-
</widget>
1020-
</item>
1021-
<item row="5" column="1">
1051+
<item row="8" column="1">
10221052
<widget class="QComboBox" name="mAnnotationPositionTopComboBox"/>
10231053
</item>
1024-
<item row="6" column="1">
1054+
<item row="9" column="1">
10251055
<widget class="QComboBox" name="mAnnotationDirectionComboBoxTop"/>
10261056
</item>
1027-
<item row="7" column="0">
1028-
<widget class="QLabel" name="mAnnotationPositionLabelBottom">
1029-
<property name="text">
1030-
<string>Bottom</string>
1031-
</property>
1032-
<property name="wordWrap">
1033-
<bool>true</bool>
1034-
</property>
1035-
<property name="buddy">
1036-
<cstring>mAnnotationPositionRightComboBox</cstring>
1037-
</property>
1038-
</widget>
1039-
</item>
1040-
<item row="7" column="1">
1057+
<item row="11" column="1">
10411058
<widget class="QComboBox" name="mAnnotationPositionBottomComboBox"/>
10421059
</item>
1043-
<item row="8" column="1">
1060+
<item row="12" column="1">
10441061
<widget class="QComboBox" name="mAnnotationDirectionComboBoxBottom"/>
10451062
</item>
1046-
<item row="9" column="0">
1063+
<item row="13" column="0">
10471064
<widget class="QLabel" name="label">
10481065
<property name="text">
10491066
<string>Font</string>
10501067
</property>
10511068
</widget>
10521069
</item>
1053-
<item row="9" column="1">
1070+
<item row="13" column="1">
10541071
<widget class="QPushButton" name="mAnnotationFontButton">
10551072
<property name="text">
10561073
<string>Font...</string>
10571074
</property>
10581075
</widget>
10591076
</item>
1060-
<item row="10" column="0">
1077+
<item row="14" column="0">
10611078
<widget class="QLabel" name="mFontColorLabel">
10621079
<property name="text">
10631080
<string>Font color</string>
10641081
</property>
10651082
</widget>
10661083
</item>
1067-
<item row="10" column="1">
1084+
<item row="14" column="1">
10681085
<widget class="QgsColorButtonV2" name="mAnnotationFontColorButton">
10691086
<property name="minimumSize">
10701087
<size>
@@ -1083,7 +1100,7 @@
10831100
</property>
10841101
</widget>
10851102
</item>
1086-
<item row="11" column="0">
1103+
<item row="15" column="0">
10871104
<widget class="QLabel" name="mDistanceToFrameLabel">
10881105
<property name="text">
10891106
<string>Distance to map frame</string>
@@ -1096,14 +1113,14 @@
10961113
</property>
10971114
</widget>
10981115
</item>
1099-
<item row="11" column="1">
1116+
<item row="15" column="1">
11001117
<widget class="QDoubleSpinBox" name="mDistanceToMapFrameSpinBox">
11011118
<property name="suffix">
11021119
<string> mm</string>
11031120
</property>
11041121
</widget>
11051122
</item>
1106-
<item row="12" column="0">
1123+
<item row="16" column="0">
11071124
<widget class="QLabel" name="mCoordinatePrecisionLabel">
11081125
<property name="text">
11091126
<string>Coordinate precision</string>
@@ -1116,9 +1133,44 @@
11161133
</property>
11171134
</widget>
11181135
</item>
1119-
<item row="12" column="1">
1136+
<item row="16" column="1">
11201137
<widget class="QSpinBox" name="mCoordinatePrecisionSpinBox"/>
11211138
</item>
1139+
<item row="1" column="1">
1140+
<widget class="QComboBox" name="mAnnotationDisplayLeftComboBox"/>
1141+
</item>
1142+
<item row="7" column="0">
1143+
<widget class="QLabel" name="mAnnotationPositionLabelTop">
1144+
<property name="text">
1145+
<string>Top</string>
1146+
</property>
1147+
<property name="wordWrap">
1148+
<bool>true</bool>
1149+
</property>
1150+
<property name="buddy">
1151+
<cstring>mAnnotationPositionTopComboBox</cstring>
1152+
</property>
1153+
</widget>
1154+
</item>
1155+
<item row="7" column="1">
1156+
<widget class="QComboBox" name="mAnnotationDisplayTopComboBox"/>
1157+
</item>
1158+
<item row="10" column="1">
1159+
<widget class="QComboBox" name="mAnnotationDisplayBottomComboBox"/>
1160+
</item>
1161+
<item row="10" column="0">
1162+
<widget class="QLabel" name="mAnnotationPositionLabelBottom">
1163+
<property name="text">
1164+
<string>Bottom</string>
1165+
</property>
1166+
<property name="wordWrap">
1167+
<bool>true</bool>
1168+
</property>
1169+
<property name="buddy">
1170+
<cstring>mAnnotationPositionRightComboBox</cstring>
1171+
</property>
1172+
</widget>
1173+
</item>
11221174
</layout>
11231175
</widget>
11241176
</item>
@@ -1300,9 +1352,9 @@
13001352
<layoutdefault spacing="6" margin="11"/>
13011353
<customwidgets>
13021354
<customwidget>
1303-
<class>QgsCollapsibleGroupBoxBasic</class>
1304-
<extends>QGroupBox</extends>
1305-
<header location="global">qgscollapsiblegroupbox.h</header>
1355+
<class>QgsColorButtonV2</class>
1356+
<extends>QToolButton</extends>
1357+
<header>qgscolorbuttonv2.h</header>
13061358
<container>1</container>
13071359
</customwidget>
13081360
<customwidget>
@@ -1311,9 +1363,9 @@
13111363
<header>qgsdatadefinedbutton.h</header>
13121364
</customwidget>
13131365
<customwidget>
1314-
<class>QgsColorButtonV2</class>
1315-
<extends>QToolButton</extends>
1316-
<header>qgscolorbuttonv2.h</header>
1366+
<class>QgsCollapsibleGroupBoxBasic</class>
1367+
<extends>QGroupBox</extends>
1368+
<header location="global">qgscollapsiblegroupbox.h</header>
13171369
<container>1</container>
13181370
</customwidget>
13191371
<customwidget>
@@ -1376,18 +1428,26 @@
13761428
<tabstop>mGridFramePenColorButton</tabstop>
13771429
<tabstop>mGridFrameFill1ColorButton</tabstop>
13781430
<tabstop>mGridFrameFill2ColorButton</tabstop>
1431+
<tabstop>mFrameDivisionsLeftComboBox</tabstop>
1432+
<tabstop>mFrameDivisionsRightComboBox</tabstop>
1433+
<tabstop>mFrameDivisionsTopComboBox</tabstop>
1434+
<tabstop>mFrameDivisionsBottomComboBox</tabstop>
13791435
<tabstop>mCheckGridLeftSide</tabstop>
13801436
<tabstop>mCheckGridRightSide</tabstop>
13811437
<tabstop>mCheckGridTopSide</tabstop>
13821438
<tabstop>mCheckGridBottomSide</tabstop>
13831439
<tabstop>mDrawAnnotationGroupBox</tabstop>
13841440
<tabstop>mAnnotationFormatComboBox</tabstop>
1441+
<tabstop>mAnnotationDisplayLeftComboBox</tabstop>
13851442
<tabstop>mAnnotationPositionLeftComboBox</tabstop>
13861443
<tabstop>mAnnotationDirectionComboBoxLeft</tabstop>
1444+
<tabstop>mAnnotationDisplayRightComboBox</tabstop>
13871445
<tabstop>mAnnotationPositionRightComboBox</tabstop>
13881446
<tabstop>mAnnotationDirectionComboBoxRight</tabstop>
1447+
<tabstop>mAnnotationDisplayTopComboBox</tabstop>
13891448
<tabstop>mAnnotationPositionTopComboBox</tabstop>
13901449
<tabstop>mAnnotationDirectionComboBoxTop</tabstop>
1450+
<tabstop>mAnnotationDisplayBottomComboBox</tabstop>
13911451
<tabstop>mAnnotationPositionBottomComboBox</tabstop>
13921452
<tabstop>mAnnotationDirectionComboBoxBottom</tabstop>
13931453
<tabstop>mAnnotationFontButton</tabstop>

‎tests/src/core/testqgscomposermapgrid.cpp

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ class TestQgsComposerMapGrid: public QObject
4040
void frameOnly(); //test if grid "frame/annotation" mode works
4141
void zebraStyle(); //test zebra map border style
4242
void zebraStyleSides(); //test zebra border on certain sides
43+
void frameDivisions(); //test filtering frame divisions
44+
void annotationFilter(); //test filtering annotations
4345
void interiorTicks(); //test interior tick mode
4446
void interiorTicksAnnotated(); //test interior tick mode with annotations
4547
void exteriorTicks(); //test exterior tick mode
@@ -247,6 +249,89 @@ void TestQgsComposerMapGrid::zebraStyleSides()
247249

248250
}
249251

252+
void TestQgsComposerMapGrid::frameDivisions()
253+
{
254+
mComposerMap->setNewExtent( QgsRectangle( 781662.375, 3339523.125, 793062.375, 3345223.125 ) );
255+
//rotate map, so we mix latitude and longitude coordinates on every map side
256+
mComposerMap->setMapRotation( 45.0 );
257+
258+
//setup defaults
259+
mComposerMap->grid()->setGridLineColor( QColor( 0, 0, 0 ) );
260+
mComposerMap->grid()->setAnnotationFontColor( QColor( 0, 0, 0, 0 ) );
261+
mComposerMap->grid()->setBlendMode( QPainter::CompositionMode_SourceOver );
262+
mComposerMap->grid()->setFrameStyle( QgsComposerMapGrid::Zebra );
263+
mComposerMap->grid()->setFrameWidth( 10 );
264+
mComposerMap->grid()->setFramePenSize( 1 );
265+
mComposerMap->grid()->setFramePenColor( Qt::black );
266+
mComposerMap->grid()->setFrameFillColor1( Qt::black );
267+
mComposerMap->grid()->setFrameFillColor2( Qt::white );
268+
mComposerMap->grid()->setEnabled( true );
269+
mComposerMap->grid()->setFrameSideFlag( QgsComposerMapGrid::FrameLeft, true );
270+
mComposerMap->grid()->setFrameSideFlag( QgsComposerMapGrid::FrameRight, true );
271+
mComposerMap->grid()->setFrameSideFlag( QgsComposerMapGrid::FrameTop, true );
272+
mComposerMap->grid()->setFrameSideFlag( QgsComposerMapGrid::FrameBottom, true );
273+
274+
QgsCompositionChecker checker( "composermap_rotatedframe", mComposition );
275+
bool testResult = checker.testComposition( mReport, 0, 0 );
276+
QVERIFY( testResult );
277+
278+
mComposerMap->grid()->setFrameDivisions( QgsComposerMapGrid::LatitudeOnly, QgsComposerMapGrid::Left );
279+
mComposerMap->grid()->setFrameDivisions( QgsComposerMapGrid::LongitudeOnly, QgsComposerMapGrid::Right );
280+
mComposerMap->grid()->setFrameDivisions( QgsComposerMapGrid::LatitudeOnly, QgsComposerMapGrid::Top );
281+
mComposerMap->grid()->setFrameDivisions( QgsComposerMapGrid::LongitudeOnly, QgsComposerMapGrid::Bottom );
282+
283+
QgsCompositionChecker checker2( "composermap_framedivisions", mComposition );
284+
testResult = checker2.testComposition( mReport, 0, 0 );
285+
QVERIFY( testResult );
286+
287+
mComposerMap->grid()->setFrameDivisions( QgsComposerMapGrid::ShowAll, QgsComposerMapGrid::Left );
288+
mComposerMap->grid()->setFrameDivisions( QgsComposerMapGrid::ShowAll, QgsComposerMapGrid::Right );
289+
mComposerMap->grid()->setFrameDivisions( QgsComposerMapGrid::ShowAll, QgsComposerMapGrid::Top );
290+
mComposerMap->grid()->setFrameDivisions( QgsComposerMapGrid::ShowAll, QgsComposerMapGrid::Bottom );
291+
mComposerMap->grid()->setFrameStyle( QgsComposerMapGrid::NoFrame );
292+
mComposerMap->setMapRotation( 0.0 );
293+
}
294+
295+
void TestQgsComposerMapGrid::annotationFilter()
296+
{
297+
mComposerMap->setNewExtent( QgsRectangle( 781662.375, 3339523.125, 793062.375, 3345223.125 ) );
298+
//rotate map, so we mix latitude and longitude coordinates on every map side
299+
mComposerMap->setMapRotation( 45.0 );
300+
301+
//setup defaults
302+
mComposerMap->grid()->setGridLineColor( QColor( 0, 0, 0 ) );
303+
mComposerMap->grid()->setAnnotationFontColor( QColor( 0, 0, 0, 0 ) );
304+
mComposerMap->grid()->setBlendMode( QPainter::CompositionMode_SourceOver );
305+
mComposerMap->grid()->setFrameStyle( QgsComposerMapGrid::NoFrame );
306+
mComposerMap->grid()->setEnabled( true );
307+
mComposerMap->grid()->setAnnotationEnabled( true );
308+
mComposerMap->grid()->setAnnotationFontColor( Qt::black );
309+
mComposerMap->grid()->setAnnotationPosition( QgsComposerMapGrid::OutsideMapFrame, QgsComposerMapGrid::Left );
310+
mComposerMap->grid()->setAnnotationPosition( QgsComposerMapGrid::OutsideMapFrame, QgsComposerMapGrid::Right );
311+
mComposerMap->grid()->setAnnotationPosition( QgsComposerMapGrid::OutsideMapFrame, QgsComposerMapGrid::Top );
312+
mComposerMap->grid()->setAnnotationPosition( QgsComposerMapGrid::OutsideMapFrame, QgsComposerMapGrid::Bottom );
313+
314+
QgsCompositionChecker checker( "composermap_rotatedannotations", mComposition );
315+
bool testResult = checker.testComposition( mReport, 0, 0 );
316+
QVERIFY( testResult );
317+
318+
mComposerMap->grid()->setAnnotationDisplay( QgsComposerMapGrid::HideAll, QgsComposerMapGrid::Left );
319+
mComposerMap->grid()->setAnnotationDisplay( QgsComposerMapGrid::LongitudeOnly, QgsComposerMapGrid::Right );
320+
mComposerMap->grid()->setAnnotationDisplay( QgsComposerMapGrid::LatitudeOnly, QgsComposerMapGrid::Top );
321+
mComposerMap->grid()->setAnnotationDisplay( QgsComposerMapGrid::LongitudeOnly, QgsComposerMapGrid::Bottom );
322+
323+
QgsCompositionChecker checker2( "composermap_filteredannotations", mComposition );
324+
testResult = checker2.testComposition( mReport, 0, 0 );
325+
QVERIFY( testResult );
326+
327+
mComposerMap->grid()->setAnnotationEnabled( false );
328+
mComposerMap->grid()->setAnnotationDisplay( QgsComposerMapGrid::ShowAll, QgsComposerMapGrid::Left );
329+
mComposerMap->grid()->setAnnotationDisplay( QgsComposerMapGrid::ShowAll, QgsComposerMapGrid::Right );
330+
mComposerMap->grid()->setAnnotationDisplay( QgsComposerMapGrid::ShowAll, QgsComposerMapGrid::Top );
331+
mComposerMap->grid()->setAnnotationDisplay( QgsComposerMapGrid::ShowAll, QgsComposerMapGrid::Bottom );
332+
mComposerMap->setMapRotation( 0.0 );
333+
}
334+
250335
void TestQgsComposerMapGrid::interiorTicks()
251336
{
252337
mComposerMap->setNewExtent( QgsRectangle( 781662.375, 3339523.125, 793062.375, 3345223.125 ) );

0 commit comments

Comments
 (0)
Please sign in to comment.