Perceptual Color

wheelcolorpicker_p.h
1// SPDX-FileCopyrightText: Lukas Sommer <sommerluk@gmail.com>
2// SPDX-License-Identifier: BSD-2-Clause OR MIT
3
4#ifndef WHEELCOLORPICKER_P_H
5#define WHEELCOLORPICKER_P_H
6
7// Include the header of the public class of this private implementation.
8// #include "wheelcolorpicker.h"
9
10#include "constpropagatingrawpointer.h"
11#include <qglobal.h>
12#include <qobject.h>
13#include <qpointer.h>
14#include <qsharedpointer.h>
15#include <qsize.h>
16class QWidget;
17
18#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
19#include <qtmetamacros.h>
20#else
21#include <qobjectdefs.h>
22#include <qstring.h>
23#endif
24
25namespace PerceptualColor
26{
27class ChromaLightnessDiagram;
28class ColorWheel;
29class RgbColorSpace;
30class WheelColorPicker;
31
32/** @internal
33 *
34 * @brief Private implementation within the <em>Pointer to
35 * implementation</em> idiom */
36class WheelColorPickerPrivate final : public QObject
37{
39
40public:
41 // Constructors and destructors
42 explicit WheelColorPickerPrivate(WheelColorPicker *backLink);
43 /** @brief Default destructor */
44 virtual ~WheelColorPickerPrivate() noexcept override = default;
45
46 // Member methods
47 [[nodiscard]] QSizeF optimalChromaLightnessDiagramSize() const;
48 void resizeChildWidgets();
49
50 // Data members
51 /** @brief A pointer to the @ref ChromaLightnessDiagram child widget. */
52 QPointer<ChromaLightnessDiagram> m_chromaLightnessDiagram;
53 /** @brief A pointer to the color space. */
54 QSharedPointer<PerceptualColor::RgbColorSpace> m_rgbColorSpace;
55 /** @brief A pointer to the @ref ColorWheel child widget. */
56 QPointer<ColorWheel> m_colorWheel;
57
58public Q_SLOTS:
59 void handleFocusChanged(QWidget *old, QWidget *now);
60
61private:
62 Q_DISABLE_COPY(WheelColorPickerPrivate)
63
64 /** @brief Pointer to the object from which <em>this</em> object
65 * is the private implementation. */
66 ConstPropagatingRawPointer<WheelColorPicker> q_pointer;
67};
68
69} // namespace PerceptualColor
70
71#endif // WHEELCOLORPICKER_P_H
The namespace of this library.
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:36 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.