Skip to content
Permalink
Browse files

Add icon to SpatiaLite geometry type combobox items

  • Loading branch information
DelazJ authored and nyalldawson committed Dec 9, 2017
1 parent c1cebd9 commit e813c80fbcbf46207fdcdaa8beb5d82390873b48
Showing with 8 additions and 6 deletions.
  1. +8 −6 src/app/qgsnewspatialitelayerdialog.cpp
@@ -56,13 +56,15 @@ QgsNewSpatialiteLayerDialog::QgsNewSpatialiteLayerDialog( QWidget *parent, Qt::W
QgsSettings settings;
restoreGeometry( settings.value( QStringLiteral( "Windows/NewSpatiaLiteLayer/geometry" ) ).toByteArray() );

QString path = QgsApplication::defaultThemePath();

mGeometryTypeBox->addItem( tr( "Non spatial" ), QStringLiteral( "" ) );
mGeometryTypeBox->addItem( tr( "Point" ), QStringLiteral( "POINT" ) );
mGeometryTypeBox->addItem( tr( "Line" ), QStringLiteral( "LINESTRING" ) );
mGeometryTypeBox->addItem( tr( "Polygon" ), QStringLiteral( "POLYGON" ) );
mGeometryTypeBox->addItem( tr( "MultiPoint" ), QStringLiteral( "MULTIPOINT" ) );
mGeometryTypeBox->addItem( tr( "MultiLine" ), QStringLiteral( "MULTILINESTRING" ) );
mGeometryTypeBox->addItem( tr( "MultiPolygon" ), QStringLiteral( "MULTIPOLYGON" ) );
mGeometryTypeBox->addItem( QIcon( path + "/mIconPointLayer.svg" ), tr( "Point" ), QStringLiteral( "POINT" ) );
mGeometryTypeBox->addItem( QIcon( path + "/mIconLineLayer.svg" ), tr( "Line" ), QStringLiteral( "LINESTRING" ) );
mGeometryTypeBox->addItem( QIcon( path + "/mIconPolygonLayer.svg" ), tr( "Polygon" ), QStringLiteral( "POLYGON" ) );
mGeometryTypeBox->addItem( QIcon( path + "/mIconPointLayer.svg" ), tr( "MultiPoint" ), QStringLiteral( "MULTIPOINT" ) );
mGeometryTypeBox->addItem( QIcon( path + "/mIconLineLayer.svg" ), tr( "MultiLine" ), QStringLiteral( "MULTILINESTRING" ) );
mGeometryTypeBox->addItem( QIcon( path + "/mIconPolygonLayer.svg" ), tr( "MultiPolygon" ), QStringLiteral( "MULTIPOLYGON" ) );

pbnFindSRID->setEnabled( false );
mGeometryWithZCheckBox->setEnabled( false );

0 comments on commit e813c80

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