@@ -18,7 +18,21 @@ import QtQuick 2.0
18import Ubuntu.Components 0.1
18import Ubuntu.Components 0.1
19import "../../Components"
19import "../../Components"
21−/*! \brief Preview widget for rating. */
21+/*! \brief Preview widget for rating.
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)}.
23PreviewWidget {
37PreviewWidget {
@@ -42,7 +56,7 @@ PreviewWidget {
42 left: parent.left
56 left: parent.left
43 right: parent.right
57 right: parent.right
45− height: childrenRect.height
59+ implicitHeight: rating.height
46 visible: widgetData["visible"] !== "review"
60 visible: widgetData["visible"] !== "review"