on xenial help sign in
Add docs.
c8c5ca7Michał Sawicz
qml/Dash/CardTool.qml+18
@@ -16,9 +16,21 @@
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18
18
19+/*! \brief Tool for introspecting Card properties.
20+
21+ Some properties of Cards we need to determine category-wide (like card sizes in grid),
22+ so we should not do them per-Card but in the category renderer.
23+
24+ This component creates an invisible card filled with maximum mapped data and calculates
25+ or measures card properties for this configuration.
26+ */
27+
19Item {
28Item {
20 id: cardTool
29 id: cardTool
30+ /// Template supplied for the category.
21 property var template
31 property var template
32+
33+ /// Component mapping supplied for the category.
22 property var components
34 property var components
23
35
24 // FIXME: Saviq
36 // FIXME: Saviq
@@ -28,6 +40,9 @@ Item {
28 height: 0
40 height: 0
29 clip: true
41 clip: true
30
42
43+ /// type:real \brief Width to be enforced on the card in this configuration.
44+ ///
45+ /// If undefined, should use implicit width of the actual card.
31 property var cardWidth: {
46 property var cardWidth: {
32 switch (template !== undefined && template["category-layout"]) {
47 switch (template !== undefined && template["category-layout"]) {
33 case "grid":
48 case "grid":
@@ -46,6 +61,9 @@ Item {
46 }
61 }
47 }
62 }
48
63
64+ /// type:real \brief Height to be enforced on the card in this configuration.
65+ ///
66+ /// If undefined, should use implicit height of the actual card.
49 property var cardHeight: {
67 property var cardHeight: {
50 switch (template !== undefined && template["category-layout"]) {
68 switch (template !== undefined && template["category-layout"]) {
51 case "journal":
69 case "journal":