Debian Codegraph @

plugins/dockers/widegamutcolorselector/WGCommonColorsCalculationRunner.h

raw
1 /*
2 * SPDX-FileCopyrightText: 2021 Mathias Wein <[email protected]>
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
7 #ifndef WGCOMMONCOLORSCALCULATIONRUNNER_H
8 #define WGCOMMONCOLORSCALCULATIONRUNNER_H
9
10 #include <kis_types.h>
11
12 #include <QImage>
13 #include <QObject>
14 #include <QRgb>
15 #include <QRunnable>
16 #include <QSharedPointer>
17
18 class KoColor;
19
20 class WGCommonColorsCalculationRunner : public QObject, public QRunnable
21 {
22 Q_OBJECT
23 public:
24 WGCommonColorsCalculationRunner(KisImageSP image, int numberOfColors,
25 QSharedPointer<QVector<KoColor>> colorStore);
26
27
28 void run() override;
29 void extractColors();
30 QList<QRgb> getColors();
31
32
33 Q_SIGNALS:
34 void sigDone();
35
36 private:
37 QImage m_imageData;
38 int m_numColors;
39 QSharedPointer<QVector<KoColor>> m_commonColors;
40 };
41
42 #endif // WGCOMMONCOLORSCALCULATIONRUNNER_H