GeoDataFeature.cpp 60.8 KB
Newer Older
1
//
2
// This file is part of the Marble Virtual Globe.
3
4
5
6
7
8
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2007      Murad Tagirov <tmurad@gmail.com>
9
// Copyright 2009      Patrick Spendrin <ps_ml@gmx.de>
10
11
12
//


13
#include "GeoDataFeature.h"
Bruno Bigras's avatar
Bruno Bigras committed
14
#include "GeoDataFeature_p.h"
15

16
17
18
#include <QDataStream>
#include <QSize>
#include <QPixmap>
Torsten Rahn's avatar
Torsten Rahn committed
19
20

#include "MarbleDirs.h"
21
#include "MarbleDebug.h"
Torsten Rahn's avatar
Torsten Rahn committed
22
23

#include "GeoDataStyle.h"
24
#include "GeoDataStyleMap.h"
Torsten Rahn's avatar
Torsten Rahn committed
25

26
#include "GeoDataContainer.h"
27
28
29
#include "GeoDataDocument.h"
#include "GeoDataFolder.h"
#include "GeoDataPlacemark.h"
30
#include "GeoDataRegion.h"
31
#include "GeoDataCamera.h"
32

33
34
namespace Marble
{
Dāvis Mosāns's avatar
Dāvis Mosāns committed
35
QFont GeoDataFeaturePrivate::s_defaultFont = QFont(QStringLiteral("Sans Serif"));
36
QColor GeoDataFeaturePrivate::s_defaultLabelColor = QColor( Qt::black );
Torsten Rahn's avatar
Torsten Rahn committed
37

38
39
bool GeoDataFeaturePrivate::s_defaultStyleInitialized = false;
GeoDataStyle* GeoDataFeaturePrivate::s_defaultStyle[GeoDataFeature::LastIndex];
40

41
GeoDataFeature::GeoDataFeature()
42
    : d( new GeoDataFeaturePrivate() )
43
{
44
    d->ref.ref();
45
46
}

47
GeoDataFeature::GeoDataFeature( const GeoDataFeature& other )
48
    : GeoDataObject(),
49
      d( other.d )
50
{
51
    d->ref.ref();
52
53
}

54
GeoDataFeature::GeoDataFeature( const QString& name )
Patrick Spendrin's avatar
Patrick Spendrin committed
55
    : d( new GeoDataFeaturePrivate() )
56
{
57
58
    d->ref.ref();
    d->m_name = name;
59
60
}

Torsten Rahn's avatar
Torsten Rahn committed
61
GeoDataFeature::GeoDataFeature( GeoDataFeaturePrivate *priv )
Patrick Spendrin's avatar
Patrick Spendrin committed
62
    : d( priv )
63
{
64
    d->ref.ref();
65
}
Torsten Rahn's avatar
Torsten Rahn committed
66

67
GeoDataFeature::~GeoDataFeature()
68
{
69
    if (!d->ref.deref()) {
70
        delete d;
71
    }
72
73
74
75
76
}

GeoDataFeaturePrivate* GeoDataFeature::p() const
{
    return static_cast<GeoDataFeaturePrivate*>(d);
77
78
}

79
GeoDataFeature& GeoDataFeature::operator=( const GeoDataFeature& other )
80
{
81
    if (!d->ref.deref()) {
82
        delete d;
83
    }
84
85

    d = other.d;
86
    d->ref.ref();
Torsten Rahn's avatar
Torsten Rahn committed
87

88
    return *this;
89
90
}

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
bool GeoDataFeature::equals( const GeoDataFeature &other ) const
{
    if ( !GeoDataObject::equals(other) ||
         p()->m_name != other.p()->m_name ||
         p()->m_snippet != other.p()->m_snippet ||
         p()->m_description != other.p()->m_description ||
         p()->m_descriptionCDATA != other.p()->m_descriptionCDATA ||
         p()->m_address != other.p()->m_address ||
         p()->m_phoneNumber != other.p()->m_phoneNumber ||
         p()->m_styleUrl != other.p()->m_styleUrl ||
         p()->m_popularity != other.p()->m_popularity ||
         p()->m_zoomLevel != other.p()->m_zoomLevel ||
         p()->m_visible != other.p()->m_visible ||
         p()->m_role != other.p()->m_role ||
         p()->m_extendedData != other.p()->m_extendedData ||
         p()->m_timeSpan != other.p()->m_timeSpan ||
         p()->m_timeStamp != other.p()->m_timeStamp ||
         p()->m_region != other.p()->m_region ||
         *style() != *other.style() ) {
        return false;
    }

    if ( (!p()->m_styleMap && other.p()->m_styleMap) ||
         (p()->m_styleMap && !other.p()->m_styleMap) ) {
        return false;
    }

    if ( (p()->m_styleMap && other.p()->m_styleMap) &&
         (*p()->m_styleMap != *other.p()->m_styleMap) ) {
        return false;
    }

    if ( !p()->m_abstractView && !other.p()->m_abstractView ) {
        return true;
    } else if ( (!p()->m_abstractView && other.p()->m_abstractView) ||
                (p()->m_abstractView && !other.p()->m_abstractView) ) {
        return false;
    }

    if ( p()->m_abstractView->nodeType() != other.p()->m_abstractView->nodeType() ) {
        return false;
    }

    if ( p()->m_abstractView->nodeType() == GeoDataTypes::GeoDataCameraType ) {
        GeoDataCamera *thisCam = dynamic_cast<GeoDataCamera*>( p()->m_abstractView );
        GeoDataCamera *otherCam = dynamic_cast<GeoDataCamera*>( other.p()->m_abstractView );
        Q_ASSERT(thisCam && otherCam);

        if ( *thisCam != *otherCam ) {
            return false;
        }
    } else if ( p()->m_abstractView->nodeType() == GeoDataTypes::GeoDataLookAtType ) {
        GeoDataLookAt *thisLookAt = dynamic_cast<GeoDataLookAt*>( p()->m_abstractView );
        GeoDataLookAt *otherLookAt = dynamic_cast<GeoDataLookAt*>( other.p()->m_abstractView );
        Q_ASSERT(thisLookAt && otherLookAt);

        if ( *thisLookAt != *otherLookAt ) {
            return false;
        }
    }

    return true;
}

155
const char* GeoDataFeature::nodeType() const
156
157
158
159
{
    return p()->nodeType();
}

160
161
EnumFeatureId GeoDataFeature::featureId() const
{
162
    return d->featureId();
163
164
}

165
void GeoDataFeaturePrivate::initializeDefaultStyles()
Torsten Rahn's avatar
Torsten Rahn committed
166
{
Inge Wallin's avatar
Inge Wallin committed
167
    // We need to do this similar to the way KCmdLineOptions works in
Patrick Spendrin's avatar
Patrick Spendrin committed
168
    // the future: Having a PlacemarkStyleProperty properties[] would
Inge Wallin's avatar
Inge Wallin committed
169
    // help here greatly.
Torsten Rahn's avatar
Torsten Rahn committed
170

171
172
173
174
175
    if ( s_defaultStyleInitialized ) {
        return;
    }
    s_defaultStyleInitialized = true;

Torsten Rahn's avatar
Torsten Rahn committed
176
    QString defaultFamily = s_defaultFont.family();
Torsten Rahn's avatar
Torsten Rahn committed
177
178
179
180
181
182
183

#ifdef Q_OS_MACX
    int defaultSize = 10;
#else
    int defaultSize = 8;
#endif

184
    s_defaultStyle[GeoDataFeature::None]
185
        = new GeoDataStyle( QString(),
186
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
187

188
    s_defaultStyle[GeoDataFeature::Default]
189
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/default_location.png" ),
190
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
191

192
    s_defaultStyle[GeoDataFeature::Unknown]
193
        = new GeoDataStyle( QString(),
194
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
195

196
    s_defaultStyle[GeoDataFeature::SmallCity]
197
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/city_4_white.png" ),
198
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
199

200
    s_defaultStyle[GeoDataFeature::SmallCountyCapital]
201
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/city_4_yellow.png" ),
202
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
203

204
    s_defaultStyle[GeoDataFeature::SmallStateCapital]
205
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/city_4_orange.png" ),
206
              QFont( defaultFamily, defaultSize, 50, true  ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
207

208
    s_defaultStyle[GeoDataFeature::SmallNationCapital]
209
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/city_4_red.png" ),
210
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
211

212
    s_defaultStyle[GeoDataFeature::MediumCity]
213
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/city_3_white.png" ),
214
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
215

216
    s_defaultStyle[GeoDataFeature::MediumCountyCapital]
217
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/city_3_yellow.png" ),
218
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
219

220
    s_defaultStyle[GeoDataFeature::MediumStateCapital]
221
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/city_3_orange.png" ),
222
              QFont( defaultFamily, defaultSize, 50, true  ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
223

224
    s_defaultStyle[GeoDataFeature::MediumNationCapital]
225
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/city_3_red.png" ),
226
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
227

228
    s_defaultStyle[GeoDataFeature::BigCity]
229
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/city_2_white.png" ),
230
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
231

232
    s_defaultStyle[GeoDataFeature::BigCountyCapital]
233
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/city_2_yellow.png" ),
234
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
235

236
    s_defaultStyle[GeoDataFeature::BigStateCapital]
237
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/city_2_orange.png" ),
238
              QFont( defaultFamily, defaultSize, 50, true  ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
239

240
    s_defaultStyle[GeoDataFeature::BigNationCapital]
241
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/city_2_red.png" ),
242
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
243

244
    s_defaultStyle[GeoDataFeature::LargeCity]
245
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/city_1_white.png" ),
246
              QFont( defaultFamily, defaultSize, 75, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
247

248
    s_defaultStyle[GeoDataFeature::LargeCountyCapital]
249
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/city_1_yellow.png" ),
250
              QFont( defaultFamily, defaultSize, 75, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
251

252
    s_defaultStyle[GeoDataFeature::LargeStateCapital]
253
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/city_1_orange.png" ),
254
              QFont( defaultFamily, defaultSize, 75, true  ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
255

256
    s_defaultStyle[GeoDataFeature::LargeNationCapital]
257
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/city_1_red.png" ),
258
              QFont( defaultFamily, defaultSize, 75, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
259

260
    s_defaultStyle[GeoDataFeature::Nation]
261
        = new GeoDataStyle( QString(),
262
263
              QFont( defaultFamily, (int)(defaultSize * 1.2 ), 75, false ), QColor( "#404040" ) );
    // Align area labels centered
264
    s_defaultStyle[GeoDataFeature::Nation]->labelStyle().setAlignment( GeoDataLabelStyle::Center );
265

266
267
268
    s_defaultStyle[GeoDataFeature::PlaceCity] = new GeoDataStyle( QString(), QFont( defaultFamily, (int)(defaultSize * 2.0 ), 75, false ), QColor( "#202020" ) );
    s_defaultStyle[GeoDataFeature::PlaceCity]->labelStyle().setAlignment( GeoDataLabelStyle::Center );
    s_defaultStyle[GeoDataFeature::PlaceSuburb] = new GeoDataStyle( QString(), QFont( defaultFamily, (int)(defaultSize * 2.0 ), 75, false ), QColor( "#707070" ) );
269
    s_defaultStyle[GeoDataFeature::PlaceSuburb]->labelStyle().setAlignment( GeoDataLabelStyle::Center );
270
271
272
273
274
275
276
277
    s_defaultStyle[GeoDataFeature::PlaceHamlet] = new GeoDataStyle( QString(), QFont( defaultFamily, (int)(defaultSize * 2.0 ), 75, false ), QColor( "#707070" ) );
    s_defaultStyle[GeoDataFeature::PlaceHamlet]->labelStyle().setAlignment( GeoDataLabelStyle::Center );
    s_defaultStyle[GeoDataFeature::PlaceLocality] = new GeoDataStyle( QString(), QFont( defaultFamily, (int)(defaultSize * 2.0 ), 75, false ), QColor( "#707070" ) );
    s_defaultStyle[GeoDataFeature::PlaceLocality]->labelStyle().setAlignment( GeoDataLabelStyle::Center );
    s_defaultStyle[GeoDataFeature::PlaceTown] = new GeoDataStyle( QString(), QFont( defaultFamily, (int)(defaultSize * 2.0 ), 75, false ), QColor( "#404040" ) );
    s_defaultStyle[GeoDataFeature::PlaceTown]->labelStyle().setAlignment( GeoDataLabelStyle::Center );
    s_defaultStyle[GeoDataFeature::PlaceVillage] = new GeoDataStyle( QString(), QFont( defaultFamily, (int)(defaultSize * 2.0 ), 75, false ), QColor( "#505050" ) );
    s_defaultStyle[GeoDataFeature::PlaceVillage]->labelStyle().setAlignment( GeoDataLabelStyle::Center );
278

279
    s_defaultStyle[GeoDataFeature::Mountain]
280
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/mountain_1.png" ),
281
              QFont( defaultFamily, (int)(defaultSize * 0.9 ), 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
282

283
    s_defaultStyle[GeoDataFeature::Volcano]
284
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/volcano_1.png" ),
285
              QFont( defaultFamily, (int)(defaultSize * 0.9 ), 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
286

287
    s_defaultStyle[GeoDataFeature::Mons]
288
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/mountain_1.png" ),
289
              QFont( defaultFamily, (int)(defaultSize * 0.9 ), 50, false ), s_defaultLabelColor );
290

291
    s_defaultStyle[GeoDataFeature::Valley]
292
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/valley.png" ),
293
              QFont( defaultFamily, (int)(defaultSize * 0.9 ), 50, false ), s_defaultLabelColor );
294

295
    s_defaultStyle[GeoDataFeature::Continent]
296
        = new GeoDataStyle( QString(),
297
298
              QFont( defaultFamily, (int)(defaultSize * 1.7 ), 50, false ), QColor( "#bf0303" ) );
    // Align area labels centered
299
    s_defaultStyle[GeoDataFeature::Continent]->labelStyle().setAlignment( GeoDataLabelStyle::Center );
300

301
    s_defaultStyle[GeoDataFeature::Ocean]
302
        = new GeoDataStyle( QString(),
303
304
              QFont( defaultFamily, (int)(defaultSize * 1.7 ), 50, true ), QColor( "#2c72c7" ) );
    // Align area labels centered
305
    s_defaultStyle[GeoDataFeature::Ocean]->labelStyle().setAlignment( GeoDataLabelStyle::Center );
306

307
    s_defaultStyle[GeoDataFeature::OtherTerrain]
308
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/other.png" ),
309
              QFont( defaultFamily, (int)(defaultSize * 0.9 ), 50, false ), s_defaultLabelColor );
310

311
    s_defaultStyle[GeoDataFeature::Crater]
312
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/crater.png" ),
313
              QFont( defaultFamily, (int)(defaultSize * 0.9 ), 50, false ), s_defaultLabelColor );
314

315
    s_defaultStyle[GeoDataFeature::Mare]
316
        = new GeoDataStyle( QString(),
317
318
              QFont( defaultFamily, (int)(defaultSize * 1.7 ), 50, false ), QColor( "#bf0303" ) );
    // Align area labels centered
319
    s_defaultStyle[GeoDataFeature::Mare]->labelStyle().setAlignment( GeoDataLabelStyle::Center );
320

321
    s_defaultStyle[GeoDataFeature::GeographicPole]
322
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/pole_1.png" ),
323
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
324

325
    s_defaultStyle[GeoDataFeature::MagneticPole]
326
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/pole_2.png" ),
327
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
328

329
    s_defaultStyle[GeoDataFeature::ShipWreck]
330
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/shipwreck.png" ),
331
              QFont( defaultFamily, (int)(defaultSize * 0.8 ), 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
332

333
    s_defaultStyle[GeoDataFeature::AirPort]
334
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/airport.png" ),
335
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
Patrick Spendrin's avatar
Patrick Spendrin committed
336

337
    s_defaultStyle[GeoDataFeature::Observatory]
338
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/observatory.png" ),
339
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
340

341
    s_defaultStyle[GeoDataFeature::Wikipedia]
342
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/wikipedia.png" ),
343
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
344

345
    s_defaultStyle[GeoDataFeature::OsmSite]
346
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/osm.png" ),
347
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
348

349
    s_defaultStyle[GeoDataFeature::Coordinate]
350
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/coordinate.png" ),
351
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
352

Torsten Rahn's avatar
Torsten Rahn committed
353

354
    s_defaultStyle[GeoDataFeature::MannedLandingSite]
355
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/manned_landing.png" ),
356
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
357

358
    s_defaultStyle[GeoDataFeature::RoboticRover]
359
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/robotic_rover.png" ),
360
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
361

362
    s_defaultStyle[GeoDataFeature::UnmannedSoftLandingSite]
363
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/unmanned_soft_landing.png" ),
364
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
365

366
    s_defaultStyle[GeoDataFeature::UnmannedHardLandingSite]
367
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/unmanned_hard_landing.png" ),
368
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
Torsten Rahn's avatar
Torsten Rahn committed
369

370
    s_defaultStyle[GeoDataFeature::Folder]
371
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/folder.png" ),
372
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
373

374
    s_defaultStyle[GeoDataFeature::Bookmark]
375
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/bookmark.png" ),
376
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
377

378
379
380
381
382
    QColor const shopColor("#ac39ac");
    QColor const transportationColor("#0066ff");
    QColor const amenityColor("#734a08");
    QColor const healthColor("#da0092");
    QColor const airTransportColor("#8461C4");
383
    QColor const educationalAreasAndHospital("#f0f0d8");
Torsten Rahn's avatar
Torsten Rahn committed
384
    QColor const buildingColor("#beadad");
385
    QColor const waterColor("#b5d0d0");
Torsten Rahn's avatar
Torsten Rahn committed
386
387
    // Allows to visualize multiple repaints of buildings
//    QColor const buildingColor(0, 255, 0, 64);
388
389
390
391
392
393
394

    QFont const osmFont( defaultFamily, 10, 50, false );
    s_defaultStyle[GeoDataFeature::AccomodationCamping]      = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "transportation/camping.16", transportationColor );
    s_defaultStyle[GeoDataFeature::AccomodationHostel]       = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "transportation/hostel.16", transportationColor );
    s_defaultStyle[GeoDataFeature::AccomodationHotel]        = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "transportation/hotel.16", transportationColor );
    s_defaultStyle[GeoDataFeature::AccomodationMotel]        = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "transportation/motel.16", transportationColor );
    s_defaultStyle[GeoDataFeature::AccomodationYouthHostel]  = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "transportation/hostel.16", transportationColor );
Torsten Rahn's avatar
Torsten Rahn committed
395
    s_defaultStyle[GeoDataFeature::AccomodationGuestHouse]   = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "transportation/guest_house.16", transportationColor );
396
    s_defaultStyle[GeoDataFeature::AmenityLibrary]           = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/library.20", amenityColor );
397
398
399
    s_defaultStyle[GeoDataFeature::EducationCollege]         = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, QString(), amenityColor, educationalAreasAndHospital, amenityColor );
    s_defaultStyle[GeoDataFeature::EducationSchool]          = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, QString(), amenityColor, educationalAreasAndHospital, amenityColor );
    s_defaultStyle[GeoDataFeature::EducationUniversity]      = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, QString(), amenityColor, educationalAreasAndHospital, amenityColor );
400
401
402
403
404
405
406
407
408
    s_defaultStyle[GeoDataFeature::FoodBar]                  = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/bar.16", amenityColor );
    s_defaultStyle[GeoDataFeature::FoodBiergarten]           = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/biergarten.16", amenityColor );
    s_defaultStyle[GeoDataFeature::FoodCafe]                 = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/cafe.16", amenityColor );
    s_defaultStyle[GeoDataFeature::FoodFastFood]             = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/fast_food.16", amenityColor );
    s_defaultStyle[GeoDataFeature::FoodPub]                  = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/pub.16", amenityColor );
    s_defaultStyle[GeoDataFeature::FoodRestaurant]           = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/restaurant.16", amenityColor );

    s_defaultStyle[GeoDataFeature::HealthDentist]            = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "health/dentist.16", healthColor );
    s_defaultStyle[GeoDataFeature::HealthDoctors]            = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "health/doctors.16", healthColor );
409
    s_defaultStyle[GeoDataFeature::HealthHospital]           = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "health/hospital.16", healthColor, educationalAreasAndHospital, amenityColor );
410
411
412
413
414
415
    s_defaultStyle[GeoDataFeature::HealthPharmacy]           = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "health/pharmacy.16", healthColor );
    s_defaultStyle[GeoDataFeature::HealthVeterinary]         = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "health/veterinary-14", healthColor );

    s_defaultStyle[GeoDataFeature::MoneyAtm]                 = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/atm.16", amenityColor );
    s_defaultStyle[GeoDataFeature::MoneyBank]                = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/bank.16", amenityColor );

Torsten Rahn's avatar
Torsten Rahn committed
416
    s_defaultStyle[GeoDataFeature::AmenityArchaeologicalSite] = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/archaeological_site.16", amenityColor );
417
    s_defaultStyle[GeoDataFeature::AmenityEmbassy]           = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "transportation/embassy.16", transportationColor );
Torsten Rahn's avatar
Torsten Rahn committed
418
419
    s_defaultStyle[GeoDataFeature::AmenityEmergencyPhone]    = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/emergency_phone.16", amenityColor );
    s_defaultStyle[GeoDataFeature::AmenityWaterPark]         = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/water_park.16", amenityColor );
Torsten Rahn's avatar
Torsten Rahn committed
420
    s_defaultStyle[GeoDataFeature::AmenityCommunityCentre]   = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/community_centre-14", amenityColor );
Torsten Rahn's avatar
Torsten Rahn committed
421
    s_defaultStyle[GeoDataFeature::AmenityFountain]          = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/fountain-14", amenityColor, waterColor, waterColor.darker(150) );
Torsten Rahn's avatar
Torsten Rahn committed
422
    s_defaultStyle[GeoDataFeature::AmenityNightClub]         = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/nightclub.18", amenityColor );
423
424
425
426
427
428
429
430
431
432
433
434
435
436
    s_defaultStyle[GeoDataFeature::AmenityBench]             = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "individual/bench.16", amenityColor );
    s_defaultStyle[GeoDataFeature::AmenityCourtHouse]        = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/courthouse-16", amenityColor );
    s_defaultStyle[GeoDataFeature::AmenityFireStation]       = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/firestation.16", amenityColor );
    s_defaultStyle[GeoDataFeature::AmenityHuntingStand]      = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "manmade/hunting-stand.16", amenityColor );
    s_defaultStyle[GeoDataFeature::AmenityPolice]            = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/police.16", amenityColor );
    s_defaultStyle[GeoDataFeature::AmenityPostBox]           = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/post_box-12", amenityColor );
    s_defaultStyle[GeoDataFeature::AmenityPostOffice]        = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/post_office-14", amenityColor );
    s_defaultStyle[GeoDataFeature::AmenityPrison]            = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/prison.16", amenityColor );
    s_defaultStyle[GeoDataFeature::AmenityRecycling]         = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/recycling.16", amenityColor );
    s_defaultStyle[GeoDataFeature::AmenityTelephone]         = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/telephone.16", amenityColor );
    s_defaultStyle[GeoDataFeature::AmenityToilets]           = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/toilets.16", amenityColor );
    s_defaultStyle[GeoDataFeature::AmenityTownHall]          = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/town_hall.16", amenityColor );
    s_defaultStyle[GeoDataFeature::AmenityWasteBasket]       = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "individual/waste_basket.10", amenityColor );

Torsten Rahn's avatar
Torsten Rahn committed
437
    s_defaultStyle[GeoDataFeature::AmenityDrinkingWater]     = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/drinking_water.16", amenityColor );
438

439
    s_defaultStyle[GeoDataFeature::NaturalPeak]              = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "individual/peak", amenityColor );
Dennis Nienhüser's avatar
Dennis Nienhüser committed
440
    s_defaultStyle[GeoDataFeature::NaturalPeak]->iconStyle().setScale(0.33);
441
    s_defaultStyle[GeoDataFeature::NaturalTree]              = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "individual/tree-29", amenityColor ); // tree-16 provides the official icon
442

443
444
445
446
447
    s_defaultStyle[GeoDataFeature::ShopBeverages]            = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/beverages-14", shopColor );
    s_defaultStyle[GeoDataFeature::ShopHifi]                 = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/hifi-14", shopColor );
    s_defaultStyle[GeoDataFeature::ShopSupermarket]          = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop_supermarket", shopColor );
    s_defaultStyle[GeoDataFeature::ShopAlcohol]              = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop_alcohol.16", shopColor );
    s_defaultStyle[GeoDataFeature::ShopBakery]               = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop_bakery.16", shopColor );
448
    s_defaultStyle[GeoDataFeature::ShopButcher]              = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/butcher-14", shopColor );
449
    s_defaultStyle[GeoDataFeature::ShopConfectionery]        = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/confectionery.14", shopColor );
Torsten Rahn's avatar
Torsten Rahn committed
450
    s_defaultStyle[GeoDataFeature::ShopConvenience]          = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop_convenience", shopColor );
451
452
    s_defaultStyle[GeoDataFeature::ShopGreengrocer]          = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/greengrocer-14", shopColor );
    s_defaultStyle[GeoDataFeature::ShopSeafood]              = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/seafood-14", shopColor );
453
    s_defaultStyle[GeoDataFeature::ShopDepartmentStore]      = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/department_store-16", shopColor );
454
    s_defaultStyle[GeoDataFeature::ShopKiosk]                = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/kiosk-14", shopColor );
Torsten Rahn's avatar
Torsten Rahn committed
455
    s_defaultStyle[GeoDataFeature::ShopBag]                  = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/bag-14", shopColor );
456
457
458
    s_defaultStyle[GeoDataFeature::ShopClothes]              = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop_clothes.16", shopColor );
    s_defaultStyle[GeoDataFeature::ShopFashion]              = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop_clothes.16", shopColor );
    s_defaultStyle[GeoDataFeature::ShopJewelry]              = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop_jewelry.16", shopColor );
459
    s_defaultStyle[GeoDataFeature::ShopShoes]                = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop_shoes.16", shopColor );
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
    s_defaultStyle[GeoDataFeature::ShopVarietyStore]         = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/variety_store-14", shopColor );
    s_defaultStyle[GeoDataFeature::ShopBeauty]               = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/beauty-14", shopColor );
    s_defaultStyle[GeoDataFeature::ShopChemist]              = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/chemist-14", shopColor );
    s_defaultStyle[GeoDataFeature::ShopCosmetics]            = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/perfumery-14", shopColor );
    s_defaultStyle[GeoDataFeature::ShopHairdresser]          = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop_hairdresser.16", shopColor );
    s_defaultStyle[GeoDataFeature::ShopOptician]             = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop_optician.16", shopColor );
    s_defaultStyle[GeoDataFeature::ShopPerfumery]            = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/perfumery-14", shopColor );
    s_defaultStyle[GeoDataFeature::ShopDoitYourself]         = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop_diy.16", shopColor );
    s_defaultStyle[GeoDataFeature::ShopFlorist]              = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/florist.16", shopColor );
    s_defaultStyle[GeoDataFeature::ShopHardware]             = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop_diy.16", shopColor );
    s_defaultStyle[GeoDataFeature::ShopFurniture]            = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop_furniture.16", shopColor );
    s_defaultStyle[GeoDataFeature::ShopElectronics]          = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop_electronics.16", shopColor );
    s_defaultStyle[GeoDataFeature::ShopMobilePhone]          = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop_mobile_phone.16", shopColor );
    s_defaultStyle[GeoDataFeature::ShopBicycle]              = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop_bicycle.16", shopColor );
    s_defaultStyle[GeoDataFeature::ShopCar]                  = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop_car", shopColor );
    s_defaultStyle[GeoDataFeature::ShopCarRepair]            = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shopping_car_repair.16", shopColor );
    s_defaultStyle[GeoDataFeature::ShopCarParts]             = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/car_parts-14", shopColor );
    s_defaultStyle[GeoDataFeature::ShopMotorcycle]           = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/motorcycle-14", shopColor );
Torsten Rahn's avatar
Torsten Rahn committed
478
    s_defaultStyle[GeoDataFeature::ShopOutdoor]              = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/outdoor-14", shopColor );
479
480
481
482
483
    s_defaultStyle[GeoDataFeature::ShopMusicalInstrument]    = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/musical_instrument-14", shopColor );
    s_defaultStyle[GeoDataFeature::ShopPhoto]                = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/photo-14", shopColor );
    s_defaultStyle[GeoDataFeature::ShopBook]                 = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop_books.16", shopColor );
    s_defaultStyle[GeoDataFeature::ShopGift]                 = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop_gift.16", shopColor );
    s_defaultStyle[GeoDataFeature::ShopStationery]           = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/stationery-14", shopColor );
484
    s_defaultStyle[GeoDataFeature::ShopLaundry]              = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/laundry-14", shopColor );
485
486
487
    s_defaultStyle[GeoDataFeature::ShopPet]                  = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop_pet.16", shopColor );
    s_defaultStyle[GeoDataFeature::ShopToys]                 = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/toys-14", shopColor );
    s_defaultStyle[GeoDataFeature::ShopTravelAgency]         = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/travel_agency-14", shopColor );
488
    s_defaultStyle[GeoDataFeature::Shop]                     = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "shop/shop-14", shopColor );
489

490
    s_defaultStyle[GeoDataFeature::ManmadeBridge]            = GeoDataFeaturePrivate::createWayStyle( QColor("#b8b8b8"), QColor("transparent"), true, true );
491
    s_defaultStyle[GeoDataFeature::ManmadeLighthouse]        = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "transportation/lighthouse.16", transportationColor, "#f2efe9", QColor( "#f2efe9" ).darker() );
492
    s_defaultStyle[GeoDataFeature::ManmadePier]              = GeoDataFeaturePrivate::createStyle(0.0, 3.0, "#f2efe9", "#f2efe9", true, true, Qt::SolidPattern, Qt::SolidLine, Qt::FlatCap, false );
Torsten Rahn's avatar
Torsten Rahn committed
493
494
    s_defaultStyle[GeoDataFeature::ManmadeWaterTower]        = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/water_tower.16", amenityColor );
    s_defaultStyle[GeoDataFeature::ManmadeWindMill]          = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/windmill.16", amenityColor );
Torsten Rahn's avatar
Torsten Rahn committed
495

Torsten Rahn's avatar
Torsten Rahn committed
496
    s_defaultStyle[GeoDataFeature::TouristAttraction]        = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/tourist_memorial.16", amenityColor );
497
498
    s_defaultStyle[GeoDataFeature::TouristCastle]            = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/cinema.16", amenityColor );
    s_defaultStyle[GeoDataFeature::TouristCinema]            = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/cinema.16", amenityColor );
Torsten Rahn's avatar
Torsten Rahn committed
499
    s_defaultStyle[GeoDataFeature::TouristInformation]       = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/information.16", amenityColor );
500
501
502
503
504
505
    s_defaultStyle[GeoDataFeature::TouristMonument]          = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/monument.16", amenityColor );
    s_defaultStyle[GeoDataFeature::TouristMuseum]            = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/museum.16", amenityColor );
    s_defaultStyle[GeoDataFeature::TouristRuin]              = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, QString(), amenityColor );
    s_defaultStyle[GeoDataFeature::TouristTheatre]           = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/theatre.16", amenityColor );
    s_defaultStyle[GeoDataFeature::TouristThemePark]         = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, QString(), amenityColor );
    s_defaultStyle[GeoDataFeature::TouristViewPoint]         = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/viewpoint.16", amenityColor );
506
    s_defaultStyle[GeoDataFeature::TouristZoo]               = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, QString(), amenityColor, Qt::transparent );
Dennis Nienhüser's avatar
Dennis Nienhüser committed
507
    s_defaultStyle[GeoDataFeature::TouristAlpineHut]         = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "transportation/alpinehut.16", transportationColor );
508
509
    s_defaultStyle[GeoDataFeature::TransportAerodrome]       = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "airtransport/aerodrome", airTransportColor );
    s_defaultStyle[GeoDataFeature::TransportHelipad]         = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "airtransport/helipad", airTransportColor );
510
    s_defaultStyle[GeoDataFeature::TransportAirportTerminal] = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, QString(), airTransportColor );
511
    s_defaultStyle[GeoDataFeature::TransportBusStation]      = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "transportation/bus_station.16", transportationColor );
512
    s_defaultStyle[GeoDataFeature::TransportBusStop]         = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "transportation/bus_stop.12", transportationColor );
513
    s_defaultStyle[GeoDataFeature::TransportCarShare]        = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "transportation/car_share.16", transportationColor );
514
515
    s_defaultStyle[GeoDataFeature::TransportFuel]            = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "transportation/fuel.16", transportationColor );
    s_defaultStyle[GeoDataFeature::TransportParking]         = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "transportation/parking", transportationColor, "#F6EEB6", QColor( "#F6EEB6" ).darker() );
516
    s_defaultStyle[GeoDataFeature::TransportParkingSpace]    = GeoDataFeaturePrivate::createWayStyle( "#F6EEB6", QColor( "#F6EEB6" ).darker(), true, true );
517
    s_defaultStyle[GeoDataFeature::TransportPlatform]        = GeoDataFeaturePrivate::createWayStyle( "#bbbbbb", Qt::transparent, true, false );
Torsten Rahn's avatar
Torsten Rahn committed
518
    s_defaultStyle[GeoDataFeature::TransportTrainStation]    = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "individual/railway_station", transportationColor );
519
    s_defaultStyle[GeoDataFeature::TransportTramStop]        = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, QString(), transportationColor );
520
    s_defaultStyle[GeoDataFeature::TransportRentalBicycle]   = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "transportation/rental_bicycle.16", transportationColor );
521
522
    s_defaultStyle[GeoDataFeature::TransportRentalCar]       = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "transportation/rental_car.16", transportationColor );
    s_defaultStyle[GeoDataFeature::TransportTaxiRank]        = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "transportation/taxi.16", transportationColor );
523
524
    s_defaultStyle[GeoDataFeature::TransportBicycleParking]  = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "transportation/bicycle_parking.16", transportationColor );
    s_defaultStyle[GeoDataFeature::TransportMotorcycleParking] = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "transportation/motorcycle_parking.16", transportationColor );
Torsten Rahn's avatar
Torsten Rahn committed
525
    s_defaultStyle[GeoDataFeature::TransportSubwayEntrance]  = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "transportation/subway_entrance", transportationColor );
Torsten Rahn's avatar
Torsten Rahn committed
526
    s_defaultStyle[GeoDataFeature::ReligionPlaceOfWorship]   = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, QString() /* "black/place_of_worship.16" */ );
527
528
529
    s_defaultStyle[GeoDataFeature::ReligionBahai]            = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, QString() );
    s_defaultStyle[GeoDataFeature::ReligionBuddhist]         = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "black/buddhist.16" );
    s_defaultStyle[GeoDataFeature::ReligionChristian]        = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "black/christian.16" );
530
    s_defaultStyle[GeoDataFeature::ReligionMuslim]           = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "black/muslim.16" );
531
532
533
534
535
    s_defaultStyle[GeoDataFeature::ReligionHindu]            = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "black/hinduist.16" );
    s_defaultStyle[GeoDataFeature::ReligionJain]             = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, QString() );
    s_defaultStyle[GeoDataFeature::ReligionJewish]           = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "black/jewish.16" );
    s_defaultStyle[GeoDataFeature::ReligionShinto]           = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "black/shintoist.16" );
    s_defaultStyle[GeoDataFeature::ReligionSikh]             = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "black/sikhist.16" );
Torsten Rahn's avatar
Torsten Rahn committed
536

537
538
    s_defaultStyle[GeoDataFeature::HighwayTrafficSignals]    = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "individual/traffic_light" );

Torsten Rahn's avatar
Torsten Rahn committed
539
    s_defaultStyle[GeoDataFeature::PowerTower]               = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "individual/power_tower", QColor( "#888888" ) );
540

541
542
    s_defaultStyle[GeoDataFeature::BarrierGate]              = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "individual/gate" );
    s_defaultStyle[GeoDataFeature::BarrierLiftGate]              = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "individual/liftgate" );
543
544
    s_defaultStyle[GeoDataFeature::BarrierWall]              = GeoDataFeaturePrivate::createWayStyle( "#444444", Qt::transparent, true, false );

545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
    s_defaultStyle[GeoDataFeature::HighwaySteps]             = GeoDataFeaturePrivate::createStyle(0.0, 2.0, "#fa8072", QColor(Qt::white), true, true, Qt::SolidPattern, Qt::CustomDashLine, Qt::FlatCap, false, QVector< qreal >() << 0.3 << 0.3 );
    s_defaultStyle[GeoDataFeature::HighwayUnknown]           = GeoDataFeaturePrivate::createHighwayStyle( "highway_unknown", "#ddd", "#bbb", QFont(QStringLiteral("Arial")), "000000", 0.0, 1.0);
    s_defaultStyle[GeoDataFeature::HighwayPath]              = GeoDataFeaturePrivate::createHighwayStyle( "highway_path", "#dddde8", "#999", QFont(QStringLiteral("Arial")), "000000", 0.0, 1.0, Qt::DotLine, Qt::SquareCap, true);
    s_defaultStyle[GeoDataFeature::HighwayTrack]             = GeoDataFeaturePrivate::createHighwayStyle( "highway_track", "#996600", QColor(Qt::white), QFont(QStringLiteral("Arial")), "000000", 1.0, 1.0, Qt::DashLine, Qt::SquareCap, true );
    s_defaultStyle[GeoDataFeature::HighwayPedestrian]        = GeoDataFeaturePrivate::createHighwayStyle( "highway_pedestrian", "#dddde8", "#999", QFont(QStringLiteral("Arial")), "000000", 0.0, 2.0);
    s_defaultStyle[GeoDataFeature::HighwayFootway]           = GeoDataFeaturePrivate::createHighwayStyle( "highway_footway", "#fa8072", QColor(Qt::white), QFont(QStringLiteral("Arial")), "000000", 0.0, 2.0, Qt::DotLine, Qt::SquareCap, true);
    s_defaultStyle[GeoDataFeature::HighwayCycleway]          = GeoDataFeaturePrivate::createHighwayStyle( "highway_cycleway", QColor(Qt::blue), QColor(Qt::white), QFont(QStringLiteral("Arial")), "000000", 0.0, 2.0, Qt::DotLine, Qt::SquareCap, true);
    s_defaultStyle[GeoDataFeature::HighwayService]           = GeoDataFeaturePrivate::createHighwayStyle( "highway_service", "#ffffff", "#bbb", QFont(QStringLiteral("Arial")), "000000", 1.0, 6 );
    s_defaultStyle[GeoDataFeature::HighwayResidential]       = GeoDataFeaturePrivate::createHighwayStyle( "highway_residential", "#ffffff", "#bbb", QFont(QStringLiteral("Arial")), "000000", 3, 6 );
    s_defaultStyle[GeoDataFeature::HighwayLivingStreet]      = GeoDataFeaturePrivate::createHighwayStyle( "highway_living_street", "#ffffff", "#bbb", QFont(QStringLiteral("Arial")), "000000", 3, 6 );
    s_defaultStyle[GeoDataFeature::HighwayRoad]              = GeoDataFeaturePrivate::createHighwayStyle( "highway_road", "#ddd", "#bbb", QFont(QStringLiteral("Arial")), "000000", 3, 6 );
    s_defaultStyle[GeoDataFeature::HighwayUnclassified]      = GeoDataFeaturePrivate::createHighwayStyle( "highway_unclassified", "#ffffff", "#bbb", QFont(QStringLiteral("Arial")), "000000", 3, 6 );
    s_defaultStyle[GeoDataFeature::HighwayTertiary]          = GeoDataFeaturePrivate::createHighwayStyle( "highway_tertiary", "#ffffff", "#8f8f8f", QFont(QStringLiteral("Arial")), "000000", 6.0, 6 );
    s_defaultStyle[GeoDataFeature::HighwayTertiaryLink]      = GeoDataFeaturePrivate::createHighwayStyle( "highway_tertiary", "#ffffff", "#8f8f8f", QFont(QStringLiteral("Arial")), "000000", 6.0, 6 );
    s_defaultStyle[GeoDataFeature::HighwaySecondary]         = GeoDataFeaturePrivate::createHighwayStyle( "highway_secondary", "#f7fabf", "#707d05", QFont(QStringLiteral("Arial")), "000000", 6.0, 6 );
    s_defaultStyle[GeoDataFeature::HighwaySecondaryLink]     = GeoDataFeaturePrivate::createHighwayStyle( "highway_secondary", "#f7fabf", "#707d05", QFont(QStringLiteral("Arial")), "000000", 6.0, 6 );
    s_defaultStyle[GeoDataFeature::HighwayPrimary]           = GeoDataFeaturePrivate::createHighwayStyle( "highway_primary", "#fcd6a4", "#a06b00", QFont(QStringLiteral("Arial")), "000000", 9.0, 6 );
    s_defaultStyle[GeoDataFeature::HighwayPrimaryLink]       = GeoDataFeaturePrivate::createHighwayStyle( "highway_primary", "#fcd6a4", "#a06b00", QFont(QStringLiteral("Arial")), "000000", 6.0, 6 );
    s_defaultStyle[GeoDataFeature::HighwayTrunk]             = GeoDataFeaturePrivate::createHighwayStyle( "highway_trunk", "#f9b29c", "#c84e2f", QFont(QStringLiteral("Arial")), "000000", 9.0, 6 );
    s_defaultStyle[GeoDataFeature::HighwayTrunkLink]         = GeoDataFeaturePrivate::createHighwayStyle( "highway_trunk", "#f9b29c", "#c84e2f", QFont(QStringLiteral("Arial")), "000000", 9.0, 6 );
    s_defaultStyle[GeoDataFeature::HighwayMotorway]          = GeoDataFeaturePrivate::createHighwayStyle( "highway_motorway", "#e892a2", "#dc2a67", QFont(QStringLiteral("Arial")), "000000", 9.0, 10 );
    s_defaultStyle[GeoDataFeature::HighwayMotorwayLink]      = GeoDataFeaturePrivate::createHighwayStyle( "highway_motorway", "#e892a2", "#dc2a67", QFont(QStringLiteral("Arial")), "000000", 9.0, 10 );
567

568
    s_defaultStyle[GeoDataFeature::NaturalWater]             = GeoDataFeaturePrivate::createStyle( 4, 0, waterColor, waterColor, true, true,
569
                                                                                                   Qt::SolidPattern, Qt::SolidLine, Qt::RoundCap, false, QVector< qreal >(),
570
                                                                                                   QFont(QStringLiteral("Arial")), waterColor.darker(150));
571
572
573

    s_defaultStyle[GeoDataFeature::AmenityGraveyard]         = GeoDataFeaturePrivate::createWayStyle( "#AACBAF", "#AACBAF", true, false, Qt::SolidPattern, MarbleDirs::path("bitmaps/osmcarto/patterns/grave_yard_generic.png") );

574
575
    s_defaultStyle[GeoDataFeature::NaturalWood]              = GeoDataFeaturePrivate::createWayStyle( "#8DC46C", "#8DC46C", true, false, Qt::SolidPattern, MarbleDirs::path("bitmaps/osmcarto/patterns/forest.png") );
    s_defaultStyle[GeoDataFeature::NaturalBeach]             = GeoDataFeaturePrivate::createWayStyle( "#FFF1BA", "#FFF1BA", true, false, Qt::SolidPattern, MarbleDirs::path("bitmaps/osmcarto/patterns/beach.png") );
576
    s_defaultStyle[GeoDataFeature::NaturalWetland]           = GeoDataFeaturePrivate::createWayStyle( "#DDECEC", "#DDECEC", true, false, Qt::SolidPattern, MarbleDirs::path("bitmaps/osmcarto/patterns/wetland.png") );
577
    s_defaultStyle[GeoDataFeature::NaturalGlacier]           = GeoDataFeaturePrivate::createWayStyle( "#DDECEC", "#DDECEC", true, false, Qt::SolidPattern, MarbleDirs::path("bitmaps/osmcarto/patterns/glacier.png") );
578
    s_defaultStyle[GeoDataFeature::NaturalScrub]             = GeoDataFeaturePrivate::createWayStyle( "#B5E3B5", "#B5E3B5", true, false, Qt::SolidPattern, MarbleDirs::path("bitmaps/osmcarto/patterns/scrub.png") );
579
    s_defaultStyle[GeoDataFeature::NaturalCliff]             = GeoDataFeaturePrivate::createWayStyle( Qt::transparent, Qt::transparent, true, false, Qt::SolidPattern, MarbleDirs::path("bitmaps/osmcarto/patterns/cliff2.png") );
580
    s_defaultStyle[GeoDataFeature::NaturalHeath]             = GeoDataFeaturePrivate::createWayStyle( "#d6d99f", QColor("#d6d99f").darker(150), true, false );
581

582
583
    s_defaultStyle[GeoDataFeature::LeisureGolfCourse]        = GeoDataFeaturePrivate::createWayStyle( QColor("#b5e3b5"), QColor("#b5e3b5").darker(150), true, true );
    s_defaultStyle[GeoDataFeature::LeisurePark]              = GeoDataFeaturePrivate::createWayStyle( QColor("#c8facc"), QColor("#c8facc").darker(150), true, true );
584
585
    s_defaultStyle[GeoDataFeature::LeisurePlayground]        = GeoDataFeaturePrivate::createOsmPOIStyle( osmFont, "amenity/playground.16", amenityColor, "#CCFFF1", "#BDFFED" );
    s_defaultStyle[GeoDataFeature::LeisurePitch]             = GeoDataFeaturePrivate::createWayStyle( "#8ad3af", QColor("#8ad3af").darker(150), true, true );
Torsten Rahn's avatar
Torsten Rahn committed
586
587
588
    s_defaultStyle[GeoDataFeature::LeisureSportsCentre]      = GeoDataFeaturePrivate::createWayStyle( "#33cc99", QColor("#33cc99").darker(150), true, true );
    s_defaultStyle[GeoDataFeature::LeisureStadium]           = GeoDataFeaturePrivate::createWayStyle( "#33cc99", QColor("#33cc99").darker(150), true, true );
    s_defaultStyle[GeoDataFeature::LeisureTrack]             = GeoDataFeaturePrivate::createWayStyle( "#74dcba", QColor("#74dcba").darker(150), true, true );
589
    s_defaultStyle[GeoDataFeature::LeisureSwimmingPool]      = GeoDataFeaturePrivate::createWayStyle( waterColor, waterColor.darker(150), true, true );
590

591
    s_defaultStyle[GeoDataFeature::LanduseAllotments]        = GeoDataFeaturePrivate::createWayStyle( "#E4C6AA", "#E4C6AA", true, false, Qt::SolidPattern, MarbleDirs::path("bitmaps/osmcarto/patterns/allotments.png") );
592
    s_defaultStyle[GeoDataFeature::LanduseBasin]             = GeoDataFeaturePrivate::createWayStyle( QColor(0xB5, 0xD0, 0xD0, 0x80 ), QColor( 0xB5, 0xD0, 0xD0 ) );
593
    s_defaultStyle[GeoDataFeature::LanduseCemetery]          = GeoDataFeaturePrivate::createWayStyle( "#AACBAF", "#AACBAF", true, false, Qt::SolidPattern, MarbleDirs::path("bitmaps/osmcarto/patterns/grave_yard_generic.png") );
594
595
596
597
598
599
600
601
602
    s_defaultStyle[GeoDataFeature::LanduseCommercial]        = GeoDataFeaturePrivate::createWayStyle( "#F2DAD9", "#D1B2B0", true, true );
    s_defaultStyle[GeoDataFeature::LanduseConstruction]      = GeoDataFeaturePrivate::createWayStyle( "#b6b592", "#b6b592", true, true );
    s_defaultStyle[GeoDataFeature::LanduseFarmland]          = GeoDataFeaturePrivate::createWayStyle( "#EDDDC9", "#C8B69E", true, true );
    s_defaultStyle[GeoDataFeature::LanduseFarmyard]          = GeoDataFeaturePrivate::createWayStyle( "#EFD6B5", "#D1B48C", true, true );
    s_defaultStyle[GeoDataFeature::LanduseGarages]           = GeoDataFeaturePrivate::createWayStyle( "#E0DDCD", "#E0DDCD", true, true );
    s_defaultStyle[GeoDataFeature::LanduseGrass]             = GeoDataFeaturePrivate::createWayStyle( "#A8C8A5", "#A8C8A5", true, true );
    s_defaultStyle[GeoDataFeature::LanduseIndustrial]        = GeoDataFeaturePrivate::createWayStyle( "#DED0D5", "#DED0D5", true, true );
    s_defaultStyle[GeoDataFeature::LanduseLandfill]          = GeoDataFeaturePrivate::createWayStyle( "#b6b592", "#b6b592", true, true );
    s_defaultStyle[GeoDataFeature::LanduseMeadow]            = GeoDataFeaturePrivate::createWayStyle( "#cdebb0", "#cdebb0", true, true );
Dennis Nienhüser's avatar
Dennis Nienhüser committed
603
604
    s_defaultStyle[GeoDataFeature::LanduseMilitary]          = GeoDataFeaturePrivate::createWayStyle( "#F3D8D2", "#F3D8D2", true, true, Qt::BDiagPattern, MarbleDirs::path("bitmaps/osmcarto/patterns/military_red_hatch.png") );
    s_defaultStyle[GeoDataFeature::LanduseQuarry]            = GeoDataFeaturePrivate::createWayStyle( "#C4C2C2", "#C4C2C2", true, true, Qt::SolidPattern, MarbleDirs::path("bitmaps/osmcarto/patterns/quarry.png") );
Torsten Rahn's avatar
Torsten Rahn committed
605
    s_defaultStyle[GeoDataFeature::LanduseRailway]           = GeoDataFeaturePrivate::createWayStyle( "#DED0D5", "#DED0D5", true, true );
606
    s_defaultStyle[GeoDataFeature::LanduseReservoir]         = GeoDataFeaturePrivate::createWayStyle( waterColor, waterColor, true, true );
Torsten Rahn's avatar
Torsten Rahn committed
607
608
    s_defaultStyle[GeoDataFeature::LanduseResidential]       = GeoDataFeaturePrivate::createWayStyle( "#DCDCDC", "#DCDCDC", true, true );
    s_defaultStyle[GeoDataFeature::LanduseRetail]            = GeoDataFeaturePrivate::createWayStyle( "#FFD6D1", "#D99C95", true, true );
Torsten Rahn's avatar
Torsten Rahn committed
609
    s_defaultStyle[GeoDataFeature::LanduseOrchard]           = GeoDataFeaturePrivate::createWayStyle( "#AEDFA3", "#AEDFA3", true, false, Qt::SolidPattern, MarbleDirs::path("bitmaps/osmcarto/patterns/orchard.png") );
610
    s_defaultStyle[GeoDataFeature::LanduseVineyard]          = GeoDataFeaturePrivate::createWayStyle( "#AEDFA3", "#AEDFA3", true, false, Qt::SolidPattern, MarbleDirs::path("bitmaps/osmcarto/patterns/vineyard.png") );
611

612
613
    s_defaultStyle[GeoDataFeature::MilitaryDangerArea]       = GeoDataFeaturePrivate::createWayStyle( "#FFC0CB", "#FFC0CB", true, false, Qt::SolidPattern, MarbleDirs::path("bitmaps/osmcarto/patterns/danger.png") );

614
615
    s_defaultStyle[GeoDataFeature::RailwayRail]              = GeoDataFeaturePrivate::createStyle( 2.0, 1.435, "#706E70", "#EEEEEE", true, true, Qt::SolidPattern, Qt::CustomDashLine, Qt::FlatCap, true, QVector< qreal >() << 2 << 3 );
    s_defaultStyle[GeoDataFeature::RailwayNarrowGauge]       = GeoDataFeaturePrivate::createStyle( 2.0, 1.0, "#706E70", "#EEEEEE", true, true, Qt::SolidPattern, Qt::CustomDashLine, Qt::FlatCap, true, QVector< qreal >() << 2 << 3 );
616
    // FIXME: the tram is currently being rendered as a polygon.
617
618
619
620
621
622
623
624
625
    s_defaultStyle[GeoDataFeature::RailwayTram]              = GeoDataFeaturePrivate::createStyle( 2.0, 1.435, "#706E70", "#EEEEEE", false, true, Qt::SolidPattern, Qt::SolidLine, Qt::FlatCap, false );
    s_defaultStyle[GeoDataFeature::RailwayLightRail]         = GeoDataFeaturePrivate::createStyle( 2.0, 1.435, "#706E70", "#EEEEEE", false, true, Qt::SolidPattern, Qt::SolidLine, Qt::FlatCap, false );
    s_defaultStyle[GeoDataFeature::RailwayAbandoned]         = GeoDataFeaturePrivate::createStyle( 2.0, 1.435, Qt::transparent, "#706E70", false, false, Qt::SolidPattern, Qt::DotLine, Qt::FlatCap, false );
    s_defaultStyle[GeoDataFeature::RailwaySubway]            = GeoDataFeaturePrivate::createStyle( 2.0, 1.435, "#706E70", "#EEEEEE", false, true, Qt::SolidPattern, Qt::SolidLine, Qt::FlatCap, false );
    s_defaultStyle[GeoDataFeature::RailwayPreserved]         = GeoDataFeaturePrivate::createStyle( 2.0, 1.435, "#EEEEEE", "#706E70", true, true, Qt::SolidPattern, Qt::DotLine, Qt::FlatCap, true );
    s_defaultStyle[GeoDataFeature::RailwayMiniature]         = GeoDataFeaturePrivate::createStyle( 2.0, 1.435, "#706E70", "#EEEEEE", false, true, Qt::SolidPattern, Qt::SolidLine, Qt::FlatCap, false );
    s_defaultStyle[GeoDataFeature::RailwayConstruction]      = GeoDataFeaturePrivate::createStyle( 2.0, 1.435, "#EEEEEE", "#706E70", true, true, Qt::SolidPattern, Qt::DotLine, Qt::FlatCap, true );
    s_defaultStyle[GeoDataFeature::RailwayMonorail]          = GeoDataFeaturePrivate::createStyle( 2.0, 1.435, "#706E70", "#EEEEEE", false, true, Qt::SolidPattern, Qt::SolidLine, Qt::FlatCap, false );
    s_defaultStyle[GeoDataFeature::RailwayFunicular]         = GeoDataFeaturePrivate::createStyle( 2.0, 1.435, "#706E70", "#EEEEEE", false, true, Qt::SolidPattern, Qt::SolidLine, Qt::FlatCap, false );
626

Torsten Rahn's avatar
Torsten Rahn committed
627
    s_defaultStyle[GeoDataFeature::Building]                 = GeoDataFeaturePrivate::createStyle( 1, 0, buildingColor, buildingColor.darker(),
628
                                                                                   true, true, Qt::SolidPattern, Qt::SolidLine, Qt::RoundCap, false );
629

630
    s_defaultStyle[GeoDataFeature::Satellite]
631
        = new GeoDataStyle( MarbleDirs::path( "bitmaps/satellite.png" ),
632
              QFont( defaultFamily, defaultSize, 50, false ), s_defaultLabelColor );
633

Dāvis Mosāns's avatar
Dāvis Mosāns committed
634
    s_defaultFont = QFont( QStringLiteral("Sans Serif") );
Torsten Rahn's avatar
Torsten Rahn committed
635
636
637

    QFont tmp;

638

Torsten Rahn's avatar
Torsten Rahn committed
639
    // Fonts for areas ...
640
    tmp = s_defaultStyle[GeoDataFeature::Continent]->labelStyle().font();
641
642
643
    tmp.setLetterSpacing( QFont::AbsoluteSpacing, 2 );
    tmp.setCapitalization( QFont::SmallCaps );
    tmp.setBold( true );
644
    s_defaultStyle[GeoDataFeature::Continent]->labelStyle().setFont( tmp );
645
646

    // Fonts for areas ...
647
    tmp = s_defaultStyle[GeoDataFeature::Mare]->labelStyle().font();
648
649
650
    tmp.setLetterSpacing( QFont::AbsoluteSpacing, 2 );
    tmp.setCapitalization( QFont::SmallCaps );
    tmp.setBold( true );
651
    s_defaultStyle[GeoDataFeature::Mare]->labelStyle().setFont( tmp );
Torsten Rahn's avatar
Torsten Rahn committed
652
653
654

    // Now we need to underline the capitals ...

655
    tmp = s_defaultStyle[GeoDataFeature::SmallNationCapital]->labelStyle().font();
Torsten Rahn's avatar
Torsten Rahn committed
656
    tmp.setUnderline( true );
657
    s_defaultStyle[GeoDataFeature::SmallNationCapital]->labelStyle().setFont( tmp );
Torsten Rahn's avatar
Torsten Rahn committed
658

659
    tmp = s_defaultStyle[GeoDataFeature::MediumNationCapital]->labelStyle().font();
Torsten Rahn's avatar
Torsten Rahn committed
660
    tmp.setUnderline( true );
661
    s_defaultStyle[GeoDataFeature::MediumNationCapital]->labelStyle().setFont( tmp );
Torsten Rahn's avatar
Torsten Rahn committed
662

663
    tmp = s_defaultStyle[GeoDataFeature::BigNationCapital]->labelStyle().font();
Torsten Rahn's avatar
Torsten Rahn committed
664
    tmp.setUnderline( true );
665
    s_defaultStyle[GeoDataFeature::BigNationCapital]->labelStyle().setFont( tmp );
Torsten Rahn's avatar
Torsten Rahn committed
666

667
    tmp = s_defaultStyle[GeoDataFeature::LargeNationCapital]->labelStyle().font();
Torsten Rahn's avatar
Torsten Rahn committed
668
    tmp.setUnderline( true );
669
    s_defaultStyle[GeoDataFeature::LargeNationCapital]->labelStyle().setFont( tmp );
Torsten Rahn's avatar
Torsten Rahn committed
670
671
}

Bernhard Beschow's avatar
Bernhard Beschow committed
672
const GeoDataStyle *GeoDataFeature::presetStyle( GeoDataVisualCategory category )
673
674
675
676
{
    return GeoDataFeaturePrivate::s_defaultStyle[ category ];
}

Torsten Rahn's avatar
Torsten Rahn committed
677
678
QFont GeoDataFeature::defaultFont()
{
679
    return GeoDataFeaturePrivate::s_defaultFont;
Torsten Rahn's avatar
Torsten Rahn committed
680
681
682
683
}

void GeoDataFeature::setDefaultFont( const QFont& font )
{
684
685
    GeoDataFeaturePrivate::s_defaultFont = font;
    GeoDataFeaturePrivate::s_defaultStyleInitialized = false;
Torsten Rahn's avatar
Torsten Rahn committed
686
687
}

688
689
QColor GeoDataFeature::defaultLabelColor()
{
690
    return GeoDataFeaturePrivate::s_defaultLabelColor;
691
692
693
694
}

void GeoDataFeature::setDefaultLabelColor( const QColor& color )
{
695