Marble

GeoDataStyleMap.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2008 Patrick Spendrin <[email protected]>
4 //
5 
6 
7 #ifndef MARBLE_GEODATASTYLEMAP_H
8 #define MARBLE_GEODATASTYLEMAP_H
9 
10 
11 #include <QString>
12 #include <QMap>
13 
14 #include "GeoDataStyleSelector.h"
15 
16 #include "geodata_export.h"
17 
18 namespace Marble
19 {
20 
21 class GeoDataStyleMapPrivate;
22 /**
23  * @short a class to map different styles to one style
24  *
25  * A GeoDataStyleMap connects styles for highlighted and normal
26  * context. Besides GeoDataStyleSelector it derives from
27  * QMap<QString, QString>.
28  *
29  * @see GeoDataStyle
30  * @see GeoDataStyleSelector
31  */
32 class GEODATA_EXPORT GeoDataStyleMap : public GeoDataStyleSelector,
33  public QMap<QString, QString>
34 {
35  public:
36  /// Provides type information for downcasting a GeoNode
37  const char* nodeType() const override;
38 
39  /**
40  * @brief return the last key
41  */
42  QString lastKey() const;
43  /**
44  * @brief Set the last key
45  * this property is needed to set an entry in the kml parser
46  * after the parser has set the last key, it will read the value
47  * and add both to this map
48  * @param key the last key
49  */
50  void setLastKey( const QString& key );
51 
52  /**
53  * @brief assignment operator
54  * @param other the styleMap which gets duplicated.
55  */
56  GeoDataStyleMap& operator=( const GeoDataStyleMap& other );
57 
58  bool operator==( const GeoDataStyleMap &other ) const;
59  bool operator!=( const GeoDataStyleMap &other ) const;
60 
61  /**
62  * @brief Serialize the stylemap to a stream
63  * @param stream the stream
64  */
65  void pack( QDataStream& stream ) const override;
66  /**
67  * @brief Unserialize the stylemap from a stream
68  * @param stream the stream
69  */
70  void unpack( QDataStream& stream ) override;
71 
73  GeoDataStyleMap( const GeoDataStyleMap& other );
74  ~GeoDataStyleMap() override;
75 
76  private:
77  GeoDataStyleMapPrivate * const d;
78 };
79 
80 }
81 
82 #endif
a class to map different styles to one style
Binds a QML item to a specific geodetic location in screen coordinates.
an abstract base class for the style classes
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Oct 3 2023 04:09:47 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.