Marble

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

KDE's Doxygen guidelines are available online.