File indexing completed on 2024-05-12 16:02:02

0001 /*
0002  * SPDX-FileCopyrightText: 2016 Boudewijn Rempt <boud@valdyas.org>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 
0007 #ifndef KISCOLORSELECTORINTERFACE_H
0008 #define KISCOLORSELECTORINTERFACE_H
0009 
0010 #include "kritawidgets_export.h"
0011 
0012 #include <QWidget>
0013 #include <KoColor.h>
0014 
0015 class KoColorDisplayRendererInterface;
0016 class KoColorSpace;
0017 
0018 class KRITAWIDGETS_EXPORT KisColorSelectorInterface : public QWidget {
0019     Q_OBJECT
0020 public:
0021     KisColorSelectorInterface(QWidget *parent = 0)
0022         : QWidget(parent)
0023     {}
0024     ~KisColorSelectorInterface() override {}
0025     virtual void setConfig(bool forceCircular, bool forceSelfUpdate)
0026     {
0027         Q_UNUSED(forceCircular);
0028         Q_UNUSED(forceSelfUpdate);
0029     }
0030     virtual void setDisplayRenderer (const KoColorDisplayRendererInterface *displayRenderer)
0031     {
0032         Q_UNUSED(displayRenderer);
0033     }
0034 
0035     virtual KoColor getCurrentColor() const = 0;
0036 
0037 Q_SIGNALS:
0038     void sigNewColor(const KoColor &c);
0039 
0040 public Q_SLOTS:
0041     virtual void slotSetColor(const KoColor &c) = 0;
0042     /**
0043      * @brief slotSetColorSpace
0044      * Set the color space the selector should cover
0045      *
0046      * This is mostly a hint to decide visual presentation.
0047      * Internal processing may be in a different color space and
0048      * input conversion shall be handled by the selector itself.
0049      * Calling this voids the currently selected color.
0050      */
0051     virtual void slotSetColorSpace(const KoColorSpace *cs);
0052 };
0053 
0054 #endif // KISCOLORSELECTORINTERFACE_H