KNewStuff
quickitemsmodel.cpp
43 q->connect(engine, &Engine::signalEntriesLoaded, model, [this](const KNSCore::Entry::List &entries) {
46 q->connect(engine, &Engine::entryEvent, model, [this](const KNSCore::Entry &entry, KNSCore::Entry::EntryEvent event) {
47 if (event == KNSCore::Entry::DetailsLoadedEvent && engine->filter() != KNSCore::Provider::Installed
54 q->connect(engine, &Engine::entryEvent, q, [this](const KNSCore::Entry &entry, KNSCore::Entry::EntryEvent event) {
60 q->connect(engine, &Engine::entryPreviewLoaded, model, &KNSCore::ItemsModel::slotEntryPreviewLoaded);
65 q->connect(model, &KNSCore::ItemsModel::modelAboutToBeReset, q, &ItemsModel::modelAboutToBeReset);
77 if (engine->filter() == KNSCore::Provider::Updates && entry.status() != KNSCore::Entry::Updateable && entry.status() != KNSCore::Entry::Updating) {
79 } else if (engine->filter() == KNSCore::Provider::Installed && entry.status() == KNSCore::Entry::Deleted) {
151 KNSCore::Entry entry = d->model->data(d->model->index(index.row()), Qt::UserRole).value<KNSCore::Entry>();
235 const QList<KNSCore::Entry::DownloadLinkInformation> dllinks = entry.downloadLinkInformationList();
319 KNSCore::Entry testEntry = d->model->data(d->model->index(i), Qt::UserRole).value<KNSCore::Entry>();
One downloadable item as contained within one content item.
Definition downloadlinkinfo.h:23
void entryEvent(const KNSCore::Entry &entry, KNSCore::Entry::EntryEvent event)
This is fired for events related directly to a single Entry instance The intermediate states Updating...
Q_INVOKABLE int indexOfEntryId(const QString &providerId, const QString &entryId)
Get the index of an entry based on that entry's unique ID.
Definition quickitemsmodel.cpp:314
@ PreviewsRole
< this will return a list here, rather than be tied so tightly to the remote api
Definition quickitemsmodel.h:82
@ InstalledFilesRole
< this will return a list here, rather than be tied so tightly to the remote api
Definition quickitemsmodel.h:83
Q_SIGNAL void entryChanged(const KNSCore::Entry &entry)
Fired when an entry's data changes.
A model which takes care of the comments for a single Entry.
Definition core/commentsmodel.h:46
QList< DownloadLinkInformation > downloadLinkInformationList() const
A list of downloadable data for this entry.
Definition entry.cpp:354
@ StatusChangedEvent
Used when an event's status is set (use Entry::status() to get the new status)
Definition entry.h:122
@ DetailsLoadedEvent
Used when more details have been added to an existing entry (such as the full description),...
Definition entry.h:124
QString updateVersion() const
Retrieve the version string of the object that is available as update.
Definition entry.cpp:206
QString knowledgebaseLink() const
The link for the knowledgebase for this entry.
Definition entry.cpp:295
QDate updateReleaseDate() const
Retrieve the date of the newer version that is available as update.
Definition entry.cpp:196
QString previewUrl(PreviewType type=PreviewSmall1) const
Retrieve the file name of an image containing a preview of the object.
Definition entry.cpp:216
int numberKnowledgebaseEntries() const
The number of entries in the knowledgebase for this entry.
Definition entry.cpp:286
Source
Source of the entry, A entry's data is coming from either cache, or an online provider this helps the...
Definition entry.h:94
int numberFans() const
How many people have marked themselves as fans of this entry.
Definition entry.cpp:266
KIOCORE_EXPORT QStringList list(const QString &fileClass)
void beginResetModel()
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QList< int > &roles)
void endResetModel()
void modelAboutToBeReset()
void modelReset()
void rowsInserted(const QModelIndex &parent, int first, int last)
void rowsRemoved(const QModelIndex &parent, int first, int last)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
void append(QList< T > &&value)
bool isEmpty() const const
T & last()
value_type takeLast()
bool isValid() const const
int row() const const
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QObject * parent() const const
bool isEmpty() const const
DisplayRole
QVariant fromValue(T &&value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:07:37 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:07:37 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.