Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
1.0 KB
Raw Blame
/*
 * SPDX-FileCopyrightText: 2021 Mathias Wein <[email protected]>
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#ifndef KISUNIQUECOLORSET_H
#define KISUNIQUECOLORSET_H


#include "kritapigment_export.h"

#include "KoColor.h"

#include <QObject>
#include <QScopedPointer>

class KRITAPIGMENT_EXPORT KisUniqueColorSet : public QObject
{
    Q_OBJECT
public:
    explicit KisUniqueColorSet(QObject *parent = nullptr);
    ~KisUniqueColorSet() override;

    KisUniqueColorSet(const KisUniqueColorSet &rhs, QObject *parent = nullptr);

    void addColor(const KoColor &color);
    KoColor color(int index) const;
    int size() const;

    QList<KoColor> colorList() const;
    void setColorList(const QList<KoColor> &colors);

public Q_SLOTS:
    void clear();
Q_SIGNALS:
    void sigReset();
    void sigColorAdded(int position);
    void sigColorMoved(int from, int to);
    void sigColorRemoved(int position);
private:
    struct ColorEntry;
    struct Private;
    QScopedPointer<Private> d;
};

#endif // KISUNIQUECOLORSET_H