Changeset View
Changeset View
Standalone View
Standalone View
wallpapers/image/backgroundlistmodel.h
Show All 17 Lines | |||||
18 | ***************************************************************************/ | 18 | ***************************************************************************/ | ||
19 | 19 | | |||
20 | #ifndef BACKGROUNDLISTMODEL_H | 20 | #ifndef BACKGROUNDLISTMODEL_H | ||
21 | #define BACKGROUNDLISTMODEL_H | 21 | #define BACKGROUNDLISTMODEL_H | ||
22 | 22 | | |||
23 | #include "image.h" | 23 | #include "image.h" | ||
24 | 24 | | |||
25 | #include <QAbstractListModel> | 25 | #include <QAbstractListModel> | ||
26 | #include <QCache> | ||||
26 | #include <QPixmap> | 27 | #include <QPixmap> | ||
27 | #include <QRunnable> | 28 | #include <QRunnable> | ||
28 | #include <QThread> | 29 | #include <QThread> | ||
29 | #include <QMutex> | 30 | #include <QMutex> | ||
30 | #include <QSet> | 31 | #include <QSet> | ||
31 | 32 | | |||
32 | #include <KDirWatch> | 33 | #include <KDirWatch> | ||
33 | #include <KFileItem> | 34 | #include <KFileItem> | ||
34 | 35 | | |||
35 | #include <kimagecache.h> | | |||
36 | | ||||
37 | #include <KPackage/PackageStructure> | 36 | #include <KPackage/PackageStructure> | ||
38 | 37 | | |||
39 | class QEventLoop; | 38 | class QEventLoop; | ||
40 | class KProgressDialog; | 39 | class KProgressDialog; | ||
41 | 40 | | |||
42 | class Image; | 41 | class Image; | ||
43 | 42 | | |||
44 | class ImageSizeFinder : public QObject, public QRunnable | 43 | class ImageSizeFinder : public QObject, public QRunnable | ||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | 108 | private: | |||
110 | QSize bestSize(const KPackage::Package &package) const; | 109 | QSize bestSize(const KPackage::Package &package) const; | ||
111 | 110 | | |||
112 | QPointer<Image> m_wallpaper; | 111 | QPointer<Image> m_wallpaper; | ||
113 | QList<KPackage::Package> m_packages; | 112 | QList<KPackage::Package> m_packages; | ||
114 | QSet<QString> m_removableWallpapers; | 113 | QSet<QString> m_removableWallpapers; | ||
115 | QHash<QString, QSize> m_sizeCache; | 114 | QHash<QString, QSize> m_sizeCache; | ||
116 | QHash<QUrl, QPersistentModelIndex> m_previewJobs; | 115 | QHash<QUrl, QPersistentModelIndex> m_previewJobs; | ||
117 | KDirWatch m_dirwatch; | 116 | KDirWatch m_dirwatch; | ||
118 | KImageCache* m_imageCache; | 117 | QCache<QString, QPixmap> m_imageCache; | ||
119 | 118 | | |||
120 | QString m_findToken; | 119 | QString m_findToken; | ||
121 | int m_screenshotSize; | 120 | int m_screenshotSize; | ||
122 | QHash<QString, int> m_pendingDeletion; | 121 | QHash<QString, int> m_pendingDeletion; | ||
123 | }; | 122 | }; | ||
124 | 123 | | |||
125 | class BackgroundFinder : public QThread | 124 | class BackgroundFinder : public QThread | ||
126 | { | 125 | { | ||
Show All 26 Lines |