Krita

Swatch.h
1/*
2 * SPDX-License-Identifier: GPL-3.0-or-later
3 */
4
5#ifndef SWATCH_H
6#define SWATCH_H
7
8#include "ManagedColor.h"
9
10#include "kritalibkis_export.h"
11#include "libkis.h"
12
13class KisSwatch;
14
15/**
16 * @brief The Swatch class is a thin wrapper around the KisSwatch class.
17 *
18 * A Swatch is a single color that is part of a palette, that has a name
19 * and an id. A Swatch color can be a spot color.
20 */
21class KRITALIBKIS_EXPORT Swatch
22{
23private:
24 friend class Palette;
25 friend class PaletteView;
26 Swatch(const KisSwatch &kisSwatch);
27public:
28 Swatch();
29 virtual ~Swatch();
30 Swatch(const Swatch &rhs);
31 Swatch &operator=(const Swatch &rhs);
32
33 QString name() const;
34 void setName(const QString &name);
35
36 QString id() const;
37 void setId(const QString &id);
38
39 ManagedColor *color() const;
40 void setColor(ManagedColor *color);
41
42 bool spotColor() const;
43 void setSpotColor(bool spotColor);
44
45 bool isValid() const;
46
47private:
48 friend class Palette;
49 KisSwatch kisSwatch() const;
50
51 struct Private;
52 Private *const d;
53};
54
55#endif // SWATCH_H
The ManagedColor class is a class to handle colors that are color managed.
The PaletteView class is a wrapper around a MVC method for handling palettes.
Definition PaletteView.h:32
The Palette class Palette is a resource object that stores organised color data.
Definition Palette.h:46
The Swatch class is a thin wrapper around the KisSwatch class.
Definition Swatch.h:22
T qobject_cast(QObject *object)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 21 2024 11:58:53 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.