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
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
18namespace Marble
19{
20
21class 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 */
32class 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
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 Fri Jun 21 2024 12:00:06 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.