#include <KisLayerThumbnailCache.h>
Definition at line 18 of file KisLayerThumbnailCache.h.
◆ KisLayerThumbnailCache()
| KisLayerThumbnailCache::KisLayerThumbnailCache |
( |
| ) |
|
◆ ~KisLayerThumbnailCache()
| KisLayerThumbnailCache::~KisLayerThumbnailCache |
( |
| ) |
|
|
default |
◆ clear()
| void KisLayerThumbnailCache::clear |
( |
| ) |
|
◆ maxSize()
| int KisLayerThumbnailCache::maxSize |
( |
| ) |
const |
◆ notifyNodeAdded()
Definition at line 196 of file KisLayerThumbnailCache.cpp.
197{
198 Q_UNUSED(node);
199 m_d->cleanupDeletedNodes();
200
201 if (
m_d->image &&
m_d->taskGuard.isValid()) {
202 m_d->taskGuard.trigger();
203 }
204}
References m_d.
◆ notifyNodeRemoved()
◆ setIdleTaskManager()
◆ setIdleTaskManagerImpl()
◆ setImage() [1/2]
◆ setImage() [2/2]
◆ setMaxSize()
| void KisLayerThumbnailCache::setMaxSize |
( |
int | maxSize | ) |
|
◆ sigLayerThumbnailUpdated
| void KisLayerThumbnailCache::sigLayerThumbnailUpdated |
( |
KisNodeSP | node | ) |
|
|
signal |
◆ slotThumbnailGenerated
| void KisLayerThumbnailCache::slotThumbnailGenerated |
( |
KisNodeSP | node, |
|
|
int | seqNo, |
|
|
int | maxSize, |
|
|
const QImage & | thumb ) |
|
privateslot |
◆ startThumbnailsUpdate()
| void KisLayerThumbnailCache::startThumbnailsUpdate |
( |
| ) |
|
◆ thumbnail()
| QImage KisLayerThumbnailCache::thumbnail |
( |
KisNodeSP | node | ) |
const |
Definition at line 160 of file KisLayerThumbnailCache.cpp.
161{
162 QImage image;
163
164 auto it =
m_d->cache.find(node);
165 if (it !=
m_d->cache.end()) {
166 image = it->image;
167
168 if (it->maxSize >
m_d->maxSize) {
169 image = image.scaled(
m_d->maxSize,
m_d->maxSize, Qt::KeepAspectRatio);
170 }
171 } else {
172 image = QImage(1, 1, QImage::Format_ARGB32);
173 image.fill(0);
174 }
175
176 return image;
177}
References m_d.
◆ m_d
| QScopedPointer<Private> KisLayerThumbnailCache::m_d |
|
private |
The documentation for this class was generated from the following files: