Skip to content

Commit

Permalink
Icon for elevation profile item
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 17, 2023
1 parent 943198a commit cf4df17
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions images/images.qrc
Expand Up @@ -974,6 +974,7 @@
<file>themes/default/gpsicons/mActionReset.svg</file>
<file>themes/default/gpsicons/mActionAddTrackPoint.svg</file>
<file>themes/default/gpsicons/mIconGpsDestinationLayer.svg</file>
<file>themes/default/mLayoutItemElevationProfile.svg</file>
</qresource>
<qresource prefix="/images/tips">
<file alias="symbol_levels.png">qgis_tips/symbol_levels.png</file>
Expand Down
1 change: 1 addition & 0 deletions images/themes/default/mLayoutItemElevationProfile.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/core/layout/qgslayoutitem.cpp
Expand Up @@ -126,6 +126,11 @@ int QgsLayoutItem::type() const
return QgsLayoutItemRegistry::LayoutItem;
}

QIcon QgsLayoutItem::icon() const
{
return QgsApplication::getThemeIcon( QStringLiteral( "/mLayoutItem.svg" ) );
}

QgsLayoutItem::Flags QgsLayoutItem::itemFlags() const
{
return QgsLayoutItem::Flags();
Expand Down
2 changes: 1 addition & 1 deletion src/core/layout/qgslayoutitem.h
Expand Up @@ -363,7 +363,7 @@ class CORE_EXPORT QgsLayoutItem : public QgsLayoutObject, public QGraphicsRectIt
/**
* Returns the item's icon.
*/
virtual QIcon icon() const { return QgsApplication::getThemeIcon( QStringLiteral( "/mLayoutItem.svg" ) ); }
virtual QIcon icon() const;

/**
* Returns the item identification string. This is a unique random string set for the item
Expand Down
2 changes: 1 addition & 1 deletion src/core/layout/qgslayoutitemelevationprofile.cpp
Expand Up @@ -76,7 +76,7 @@ int QgsLayoutItemElevationProfile::type() const

QIcon QgsLayoutItemElevationProfile::icon() const
{
return QgsApplication::getThemeIcon( QStringLiteral( "/mLayoutItemLabel.svg" ) );
return QgsApplication::getThemeIcon( QStringLiteral( "mLayoutItemElevationProfile.svg" ) );
}

void QgsLayoutItemElevationProfile::refreshDataDefinedProperty( DataDefinedProperty property )
Expand Down

0 comments on commit cf4df17

Please sign in to comment.