mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-15 00:07:25 -05:00
[FEATURE][layouts] Use QgsTextRenderer for drawing map grid text in layouts
Allows for grid annotations which use buffers, shadows, background shapes, etc!
This commit is contained in:
parent
573e46b671
commit
ff14c6fdad
@ -565,32 +565,62 @@ Returns whether annotations are shown for the grid.
|
||||
.. seealso:: :py:func:`setAnnotationEnabled`
|
||||
%End
|
||||
|
||||
void setAnnotationFont( const QFont &font );
|
||||
void setAnnotationTextFormat( const QgsTextFormat &format );
|
||||
%Docstring
|
||||
Sets the text ``format`` to use when rendering grid annotations.
|
||||
|
||||
.. seealso:: :py:func:`annotationTextFormat`
|
||||
|
||||
.. versionadded:: 3.16
|
||||
%End
|
||||
|
||||
QgsTextFormat annotationTextFormat() const;
|
||||
%Docstring
|
||||
Returns the text format used when rendering grid annotations.
|
||||
|
||||
.. seealso:: :py:func:`setAnnotationTextFormat`
|
||||
|
||||
.. versionadded:: 3.16
|
||||
%End
|
||||
|
||||
void setAnnotationFont( const QFont &font ) /Deprecated/;
|
||||
%Docstring
|
||||
Sets the ``font`` used for drawing grid annotations.
|
||||
|
||||
.. seealso:: :py:func:`annotationFont`
|
||||
|
||||
.. deprecated::
|
||||
use setAnnotationTextFormat() instead
|
||||
%End
|
||||
|
||||
QFont annotationFont() const;
|
||||
QFont annotationFont() const /Deprecated/;
|
||||
%Docstring
|
||||
Returns the font used for drawing grid annotations.
|
||||
|
||||
.. seealso:: :py:func:`setAnnotationFont`
|
||||
|
||||
.. deprecated::
|
||||
use annotationTextFormat() instead
|
||||
%End
|
||||
|
||||
void setAnnotationFontColor( const QColor &color );
|
||||
void setAnnotationFontColor( const QColor &color ) /Deprecated/;
|
||||
%Docstring
|
||||
Sets the font ``color`` used for drawing grid annotations.
|
||||
|
||||
.. seealso:: :py:func:`annotationFontColor`
|
||||
|
||||
.. deprecated::
|
||||
use setAnnotationTextFormat() instead
|
||||
%End
|
||||
|
||||
QColor annotationFontColor() const;
|
||||
QColor annotationFontColor() const /Deprecated/;
|
||||
%Docstring
|
||||
Returns the font color used for drawing grid annotations.
|
||||
|
||||
.. seealso:: :py:func:`setAnnotationFontColor`
|
||||
|
||||
.. deprecated::
|
||||
use annotationTextFormat() instead
|
||||
%End
|
||||
|
||||
void setAnnotationPrecision( const int precision );
|
||||
|
||||
@ -984,8 +984,21 @@ bool QgsCompositionConverter::readMapXml( QgsLayoutItemMap *layoutItem, const QD
|
||||
mapGrid->setAnnotationFrameDistance( annotationElem.attribute( QStringLiteral( "frameDistance" ), QStringLiteral( "0" ) ).toDouble() );
|
||||
QFont annotationFont;
|
||||
annotationFont.fromString( annotationElem.attribute( QStringLiteral( "font" ), QString() ) );
|
||||
mapGrid->setAnnotationFont( annotationFont );
|
||||
mapGrid->setAnnotationFontColor( QgsSymbolLayerUtils::decodeColor( itemElem.attribute( QStringLiteral( "fontColor" ), QStringLiteral( "0,0,0,255" ) ) ) );
|
||||
|
||||
QgsTextFormat annotationFormat = mapGrid->annotationTextFormat();
|
||||
annotationFormat.setFont( annotationFont );
|
||||
if ( annotationFont.pointSizeF() > 0 )
|
||||
{
|
||||
annotationFormat.setSize( annotationFont.pointSizeF() );
|
||||
annotationFormat.setSizeUnit( QgsUnitTypes::RenderPoints );
|
||||
}
|
||||
else if ( annotationFont.pixelSize() > 0 )
|
||||
{
|
||||
annotationFormat.setSize( annotationFont.pixelSize() );
|
||||
annotationFormat.setSizeUnit( QgsUnitTypes::RenderPixels );
|
||||
}
|
||||
annotationFormat.setColor( QgsSymbolLayerUtils::decodeColor( itemElem.attribute( QStringLiteral( "fontColor" ), QStringLiteral( "0,0,0,255" ) ) ) );
|
||||
mapGrid->setAnnotationTextFormat( annotationFormat );
|
||||
|
||||
mapGrid->setAnnotationPrecision( annotationElem.attribute( QStringLiteral( "precision" ), QStringLiteral( "3" ) ).toInt() );
|
||||
}
|
||||
|
||||
@ -35,6 +35,7 @@
|
||||
#include "qgssettings.h"
|
||||
#include "qgscoordinateformatter.h"
|
||||
#include "qgsstyleentityvisitor.h"
|
||||
#include "qgstextrenderer.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QPen>
|
||||
@ -166,7 +167,9 @@ QgsLayoutItemMapGrid::QgsLayoutItemMapGrid( const QString &name, QgsLayoutItemMa
|
||||
QString defaultFontString = settings.value( QStringLiteral( "LayoutDesigner/defaultFont" ), QVariant(), QgsSettings::Gui ).toString();
|
||||
if ( !defaultFontString.isEmpty() )
|
||||
{
|
||||
mGridAnnotationFont.setFamily( defaultFontString );
|
||||
QFont font;
|
||||
font.setFamily( defaultFontString );
|
||||
mAnnotationFormat.setFont( font );
|
||||
}
|
||||
|
||||
createDefaultGridLineSymbol();
|
||||
@ -268,8 +271,7 @@ bool QgsLayoutItemMapGrid::writeXml( QDomElement &elem, QDomDocument &doc, const
|
||||
mapGridElem.setAttribute( QStringLiteral( "topAnnotationDirection" ), mTopGridAnnotationDirection );
|
||||
mapGridElem.setAttribute( QStringLiteral( "bottomAnnotationDirection" ), mBottomGridAnnotationDirection );
|
||||
mapGridElem.setAttribute( QStringLiteral( "frameAnnotationDistance" ), QString::number( mAnnotationFrameDistance ) );
|
||||
mapGridElem.appendChild( QgsFontUtils::toXmlElement( mGridAnnotationFont, doc, QStringLiteral( "annotationFontProperties" ) ) );
|
||||
mapGridElem.setAttribute( QStringLiteral( "annotationFontColor" ), QgsSymbolLayerUtils::encodeColor( mGridAnnotationFontColor ) );
|
||||
mapGridElem.appendChild( mAnnotationFormat.writeXml( doc, context ) );
|
||||
mapGridElem.setAttribute( QStringLiteral( "annotationPrecision" ), mGridAnnotationPrecision );
|
||||
mapGridElem.setAttribute( QStringLiteral( "unit" ), mGridUnit );
|
||||
mapGridElem.setAttribute( QStringLiteral( "blendMode" ), mBlendMode );
|
||||
@ -364,11 +366,24 @@ bool QgsLayoutItemMapGrid::readXml( const QDomElement &itemElem, const QDomDocum
|
||||
mTopGridAnnotationDirection = QgsLayoutItemMapGrid::AnnotationDirection( itemElem.attribute( QStringLiteral( "topAnnotationDirection" ), QStringLiteral( "0" ) ).toInt() );
|
||||
mBottomGridAnnotationDirection = QgsLayoutItemMapGrid::AnnotationDirection( itemElem.attribute( QStringLiteral( "bottomAnnotationDirection" ), QStringLiteral( "0" ) ).toInt() );
|
||||
mAnnotationFrameDistance = itemElem.attribute( QStringLiteral( "frameAnnotationDistance" ), QStringLiteral( "0" ) ).toDouble();
|
||||
if ( !QgsFontUtils::setFromXmlChildNode( mGridAnnotationFont, itemElem, QStringLiteral( "annotationFontProperties" ) ) )
|
||||
|
||||
if ( !itemElem.firstChildElement( "text-style" ).isNull() )
|
||||
{
|
||||
mGridAnnotationFont.fromString( itemElem.attribute( QStringLiteral( "annotationFont" ), QString() ) );
|
||||
mAnnotationFormat.readXml( itemElem, context );
|
||||
}
|
||||
mGridAnnotationFontColor = QgsSymbolLayerUtils::decodeColor( itemElem.attribute( QStringLiteral( "annotationFontColor" ), QStringLiteral( "0,0,0,255" ) ) );
|
||||
else
|
||||
{
|
||||
QFont font;
|
||||
if ( !QgsFontUtils::setFromXmlChildNode( font, itemElem, "annotationFontProperties" ) )
|
||||
{
|
||||
font.fromString( itemElem.attribute( "annotationFont", QString() ) );
|
||||
}
|
||||
mAnnotationFormat.setFont( font );
|
||||
mAnnotationFormat.setSize( font.pointSizeF() );
|
||||
mAnnotationFormat.setSizeUnit( QgsUnitTypes::RenderPoints );
|
||||
mAnnotationFormat.setColor( QgsSymbolLayerUtils::decodeColor( itemElem.attribute( "annotationFontColor", "0,0,0,255" ) ) );
|
||||
}
|
||||
|
||||
mGridAnnotationPrecision = itemElem.attribute( QStringLiteral( "annotationPrecision" ), QStringLiteral( "3" ) ).toInt();
|
||||
int gridUnitInt = itemElem.attribute( QStringLiteral( "unit" ), QString::number( MapUnit ) ).toInt();
|
||||
mGridUnit = ( gridUnitInt <= static_cast< int >( DynamicPageSizeBased ) ) ? static_cast< GridUnit >( gridUnitInt ) : MapUnit;
|
||||
@ -585,6 +600,7 @@ void QgsLayoutItemMapGrid::draw( QPainter *p )
|
||||
//setup render context
|
||||
QgsRenderContext context = QgsLayoutUtils::createRenderContextForLayout( mLayout, p );
|
||||
context.setForceVectorOutput( true );
|
||||
context.setFlag( QgsRenderContext::ApplyScalingWorkaroundForTextRendering, true );
|
||||
QgsExpressionContext expressionContext = createExpressionContext();
|
||||
context.setExpressionContext( expressionContext );
|
||||
|
||||
@ -624,7 +640,7 @@ void QgsLayoutItemMapGrid::draw( QPainter *p )
|
||||
|
||||
if ( mShowGridAnnotation )
|
||||
{
|
||||
drawCoordinateAnnotations( p, horizontalLines, verticalLines, context.expressionContext() );
|
||||
drawCoordinateAnnotations( context, horizontalLines, verticalLines, context.expressionContext() );
|
||||
}
|
||||
}
|
||||
|
||||
@ -1045,7 +1061,7 @@ void QgsLayoutItemMapGrid::drawGridFrameLineBorder( QPainter *p, QgsLayoutItemMa
|
||||
}
|
||||
}
|
||||
|
||||
void QgsLayoutItemMapGrid::drawCoordinateAnnotations( QPainter *p, const QList< QPair< double, QLineF > > &hLines, const QList< QPair< double, QLineF > > &vLines, QgsExpressionContext &expressionContext,
|
||||
void QgsLayoutItemMapGrid::drawCoordinateAnnotations( QgsRenderContext &context, const QList< QPair< double, QLineF > > &hLines, const QList< QPair< double, QLineF > > &vLines, QgsExpressionContext &expressionContext,
|
||||
GridExtension *extension ) const
|
||||
{
|
||||
QString currentAnnotationString;
|
||||
@ -1053,20 +1069,20 @@ void QgsLayoutItemMapGrid::drawCoordinateAnnotations( QPainter *p, const QList<
|
||||
for ( ; it != hLines.constEnd(); ++it )
|
||||
{
|
||||
currentAnnotationString = gridAnnotationString( it->first, QgsLayoutItemMapGrid::Latitude, expressionContext );
|
||||
drawCoordinateAnnotation( p, it->second.p1(), currentAnnotationString, QgsLayoutItemMapGrid::Latitude, extension );
|
||||
drawCoordinateAnnotation( p, it->second.p2(), currentAnnotationString, QgsLayoutItemMapGrid::Latitude, extension );
|
||||
drawCoordinateAnnotation( context, it->second.p1(), currentAnnotationString, QgsLayoutItemMapGrid::Latitude, extension );
|
||||
drawCoordinateAnnotation( context, it->second.p2(), currentAnnotationString, QgsLayoutItemMapGrid::Latitude, extension );
|
||||
}
|
||||
|
||||
it = vLines.constBegin();
|
||||
for ( ; it != vLines.constEnd(); ++it )
|
||||
{
|
||||
currentAnnotationString = gridAnnotationString( it->first, QgsLayoutItemMapGrid::Longitude, expressionContext );
|
||||
drawCoordinateAnnotation( p, it->second.p1(), currentAnnotationString, QgsLayoutItemMapGrid::Longitude, extension );
|
||||
drawCoordinateAnnotation( p, it->second.p2(), currentAnnotationString, QgsLayoutItemMapGrid::Longitude, extension );
|
||||
drawCoordinateAnnotation( context, it->second.p1(), currentAnnotationString, QgsLayoutItemMapGrid::Longitude, extension );
|
||||
drawCoordinateAnnotation( context, it->second.p2(), currentAnnotationString, QgsLayoutItemMapGrid::Longitude, extension );
|
||||
}
|
||||
}
|
||||
|
||||
void QgsLayoutItemMapGrid::drawCoordinateAnnotation( QPainter *p, QPointF pos, const QString &annotationString, const AnnotationCoordinate coordinateType, GridExtension *extension ) const
|
||||
void QgsLayoutItemMapGrid::drawCoordinateAnnotation( QgsRenderContext &context, QPointF pos, const QString &annotationString, const AnnotationCoordinate coordinateType, GridExtension *extension ) const
|
||||
{
|
||||
if ( !mMap )
|
||||
{
|
||||
@ -1074,10 +1090,11 @@ void QgsLayoutItemMapGrid::drawCoordinateAnnotation( QPainter *p, QPointF pos, c
|
||||
}
|
||||
|
||||
QgsLayoutItemMapGrid::BorderSide frameBorder = borderForLineCoord( pos, coordinateType );
|
||||
double textWidth = QgsLayoutUtils::textWidthMM( mGridAnnotationFont, annotationString );
|
||||
double textWidth = QgsTextRenderer::textWidth( context, mAnnotationFormat, QStringList() << annotationString ) / context.convertToPainterUnits( 1, QgsUnitTypes::RenderMillimeters );
|
||||
//relevant for annotations is the height of digits
|
||||
double textHeight = extension ? QgsLayoutUtils::fontAscentMM( mGridAnnotationFont )
|
||||
: QgsLayoutUtils::fontHeightCharacterMM( mGridAnnotationFont, QChar( '0' ) );
|
||||
const QFontMetricsF metrics = QgsTextRenderer::fontMetrics( context, mAnnotationFormat, QgsTextRenderer::FONT_WORKAROUND_SCALE );
|
||||
double textHeight = ( extension ? ( QgsTextRenderer::textHeight( context, mAnnotationFormat, QChar(), true ) )
|
||||
: ( QgsTextRenderer::textHeight( context, mAnnotationFormat, '0', false ) ) ) / context.convertToPainterUnits( 1, QgsUnitTypes::RenderMillimeters );
|
||||
double xpos = pos.x();
|
||||
double ypos = pos.y();
|
||||
int rotation = 0;
|
||||
@ -1398,23 +1415,25 @@ void QgsLayoutItemMapGrid::drawCoordinateAnnotation( QPainter *p, QPointF pos, c
|
||||
}
|
||||
}
|
||||
|
||||
if ( extension || !p )
|
||||
if ( extension || !context.painter() )
|
||||
return;
|
||||
|
||||
drawAnnotation( p, QPointF( xpos, ypos ), rotation, annotationString );
|
||||
drawAnnotation( context, QPointF( xpos, ypos ), rotation, annotationString );
|
||||
}
|
||||
|
||||
void QgsLayoutItemMapGrid::drawAnnotation( QPainter *p, QPointF pos, int rotation, const QString &annotationText ) const
|
||||
void QgsLayoutItemMapGrid::drawAnnotation( QgsRenderContext &context, QPointF pos, int rotation, const QString &annotationText ) const
|
||||
{
|
||||
if ( !mMap )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
QgsScopedQPainterState painterState( p );
|
||||
p->translate( pos );
|
||||
p->rotate( rotation );
|
||||
QgsLayoutUtils::drawText( p, QPointF( 0, 0 ), annotationText, mGridAnnotationFont, mGridAnnotationFontColor );
|
||||
QgsScopedQPainterState painterState( context.painter() );
|
||||
context.painter()->translate( pos );
|
||||
context.painter()->rotate( rotation );
|
||||
|
||||
QgsScopedRenderContextScaleToPixels scale( context );
|
||||
QgsTextRenderer::drawText( QPointF( 0, 0 ), 0, QgsTextRenderer::AlignLeft, QStringList() << annotationText, context, mAnnotationFormat );
|
||||
}
|
||||
|
||||
QString QgsLayoutItemMapGrid::gridAnnotationString( double value, QgsLayoutItemMapGrid::AnnotationCoordinate coord, QgsExpressionContext &expressionContext ) const
|
||||
@ -2122,6 +2141,36 @@ QgsMarkerSymbol *QgsLayoutItemMapGrid::markerSymbol()
|
||||
return mGridMarkerSymbol.get();
|
||||
}
|
||||
|
||||
void QgsLayoutItemMapGrid::setAnnotationFont( const QFont &font )
|
||||
{
|
||||
mAnnotationFormat.setFont( font );
|
||||
if ( font.pointSizeF() > 0 )
|
||||
{
|
||||
mAnnotationFormat.setSize( font.pointSizeF() );
|
||||
mAnnotationFormat.setSizeUnit( QgsUnitTypes::RenderPoints );
|
||||
}
|
||||
else if ( font.pixelSize() > 0 )
|
||||
{
|
||||
mAnnotationFormat.setSize( font.pixelSize() );
|
||||
mAnnotationFormat.setSizeUnit( QgsUnitTypes::RenderPixels );
|
||||
}
|
||||
}
|
||||
|
||||
QFont QgsLayoutItemMapGrid::annotationFont() const
|
||||
{
|
||||
return mAnnotationFormat.toQFont();
|
||||
}
|
||||
|
||||
void QgsLayoutItemMapGrid::setAnnotationFontColor( const QColor &color )
|
||||
{
|
||||
mAnnotationFormat.setColor( color );
|
||||
}
|
||||
|
||||
QColor QgsLayoutItemMapGrid::annotationFontColor() const
|
||||
{
|
||||
return mAnnotationFormat.color();
|
||||
}
|
||||
|
||||
void QgsLayoutItemMapGrid::setAnnotationDisplay( const QgsLayoutItemMapGrid::DisplayMode display, const QgsLayoutItemMapGrid::BorderSide border )
|
||||
{
|
||||
switch ( border )
|
||||
@ -2220,7 +2269,7 @@ void QgsLayoutItemMapGrid::calculateMaxExtension( double &top, double &right, do
|
||||
|
||||
if ( mShowGridAnnotation )
|
||||
{
|
||||
drawCoordinateAnnotations( nullptr, horizontalLines, verticalLines, context.expressionContext(), &extension );
|
||||
drawCoordinateAnnotations( context, horizontalLines, verticalLines, context.expressionContext(), &extension );
|
||||
}
|
||||
|
||||
top = extension.top;
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
#include "qgis_sip.h"
|
||||
#include "qgslayoutitemmapitem.h"
|
||||
#include "qgssymbol.h"
|
||||
#include "qgstextformat.h"
|
||||
#include <QPainter>
|
||||
|
||||
class QgsCoordinateTransform;
|
||||
@ -561,29 +562,49 @@ class CORE_EXPORT QgsLayoutItemMapGrid : public QgsLayoutItemMapItem
|
||||
*/
|
||||
bool annotationEnabled() const { return mShowGridAnnotation; }
|
||||
|
||||
/**
|
||||
* Sets the text \a format to use when rendering grid annotations.
|
||||
*
|
||||
* \see annotationTextFormat()
|
||||
* \since QGIS 3.16
|
||||
*/
|
||||
void setAnnotationTextFormat( const QgsTextFormat &format ) { mAnnotationFormat = format; }
|
||||
|
||||
/**
|
||||
* Returns the text format used when rendering grid annotations.
|
||||
*
|
||||
* \see setAnnotationTextFormat()
|
||||
* \since QGIS 3.16
|
||||
*/
|
||||
QgsTextFormat annotationTextFormat() const { return mAnnotationFormat; }
|
||||
|
||||
/**
|
||||
* Sets the \a font used for drawing grid annotations.
|
||||
* \see annotationFont()
|
||||
* \deprecated use setAnnotationTextFormat() instead
|
||||
*/
|
||||
void setAnnotationFont( const QFont &font ) { mGridAnnotationFont = font; }
|
||||
Q_DECL_DEPRECATED void setAnnotationFont( const QFont &font ) SIP_DEPRECATED;
|
||||
|
||||
/**
|
||||
* Returns the font used for drawing grid annotations.
|
||||
* \see setAnnotationFont()
|
||||
* \deprecated use annotationTextFormat() instead
|
||||
*/
|
||||
QFont annotationFont() const { return mGridAnnotationFont; }
|
||||
Q_DECL_DEPRECATED QFont annotationFont() const SIP_DEPRECATED;
|
||||
|
||||
/**
|
||||
* Sets the font \a color used for drawing grid annotations.
|
||||
* \see annotationFontColor()
|
||||
* \deprecated use setAnnotationTextFormat() instead
|
||||
*/
|
||||
void setAnnotationFontColor( const QColor &color ) { mGridAnnotationFontColor = color; }
|
||||
Q_DECL_DEPRECATED void setAnnotationFontColor( const QColor &color ) SIP_DEPRECATED;
|
||||
|
||||
/**
|
||||
* Returns the font color used for drawing grid annotations.
|
||||
* \see setAnnotationFontColor()
|
||||
* \deprecated use annotationTextFormat() instead
|
||||
*/
|
||||
QColor annotationFontColor() const { return mGridAnnotationFontColor; }
|
||||
Q_DECL_DEPRECATED QColor annotationFontColor() const SIP_DEPRECATED;
|
||||
|
||||
/**
|
||||
* Sets the coordinate \a precision for grid annotations.
|
||||
@ -882,10 +903,10 @@ class CORE_EXPORT QgsLayoutItemMapGrid : public QgsLayoutItemMapItem
|
||||
double mGridOffsetX = 0.0;
|
||||
//! Grid line offset in y-direction
|
||||
double mGridOffsetY = 0.0;
|
||||
//! Font for grid line annotation
|
||||
QFont mGridAnnotationFont;
|
||||
//! Font color for grid coordinates
|
||||
QColor mGridAnnotationFontColor = Qt::black;
|
||||
|
||||
//! Text format for grid annotations
|
||||
QgsTextFormat mAnnotationFormat;
|
||||
|
||||
//! Digits after the dot
|
||||
int mGridAnnotationPrecision = 3;
|
||||
//! True if coordinate values should be drawn
|
||||
@ -989,29 +1010,29 @@ class CORE_EXPORT QgsLayoutItemMapGrid : public QgsLayoutItemMapItem
|
||||
|
||||
/**
|
||||
* Draw coordinates for mGridAnnotationType Coordinate
|
||||
\param p drawing painter
|
||||
\param hLines horizontal coordinate lines in item coordinates
|
||||
\param vLines vertical coordinate lines in item coordinates
|
||||
\param expressionContext expression context for evaluating custom annotation formats
|
||||
\param extension optional. If specified, nothing will be drawn and instead the maximum extension for the grid
|
||||
annotations will be stored in this variable.
|
||||
* \param context destination render context
|
||||
* \param hLines horizontal coordinate lines in item coordinates
|
||||
* \param vLines vertical coordinate lines in item coordinates
|
||||
* \param expressionContext expression context for evaluating custom annotation formats
|
||||
* \param extension optional. If specified, nothing will be drawn and instead the maximum extension for the grid
|
||||
* annotations will be stored in this variable.
|
||||
*/
|
||||
void drawCoordinateAnnotations( QPainter *p, const QList< QPair< double, QLineF > > &hLines, const QList< QPair< double, QLineF > > &vLines, QgsExpressionContext &expressionContext, GridExtension *extension = nullptr ) const;
|
||||
void drawCoordinateAnnotations( QgsRenderContext &context, const QList< QPair< double, QLineF > > &hLines, const QList< QPair< double, QLineF > > &vLines, QgsExpressionContext &expressionContext, GridExtension *extension = nullptr ) const;
|
||||
|
||||
/**
|
||||
* Draw an annotation. If optional extension argument is specified, nothing will be drawn and instead
|
||||
* the extension of the annotation outside of the map frame will be stored in this variable.
|
||||
*/
|
||||
void drawCoordinateAnnotation( QPainter *p, QPointF pos, const QString &annotationString, AnnotationCoordinate coordinateType, GridExtension *extension = nullptr ) const;
|
||||
void drawCoordinateAnnotation( QgsRenderContext &context, QPointF pos, const QString &annotationString, AnnotationCoordinate coordinateType, GridExtension *extension = nullptr ) const;
|
||||
|
||||
/**
|
||||
* Draws a single annotation
|
||||
* \param p drawing painter
|
||||
* \param context destination render context
|
||||
* \param pos item coordinates where to draw
|
||||
* \param rotation text rotation
|
||||
* \param annotationText the text to draw
|
||||
*/
|
||||
void drawAnnotation( QPainter *p, QPointF pos, int rotation, const QString &annotationText ) const;
|
||||
void drawAnnotation( QgsRenderContext &context, QPointF pos, int rotation, const QString &annotationText ) const;
|
||||
|
||||
QString gridAnnotationString( double value, AnnotationCoordinate coord, QgsExpressionContext &expressionContext ) const;
|
||||
|
||||
|
||||
@ -91,7 +91,6 @@ QgsLayoutMapGridWidget::QgsLayoutMapGridWidget( QgsLayoutItemMapGrid *mapGrid, Q
|
||||
connect( mDistanceToMapFrameSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutMapGridWidget::mDistanceToMapFrameSpinBox_valueChanged );
|
||||
connect( mMinWidthSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutMapGridWidget::minIntervalChanged );
|
||||
connect( mMaxWidthSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutMapGridWidget::maxIntervalChanged );
|
||||
connect( mAnnotationFontColorButton, &QgsColorButton::colorChanged, this, &QgsLayoutMapGridWidget::mAnnotationFontColorButton_colorChanged );
|
||||
connect( mEnabledCheckBox, &QCheckBox::toggled, this, &QgsLayoutMapGridWidget::gridEnabledToggled );
|
||||
setPanelTitle( tr( "Map Grid Properties" ) );
|
||||
|
||||
@ -124,10 +123,6 @@ QgsLayoutMapGridWidget::QgsLayoutMapGridWidget( QgsLayoutItemMapGrid *mapGrid, Q
|
||||
mAnnotationFormatComboBox->addItem( tr( "Degree, Minute, Second Aligned" ), QgsLayoutItemMapGrid::DegreeMinuteSecondPadded );
|
||||
mAnnotationFormatComboBox->addItem( tr( "Custom" ), QgsLayoutItemMapGrid::CustomFormat );
|
||||
|
||||
mAnnotationFontColorButton->setColorDialogTitle( tr( "Select Font Color" ) );
|
||||
mAnnotationFontColorButton->setAllowOpacity( true );
|
||||
mAnnotationFontColorButton->setContext( QStringLiteral( "composer" ) );
|
||||
|
||||
insertAnnotationDisplayEntries( mAnnotationDisplayLeftComboBox );
|
||||
insertAnnotationDisplayEntries( mAnnotationDisplayRightComboBox );
|
||||
insertAnnotationDisplayEntries( mAnnotationDisplayTopComboBox );
|
||||
@ -181,10 +176,12 @@ QgsLayoutMapGridWidget::QgsLayoutMapGridWidget( QgsLayoutItemMapGrid *mapGrid, Q
|
||||
updateGuiElements();
|
||||
|
||||
blockAllSignals( false );
|
||||
connect( mAnnotationFontButton, &QgsFontButton::changed, this, &QgsLayoutMapGridWidget::annotationFontChanged );
|
||||
connect( mAnnotationFontButton, &QgsFontButton::changed, this, &QgsLayoutMapGridWidget::annotationTextFormatChanged );
|
||||
connect( mGridLineStyleButton, &QgsSymbolButton::changed, this, &QgsLayoutMapGridWidget::lineSymbolChanged );
|
||||
connect( mGridMarkerStyleButton, &QgsSymbolButton::changed, this, &QgsLayoutMapGridWidget::markerSymbolChanged );
|
||||
|
||||
connect( mAnnotationFontButton, &QgsFontButton::changed, this, &QgsLayoutMapGridWidget::annotationTextFormatChanged );
|
||||
|
||||
mGridLineStyleButton->registerExpressionContextGenerator( mMapGrid );
|
||||
mGridLineStyleButton->setLayer( coverageLayer() );
|
||||
mGridMarkerStyleButton->registerExpressionContextGenerator( mMapGrid );
|
||||
@ -193,8 +190,10 @@ QgsLayoutMapGridWidget::QgsLayoutMapGridWidget( QgsLayoutItemMapGrid *mapGrid, Q
|
||||
{
|
||||
connect( &mMap->layout()->reportContext(), &QgsLayoutReportContext::layerChanged, mGridLineStyleButton, &QgsSymbolButton::setLayer );
|
||||
connect( &mMap->layout()->reportContext(), &QgsLayoutReportContext::layerChanged, mGridMarkerStyleButton, &QgsSymbolButton::setLayer );
|
||||
connect( &mMap->layout()->reportContext(), &QgsLayoutReportContext::layerChanged, mAnnotationFontButton, &QgsFontButton::setLayer );
|
||||
}
|
||||
|
||||
mAnnotationFontButton->setLayer( coverageLayer() );
|
||||
mAnnotationFontButton->registerExpressionContextGenerator( mMapGrid );
|
||||
}
|
||||
|
||||
void QgsLayoutMapGridWidget::populateDataDefinedButtons()
|
||||
@ -276,7 +275,6 @@ void QgsLayoutMapGridWidget::blockAllSignals( bool block )
|
||||
mAnnotationDirectionComboBoxBottom->blockSignals( block );
|
||||
mDistanceToMapFrameSpinBox->blockSignals( block );
|
||||
mCoordinatePrecisionSpinBox->blockSignals( block );
|
||||
mAnnotationFontColorButton->blockSignals( block );
|
||||
mAnnotationFontButton->blockSignals( block );
|
||||
mMinWidthSpinBox->blockSignals( block );
|
||||
mMaxWidthSpinBox->blockSignals( block );
|
||||
@ -453,6 +451,7 @@ void QgsLayoutMapGridWidget::setGridItems()
|
||||
|
||||
mGridMarkerStyleButton->registerExpressionContextGenerator( mMapGrid );
|
||||
mGridLineStyleButton->registerExpressionContextGenerator( mMapGrid );
|
||||
mAnnotationFontButton->registerExpressionContextGenerator( mMapGrid );
|
||||
|
||||
mEnabledCheckBox->setChecked( mMapGrid->enabled() );
|
||||
mIntervalXSpinBox->setValue( mMapGrid->intervalX() );
|
||||
@ -575,8 +574,9 @@ void QgsLayoutMapGridWidget::setGridItems()
|
||||
initAnnotationDirectionBox( mAnnotationDirectionComboBoxTop, mMapGrid->annotationDirection( QgsLayoutItemMapGrid::Top ) );
|
||||
initAnnotationDirectionBox( mAnnotationDirectionComboBoxBottom, mMapGrid->annotationDirection( QgsLayoutItemMapGrid::Bottom ) );
|
||||
|
||||
mAnnotationFontColorButton->setColor( mMapGrid->annotationFontColor() );
|
||||
mAnnotationFontButton->setCurrentFont( mMapGrid->annotationFont() );
|
||||
mAnnotationFontButton->setDialogTitle( tr( "Grid Annotation Font" ) );
|
||||
mAnnotationFontButton->setMode( QgsFontButton::ModeTextRenderer );
|
||||
mAnnotationFontButton->setTextFormat( mMapGrid->annotationTextFormat() );
|
||||
|
||||
mAnnotationFormatComboBox->setCurrentIndex( mAnnotationFormatComboBox->findData( mMapGrid->annotationFormat() ) );
|
||||
mAnnotationFormatButton->setEnabled( mMapGrid->annotationFormat() == QgsLayoutItemMapGrid::CustomFormat );
|
||||
@ -912,6 +912,20 @@ void QgsLayoutMapGridWidget::maxIntervalChanged( double interval )
|
||||
mMap->update();
|
||||
}
|
||||
|
||||
void QgsLayoutMapGridWidget::annotationTextFormatChanged()
|
||||
{
|
||||
if ( !mMapGrid || !mMap )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
mMap->beginCommand( tr( "Change Annotation Font" ) );
|
||||
mMapGrid->setAnnotationTextFormat( mAnnotationFontButton->textFormat() );
|
||||
mMap->endCommand();
|
||||
mMap->updateBoundingRect();
|
||||
mMap->update();
|
||||
}
|
||||
|
||||
void QgsLayoutMapGridWidget::mGridBlendComboBox_currentIndexChanged( int index )
|
||||
{
|
||||
Q_UNUSED( index )
|
||||
@ -1126,19 +1140,6 @@ void QgsLayoutMapGridWidget::mDistanceToMapFrameSpinBox_valueChanged( double d )
|
||||
mMap->endCommand();
|
||||
}
|
||||
|
||||
void QgsLayoutMapGridWidget::annotationFontChanged()
|
||||
{
|
||||
if ( !mMapGrid || !mMap )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
mMap->beginCommand( tr( "Change Annotation Font" ) );
|
||||
mMapGrid->setAnnotationFont( mAnnotationFontButton->currentFont() );
|
||||
mMap->updateBoundingRect();
|
||||
mMap->update();
|
||||
mMap->endCommand();
|
||||
}
|
||||
|
||||
void QgsLayoutMapGridWidget::lineSymbolChanged()
|
||||
{
|
||||
@ -1180,19 +1181,6 @@ void QgsLayoutMapGridWidget::gridEnabledToggled( bool active )
|
||||
mMap->update();
|
||||
}
|
||||
|
||||
void QgsLayoutMapGridWidget::mAnnotationFontColorButton_colorChanged( const QColor &color )
|
||||
{
|
||||
if ( !mMapGrid || !mMap )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
mMap->beginCommand( tr( "Change Annotation Color" ), QgsLayoutItem::UndoMapGridAnnotationFontColor );
|
||||
mMapGrid->setAnnotationFontColor( color );
|
||||
mMap->update();
|
||||
mMap->endCommand();
|
||||
}
|
||||
|
||||
void QgsLayoutMapGridWidget::mAnnotationFormatComboBox_currentIndexChanged( int index )
|
||||
{
|
||||
if ( !mMapGrid || !mMap )
|
||||
|
||||
@ -94,7 +94,6 @@ class GUI_EXPORT QgsLayoutMapGridWidget: public QgsLayoutItemBaseWidget, private
|
||||
void mAnnotationFormatComboBox_currentIndexChanged( int index );
|
||||
void mCoordinatePrecisionSpinBox_valueChanged( int value );
|
||||
void mDistanceToMapFrameSpinBox_valueChanged( double d );
|
||||
void mAnnotationFontColorButton_colorChanged( const QColor &color );
|
||||
|
||||
protected:
|
||||
|
||||
@ -109,13 +108,13 @@ class GUI_EXPORT QgsLayoutMapGridWidget: public QgsLayoutItemBaseWidget, private
|
||||
|
||||
//! Sets the GUI elements to the values of mPicture
|
||||
void setGuiElementValues();
|
||||
void annotationFontChanged();
|
||||
void lineSymbolChanged();
|
||||
void markerSymbolChanged();
|
||||
void gridEnabledToggled( bool active );
|
||||
void intervalUnitChanged( int index );
|
||||
void minIntervalChanged( double interval );
|
||||
void maxIntervalChanged( double interval );
|
||||
void annotationTextFormatChanged();
|
||||
|
||||
private:
|
||||
QPointer< QgsLayoutItemMap > mMap;
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>409</width>
|
||||
<height>1447</height>
|
||||
<height>1416</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -686,38 +686,14 @@
|
||||
<property name="collapsed" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1,0">
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="mAnnotationPositionLabelBottom">
|
||||
<property name="text">
|
||||
<string>Bottom</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0">
|
||||
<item row="10" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationDisplayBottomComboBox"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="mAnnotationFormatLabel">
|
||||
<property name="text">
|
||||
<string>Format</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="0">
|
||||
<widget class="QLabel" name="mFontColorLabel">
|
||||
<property name="text">
|
||||
<string>Font color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="mAnnotationPositionLabelTop">
|
||||
<property name="text">
|
||||
<string>Top</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
<item row="14" column="1">
|
||||
<widget class="QgsDoubleSpinBox" name="mDistanceToMapFrameSpinBox">
|
||||
<property name="suffix">
|
||||
<string> mm</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -731,30 +707,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="1">
|
||||
<widget class="QgsDoubleSpinBox" name="mDistanceToMapFrameSpinBox">
|
||||
<property name="suffix">
|
||||
<string> mm</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="16" column="0">
|
||||
<widget class="QLabel" name="mCoordinatePrecisionLabel">
|
||||
<property name="text">
|
||||
<string>Coordinate precision</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Font</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="mAnnotationPositionLabelRight">
|
||||
<property name="text">
|
||||
@ -765,109 +717,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="0">
|
||||
<widget class="QLabel" name="mDistanceToFrameLabel">
|
||||
<property name="text">
|
||||
<string>Distance to map frame</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="2">
|
||||
<widget class="QgsPropertyOverrideButton" name="mLabelDistDDBtn">
|
||||
<property name="text">
|
||||
<string>…</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="16" column="1" colspan="2">
|
||||
<widget class="QgsSpinBox" name="mCoordinatePrecisionSpinBox">
|
||||
<property name="showClearButton" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="1" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QgsColorButton" name="mAnnotationFontColorButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="13" column="1" colspan="2">
|
||||
<widget class="QgsFontButton" name="mAnnotationFontButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationDirectionComboBoxBottom"/>
|
||||
</item>
|
||||
<item row="11" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationPositionBottomComboBox"/>
|
||||
</item>
|
||||
<item row="10" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationDisplayBottomComboBox"/>
|
||||
</item>
|
||||
<item row="9" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationDirectionComboBoxTop"/>
|
||||
</item>
|
||||
<item row="8" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationPositionTopComboBox"/>
|
||||
</item>
|
||||
<item row="7" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationDisplayTopComboBox"/>
|
||||
</item>
|
||||
<item row="6" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationDirectionComboBoxRight"/>
|
||||
</item>
|
||||
<item row="5" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationPositionRightComboBox"/>
|
||||
</item>
|
||||
<item row="4" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationDisplayRightComboBox"/>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationDirectionComboBoxLeft"/>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationPositionLeftComboBox"/>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationDisplayLeftComboBox"/>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||
<item>
|
||||
@ -886,6 +735,120 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="13" column="1" colspan="2">
|
||||
<widget class="QgsFontButton" name="mAnnotationFontButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationDisplayRightComboBox"/>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="mAnnotationPositionLabelBottom">
|
||||
<property name="text">
|
||||
<string>Bottom</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationDisplayTopComboBox"/>
|
||||
</item>
|
||||
<item row="13" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Font</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationPositionLeftComboBox"/>
|
||||
</item>
|
||||
<item row="15" column="0">
|
||||
<widget class="QLabel" name="mCoordinatePrecisionLabel">
|
||||
<property name="text">
|
||||
<string>Coordinate precision</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="2">
|
||||
<widget class="QgsPropertyOverrideButton" name="mLabelDistDDBtn">
|
||||
<property name="text">
|
||||
<string>…</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationDirectionComboBoxTop"/>
|
||||
</item>
|
||||
<item row="8" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationPositionTopComboBox"/>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationDirectionComboBoxLeft"/>
|
||||
</item>
|
||||
<item row="6" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationDirectionComboBoxRight"/>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationDisplayLeftComboBox"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="mAnnotationFormatLabel">
|
||||
<property name="text">
|
||||
<string>Format</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="mAnnotationPositionLabelTop">
|
||||
<property name="text">
|
||||
<string>Top</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationPositionBottomComboBox"/>
|
||||
</item>
|
||||
<item row="5" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationPositionRightComboBox"/>
|
||||
</item>
|
||||
<item row="14" column="0">
|
||||
<widget class="QLabel" name="mDistanceToFrameLabel">
|
||||
<property name="text">
|
||||
<string>Distance to map frame</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="1" colspan="2">
|
||||
<widget class="QgsSpinBox" name="mCoordinatePrecisionSpinBox">
|
||||
<property name="showClearButton" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mAnnotationDirectionComboBoxBottom"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -897,6 +860,12 @@
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>QgsCollapsibleGroupBoxBasic</class>
|
||||
<extends>QGroupBox</extends>
|
||||
<header location="global">qgscollapsiblegroupbox.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QgsScrollArea</class>
|
||||
<extends>QScrollArea</extends>
|
||||
@ -904,9 +873,9 @@
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QgsCollapsibleGroupBoxBasic</class>
|
||||
<extends>QGroupBox</extends>
|
||||
<header>qgscollapsiblegroupbox.h</header>
|
||||
<class>QgsColorButton</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>qgscolorbutton.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
@ -914,11 +883,21 @@
|
||||
<extends>QDoubleSpinBox</extends>
|
||||
<header>qgsdoublespinbox.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QgsFontButton</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>qgsfontbutton.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QgsSpinBox</class>
|
||||
<extends>QSpinBox</extends>
|
||||
<header>qgsspinbox.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QgsPropertyOverrideButton</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>qgspropertyoverridebutton.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QgsBlendModeComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
@ -929,38 +908,31 @@
|
||||
<extends>QToolButton</extends>
|
||||
<header>qgssymbolbutton.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QgsPropertyOverrideButton</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>qgspropertyoverridebutton.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QgsColorButton</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>qgscolorbutton.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QgsFontButton</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>qgsfontbutton.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>scrollArea</tabstop>
|
||||
<tabstop>mGridTypeComboBox</tabstop>
|
||||
<tabstop>mMapGridCRSButton</tabstop>
|
||||
<tabstop>mMapGridUnitComboBox</tabstop>
|
||||
<tabstop>mMinWidthSpinBox</tabstop>
|
||||
<tabstop>mMaxWidthSpinBox</tabstop>
|
||||
<tabstop>mOffsetXSpinBox</tabstop>
|
||||
<tabstop>mOffsetXDDBtn</tabstop>
|
||||
<tabstop>mOffsetYSpinBox</tabstop>
|
||||
<tabstop>mOffsetYDDBtn</tabstop>
|
||||
<tabstop>mCrossWidthSpinBox</tabstop>
|
||||
<tabstop>mCrossWidthDDBtn</tabstop>
|
||||
<tabstop>mGridLineStyleButton</tabstop>
|
||||
<tabstop>mGridMarkerStyleButton</tabstop>
|
||||
<tabstop>mGridBlendComboBox</tabstop>
|
||||
<tabstop>mGridFrameGroupBox</tabstop>
|
||||
<tabstop>mFrameStyleComboBox</tabstop>
|
||||
<tabstop>mFrameWidthSpinBox</tabstop>
|
||||
<tabstop>mFrameSizeDDBtn</tabstop>
|
||||
<tabstop>mGridFrameMarginSpinBox</tabstop>
|
||||
<tabstop>mFrameMarginDDBtn</tabstop>
|
||||
<tabstop>mGridFramePenSizeSpinBox</tabstop>
|
||||
<tabstop>mFrameLineThicknessDDBtn</tabstop>
|
||||
<tabstop>mGridFramePenColorButton</tabstop>
|
||||
<tabstop>mGridFrameFill1ColorButton</tabstop>
|
||||
<tabstop>mGridFrameFill2ColorButton</tabstop>
|
||||
@ -988,9 +960,15 @@
|
||||
<tabstop>mAnnotationPositionBottomComboBox</tabstop>
|
||||
<tabstop>mAnnotationDirectionComboBoxBottom</tabstop>
|
||||
<tabstop>mAnnotationFontButton</tabstop>
|
||||
<tabstop>mAnnotationFontColorButton</tabstop>
|
||||
<tabstop>mDistanceToMapFrameSpinBox</tabstop>
|
||||
<tabstop>mLabelDistDDBtn</tabstop>
|
||||
<tabstop>mCoordinatePrecisionSpinBox</tabstop>
|
||||
<tabstop>mEnabledCheckBox</tabstop>
|
||||
<tabstop>mEnabledDDBtn</tabstop>
|
||||
<tabstop>mIntervalXSpinBox</tabstop>
|
||||
<tabstop>mIntervalYDDBtn</tabstop>
|
||||
<tabstop>mIntervalYSpinBox</tabstop>
|
||||
<tabstop>mIntervalXDDBtn</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../../../images/images.qrc"/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user