Skip to content
Permalink
Browse files

Add icons for line placement

  • Loading branch information
nyalldawson committed Aug 18, 2020
1 parent 748d76a commit f177263b8d3303799609f0b508f280933afba449
@@ -885,6 +885,10 @@
<file>themes/default/mIconGoochMaterial.svg</file>
<file>themes/default/mIconSimpleLineMaterial.svg</file>
<file>themes/default/mIconPhongTexturedMaterial.svg</file>
<file>themes/default/mActionLabelAnchorCenter.svg</file>
<file>themes/default/mActionLabelAnchorCustom.svg</file>
<file>themes/default/mActionLabelAnchorEnd.svg</file>
<file>themes/default/mActionLabelAnchorStart.svg</file>
</qresource>
<qresource prefix="/images/tips">
<file alias="symbol_levels.png">qgis_tips/symbol_levels.png</file>
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="11.883" x2="7.883" y1="22.23" y2="16.23" gradientTransform="matrix(0 -.6892 .7 0 -4.25 10.115)"><stop offset="0" stop-color="#edd400"/><stop offset="1" stop-color="#fff17a"/></linearGradient><path stroke-linejoin="round" stroke-linecap="round" stroke="#c4a000" fill-rule="evenodd" fill="url(#a)" d="M8 9.77L4.5 7.014V1.5h7v5.514z"/><path fill="#2e3436" word-spacing="0" letter-spacing="0" font-family="FreeSans" font-weight="700" aria-label="a" font-size="8" d="M7.34 6.743q-.519 0-.834-.29-.315-.298-.315-.781 0-.947 1.113-1.125l.392-.066q.014 0 .14-.014l.161-.026q.035-.013.133-.033.105-.02.147-.046.042-.027.098-.067.063-.046.084-.099.021-.06.021-.132 0-.357-.567-.357-.364 0-.51.105-.148.106-.183.384h-.945Q6.366 2.96 7.892 2.96q1.547 0 1.547 1.098v1.985q0 .245.224.437v.112H8.6q-.112-.132-.112-.357-.259.251-.546.377-.287.132-.602.132zm1.14-1.588v-.251q-.133.06-.413.113l-.336.06q-.308.059-.434.171-.126.113-.126.318 0 .198.14.317.147.113.392.113.371 0 .574-.219.203-.218.203-.622z"/><path d="M1.694 14.346c2.065-4.412 7.855-.277 11.99-3.585" fill="none" stroke="#8cbe8c" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8"/><path stroke="#517083" fill="#7c96a8" d="M7.5 11.5h2v2h-2z"/></svg>
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs><linearGradient gradientTransform="matrix(0 -.6892 .7 0 -1.25 10.115)" y2="16.23" y1="22.23" x2="7.883" x1="11.883" gradientUnits="userSpaceOnUse" id="a"><stop stop-color="#edd400" offset="0"/><stop stop-color="#fff17a" offset="1"/></linearGradient></defs><g style="line-height:1.25"><path fill="#2e3436" word-spacing="0" letter-spacing="0" font-family="sans-serif" font-size="8.7" aria-label="%" font-weight="700" d="M5.391 7.927q-.207 0-.321.2-.114.196-.114.562 0 .37.111.57.114.195.323.195.211 0 .322-.196.11-.2.11-.569 0-.366-.113-.561-.111-.2-.318-.2zm0-.539q.543 0 .855.347.312.348.312.954 0 .608-.312.96-.312.351-.855.351-.543 0-.858-.35-.312-.353-.312-.96 0-.604.312-.952.315-.35.858-.35zM2.715 10H2.07l2.723-4.977h.647zm-.597-4.977q.542 0 .851.35.313.347.313.955 0 .607-.313.957-.31.35-.851.35-.543 0-.855-.35-.31-.35-.31-.957 0-.608.31-.955.312-.35.855-.35zm0 .54q-.21 0-.324.199-.114.2-.114.566 0 .37.113.572.114.2.324.2.21 0 .321-.2.114-.203.114-.572 0-.367-.114-.566-.114-.2-.32-.2z" style="-inkscape-font-specification:'sans-serif Bold'" stroke-width="1.387"/></g><path d="M11 9.77L7.5 7.014V1.5h7v5.514z" fill="url(#a)" fill-rule="evenodd" stroke="#c4a000" stroke-linecap="round" stroke-linejoin="round"/><path d="M10.34 6.743q-.519 0-.834-.29-.315-.298-.315-.781 0-.947 1.113-1.125l.392-.066q.014 0 .14-.014l.161-.026q.035-.013.133-.033.105-.02.147-.046.042-.027.098-.067.063-.046.084-.099.021-.06.021-.132 0-.357-.567-.357-.364 0-.51.105-.148.106-.183.384h-.945q.091-1.237 1.617-1.237 1.547 0 1.547 1.098v1.985q0 .245.224.437v.112H11.6q-.112-.132-.112-.357-.259.251-.546.377-.287.132-.602.132zm1.14-1.588v-.251q-.133.06-.413.113l-.336.06q-.308.059-.434.171-.126.113-.126.318 0 .198.14.317.147.113.392.113.371 0 .574-.219.203-.218.203-.622z" font-size="8" aria-label="a" font-weight="700" font-family="FreeSans" letter-spacing="0" word-spacing="0" fill="#2e3436"/><path stroke-width="1.8" stroke-linejoin="round" stroke-linecap="round" stroke="#8cbe8c" fill="none" d="M1.694 14.346c2.065-4.412 7.855-.277 11.99-3.585"/><path d="M9.5 11.5h2v2h-2z" fill="#7c96a8" stroke="#517083"/></svg>
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs><linearGradient gradientTransform="matrix(0 -.6892 .7 0 -.25 9.115)" y2="16.23" y1="22.23" x2="7.883" x1="11.883" gradientUnits="userSpaceOnUse" id="a"><stop stop-color="#edd400" offset="0"/><stop stop-color="#fff17a" offset="1"/></linearGradient></defs><path d="M12 8.77L8.5 6.014V.5h7v5.514z" fill="url(#a)" fill-rule="evenodd" stroke="#c4a000" stroke-linecap="round" stroke-linejoin="round"/><path d="M11.34 5.743q-.519 0-.834-.29-.315-.298-.315-.781 0-.947 1.113-1.125l.392-.066q.014 0 .14-.014l.161-.026q.035-.013.133-.033.105-.02.147-.046.042-.027.098-.067.063-.046.084-.099.021-.06.021-.132 0-.357-.567-.357-.364 0-.51.105-.148.106-.183.384h-.945q.091-1.237 1.617-1.237 1.547 0 1.547 1.098v1.985q0 .245.224.437v.112H12.6q-.112-.132-.112-.357-.259.251-.546.377-.287.132-.602.132zm1.14-1.588v-.251q-.133.06-.413.113l-.336.06q-.308.059-.434.171-.126.113-.126.318 0 .198.14.317.147.113.392.113.371 0 .574-.219.203-.218.203-.622z" font-size="8" aria-label="a" font-weight="700" font-family="FreeSans" letter-spacing="0" word-spacing="0" fill="#2e3436"/><path stroke-width="1.8" stroke-linejoin="round" stroke-linecap="round" stroke="#8cbe8c" fill="none" d="M1.694 14.346C3.76 9.934 8.864 14.308 13 11"/><path d="M11.5 10.5h2v2h-2z" fill="#7c96a8" stroke="#517083"/></svg>
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs><linearGradient gradientTransform="matrix(0 -.6892 .7 0 -8.25 11.115)" y2="16.23" y1="22.23" x2="7.883" x1="11.883" gradientUnits="userSpaceOnUse" id="a"><stop stop-color="#edd400" offset="0"/><stop stop-color="#fff17a" offset="1"/></linearGradient></defs><path d="M4 10.77L.5 8.014V2.5h7v5.514z" fill="url(#a)" fill-rule="evenodd" stroke="#c4a000" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.34 7.743q-.519 0-.834-.29-.315-.298-.315-.781 0-.947 1.113-1.125l.392-.066q.014 0 .14-.014l.161-.026q.035-.013.133-.033.105-.02.147-.046.042-.027.098-.067.063-.046.084-.099.021-.06.021-.132 0-.357-.567-.357-.364 0-.51.105-.148.106-.183.384h-.945Q2.366 3.96 3.892 3.96q1.547 0 1.547 1.098v1.985q0 .245.224.437v.112H4.6q-.112-.132-.112-.357-.259.251-.546.377-.287.132-.602.132zm1.14-1.588v-.251q-.133.06-.413.113l-.336.06q-.308.059-.434.171-.126.113-.126.318 0 .198.14.317.147.113.392.113.371 0 .574-.219.203-.218.203-.622z" font-size="8" aria-label="a" font-weight="700" font-family="FreeSans" letter-spacing="0" word-spacing="0" fill="#2e3436"/><path stroke-width="1.8" stroke-linejoin="round" stroke-linecap="round" stroke="#8cbe8c" fill="none" d="M3 14c3.306-3.346 6.549.069 10.684-3.24"/><path d="M2.5 12.5h2v2h-2z" fill="#7c96a8" stroke="#517083"/></svg>
@@ -16,6 +16,7 @@

#include "qgslabellineanchorwidget.h"
#include "qgsexpressioncontextutils.h"
#include "qgsapplication.h"

QgsLabelLineAnchorWidget::QgsLabelLineAnchorWidget( QWidget *parent, QgsVectorLayer *vl )
: QgsLabelSettingsWidgetBase( parent, vl )
@@ -24,10 +25,10 @@ QgsLabelLineAnchorWidget::QgsLabelLineAnchorWidget( QWidget *parent, QgsVectorLa

setPanelTitle( tr( "Line Anchor Settings" ) );

mPercentPlacementComboBox->addItem( tr( "Center of Line" ), 0.5 );
mPercentPlacementComboBox->addItem( tr( "Start of Line" ), 0.0 );
mPercentPlacementComboBox->addItem( tr( "End of Line" ), 1.0 );
mPercentPlacementComboBox->addItem( tr( "Custom" ), -1.0 );
mPercentPlacementComboBox->addItem( QgsApplication::getThemeIcon( QStringLiteral( "/mActionLabelAnchorCenter.svg" ) ), tr( "Center of Line" ), 0.5 );
mPercentPlacementComboBox->addItem( QgsApplication::getThemeIcon( QStringLiteral( "/mActionLabelAnchorStart.svg" ) ), tr( "Start of Line" ), 0.0 );
mPercentPlacementComboBox->addItem( QgsApplication::getThemeIcon( QStringLiteral( "/mActionLabelAnchorEnd.svg" ) ), tr( "End of Line" ), 1.0 );
mPercentPlacementComboBox->addItem( QgsApplication::getThemeIcon( QStringLiteral( "/mActionLabelAnchorCustom.svg" ) ), tr( "Custom" ), -1.0 );

connect( mPercentPlacementComboBox, qgis::overload<int>::of( &QComboBox::currentIndexChanged ), this, [ = ]( int )
{

0 comments on commit f177263

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