9#include <QtQml/QQmlInfo>
10#include <QtLocation/QGeoServiceProvider>
11#include <QtLocation/QPlaceManager>
12#include <QtLocation/QPlaceContentRequest>
13#include <QtLocation/QPlaceUser>
183 if (m_place !=
place) {
186 int initialCount = m_contentCount;
192 if (initialCount != -1)
223 return m_contentCount;
244 m_nextRequest.
clear();
254 int initialCount = m_contentCount;
259 if (content.
type() != m_type)
297 if (!
index.isValid())
304 if (content.
type() != m_type)
390 if (m_contentCount == -1)
416 if (!serviceProvider)
425 request.setContentType(m_type);
457void QDeclarativePlaceContentModel::fetchFinished()
465 m_nextRequest =
reply->nextPageRequest();
467 if (m_contentCount !=
reply->totalCount()) {
468 m_contentCount =
reply->totalCount();
472 if (!
reply->content().isEmpty()) {
489 int currentIndex = *
it;
490 if (startIndex == -1)
491 startIndex = currentIndex;
493 auto next = std::next(
it);
496 for (
int i = startIndex;
i <= currentIndex; ++
i) {
518 int currentIndex = *
it;
519 if (startIndex == -1)
520 startIndex = currentIndex;
522 auto next = std::next(
it);
524 for (
int i = startIndex;
i <= currentIndex; ++
i) {
void endResetModel()
Completes a model reset operation.
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QList< int > &roles=QList< int >())
This signal is emitted whenever the data in an existing item changes.
virtual QHash< int, QByteArray > roleNames() const
void endInsertRows()
Ends a row insertion operation.
void beginResetModel()
Begins a model reset operation.
void beginInsertRows(const QModelIndex &parent, int first, int last)
Begins a row insertion operation.
QObject * parent() const
Returns a pointer to the parent object.
int rowCount(const QModelIndex &parent) const override
void classBegin() override
QHash< int, QByteArray > roleNames() const override
void setBatchSize(int batchSize)
~QDeclarativePlaceContentModel()
void setPlace(QDeclarativePlace *place)
QDeclarativePlace * place
QMap< QString, QPlaceSupplier > m_suppliers
void initializeCollection(int totalCount, const QPlaceContent::Collection &collection)
QPlaceContent::Collection m_content
QVariant data(const QModelIndex &index, int role) const override
void componentComplete() override
bool canFetchMore(const QModelIndex &parent) const override
QMap< QString, QPlaceUser > m_users
void fetchMore(const QModelIndex &parent) override
QDeclarativePlaceContentModel(QPlaceContent::Type type, QObject *parent=nullptr)
\qmltype EditorialModel \inqmlmodule QtLocation
QDeclarativeGeoServiceProvider * plugin
QPlaceManager * placeManager() const
Returns the QPlaceManager made available by the service provider.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
bool isEmpty() const noexcept
const_iterator cend() const noexcept
void append(parameter_type t)
const_iterator cbegin() const noexcept
iterator insert(const Key &key, const T &value)
T value(const Key &key, const T &defaultValue=T()) const
bool contains(const Key &key) const
size_type count(const Key &key) const
const_iterator cend() const
const_iterator cbegin() const
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
void deleteLater()
\threadsafe
void clear()
Clears the content request.
QVariant value(DataTag tag) const
Returns the value stored for the data tag, or an invalid QVariant if there is no data for that tag.
Type
Defines the type of content.
QPlaceContent::Type type() const
Returns the content type.
QPlaceContentReply * getPlaceContent(const QPlaceContentRequest &request) const
Retrieves content for a place according to the parameters specified in request.
void finished()
This signal is emitted when this reply has finished processing.
virtual void abort()
Cancels the operation immediately.
QString supplierId
\qmlproperty string Supplier::supplierId
QML_STRUCTURED_VALUEQString userId
\qmlproperty string QtLocation::user::userId
QString placeId() const
Returns the identifier of the place.
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
QSet< QString >::iterator it
Combined button and popup list for selecting options.
QNetworkRequest request(url)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent