aboutsummaryrefslogtreecommitdiffstats
path: root/doc/qtdesignstudio/src/components/qtquick-pathview-editor.qdocinc
blob: caa10dabb05e26b864c2875684a677c710e44d9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
//! [pathview]

    \section1 Path View

    A \uicontrol {Path View} component lays out data provided by data models
    on a \l{Path}.

    A graphical spline editor enables you to specify path view paths, which
    is a non-trivial task to do in \uicontrol {Text Editor}.

    \image qmldesigner-pathview-editor.png "Path View editor"

    To start editing the path, double-click the path view in
    \l {Form Editor}. The editor composes the path of PathCubic path
    objects. They are cubic Bezier curves to a given position with two control
    points. Drag and drop the control points in \uicontrol {Form Editor} to
    construct the curve.

    In addition, PathLine and PathQuad path objects are supported indirectly.
    To make a curve segment linear, select \uicontrol {Make Curve Segment Straight} in
    the context menu.

    By default, the path is closed, which means that its start and end points
    are identical. To create separate start and end points for it, right-click
    an edit point to open a context menu, and deselect \uicontrol {Closed Path}.

    To add intermediary points to a curve segment, select \uicontrol {Split Segment}
    in the context menu.

    In the \uicontrol {Path View} section, you can specify other properties for
    the path view. The value of the \uicontrol {Drag margin} field specifies
    the maximum distance from the path that initiates mouse dragging.

    \image qtquick-designer-pathview-properties.png "Path View properties"

    Select the \uicontrol Interactive check box to make an item flickable.
    The value of the \uicontrol {Flick deceleration} field specifies the
    rate at which a flick will decelerate.

    In the \uicontrol Offset field, specify how far along the path the items
    are from their initial positions. This is a real number that ranges from
    0 to the value of the \uicontrol {Item count} field, which displays the
    number of items in the model.

    In the \uicontrol {Path View Highlight} section, you can specify properties
    for \l{View Highlight}{highlighting} path objects.

    \if defined(qtdesignstudio)
    \note You can also use the \l {SVG Path Item} Studio Component to specify an
    SVG path data string that draws a path.
    \endif

//! [pathview]

//! [svgpath]

    \section1 SVG Path Item

    The \uicontrol {SVG Path Item} component uses an SVG path data string to
    draw a path as a line.

    Setting path colors is described in \l {Picking Colors}.

    The stroke property values that specify the appearance of the path are
    described in \l{Strokes}.

    \image studio-svgpath-properties.png "SVG Path Item properties"

    The \uicontrol {Path data} field in the \uicontrol {Path Info} section
    contains the SVG path data string that specifies the path. For more
    information, see \l{https://www.w3.org/TR/SVG/paths.html#PathData}
    {W3C SVG Path Data}.

//! [svgpath]
*/