Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/delegateanimationhandler_p.h
| Show All 35 Lines | |||||
| 36 | namespace KIO | 36 | namespace KIO | ||
| 37 | { | 37 | { | ||
| 38 | 38 | | |||
| 39 | class CachedRendering : public QObject | 39 | class CachedRendering : public QObject | ||
| 40 | { | 40 | { | ||
| 41 | Q_OBJECT | 41 | Q_OBJECT | ||
| 42 | public: | 42 | public: | ||
| 43 | 43 | | |||
| 44 | CachedRendering(QStyle::State state, const QSize &size, QModelIndex validityIndex, qreal devicePixelRatio = 1.0); | 44 | CachedRendering(QStyle::State state, const QSize &size, QModelIndex validityIndex, bool columnView, qreal devicePixelRatio = 1.0); | ||
| 45 | bool checkValidity(QStyle::State current) const | 45 | bool checkValidity(QStyle::State currentState, bool currentColumnView) const | ||
| 46 | { | 46 | { | ||
| 47 | return state == current && valid; | 47 | return currentState == state && valid && currentColumnView == columnView; | ||
| 48 | } | 48 | } | ||
| 49 | 49 | | |||
| 50 | QStyle::State state; | 50 | QStyle::State state; | ||
| 51 | QPixmap regular; | 51 | QPixmap regular; | ||
| 52 | QPixmap hover; | 52 | QPixmap hover; | ||
| 53 | bool columnView; | ||||
| 53 | 54 | | |||
| 54 | bool valid; | 55 | bool valid; | ||
| 55 | QPersistentModelIndex validityIndex; | 56 | QPersistentModelIndex validityIndex; | ||
| 56 | private Q_SLOTS: | 57 | private Q_SLOTS: | ||
| 57 | void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight); | 58 | void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight); | ||
| 58 | void modelReset(); | 59 | void modelReset(); | ||
| 59 | }; | 60 | }; | ||
| 60 | 61 | | |||
| ▲ Show 20 Lines • Show All 113 Lines • Show Last 20 Lines | |||||