KNewStuff
knewstuff3/ui/itemsmodel.cpp
Go to the documentation of this file.
106 void ItemsModel::slotEntryPreviewLoaded(const EntryInternal& entry, EntryInternal::PreviewType type)
125 // if the preview is really big, first scale fast to a smaller size, then smooth to desired size
127 image = image.scaled(2 * PreviewWidth, 2 * PreviewHeight, Qt::KeepAspectRatio, Qt::FastTransformation);
129 m_previewImages.insert(url, image.scaled(PreviewWidth, PreviewHeight, Qt::KeepAspectRatio, Qt::SmoothTransformation));
void clear()
ItemsModel(Engine *engine, QObject *parent=0)
Definition: knewstuff3/ui/itemsmodel.cpp:30
void removeAt(int i)
bool hasPreviewImages() const
Definition: knewstuff3/ui/itemsmodel.cpp:142
bool isNull() const
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
int indexOf(const T &value, int from) const
void reset()
int count(const T &value) const
void append(const T &value)
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
void endInsertRows()
QImage previewImage(PreviewType type=PreviewSmall1) const
This will not be loaded automatically, instead use Engine to load the actual images.
Definition: entryinternal.cpp:274
void slotEntryChanged(const KNS3::EntryInternal &entry)
Definition: knewstuff3/ui/itemsmodel.cpp:93
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
bool isEmpty() const
void beginRemoveRows(const QModelIndex &parent, int first, int last)
int row() const
QString previewUrl(PreviewType type=PreviewSmall1) const
Retrieve the file name of an image containing a preview of the object.
Definition: entryinternal.cpp:264
void slotEntriesLoaded(KNS3::EntryInternal::List entries)
Definition: knewstuff3/ui/itemsmodel.cpp:55
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: knewstuff3/ui/itemsmodel.cpp:46
QVariant fromValue(const T &value)
void beginInsertRows(const QModelIndex &parent, int first, int last)
int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: knewstuff3/ui/itemsmodel.cpp:41
void slotEntryPreviewLoaded(const KNS3::EntryInternal &entry, KNS3::EntryInternal::PreviewType type)
Definition: knewstuff3/ui/itemsmodel.cpp:106
void addEntry(const EntryInternal &entry)
Definition: knewstuff3/ui/itemsmodel.cpp:62
void removeEntry(const EntryInternal &entry)
Definition: knewstuff3/ui/itemsmodel.cpp:82
void endRemoveRows()
void loadPreview(const KNS3::EntryInternal &entry, EntryInternal::PreviewType type)
Definition: knewstuff3/core/engine.cpp:469
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:25:43 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:25:43 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.