Skip to content
Permalink
Browse files

rotated ticks folloup : prepare_commit

  • Loading branch information
olivierdalang authored and nyalldawson committed Oct 7, 2020
1 parent f8d7743 commit ce249b593301f0b7f69bdfada22f2d9b78bc5498
Showing with 21 additions and 12 deletions.
  1. +8 −0 python/core/auto_generated/layout/qgslayoutobject.sip.in
  2. +13 −12 src/core/layout/qgslayoutitemmapgrid.cpp
@@ -146,6 +146,14 @@ A base class for objects which belong to a layout.
MapGridLabelDistance,
MapGridCrossSize,
MapGridFrameLineThickness,
MapGridAnnotationDisplayLeft,
MapGridAnnotationDisplayRight,
MapGridAnnotationDisplayTop,
MapGridAnnotationDisplayBottom,
MapGridFrameDivisionsLeft,
MapGridFrameDivisionsRight,
MapGridFrameDivisionsTop,
MapGridFrameDivisionsBottom,
//composer picture
PictureSource,
PictureSvgBackgroundColor,
@@ -1912,12 +1912,13 @@ bool QgsLayoutItemMapGrid::shouldShowForDisplayMode( QgsLayoutItemMapGrid::Annot
}


QgsLayoutItemMapGrid::DisplayMode gridAnnotationDisplayModeFromDD(QString ddValue) {
if( ddValue == QStringLiteral("x_only") )
QgsLayoutItemMapGrid::DisplayMode gridAnnotationDisplayModeFromDD( QString ddValue )
{
if ( ddValue == QStringLiteral( "x_only" ) )
return QgsLayoutItemMapGrid::LatitudeOnly;
else if ( ddValue == QStringLiteral("y_only") )
else if ( ddValue == QStringLiteral( "y_only" ) )
return QgsLayoutItemMapGrid::LongitudeOnly;
else if ( ddValue == QStringLiteral("disabled") )
else if ( ddValue == QStringLiteral( "disabled" ) )
return QgsLayoutItemMapGrid::HideAll;
else // if ( ddValue == QStringLiteral("all") )
return QgsLayoutItemMapGrid::ShowAll;
@@ -1966,14 +1967,14 @@ void QgsLayoutItemMapGrid::refreshDataDefinedProperties()
mEvaluatedAnnotationFrameDistance = mDataDefinedProperties.valueAsDouble( QgsLayoutObject::MapGridLabelDistance, context, mAnnotationFrameDistance );
mEvaluatedCrossLength = mDataDefinedProperties.valueAsDouble( QgsLayoutObject::MapGridCrossSize, context, mCrossLength );
mEvaluatedGridFrameLineThickness = mDataDefinedProperties.valueAsDouble( QgsLayoutObject::MapGridFrameLineThickness, context, mGridFramePenThickness );
mEvaluatedLeftGridAnnotationDisplay = gridAnnotationDisplayModeFromDD( mDataDefinedProperties.valueAsString( QgsLayoutObject::MapGridAnnotationDisplayLeft, context, QStringLiteral("all") ) );
mEvaluatedRightGridAnnotationDisplay = gridAnnotationDisplayModeFromDD( mDataDefinedProperties.valueAsString( QgsLayoutObject::MapGridAnnotationDisplayRight, context, QStringLiteral("all") ) );
mEvaluatedTopGridAnnotationDisplay = gridAnnotationDisplayModeFromDD( mDataDefinedProperties.valueAsString( QgsLayoutObject::MapGridAnnotationDisplayTop, context, QStringLiteral("all") ) );
mEvaluatedBottomGridAnnotationDisplay = gridAnnotationDisplayModeFromDD( mDataDefinedProperties.valueAsString( QgsLayoutObject::MapGridAnnotationDisplayBottom, context, QStringLiteral("all") ) );
mEvaluatedLeftFrameDivisions = gridAnnotationDisplayModeFromDD( mDataDefinedProperties.valueAsString( QgsLayoutObject::MapGridFrameDivisionsLeft, context, QStringLiteral("all") ) );
mEvaluatedRightFrameDivisions = gridAnnotationDisplayModeFromDD( mDataDefinedProperties.valueAsString( QgsLayoutObject::MapGridFrameDivisionsRight, context, QStringLiteral("all") ) );
mEvaluatedTopFrameDivisions = gridAnnotationDisplayModeFromDD( mDataDefinedProperties.valueAsString( QgsLayoutObject::MapGridFrameDivisionsTop, context, QStringLiteral("all") ) );
mEvaluatedBottomFrameDivisions = gridAnnotationDisplayModeFromDD( mDataDefinedProperties.valueAsString( QgsLayoutObject::MapGridFrameDivisionsBottom, context, QStringLiteral("all") ) );
mEvaluatedLeftGridAnnotationDisplay = gridAnnotationDisplayModeFromDD( mDataDefinedProperties.valueAsString( QgsLayoutObject::MapGridAnnotationDisplayLeft, context, QStringLiteral( "all" ) ) );
mEvaluatedRightGridAnnotationDisplay = gridAnnotationDisplayModeFromDD( mDataDefinedProperties.valueAsString( QgsLayoutObject::MapGridAnnotationDisplayRight, context, QStringLiteral( "all" ) ) );
mEvaluatedTopGridAnnotationDisplay = gridAnnotationDisplayModeFromDD( mDataDefinedProperties.valueAsString( QgsLayoutObject::MapGridAnnotationDisplayTop, context, QStringLiteral( "all" ) ) );
mEvaluatedBottomGridAnnotationDisplay = gridAnnotationDisplayModeFromDD( mDataDefinedProperties.valueAsString( QgsLayoutObject::MapGridAnnotationDisplayBottom, context, QStringLiteral( "all" ) ) );
mEvaluatedLeftFrameDivisions = gridAnnotationDisplayModeFromDD( mDataDefinedProperties.valueAsString( QgsLayoutObject::MapGridFrameDivisionsLeft, context, QStringLiteral( "all" ) ) );
mEvaluatedRightFrameDivisions = gridAnnotationDisplayModeFromDD( mDataDefinedProperties.valueAsString( QgsLayoutObject::MapGridFrameDivisionsRight, context, QStringLiteral( "all" ) ) );
mEvaluatedTopFrameDivisions = gridAnnotationDisplayModeFromDD( mDataDefinedProperties.valueAsString( QgsLayoutObject::MapGridFrameDivisionsTop, context, QStringLiteral( "all" ) ) );
mEvaluatedBottomFrameDivisions = gridAnnotationDisplayModeFromDD( mDataDefinedProperties.valueAsString( QgsLayoutObject::MapGridFrameDivisionsBottom, context, QStringLiteral( "all" ) ) );

}

0 comments on commit ce249b5

Please sign in to comment.
You can’t perform that action at this time.