on xenial help sign in
Added comments
commit2d3c8dc8c03e2c979d3471f3e3ab55feb40202c5 authorAndrea Cimitan <andrea.cimitan@gmail.com> dateThu 13 Feb 2014, 17:12 (13 years ago) parent56f8ab5
1 file changed+16−2
qml/Dash/Previews/PreviewRating.qml+16−2
qml/Dash/Previews/PreviewRating.qml+16−2
@@ -18,7 +18,21 @@ import QtQuick 2.0
1818import Ubuntu.Components 0.1
1919import "../../Components"
2020
21−/*! \brief Preview widget for rating. */
21+/*! \brief Preview widget for rating.
22+
23+ The widget can show a rating widget and a field to enter a comment.
24+ The visibility of the two widgets is specified by widgetData["visible"],
25+ accepting "both", "rating" or "review".
26+ The requirement of the review is specified by widgetData["visible"],
27+ accepting "both", "rating" or "review".
28+ It is possible to customise labels, widgetData["rating-label"] for the rating,
29+ widgetData["rewiew-label"] for the comment field and widgetData["submit-label"]
30+ for the submit button.
31+ The icons used in the rating widget can be customised with
32+ widgetData["rating-icon-empty"] and widgetData["rating-icon-full"].
33+ The successeful submit emits triggered(widgetId, widgetData["required"], data),
34+ with data being {"rating": rating value, "review": review comment, "author": null (for now)}.
35+*/
2236
2337PreviewWidget {
2438 id: root
@@ -42,7 +56,7 @@ PreviewWidget {
4256 left: parent.left
4357 right: parent.right
4458 }
45− height: childrenRect.height
59+ implicitHeight: rating.height
4660 visible: widgetData["visible"] !== "review"
4761
4862 Label {