Changeset View
Changeset View
Standalone View
Standalone View
lib/thumbnailview/thumbnailview.cpp
Show First 20 Lines • Show All 384 Lines • ▼ Show 20 Line(s) | 363 | { | |||
---|---|---|---|---|---|
385 | // Clear adjustedPixes | 385 | // Clear adjustedPixes | ||
386 | ThumbnailForUrl::iterator | 386 | ThumbnailForUrl::iterator | ||
387 | it = d->mThumbnailForUrl.begin(), | 387 | it = d->mThumbnailForUrl.begin(), | ||
388 | end = d->mThumbnailForUrl.end(); | 388 | end = d->mThumbnailForUrl.end(); | ||
389 | for (; it != end; ++it) { | 389 | for (; it != end; ++it) { | ||
390 | it.value().mAdjustedPix = QPixmap(); | 390 | it.value().mAdjustedPix = QPixmap(); | ||
391 | } | 391 | } | ||
392 | 392 | | |||
393 | thumbnailSizeChanged(value); | 393 | emit thumbnailSizeChanged(value); | ||
394 | thumbnailWidthChanged(value.width()); | 394 | emit thumbnailWidthChanged(value.width()); | ||
395 | if (d->mScaleMode != ScaleToFit) { | 395 | if (d->mScaleMode != ScaleToFit) { | ||
396 | scheduleDelayedItemsLayout(); | 396 | scheduleDelayedItemsLayout(); | ||
397 | } | 397 | } | ||
398 | d->scheduleThumbnailGeneration(); | 398 | d->scheduleThumbnailGeneration(); | ||
399 | } | 399 | } | ||
400 | 400 | | |||
401 | void ThumbnailView::setThumbnailWidth(int width) | 401 | void ThumbnailView::setThumbnailWidth(int width) | ||
402 | { | 402 | { | ||
▲ Show 20 Lines • Show All 82 Lines • ▼ Show 20 Line(s) | 460 | { | |||
485 | // is generated | 485 | // is generated | ||
486 | d->mScheduledThumbnailGenerationTimer.start(); | 486 | d->mScheduledThumbnailGenerationTimer.start(); | ||
487 | } | 487 | } | ||
488 | 488 | | |||
489 | void ThumbnailView::rowsInserted(const QModelIndex& parent, int start, int end) | 489 | void ThumbnailView::rowsInserted(const QModelIndex& parent, int start, int end) | ||
490 | { | 490 | { | ||
491 | QListView::rowsInserted(parent, start, end); | 491 | QListView::rowsInserted(parent, start, end); | ||
492 | d->mScheduledThumbnailGenerationTimer.start(); | 492 | d->mScheduledThumbnailGenerationTimer.start(); | ||
493 | rowsInsertedSignal(parent, start, end); | 493 | emit rowsInsertedSignal(parent, start, end); | ||
494 | } | 494 | } | ||
495 | 495 | | |||
496 | void ThumbnailView::dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector<int> &roles) | 496 | void ThumbnailView::dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector<int> &roles) | ||
497 | { | 497 | { | ||
498 | QListView::dataChanged(topLeft, bottomRight, roles); | 498 | QListView::dataChanged(topLeft, bottomRight, roles); | ||
499 | bool thumbnailsNeedRefresh = false; | 499 | bool thumbnailsNeedRefresh = false; | ||
500 | for (int row = topLeft.row(); row <= bottomRight.row(); ++row) { | 500 | for (int row = topLeft.row(); row <= bottomRight.row(); ++row) { | ||
501 | QModelIndex index = model()->index(row, 0); | 501 | QModelIndex index = model()->index(row, 0); | ||
▲ Show 20 Lines • Show All 472 Lines • Show Last 20 Lines |