18 : QWidget(parent), d(new
Private)
22 d->widget->setPaletteModel(
d->model);
24 QVBoxLayout *layout =
new QVBoxLayout(
this);
25 layout->addWidget(
d->widget);
28 connect(
d->widget, SIGNAL(sigIndexSelected(QModelIndex)),
40 d->model->setColorSet(
palette->colorSet());
41 d->widget->setPaletteModel(
d->model);
46 if (
d->model->colorSet()) {
47 return d->widget->addEntryWithDialog(color->
color());
54 if (
d->model->colorSet()) {
55 return d->widget->addGroupWithDialog();
62 if (
d->model->colorSet()) {
63 return d->widget->removeEntryWithDialog(
d->widget->currentIndex());
70 d->widget->selectClosestColor(color->
color());
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
The KisPaletteModel class This, together with KisPaletteView and KisPaletteDelegate forms a mvc way t...
The ManagedColor class is a class to handle colors that are color managed. A managed color is a color...
void entrySelectedForeGround(Swatch entry)
entrySelectedForeGround fires when a swatch is selected with leftclick.
bool addEntryWithDialog(ManagedColor *color)
addEntryWithDialog This gives a simple dialog for adding colors, with options like adding name,...
PaletteView(QWidget *parent=0)
bool removeSelectedEntryWithDialog()
removeSelectedEntryWithDialog removes the selected entry. If it is a group, it pop up a dialog asking...
void setPalette(Palette *palette)
setPalette Set a new palette.
void trySelectClosestColor(ManagedColor *color)
trySelectClosestColor tries to select the closest color to the one given. It does not force a change ...
bool addGroupWithDialog()
addGroupWithDialog gives a little dialog to ask for the desired groupname.
void fgSelected(QModelIndex index)
const QScopedPointer< Private > d
The Palette class Palette is a resource object that stores organised color data. It's purpose is to a...
The Swatch class is a thin wrapper around the KisSwatch class.
rgba palette[MAX_PALETTE]
bool allowPaletteModification