18 #include <QColorDialog> 32 mOffsetSpin->setClearValue( 0.0 );
37 if ( !layer || layer->
layerType() !=
"ArrowLine" )
44 mArrowWidthSpin->setValue( mLayer->
arrowWidth() );
52 mHeadLengthSpin->setValue( mLayer->
headLength() );
59 mHeadTypeCombo->setCurrentIndex( mLayer->
headType() );
60 mArrowTypeCombo->setCurrentIndex( mLayer->
arrowType() );
62 mOffsetSpin->setValue( mLayer->
offset() );
63 mOffsetUnitWidget->setUnit( mLayer->
offsetUnit() );
66 mCurvedArrowChck->setChecked( mLayer->
isCurved() );
67 mRepeatArrowChck->setChecked( mLayer->
isRepeated() );
84 void QgsArrowSymbolLayerWidget::on_mArrowWidthSpin_valueChanged(
double d )
93 void QgsArrowSymbolLayerWidget::on_mArrowStartWidthSpin_valueChanged(
double d )
102 void QgsArrowSymbolLayerWidget::on_mHeadLengthSpin_valueChanged(
double d )
111 void QgsArrowSymbolLayerWidget::on_mHeadThicknessSpin_valueChanged(
double d )
120 void QgsArrowSymbolLayerWidget::on_mArrowWidthUnitWidget_changed()
130 void QgsArrowSymbolLayerWidget::on_mArrowStartWidthUnitWidget_changed()
140 void QgsArrowSymbolLayerWidget::on_mHeadLengthUnitWidget_changed()
150 void QgsArrowSymbolLayerWidget::on_mHeadThicknessUnitWidget_changed()
160 void QgsArrowSymbolLayerWidget::on_mHeadTypeCombo_currentIndexChanged(
int idx )
168 mArrowStartWidthDDBtn->setEnabled( isSingle );
169 mArrowStartWidthSpin->setEnabled( isSingle );
170 mArrowStartWidthUnitWidget->setEnabled( isSingle );
174 void QgsArrowSymbolLayerWidget::on_mArrowTypeCombo_currentIndexChanged(
int idx )
184 void QgsArrowSymbolLayerWidget::on_mOffsetSpin_valueChanged(
double d )
193 void QgsArrowSymbolLayerWidget::on_mOffsetUnitWidget_changed()
203 void QgsArrowSymbolLayerWidget::on_mCurvedArrowChck_stateChanged(
int state )
212 void QgsArrowSymbolLayerWidget::on_mRepeatArrowChck_stateChanged(
int state )
void setHeadThicknessUnitScale(const QgsMapUnitScale &scale)
Set the scale for the head height.
double arrowStartWidth() const
Get current arrow start width.
double arrowWidth() const
Get current arrow width.
QgsSymbolV2::OutputUnit headThicknessUnit() const
Get the unit for the head height.
The output shall be in pixels.
QgsMapUnitScale arrowStartWidthUnitScale() const
Get the scale for the arrow start width.
QgsMapUnitScale headLengthUnitScale() const
Get the scale for the head length.
void setArrowWidthUnit(QgsSymbolV2::OutputUnit unit)
Set the unit for the arrow width.
const QgsMapUnitScale & offsetMapUnitScale() const
ArrowType arrowType() const
Get the current arrow type.
bool isRepeated() const
Return whether the arrow is repeated along the line or not.
The output shall be in millimeters.
void setOffset(double offset)
void setHeadLength(double length)
Set the arrow head length.
void setHeadThickness(double thickness)
Set the arrow head height.
The output shall be in map unitx.
void setHeadThicknessUnit(QgsSymbolV2::OutputUnit unit)
Set the unit for the head height.
void setArrowWidth(double width)
Set the arrow width.
ArrowType
Possible arrow types.
bool isCurved() const
Return whether it is a curved arrow or a straight one.
double headLength() const
Get the current arrow head length.
void setIsRepeated(bool isRepeated)
Set whether the arrow is repeated along the line.
QgsMapUnitScale arrowWidthUnitScale() const
Get the scale for the arrow width.
void setOffsetUnit(QgsSymbolV2::OutputUnit unit)
virtual QString layerType() const =0
Returns a string that represents this layer type.
void setIsCurved(bool isCurved)
Set whether it is a curved arrow or a straight one.
void setHeadLengthUnitScale(const QgsMapUnitScale &scale)
Set the scale for the head length.
void setMapUnitScale(const QgsMapUnitScale &scale) override
void setArrowType(ArrowType type)
Set the arrow type.
QgsSymbolV2::OutputUnit offsetUnit() const
QgsSymbolV2::OutputUnit headLengthUnit() const
Get the unit for the head length.
void setArrowWidthUnitScale(const QgsMapUnitScale &scale)
Set the scale for the arrow width.
void setArrowStartWidthUnit(QgsSymbolV2::OutputUnit unit)
Set the unit for the arrow start width.
void setHeadType(HeadType type)
Set the head type.
QgsSymbolV2::OutputUnit arrowStartWidthUnit() const
Get the unit for the arrow start width.
void setHeadLengthUnit(QgsSymbolV2::OutputUnit unit)
Set the unit for the head length.
QgsMapUnitScale headThicknessUnitScale() const
Get the scale for the head height.
Line symbol layer used for representing lines as arrows.
HeadType
Possible head types.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
QgsSymbolV2::OutputUnit arrowWidthUnit() const
Get the unit for the arrow width.
Represents a vector layer which manages a vector based data sets.
HeadType headType() const
Get the current head type.
void setArrowStartWidth(double width)
Set the arrow start width.
void setArrowStartWidthUnitScale(const QgsMapUnitScale &scale)
Set the scale for the arrow start width.
double headThickness() const
Get the current arrow head height.