KNewStuff
12import QtQuick.Controls 2.11 as QtControls
13import QtQuick.Layouts 1.11 as QtLayouts
15import org.kde.kirigami 2.7 as Kirigami
17import org.kde.newstuff 1.62 as NewStuff
25 property QtObject engine
30 property string entryAuthorId
34 property string entryProviderId
39 property string author
52 property alias reviewText: reviewLabel.text
60 property QtObject commentAuthor: NewStuff.Author {
61 engine: component.engine
62 providerId: component.entryProviderId
63 username: component.author
69 leftMargin: Kirigami.Units.largeSpacing
70 rightMargin: Kirigami.Units.largeSpacing
74 model: component.depth
76 QtLayouts.Layout.fillHeight: true
77 QtLayouts.Layout.minimumWidth: Kirigami.Units.largeSpacing
78 QtLayouts.Layout.maximumWidth: Kirigami.Units.largeSpacing
79 color: Qt.tint(Kirigami.Theme.textColor, Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.8))
87 color: Kirigami.Theme.backgroundColor
92 QtLayouts.ColumnLayout {
94 visible: component.depth === 0
95 QtLayouts.Layout.fillWidth: true
96 QtLayouts.Layout.minimumHeight: Kirigami.Units.largeSpacing
97 QtLayouts.Layout.maximumHeight: Kirigami.Units.largeSpacing
101 QtLayouts.Layout.fillWidth: true
104 QtLayouts.RowLayout {
105 visible: (component.title !== "" || component.score !== 0)
106 QtLayouts.Layout.fillWidth: true
107 QtLayouts.Layout.leftMargin: Kirigami.Units.largeSpacing
112 QtLayouts.Layout.fillWidth: true
116 rating: component.score
120 QtLayouts.Layout.minimumWidth: Kirigami.Units.largeSpacing
121 QtLayouts.Layout.maximumWidth: Kirigami.Units.largeSpacing
127 QtLayouts.Layout.fillWidth: true
128 QtLayouts.Layout.leftMargin: Kirigami.Units.largeSpacing
129 QtLayouts.Layout.rightMargin: Kirigami.Units.largeSpacing
133 QtLayouts.RowLayout {
134 QtLayouts.Layout.fillWidth: true
136 QtLayouts.Layout.fillWidth: true
140 visible: (url !== "")
141 url: (component.commentAuthor.homepage === "") ? component.commentAuthor.profilepage : component.commentAuthor.homepage
142 text: (component.author === component.entryAuthorId) ? i18ndc("knewstuff6", "The author label
in case the comment
was written
by the author
of the content entry
the comment is
attached to
", "%1 <
i>(author)</
i>
", component.commentAuthor.name) : component.commentAuthor.name
145 visible: !authorLabel.visible
146 text: authorLabel.text
150 QtLayouts.Layout.maximumWidth: height
151 QtLayouts.Layout.minimumWidth: height
152 QtLayouts.Layout.preferredHeight: Kirigami.Units.iconSizes.medium
153 fillMode: Image.PreserveAspectFit
154 source: component.commentAuthor.avatarUrl
156 anchors.fill: parent;
159 opacity: authorIcon.status == Image.Ready ? 0 : 1
160 Behavior on opacity { NumberAnimation { duration: Kirigami.Units.shortDuration; } }
164 QtLayouts.Layout.minimumWidth: Kirigami.Units.largeSpacing
165 QtLayouts.Layout.maximumWidth: Kirigami.Units.largeSpacing
169 QtLayouts.Layout.fillWidth: true
170 QtLayouts.Layout.minimumHeight: Kirigami.Units.largeSpacing
171 QtLayouts.Layout.maximumHeight: Kirigami.Units.largeSpacing
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:21:35 by
doxygen 1.10.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.