Marble
7#include "GeoSceneSettings.h"
9#include "MarbleDebug.h"
11#include "GeoSceneProperty.h"
12#include "GeoSceneGroup.h"
13#include "GeoSceneTypes.h"
18class GeoSceneSettingsPrivate
21 ~GeoSceneSettingsPrivate()
23 qDeleteAll(m_properties);
33GeoSceneSettings::GeoSceneSettings()
34 : d( new GeoSceneSettingsPrivate )
38GeoSceneSettings::~GeoSceneSettings()
43const char* GeoSceneSettings::nodeType()
const
45 return GeoSceneTypes::GeoSceneSettingsType;
48bool GeoSceneSettings::propertyAvailable(
const QString& name,
bool& available )
const
52 for (; it != propEnd; ++it) {
53 if ( (*it)->name() == name ) {
54 available = (*it)->available();
61 for (; itGroup != groupEnd; ++itGroup) {
62 bool success = (*itGroup)->propertyAvailable( name, available );
73bool GeoSceneSettings::setPropertyValue(
const QString& name,
bool value )
75 mDebug() << name <<
"to" << value;
79 for (; it != propEnd; ++it) {
80 if ( (*it)->name() == name ) {
81 (*it)->setValue( value );
88 for (; itGroup != groupEnd; ++itGroup) {
89 bool success = (*itGroup)->setPropertyValue( name, value );
98bool GeoSceneSettings::propertyValue(
const QString& name,
bool& value )
const
102 for (; it != propEnd; ++it) {
103 if ( (*it)->name() == name ) {
104 value = (*it)->value();
111 for (; itGroup != groupEnd; ++itGroup) {
112 bool success = (*itGroup)->propertyValue( name, value );
129 for (; itGroup != groupEnd; ++itGroup) {
130 allProperties << (*itGroup)->properties();
133 allProperties << d->m_properties;
135 return allProperties;
144 for (; itGroup != groupEnd; ++itGroup) {
145 allProperties << const_cast<const GeoSceneGroup*>(*itGroup)->properties();
148 allProperties.
reserve(allProperties.
size() + d->m_properties.size());
150 allProperties << property;
153 return allProperties;
160 while (it != d->m_groups.end()) {
162 if ( currentGroup->name() == group->name() ) {
164 d->m_groups.erase(it);
173 d->m_groups.append( group );
176 connect ( group, SIGNAL(valueChanged(
QString,
bool)),
177 SIGNAL(valueChanged(
QString,
bool)) );
187 for (; it != groupEnd; ++it) {
188 if ( (*it)->name() == name ) {
208 while (it != d->m_properties.end()) {
210 if ( currentProperty->name() == property->name() ) {
211 delete currentProperty;
212 d->m_properties.erase(it);
221 d->m_properties.append( property );
224 connect ( property, SIGNAL(valueChanged(
QString,
bool)),
225 SIGNAL(valueChanged(
QString,
bool)) );
226 emit valueChanged( property->name(), property->value() );
236 for (; it != propEnd; ++it) {
237 if ( (*it)->name() == name ) {
256 return d->m_properties;
261#include "moc_GeoSceneSettings.cpp"
Group inside the settings of a GeoScene document.
Settings property within a GeoScene document.
Settings of a GeoScene document.
Binds a QML item to a specific geodetic location in screen coordinates.
void reserve(qsizetype size)
qsizetype size() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:17 by
doxygen 1.10.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.