mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-04 00:06:46 -05:00
Apply suggestions from code review
This commit is contained in:
parent
34fd68fd58
commit
2973735a6b
@ -145,9 +145,12 @@ Sets the background color for the text preview widget.
|
||||
:param color: background color
|
||||
%End
|
||||
|
||||
void updateDataDefinedAlignment();
|
||||
void enableDataDefinedAlignment( bool enable ) /Deprecated/;
|
||||
%Docstring
|
||||
Update the enabled state of the data defined alignment buttons.
|
||||
|
||||
.. deprecated::
|
||||
QGIS 3.24
|
||||
%End
|
||||
|
||||
virtual QgsExpressionContext createExpressionContext() const;
|
||||
|
||||
@ -36,6 +36,7 @@
|
||||
#include "qgsstatusbar.h"
|
||||
#include "qgslabelingresults.h"
|
||||
#include "qgsexpressionnodeimpl.h"
|
||||
#include "qgsreferencedgeometry.h"
|
||||
|
||||
#include <QMouseEvent>
|
||||
|
||||
@ -632,50 +633,8 @@ QVariant QgsMapToolLabel::evaluateDataDefinedProperty( QgsPalLayerSettings::Prop
|
||||
|
||||
bool QgsMapToolLabel::currentLabelDataDefinedPosition( double &x, bool &xSuccess, double &y, bool &ySuccess, int &xCol, int &yCol ) const
|
||||
{
|
||||
QgsVectorLayer *vlayer = mCurrentLabel.layer;
|
||||
QgsFeatureId featureId = mCurrentLabel.pos.featureId;
|
||||
|
||||
xSuccess = false;
|
||||
ySuccess = false;
|
||||
|
||||
if ( !vlayer )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( mCurrentLabel.pos.isDiagram )
|
||||
{
|
||||
if ( !diagramMoveable( vlayer, xCol, yCol ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ( !labelMoveable( vlayer, mCurrentLabel.settings, xCol, yCol ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
QgsFeature f;
|
||||
if ( !vlayer->getFeatures( QgsFeatureRequest().setFilterFid( featureId ).setFlags( QgsFeatureRequest::NoGeometry ) ).nextFeature( f ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( mCurrentLabel.pos.isUnplaced )
|
||||
{
|
||||
xSuccess = false;
|
||||
ySuccess = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsAttributes attributes = f.attributes();
|
||||
if ( !attributes.at( xCol ).isNull() )
|
||||
x = attributes.at( xCol ).toDouble( &xSuccess );
|
||||
if ( !attributes.at( yCol ).isNull() )
|
||||
y = attributes.at( yCol ).toDouble( &ySuccess );
|
||||
}
|
||||
|
||||
return true;
|
||||
int pointCol = -1;
|
||||
return currentLabelDataDefinedPosition( x, xSuccess, y, ySuccess, xCol, yCol, pointCol );
|
||||
}
|
||||
|
||||
bool QgsMapToolLabel::currentLabelDataDefinedPosition( double &x, bool &xSuccess, double &y, bool &ySuccess, int &xCol, int &yCol, int &pointCol ) const
|
||||
@ -715,30 +674,18 @@ bool QgsMapToolLabel::currentLabelDataDefinedPosition( double &x, bool &xSuccess
|
||||
|
||||
if ( mCurrentLabel.settings.dataDefinedProperties().isActive( QgsPalLayerSettings::PositionPoint ) )
|
||||
{
|
||||
if ( !attributes.at( pointCol ).isNull() )
|
||||
if ( pointCol >= 0
|
||||
&& !attributes.at( pointCol ).isNull() )
|
||||
{
|
||||
QVariant pointAsVariant = attributes.at( pointCol );
|
||||
if ( pointAsVariant.canConvert<QgsGeometry>() )
|
||||
{
|
||||
const QgsGeometry geometry = pointAsVariant.value<QgsGeometry>();
|
||||
if ( const QgsPoint *point = ( geometry.constGet() ? qgsgeometry_cast<QgsPoint *>( geometry.constGet()->simplifiedTypeRef() ) : nullptr ) )
|
||||
{
|
||||
const QgsGeometry geometry = pointAsVariant.value<QgsGeometry>();
|
||||
if ( const QgsPoint *point = ( geometry.constGet() ? qgsgeometry_cast<QgsPoint *>( geometry.constGet()->simplifiedTypeRef() ) : nullptr ) )
|
||||
{
|
||||
x = point->x();
|
||||
y = point->y();
|
||||
|
||||
xSuccess = true;
|
||||
ySuccess = true;
|
||||
}
|
||||
}
|
||||
else if ( !pointAsVariant.toByteArray().isEmpty() )
|
||||
{
|
||||
QgsPoint point;
|
||||
QgsConstWkbPtr wkbPtr( pointAsVariant.toByteArray() );
|
||||
if ( point.fromWkb( wkbPtr ) )
|
||||
{
|
||||
x = point.x();
|
||||
y = point.y();
|
||||
|
||||
xSuccess = true;
|
||||
ySuccess = true;
|
||||
}
|
||||
@ -809,7 +756,7 @@ bool QgsMapToolLabel::changeCurrentLabelDataDefinedPosition( const QVariant &x,
|
||||
QString pointColName = dataDefinedColumnName( QgsPalLayerSettings::PositionPoint, mCurrentLabel.settings, mCurrentLabel.layer );
|
||||
int pointCol = mCurrentLabel.layer->fields().lookupField( pointColName );
|
||||
|
||||
if ( !mCurrentLabel.layer->changeAttributeValue( mCurrentLabel.pos.featureId, pointCol, QgsPoint( x.toDouble(), y.toDouble() ).asWkt() ) )
|
||||
if ( !mCurrentLabel.layer->changeAttributeValue( mCurrentLabel.pos.featureId, pointCol, QVariant::fromValue( QgsReferencedGeometry( QgsGeometry::fromPointXY( QgsPoint( x.toDouble(), y.toDouble() ) ), mCurrentLabel.layer->crs() ) ) ) )
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@ -905,12 +852,8 @@ bool QgsMapToolLabel::labelMoveable( QgsVectorLayer *vlayer, int &xCol, int &yCo
|
||||
|
||||
bool QgsMapToolLabel::labelMoveable( QgsVectorLayer *vlayer, const QgsPalLayerSettings &settings, int &xCol, int &yCol ) const
|
||||
{
|
||||
QString xColName = dataDefinedColumnName( QgsPalLayerSettings::PositionX, settings, vlayer );
|
||||
QString yColName = dataDefinedColumnName( QgsPalLayerSettings::PositionY, settings, vlayer );
|
||||
//return !xColName.isEmpty() && !yColName.isEmpty();
|
||||
xCol = vlayer->fields().lookupField( xColName );
|
||||
yCol = vlayer->fields().lookupField( yColName );
|
||||
return ( xCol != -1 && yCol != -1 );
|
||||
int pointCol = -1;
|
||||
return labelMoveable( vlayer, settings, xCol, yCol, pointCol );
|
||||
}
|
||||
|
||||
bool QgsMapToolLabel::layerCanPin( QgsVectorLayer *vlayer, int &xCol, int &yCol ) const
|
||||
@ -1071,7 +1014,7 @@ bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsPalIndexe
|
||||
{
|
||||
index = vlayer->fields().lookupField( prop.field() );
|
||||
}
|
||||
else if ( prop.propertyType() != QgsProperty::ExpressionBasedProperty )
|
||||
else
|
||||
{
|
||||
index = QgsAuxiliaryLayer::createProperty( p, vlayer, false );
|
||||
changed = true;
|
||||
|
||||
@ -83,12 +83,6 @@ class APP_EXPORT QgsMapToolLabel: public QgsMapToolAdvancedDigitizing
|
||||
*/
|
||||
bool labelCanShowHide( QgsVectorLayer *vlayer, int &showCol ) const;
|
||||
|
||||
/**
|
||||
* Checks if labels in a layer can be rotated
|
||||
* \param rotationCol out: attribute column for data defined label rotation
|
||||
*/
|
||||
bool layerIsRotatable( QgsVectorLayer *vlayer, int &rotationCol ) const;
|
||||
|
||||
/**
|
||||
* Checks if labels in a layer can be rotated
|
||||
* \param rotationCol out: attribute column for data defined label rotation
|
||||
|
||||
@ -187,48 +187,30 @@ void QgsMapToolMoveLabel::cadCanvasPressEvent( QgsMapMouseEvent *e )
|
||||
if ( !mCurrentLabel.pos.isDiagram && !labelMoveable( vlayer, mCurrentLabel.settings, xCol, yCol, pointCol ) )
|
||||
{
|
||||
if ( mCurrentLabel.settings.dataDefinedProperties().isActive( QgsPalLayerSettings::PositionPoint ) )
|
||||
mCurrentLabel.settings.dataDefinedProperties().property( QgsPalLayerSettings::PositionPoint ).setActive( false );
|
||||
|
||||
mPalProperties.clear();
|
||||
mPalProperties << QgsPalLayerSettings::PositionX;
|
||||
mPalProperties << QgsPalLayerSettings::PositionY;
|
||||
QgsPalIndexes indexes;
|
||||
if ( createAuxiliaryFields( indexes ) )
|
||||
return;
|
||||
|
||||
if ( !labelMoveable( vlayer, mCurrentLabel.settings, xCol, yCol ) )
|
||||
{
|
||||
mPalProperties.clear();
|
||||
mPalProperties << QgsPalLayerSettings::PositionPoint;
|
||||
QgsPalIndexes indexes;
|
||||
if ( createAuxiliaryFields( indexes ) )
|
||||
return;
|
||||
|
||||
if ( !labelMoveable( vlayer, mCurrentLabel.settings, xCol, yCol, pointCol ) )
|
||||
{
|
||||
QString pointColName = dataDefinedColumnName( QgsPalLayerSettings::PositionPoint, mCurrentLabel.settings, vlayer );
|
||||
if ( pointCol < 0 )
|
||||
QgisApp::instance()->messageBar()->pushWarning( tr( "Move Label" ), tr( "The label Point column “%1” does not exist in the layer" ).arg( pointColName ) );
|
||||
return;
|
||||
}
|
||||
|
||||
pointCol = indexes[ QgsPalLayerSettings::PositionPoint ];
|
||||
QString xColName = dataDefinedColumnName( QgsPalLayerSettings::PositionX, mCurrentLabel.settings, vlayer );
|
||||
QString yColName = dataDefinedColumnName( QgsPalLayerSettings::PositionY, mCurrentLabel.settings, vlayer );
|
||||
if ( xCol < 0 && yCol < 0 )
|
||||
QgisApp::instance()->messageBar()->pushWarning( tr( "Move Label" ), tr( "The label X/Y columns “%1” and “%2” do not exist in the layer" ).arg( xColName, yColName ) );
|
||||
else if ( xCol < 0 )
|
||||
QgisApp::instance()->messageBar()->pushWarning( tr( "Move Label" ), tr( "The label X column “%1” does not exist in the layer" ).arg( xColName ) );
|
||||
else if ( yCol < 0 )
|
||||
QgisApp::instance()->messageBar()->pushWarning( tr( "Move Label" ), tr( "The label Y column “%1” does not exist in the layer" ).arg( yColName ) );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
mPalProperties.clear();
|
||||
mPalProperties << QgsPalLayerSettings::PositionX;
|
||||
mPalProperties << QgsPalLayerSettings::PositionY;
|
||||
QgsPalIndexes indexes;
|
||||
if ( createAuxiliaryFields( indexes ) )
|
||||
return;
|
||||
|
||||
if ( !labelMoveable( vlayer, mCurrentLabel.settings, xCol, yCol ) )
|
||||
{
|
||||
QString xColName = dataDefinedColumnName( QgsPalLayerSettings::PositionX, mCurrentLabel.settings, vlayer );
|
||||
QString yColName = dataDefinedColumnName( QgsPalLayerSettings::PositionY, mCurrentLabel.settings, vlayer );
|
||||
if ( xCol < 0 && yCol < 0 )
|
||||
QgisApp::instance()->messageBar()->pushWarning( tr( "Move Label" ), tr( "The label X/Y columns “%1” and “%2” do not exist in the layer" ).arg( xColName, yColName ) );
|
||||
else if ( xCol < 0 )
|
||||
QgisApp::instance()->messageBar()->pushWarning( tr( "Move Label" ), tr( "The label X column “%1” does not exist in the layer" ).arg( xColName ) );
|
||||
else if ( yCol < 0 )
|
||||
QgisApp::instance()->messageBar()->pushWarning( tr( "Move Label" ), tr( "The label Y column “%1” does not exist in the layer" ).arg( yColName ) );
|
||||
return;
|
||||
}
|
||||
|
||||
xCol = indexes[ QgsPalLayerSettings::PositionX ];
|
||||
yCol = indexes[ QgsPalLayerSettings::PositionY ];
|
||||
}
|
||||
xCol = indexes[ QgsPalLayerSettings::PositionX ];
|
||||
yCol = indexes[ QgsPalLayerSettings::PositionY ];
|
||||
}
|
||||
else if ( mCurrentLabel.pos.isDiagram && !diagramMoveable( vlayer, xCol, yCol ) )
|
||||
{
|
||||
@ -244,8 +226,11 @@ void QgsMapToolMoveLabel::cadCanvasPressEvent( QgsMapMouseEvent *e )
|
||||
yCol = indexes[ QgsDiagramLayerSettings::PositionY ];
|
||||
}
|
||||
|
||||
bool usesAuxFields = vlayer->fields().fieldOrigin( xCol ) == QgsFields::OriginJoin
|
||||
&& vlayer->fields().fieldOrigin( yCol ) == QgsFields::OriginJoin;
|
||||
bool usesAuxFields = false;
|
||||
if ( xCol >= 0 && yCol >= 0 )
|
||||
usesAuxFields = vlayer->fields().fieldOrigin( xCol ) == QgsFields::OriginJoin
|
||||
&& vlayer->fields().fieldOrigin( yCol ) == QgsFields::OriginJoin;
|
||||
|
||||
if ( mCurrentLabel.settings.dataDefinedProperties().isActive( QgsPalLayerSettings::PositionPoint )
|
||||
&& !mCurrentLabel.pos.isDiagram )
|
||||
usesAuxFields = vlayer->fields().fieldOrigin( pointCol ) == QgsFields::OriginJoin;
|
||||
|
||||
@ -2383,47 +2383,53 @@ std::unique_ptr<QgsLabelFeature> QgsPalLayerSettings::registerFeatureWithDetails
|
||||
bool ddPosition = false;
|
||||
|
||||
if ( mDataDefinedProperties.isActive( QgsPalLayerSettings::PositionX )
|
||||
&& mDataDefinedProperties.isActive( QgsPalLayerSettings::PositionY )
|
||||
&& !mDataDefinedProperties.value( QgsPalLayerSettings::PositionX, context.expressionContext() ).isNull()
|
||||
&& !mDataDefinedProperties.value( QgsPalLayerSettings::PositionY, context.expressionContext() ).isNull() )
|
||||
&& mDataDefinedProperties.isActive( QgsPalLayerSettings::PositionY ) )
|
||||
{
|
||||
ddPosition = true;
|
||||
|
||||
bool ddXPos = false, ddYPos = false;
|
||||
xPos = mDataDefinedProperties.value( QgsPalLayerSettings::PositionX, context.expressionContext() ).toDouble( &ddXPos );
|
||||
yPos = mDataDefinedProperties.value( QgsPalLayerSettings::PositionY, context.expressionContext() ).toDouble( &ddYPos );
|
||||
if ( ddXPos && ddYPos )
|
||||
hasDataDefinedPosition = true;
|
||||
}
|
||||
else if ( mDataDefinedProperties.isActive( QgsPalLayerSettings::PositionPoint )
|
||||
&& !mDataDefinedProperties.value( QgsPalLayerSettings::PositionPoint, context.expressionContext() ).isNull() )
|
||||
{
|
||||
ddPosition = true;
|
||||
|
||||
QVariant pointAsVariant = mDataDefinedProperties.value( QgsPalLayerSettings::PositionPoint, context.expressionContext() );
|
||||
QgsPoint point;
|
||||
if ( pointAsVariant.canConvert<QgsReferencedGeometry>() )
|
||||
const QVariant xPosProperty = mDataDefinedProperties.value( QgsPalLayerSettings::PositionX, context.expressionContext() );
|
||||
const QVariant yPosProperty = mDataDefinedProperties.value( QgsPalLayerSettings::PositionY, context.expressionContext() );
|
||||
if ( !xPosProperty.isNull()
|
||||
&& !yPosProperty.isNull() )
|
||||
{
|
||||
point = QgsPoint( pointAsVariant.value<QgsReferencedGeometry>().asPoint() );
|
||||
}
|
||||
else if ( pointAsVariant.canConvert<QgsGeometry>() )
|
||||
{
|
||||
point = QgsPoint( pointAsVariant.value<QgsGeometry>().asPoint() );
|
||||
}
|
||||
else if ( !pointAsVariant.toString().isEmpty() )
|
||||
{
|
||||
point.fromWkt( pointAsVariant.toString() );
|
||||
}
|
||||
ddPosition = true;
|
||||
|
||||
if ( !point.isEmpty() )
|
||||
{
|
||||
hasDataDefinedPosition = true;
|
||||
|
||||
xPos = point.x();
|
||||
yPos = point.y();
|
||||
bool ddXPos = false, ddYPos = false;
|
||||
xPos = xPosProperty.toDouble( &ddXPos );
|
||||
yPos = yPosProperty.toDouble( &ddYPos );
|
||||
if ( ddXPos && ddYPos )
|
||||
hasDataDefinedPosition = true;
|
||||
}
|
||||
}
|
||||
else if ( mDataDefinedProperties.isActive( QgsPalLayerSettings::PositionPoint ) )
|
||||
{
|
||||
const QVariant pointPosProperty = mDataDefinedProperties.value( QgsPalLayerSettings::PositionPoint, context.expressionContext() );
|
||||
if ( !pointPosProperty.isNull() )
|
||||
{
|
||||
ddPosition = true;
|
||||
|
||||
QgsPoint point;
|
||||
if ( pointPosProperty.canConvert<QgsReferencedGeometry>() )
|
||||
{
|
||||
QgsReferencedGeometry referencedGeometryPoint = pointPosProperty.value<QgsReferencedGeometry>();
|
||||
point = QgsPoint( referencedGeometryPoint.asPoint() );
|
||||
|
||||
if ( !referencedGeometryPoint.isNull()
|
||||
&& ct.sourceCrs() != referencedGeometryPoint.crs() )
|
||||
QgsMessageLog::logMessage( QObject::tr( "Label position geometry is not in layer coordinates reference system. Layer CRS: '%1', Geometry CRS: '%2'" ).arg( ct.sourceCrs().userFriendlyIdentifier(), referencedGeometryPoint.crs().userFriendlyIdentifier() ), QObject::tr( "Labeling" ), Qgis::Warning );
|
||||
}
|
||||
else if ( pointPosProperty.canConvert<QgsGeometry>() )
|
||||
{
|
||||
point = QgsPoint( pointPosProperty.value<QgsGeometry>().asPoint() );
|
||||
}
|
||||
|
||||
if ( !point.isEmpty() )
|
||||
{
|
||||
hasDataDefinedPosition = true;
|
||||
|
||||
xPos = point.x();
|
||||
yPos = point.y();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ddPosition )
|
||||
{
|
||||
@ -2525,12 +2531,6 @@ std::unique_ptr<QgsLabelFeature> QgsPalLayerSettings::registerFeatureWithDetails
|
||||
else
|
||||
{
|
||||
anchorPosition = QgsPointXY( xPos, yPos );
|
||||
|
||||
// only rotate non-pinned OverPoint placements until other placements are supported in pal::Feature
|
||||
if ( dataDefinedRotation && placement != QgsPalLayerSettings::OverPoint )
|
||||
{
|
||||
angle = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -482,8 +482,6 @@ void QgsLabelingGui::setLayer( QgsMapLayer *mapLayer )
|
||||
// do this after other widgets are configured, so they can be enabled/disabled
|
||||
populateDataDefinedButtons();
|
||||
|
||||
updateDataDefinedAlignment();
|
||||
|
||||
updateUi(); // should come after data defined button setup
|
||||
}
|
||||
|
||||
|
||||
@ -685,9 +685,12 @@ void QgsPropertyOverrideButton::showExpressionDialog()
|
||||
if ( d.exec() == QDialog::Accepted )
|
||||
{
|
||||
mExpressionString = d.expressionText().trimmed();
|
||||
bool active = mProperty.isActive();
|
||||
mProperty.setExpressionString( mExpressionString );
|
||||
mProperty.setTransformer( nullptr );
|
||||
setActivePrivate( !mExpressionString.isEmpty() );
|
||||
mProperty.setActive( !mExpressionString.isEmpty() );
|
||||
if ( mProperty.isActive() != active )
|
||||
emit activated( mProperty.isActive() );
|
||||
updateSiblingWidgets( isActive() );
|
||||
updateGui();
|
||||
emit changed();
|
||||
|
||||
@ -813,6 +813,8 @@ void QgsTextFormatWidget::populateDataDefinedButtons()
|
||||
registerDataDefinedButton( mCoordAlignmentVDDBtn, QgsPalLayerSettings::Vali );
|
||||
registerDataDefinedButton( mCoordRotationDDBtn, QgsPalLayerSettings::LabelRotation );
|
||||
|
||||
updateDataDefinedAlignment();
|
||||
|
||||
// rendering
|
||||
const QString ddScaleVisInfo = tr( "Value < 0 represents a scale closer than 1:1, e.g. -10 = 10:1<br>"
|
||||
"Value of 0 disables the specific limit." );
|
||||
@ -1862,6 +1864,13 @@ void QgsTextFormatWidget::updateCalloutFrameStatus()
|
||||
mCalloutFrame->setEnabled( mCalloutDrawDDBtn->isActive() || mCalloutsDrawCheckBox->isChecked() );
|
||||
}
|
||||
|
||||
void QgsTextFormatWidget::updateDataDefinedAlignment()
|
||||
{
|
||||
// no data defined alignment without data defined position
|
||||
mCoordAlignmentFrame->setEnabled( ( mCoordXDDBtn->isActive() && mCoordYDDBtn->isActive() )
|
||||
|| mCoordPointDDBtn->isActive() );
|
||||
}
|
||||
|
||||
void QgsTextFormatWidget::setFormatFromStyle( const QString &name, QgsStyle::StyleEntity type )
|
||||
{
|
||||
switch ( type )
|
||||
@ -2056,13 +2065,6 @@ void QgsTextFormatWidget::showBackgroundRadius( bool show )
|
||||
mShapeRadiusUnitsDDBtn->setVisible( show );
|
||||
}
|
||||
|
||||
void QgsTextFormatWidget::updateDataDefinedAlignment()
|
||||
{
|
||||
// no data defined alignment without data defined position
|
||||
mCoordAlignmentFrame->setEnabled( ( mCoordXDDBtn->isActive() && mCoordYDDBtn->isActive() )
|
||||
|| mCoordPointDDBtn->isActive() );
|
||||
}
|
||||
|
||||
QgsExpressionContext QgsTextFormatWidget::createExpressionContext() const
|
||||
{
|
||||
if ( auto *lExpressionContext = mContext.expressionContext() )
|
||||
|
||||
@ -155,8 +155,10 @@ class GUI_EXPORT QgsTextFormatWidget : public QWidget, public QgsExpressionConte
|
||||
|
||||
/**
|
||||
* Update the enabled state of the data defined alignment buttons.
|
||||
*
|
||||
* \deprecated QGIS 3.24
|
||||
*/
|
||||
void updateDataDefinedAlignment();
|
||||
Q_DECL_DEPRECATED void enableDataDefinedAlignment( bool enable ) SIP_DEPRECATED { Q_UNUSED( enable ) }
|
||||
|
||||
QgsExpressionContext createExpressionContext() const override;
|
||||
|
||||
@ -311,6 +313,7 @@ class GUI_EXPORT QgsTextFormatWidget : public QWidget, public QgsExpressionConte
|
||||
void updateBufferFrameStatus();
|
||||
void updateShadowFrameStatus();
|
||||
void updateCalloutFrameStatus();
|
||||
void updateDataDefinedAlignment();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -5424,12 +5424,92 @@ font-style: italic;</string>
|
||||
<property name="rightMargin">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="mCoordAlignmentLabel">
|
||||
<property name="text">
|
||||
<string>Alignment</string>
|
||||
</property>
|
||||
</widget>
|
||||
<item row="3" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_25">
|
||||
<item>
|
||||
<widget class="QgsPropertyOverrideButton" name="mCoordRotationDDBtn">
|
||||
<property name="text">
|
||||
<string>…</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="mCoordRotationUnitComboBox"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkPreserveRotation">
|
||||
<property name="toolTip">
|
||||
<string>Uncheck to write labeling engine derived rotation on pin and NULL on unpin</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">margin-left: 12px; margin-top: 3px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Preserve data rotation values</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_22">
|
||||
<item>
|
||||
<widget class="QLabel" name="mCoordXLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>X</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QgsPropertyOverrideButton" name="mCoordXDDBtn">
|
||||
<property name="text">
|
||||
<string>…</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="mCoordYLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Y</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QgsPropertyOverrideButton" name="mCoordYDDBtn">
|
||||
<property name="text">
|
||||
<string>…</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<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="0" column="0">
|
||||
<widget class="QLabel" name="mCoordLabel">
|
||||
@ -5438,14 +5518,7 @@ font-style: italic;</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="mCoordRotationLabel">
|
||||
<property name="text">
|
||||
<string>Rotation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="QFrame" name="mCoordAlignmentFrame">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_27">
|
||||
<property name="leftMargin">
|
||||
@ -5516,68 +5589,15 @@ font-style: italic;</string>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_22">
|
||||
<item>
|
||||
<widget class="QLabel" name="mCoordXLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>X</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QgsPropertyOverrideButton" name="mCoordXDDBtn">
|
||||
<property name="text">
|
||||
<string>…</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="mCoordYLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Y</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QgsPropertyOverrideButton" name="mCoordYDDBtn">
|
||||
<property name="text">
|
||||
<string>…</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_44">
|
||||
<property name="text">
|
||||
<string>Point</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="mCoordRotationLabel">
|
||||
<property name="text">
|
||||
<string>Rotation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_15">
|
||||
<item>
|
||||
<widget class="QgsPropertyOverrideButton" name="mCoordPointDDBtn">
|
||||
<property name="text">
|
||||
@ -5600,35 +5620,19 @@ font-style: italic;</string>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_25">
|
||||
<item>
|
||||
<widget class="QgsPropertyOverrideButton" name="mCoordRotationDDBtn">
|
||||
<property name="text">
|
||||
<string>…</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="mCoordRotationUnitComboBox"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkPreserveRotation">
|
||||
<property name="toolTip">
|
||||
<string>Uncheck to write labeling engine derived rotation on pin and NULL on unpin</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">margin-left: 12px; margin-top: 3px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Preserve data rotation values</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="mCoordAlignmentLabel">
|
||||
<property name="text">
|
||||
<string>Alignment</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_44">
|
||||
<property name="text">
|
||||
<string>Point</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user