Perceptual Color
7#include "abstractdiagram.h"
8#include "constpropagatinguniquepointer.h"
12#include <qnamespace.h>
13#include <qsharedpointer.h>
21#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
22#include <qtmetamacros.h>
24#include <qobjectdefs.h>
33class SwatchBookPrivate;
69 Q_PROPERTY(QColor currentColor READ currentColor WRITE setCurrentColor NOTIFY currentColorChanged)
82 Q_PROPERTY(
Swatches swatchGrid READ swatchGrid WRITE setSwatchGrid NOTIFY swatchGridChanged)
85 Q_INVOKABLE explicit SwatchBook(
const QSharedPointer<PerceptualColor::RgbColorSpace> &colorSpace,
89 virtual ~SwatchBook() noexcept override;
92 [[nodiscard]] QColor currentColor() const;
93 [[nodiscard]] virtual QSize minimumSizeHint() const override;
96 [[nodiscard]]
Swatches swatchGrid() const;
97 [[nodiscard]] virtual QSize sizeHint() const override;
100 void setCurrentColor(const QColor &newCurrentColor);
101 void setSwatchGrid(const PerceptualColor::
Swatches &newSwatchGrid);
107 void currentColorChanged(const QColor &newCurrentColor);
111 void swatchGridChanged(const PerceptualColor::
Swatches &newSwatchGrid);
114 virtual
void changeEvent(QEvent *
event) override;
115 virtual
void keyPressEvent(QKeyEvent *
event) override;
116 virtual
void mousePressEvent(QMouseEvent *
event) override;
117 virtual
void paintEvent(QPaintEvent *
event) override;
120 Q_DISABLE_COPY(SwatchBook)
127 friend class SwatchBookPrivate;
129 ConstPropagatingUniquePointer<SwatchBookPrivate> d_pointer;
132 friend class TestSwatchBook;
Base class for LCH diagrams.
The namespace of this library.
Array2D< QColor > Swatches
Swatches organized in a grid.
virtual bool event(QEvent *e)
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:46:43 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.