#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 210 of file KisLayerThumbnailCache.cpp.
211{
212 Q_UNUSED(node);
213 m_d->cleanupDeletedNodes();
214
215 if (
m_d->image &&
m_d->taskGuard.isValid()) {
216 m_d->taskGuard.trigger();
217 }
218}
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 174 of file KisLayerThumbnailCache.cpp.
175{
176 QImage image;
177
178 auto it =
m_d->cache.find(node);
179 if (it !=
m_d->cache.end()) {
180 image = it->image;
181
182 if (it->maxSize >
m_d->maxSize) {
183 image = image.scaled(
m_d->maxSize,
m_d->maxSize, Qt::KeepAspectRatio);
184 }
185 } else {
186 image = QImage(1, 1, QImage::Format_ARGB32);
187 image.fill(0);
188 }
189
190 return image;
191}
References m_d.
◆ m_d
| QScopedPointer<Private> KisLayerThumbnailCache::m_d |
|
private |
The documentation for this class was generated from the following files: