Changeset View
Changeset View
Standalone View
Standalone View
libs/libkis/Palette.h
Context not available. | |||||
20 | #define LIBKIS_PALETTE_H | 20 | #define LIBKIS_PALETTE_H | ||
---|---|---|---|---|---|
21 | 21 | | |||
22 | #include <QObject> | 22 | #include <QObject> | ||
23 | #include <QList> | ||||
24 | | ||||
23 | #include "kritalibkis_export.h" | 25 | #include "kritalibkis_export.h" | ||
24 | #include "libkis.h" | 26 | #include "libkis.h" | ||
25 | #include "Resource.h" | 27 | #include "Resource.h" | ||
Context not available. | |||||
88 | * @brief groupNames | 90 | * @brief groupNames | ||
89 | * @return the list of group names. This is list is in the order these groups are in the file. | 91 | * @return the list of group names. This is list is in the order these groups are in the file. | ||
90 | */ | 92 | */ | ||
91 | QStringList groupNames(); | 93 | QStringList groupNames() const; | ||
92 | /** | 94 | /** | ||
93 | * @brief addGroup | 95 | * @brief addGroup | ||
94 | * @param name of the new group | 96 | * @param name of the new group | ||
Context not available. | |||||
108 | * @return the total amount of entries in the whole group | 110 | * @return the total amount of entries in the whole group | ||
109 | */ | 111 | */ | ||
110 | int colorsCountTotal(); | 112 | int colorsCountTotal(); | ||
111 | /** | | |||
112 | * @brief colorsCountGroup | | |||
113 | * @param name of the group to check. Empty is the default group. | | |||
114 | * @return the amount of colors within that group. | | |||
115 | */ | | |||
116 | int colorsCountGroup(QString name); | | |||
117 | 113 | | |||
118 | /** | 114 | /** | ||
119 | * @brief colorSetEntryByIndex | 115 | * @brief colorSetEntryByIndex | ||
Context not available. | |||||
121 | * @param index the global index | 117 | * @param index the global index | ||
122 | * @return the colorset entry | 118 | * @return the colorset entry | ||
123 | */ | 119 | */ | ||
124 | KoColorSetEntry colorSetEntryByIndex(int index); | 120 | KisSwatch colorSetEntryByIndex(int index); | ||
125 | /** | 121 | /** | ||
126 | * @brief colorSetEntryFromGroup | 122 | * @brief colorSetEntryFromGroup | ||
127 | * @param index index in the group. | 123 | * @param index index in the group. | ||
128 | * @param groupName the name of the group to get the color from. | 124 | * @param groupName the name of the group to get the color from. | ||
129 | * @return the colorsetentry. | 125 | * @return the colorsetentry. | ||
130 | */ | 126 | */ | ||
131 | KoColorSetEntry colorSetEntryFromGroup(int index, const QString &groupName); | 127 | KisSwatch colorSetEntryFromGroup(int index, const QString &groupName); | ||
132 | 128 | | |||
133 | /** | 129 | /** | ||
134 | * @brief colorForEntry | 130 | * @brief colorForEntry | ||
Context not available. | |||||
136 | * @param entry the entry | 132 | * @param entry the entry | ||
137 | * @return the ManagedColorObject | 133 | * @return the ManagedColorObject | ||
138 | */ | 134 | */ | ||
139 | ManagedColor *colorForEntry(KoColorSetEntry entry); | 135 | ManagedColor *colorForEntry(KisSwatch entry); | ||
140 | /** | 136 | /** | ||
141 | * @brief addEntry | 137 | * @brief addEntry | ||
142 | * add an entry to a group. Gets appended to the end. | 138 | * add an entry to a group. Gets appended to the end. | ||
143 | * @param entry the entry | 139 | * @param entry the entry | ||
144 | * @param groupName the name of the group to add to. | 140 | * @param groupName the name of the group to add to. | ||
145 | */ | 141 | */ | ||
146 | void addEntry(KoColorSetEntry entry, QString groupName = QString()); | 142 | void addEntry(KisSwatch entry, QString groupName = QString()); | ||
147 | /** | 143 | /** | ||
148 | * @brief removeEntry | 144 | * @brief removeEntry | ||
149 | * remove the entry at @param index from the group @param groupName. | 145 | * remove the entry at @param index from the group @param groupName. | ||
150 | */ | 146 | */ | ||
151 | void removeEntry(int index, const QString &groupName); | 147 | void removeEntry(int index, const QString &groupName); | ||
152 | /** | 148 | | ||
153 | * @brief insertEntry | | |||
154 | * like addentry, but allows you to pick the index to insertBefore. | | |||
155 | * @param index | | |||
156 | * @param entry | | |||
157 | * @param groupName | | |||
158 | */ | | |||
159 | void insertEntry(int index, KoColorSetEntry entry, QString groupName = QString()); | | |||
160 | /** | | |||
161 | * @brief editEntry | | |||
162 | * Changes the entry at @param index by replacing it with @param entry. | | |||
163 | * @param groupName the group at which the index is. | | |||
164 | * @return whether it was successful. | | |||
165 | */ | | |||
166 | bool editEntry (int index, KoColorSetEntry entry, QString groupName = QString()); | | |||
167 | /** | 149 | /** | ||
168 | * @brief changeGroupName | 150 | * @brief changeGroupName | ||
169 | * change the group name. | 151 | * change the group name. | ||
Context not available. |