diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-06-11 05:14:00 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-06-11 05:14:00 (GMT) |
commit | b90283fd887898a3eda62e856bec7f8a34e242ac (patch) | |
tree | a0384dd4359384f4ef87d9df1909b6723f687a80 /src/declarative/util | |
parent | db414f8db1cca5d811416eb1ecec0536c379e107 (diff) | |
parent | 5e99815f85c953760d027be50caea5a386b6b710 (diff) | |
download | Qt-b90283fd887898a3eda62e856bec7f8a34e242ac.zip Qt-b90283fd887898a3eda62e856bec7f8a34e242ac.tar.gz Qt-b90283fd887898a3eda62e856bec7f8a34e242ac.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/declarative/util')
-rw-r--r-- | src/declarative/util/qdeclarativefontloader.cpp | 21 | ||||
-rw-r--r-- | src/declarative/util/qdeclarativelistmodel.cpp | 2 | ||||
-rw-r--r-- | src/declarative/util/qdeclarativesystempalette.cpp | 42 |
3 files changed, 41 insertions, 24 deletions
diff --git a/src/declarative/util/qdeclarativefontloader.cpp b/src/declarative/util/qdeclarativefontloader.cpp index 3c2e239..83bdb17 100644 --- a/src/declarative/util/qdeclarativefontloader.cpp +++ b/src/declarative/util/qdeclarativefontloader.cpp @@ -79,18 +79,27 @@ public: /*! \qmlclass FontLoader QDeclarativeFontLoader \since 4.7 - \brief This item allows using fonts by name or url. + \brief The FontLoader element allows fonts to be loaded by name or URL. - Example: + The FontLoader element is used to load fonts by name or URL. + + The \l status indicates when the font has been loaded, which is useful + for fonts loaded from remote sources. + + For example: \qml import Qt 4.7 - FontLoader { id: fixedFont; name: "Courier" } - FontLoader { id: webFont; source: "http://www.mysite.com/myfont.ttf" } + Column { + FontLoader { id: fixedFont; name: "Courier" } + FontLoader { id: webFont; source: "http://www.mysite.com/myfont.ttf" } - Text { text: "Fixed-size font"; font.family: fixedFont.name } - Text { text: "Fancy font"; font.family: webFont.name } + Text { text: "Fixed-size font"; font.family: fixedFont.name } + Text { text: "Fancy font"; font.family: webFont.name } + } \endqml + + \sa {declarative/text/fonts}{Fonts example} */ QDeclarativeFontLoader::QDeclarativeFontLoader(QObject *parent) : QObject(*(new QDeclarativeFontLoaderPrivate), parent) diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 78a3207..ff83227 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -160,7 +160,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM In addition, the WorkerScript cannot add any list data to the model. - \sa {qmlmodels}{Data Models}, WorkerScript, QtDeclarative + \sa {qmlmodels}{Data Models}, {declarative/threading/threadedlistmodel}{Threaded ListModel example}, QtDeclarative */ 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 */ |