Marble

KmlColorStyleTagWriter.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2011 Dennis Nienhüser <[email protected]>
4 //
5 
6 #ifndef MARBLE_KMLCOLORSTYLETAGWRITER_H
7 #define MARBLE_KMLCOLORSTYLETAGWRITER_H
8 
9 #include <QColor>
10 
11 #include "GeoTagWriter.h"
12 
13 namespace Marble
14 {
15 
16 // No registration for this writer, ColorStyle is an abstract kml element
17 class KmlColorStyleTagWriter: public GeoTagWriter
18 {
19 public:
20  explicit KmlColorStyleTagWriter( const QString &elementName );
21 
22  bool write( const GeoNode *node, GeoWriter& writer ) const override;
23 
24  static QString formatColor( const QColor &color );
25 
26 protected:
27  virtual bool writeMid( const GeoNode *node, GeoWriter& writer ) const = 0;
28 
29  /** Returns true iff all properties have a default value */
30  virtual bool isEmpty( const GeoNode *node ) const = 0;
31 
32  /** Returns the default color **/
33  virtual QColor defaultColor() const;
34 
35 private:
36  QString const m_elementName;
37 };
38 
39 }
40 
41 #endif
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:08 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.