diff --git a/libs/ui/dialogs/kis_internal_color_selector.cpp b/libs/ui/dialogs/kis_internal_color_selector.cpp index 0f75d1448a..d0df27b906 100644 --- a/libs/ui/dialogs/kis_internal_color_selector.cpp +++ b/libs/ui/dialogs/kis_internal_color_selector.cpp @@ -1,206 +1,212 @@ /* * Copyright (C) Wolthera van Hovell tot Westerflier , (C) 2016 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include #include #include #include #include "KoColorSpaceRegistry.h" #include #include #include #include "kis_signal_compressor.h" #include "KisViewManager.h" #include "KoColorDisplayRendererInterface.h" #include "kis_spinbox_color_selector.h" #include "kis_internal_color_selector.h" #include "ui_wdgdlginternalcolorselector.h" #include "kis_config.h" struct KisInternalColorSelector::Private { bool allowUpdates = true; KoColor currentColor; KoColor previousColor; const KoColorSpace *currentColorSpace; bool chooseAlpha = false; KisSignalCompressor *compressColorChanges; const KoColorDisplayRendererInterface *displayRenderer; }; KisInternalColorSelector::KisInternalColorSelector(QWidget *parent, KoColor color, bool modal, const QString &caption, const KoColorDisplayRendererInterface *displayRenderer) : QDialog(parent) ,m_d(new Private) { setModal(modal); m_ui = new Ui_WdgDlgInternalColorSelector(); m_ui->setupUi(this); if (!modal) { m_ui->buttonBox->hide(); } setWindowTitle(caption); m_d->currentColor = color; m_d->currentColorSpace = m_d->currentColor.colorSpace(); m_d->displayRenderer = displayRenderer; m_ui->spinboxselector->slotSetColor(color); connect(m_ui->spinboxselector, SIGNAL(sigNewColor(KoColor)), this, SLOT(slotColorUpdated(KoColor))); m_ui->visualSelector->slotSetColor(color); m_ui->visualSelector->setDisplayRenderer(displayRenderer); connect(m_ui->visualSelector, SIGNAL(sigNewColor(KoColor)), this, SLOT(slotColorUpdated(KoColor))); connect(m_ui->screenColorPicker, SIGNAL(sigNewColorPicked(KoColor)),this, SLOT(slotColorUpdated(KoColor))); //TODO: Add disable signal as well. Might be not necessary...? KisConfig cfg; QString paletteName = cfg.readEntry("internal_selector_active_color_set", QString()); KoResourceServer* rServer = KoResourceServerProvider::instance()->paletteServer(false); KoColorSet *savedPal = rServer->resourceByName(paletteName); if (savedPal) { m_ui->paletteBox->setColorSet(savedPal); } else { savedPal = rServer->resources().first(); if (savedPal) { m_ui->paletteBox->setColorSet(savedPal); } } connect(m_ui->paletteBox, SIGNAL(colorChanged(KoColor,bool)), this, SLOT(slotColorUpdated(KoColor))); + m_ui->paletteBox->setDisplayRenderer(displayRenderer); m_ui->currentColor->setColor(m_d->currentColor); + m_ui->currentColor->setDisplayRenderer(displayRenderer); m_ui->previousColor->setColor(m_d->currentColor); + m_ui->previousColor->setDisplayRenderer(displayRenderer); connect(this, SIGNAL(accepted()), this, SLOT(setPreviousColor())); connect(this, SIGNAL(signalForegroundColorChosen(KoColor)), this, SLOT(slotLockSelector())); m_d->compressColorChanges = new KisSignalCompressor(100 /* ms */, KisSignalCompressor::POSTPONE, this); connect(m_d->compressColorChanges, SIGNAL(timeout()), this, SLOT(endUpdateWithNewColor())); connect(m_ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept())); connect(m_ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject())); } KisInternalColorSelector::~KisInternalColorSelector() { delete m_ui; //TODO: Does the scoped pointer also need to be deleted??? } void KisInternalColorSelector::slotColorUpdated(KoColor newColor) { //if the update did not come from this selector... if (m_d->allowUpdates || QObject::sender() == this->parent()) { m_d->currentColor = newColor; updateAllElements(QObject::sender()); } } void KisInternalColorSelector::colorSpaceChanged(const KoColorSpace *cs) { if (cs == m_d->currentColorSpace) { return; } m_d->currentColorSpace = KoColorSpaceRegistry::instance()->colorSpace(cs->colorModelId().id(), cs->colorDepthId().id(), cs->profile()); m_ui->spinboxselector->slotSetColorSpace(m_d->currentColorSpace); } void KisInternalColorSelector::setDisplayRenderer(const KoColorDisplayRendererInterface *displayRenderer) { if (displayRenderer) { m_d->displayRenderer = displayRenderer; m_ui->visualSelector->setDisplayRenderer(displayRenderer); + m_ui->currentColor->setDisplayRenderer(displayRenderer); + m_ui->previousColor->setDisplayRenderer(displayRenderer); + m_ui->paletteBox->setDisplayRenderer(displayRenderer); } else { m_d->displayRenderer = KoDumbColorDisplayRenderer::instance(); } } KoColor KisInternalColorSelector::getModalColorDialog(const KoColor color, bool chooseAlpha, QWidget* parent, QString caption) { KisInternalColorSelector dialog(parent, color, true, caption); dialog.chooseAlpha(chooseAlpha); dialog.exec(); return dialog.getCurrentColor(); } KoColor KisInternalColorSelector::getCurrentColor() { return m_d->currentColor; } void KisInternalColorSelector::chooseAlpha(bool chooseAlpha) { m_d->chooseAlpha = chooseAlpha; } void KisInternalColorSelector::slotConfigurationChanged() { //m_d->canvas->displayColorConverter()-> //slotColorSpaceChanged(m_d->canvas->image()->colorSpace()); } void KisInternalColorSelector::slotLockSelector() { m_d->allowUpdates = false; } void KisInternalColorSelector::setPreviousColor() { m_d->previousColor = m_d->currentColor; KisConfig cfg; if (m_ui->paletteBox->colorSet()) { cfg.writeEntry("internal_selector_active_color_set", m_ui->paletteBox->colorSet()->name()); } } void KisInternalColorSelector::updateAllElements(QObject *source) { //update everything!!! if (source != m_ui->spinboxselector) { m_ui->spinboxselector->slotSetColor(m_d->currentColor); } if (source != m_ui->visualSelector) { m_ui->visualSelector->slotSetColor(m_d->currentColor); } m_ui->previousColor->setColor(m_d->previousColor); m_ui->currentColor->setColor(m_d->currentColor); if (source != this->parent()) { emit(signalForegroundColorChosen(m_d->currentColor)); m_d->compressColorChanges->start(); } } void KisInternalColorSelector::endUpdateWithNewColor() { m_d->allowUpdates = true; } void KisInternalColorSelector::leaveEvent(QEvent *) { setPreviousColor(); } diff --git a/libs/widgets/KoColorPatch.cpp b/libs/widgets/KoColorPatch.cpp index 6b000686a5..0d2b53402c 100644 --- a/libs/widgets/KoColorPatch.cpp +++ b/libs/widgets/KoColorPatch.cpp @@ -1,66 +1,93 @@ /** * Copyright (c) 2006 C. Boemann (cbo@boemann.dk) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include "KoColorPatch.h" #include KoColorPatch::KoColorPatch( QWidget *parent ) : QFrame( parent ) { + m_displayRenderer = KoDumbColorDisplayRenderer::instance(); + connect(m_displayRenderer, SIGNAL(displayConfigurationChanged()), + SLOT(update()), Qt::UniqueConnection); setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); } KoColorPatch::~KoColorPatch() { } QSize KoColorPatch::sizeHint() const { return QSize(12,12); } void KoColorPatch::setColor(const KoColor& c) { m_color = c; update(); } +void KoColorPatch::setDisplayRenderer(const KoColorDisplayRendererInterface *displayRenderer) +{ + if (displayRenderer) { + if (m_displayRenderer) { + m_displayRenderer->disconnect(this); + } + m_displayRenderer = displayRenderer; + } else { + m_displayRenderer = KoDumbColorDisplayRenderer::instance(); + } + connect(m_displayRenderer, SIGNAL(displayConfigurationChanged()), + SLOT(update()), Qt::UniqueConnection); + +} + +QColor KoColorPatch::getColorFromDisplayRenderer(KoColor c) +{ + QColor col; + if (m_displayRenderer) { + c.convertTo(m_displayRenderer->getPaintingColorSpace()); + col = m_displayRenderer->toQColor(c); + } else { + col = c.toQColor(); + } + return col; +} KoColor KoColorPatch::color() const { return m_color; } void KoColorPatch::mousePressEvent (QMouseEvent *e ) { Q_UNUSED( e ); emit triggered(this); } void KoColorPatch::paintEvent(QPaintEvent *pe) { - QColor qc; - m_color.toQColor(&qc); - + QColor qc = getColorFromDisplayRenderer(m_color); QFrame::paintEvent(pe); QPainter painter( this ); painter.setPen(qc); painter.setBrush(QBrush(qc)); painter.drawRect(contentsRect()); } diff --git a/libs/widgets/KoColorPatch.h b/libs/widgets/KoColorPatch.h index c30b72f673..fd3ead420f 100644 --- a/libs/widgets/KoColorPatch.h +++ b/libs/widgets/KoColorPatch.h @@ -1,65 +1,81 @@ /** * Copyright (c) 2006 C. Boemann (cbo@boemann.dk) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KOCOLORPATCH_H #define KOCOLORPATCH_H #include #include #include "kritawidgets_export.h" +#include /** * The small widget showing the selected color */ class KRITAWIDGETS_EXPORT KoColorPatch : public QFrame { Q_OBJECT public: explicit KoColorPatch( QWidget *parent ); virtual ~KoColorPatch(); /** * Set the color of this color patch * @param c the new color */ void setColor( const KoColor &c ); + /** + * @brief setDisplayRenderer + * Set the display renderer of this object. + * @param displayRenderer + */ + void setDisplayRenderer(const KoColorDisplayRendererInterface *displayRenderer); + + /** + * @brief getColorFromDisplayRenderer + * Get QColor from the display renderers + * @param c + */ + QColor getColorFromDisplayRenderer(KoColor c); + /** * @return current color shown by this patch */ KoColor color() const; protected: virtual void mousePressEvent(QMouseEvent *e ); ///< reimplemented from QFrame virtual void paintEvent(QPaintEvent *e); ///< reimplemented from QFrame virtual QSize sizeHint() const; ///< reimplemented from QFrame Q_SIGNALS: /** * Emitted when the mouse is released. * @param widget a pointer to this widget */ void triggered(KoColorPatch *widget); private: KoColor m_color; + const KoColorDisplayRendererInterface *m_displayRenderer; }; #endif diff --git a/libs/widgets/KoColorSetWidget.cpp b/libs/widgets/KoColorSetWidget.cpp index 5a5307c3e9..4c3af33f04 100644 --- a/libs/widgets/KoColorSetWidget.cpp +++ b/libs/widgets/KoColorSetWidget.cpp @@ -1,239 +1,257 @@ /* This file is part of the KDE project Copyright (c) 2007, 2012 C. Boemann Copyright (c) 2007-2008 Fredy Yanardi This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include "KoColorSetWidget.h" #include "KoColorSetWidget_p.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void KoColorSetWidget::KoColorSetWidgetPrivate::fillColors() { delete colorSetContainer; colorSetContainer = new QWidget(); colorSetLayout = new QGridLayout(); colorSetLayout->setMargin(3); colorSetLayout->setSpacing(0); // otherwise the use can click where there is none colorSetContainer->setBackgroundRole(QPalette::Dark); for(int i = 0; i<16; i++) { colorSetLayout->setColumnMinimumWidth(i, 12); } colorSetContainer->setLayout(colorSetLayout); if (colorSet) { for( int i = 0, p= 0; i < colorSet->nColors(); i++) { KoColorPatch *patch = new KoColorPatch(colorSetContainer); patch->setFrameStyle(QFrame::Plain | QFrame::Box); patch->setLineWidth(1); patch->setColor(colorSet->getColor(i).color); connect(patch, SIGNAL(triggered(KoColorPatch *)), thePublic, SLOT(colorTriggered(KoColorPatch *))); colorSetLayout->addWidget(patch, p/16, p%16); + patch->setDisplayRenderer(displayRenderer); + patchWidgetList.append(patch); ++p; } } scrollArea->setWidget(colorSetContainer); } void KoColorSetWidget::KoColorSetWidgetPrivate::addRemoveColors() { KoResourceServer* srv = KoResourceServerProvider::instance()->paletteServer(); QList palettes = srv->resources(); Q_ASSERT(colorSet); KoEditColorSetDialog *dlg = new KoEditColorSetDialog(palettes, colorSet->name(), thePublic); if (dlg->exec() == KoDialog::Accepted ) { // always reload the color set KoColorSet * cs = dlg->activeColorSet(); // check if the selected colorset is predefined if( cs && !palettes.contains( cs ) ) { int i = 1; QFileInfo fileInfo; QString savePath = srv->saveLocation(); do { fileInfo.setFile( savePath + QString("%1.gpl").arg( i++, 4, 10, QChar('0') ) ); } while (fileInfo.exists()); cs->setFilename( fileInfo.filePath() ); cs->setValid( true ); // add new colorset to predefined colorsets if (!srv->addResource(cs)) { delete cs; cs = 0; } } if (cs) { thePublic->setColorSet(cs); } } delete dlg; } void KoColorSetWidget::KoColorSetWidgetPrivate::addRecent(const KoColor &color) { if(numRecents<6) { recentPatches[numRecents] = new KoColorPatch(thePublic); recentPatches[numRecents]->setFrameShape(QFrame::Box); + recentPatches[numRecents]->setDisplayRenderer(displayRenderer); recentsLayout->insertWidget(numRecents+1, recentPatches[numRecents]); connect(recentPatches[numRecents], SIGNAL(triggered(KoColorPatch *)), thePublic, SLOT(colorTriggered(KoColorPatch *))); numRecents++; } // shift colors to the right for (int i = numRecents- 1; i >0; i--) { recentPatches[i]->setColor(recentPatches[i-1]->color()); } //Finally set the recent color recentPatches[0]->setColor(color); } void KoColorSetWidget::KoColorSetWidgetPrivate::activateRecent(int i) { KoColor color = recentPatches[i]->color(); while (i >0) { recentPatches[i]->setColor(recentPatches[i-1]->color()); i--; } recentPatches[0]->setColor(color); } KoColorSetWidget::KoColorSetWidget(QWidget *parent) : QFrame(parent) ,d(new KoColorSetWidgetPrivate()) { d->thePublic = this; d->colorSet = 0; d->firstShowOfContainer = true; d->mainLayout = new QVBoxLayout(); d->mainLayout->setMargin(4); d->mainLayout->setSpacing(2); d->colorSetContainer = 0; d->numRecents = 0; d->recentsLayout = new QHBoxLayout(); d->mainLayout->addLayout(d->recentsLayout); d->recentsLayout->setMargin(0); d->recentsLayout->addWidget(new QLabel(i18n("Recent:"))); d->recentsLayout->addStretch(1); KoColor color(KoColorSpaceRegistry::instance()->rgb8()); color.fromQColor(QColor(128,0,0)); d->addRecent(color); d->scrollArea = new QScrollArea(); d->scrollArea->setBackgroundRole(QPalette::Dark); d->mainLayout->addWidget(d->scrollArea); d->fillColors(); d->addRemoveButton = new QToolButton(this); d->addRemoveButton->setText(i18n("Add / Remove Colors...")); d->addRemoveButton->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); connect(d->addRemoveButton, SIGNAL(clicked()), SLOT(addRemoveColors())); d->mainLayout->addWidget(d->addRemoveButton); setLayout(d->mainLayout); KoColorSet *colorSet = new KoColorSet(); d->colorSet = colorSet; d->fillColors(); } KoColorSetWidget::~KoColorSetWidget() { KoResourceServer* srv = KoResourceServerProvider::instance()->paletteServer(); QList palettes = srv->resources(); if (!palettes.contains(d->colorSet)) { delete d->colorSet; } delete d; } void KoColorSetWidget::KoColorSetWidgetPrivate::colorTriggered(KoColorPatch *patch) { int i; emit thePublic->colorChanged(patch->color(), true); for(i = 0; i color()); } void KoColorSetWidget::setColorSet(KoColorSet *colorSet) { if (colorSet == d->colorSet) return; KoResourceServer* srv = KoResourceServerProvider::instance()->paletteServer(); QList palettes = srv->resources(); if (!palettes.contains(d->colorSet)) { delete d->colorSet; } d->colorSet = colorSet; d->fillColors(); } KoColorSet* KoColorSetWidget::colorSet() { return d->colorSet; } +void KoColorSetWidget::setDisplayRenderer(const KoColorDisplayRendererInterface *displayRenderer) +{ + if (displayRenderer) { + d->displayRenderer = displayRenderer; + Q_FOREACH(KoColorPatch *p, d->patchWidgetList) { + p->setDisplayRenderer(displayRenderer); + } + for (int i=0; i<6; i++) { + if (d->recentPatches[i]) { + d->recentPatches[i]->setDisplayRenderer(displayRenderer); + } + } + } +} + void KoColorSetWidget::resizeEvent(QResizeEvent *event) { emit widgetSizeChanged(event->size()); QFrame::resizeEvent(event); } //have to include this because of Q_PRIVATE_SLOT #include "moc_KoColorSetWidget.cpp" diff --git a/libs/widgets/KoColorSetWidget.h b/libs/widgets/KoColorSetWidget.h index 07dbe26287..0fba476c05 100644 --- a/libs/widgets/KoColorSetWidget.h +++ b/libs/widgets/KoColorSetWidget.h @@ -1,98 +1,106 @@ /* This file is part of the KDE project Copyright (c) 2007 C. Boemann Copyright (c) 2007 Fredy Yanardi This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KOCOLORSETWIDGET_H_ #define KOCOLORSETWIDGET_H_ #include #include #include "kritawidgets_export.h" +#include class KoColor; class KoColorSet; /** * @short A colormanaged widget for choosing a color from a colorset * * KoColorSetWidget is a widget for choosing a color (colormanaged via pigment). It shows a color * set plus optionally a checkbox to filter away bad matching colors. */ class KRITAWIDGETS_EXPORT KoColorSetWidget : public QFrame { Q_OBJECT public: /** * Constructor for the widget, where color is initially blackpoint of sRGB * * @param parent parent QWidget */ explicit KoColorSetWidget(QWidget *parent=0); /** * Destructor */ virtual ~KoColorSetWidget(); /** * Sets the color set that this widget shows. * @param colorSet pointer to the color set */ void setColorSet(KoColorSet *colorSet); + /** + * @brief setDisplayRenderer + * Set the display renderer of this object. + * @param displayRenderer + */ + void setDisplayRenderer(const KoColorDisplayRendererInterface *displayRenderer); + /** * Gets the current color set * @returns current color set,, 0 if none set */ KoColorSet* colorSet(); protected: virtual void resizeEvent(QResizeEvent *event); ///< reimplemented from QFrame Q_SIGNALS: /** * Emitted every time the color changes (by calling setColor() or * by user interaction. * @param color the new color * @param final if the value is final (ie not produced by the pointer moving over around) */ void colorChanged(const KoColor &color, bool final); /** * Emitted every time the size of this widget changes because of new colorset with * different number of colors is loaded. This is useful for KoColorSetAction to update * correct size of the menu showing this widget. * @param size the new size */ void widgetSizeChanged(const QSize &size); private: Q_PRIVATE_SLOT(d, void colorTriggered(KoColorPatch *)) Q_PRIVATE_SLOT(d, void addRemoveColors()) class KoColorSetWidgetPrivate; KoColorSetWidgetPrivate * const d; }; #endif diff --git a/libs/widgets/KoColorSetWidget_p.h b/libs/widgets/KoColorSetWidget_p.h index 0a85e98b65..434e9ff67d 100644 --- a/libs/widgets/KoColorSetWidget_p.h +++ b/libs/widgets/KoColorSetWidget_p.h @@ -1,69 +1,74 @@ /* This file is part of the KDE project Copyright (c) 2007, 2012 C. Boemann Copyright (c) 2007-2008 Fredy Yanardi This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KoColorSetWidget_p_h #define KoColorSetWidget_p_h #include "KoColorSetWidget.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include +#include class KoColorPatch; class Q_DECL_HIDDEN KoColorSetWidget::KoColorSetWidgetPrivate { public: KoColorSetWidget *thePublic; QPointer colorSet; QTimer m_timer; QVBoxLayout *mainLayout; bool firstShowOfContainer; QWidget *colorSetContainer; QScrollArea *scrollArea; QGridLayout *colorSetLayout; QHBoxLayout *recentsLayout; KoColorPatch *recentPatches[6]; QToolButton *addRemoveButton; int numRecents; void colorTriggered(KoColorPatch *patch); void addRecent(const KoColor &); void activateRecent(int i); void fillColors(); void addRemoveColors(); + + QList patchWidgetList; + const KoColorDisplayRendererInterface *displayRenderer; + }; #endif