KNewStuff
knewstuff3/ui/itemsmodel.cpp
Go to the documentation of this file.
106void 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 loadPreview(const KNS3::EntryInternal &entry, EntryInternal::PreviewType type)
Definition: knewstuff3/core/engine.cpp:469
QString previewUrl(PreviewType type=PreviewSmall1) const
Retrieve the file name of an image containing a preview of the object.
Definition: entryinternal.cpp:264
QImage previewImage(PreviewType type=PreviewSmall1) const
This will not be loaded automatically, instead use Engine to load the actual images.
Definition: entryinternal.cpp:274
int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: knewstuff3/ui/itemsmodel.cpp:41
void slotEntryChanged(const KNS3::EntryInternal &entry)
Definition: knewstuff3/ui/itemsmodel.cpp:93
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: knewstuff3/ui/itemsmodel.cpp:46
bool hasPreviewImages() const
Definition: knewstuff3/ui/itemsmodel.cpp:142
void removeEntry(const EntryInternal &entry)
Definition: knewstuff3/ui/itemsmodel.cpp:82
void addEntry(const EntryInternal &entry)
Definition: knewstuff3/ui/itemsmodel.cpp:62
void slotEntriesLoaded(KNS3::EntryInternal::List entries)
Definition: knewstuff3/ui/itemsmodel.cpp:55
void slotEntryPreviewLoaded(const KNS3::EntryInternal &entry, KNS3::EntryInternal::PreviewType type)
Definition: knewstuff3/ui/itemsmodel.cpp:106
ItemsModel(Engine *engine, QObject *parent=0)
Definition: knewstuff3/ui/itemsmodel.cpp:30
#define kDebug
Definition: atticaprovider.cpp:36
KGuiItem reset()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.