167 changes: 143 additions & 24 deletions src/core/composer/qgscomposermap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@
***************************************************************************/

#include "qgscomposermap.h"

#include "qgscoordinatetransform.h"
#include "qgslogger.h"
#include "qgsmaprenderer.h"
#include "qgsmaplayer.h"
#include "qgsmaplayerregistry.h"
#include "qgsmaptopixel.h"
#include "qgsproject.h"
Expand All @@ -42,7 +40,9 @@
QgsComposerMap::QgsComposerMap( QgsComposition *composition, int x, int y, int width, int height )
: QgsComposerItem( x, y, width, height, composition ), mKeepLayerSet( false ), mGridEnabled( false ), mGridStyle( Solid ),
mGridIntervalX( 0.0 ), mGridIntervalY( 0.0 ), mGridOffsetX( 0.0 ), mGridOffsetY( 0.0 ), mGridAnnotationPrecision( 3 ), mShowGridAnnotation( false ),
mGridAnnotationPosition( OutsideMapFrame ), mAnnotationFrameDistance( 1.0 ), mGridAnnotationDirection( Horizontal ),
mLeftGridAnnotationPosition( OutsideMapFrame ), mRightGridAnnotationPosition( OutsideMapFrame ), mTopGridAnnotationPosition( OutsideMapFrame ),
mBottomGridAnnotationPosition( OutsideMapFrame ), mAnnotationFrameDistance( 1.0 ), mLeftGridAnnotationDirection( Horizontal ), mRightGridAnnotationDirection( Horizontal ),
mTopGridAnnotationDirection( Horizontal ), mBottomGridAnnotationDirection( Horizontal ),
mCrossLength( 3 ), mMapCanvas( 0 ), mDrawCanvasItems( true )
{
mComposition = composition;
Expand Down Expand Up @@ -87,7 +87,9 @@ QgsComposerMap::QgsComposerMap( QgsComposition *composition, int x, int y, int w
QgsComposerMap::QgsComposerMap( QgsComposition *composition )
: QgsComposerItem( 0, 0, 10, 10, composition ), mKeepLayerSet( false ), mGridEnabled( false ), mGridStyle( Solid ),
mGridIntervalX( 0.0 ), mGridIntervalY( 0.0 ), mGridOffsetX( 0.0 ), mGridOffsetY( 0.0 ), mGridAnnotationPrecision( 3 ), mShowGridAnnotation( false ),
mGridAnnotationPosition( OutsideMapFrame ), mAnnotationFrameDistance( 1.0 ), mGridAnnotationDirection( Horizontal ), mCrossLength( 3 ),
mLeftGridAnnotationPosition( OutsideMapFrame ), mRightGridAnnotationPosition( OutsideMapFrame ), mTopGridAnnotationPosition( OutsideMapFrame ),
mBottomGridAnnotationPosition( OutsideMapFrame ), mAnnotationFrameDistance( 1.0 ), mLeftGridAnnotationDirection( Horizontal ), mRightGridAnnotationDirection( Horizontal ),
mTopGridAnnotationDirection( Horizontal ), mBottomGridAnnotationDirection( Horizontal ), mCrossLength( 3 ),
mMapCanvas( 0 ), mDrawCanvasItems( true )
{
//Offset
Expand Down Expand Up @@ -694,9 +696,15 @@ bool QgsComposerMap::writeXML( QDomElement& elem, QDomDocument & doc ) const
//grid annotation
QDomElement annotationElem = doc.createElement( "Annotation" );
annotationElem.setAttribute( "show", mShowGridAnnotation );
annotationElem.setAttribute( "position", mGridAnnotationPosition );
annotationElem.setAttribute( "leftPosition", mLeftGridAnnotationPosition );
annotationElem.setAttribute( "rightPosition", mRightGridAnnotationPosition );
annotationElem.setAttribute( "topPosition", mTopGridAnnotationPosition );
annotationElem.setAttribute( "bottomPosition", mBottomGridAnnotationPosition );
annotationElem.setAttribute( "leftDirection", mLeftGridAnnotationDirection );
annotationElem.setAttribute( "rightDirection", mRightGridAnnotationDirection );
annotationElem.setAttribute( "topDirection", mTopGridAnnotationDirection );
annotationElem.setAttribute( "bottomDirection", mBottomGridAnnotationDirection );
annotationElem.setAttribute( "frameDistance", QString::number( mAnnotationFrameDistance ) );
annotationElem.setAttribute( "direction", mGridAnnotationDirection );
annotationElem.setAttribute( "font", mGridAnnotationFont.toString() );
annotationElem.setAttribute( "precision", mGridAnnotationPrecision );

Expand Down Expand Up @@ -811,7 +819,15 @@ bool QgsComposerMap::readXML( const QDomElement& itemElem, const QDomDocument& d
{
QDomElement annotationElem = annotationNodeList.at( 0 ).toElement();
mShowGridAnnotation = ( annotationElem.attribute( "show", "0" ) != "0" );
mGridAnnotationPosition = QgsComposerMap::GridAnnotationPosition( annotationElem.attribute( "position", "0" ).toInt() );
mLeftGridAnnotationPosition = QgsComposerMap::GridAnnotationPosition( annotationElem.attribute( "leftPosition", "0" ).toInt() );
mRightGridAnnotationPosition = QgsComposerMap::GridAnnotationPosition( annotationElem.attribute( "rightPosition", "0" ).toInt() );
mTopGridAnnotationPosition = QgsComposerMap::GridAnnotationPosition( annotationElem.attribute( "topPosition", "0" ).toInt() );
mBottomGridAnnotationPosition = QgsComposerMap::GridAnnotationPosition( annotationElem.attribute( "bottomPosition", "0" ).toInt() );
mLeftGridAnnotationDirection = QgsComposerMap::GridAnnotationDirection( annotationElem.attribute( "leftDirection", "0" ).toInt() );
mRightGridAnnotationDirection = QgsComposerMap::GridAnnotationDirection( annotationElem.attribute( "rightDirection", "0" ).toInt() );
mTopGridAnnotationDirection = QgsComposerMap::GridAnnotationDirection( annotationElem.attribute( "topDirection", "0" ).toInt() );
mBottomGridAnnotationDirection = QgsComposerMap::GridAnnotationDirection( annotationElem.attribute( "bottomDirection", "0" ).toInt() );

mAnnotationFrameDistance = annotationElem.attribute( "frameDistance", "0" ).toDouble();
mGridAnnotationDirection = QgsComposerMap::GridAnnotationDirection( annotationElem.attribute( "direction", "0" ).toInt() );
mGridAnnotationFont.fromString( annotationElem.attribute( "font", "" ) );
Expand Down Expand Up @@ -991,9 +1007,9 @@ void QgsComposerMap::drawCoordinateAnnotation( QPainter* p, const QPointF& pos,
if ( frameBorder == Left )
{

if ( mGridAnnotationPosition == InsideMapFrame )
if ( mLeftGridAnnotationPosition == InsideMapFrame )
{
if ( mGridAnnotationDirection == Vertical || mGridAnnotationDirection == BoundaryDirection )
if ( mLeftGridAnnotationDirection == Vertical || mLeftGridAnnotationDirection == BoundaryDirection )
{
xpos += textHeight + mAnnotationFrameDistance;
ypos += textWidth / 2.0;
Expand All @@ -1005,9 +1021,9 @@ void QgsComposerMap::drawCoordinateAnnotation( QPainter* p, const QPointF& pos,
ypos += textHeight / 2.0;
}
}
else //Outside map frame
else if ( mLeftGridAnnotationPosition == OutsideMapFrame ) //Outside map frame
{
if ( mGridAnnotationDirection == Vertical || mGridAnnotationDirection == BoundaryDirection )
if ( mLeftGridAnnotationDirection == Vertical || mLeftGridAnnotationDirection == BoundaryDirection )
{
xpos -= mAnnotationFrameDistance;
ypos += textWidth / 2.0;
Expand All @@ -1019,27 +1035,31 @@ void QgsComposerMap::drawCoordinateAnnotation( QPainter* p, const QPointF& pos,
ypos += textHeight / 2.0;
}
}
else
{
return;
}

}
else if ( frameBorder == Right )
{
if ( mGridAnnotationPosition == InsideMapFrame )
if ( mRightGridAnnotationPosition == InsideMapFrame )
{
if ( mGridAnnotationDirection == Vertical || mGridAnnotationDirection == BoundaryDirection )
if ( mRightGridAnnotationDirection == Vertical || mRightGridAnnotationDirection == BoundaryDirection )
{
xpos -= mAnnotationFrameDistance;
ypos += textWidth / 2.0;
rotation = 270;
}
else //Horizontal
else
{
xpos -= textWidth + mAnnotationFrameDistance;
ypos += textHeight / 2.0;
}
}
else //OutsideMapFrame
else if ( mRightGridAnnotationPosition == OutsideMapFrame )//OutsideMapFrame
{
if ( mGridAnnotationDirection == Vertical || mGridAnnotationDirection == BoundaryDirection )
if ( mRightGridAnnotationDirection == Vertical || mRightGridAnnotationDirection == BoundaryDirection )
{
xpos += textHeight + mAnnotationFrameDistance;
ypos += textWidth / 2.0;
Expand All @@ -1051,12 +1071,16 @@ void QgsComposerMap::drawCoordinateAnnotation( QPainter* p, const QPointF& pos,
ypos += textHeight / 2.0;
}
}
else
{
return;
}
}
else if ( frameBorder == Bottom )
{
if ( mGridAnnotationPosition == InsideMapFrame )
if ( mBottomGridAnnotationPosition == InsideMapFrame )
{
if ( mGridAnnotationDirection == Horizontal || mGridAnnotationDirection == BoundaryDirection )
if ( mBottomGridAnnotationDirection == Horizontal || mBottomGridAnnotationDirection == BoundaryDirection )
{
ypos -= mAnnotationFrameDistance;
xpos -= textWidth / 2.0;
Expand All @@ -1068,9 +1092,9 @@ void QgsComposerMap::drawCoordinateAnnotation( QPainter* p, const QPointF& pos,
rotation = 270;
}
}
else //OutsideMapFrame
else if ( mBottomGridAnnotationPosition == OutsideMapFrame ) //OutsideMapFrame
{
if ( mGridAnnotationDirection == Horizontal || mGridAnnotationDirection == BoundaryDirection )
if ( mBottomGridAnnotationDirection == Horizontal || mBottomGridAnnotationDirection == BoundaryDirection )
{
ypos += mAnnotationFrameDistance + textHeight;
xpos -= textWidth / 2.0;
Expand All @@ -1082,12 +1106,16 @@ void QgsComposerMap::drawCoordinateAnnotation( QPainter* p, const QPointF& pos,
rotation = 270;
}
}
else
{
return;
}
}
else //Top
{
if ( mGridAnnotationPosition == InsideMapFrame )
if ( mTopGridAnnotationPosition == InsideMapFrame )
{
if ( mGridAnnotationDirection == Horizontal || mGridAnnotationDirection == BoundaryDirection )
if ( mTopGridAnnotationDirection == Horizontal || mTopGridAnnotationDirection == BoundaryDirection )
{
xpos -= textWidth / 2.0;
ypos += textHeight + mAnnotationFrameDistance;
Expand All @@ -1099,9 +1127,9 @@ void QgsComposerMap::drawCoordinateAnnotation( QPainter* p, const QPointF& pos,
rotation = 270;
}
}
else //OutsideMapFrame
else if ( mTopGridAnnotationPosition == OutsideMapFrame ) //OutsideMapFrame
{
if ( mGridAnnotationDirection == Horizontal || mGridAnnotationDirection == BoundaryDirection )
if ( mTopGridAnnotationDirection == Horizontal || mTopGridAnnotationDirection == BoundaryDirection )
{
xpos -= textWidth / 2.0;
ypos -= mAnnotationFrameDistance;
Expand All @@ -1113,6 +1141,10 @@ void QgsComposerMap::drawCoordinateAnnotation( QPainter* p, const QPointF& pos,
rotation = 270;
}
}
else
{
return;
}
}

drawAnnotation( p, QPointF( xpos, ypos ), rotation, annotationString );
Expand Down Expand Up @@ -1611,3 +1643,90 @@ QPointF QgsComposerMap::composerMapPosForItem( const QGraphicsItem* item ) const
double mapY = mapRendererExtent.yMaximum() - itemScenePos.y() / graphicsSceneRect.height() * mapRendererExtent.height();
return mapToItemCoords( QPointF( mapX, mapY ) );
}

void QgsComposerMap::setGridAnnotationPosition( GridAnnotationPosition p, QgsComposerMap::Border border )
{
switch ( border )
{
case QgsComposerMap::Left:
mLeftGridAnnotationPosition = p;
break;
case QgsComposerMap::Right:
mRightGridAnnotationPosition = p;
break;
case QgsComposerMap::Top:
mTopGridAnnotationPosition = p;
break;
case QgsComposerMap::Bottom:
mBottomGridAnnotationPosition = p;
break;
default:
return;
}
updateBoundingRect();
update();
}

QgsComposerMap::GridAnnotationPosition QgsComposerMap::gridAnnotationPosition( QgsComposerMap::Border border ) const
{
switch ( border )
{
case QgsComposerMap::Left:
return mLeftGridAnnotationPosition;
break;
case QgsComposerMap::Right:
return mRightGridAnnotationPosition;
break;
case QgsComposerMap::Top:
return mTopGridAnnotationPosition;
break;
case QgsComposerMap::Bottom:
default:
return mBottomGridAnnotationPosition;
break;
}
}

void QgsComposerMap::setGridAnnotationDirection( GridAnnotationDirection d, QgsComposerMap::Border border )
{
switch ( border )
{
case QgsComposerMap::Left:
mLeftGridAnnotationDirection = d;
break;
case QgsComposerMap::Right:
mRightGridAnnotationDirection = d;
break;
case QgsComposerMap::Top:
mTopGridAnnotationDirection = d;
break;
case QgsComposerMap::Bottom:
mBottomGridAnnotationDirection = d;
break;
default:
return;
break;
}
updateBoundingRect();
update();
}

QgsComposerMap::GridAnnotationDirection QgsComposerMap::gridAnnotationDirection( QgsComposerMap::Border border ) const
{
switch ( border )
{
case QgsComposerMap::Left:
return mLeftGridAnnotationDirection;
break;
case QgsComposerMap::Right:
return mRightGridAnnotationDirection;
break;
case QgsComposerMap::Top:
return mTopGridAnnotationDirection;
break;
case QgsComposerMap::Bottom:
default:
return mBottomGridAnnotationDirection;
break;
}
}
47 changes: 37 additions & 10 deletions src/core/composer/qgscomposermap.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
enum GridAnnotationPosition
{
InsideMapFrame = 0,
OutsideMapFrame
OutsideMapFrame,
Disabled
};

enum GridAnnotationDirection
Expand All @@ -77,6 +78,15 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
BoundaryDirection
};

/**Enum for different frame borders*/
enum Border
{
Left,
Right,
Bottom,
Top
};

/**This function is deprecated*/
void draw( QPainter *painter, const QgsRectangle& extent, const QSize& size, int dpi );

Expand Down Expand Up @@ -232,6 +242,9 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
void setGridAnnotationPosition( GridAnnotationPosition p ) {mGridAnnotationPosition = p;}
GridAnnotationPosition gridAnnotationPosition() const {return mGridAnnotationPosition;}

void setGridAnnotationPosition( GridAnnotationPosition p, QgsComposerMap::Border border );
GridAnnotationPosition gridAnnotationPosition( QgsComposerMap::Border border ) const;

/**Sets distance between map frame and annotations
@note this function was added in version 1.4*/
void setAnnotationFrameDistance( double d ) {mAnnotationFrameDistance = d;}
Expand All @@ -242,6 +255,9 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
void setGridAnnotationDirection( GridAnnotationDirection d ) {mGridAnnotationDirection = d;}
GridAnnotationDirection gridAnnotationDirection() const {return mGridAnnotationDirection;}

void setGridAnnotationDirection( GridAnnotationDirection d, QgsComposerMap::Border border );
GridAnnotationDirection gridAnnotationDirection( QgsComposerMap::Border border ) const;

/**In case of annotations, the bounding rectangle can be larger than the map item rectangle
@note this function was added in version 1.4*/
QRectF boundingRect() const;
Expand Down Expand Up @@ -279,15 +295,6 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem

private:

/**Enum for different frame borders*/
enum Border
{
Left,
Right,
Bottom,
Top
};

// Pointer to map renderer of the QGIS main map. Note that QgsComposerMap uses a different map renderer,
//it just copies some properties from the main map renderer.
QgsMapRenderer *mMapRenderer;
Expand Down Expand Up @@ -354,10 +361,30 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
bool mShowGridAnnotation;
/**Annotation position inside or outside of map frame*/
GridAnnotationPosition mGridAnnotationPosition;

/**Annotation position for left map side (inside / outside / not shown)*/
GridAnnotationPosition mLeftGridAnnotationPosition;
/**Annotation position for right map side (inside / outside / not shown)*/
GridAnnotationPosition mRightGridAnnotationPosition;
/**Annotation position for top map side (inside / outside / not shown)*/
GridAnnotationPosition mTopGridAnnotationPosition;
/**Annotation position for bottom map side (inside / outside / not shown)*/
GridAnnotationPosition mBottomGridAnnotationPosition;

/**Distance between map frame and annotation*/
double mAnnotationFrameDistance;
/**Annotation can be horizontal / vertical or different for axes*/
GridAnnotationDirection mGridAnnotationDirection;

/**Annotation direction on left side ( horizontal or vertical )*/
GridAnnotationDirection mLeftGridAnnotationDirection;
/**Annotation direction on right side ( horizontal or vertical )*/
GridAnnotationDirection mRightGridAnnotationDirection;
/**Annotation direction on top side ( horizontal or vertical )*/
GridAnnotationDirection mTopGridAnnotationDirection;
/**Annotation direction on bottom side ( horizontal or vertical )*/
GridAnnotationDirection mBottomGridAnnotationDirection;

/**Current bounding rectangle. This is used to check if notification to the graphics scene is necessary*/
QRectF mCurrentRectangle;
/**The length of the cross sides for mGridStyle Cross*/
Expand Down
482 changes: 284 additions & 198 deletions src/ui/qgscomposermapwidgetbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>309</width>
<height>452</height>
<width>240</width>
<height>400</height>
</rect>
</property>
<property name="sizePolicy">
Expand All @@ -33,8 +33,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>309</width>
<height>365</height>
<width>230</width>
<height>312</height>
</rect>
</property>
<attribute name="label">
Expand Down Expand Up @@ -227,8 +227,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>169</width>
<height>169</height>
<width>300</width>
<height>303</height>
</rect>
</property>
<attribute name="label">
Expand Down Expand Up @@ -335,20 +335,14 @@
<rect>
<x>0</x>
<y>0</y>
<width>199</width>
<height>581</height>
<width>217</width>
<height>662</height>
</rect>
</property>
<attribute name="label">
<string>Grid</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_7">
<property name="margin">
<number>3</number>
</property>
<property name="horizontalSpacing">
<number>6</number>
</property>
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0">
<widget class="QGroupBox" name="mGridCheckBox">
<property name="title">
Expand All @@ -360,14 +354,8 @@
<property name="checked">
<bool>false</bool>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="margin">
<number>3</number>
</property>
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="2">
<widget class="QLabel" name="mGridTypeLabel">
<property name="accessibleName">
<string extracomment="Hello translotor"/>
Expand All @@ -383,132 +371,146 @@
</property>
</widget>
</item>
<item row="0" column="1">
<item row="0" column="3">
<widget class="QComboBox" name="mGridTypeComboBox"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mIntervalXLabel">
<property name="text">
<string>Interval X</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mIntervalXSpinBox</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="mIntervalXSpinBox">
<property name="decimals">
<number>5</number>
</property>
<property name="maximum">
<double>9999999.000000000000000</double>
</property>
</widget>
<item row="1" column="0" colspan="4">
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="mIntervalXLabel">
<property name="text">
<string>Interval X</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mIntervalXSpinBox</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="mIntervalXSpinBox">
<property name="decimals">
<number>5</number>
</property>
<property name="maximum">
<double>9999999.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="mIntervalYLabel">
<property name="text">
<string>Interval Y</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mIntervalYSpinBox</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="mIntervalYSpinBox">
<property name="decimals">
<number>5</number>
</property>
<property name="maximum">
<double>9999999.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mOffsetXLabel">
<property name="text">
<string>Offset X</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mOffsetXSpinBox</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="mOffsetXSpinBox">
<property name="decimals">
<number>5</number>
</property>
<property name="maximum">
<double>9999999.000000000000000</double>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="mOffsetYLabel">
<property name="text">
<string>Offset Y</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mOffsetYSpinBox</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="mOffsetYSpinBox">
<property name="decimals">
<number>5</number>
</property>
<property name="maximum">
<double>9999999.000000000000000</double>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="mCrossWidthLabel">
<property name="text">
<string>Cross width</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mCrossWidthSpinBox</cstring>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QDoubleSpinBox" name="mCrossWidthSpinBox">
<property name="decimals">
<number>5</number>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="mLineWidthLabel">
<property name="text">
<string>Line width</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mLineWidthSpinBox</cstring>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QDoubleSpinBox" name="mLineWidthSpinBox">
<property name="decimals">
<number>5</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0">
<widget class="QLabel" name="mIntervalYLabel">
<property name="text">
<string>Interval Y</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mIntervalYSpinBox</cstring>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="mOffsetXLabel">
<property name="text">
<string>Offset X</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mOffsetXSpinBox</cstring>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QDoubleSpinBox" name="mOffsetXSpinBox">
<property name="decimals">
<number>5</number>
</property>
<property name="maximum">
<double>9999999.000000000000000</double>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="mOffsetYLabel">
<property name="text">
<string>Offset Y</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mOffsetYSpinBox</cstring>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QDoubleSpinBox" name="mOffsetYSpinBox">
<property name="decimals">
<number>5</number>
</property>
<property name="maximum">
<double>9999999.000000000000000</double>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="mCrossWidthLabel">
<property name="text">
<string>Cross width</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mCrossWidthSpinBox</cstring>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QDoubleSpinBox" name="mCrossWidthSpinBox">
<property name="decimals">
<number>5</number>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QLabel" name="mLineWidthLabel">
<property name="text">
<string>Line width</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mLineWidthSpinBox</cstring>
</property>
</widget>
</item>
<item row="12" column="1">
<widget class="QDoubleSpinBox" name="mLineWidthSpinBox">
<property name="decimals">
<number>5</number>
</property>
</widget>
</item>
<item row="14" column="0">
<item row="2" column="2">
<widget class="QLabel" name="mLineColorLabel">
<property name="text">
<string>Line color</string>
Expand All @@ -521,7 +523,7 @@
</property>
</widget>
</item>
<item row="14" column="1">
<item row="2" column="3">
<widget class="QgsColorButton" name="mLineColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
Expand All @@ -534,56 +536,150 @@
</property>
</widget>
</item>
<item row="16" column="0" colspan="2">
<item row="3" column="0" colspan="3">
<widget class="QCheckBox" name="mDrawAnnotationCheckBox">
<property name="text">
<string>Draw annotation</string>
</property>
</widget>
</item>
<item row="17" column="0">
<widget class="QLabel" name="mAnnotationPositionLabel">
<property name="text">
<string>Annotation position</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mAnnotationPositionComboBox</cstring>
</property>
</widget>
</item>
<item row="17" column="1">
<widget class="QComboBox" name="mAnnotationPositionComboBox"/>
<item row="4" column="0" colspan="4">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="mAnnotationPositionLabelLeft">
<property name="text">
<string>Annotation position left side</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mAnnotationPositionLeftComboBox</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="mAnnotationPositionLeftComboBox"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="mAnnotationPositionLabelRight">
<property name="text">
<string>Annotation position right side</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mAnnotationPositionRightComboBox</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="mAnnotationPositionRightComboBox"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mAnnotationPositionLabelTop">
<property name="text">
<string>Annotation position top side</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mAnnotationPositionTopComboBox</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="mAnnotationPositionTopComboBox"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="mAnnotationPositionLabelBottom">
<property name="text">
<string>Annotation position bottom side</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mAnnotationPositionRightComboBox</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="mAnnotationPositionBottomComboBox"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="mAnnotationDirectionLabelLeft">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string>Annotation direction left side</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mAnnotationDirectionComboBoxLeft</cstring>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="mAnnotationDirectionComboBoxLeft"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="mAnnotationDirectionLabelRight">
<property name="text">
<string>Annotation direction right side</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mAnnotationDirectionComboBoxRight</cstring>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="mAnnotationDirectionComboBoxRight"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="mAnnotationDirectionLabelTop">
<property name="text">
<string>Annotation direction top side</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QComboBox" name="mAnnotationDirectionComboBoxTop"/>
</item>
<item row="7" column="0">
<widget class="QLabel" name="mAnnotationDirectionLabeBottom">
<property name="text">
<string>Annotation direction bottom side</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QComboBox" name="mAnnotationDirectionComboBoxBottom"/>
</item>
</layout>
</item>
<item row="19" column="0">
<widget class="QLabel" name="mAnnotationDirectionLabel">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string>Annotation direction</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mAnnotationDirectionComboBox</cstring>
</property>
</widget>
</item>
<item row="19" column="1">
<widget class="QComboBox" name="mAnnotationDirectionComboBox"/>
</item>
<item row="21" column="0" colspan="2">
<item row="5" column="0" colspan="2">
<widget class="QPushButton" name="mAnnotationFontButton">
<property name="text">
<string>Font...</string>
</property>
</widget>
</item>
<item row="22" column="0">
<item row="6" column="0" colspan="3">
<widget class="QLabel" name="mDistanceToFrameLabel">
<property name="text">
<string>Distance to map frame</string>
Expand All @@ -596,10 +692,10 @@
</property>
</widget>
</item>
<item row="22" column="1">
<item row="6" column="3">
<widget class="QDoubleSpinBox" name="mDistanceToMapFrameSpinBox"/>
</item>
<item row="24" column="0">
<item row="7" column="1" colspan="2">
<widget class="QLabel" name="mCoordinatePrecisionLabel">
<property name="text">
<string>Coordinate precision</string>
Expand All @@ -612,10 +708,10 @@
</property>
</widget>
</item>
<item row="24" column="1">
<item row="7" column="3">
<widget class="QSpinBox" name="mCoordinatePrecisionSpinBox"/>
</item>
<item row="26" column="0" colspan="2">
<item row="8" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
Expand All @@ -628,16 +724,6 @@
</property>
</spacer>
</item>
<item row="4" column="1">
<widget class="QDoubleSpinBox" name="mIntervalYSpinBox">
<property name="decimals">
<number>5</number>
</property>
<property name="maximum">
<double>9999999.000000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
</item>
Expand Down