Changeset View
Changeset View
Standalone View
Standalone View
libs/pigment/resources/KisSwatch.h
- This file was moved from libs/pigment/resources/KoColorSetEntry.h.
Context not available. | |||||
19 | * Boston, MA 02110-1301, USA. | 19 | * Boston, MA 02110-1301, USA. | ||
---|---|---|---|---|---|
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #ifndef KOCOLORSETENTRY_H | 22 | #ifndef KISSWATCH_H | ||
23 | #define KOCOLORSETENTRY_H | 23 | #define KISSWATCH_H | ||
24 | 24 | | |||
25 | #include "kritapigment_export.h" | 25 | #include "kritapigment_export.h" | ||
26 | #include <QString> | 26 | #include <QString> | ||
27 | #include "KoColor.h" | 27 | #include "KoColor.h" | ||
28 | 28 | | |||
29 | class KRITAPIGMENT_EXPORT KoColorSetEntry | 29 | class KRITAPIGMENT_EXPORT KisSwatch | ||
30 | { | 30 | { | ||
31 | public: | 31 | public: | ||
32 | KoColorSetEntry(); | 32 | KisSwatch(); | ||
33 | KoColorSetEntry(const KoColor &color, const QString &name); | 33 | KisSwatch(const KoColor &color, const QString &name = QString()); | ||
34 | 34 | | |||
35 | public: | 35 | public: | ||
36 | QString name() const { return m_name; } | 36 | QString name() const { return m_name; } | ||
37 | void setName(const QString &name) { m_name = name; } | 37 | void setName(const QString &name); | ||
38 | 38 | | |||
39 | QString id() const { return m_id; } | 39 | QString id() const { return m_id; } | ||
40 | void setId(const QString &id) { m_id = id; } | 40 | void setId(const QString &id); | ||
41 | 41 | | |||
42 | KoColor color() const { return m_color; } | 42 | KoColor color() const { return m_color; } | ||
43 | void setColor(const KoColor &color) { m_color = color; } | 43 | void setColor(const KoColor &color); | ||
44 | 44 | | |||
45 | bool spotColor() const { return m_spotColor; } | 45 | bool spotColor() const { return m_spotColor; } | ||
46 | void setSpotColor(bool spotColor) { m_spotColor = spotColor; } | 46 | void setSpotColor(bool spotColor); | ||
47 | | ||||
48 | bool isValid() const { return m_valid; } | ||||
47 | 49 | | |||
48 | public: | 50 | public: | ||
49 | bool operator==(const KoColorSetEntry& rhs) const { | 51 | bool operator==(const KisSwatch& rhs) const { | ||
50 | return m_color == rhs.m_color && m_name == rhs.m_name; | 52 | return m_color == rhs.m_color && m_name == rhs.m_name; | ||
51 | } | 53 | } | ||
52 | 54 | | |||
55 | KisSwatch &operator =(const KisSwatch &source); | ||||
56 | | ||||
53 | private: | 57 | private: | ||
54 | KoColor m_color; | 58 | KoColor m_color; | ||
55 | QString m_name; | 59 | QString m_name; | ||
56 | QString m_id; | 60 | QString m_id; | ||
57 | bool m_spotColor; | 61 | bool m_spotColor; | ||
62 | bool m_valid; | ||||
58 | }; | 63 | }; | ||
59 | 64 | | |||
60 | #endif // KOCOLORSETENTRY_H | 65 | #endif // KISSWATCH_H | ||
Context not available. |