Kirigami-addons

AlbumModelItem.qml
1// SPDX-FileCopyrightText: 2023 James Graham <james.h.graham@protonmail.com>
2// SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
3
4import QtQuick
5
6/**
7 * @brief An object container for defining content items to show in a AlbumMaximizeComponent.
8 *
9 * The intended use is that a list of these can be used as the ListView model for
10 * a AlbumMaximizeComponent.
11 *
12 * Example definition:
13 * @code
14 * property list<AlbumModelItem> model: [
15 * AlbumModelItem {
16 * type: AlbumModelItem.Image
17 * source: "path/to/source"
18 * tempSource: "path/to/tempSource"
19 * },
20 * AlbumModelItem {
21 * type: AlbumModelItem.Video
22 * source: "path/to/source"
23 * tempSource: "path/to/tempSource"
24 * }
25 * ]
26 * @endcode
27 *
28 */
29QtObject {
30 id: root
31
32 enum Type {
33 Image,
34 Video
35 }
36
37 /**
38 * @brief The delegate type that should be shown for this item.
39 *
40 * Possible values:
41 * - AlbumModelItem.Image - Show an image delegate (including GIFs).
42 * - AlbumModelItem.Video - Show a video delegate.
43 */
44 property int type
45
46 /**
47 * @brief The source for the item.
48 */
49 property string source
50
51 /**
52 * @brief Source for the temporary content.
53 *
54 * Typically used when downloading the image to show a thumbnail or other
55 * temporary image while the main image downloads.
56 */
57 property string tempSource: ""
58
59 /**
60 * @brief The caption for the item.
61 *
62 * Typically set to the filename if no caption is available.
63 */
64 property string caption: ""
65
66 /**
67 * @brief The height of the source image.
68 *
69 * Used to calculate the aspect ratio of the image.
70 */
71 property real sourceHeight: 0
72
73 /**
74 * @brief The width of the source image.
75 *
76 * Used to calculate the aspect ratio of the image.
77 */
78 property real sourceWidth: 0
79}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:12:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.