| cec3b5da |
Poul Sander |
2026-02-19 19:17 |
1 |
#pragma once |
| cec3b5da |
Poul Sander |
2026-02-19 19:17 |
2 |
|
| ac476ca8 |
Poul Sander |
2026-05-18 16:47 |
3 |
#include "thumbnailcache.h" |
| ac476ca8 |
Poul Sander |
2026-05-18 16:47 |
4 |
|
| cec3b5da |
Poul Sander |
2026-02-19 19:17 |
5 |
#include <QRunnable> |
| cec3b5da |
Poul Sander |
2026-02-19 19:17 |
6 |
#include <QObject> |
| 6fcd6c90 |
Poul Sander |
2026-02-19 21:12 |
7 |
#include <QImage> |
| 6fcd6c90 |
Poul Sander |
2026-02-19 21:12 |
8 |
#include <atomic> |
| cec3b5da |
Poul Sander |
2026-02-19 19:17 |
9 |
|
| cec3b5da |
Poul Sander |
2026-02-19 19:17 |
10 |
class ThumbnailWorker : public QObject, public QRunnable |
| cec3b5da |
Poul Sander |
2026-02-19 19:17 |
11 |
{ |
| cec3b5da |
Poul Sander |
2026-02-19 19:17 |
12 |
Q_OBJECT |
| cec3b5da |
Poul Sander |
2026-02-19 19:17 |
13 |
|
| cec3b5da |
Poul Sander |
2026-02-19 19:17 |
14 |
public: |
| 6fcd6c90 |
Poul Sander |
2026-02-19 21:12 |
15 |
ThumbnailWorker(const QString &path, |
| 6fcd6c90 |
Poul Sander |
2026-02-19 21:12 |
16 |
int row, |
| ac476ca8 |
Poul Sander |
2026-05-18 16:47 |
17 |
ThumbnailCache::Size size, |
| 6fcd6c90 |
Poul Sander |
2026-02-19 21:12 |
18 |
std::atomic_bool *cancelFlag); |
| cec3b5da |
Poul Sander |
2026-02-19 19:17 |
19 |
|
| cec3b5da |
Poul Sander |
2026-02-19 19:17 |
20 |
void run() override; |
| cec3b5da |
Poul Sander |
2026-02-19 19:17 |
21 |
|
| cec3b5da |
Poul Sander |
2026-02-19 19:17 |
22 |
signals: |
| 6fcd6c90 |
Poul Sander |
2026-02-19 21:12 |
23 |
void finished(int row, const QImage &image); |
| cec3b5da |
Poul Sander |
2026-02-19 19:17 |
24 |
|
| cec3b5da |
Poul Sander |
2026-02-19 19:17 |
25 |
private: |
| cec3b5da |
Poul Sander |
2026-02-19 19:17 |
26 |
QString m_path; |
| cec3b5da |
Poul Sander |
2026-02-19 19:17 |
27 |
int m_row; |
| ac476ca8 |
Poul Sander |
2026-05-18 16:47 |
28 |
ThumbnailCache::Size m_size; |
| 6fcd6c90 |
Poul Sander |
2026-02-19 21:12 |
29 |
std::atomic_bool *m_cancelFlag; |
| cec3b5da |
Poul Sander |
2026-02-19 19:17 |
30 |
}; |
|
|
1970-01-01 00:00 |
31 |
|