Commit daf5d540 authored by Bernhard Beschow's avatar Bernhard Beschow
Browse files

remove convenience method that was used only once

parent 2f6f2298
......@@ -15,9 +15,6 @@
#include "GeoDataPlacemark.h"
#include "GeoDataStyle.h"
#include "OsmPlacemarkData.h"
#include "StyleBuilder.h"
#include <QMap>
namespace Marble
{
......@@ -475,15 +472,6 @@ void OsmPresetLibrary::initializeAdditionalOsmTags()
s_additionalOsmTags << OsmTag( "access", "permissive" );
}
GeoDataStyle::ConstPtr OsmPresetLibrary::presetStyle( const OsmTag &tag )
{
static const StyleBuilder styleBuilder;
const GeoDataFeature::GeoDataVisualCategory category = osmVisualCategory(tag);
return styleBuilder.presetStyle(category);
}
GeoDataFeature::GeoDataVisualCategory OsmPresetLibrary::osmVisualCategory(const OsmTag &tag)
{
initializeOsmVisualCategories();
......
......@@ -15,7 +15,6 @@
#include <QPair>
#include "GeoDataFeature.h"
#include <GeoDataStyle.h>
#include "marble_export.h"
namespace Marble
......@@ -32,11 +31,6 @@ class MARBLE_EXPORT OsmPresetLibrary
public:
typedef QPair<QString, QString> OsmTag;
/**
* @brief corespondingIcon returns the icon that is associated with a visual category
*/
static GeoDataStyle::ConstPtr presetStyle( const OsmTag &tag );
/**
* @brief Convenience categorization of placemarks for Osm key=value pairs
*/
......
......@@ -19,6 +19,7 @@
#include "OsmPlacemarkData.h"
#include "GeoDataExtendedData.h"
#include "GeoDataData.h"
#include "StyleBuilder.h"
// Qt
#include <QTreeWidget>
......@@ -96,6 +97,8 @@ void OsmTagEditorWidgetPrivate::populatePresetTagsList()
QTreeWidgetItem *OsmTagEditorWidgetPrivate::tagWidgetItem( const OsmTag &tag ) const
{
static const StyleBuilder styleBuilder;
QStringList itemText;
itemText << tag.first;
......@@ -104,7 +107,8 @@ QTreeWidgetItem *OsmTagEditorWidgetPrivate::tagWidgetItem( const OsmTag &tag ) c
QTreeWidgetItem *tagItem = new QTreeWidgetItem( itemText );
// Getting the icon preset for the tag ( if there's one available )
GeoDataStyle::ConstPtr style = OsmPresetLibrary::presetStyle( tag );
const GeoDataFeature::GeoDataVisualCategory category = OsmPresetLibrary::osmVisualCategory(tag);
GeoDataStyle::ConstPtr style = styleBuilder.presetStyle(category);
QPixmap iconPixmap = QPixmap::fromImage( style->iconStyle().icon() );
tagItem->setIcon( 1, QIcon( iconPixmap ) );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment