Marble
GeoDataTreeModel.cpp
205 return QVariant(placemark->name() + QLatin1StringView(" (") + placemark->countryCode() + QLatin1Char(')'));
311 return QVariant(feature->style()->iconStyle().icon().scaled(QSize(16, 16), Qt::KeepAspectRatio, Qt::SmoothTransformation));
333 } else if (const auto lookAt = (flyTo->view() ? geodata_cast<GeoDataLookAt>(flyTo->view()) : nullptr)) {
340 return container->customStyle() ? QVariant(QBrush(container->customStyle()->listStyle().backgroundColor())) : QVariant();
431 // << parentObject->nodeType() << "[" << greatparentContainer->childPosition( parentFeature ) << "](" << parentObject << ")";
437 // GeoDataPlacemark *greatparentPlacemark = static_cast<GeoDataPlacemark*>( greatParentObject );
527 } else if (parentfolder->style()->listStyle().listItemType() == GeoDataListStyle::CheckHideChildren) {
550 } else if (folder->style()->listStyle().listItemType() == GeoDataListStyle::CheckHideChildren) {
572 if (geodata_cast<GeoDataWait>(object) || geodata_cast<GeoDataFlyTo>(object) || geodata_cast<GeoDataPlaylist>(object)) {
591 Q_ASSERT(geodata_cast<GeoDataFolder>(object) || geodata_cast<GeoDataDocument>(object) || geodata_cast<GeoDataPlacemark>(object)
592 || geodata_cast<GeoDataTour>(object) || (geodata_cast<GeoDataPlaylist>(object) && geodata_cast<GeoDataTour>(object->parent()))
595 || (geodata_cast<GeoDataLineString>(object) && geodata_cast<GeoDataMultiGeometry>(object->parent()))
596 || (geodata_cast<GeoDataLinearRing>(object) && geodata_cast<GeoDataMultiGeometry>(object->parent()))
598 || (geodata_cast<GeoDataPolygon>(object) && geodata_cast<GeoDataMultiGeometry>(object->parent())) || geodata_cast<GeoDataMultiGeometry>(object));
602 const GeoDataObject *itup = object; // Iterator to reach the top of the GeoDataDocument (bottom-up)
612 itdown = index(d->m_rootDocument->childPosition(static_cast<const GeoDataFeature *>(ancestors.last())), 0, QModelIndex()); // Iterator to go top down
619 itdown = index(container->childPosition(static_cast<const GeoDataFeature *>(ancestors.last())), 0, itdown);
632 itdown = index(multiGeometry->childPosition(static_cast<const GeoDataGeometry *>(ancestors.last())), 0, itdown);
677 qWarning() << "GeoDataTreeModel::addFeature (parent " << parent << " - feature" << feature << ") : parent not found on the TreeModel";
679 qWarning() << "Null pointer in call to GeoDataTreeModel::addFeature (parent " << parent << " - feature" << feature << ")";
762int GeoDataTreeModel::addTourPrimitive(const QModelIndex &parent, GeoDataTourPrimitive *primitive, int row)
780 if (auto playlist = (parent.isValid() ? geodata_cast<GeoDataPlaylist>(parentObject) : nullptr)) {
794 if (auto playlist = (parent.isValid() ? geodata_cast<GeoDataPlaylist>(parentObject) : nullptr)) {
int childPosition(const GeoDataFeature *child) const
returns the position of an item in the list
Definition GeoDataContainer.cpp:175
A container for Features, Styles and in the future Schemas.
Definition GeoDataDocument.h:48
const GeoDataObject * parent() const
Provides the parent of the object in GeoDataContainers.
Definition GeoDataObject.cpp:61
The representation of GeoData in a model This class represents all available data given by kml-data f...
Definition GeoDataTreeModel.h:28
GeoDataTreeModel(QObject *parent=nullptr)
Creates a new GeoDataTreeModel.
Definition GeoDataTreeModel.cpp:81
void removed(GeoDataObject *object)
insert and remove row don't trigger any signal that proxies forward this signal will refresh geometry...
void setRootDocument(GeoDataDocument *document)
Sets the root document to use.
Definition GeoDataTreeModel.cpp:745
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Return the number of Items in the Model.
Definition GeoDataTreeModel.cpp:92
virtual const char * nodeType() const =0
Provides type information for downcasting a GeoNode.
Q_SCRIPTABLE QString camera()
Binds a QML item to a specific geodetic location in screen coordinates.
Definition AbstractDataPlugin.cpp:23
T * geodata_cast(GeoDataObject *node)
Returns the given node cast to type T if the node was instantiated as type T; otherwise returns 0.
Definition GeoDataObject.h:103
void beginInsertRows(const QModelIndex &parent, int first, int last)
bool beginMoveRows(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationChild)
void beginRemoveRows(const QModelIndex &parent, int first, int last)
void beginResetModel()
QModelIndex createIndex(int row, int column, const void *ptr) const const
void endInsertRows()
void endMoveRows()
void endRemoveRows()
void endResetModel()
bool hasIndex(int row, int column, const QModelIndex &parent) const const
virtual QHash< int, QByteArray > roleNames() const const
ConstIterator
Iterator
void append(QList< T > &&value)
iterator begin()
const_iterator constBegin() const const
const_iterator constEnd() const const
iterator end()
bool isEmpty() const const
T & last()
void removeLast()
qsizetype size() const const
int column() const const
void * internalPointer() const const
bool isValid() const const
Q_EMITQ_EMIT
QObject * parent() const const
QString tr(const char *sourceText, const char *disambiguation, int n)
QString fromLatin1(QByteArrayView str)
KeepAspectRatio
Checked
DisplayRole
typedef ItemFlags
Orientation
SmoothTransformation
QVariant fromValue(T &&value)
bool toBool() const const
QString toString() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:37:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:37:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.