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