File indexing completed on 2025-01-05 03:59:11
0001 /* 0002 SPDX-FileCopyrightText: 2008 Torsten Rahn <rahn@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef MARBLE_GEOSCENESECTION_H 0008 #define MARBLE_GEOSCENESECTION_H 0009 0010 #include <QString> 0011 #include <QVector> 0012 0013 #include "GeoDocument.h" 0014 0015 namespace Marble 0016 { 0017 0018 class GeoSceneItem; 0019 0020 /** 0021 * @short Section of a GeoScene document. 0022 */ 0023 0024 class DIGIKAM_EXPORT GeoSceneSection : public GeoNode 0025 { 0026 public: 0027 explicit GeoSceneSection( const QString& name ); 0028 ~GeoSceneSection() override; 0029 0030 const char* nodeType() const override; 0031 0032 /** 0033 * @brief Add an item to the legend section 0034 * @param item the new item 0035 */ 0036 void addItem(GeoSceneItem*); 0037 GeoSceneItem* item(const QString&); 0038 QVector<GeoSceneItem*> items() const; 0039 0040 QString name() const; 0041 0042 QString heading() const; 0043 void setHeading( const QString& heading ); 0044 0045 bool checkable() const; 0046 void setCheckable( bool checkable ); 0047 0048 QString connectTo() const; 0049 void setConnectTo( const QString& text ); 0050 0051 int spacing() const; 0052 void setSpacing( int spacing ); 0053 0054 QString radio() const; 0055 void setRadio( const QString& radio ); 0056 0057 private: 0058 Q_DISABLE_COPY( GeoSceneSection ) 0059 0060 /// The vector holding all the items in the legend section. 0061 /// (We want to preserve the order and don't care 0062 /// much about speed here), so we don't use a hash 0063 QVector<GeoSceneItem*> m_items; 0064 0065 QString m_name; 0066 QString m_heading; 0067 QString m_connectTo; 0068 QString m_radio; 0069 0070 bool m_checkable; 0071 int m_spacing; 0072 }; 0073 0074 } 0075 0076 #endif