aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSafiyyah Moosa <safiyyah.moosa@qt.io>2024-08-14 23:02:51 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-08-30 23:57:49 +0000
commit6862a44a6d751516aa202cbd75243d2e1c80b52b (patch)
tree42b81cb149e73bfe7f39f38cda1be9cdae753f31
parent15a4a5198781647d45fe31ce141393d713113022 (diff)
Doc: Add \qmlproperty for color QML value type
This patchset implements the \qmlproperty command to display the properties for the 'color' QML value type. The following properties are added: r, g, b, a, hsvHue, hsvSaturation, hsvValue, hslHue, hslSaturation, hslLightness and valid. Fixes: QTBUG-127337 Change-Id: I583407f82d530ea80f34cb3e3d74775e9fa0e1e0 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit e0aa9a5b81b643b3575c9368f21674fc88c56260) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ececff65bcec43c4fdc62505d3e81b76626532d8)
-rw-r--r--src/quick/doc/src/qmltypereference.qdoc67
1 files changed, 62 insertions, 5 deletions
diff --git a/src/quick/doc/src/qmltypereference.qdoc b/src/quick/doc/src/qmltypereference.qdoc
index b55c982acf..e94097c1b8 100644
--- a/src/quick/doc/src/qmltypereference.qdoc
+++ b/src/quick/doc/src/qmltypereference.qdoc
@@ -63,6 +63,7 @@ available when you import \c QtQuick.
\keyword colorvaluetypedocs
\qmlvaluetype color
\ingroup qtquickvaluetypes
+
\brief an ARGB color value.
The \c color type refers to an ARGB color value. It can be specified in a number of ways:
@@ -84,11 +85,11 @@ available when you import \c QtQuick.
\enddiv
\snippet qml/colors.qml colors
- A color type has \c r, \c g, \c b and \c a properties that refer to the red,
- green, blue and alpha values of the color, respectively. Additionally it has
- \c hsvHue, \c hsvSaturation, \c hsvValue and \c hslHue, \c hslSaturation,
- \c hslLightness properties, which allow access to color values in HSV and HSL
- color models accordingly:
+
+ A color type has \e r, \e g, \e b, and \e a properties that refer to the red,
+ green, blue and alpha values of the color, respectively. Additionally, the
+ \e hsvHue, \e hsvSaturation, \e hsvValue, \e hslHue, \e hslSaturation, and \e hslLightness
+ properties allow access to color values in HSV and HSL color models respectively.
\qml
Text {
@@ -120,6 +121,62 @@ available when you import \c QtQuick.
*/
/*!
+ \qmlproperty real color::r
+ The Red color channel of the RGBA model.
+*/
+
+/*!
+ \qmlproperty real color::g
+ The Green color channel of the RGBA model.
+*/
+
+/*!
+ \qmlproperty real color::b
+ The Blue color channel of the RGBA model.
+*/
+
+/*!
+ \qmlproperty real color::a
+ The Alpha color channel of the RGBA model.
+ Alpha depicts the opacity of each pixel.
+*/
+
+/*!
+ \qmlproperty real color::hsvHue
+ The HSV Hue color component of the color.
+*/
+
+/*!
+ \qmlproperty real color::hsvSaturation
+ The HSV Saturation color component of the color.
+*/
+
+/*!
+ \qmlproperty real color::hsvValue
+ The HSV Value color component of the color.
+*/
+
+/*!
+ \qmlproperty real color::hslHue
+ The HSL hue color component of the color.
+*/
+
+/*!
+ \qmlproperty real color::hslSaturation
+ The HSL Saturation color component of the color.
+*/
+
+/*!
+ \qmlproperty real color::hslLightness
+ The HSL Lightness color component of the color.
+*/
+
+/*!
+ \qmlproperty bool color::valid
+ Returns \c True if the color is valid; otherwise returns \c False.
+*/
+
+/*!
\qmlvaluetype font
\ingroup qtquickvaluetypes
\brief a font value with the properties of QFont.