1 /**************************************************************************** 2 ** 3 ** DQt - D bindings for the Qt Toolkit 4 ** 5 ** GNU Lesser General Public License Usage 6 ** This file may be used under the terms of the GNU Lesser 7 ** General Public License version 3 as published by the Free Software 8 ** Foundation and appearing in the file LICENSE.LGPL3 included in the 9 ** packaging of this file. Please review the following information to 10 ** ensure the GNU Lesser General Public License version 3 requirements 11 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. 12 ** 13 ****************************************************************************/ 14 module qt.gui.colortransform; 15 extern(C++): 16 17 import qt.config; 18 import qt.core.typeinfo; 19 import qt.gui.color; 20 import qt.gui.rgb; 21 import qt.gui.rgba64; 22 import qt.helpers; 23 24 /+ class QColor; 25 class QRgba64; +/ 26 extern(C++, class) struct QColorSpacePrivate; 27 extern(C++, class) struct QColorTransformPrivate; 28 29 @Q_MOVABLE_TYPE extern(C++, class) struct QColorTransform 30 { 31 public: 32 @disable this(); 33 /+this()/+ noexcept+/ 34 { 35 this.d = null; 36 }+/ 37 /+ Q_GUI_EXPORT +/~this(); 38 @disable this(this); 39 /+ Q_GUI_EXPORT +/this(ref const(QColorTransform) colorTransform)/+ noexcept+/; 40 /+ QColorTransform(QColorTransform &&colorTransform) noexcept 41 : d{qExchange(colorTransform.d, nullptr)} 42 { } +/ 43 /+ref QColorTransform operator =(ref const(QColorTransform) other)/+ noexcept+/ 44 { 45 QColorTransform{other}.swap(this); 46 return this; 47 }+/ 48 /+ QColorTransform &operator=(QColorTransform &&other) noexcept 49 { 50 QColorTransform{std::move(other)}.swap(*this); 51 return *this; 52 } +/ 53 54 /+ void swap(QColorTransform &other) noexcept { qSwap(d, other.d); } +/ 55 56 /+ Q_GUI_EXPORT +/ QRgb map(QRgb argb) const; 57 /+ Q_GUI_EXPORT +/ QRgba64 map(QRgba64 rgba64) const; 58 /+ Q_GUI_EXPORT +/ QColor map(ref const(QColor) color) const; 59 60 private: 61 /+ friend class QColorSpace; +/ 62 /+ friend class QColorSpacePrivate; +/ 63 /+ friend class QImage; +/ 64 65 const(QColorTransformPrivate)* d = null; 66 } 67 68 /+ Q_DECLARE_SHARED(QColorTransform) +/ 69