aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/doc/src/appdevguide/usecases
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/doc/src/appdevguide/usecases')
-rw-r--r--src/quick/doc/src/appdevguide/usecases/animations.qdoc73
-rw-r--r--src/quick/doc/src/appdevguide/usecases/integratingjs.qdoc70
-rw-r--r--src/quick/doc/src/appdevguide/usecases/layouts.qdoc79
-rw-r--r--src/quick/doc/src/appdevguide/usecases/styling.qdoc63
-rw-r--r--src/quick/doc/src/appdevguide/usecases/text.qdoc58
-rw-r--r--src/quick/doc/src/appdevguide/usecases/userinput.qdoc83
-rw-r--r--src/quick/doc/src/appdevguide/usecases/visual.qdoc85
7 files changed, 0 insertions, 511 deletions
diff --git a/src/quick/doc/src/appdevguide/usecases/animations.qdoc b/src/quick/doc/src/appdevguide/usecases/animations.qdoc
deleted file mode 100644
index b237849caf..0000000000
--- a/src/quick/doc/src/appdevguide/usecases/animations.qdoc
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
-\page qtquick-usecase-animations.html
-\title Usecase - Animations In QML
-\brief Example of how to include animations in QML applications
-
-QtQuick provides the ability to animate properties. Animating properties allows property values to move through
-intermediate values instead of immediately changing to the target value. To animate the position of an item, you can
-animate the properties that controle the item's position, x and y for example, so that the item's position
-changes each frame on the way to the target position.
-
-\section1 Fluid UIs
-
-QML was designed to facilitate the creation of fluid UIs. These are user interfaces where the UI components animate instead of appearing, disappearing, or jumping abruptly. Qt Quick provides two simple ways to have UI
-components move with animation instead of instantly appearing at their new location.
-
-\section2 States and Transitions
-
-Qt Quick allows you to declare various UI states in \l State objects. These states are comprised of property changes from a
-base state, and can be a useful way of organizing your UI logic. Transitions are objects you can associate with an item
-to define how its properties will animate when they change due to a state change.
-
-States and transitions for an item can be declared with the \l Item::states and \l Item::transitions properties.
-States are declared inside the states list property of an item, usually the root item of the component. Transitions
-defined on the same item are used to animate the changes in the state. Here is an example.
-
-\snippet qml/usecases/animations.qml states
-
-\section2 Animating Property Changes.
-
-Behaviors can be used to specify an animation for a property to use when it changes. This is then applied to all
-changes, regardless of their source. The following example animates a button moving around the
-screen using behaviors.
-
-\snippet qml/usecases/animations.qml behave
-
-\section1 Other Animations
-
-Not all animations have to be tied to a specific property or state. You can also create animations more generally, and
-specify target items and properties inside the animation. Here are some examples of different ways to do this:
-
-\snippet qml/usecases/animations.qml constant
-\snippet qml/usecases/animations.qml scripted
-\image qml-uses-animation.png
-
-More information about animations can be found on the \l{Important Concepts in Qt Quick - States, Transitions and
-Animations} page.
-*/
diff --git a/src/quick/doc/src/appdevguide/usecases/integratingjs.qdoc b/src/quick/doc/src/appdevguide/usecases/integratingjs.qdoc
deleted file mode 100644
index 4bad4a4033..0000000000
--- a/src/quick/doc/src/appdevguide/usecases/integratingjs.qdoc
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
-\page qtquick-usecase-integratingjs.html
-\title Use Case - Integrating JavaScript in QML
-\brief Example of how to integrate JavaScript code in QML applications
-
-JavaScript code can be easily integrated into QML to provide UI logic, imperative control, or other benefits.
-
-\section1 Using JavaScript Expressions for Property Values
-
-JavaScript expressions can be used in QML as bindings. For example
-\code
-Item {
- width: Math.random()
- height: width < 100 ? 100 : (width + 50) / 2
-}
-\endcode
-
-Note that function calls, like Math.random(), will not be revaluated unless their arguments
-change. So binding to Math.random() will be one random number and not revaluated, but if the width is changed in some
-other manner, the height binding will be reevaluated to take that into account.
-
-\section1 Adding JavaScript Functions in QML
-
-JavaScript functions can be declared on QML items, like in the below example. This allows you to call the method
-using the item id.
-
-\snippet qml/usecases/integratingjs-inline.qml 0
-
-\section1 Using JavaScript files
-
-JavaScript files can be used for abstracting out logic from QML files. To do this, first place your functions inside a
-.js file like in the example shown.
-
-\snippet qml/usecases/myscript.js 0
-
-Then import the file into any .qml file that needs to use the functions, like the example QML file below.
-
-\snippet qml/usecases/integratingjs.qml 0
-
-\image qml-uses-integratingjs.png
-
-For further details on the JavaScript engine used by QML, as well as the difference from browser JS, see the full
-documentation on \c {Using JavaScript Expressions with QML}.
-*/
diff --git a/src/quick/doc/src/appdevguide/usecases/layouts.qdoc b/src/quick/doc/src/appdevguide/usecases/layouts.qdoc
deleted file mode 100644
index e8e35a93e7..0000000000
--- a/src/quick/doc/src/appdevguide/usecases/layouts.qdoc
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
-\page qtquick-usecase-layouts.html
-\title Use Case - Layouts In QML
-\brief Example of how to create layouts for visual components in a QML application
-
-There are several ways to position items in QML.
-
-Below is a brief overview. For more details, see \l {Important Concepts In Qt Quick - Positioning}.
-
-\section1 Manual Positioning
-
-Items can be placed at specific x,y coordinates on the screen by setting their x,y properties. This will
-setup their position relative to the top left corner of their parent, according to the
-\l {Concepts - Visual Coordinates in Qt Quick}{visual coordinate system} rules.
-
-Combined with using \l{Property Binding}{bindings} instead of constant valudes for these properties, relative positioning is also easily
-accomplished by setting the x and y coordinates to the appropriate bindings.
-
-\snippet qml/usecases/layouts.qml import
-\snippet qml/usecases/layouts.qml direct
-
-\image qml-uses-layouts-direct.png
-
-
-\section1 Anchors
-
-The \c Item type provides the abilitiy to anchor to other \l Item types. There are six anchor lines for each item: \e left,
-\e right, \e{vertical center}, \e top, \e bottom and \e{horizontal center}. The three vertical anchor lines can be anchored to any of
-the three vertical anchor lines of another item, and the three horizontal anchor lines can be anchored to the
-horizontal anchor lines of another item.
-
-For full details, see \l {Positioning with Anchors} and the documentation of the \l{Item::anchors.top}{anchors property}.
-
-\snippet qml/usecases/layouts.qml import
-\snippet qml/usecases/layouts.qml anchors
-
-\image qml-uses-layouts-anchors.png
-
-
-\section1 Positioners
-
-For the common case of wanting to position a set of types in a regular pattern, Qt Quick provides some positioner
-types. Items placed in a positioner are automatically positioned in some way; for example, a \l Row positions items to be
-horizontally adjacent (forming a row).
-
-For full details see \l {Item Layouts} and the documentation for \l{qtquick-qmltypereference.html#positioning}{the positioner types}.
-
-\snippet qml/usecases/layouts.qml import
-\snippet qml/usecases/layouts.qml positioners
-
-\image qml-uses-layouts-positioners.png
-
-*/
diff --git a/src/quick/doc/src/appdevguide/usecases/styling.qdoc b/src/quick/doc/src/appdevguide/usecases/styling.qdoc
deleted file mode 100644
index 68b8d0302c..0000000000
--- a/src/quick/doc/src/appdevguide/usecases/styling.qdoc
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
-\page qtquick-usecase-styling.html
-\title Use Case - Style And Theme Support
-\brief Example of how to style user interface components in QML
-
-The types provided in the QtQuick module are not complete user interface components on their own. A common use case is to
-develop a set of custom styled user interface components out of the types in the QtQuick module. This is easily
-accomplished by creating your own reusable components.
-
-With the reusable components approach, you define your own type with the appearance you want to have in your
-application and style that type directly. You then use that type in your application instead of the unstyled type. For
-example, you could create a MyText.qml which is a Text type with certain properties set by default, and use MyText
-instead of Text elsewhere in your application.
-
-\section1 Example Themed Text
-\section2 Button Definition
-\snippet qml/usecases/MyText.qml 0
-\section2 Using the Text
-\snippet qml/usecases/styling-text.qml texts
-\image qml-uses-styling-text.png
-
-Because the root item in MyText.qml is a Text item it will behave as a
-Text item, and the properties can be overriden in specific uses. However, the properties will be set to the values
-specified in MyText when the item is first generated, thus applying your style by default.
-
-For pre-styled user interface components, see the \c{Qt Components} add-on which provides a set of components.
-For accessing the system theme, see the \l{SystemPalette} type documentation.
-
-\section1 Example Themed Button
-\section2 Button Definition
-\snippet qml/usecases/Button.qml 0
-\section2 Using the Button
-\snippet qml/usecases/styling.qml 0
-\image qml-uses-styling.png
-
-For more examples of creating custom UI components in QML, see the tutorials.
-*/
diff --git a/src/quick/doc/src/appdevguide/usecases/text.qdoc b/src/quick/doc/src/appdevguide/usecases/text.qdoc
deleted file mode 100644
index d0b8901170..0000000000
--- a/src/quick/doc/src/appdevguide/usecases/text.qdoc
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
-\page qtquick-usecase-text.html
-\title Use Case - Displaying Text In QML
-\brief Example of how to display text in QML
-To display text the Text type is provided by the QtQuick module. For related uses, the \l{TextInput} and
-\l{TextEdit} types provide editable text controls. For full HTML markup, see the \c{QtWebkit} module.
-
-\section1 Displaying and Formatting Text
-
-To display text in QML, create a Text item and set the text property to the text you wish to display. The Text item
-will now display that text.
-
-Several properties can be set on the Text item to style the entire block of text. These include color, font family,
-font size, bold and italic. For a full list of properties, consult the \l{Text} type documentation.
-
-Rich text like markup can be used to selectively style specific sections of text with a Text item. Set \l
-Text::textFormat to Text.StyledText to use this functionality. More details are available in the documentation of the
-\l{Text} type.
-
-\section1 Laying out Text
-
-By default, Text will display the text as a single line unless it contains embedded newlines. To wrap the line, set the
-wrapMode property and give the text an explicit width for it to wrap to. If the width or height is not explicitly set,
-reading these properties will return the parameters of the bounding rect of the text (if you have explicitly set width
-or height, you can still use paintedWidth and paintedHeight). With these parameters in mind, the Text can be positioned
-like any other Item.
-
-\section1 Example Code
-\snippet qml/usecases/text.qml 0
-\image qml-uses-text.png
-
-*/
diff --git a/src/quick/doc/src/appdevguide/usecases/userinput.qdoc b/src/quick/doc/src/appdevguide/usecases/userinput.qdoc
deleted file mode 100644
index 1e20f9d275..0000000000
--- a/src/quick/doc/src/appdevguide/usecases/userinput.qdoc
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
-\page qtquick-usecase-userinput.html
-\title Use Case - Responding To User Input in QML
-\brief Example of how to accept user input and respond to it in a QML application
-
-\section1 Supported Types of User Input
-
-The \l QtQuick module provides support for the most common types of user input,
-including mouse and touch events, text input and key-press events. Other
-modules provide support for other types of user input (for example, the
-\l QtSensors module provides support for shake-gestures in QML applications).
-
-This article covers how to handle basic user input; for further information
-about motion-gesture support, please see the \l QtSensors documentation. For
-information about audio-visual input, please see the \l QtMultimedia documentation.
-
-\section2 Mouse and Touch Events
-
-The \l MouseArea type allows mouse and touch events to be handled in a QML
-application. A \l MouseArea can be combined with either an \l Image or a
-\l Rectangle and \l Text object to implement a simple button.
-
-\snippet qml/usecases/userinput.qml 0
-
-For more advanced use cases requiring multiple touch points, please read the
-documentation for the \l MultiPointTouchArea type and the \l PinchArea type.
-
-Note that some types have their own built in input handling. For example,
-\l Flickable responds to mouse dragging, mouse wheel scrolling, touch dragging,
-and touch flicking by default.
-
-\section2 Keyboard and Button Events
-
-Button and key presses, from buttons on a device, a keypad, or a keyboard,
-can all be handled using the \l Keys attached property. This attached property
-is available on all \l Item derived types, and works with the \l Item::focus property
-to determine which type receives the key event. For simple key handling, you can set the focus
-to true on a single \l Item and do all your key handling there.
-
-\snippet qml/usecases/userinput-keys.qml 0
-
-For text input the \l QtQuick module provides several built-in types.
-In particular, the \l TextInput and \l TextEdit types allow for single-line
-entry and multi-line editing respectively.
-
-Here is all you need to get a working TextInput:
-
-\code
-import QtQuick 2.0
-
-TextInput {
- focus: true
- text: "Initial Text"
-}
-\endcode
-
-*/
diff --git a/src/quick/doc/src/appdevguide/usecases/visual.qdoc b/src/quick/doc/src/appdevguide/usecases/visual.qdoc
deleted file mode 100644
index a022b185fe..0000000000
--- a/src/quick/doc/src/appdevguide/usecases/visual.qdoc
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/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: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
-\page qtquick-usecase-visual.html
-\title Use Case - Visual Elements In QML
-\brief Example of how to display visual item types in a QML application
-
-\section1 The Rectangle Type
-
-For the most basic of visuals, QtQuick provides a \l Rectangle type to draw rectangles. These rectangles can be colored with a
-color or a vertical gradient. The \l Rectangle type can also draw borders on the rectangle.
-
-For drawing custom shapes beyond rectangles, see the \l Canvas type or display
-a pre-rendered image using the \l Image type.
-
-\snippet qml/usecases/visual-rects.qml 0
-\image qml-uses-visual-rectangles.png
-
-\section1 The Image Type
-
-QtQuick provides an \l Image type which may be used to display images. The
-\l Image type has a \l source property whose value can be a remote or local
-URL, or the URL of an image file embedded in a compiled resource file.
-
-\snippet qml/usecases/visual.qml image
-
-For more complex images there are other types similar to \l Image.
-\l BorderImage draws an image with grid scaling, suitable for images used as
-borders. \l AnimatedImage plays animated .gif and .mng images. \l AnimatedSprite
-and \l SpriteSequence play animations comprised of multiple frames stored adjacently
-in a non animated image format.
-
-For displaying video files and camera data, see the \l QtMultimedia module.
-
-\section1 Shared Visual Properties
-
-All visual items provided by the QtQuick are based on the Item type, which provides a common set of attributes for
-visual items, including opacity and transform attributes.
-
-\section2 Opacity and Visibility
-
-The QML object types provided by Qt Quick have built-in support for \l{Item::opacity}{opacity}.
-Opacity can be animated to allow smooth transitions to or from a transparent
-state. Visibility can also be managed with the \l{Item::visible}{visible} property more efficiently,
-but at the cost of not being able to animate it.
-
-\snippet qml/usecases/visual-opacity.qml 0
-\image qml-uses-visual-opacity.png
-
-\section2 Transforms
-
-Qt Quick types have built-in support for transformations. If you wish to have your
-visual content rotated or scaled, you can set the \l Item::rotation or \l Item::scale
-property. These can also be animated.
-
-\snippet qml/usecases/visual-transforms.qml 0
-\image qml-uses-visual-transforms.png
-
-For more complex transformations, see the \l Item::transform property.
-
-*/