GeoDataFeature.h 16.4 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
14
#ifndef MARBLE_GEODATAFEATURE_H
#define MARBLE_GEODATAFEATURE_H
15
16


17
18
19
#include <QString>
#include <QFont>
#include <QColor>
Torsten Rahn's avatar
Torsten Rahn committed
20

21
22
#include "GeoDataObject.h"

23
24
#include "geodata_export.h"

25
26
27
namespace Marble
{

28
// forward define all features we can find.
29
class GeoDataRegion;
30
class GeoDataAbstractView;
31

Torsten Rahn's avatar
Torsten Rahn committed
32
class GeoDataStyle;
33
class GeoDataStyleMap;
Torsten Rahn's avatar
Torsten Rahn committed
34

Bastian Holst's avatar
Bastian Holst committed
35
class GeoDataExtendedData;
36

Bastian Holst's avatar
Bastian Holst committed
37
38
39
class GeoDataTimeSpan;
class GeoDataTimeStamp;

40
class GeoDataFeaturePrivate;
Inge Wallin's avatar
Inge Wallin committed
41

42
43
class GeoDataSnippet;

Inge Wallin's avatar
Inge Wallin committed
44
45
46
/**
 * @short A base class for all geodata features
 *
47
48
49
 * GeoDataFeature is the base class for most geodata classes that
 * correspond to places on a map. It is never instantiated by itself,
 * but is always used as part of a derived class.
50
 *
Inge Wallin's avatar
Inge Wallin committed
51
 * @see GeoDataPlacemark
52
 * @see GeoDataContainer
Inge Wallin's avatar
Inge Wallin committed
53
54
 */

55
56
// FIXME: Later also add NetworkLink and Overlay

57
class GEODATA_EXPORT GeoDataFeature : public GeoDataObject
58
59
{
 public:
60
    GeoDataFeature();
61
    /// Create a new GeoDataFeature with @p name as its name.
Kevin Krammer's avatar
Kevin Krammer committed
62
    explicit GeoDataFeature( const QString& name );
63
64

    GeoDataFeature( const GeoDataFeature& other );
Bastian Holst's avatar
Bastian Holst committed
65

66
67
    virtual ~GeoDataFeature();

68
    GeoDataFeature& operator=( const GeoDataFeature& other );
69

70
    /// Provides type information for downcasting a GeoData
71
    virtual const char* nodeType() const;
Torsten Rahn's avatar
Torsten Rahn committed
72

73
    EnumFeatureId featureId() const;
74
75
    /**
     * @brief  A categorization of a placemark as defined by ...FIXME.
76
77
     * There is an additional osm tag mapping to GeoDataVisualCategory
     * in OsmPresetLibrary.cpp
78
     */
79
80
81
82
83
84
85
86
    enum GeoDataVisualCategory {
        None,
        Default,
        Unknown,

        // The order of the cities needs to stay fixed as the
        // algorithms rely on that.
        SmallCity,
Torsten Rahn's avatar
Torsten Rahn committed
87
88
        SmallCountyCapital,
        SmallStateCapital,
89
90
91
92
93
94
95
96
97
98
99
100
101
        SmallNationCapital,
        MediumCity,
        MediumCountyCapital,
        MediumStateCapital,
        MediumNationCapital,
        BigCity,
        BigCountyCapital,
        BigStateCapital,
        BigNationCapital,
        LargeCity,
        LargeCountyCapital,
        LargeStateCapital,
        LargeNationCapital,
102
        Nation,
103

104
        PlaceCity,
105
        PlaceSuburb,
106
107
108
109
        PlaceHamlet,
        PlaceLocality,
        PlaceTown,
        PlaceVillage,
110

111
        // Terrain
112
113
        Mountain,
        Volcano,
114
115
        Mons,                    // m
        Valley,                  // v
116
117
        Continent,
        Ocean,
118
        OtherTerrain,            // o
119

120
121
122
        // Space Terrain
        Crater,                  // c
        Mare,                    // a
Bastian Holst's avatar
Bastian Holst committed
123

124
        // Places of Interest
125
126
127
128
        GeographicPole,
        MagneticPole,
        ShipWreck,
        AirPort,
Patrick Spendrin's avatar
Patrick Spendrin committed
129
        Observatory,
130

131
132
133
        // Military
        MilitaryDangerArea,

134
        // Runners
135
        Wikipedia,
136
137
138
139
        OsmSite,
        Coordinate,

        // Planets
Torsten Rahn's avatar
Torsten Rahn committed
140
141
142
143
144
        MannedLandingSite,       // h
        RoboticRover,            // r
        UnmannedSoftLandingSite, // u
        UnmannedHardLandingSite, // i

145
146
        Folder,
        Bookmark,
Torsten Rahn's avatar
Torsten Rahn committed
147

Konstantin Oblaukhov's avatar
Konstantin Oblaukhov committed
148
        NaturalWater,
149
        NaturalWood,
150
        NaturalBeach,
151
        NaturalWetland,
152
        NaturalGlacier,
153
        NaturalScrub,
154
        NaturalCliff,
155
        NaturalHeath,
156

157
158
        HighwayTrafficSignals,

159
160
        // OpenStreetMap highways
        HighwaySteps,
Konstantin Oblaukhov's avatar
Konstantin Oblaukhov committed
161
162
        HighwayUnknown,
        HighwayPath,
163
        HighwayFootway,
Konstantin Oblaukhov's avatar
Konstantin Oblaukhov committed
164
        HighwayTrack,
165
        HighwayPedestrian,
166
        HighwayCycleway,
Konstantin Oblaukhov's avatar
Konstantin Oblaukhov committed
167
168
        HighwayService,
        HighwayRoad,
169
        HighwayResidential,
170
171
        HighwayLivingStreet,
        HighwayUnclassified,
172
        HighwayTertiaryLink,
Konstantin Oblaukhov's avatar
Konstantin Oblaukhov committed
173
        HighwayTertiary,
174
        HighwaySecondaryLink,
Konstantin Oblaukhov's avatar
Konstantin Oblaukhov committed
175
        HighwaySecondary,
176
        HighwayPrimaryLink,
Konstantin Oblaukhov's avatar
Konstantin Oblaukhov committed
177
        HighwayPrimary,
178
        HighwayTrunkLink,
Konstantin Oblaukhov's avatar
Konstantin Oblaukhov committed
179
        HighwayTrunk,
180
        HighwayMotorwayLink,
Konstantin Oblaukhov's avatar
Konstantin Oblaukhov committed
181
182
        HighwayMotorway,

183
184
        //OSM building
        Building,
Torsten Rahn's avatar
Torsten Rahn committed
185

186
187
188
189
190
191
        // OpenStreetMap category Accomodation
        AccomodationCamping,
        AccomodationHostel,
        AccomodationHotel,
        AccomodationMotel,
        AccomodationYouthHostel,
Torsten Rahn's avatar
Torsten Rahn committed
192
        AccomodationGuestHouse,
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210

        // OpenStreetMap category Amenity
        AmenityLibrary,

        // OpenStreetMap category Education
        EducationCollege,
        EducationSchool,
        EducationUniversity,

        // OpenStreetMap category Food
        FoodBar,
        FoodBiergarten,
        FoodCafe,
        FoodFastFood,
        FoodPub,
        FoodRestaurant,

        // OpenStreetMap category Health
211
        HealthDentist,
212
213
214
        HealthDoctors,
        HealthHospital,
        HealthPharmacy,
215
        HealthVeterinary,
216
217

        // OpenStreetMap category Money
Dennis Nienhüser's avatar
Dennis Nienhüser committed
218
        MoneyAtm,
219
220
        MoneyBank,

Torsten Rahn's avatar
Torsten Rahn committed
221
        AmenityArchaeologicalSite,
222
        AmenityEmbassy,
Torsten Rahn's avatar
Torsten Rahn committed
223
224
        AmenityEmergencyPhone,
        AmenityWaterPark,
225
        AmenityCommunityCentre,
Torsten Rahn's avatar
Torsten Rahn committed
226
        AmenityFountain,
227
        AmenityNightClub,
228
229
230
231
232
233
234
235
236
237
238
239
240
        AmenityBench,
        AmenityCourtHouse,
        AmenityFireStation,
        AmenityHuntingStand,
        AmenityPolice,
        AmenityPostBox,
        AmenityPostOffice,
        AmenityPrison,
        AmenityRecycling,
        AmenityTelephone,
        AmenityToilets,
        AmenityTownHall,
        AmenityWasteBasket,
241
        AmenityDrinkingWater,
242
        AmenityGraveyard,
243

244
        // OpenStreetMap category Barrier
245
246
        BarrierGate,
        BarrierLiftGate,
247
248
        BarrierWall,

249
        NaturalPeak,
250
        NaturalTree,
251

252
        // OpenStreetMap category Shopping
253
254
255
256
257
        ShopBeverages,
        ShopHifi,
        ShopSupermarket,
        ShopAlcohol,
        ShopBakery,
258
        ShopButcher,
259
260
261
262
        ShopConfectionery,
        ShopConvenience,
        ShopGreengrocer,
        ShopSeafood,
263
        ShopDepartmentStore,
264
        ShopKiosk,
Torsten Rahn's avatar
Torsten Rahn committed
265
        ShopBag,
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
        ShopClothes,
        ShopFashion,
        ShopJewelry,
        ShopShoes,
        ShopVarietyStore,
        ShopBeauty,
        ShopChemist,
        ShopCosmetics,
        ShopHairdresser,
        ShopOptician,
        ShopPerfumery,
        ShopDoitYourself,
        ShopFlorist,
        ShopHardware,
        ShopFurniture,
        ShopElectronics,
        ShopMobilePhone,
        ShopBicycle,
        ShopCar,
        ShopCarRepair,
        ShopCarParts,
        ShopMotorcycle,
Torsten Rahn's avatar
Torsten Rahn committed
288
        ShopOutdoor,
289
290
291
292
293
294
295
296
297
        ShopMusicalInstrument,
        ShopPhoto,
        ShopBook,
        ShopGift,
        ShopStationery,
        ShopLaundry,
        ShopPet,
        ShopToys,
        ShopTravelAgency,
298
        Shop,
299

300
        ManmadeBridge,
301
        ManmadeLighthouse,
Torsten Rahn's avatar
Torsten Rahn committed
302
        ManmadePier,
Torsten Rahn's avatar
Torsten Rahn committed
303
304
        ManmadeWaterTower,
        ManmadeWindMill,
Torsten Rahn's avatar
Torsten Rahn committed
305

306
307
308
309
310

        // OpenStreetMap category Tourist
        TouristAttraction,
        TouristCastle,
        TouristCinema,
Torsten Rahn's avatar
Torsten Rahn committed
311
        TouristInformation,
312
313
314
315
316
317
318
        TouristMonument,
        TouristMuseum,
        TouristRuin,
        TouristTheatre,
        TouristThemePark,
        TouristViewPoint,
        TouristZoo,
Dennis Nienhüser's avatar
Dennis Nienhüser committed
319
        TouristAlpineHut,
320
321
322

        // OpenStreetMap category Transport
        TransportAerodrome,
323
        TransportHelipad,
324
325
326
327
328
329
        TransportAirportTerminal,
        TransportBusStation,
        TransportBusStop,
        TransportCarShare,
        TransportFuel,
        TransportParking,
330
        TransportParkingSpace,
331
        TransportPlatform,
Dennis Nienhüser's avatar
Dennis Nienhüser committed
332
333
334
        TransportRentalBicycle,
        TransportRentalCar,
        TransportTaxiRank,
335
        TransportTrainStation,
Dennis Nienhüser's avatar
Dennis Nienhüser committed
336
        TransportTramStop,
337
338
        TransportBicycleParking,
        TransportMotorcycleParking,
Torsten Rahn's avatar
Torsten Rahn committed
339
        TransportSubwayEntrance,
340

341
342
343
344
345
        // OpenStreetMap category religion
        ReligionPlaceOfWorship,
        ReligionBahai,
        ReligionBuddhist,
        ReligionChristian,
346
        ReligionMuslim,
347
348
349
350
351
        ReligionHindu,
        ReligionJain,
        ReligionJewish,
        ReligionShinto,
        ReligionSikh,
Dennis Nienhüser's avatar
Dennis Nienhüser committed
352

Konstantin Oblaukhov's avatar
Konstantin Oblaukhov committed
353
        // OpenStreetMap category Leisure
354
        LeisureGolfCourse,
Konstantin Oblaukhov's avatar
Konstantin Oblaukhov committed
355
        LeisurePark,
Dennis Nienhüser's avatar
Dennis Nienhüser committed
356
        LeisurePlayground,
357
        LeisurePitch,
358
359
        LeisureSportsCentre,
        LeisureStadium,
Torsten Rahn's avatar
Torsten Rahn committed
360
        LeisureTrack,
361
        LeisureSwimmingPool,
Konstantin Oblaukhov's avatar
Konstantin Oblaukhov committed
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380

        LanduseAllotments,
        LanduseBasin,
        LanduseCemetery,
        LanduseCommercial,
        LanduseConstruction,
        LanduseFarmland,
        LanduseFarmyard,
        LanduseGarages,
        LanduseGrass,
        LanduseIndustrial,
        LanduseLandfill,
        LanduseMeadow,
        LanduseMilitary,
        LanduseQuarry,
        LanduseRailway,
        LanduseReservoir,
        LanduseResidential,
        LanduseRetail,
381
        LanduseOrchard,
382
        LanduseVineyard,
383

Konstantin Oblaukhov's avatar
Konstantin Oblaukhov committed
384
        RailwayRail,
Dennis Nienhüser's avatar
Dennis Nienhüser committed
385
        RailwayNarrowGauge,
Konstantin Oblaukhov's avatar
Konstantin Oblaukhov committed
386
387
388
389
390
391
392
393
394
395
        RailwayTram,
        RailwayLightRail,
        RailwayAbandoned,
        RailwaySubway,
        RailwayPreserved,
        RailwayMiniature,
        RailwayConstruction,
        RailwayMonorail,
        RailwayFunicular,

Torsten Rahn's avatar
Torsten Rahn committed
396
397
398
        // OpenStreetMap category Power
        PowerTower,

399
400
        Satellite,

Torsten Rahn's avatar
Torsten Rahn committed
401
        // Important: Make sure that this is always the last
402
403
404
        // item and just use it to specify the array size
        LastIndex
    };
Torsten Rahn's avatar
Torsten Rahn committed
405

406
407
408
409
410
411
412
413
414
    /**
     * @brief The name of the feature
     *
     * The name of the feature should be a short string. It is often
     * shown directly on the map and need therefore not take up much
     * space.
     *
     * @return The name of this feature
     */
415
    QString name() const;
416
417
418
419
    /**
     * @brief Set a new name for this feature
     * @param value  the new name
     */
420
421
    void setName( const QString &value );

422
423
424
425
426
427
428
429
430
431
432
433
434
435
    /**
     * @brief A short description of the feature.
     *
     * HTML markup is not supported.
     * @TODO When the Snippet is not supplied, the first lines of description should be used.
     * @return The name of this feature
     */
    GeoDataSnippet snippet() const;
    /**
     * @brief Set a new name for this feature
     * @param value  the new name
     */
    void setSnippet( const GeoDataSnippet &value );

436
    /// Return the address of the feature
437
    QString address() const;
438
    /// Set the address of this feature to @p value.
439
440
    void setAddress( const QString &value);

441
    /// Return the phone number of the feature
442
    QString phoneNumber() const;
443
    /// Set the phone number of this feature to @p value.
Patrick Spendrin's avatar
Patrick Spendrin committed
444
    void setPhoneNumber( const QString &value );
445

446
    /// Return the text description of the feature.
447
    QString description() const;
448
    /// Set the description of this feature to @p value.
Patrick Spendrin's avatar
Patrick Spendrin committed
449
    void setDescription( const QString &value );
450

451
    /**
Torsten Rahn's avatar
   
Torsten Rahn committed
452
     * @brief test if the description is CDATA or not
453
     * CDATA allows for special characters to be included in XML and also allows
Torsten Rahn's avatar
   
Torsten Rahn committed
454
     * for other XML formats to be embedded in the XML without interfering with
455
456
457
458
459
460
461
462
     * parser namespace.
     * @return @true if the description should be treated as CDATA
     *         @false if the description is a plain string
     */
    bool descriptionIsCDATA() const;
    /// Set the description to be CDATA See: @see descriptionIsCDATA()
    void setDescriptionCDATA( bool cdata );

463
    /// Get the Abstract view of the feature
464
465
    const GeoDataAbstractView *abstractView() const;
    GeoDataAbstractView *abstractView();
466
    /// Set the abstract view of the feature
467
    void setAbstractView( GeoDataAbstractView *abstractView );
468

469
470
471
    /// Return the styleUrl of the feature.
    QString styleUrl() const;
    /// Set the styleUrl of this feature to @p value.
Patrick Spendrin's avatar
Patrick Spendrin committed
472
    void setStyleUrl( const QString &value );
Bastian Holst's avatar
Bastian Holst committed
473

474
    /// Return whether this feature is visible or not
475
    bool isVisible() const;
476
477
478
479

    /// Return whether this feature is visible or not in the context of its parenting
    bool isGloballyVisible() const;

480
481
    /**
     * @brief Set a new value for visibility
482
     * @param value  new value for the visibility
483
484
485
486
     *
     * This function sets the visibility, i.e. whether this feature
     * should be shown or not.  This can be changed either from a GUI
     * or through some action of the program.
Torsten Rahn's avatar
Torsten Rahn committed
487
     */
488
489
    void setVisible( bool value );

Bastian Holst's avatar
Bastian Holst committed
490
491
492
    /**
     * Return the timespan of the feature.
     */
Dennis Nienhüser's avatar
Dennis Nienhüser committed
493
494
    const GeoDataTimeSpan& timeSpan() const;
    GeoDataTimeSpan& timeSpan();
Bastian Holst's avatar
Bastian Holst committed
495
496
497

    /**
     * Set the timespan of the feature.
Bernhard Beschow's avatar
Bernhard Beschow committed
498
     * @param timeSpan new of timespan.
Bastian Holst's avatar
Bastian Holst committed
499
     */
Bernhard Beschow's avatar
Bernhard Beschow committed
500
    void setTimeSpan( const GeoDataTimeSpan &timeSpan );
Bastian Holst's avatar
Bastian Holst committed
501
502
503
504

    /**
     * Return the timestamp of the feature.
     */
Dennis Nienhüser's avatar
Dennis Nienhüser committed
505
506
    const GeoDataTimeStamp& timeStamp() const;
    GeoDataTimeStamp& timeStamp();
Bastian Holst's avatar
Bastian Holst committed
507
508
509
510
511

    /**
     * Set the timestamp of the feature.
     * @param timeStamp new of the timestamp.
     */
Bernhard Beschow's avatar
Bernhard Beschow committed
512
    void setTimeStamp( const GeoDataTimeStamp &timeStamp );
Bastian Holst's avatar
Bastian Holst committed
513

Torsten Rahn's avatar
Torsten Rahn committed
514
    /**
515
     * Return the style assigned to the placemark, or a default style if none has been set
Torsten Rahn's avatar
Torsten Rahn committed
516
     */
517
    const GeoDataStyle* style() const;
518
519
520
521
    /**
     * Return the style assigned to the placemark with setStyle (can be 0)
     */
    const GeoDataStyle* customStyle() const;
Torsten Rahn's avatar
Torsten Rahn committed
522
    /**
523
     * Sets the style of the placemark.
524
     * @param  style  the new style to be used.
Torsten Rahn's avatar
Torsten Rahn committed
525
     */
526
    void setStyle( GeoDataStyle *style );
Torsten Rahn's avatar
Torsten Rahn committed
527

Bastian Holst's avatar
Bastian Holst committed
528
529
530
531
532
533
534
535
536
537
538
    /**
     * Return the ExtendedData assigned to the feature.
     */
    GeoDataExtendedData& extendedData() const;

    /**
     * Sets the ExtendedData of the feature.
     * @param  extendedData  the new ExtendedData to be used.
     */
    void setExtendedData( const GeoDataExtendedData& extendedData );

539
540
541
    /**
     * Return the region assigned to the placemark.
     */
542
    GeoDataRegion& region() const;
543
544
545
546
547
548
549
550
    /**
     * @brief Sets the region of the placemark.
     * @param region new value for the region
     *
     * The feature is only shown when the region if active.
     */
    void setRegion( const GeoDataRegion& region );

Torsten Rahn's avatar
Torsten Rahn committed
551
    /**
552
     * Return the symbol index of the placemark.
Torsten Rahn's avatar
Torsten Rahn committed
553
     */
Bastian Holst's avatar
Bastian Holst committed
554
    GeoDataVisualCategory visualCategory() const;
Torsten Rahn's avatar
Torsten Rahn committed
555
    /**
556
     * Sets the symbol @p index of the placemark.
557
     * @param  category  the new category to be used.
Torsten Rahn's avatar
Torsten Rahn committed
558
     */
559
    void setVisualCategory( GeoDataVisualCategory category );
Torsten Rahn's avatar
Torsten Rahn committed
560
561

    /**
562
     * Return the role of the placemark.
Torsten Rahn's avatar
Torsten Rahn committed
563
     *
564
     * FIXME: describe roles here!
Torsten Rahn's avatar
Torsten Rahn committed
565
     */
Bastian Holst's avatar
Bastian Holst committed
566
    const QString role() const;
Torsten Rahn's avatar
Torsten Rahn committed
567
    /**
568
     * Sets the role of the placemark.
569
     * @param  role  the new role to be used.
Torsten Rahn's avatar
Torsten Rahn committed
570
     */
Bastian Holst's avatar
Bastian Holst committed
571
    void setRole( const QString &role );
Torsten Rahn's avatar
Torsten Rahn committed
572
573

    /**
574
     * @brief Return the popularity index of the placemark.
Torsten Rahn's avatar
Torsten Rahn committed
575
     *
576
577
     * The popularity index is a value which describes at which zoom
     * level the placemark will be shown.
Torsten Rahn's avatar
Torsten Rahn committed
578
     */
579
    int zoomLevel() const;
Torsten Rahn's avatar
Torsten Rahn committed
580
    /**
581
     * Sets the popularity @p index of the placemark.
582
     * @param  index  the new index to be used.
Torsten Rahn's avatar
Torsten Rahn committed
583
     */
584
    void setZoomLevel( int index );
Torsten Rahn's avatar
Torsten Rahn committed
585
586

    /**
Torsten Rahn's avatar
   
Torsten Rahn committed
587
     * Return the popularity of the feature.
Torsten Rahn's avatar
Torsten Rahn committed
588
     */
589
    qint64 popularity() const;
Torsten Rahn's avatar
Torsten Rahn committed
590
    /**
Torsten Rahn's avatar
   
Torsten Rahn committed
591
     * Sets the @p popularity of the feature.
592
     * @param  popularity  the new popularity value
Torsten Rahn's avatar
Torsten Rahn committed
593
594
     */
    void setPopularity( qint64 popularity );
Bastian Holst's avatar
Bastian Holst committed
595

596
    /**
597
598
599
600
601
602
     * Return a pointer to a GeoDataStyleMap object which represents the styleMap
     * of this feature. A styleMap is simply a QMap<QString,QString> which can connect
     * two styles with a keyword. This can be used to have a highlighted and a
     * normal style.
     * @see GeoDataStyleMap
     */
603
    const GeoDataStyleMap* styleMap() const;
604
    /**
605
606
     * Sets the styleMap of the feature
     */
607
    void setStyleMap( const GeoDataStyleMap* map );
608

Torsten Rahn's avatar
Torsten Rahn committed
609

610
611
612
    // ----------------------------------------------------------------
    // The following functions are use for painting, and mostly for placemarks.

Torsten Rahn's avatar
Torsten Rahn committed
613
    /**
614
     * Return the label font of the placemark.
Torsten Rahn's avatar
Torsten Rahn committed
615
616
617
     */
    static void resetDefaultStyles();

618
    /// Serialize the contents of the feature to @p stream.
619
    virtual void pack( QDataStream& stream ) const;
620
    /// Unserialize the contents of the feature from @p stream.
621
622
    virtual void unpack( QDataStream& stream );

Torsten Rahn's avatar
Torsten Rahn committed
623
624
625
    static QFont defaultFont();
    static void setDefaultFont( const QFont& font );

626
627
628
    static QColor defaultLabelColor();
    static void setDefaultLabelColor( const QColor& color );

Bernhard Beschow's avatar
Bernhard Beschow committed
629
    static const GeoDataStyle *presetStyle( GeoDataVisualCategory category );
630

631
    virtual void detach();
Torsten Rahn's avatar
Torsten Rahn committed
632

633
634
 protected:
    // the d-pointer needs to be protected to be accessible from derived classes
635
    GeoDataFeaturePrivate* d;
636
    GeoDataFeature( GeoDataFeaturePrivate* priv );
Torsten Rahn's avatar
Torsten Rahn committed
637

638
639
640
    bool equals( const GeoDataFeature &other ) const;
    using GeoDataObject::equals;

641
 private:
642
643
    // the private d pointer accessor - use it instead of the d pointer directly
    GeoDataFeaturePrivate* p() const;
644
645
};

646
647
}

648
#endif