Marble
PlacemarkLayout.cpp
45 for (QList<Marble::VisiblePlacemark *>::ConstIterator beforeIt = placemarks.constBegin(); beforeIt != beforeItEnd; ++beforeIt) {
61 visualCategories << GeoDataPlacemark::SmallCity << GeoDataPlacemark::SmallCountyCapital << GeoDataPlacemark::SmallStateCapital
62 << GeoDataPlacemark::SmallNationCapital << GeoDataPlacemark::MediumCity << GeoDataPlacemark::MediumCountyCapital
63 << GeoDataPlacemark::MediumStateCapital << GeoDataPlacemark::MediumNationCapital << GeoDataPlacemark::BigCity
64 << GeoDataPlacemark::BigCountyCapital << GeoDataPlacemark::BigStateCapital << GeoDataPlacemark::BigNationCapital
65 << GeoDataPlacemark::LargeCity << GeoDataPlacemark::LargeCountyCapital << GeoDataPlacemark::LargeStateCapital
66 << GeoDataPlacemark::LargeNationCapital << GeoDataPlacemark::Nation << GeoDataPlacemark::Mountain << GeoDataPlacemark::Volcano
67 << GeoDataPlacemark::Mons << GeoDataPlacemark::Valley << GeoDataPlacemark::Continent << GeoDataPlacemark::Ocean
68 << GeoDataPlacemark::OtherTerrain << GeoDataPlacemark::Crater << GeoDataPlacemark::Mare << GeoDataPlacemark::GeographicPole
69 << GeoDataPlacemark::MagneticPole << GeoDataPlacemark::ShipWreck << GeoDataPlacemark::PlaceSuburb << GeoDataPlacemark::PlaceHamlet
99 connect(m_selectionModel, SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(requestStyleReset()));
101 connect(m_placemarkModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(resetCacheData()));
102 connect(m_placemarkModel, SIGNAL(rowsInserted(QModelIndex, int, int)), this, SLOT(addPlacemarks(QModelIndex, int, int)));
103 connect(m_placemarkModel, SIGNAL(rowsAboutToBeRemoved(QModelIndex, int, int)), this, SLOT(removePlacemarks(QModelIndex, int, int)));
202 auto const object = qvariant_cast<GeoDataObject *>(index.data(MarblePlacemarkModel::ObjectPointerRole));
235 static_cast<GeoDataPlacemark *>(qvariant_cast<GeoDataObject *>(index.data(MarblePlacemarkModel::ObjectPointerRole)));
320QList<VisiblePlacemark *> PlacemarkLayout::generateLayout(const ViewportParams *viewport, int tileLevel)
359 static_cast<GeoDataPlacemark *>(qvariant_cast<GeoDataObject *>(index.data(MarblePlacemarkModel::ObjectPointerRole)));
369 if (!viewLatLonAltBox.contains(coordinates) || !viewport->screenCoordinates(coordinates, x, y)) {
389 std::sort(placemarkList.begin(), placemarkList.end(), GeoDataPlacemark::placemarkLayoutOrderCompare);
405 if (!viewLatLonAltBox.contains(coordinates) || !viewport->screenCoordinates(coordinates, x, y)) {
416 if (!m_showCities && visualCategory >= GeoDataPlacemark::SmallCity && visualCategory <= GeoDataPlacemark::Nation)
420 if (!m_showTerrain && visualCategory >= GeoDataPlacemark::Mountain && visualCategory <= GeoDataPlacemark::OtherTerrain)
424 if (!m_showOtherPlaces && visualCategory >= GeoDataPlacemark::GeographicPole && visualCategory <= GeoDataPlacemark::Observatory)
428 if (!m_showLandingSites && visualCategory >= GeoDataPlacemark::MannedLandingSite && visualCategory <= GeoDataPlacemark::UnmannedHardLandingSite)
439 if (!m_showPlaces && visualCategory >= GeoDataPlacemark::GeographicPole && visualCategory <= GeoDataPlacemark::Observatory)
448 static_cast<GeoDataPlacemark *>(qvariant_cast<GeoDataObject *>(index.data(MarblePlacemarkModel::ObjectPointerRole)));
499 if (m_lastPlacemarkAvailable && (m_lastPlacemarkLabelRect.contains(pos) || m_lastPlacemarkSymbolRect.contains(pos))) {
515bool PlacemarkLayout::layoutPlacemark(const GeoDataPlacemark *placemark, const GeoDataCoordinates &coordinates, qreal x, qreal y, bool selected)
575GeoDataCoordinates PlacemarkLayout::placemarkIconCoordinates(const GeoDataPlacemark *placemark) const
602 textWidth = (QFontMetrics(labelFont).horizontalAdvance(labelText) + qRound(2 * s_labelOutlineWidth));
615 const qreal xPos = (i / 2 == 0) ? x + symbolWidth / 2 + 1 : x - symbolWidth / 2 - 1 - textWidth;
This file contains the headers for ViewportParams.
bool isGloballyVisible() const
Return whether this feature is visible or not in the context of its parenting.
Definition GeoDataFeature.cpp:350
a class representing a point of interest on the map
Definition GeoDataPlacemark.h:47
GeoDataVisualCategory
A categorization of a placemark as defined by ...FIXME.
Definition GeoDataPlacemark.h:86
GeoDataVisualCategory visualCategory() const
Return the symbol index of the placemark.
Definition GeoDataPlacemark.cpp:125
OsmPlacemarkData & osmData()
Quick, safe accessor to the placemark's OsmPlacemarkData stored within it's ExtendedData.
Definition GeoDataPlacemark.cpp:161
QList< const GeoDataFeature * > whichPlacemarkAt(const QPoint &pos)
Returns a list of model indexes that are at position pos.
Definition PlacemarkLayout.cpp:171
PlacemarkLayout(QAbstractItemModel *placemarkModel, QItemSelectionModel *selectionModel, MarbleClock *clock, const StyleBuilder *styleBuilder, QObject *parent=nullptr)
Creates a new place mark layout.
Definition PlacemarkLayout.cpp:75
QList< VisiblePlacemark * > generateLayout(const ViewportParams *viewport, int tileLevel)
Definition PlacemarkLayout.cpp:320
void addPlacemarks(const QModelIndex &index, int first, int last)
feed an internal QMap of placemarks with TileId as key when model changes
Definition PlacemarkLayout.cpp:195
A public class that controls what is visible in the viewport of a Marble map.
Definition ViewportParams.h:41
bool screenCoordinates(const qreal lon, const qreal lat, qreal &x, qreal &y) const
Get the screen coordinates corresponding to geographical coordinates in the map.
Definition ViewportParams.cpp:375
A class which represents the visible place marks on a map.
Definition VisiblePlacemark.h:36
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
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const=0
virtual int rowCount(const QModelIndex &parent) const const=0
Bold
void setWeight(Weight weight)
int height() const const
int horizontalAdvance(QChar ch) const const
QModelIndexList indexes() const const
const QItemSelection selection() const const
ConstIterator
void append(QList< T > &&value)
iterator begin()
void clear()
const_iterator constBegin() const const
const_iterator constEnd() const const
qsizetype count() const const
iterator end()
QVariant data(int role) const const
bool isValid() const const
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QObject * parent() const const
qreal x() const const
qreal y() const const
void getCoords(int *x1, int *y1, int *x2, int *y2) const const
void setBottom(int y)
void setLeft(int x)
void setRight(int x)
void setTop(int y)
bool contains(const QPointF &point) const const
qreal height() const const
bool intersects(const QRectF &rectangle) const const
bool isEmpty() const const
QRectF united(const QRectF &rectangle) const const
qreal width() const const
void clear()
bool contains(const QSet< T > &other) const const
iterator insert(const T &value)
bool remove(const T &value)
int height() const const
int width() const const
QString arg(Args &&... args) const const
void clear()
bool isEmpty() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:14 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:14 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.