Changeset View
Changeset View
Standalone View
Standalone View
krusader/Panel/krpreviewjob.h
Show All 33 Lines | |||||
34 | class KrViewItem; | 34 | class KrViewItem; | ||
35 | class KrPreviews; | 35 | class KrPreviews; | ||
36 | 36 | | |||
37 | class KrPreviewJob : public KJob | 37 | class KrPreviewJob : public KJob | ||
38 | { | 38 | { | ||
39 | friend class KrPreviews; | 39 | friend class KrPreviews; | ||
40 | Q_OBJECT | 40 | Q_OBJECT | ||
41 | public: | 41 | public: | ||
42 | void start() Q_DECL_OVERRIDE {} | 42 | void start() override {} | ||
43 | 43 | | |||
44 | protected slots: | 44 | protected slots: | ||
45 | void slotStartJob(); | 45 | void slotStartJob(); | ||
46 | void slotJobResult(KJob *job); | 46 | void slotJobResult(KJob *job); | ||
47 | void slotGotPreview(const KFileItem & item, const QPixmap & preview); | 47 | void slotGotPreview(const KFileItem & item, const QPixmap & preview); | ||
48 | void slotFailed(const KFileItem & item); | 48 | void slotFailed(const KFileItem & item); | ||
49 | 49 | | |||
50 | protected: | 50 | protected: | ||
51 | QList<KrViewItem*> _scheduled; | 51 | QList<KrViewItem*> _scheduled; | ||
52 | QHash<const KFileItem, KrViewItem*> _hash; | 52 | QHash<const KFileItem, KrViewItem*> _hash; | ||
53 | KIO::PreviewJob *_job; | 53 | KIO::PreviewJob *_job; | ||
54 | QTimer _timer; | 54 | QTimer _timer; | ||
55 | KrPreviews *_parent; | 55 | KrPreviews *_parent; | ||
56 | 56 | | |||
57 | explicit KrPreviewJob(KrPreviews *parent); | 57 | explicit KrPreviewJob(KrPreviews *parent); | ||
58 | ~KrPreviewJob() override; | 58 | ~KrPreviewJob() override; | ||
59 | void scheduleItem(KrViewItem *item); | 59 | void scheduleItem(KrViewItem *item); | ||
60 | void removeItem(KrViewItem *item); | 60 | void removeItem(KrViewItem *item); | ||
61 | 61 | | |||
62 | void sort(); | 62 | void sort(); | ||
63 | bool doKill() Q_DECL_OVERRIDE; | 63 | bool doKill() override; | ||
64 | }; | 64 | }; | ||
65 | 65 | | |||
66 | #endif // __krpreviewjob__ | 66 | #endif // __krpreviewjob__ |