12import QtQuick.Controls as QQC2
15import org.kde.kirigami as Kirigami
17import org.kde.newstuff as NewStuff
25 property NewStuff.Engine engine
30 property string entryAuthorId
34 property string entryProviderId
39 property string author
52 property alias reviewText: reviewLabel.text
60 property NewStuff.Author commentAuthor: NewStuff.Author {
61 engine: component.engine
62 providerId: component.entryProviderId
63 username: component.author
67 model: component.depth
69 Layout.fillHeight: true
70 Layout.minimumWidth: Kirigami.Units.largeSpacing
71 Layout.maximumWidth: Kirigami.Units.largeSpacing
72 color: Qt.tint(Kirigami.Theme.textColor, Qt.alpha(Kirigami.Theme.backgroundColor, 0.8))
80 color: Kirigami.Theme.backgroundColor
87 visible: component.depth === 0
88 Layout.fillWidth: true
89 Layout.minimumHeight: Kirigami.Units.largeSpacing
90 Layout.maximumHeight: Kirigami.Units.largeSpacing
94 Layout.fillWidth: true
98 visible: (component.title !== "" || component.score !== 0)
99 Layout.fillWidth: true
100 Layout.leftMargin: Kirigami.Units.largeSpacing
103 text: ((component.title === "
") ? i18ndc("knewstuff6
", "Placeholder title
for when a comment has no subject, but does have a rating
", "<i>(no title)</i>
") : component.title)
105 Layout.fillWidth: true
109 rating: component.score
113 Layout.minimumWidth: Kirigami.Units.largeSpacing
114 Layout.maximumWidth: Kirigami.Units.largeSpacing
120 Layout.fillWidth: true
121 Layout.leftMargin: Kirigami.Units.largeSpacing
122 Layout.rightMargin: Kirigami.Units.largeSpacing
127 Layout.fillWidth: true
129 Layout.fillWidth: true
134 url: (component.commentAuthor.homepage === "") ? component.commentAuthor.profilepage : component.commentAuthor.homepage
135 text: (component.author === component.entryAuthorId)
136 ? 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)
137 : component.commentAuthor.name
140 visible: !authorLabel.visible
141 text: authorLabel.text
145 Layout.maximumWidth: height
146 Layout.minimumWidth: height
147 Layout.preferredHeight: Kirigami.Units.iconSizes.medium
148 fillMode: Image.PreserveAspectFit
149 source: component.commentAuthor.avatarUrl
154 opacity: authorIcon.status === Image.Ready ? 0 : 1
155 Behavior on opacity { NumberAnimation { duration: Kirigami.Units.shortDuration; } }
159 Layout.minimumWidth: Kirigami.Units.largeSpacing
160 Layout.maximumWidth: Kirigami.Units.largeSpacing
164 Layout.fillWidth: true
165 Layout.minimumHeight: Kirigami.Units.largeSpacing
166 Layout.maximumHeight: Kirigami.Units.largeSpacing
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:07:37 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.