diff options
author | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2019-01-11 15:51:23 +0100 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2019-01-14 15:15:40 +0000 |
commit | 72b306fbaab3ecd63d7ee33e870083748f9ec5f8 (patch) | |
tree | f473c38bb82d9a2ce8374eb167ebeb18f577111c | |
parent | 2813c23a05b8d5fab76669a3863388beb56b6bec (diff) |
Doc: Add docs for the QtQuick.Timeline QML types
Change-Id: I7457356292c7396fbcf69a7038c5075428153e7f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
-rw-r--r-- | src/imports/timeline/doc/qtquicktimeline.qdocconf | 46 | ||||
-rw-r--r-- | src/imports/timeline/doc/src/qtquicktimeline-index.qdoc | 56 | ||||
-rw-r--r-- | src/imports/timeline/doc/src/qtquicktimeline-module-qml.qdoc | 41 | ||||
-rw-r--r-- | src/imports/timeline/doc/src/qtquicktimeline-overview.qdoc | 35 | ||||
-rw-r--r-- | src/imports/timeline/doc/style/style.css | 137 | ||||
-rw-r--r-- | src/imports/timeline/qquickkeyframe.cpp | 71 | ||||
-rw-r--r-- | src/imports/timeline/qquicktimeline.cpp | 53 | ||||
-rw-r--r-- | src/imports/timeline/qquicktimelineanimation.cpp | 27 | ||||
-rw-r--r-- | src/imports/timeline/timeline.pro | 3 |
9 files changed, 466 insertions, 3 deletions
diff --git a/src/imports/timeline/doc/qtquicktimeline.qdocconf b/src/imports/timeline/doc/qtquicktimeline.qdocconf new file mode 100644 index 0000000..0e37214 --- /dev/null +++ b/src/imports/timeline/doc/qtquicktimeline.qdocconf @@ -0,0 +1,46 @@ +include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) + +project = QtQuickTimeline +description = Qt Quick Timeline Reference Documentation +version = $QT_VERSION + +examplesinstallpath = qtquicktimeline + +qhp.projects = QtQuickTimeline + +qhp.QtQuickTimeline.file = qtquicktimeline.qhp +qhp.QtQuickTimeline.namespace = org.qt-project.qtquicktimeline.$QT_VERSION_TAG +qhp.QtQuickTimeline.virtualFolder = qtquicktimeline +qhp.QtQuickTimeline.indexTitle = Qt Quick Timeline +qhp.QtQuickTimeline.indexRoot = + +qhp.QtQuickTimeline.filterAttributes = qtquicktimeline $QT_VERSION qtrefdoc +qhp.QtQuickTimeline.customFilters.Qt.name = QtQuickTimeline $QT_VERSION +qhp.QtQuickTimeline.customFilters.Qt.filterAttributes = qtquicktimeline $QT_VERSION + +qhp.QtQuickTimeline.subprojects = qmltypes + +qhp.QtQuickTimeline.subprojects.qmltypes.title = QML Types +qhp.QtQuickTimeline.subprojects.qmltypes.indexTitle = Qt Quick Timeline QML Types +qhp.QtQuickTimeline.subprojects.qmltypes.selectors = qmlclass +qhp.QtQuickTimeline.subprojects.qmltypes.sortPages = true + +#qhp.QtQuickTimeline.subprojects.examples.title = Examples +#qhp.QtQuickTimeline.subprojects.examples.indexTitle = Qt Qt Quick Timeline Examples +#qhp.QtQuickTimeline.subprojects.examples.selectors = fake:example +#qhp.QtQuickTimeline.subprojects.examples.sortPages = true + +headerdirs += .. +sourcedirs += .. +#exampledirs = +imagedirs += images \ + +depends += qtcore qtdoc qtquick + +tagfile = qtquicktimeline.tags + +#add generic thumbnail images for example documentation that does not have an image. +#manifestmeta.thumbnail.names += + +navigation.landingpage = "Qt Quick Timeline" +navigation.qmltypespage = "Qt Quick Timeline QML Types" diff --git a/src/imports/timeline/doc/src/qtquicktimeline-index.qdoc b/src/imports/timeline/doc/src/qtquicktimeline-index.qdoc new file mode 100644 index 0000000..ef7bdca --- /dev/null +++ b/src/imports/timeline/doc/src/qtquicktimeline-index.qdoc @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2019 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page qtquicktimeline-index.html + \title Qt Quick Timeline + \brief Provides QML types to use timelines and keyframes to animate Qt Quick + user interfaces. + + + + \section1 Getting Started + + To import the QML types into your application, use the following import + statement in your .qml file: + + \code + import QtQuick.Timeline 1.0 + \endcode + + \section1 Articles and Guides + + \list + \li \l{Qt Quick Timeline Overview}{Overview} + \endlist + + \section1 Reference + + \list + \li \l{Qt Quick Timeline QML Types}{QML Types} + \endlist +*/ diff --git a/src/imports/timeline/doc/src/qtquicktimeline-module-qml.qdoc b/src/imports/timeline/doc/src/qtquicktimeline-module-qml.qdoc new file mode 100644 index 0000000..8064dcd --- /dev/null +++ b/src/imports/timeline/doc/src/qtquicktimeline-module-qml.qdoc @@ -0,0 +1,41 @@ +/**************************************************************************** +** +** Copyright (C) 2019 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \qmlmodule QtQuick.Timeline 1.0 + \title Qt Quick Timeline QML Types + \ingroup qmlmodules + \brief Provides QML types to use timelines and keyframes to animate Qt Quick + user interfaces. + + To import the QML types into your application, use the following import + statement in your .qml file: + + \code + import QtQuick.Timeline 1.0 + \endcode +*/ diff --git a/src/imports/timeline/doc/src/qtquicktimeline-overview.qdoc b/src/imports/timeline/doc/src/qtquicktimeline-overview.qdoc new file mode 100644 index 0000000..ece4a67 --- /dev/null +++ b/src/imports/timeline/doc/src/qtquicktimeline-overview.qdoc @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +/*! + \page qtquicktimeline-overview.html + \title Qt Quick Timeline Overview + \brief Describes using timelines in Qt Quick applications. + + +*/ diff --git a/src/imports/timeline/doc/style/style.css b/src/imports/timeline/doc/style/style.css new file mode 100644 index 0000000..df84049 --- /dev/null +++ b/src/imports/timeline/doc/style/style.css @@ -0,0 +1,137 @@ +a:link, a:visited { + color: #00732F; + text-decoration: none; + font-weight: bold; +} + +body { + font: normal 400 14px/1.2 Arial; + margin-top: 85px; +} + +h1 { + margin: 0; +} + +h2 { + font: 500 20px/1.2 Arial; +} + +h3.fn, span.fn { + -moz-border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; + background-color: #F6F6F6; + border-width: 1px; + border-style: solid; + border-color: #E6E6E6; + word-spacing: 3px; + padding: 3px 5px; +} + +table, pre { + -moz-border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; + background-color: #F6F6F6; + border: 1px solid #E6E6E6; + border-collapse: separate; + font-size: 12px; + line-height: 1.2; + margin-bottom: 25px; + margin-left: 15px; +} + +table td { + padding: 3px 15px 3px 20px; +} + +table tr.even { + background-color: white; + color: #66666E; +} + +table tr.odd { + background-color: #F6F6F6; + color: #66666E; +} + +li { + margin-bottom: 10px; + padding-left: 12px; +} + +.cpp { + display: block; + margin: 10; + overflow: hidden; + overflow-x: hidden; + overflow-y: hidden; + padding: 20px 0 20px 0; +} + +.footer { + margin-top: 50px; +} + +.memItemLeft { + padding-right: 3px; +} + +.memItemRight { + padding: 3px 15px 3px 0; +} + +.qml { + display: block; + margin: 10; + overflow: hidden; + overflow-x: hidden; + overflow-y: hidden; + padding: 20px 0 20px 0; +} + +.qmldefault { + padding-left: 5px; + float: right; + color: red; +} + +.qmlreadonly { + padding-left: 5px; + float: right; + color: #254117; +} + +.rightAlign { + padding: 3px 5px 3px 10px; + text-align: right; +} + +.title { + background-color: white; + color: #44A51C; + font-family: Verdana; + font-size: 35px; + font-weight: normal; + left: 0; + padding-bottom: 5px; + padding-left: 16px; + padding-top: 20px; + position: absolute; + right: 0; + top: 0; +} + +.toc { + float: right; + -moz-border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; + background-color: #F6F6F6; + border: 1px solid #DDD; + margin: 0 20px 10px 10px; + padding: 20px 15px 20px 20px; + height: auto; + width: 200px; +} diff --git a/src/imports/timeline/qquickkeyframe.cpp b/src/imports/timeline/qquickkeyframe.cpp index b43d572..025f8de 100644 --- a/src/imports/timeline/qquickkeyframe.cpp +++ b/src/imports/timeline/qquickkeyframe.cpp @@ -1,6 +1,6 @@ /****************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the Qt Quick Timeline module of the Qt Toolkit. @@ -54,6 +54,7 @@ QT_BEGIN_NAMESPACE + class QQuickKeyframeGroupPrivate : public QObjectPrivate { Q_DECLARE_PUBLIC(QQuickKeyframeGroup) @@ -133,6 +134,45 @@ public: QVariant value; }; +/*! + \qmltype Keyframe + \inherits QObject + \instantiates QQuickKeyframe + \inqmlmodule QtQuick.Timeline + \ingroup qtqmltypes + + \brief A keyframe. + + Specifies the value of a keyframe on a timeline. + + An easing curve can be attached to the keyframe. +*/ + +/*! + \qmlproperty double Keyframe::frame + + The position of the keyframe on the timeline. +*/ + +/*! + \qmlproperty var Keyframe::easing + + The easing curve attached to the keyframe. +*/ + +/*! + \qmlproperty var Keyframe::value + + The value of the keyframe. +*/ + +/*! + \qmlsignal Keyframe::easingCurveChanged + + This signal is emitted when the easing curve attached to the keyframe + changes. +*/ + QQuickKeyframe::QQuickKeyframe(QObject *parent) : QObject(*(new QQuickKeyframePrivate), parent) { @@ -167,6 +207,35 @@ QQuickKeyframe::QQuickKeyframe(QQuickKeyframePrivate &dd, QObject *parent) } +/*! + \qmltype KeyframeGroup + \inherits QObject + \instantiates QQuickKeyframeGroup + \inqmlmodule QtQuick.Timeline + \ingroup qtqmltypes + + \brief A keyframe group. + + Specifies the property that is animated by a set of keyframes on a timeline. +*/ + +/*! + \qmlproperty var KeyframeGroup::target +*/ + +/*! + \qmlproperty string KeyframeGroup::property + + The property that is animated. +*/ + +/*! + \qmlproperty list KeyframeGroup::keyframes + \readonly + + A list of keyframes that belong to the keyframe group. +*/ + QQuickKeyframeGroup::QQuickKeyframeGroup(QObject *parent) : QObject(*(new QQuickKeyframeGroupPrivate), parent) { diff --git a/src/imports/timeline/qquicktimeline.cpp b/src/imports/timeline/qquicktimeline.cpp index 30e4687..e3b6112 100644 --- a/src/imports/timeline/qquicktimeline.cpp +++ b/src/imports/timeline/qquicktimeline.cpp @@ -1,6 +1,6 @@ /****************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the Qt Quick Timeline module of the Qt Toolkit. @@ -154,6 +154,57 @@ void QQuickTimelinePrivate::clear_animations(QQmlListProperty<QQuickTimelineAnim } } +/*! + \qmltype Timeline + \inherits QObject + \instantiates QQuickTimeline + \inqmlmodule QtQuick.Timeline + \ingroup qtqmltypes + + \brief A timeline. + + Specifies a timeline with a range of keyframes that contain values for the + properties of an object. +*/ + +/*! + \qmlproperty double Timeline::startFrame + + The first keyframe on the timeline. +*/ + +/*! + \qmlproperty double Timeline::endFrame + + The last keyframe on the timeline. +*/ + +/*! + \qmlproperty double Timeline::currentFrame + + The current keyframe on the timeline. +*/ + +/*! + \qmlproperty list Timeline::keyframes + \readonly + + The keyframe group that contains a list of keyframes on the timeline. +*/ + +/*! + \qmlproperty list Timeline::animations + \readonly + + A list of animations attached to the timeline. +*/ + +/*! + \qmlproperty bool Timeline::enabled + + Whether the timeline is enabled. +*/ + QQuickTimeline::QQuickTimeline(QObject *parent) : QObject(*(new QQuickTimelinePrivate), parent) { diff --git a/src/imports/timeline/qquicktimelineanimation.cpp b/src/imports/timeline/qquicktimelineanimation.cpp index 6dfff4b..9811c3c 100644 --- a/src/imports/timeline/qquicktimelineanimation.cpp +++ b/src/imports/timeline/qquicktimelineanimation.cpp @@ -1,6 +1,6 @@ /****************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the Qt Quick Timeline module of the Qt Toolkit. @@ -49,6 +49,31 @@ QT_BEGIN_NAMESPACE +/*! + \qmltype TimelineAnimation + \inherits QQuickNumberAnimation + \instantiates QQuickTimelineAnimation + \inqmlmodule QtQuick.Timeline + \ingroup qtqmltypes + + \brief A number animation attached to a timeline. + + Specifies a number animation attached to a timeline that animates the + properties of an object. +*/ + +/*! + \qmlproperty bool TimelineAnimation::pingPong + + Whether the animation . +*/ + +/*! + \qmlsignal TimelineAnimation::finished + + This signal is emitted when the timeline animation finishes. +*/ + QQuickTimelineAnimation::QQuickTimelineAnimation(QObject *parent) : QQuickNumberAnimation(parent) { setProperty(QLatin1String("currentFrame")); diff --git a/src/imports/timeline/timeline.pro b/src/imports/timeline/timeline.pro index 5edaa38..3142657 100644 --- a/src/imports/timeline/timeline.pro +++ b/src/imports/timeline/timeline.pro @@ -21,4 +21,7 @@ RESOURCES += \ $$PWD/qtquicktimelineplugin.qrc CONFIG += no_cxx_module + +QMAKE_DOCS = $$PWD/doc/qtquicktimeline.qdocconf + load(qml_plugin) |