13#include <QScopedPointer>
14#include <QSharedPointer>
79 explicit KoColorSet(
const QString &filename = QString());
101 void setLocked(
bool lock);
102 bool isLocked()
const;
104 void setColumnCount(
int columns);
105 int columnCount()
const;
107 void setComment(QString comment);
112 int rowCount()
const;
114 int rowCountWithTitles()
const;
116 quint32 colorCount()
const;
117 quint32 slotCount()
const;
119 PaletteType paletteType()
const;
120 void setPaletteType(PaletteType paletteType);
131 void addSwatch(
const KisSwatch &swatch,
const QString &groupName = GLOBAL_GROUP_NAME,
int column = -1,
int row = -1);
164 void changeGroupName(
const QString &oldGroupName,
const QString &newGroupName);
181 void moveGroup(
const QString &groupName,
const QString &groupNameInsertBefore = GLOBAL_GROUP_NAME);
190 void removeGroup(
const QString &groupName,
bool keepColors =
true);
206 KisSwatchGroup::SwatchInfo getClosestSwatchInfo(
KoColor compare,
bool useGivenColorSpace =
true)
const;
215 KisSwatch getColorGlobal(quint32 column, quint32 row)
const;
238 bool isGroupTitleRow(
int row)
const;
245 int startRowForGroup(
const QString &groupName)
const;
252 int rowNumberInGroup(
int rowNumber)
const;
264 void canUndoChanged(
bool canUndo);
265 void canRedoChanged(
bool canRedo);
270 void setModified(
bool);
271 void notifySwatchChanged(
const QString& groupName,
int column,
int row);
283 friend class TestKoColorSet;
284 friend class TestKisPaletteModel;
287 const QScopedPointer<Private>
d;
QSharedPointer< KoColorSet > KoColorSetSP
static int DEFAULT_ROW_COUNT
static int DEFAULT_COLUMN_COUNT
static const QString KPL_COLOR_DEPTH_ID_ATTR
static const QString KPL_SWATCH_TAG
KoColorSet & operator=(const KoColorSet &rhs)=delete
static const QString KPL_SWATCH_ROW_ATTR
static const QString KPL_COLOR_MODEL_ID_ATTR
static const QString KPL_SWATCH_COL_ATTR
static const QString KPL_PALETTE_PROFILE_TAG
static const QString KPL_PALETTE_COMMENT_ATTR
static const QString KPL_PALETTE_NAME_ATTR
static const QString KPL_SWATCH_POS_TAG
static const QString KPL_PALETTE_READONLY_ATTR
static const QString KPL_PALETTE_COLUMN_COUNT_ATTR
const QScopedPointer< Private > d
static const QString KPL_GROUP_TAG
static const QString GLOBAL_GROUP_NAME
static const QString KPL_GROUP_NAME_ATTR
static const QString KPL_PALETTE_TAG
static const QString KPL_VERSION_ATTR
static const QString KPL_GROUP_ROW_COUNT_ATTR
static const QString KPL_SWATCH_BITDEPTH_ATTR
static const QString KPL_PALETTE_FILENAME_ATTR
static const QString KPL_SWATCH_SPOT_ATTR
QPair< QString, QString > resourceType() const override
void entryChanged(int column, int row)
static const QString KPL_SWATCH_NAME_ATTR
void layoutAboutToChange()
static const QString KPL_SWATCH_ID_ATTR
bool loadFromDevice(QIODevice *)
virtual KoResourceSP clone() const =0
virtual QString defaultFileExtension() const
virtual bool saveToDevice(QIODevice *dev) const
virtual void updateThumbnail()
updateThumbnail updates the thumbnail for this resource. Reimplement if your thumbnail is something e...