Skip to content

Commit

Permalink
Add icon to SpatiaLite geometry type combobox items
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ authored and nyalldawson committed Dec 15, 2017
1 parent c1cebd9 commit e813c80
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/app/qgsnewspatialitelayerdialog.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit e813c80

Please sign in to comment.