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

0001 /* This file is part of the KDE project
0002    SPDX-FileCopyrightText: 2006 Sven Langkamp <sven.langkamp@gmail.com>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef KO_COLORSLIDER_H
0008 #define KO_COLORSLIDER_H
0009 
0010 #include <kselector.h>
0011 #include "kritawidgets_export.h"
0012 #include "KoColorDisplayRendererInterface.h"
0013 
0014 class KoColor;
0015 
0016 class KRITAWIDGETS_EXPORT KoColorSlider : public KSelector
0017 {
0018     Q_OBJECT
0019 public:
0020     explicit KoColorSlider(QWidget *parent = 0, KoColorDisplayRendererInterface *displayRenderer = KoDumbColorDisplayRenderer::instance());
0021     explicit KoColorSlider(Qt::Orientation orientation, QWidget *parent = 0, KoColorDisplayRendererInterface *displayRenderer = KoDumbColorDisplayRenderer::instance());
0022     ~KoColorSlider() override;
0023 
0024 public:
0025     void setColors( const KoColor& minColor, const KoColor& maxColor);
0026     /**
0027      * Return the current color
0028      */
0029     KoColor currentColor() const;
0030 protected:
0031     void drawContents( QPainter* ) override;
0032     void drawArrow(QPainter *painter, const QPoint &pos) override;
0033 
0034 protected:
0035     struct Private;
0036     Private* const d;
0037 };
0038 
0039 #endif