Marble

GeoSceneSection.h
1 /*
2  SPDX-FileCopyrightText: 2008 Torsten Rahn <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef MARBLE_GEOSCENESECTION_H
8 #define MARBLE_GEOSCENESECTION_H
9 
10 #include <QString>
11 #include <QVector>
12 
13 #include "GeoDocument.h"
14 
15 namespace Marble
16 {
17 
18 class GeoSceneItem;
19 
20 /**
21  * @short Section of a GeoScene document.
22  */
23 
24 class GEODATA_EXPORT GeoSceneSection : public GeoNode
25 {
26  public:
27  explicit GeoSceneSection( const QString& name );
28  ~GeoSceneSection() override;
29 
30  const char* nodeType() const override;
31 
32  /**
33  * @brief Add an item to the legend section
34  * @param item the new item
35  */
36  void addItem(GeoSceneItem*);
37  GeoSceneItem* item(const QString&);
38  QVector<GeoSceneItem*> items() const;
39 
40  QString name() const;
41 
42  QString heading() const;
43  void setHeading( const QString& heading );
44 
45  bool checkable() const;
46  void setCheckable( bool checkable );
47 
48  QString connectTo() const;
49  void setConnectTo( const QString& text );
50 
51  int spacing() const;
52  void setSpacing( int spacing );
53 
54  QString radio() const;
55  void setRadio( const QString& radio );
56 
57  private:
58  Q_DISABLE_COPY( GeoSceneSection )
59 
60  /// The vector holding all the items in the legend section.
61  /// (We want to preserve the order and don't care
62  /// much about speed here), so we don't use a hash
63  QVector<GeoSceneItem*> m_items;
64 
65  QString m_name;
66  QString m_heading;
67  QString m_connectTo;
68  QString m_radio;
69 
70  bool m_checkable;
71  int m_spacing;
72 };
73 
74 }
75 
76 #endif
Section of a GeoScene document.
A shared base class for all classes that are mapped to a specific tag (ie.
Definition: GeoDocument.h:34
Binds a QML item to a specific geodetic location in screen coordinates.
The section item in a legend of a GeoScene document.
Definition: GeoSceneItem.h:23
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Dec 5 2023 03:53:50 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.