Marble

OsmcSymbol.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2017 Sergey Popov <sergobot@protonmail.com>
4//
5
6#ifndef OSMCSYMBOL_H
7#define OSMCSYMBOL_H
8
9#include <QColor>
10#include <QImage>
11#include <QString>
12#include <QSvgRenderer>
13
14class OsmcSymbol
15{
16public:
17 explicit OsmcSymbol(const QString &tag, int size = 20);
18 ~OsmcSymbol();
19
20 QImage icon() const;
21 QColor wayColor() const;
22
23private:
24 bool parseTag(const QString &tag);
25 bool parseBackground(const QString &bg);
26 QSvgRenderer* parseForeground(const QString &fg);
27
28 void render();
29
30 QColor m_wayColor;
31 QColor m_backgroundColor;
32 QString m_backgroundType;
33 QSvgRenderer *m_foreground;
34 QSvgRenderer *m_foreground2;
35 QString m_text;
36 QColor m_textColor;
37
38 QImage m_image;
39
40 QStringList m_backgroundTypes;
41 QStringList m_foregroundTypes;
42 QStringList m_precoloredForegroundTypes;
43
44 int const m_side;
45 int m_wayWidth;
46};
47
48#endif // OSMCSYMBOL_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 24 2024 11:50:53 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.