Krita Source Code Documentation
Loading...
Searching...
No Matches
KisUniqueColorSet.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021 Mathias Wein <lynx.mw+kde@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
7#ifndef KISUNIQUECOLORSET_H
8#define KISUNIQUECOLORSET_H
9
10
11#include "kritapigment_export.h"
12
13#include "KoColor.h"
14
15#include <QObject>
16#include <QScopedPointer>
17
18class KRITAPIGMENT_EXPORT KisUniqueColorSet : public QObject
19{
20 Q_OBJECT
21public:
22 explicit KisUniqueColorSet(QObject *parent = nullptr);
23 ~KisUniqueColorSet() override;
24
25 void addColor(const KoColor &color);
26 KoColor color(int index) const;
27 int size() const;
28
29public Q_SLOTS:
30 void clear();
31Q_SIGNALS:
32 void sigReset();
33 void sigColorAdded(int position);
34 void sigColorMoved(int from, int to);
35 void sigColorRemoved(int position);
36private:
37 struct ColorEntry;
38 struct Private;
39 QScopedPointer<Private> d;
40};
41
42#endif // KISUNIQUECOLORSET_H
void sigColorRemoved(int position)
void sigColorAdded(int position)
QScopedPointer< Private > d
void sigColorMoved(int from, int to)