Debian Codegraph @

plugins/dockers/widegamutcolorselector/WGCommonColorSet.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 WGCOMMONCOLORSET_H
8 #define WGCOMMONCOLORSET_H
9
10 #include <KisUniqueColorSet.h>
11 #include <kis_image.h>
12
13 #include <QTimer>
14 #include <QVector>
15
16 class WGCommonColorSet: public KisUniqueColorSet
17 {
18 Q_OBJECT
19 public:
20 explicit WGCommonColorSet(QObject *parent = 0);
21 void setImage(KisImageSP image);
22 void setAutoUpdate(bool enabled);
23 void setColorCount(int count) { m_numColors = count; }
24 public Q_SLOTS:
25 void slotUpdateColors();
26 private Q_SLOTS:
27 void slotCalculationDone();
28 Q_SIGNALS:
29 void sigIdle(bool isIdle);
30 private:
31 QTimer m_updateTimer;
32 QSharedPointer<QVector<KoColor>> m_commonColors;
33 KisImageSP m_image;
34 int m_numColors {10};
35 bool m_idle {true};
36 bool m_autoUpdate {false};
37 };
38
39 #endif // WGCOMMONCOLORSET_H