Marble
GeoDataTreeModel.cpp
212 return QVariant(placemark->name() + QLatin1String(" (") + placemark->countryCode() + QLatin1Char(')'));
326 return QVariant(feature->style()->iconStyle().icon().scaled( QSize(16,16), Qt::KeepAspectRatio, Qt::SmoothTransformation ));
349 } else if (const auto lookAt = (flyTo->view() ? geodata_cast<GeoDataLookAt>(flyTo->view()) : nullptr)) {
355 if (const GeoDataContainer *container = dynamic_cast<const GeoDataContainer *>(placemark->parent())) {
356 return container->customStyle() ? QVariant( QBrush( container->customStyle()->listStyle().backgroundColor() )) : QVariant();
452 // << parentObject->nodeType() << "[" << greatparentContainer->childPosition( parentFeature ) << "](" << parentObject << ")";
458 // GeoDataPlacemark *greatparentPlacemark = static_cast<GeoDataPlacemark*>( greatParentObject );
465 if (GeoDataMultiGeometry *greatparentMultiGeo = geodata_cast<GeoDataMultiGeometry>(greatParentObject)) {
468 // << parentObject->nodeType() << "[" << greatParentItem->childPosition( parentGeometry ) << "](" << parentObject << ")";
549 } else if ( parentfolder->style()->listStyle().listItemType() == GeoDataListStyle::CheckHideChildren ) {
572 } else if ( folder->style()->listStyle().listItemType() == GeoDataListStyle::CheckHideChildren) {
639 const GeoDataObject *itup = object; //Iterator to reach the top of the GeoDataDocument (bottom-up)
650 itdown = index(d->m_rootDocument->childPosition(static_cast<const GeoDataFeature *>(ancestors.last())), 0, QModelIndex());//Iterator to go top down
659 itdown = index(container->childPosition(static_cast<const GeoDataFeature *>(ancestors.last())), 0, itdown);
672 itdown = index(multiGeometry->childPosition(static_cast<const GeoDataGeometry *>(ancestors.last())), 0, itdown);
723 qWarning() << "GeoDataTreeModel::addFeature (parent " << parent << " - feature" << feature << ") : parent not found on the TreeModel";
726 qWarning() << "Null pointer in call to GeoDataTreeModel::addFeature (parent " << parent << " - feature" << feature << ")";
811 int GeoDataTreeModel::addTourPrimitive( const QModelIndex &parent, GeoDataTourPrimitive *primitive, int row )
829 if (auto playlist = (parent.isValid() ? geodata_cast<GeoDataPlaylist>(parentObject) : nullptr)) {
843 if (auto playlist = (parent.isValid() ? geodata_cast<GeoDataPlaylist>(parentObject) : nullptr)) {
void append(const T &value)
DisplayRole
Q_SCRIPTABLE QString camera()
void beginRemoveRows(const QModelIndex &parent, int first, int last)
virtual const char * nodeType() const =0
Provides type information for downcasting a GeoNode.
QVariant fromValue(const T &value)
void * internalPointer() const const
QVector::iterator begin()
int column() const const
QVector::const_iterator constEnd() const const
GeoDataTreeModel(QObject *parent=nullptr)
Creates a new GeoDataTreeModel.
Definition: GeoDataTreeModel.cpp:100
bool hasIndex(int row, int column, const QModelIndex &parent) const const
void beginInsertRows(const QModelIndex &parent, int first, int last)
void removeLast()
bool beginMoveRows(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationChild)
int size() const const
virtual QHash< int, QByteArray > roleNames() const const
QModelIndex createIndex(int row, int column, void *ptr) const const
KeepAspectRatio
typedef ItemFlags
QHash::const_iterator constBegin() const const
QHash::const_iterator constEnd() const const
void endMoveRows()
Orientation
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:48
The representation of GeoData in a model This class represents all available data given by kml-data f...
Definition: GeoDataTreeModel.h:28
bool isEmpty() const const
Binds a QML item to a specific geodetic location in screen coordinates.
Definition: AbstractDataPlugin.cpp:22
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Return the number of Items in the Model.
Definition: GeoDataTreeModel.cpp:115
void beginResetModel()
void endInsertRows()
const GeoDataObject * parent() const
Provides the parent of the object in GeoDataContainers.
Definition: GeoDataObject.cpp:60
bool isValid() const const
void setRootDocument(GeoDataDocument *document)
Sets the root document to use.
Definition: GeoDataTreeModel.cpp:794
bool toBool() const const
T & last()
static ScriptableExtension * childObject(QObject *obj)
QVector::iterator end()
A base class that can hold GeoDataFeatures.
Definition: GeoDataContainer.h:42
void endRemoveRows()
int size() const const
void removed(GeoDataObject *object)
insert and remove row don't trigger any signal that proxies forward this signal will refresh geometry...
Checked
void endResetModel()
QVector::const_iterator constBegin() const const
SmoothTransformation
QString tr(const char *sourceText, const char *disambiguation, int n)
A class that can contain other GeoDataGeometry objects.
Definition: GeoDataMultiGeometry.h:28
QObject * parent() const const
QString toString() const const
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
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.