diff options
| author | Peter Penz <[email protected]> | 2011-09-09 20:34:55 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-09-09 20:35:57 +0200 |
| commit | c7272df5c17c804fd379e4bac2758850f03695da (patch) | |
| tree | e613a2ee48df15be046fd365bc7feeaf2021619b /src/kitemviews/kfileitemlistwidget.h | |
| parent | 93cb7e02616df9746f7cdae09434e7488f4e7d28 (diff) | |
Improve cache handling in KItemListWidget
Provide a hook for derived KItemListWidget where the cache
can be updated.
Diffstat (limited to 'src/kitemviews/kfileitemlistwidget.h')
| -rw-r--r-- | src/kitemviews/kfileitemlistwidget.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/kitemviews/kfileitemlistwidget.h b/src/kitemviews/kfileitemlistwidget.h index a16e75a8e..50e746fad 100644 --- a/src/kitemviews/kfileitemlistwidget.h +++ b/src/kitemviews/kfileitemlistwidget.h @@ -53,6 +53,18 @@ public: virtual QRectF expansionToggleRect() const; protected: + /** + * Invalidates the cache which results in calling KFileItemListWidget::refreshCache() as + * soon as the item need to gets repainted. + */ + void invalidateCache(); + + /** + * Is called if the cache got invalidated by KFileItemListWidget::invalidateCache(). + * The default implementation is empty. + */ + virtual void refreshCache(); + void setTextColor(const QColor& color); QColor textColor() const; @@ -80,7 +92,7 @@ private: TextIdCount // Mandatory last entry }; - void updateCache(); + void triggerCacheRefreshing(); void updateExpansionArea(); void updatePixmapCache(); |
