summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativesystempalette.cpp
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-06-11 01:13:37 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-06-11 01:57:02 (GMT)
commitab0d9f5efd274c8062a03fb3a1c83e4d16afd6fb (patch)
treeeccc035f60887e74cf5553763c64006db8c00f46 /src/declarative/util/qdeclarativesystempalette.cpp
parentaa30b0002573b5377b17f26f9fd72ca7d098a36c (diff)
downloadQt-ab0d9f5efd274c8062a03fb3a1c83e4d16afd6fb.zip
Qt-ab0d9f5efd274c8062a03fb3a1c83e4d16afd6fb.tar.gz
Qt-ab0d9f5efd274c8062a03fb3a1c83e4d16afd6fb.tar.bz2
Doc improvements, including snippet fixes, linking to examples, making
docs more consistent
Diffstat (limited to 'src/declarative/util/qdeclarativesystempalette.cpp')
-rw-r--r--src/declarative/util/qdeclarativesystempalette.cpp42
1 files changed, 25 insertions, 17 deletions
diff --git a/src/declarative/util/qdeclarativesystempalette.cpp b/src/declarative/util/qdeclarativesystempalette.cpp
index 6c62446..c334859 100644
--- a/src/declarative/util/qdeclarativesystempalette.cpp
+++ b/src/declarative/util/qdeclarativesystempalette.cpp
@@ -59,22 +59,25 @@ public:
/*!
\qmlclass SystemPalette QDeclarativeSystemPalette
\since 4.7
- \brief The SystemPalette item gives access to the Qt palettes.
- \sa QPalette
+ \brief The SystemPalette element provides access to the Qt palettes.
- Example:
- \qml
- SystemPalette { id: myPalette; colorGroup: Qt.Active }
+ The SystemPalette element provides access to the Qt application
+ palettes. This provides information about the standard colors used
+ for application windows, buttons and other features. These colors
+ are grouped into three \e {color groups}: \c Active, \c Inactive,
+ and \c Disabled. See the QPalette documentation for details about
+ color groups and the properties provided by SystemPalette.
- Rectangle {
- width: 640; height: 480
- color: myPalette.window
- Text {
- anchors.fill: parent
- text: "Hello!"; color: myPalette.windowText
- }
- }
- \endqml
+ This can be used to color items in a way that provides a more
+ native look and feel.
+
+ The following example creates a palette from the \c Active color
+ group and uses this to color the window and text items
+ appropriately:
+
+ \snippet doc/src/snippets/declarative/systempalette.qml 0
+
+ \sa QPalette
*/
QDeclarativeSystemPalette::QDeclarativeSystemPalette(QObject *parent)
: QObject(*(new QDeclarativeSystemPalettePrivate), parent)
@@ -258,10 +261,15 @@ QColor QDeclarativeSystemPalette::highlightedText() const
}
/*!
- \qmlproperty QDeclarativeSystemPalette::ColorGroup SystemPalette::colorGroup
+ \qmlproperty enumeration SystemPalette::colorGroup
+
+ The color group of the palette. This can be one of:
- The color group of the palette. It can be Active, Inactive or Disabled.
- Active is the default.
+ \list
+ \o SystemPalette.Active (default)
+ \o SystemPalette.Inactive
+ \o SystemPalette.Disabled
+ \endlist
\sa QPalette::ColorGroup
*/