@@ -0,0 +1,35 | |||
|
1 | /**************************************************************************** | |
|
2 | ** | |
|
3 | ** Copyright (C) 2012 Digia Plc | |
|
4 | ** All rights reserved. | |
|
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com | |
|
6 | ** | |
|
7 | ** This file is part of the Qt Commercial Charts Add-on. | |
|
8 | ** | |
|
9 | ** $QT_BEGIN_LICENSE$ | |
|
10 | ** Licensees holding valid Qt Commercial licenses may use this file in | |
|
11 | ** accordance with the Qt Commercial License Agreement provided with the | |
|
12 | ** Software or, alternatively, in accordance with the terms contained in | |
|
13 | ** a written agreement between you and Digia. | |
|
14 | ** | |
|
15 | ** If you have questions regarding the use of this file, please use | |
|
16 | ** contact form at http://qt.digia.com | |
|
17 | ** $QT_END_LICENSE$ | |
|
18 | ** | |
|
19 | ****************************************************************************/ | |
|
20 | ||
|
21 | import QtQuick 1.0 | |
|
22 | ||
|
23 | Flow { | |
|
24 | property variant chart | |
|
25 | anchors.fill: parent | |
|
26 | flow: Flow.TopToBottom | |
|
27 | spacing: 5 | |
|
28 | ||
|
29 | FontEditor { | |
|
30 | fontDescription: "title" | |
|
31 | function editedFont() { | |
|
32 | return chart.titleFont; | |
|
33 | } | |
|
34 | } | |
|
35 | } |
@@ -23,12 +23,24 import QtQuick 1.0 | |||
|
23 | 23 | Item { |
|
24 | 24 | id: chartEditor |
|
25 | 25 | property variant series // TODO: rename to chart |
|
26 |
onSeriesChanged: |
|
|
26 | onSeriesChanged: { | |
|
27 | if (loader.item != undefined) | |
|
28 | loader.item.chart = series; | |
|
29 | } | |
|
30 | ||
|
31 | function selectButton(button) { | |
|
32 | chartButton.color = "#79bd8f"; | |
|
33 | titleButton.color = "#79bd8f"; | |
|
34 | legendButton.color = "#79bd8f"; | |
|
35 | axisXButton.color = "#79bd8f"; | |
|
36 | axisYButton.color = "#79bd8f"; | |
|
37 | button.color = "#00a388"; | |
|
38 | } | |
|
27 | 39 | |
|
28 | 40 | Flow { |
|
29 | 41 | id: selectorFlow |
|
30 | 42 | anchors.top: parent.top |
|
31 |
height: |
|
|
43 | height: 90 | |
|
32 | 44 | anchors.left: parent.left |
|
33 | 45 | anchors.right: parent.right |
|
34 | 46 | spacing: 5 |
@@ -39,11 +51,18 Item { | |||
|
39 | 51 | text: "Chart properties" |
|
40 | 52 | unpressedColor: "#79bd8f" |
|
41 | 53 | onClicked: { |
|
42 | color = "#00a388"; | |
|
43 | legendButton.color = "#79bd8f"; | |
|
44 | axisXButton.color = "#79bd8f"; | |
|
45 | axisYButton.color = "#79bd8f"; | |
|
46 | loader.source = "ChartEditor1.qml"; | |
|
54 | selectButton(chartButton); | |
|
55 | loader.source = "ChartEditorProperties.qml"; | |
|
56 | loader.item.chart = series; | |
|
57 | } | |
|
58 | } | |
|
59 | Button { | |
|
60 | id: titleButton | |
|
61 | text: "Title properties" | |
|
62 | unpressedColor: "#79bd8f" | |
|
63 | onClicked: { | |
|
64 | selectButton(titleButton); | |
|
65 | loader.source = "ChartEditorTitle.qml"; | |
|
47 | 66 | loader.item.chart = series; |
|
48 | 67 | } |
|
49 | 68 | } |
@@ -52,11 +71,8 Item { | |||
|
52 | 71 | text: "Legend properties" |
|
53 | 72 | unpressedColor: "#79bd8f" |
|
54 | 73 | onClicked: { |
|
55 | color = "#00a388"; | |
|
56 | chartButton.color = "#79bd8f"; | |
|
57 | axisXButton.color = "#79bd8f"; | |
|
58 | axisYButton.color = "#79bd8f"; | |
|
59 | loader.source = "ChartEditor2.qml"; | |
|
74 | selectButton(legendButton); | |
|
75 | loader.source = "ChartEditorLegend.qml"; | |
|
60 | 76 | loader.item.chartLegend = series.legend; |
|
61 | 77 | } |
|
62 | 78 | } |
@@ -65,11 +81,8 Item { | |||
|
65 | 81 | text: "Axis X properties" |
|
66 | 82 | unpressedColor: "#79bd8f" |
|
67 | 83 | onClicked: { |
|
68 | color = "#00a388"; | |
|
69 | chartButton.color = "#79bd8f"; | |
|
70 | legendButton.color = "#79bd8f"; | |
|
71 | axisYButton.color = "#79bd8f"; | |
|
72 | loader.source = "ChartEditor3.qml"; | |
|
84 | selectButton(axisXButton); | |
|
85 | loader.source = "ChartEditorAxis.qml"; | |
|
73 | 86 | loader.item.axis = series.axisX; |
|
74 | 87 | } |
|
75 | 88 | } |
@@ -78,11 +91,8 Item { | |||
|
78 | 91 | text: "Axis Y properties" |
|
79 | 92 | unpressedColor: "#79bd8f" |
|
80 | 93 | onClicked: { |
|
81 | color = "#00a388"; | |
|
82 | chartButton.color = "#79bd8f"; | |
|
83 | legendButton.color = "#79bd8f"; | |
|
84 | axisXButton.color = "#79bd8f"; | |
|
85 | loader.source = "ChartEditor3.qml"; | |
|
94 | selectButton(axisYButton); | |
|
95 | loader.source = "ChartEditorAxis.qml"; | |
|
86 | 96 | loader.item.axis = series.axisY; |
|
87 | 97 | } |
|
88 | 98 | } |
@@ -95,5 +105,4 Item { | |||
|
95 | 105 | anchors.left: parent.left |
|
96 | 106 | anchors.right: parent.right |
|
97 | 107 | } |
|
98 | ||
|
99 | 108 | } |
@@ -26,7 +26,6 Row { | |||
|
26 | 26 | property variant axis |
|
27 | 27 | |
|
28 | 28 | Flow { |
|
29 | id: flow | |
|
30 | 29 | spacing: 5 |
|
31 | 30 | flow: Flow.TopToBottom |
|
32 | 31 |
|
1 | NO CONTENT: file renamed from tests/qmlchartproperties/qml/qmlchartproperties/ChartEditor2.qml to tests/qmlchartproperties/qml/qmlchartproperties/ChartEditorLegend.qml |
@@ -20,12 +20,9 | |||
|
20 | 20 | |
|
21 | 21 | import QtQuick 1.0 |
|
22 | 22 | |
|
23 |
|
|
|
23 | Flow { | |
|
24 | 24 | anchors.fill: parent |
|
25 | spacing: 5 | |
|
26 | 25 | property variant chart |
|
27 | ||
|
28 | Flow { | |
|
29 | 26 |
|
|
30 | 27 |
|
|
31 | 28 |
|
@@ -121,12 +118,3 Row { | |||
|
121 | 118 |
|
|
122 | 119 |
|
|
123 | 120 | } |
|
124 | ||
|
125 | FontEditor { | |
|
126 | id: fontEditor | |
|
127 | fontDescription: "title" | |
|
128 | function editedFont() { | |
|
129 | return chart.titleFont; | |
|
130 | } | |
|
131 | } | |
|
132 | } |
@@ -34,7 +34,7 Flow { | |||
|
34 | 34 | onClicked: editedFont().capitalization++; |
|
35 | 35 | } |
|
36 | 36 | Button { |
|
37 | text: fontDescription + " family" | |
|
37 | text: fontDescription + " font family" | |
|
38 | 38 | onClicked: editedFont().family = "courier"; |
|
39 | 39 | } |
|
40 | 40 | Button { |
@@ -18,12 +18,13 | |||
|
18 | 18 | <file>qml/qmlchartproperties/PercentBarChart.qml</file> |
|
19 | 19 | <file>qml/qmlchartproperties/Chart.qml</file> |
|
20 | 20 | <file>qml/qmlchartproperties/ChartEditor.qml</file> |
|
21 | <file>qml/qmlchartproperties/ChartEditor1.qml</file> | |
|
22 | <file>qml/qmlchartproperties/ChartEditor2.qml</file> | |
|
23 | <file>qml/qmlchartproperties/ChartEditor3.qml</file> | |
|
24 | 21 | <file>qml/qmlchartproperties/FontEditor.qml</file> |
|
25 | 22 | <file>qml/qmlchartproperties/HorizontalBarChart.qml</file> |
|
26 | 23 | <file>qml/qmlchartproperties/HorizontalPercentBarChart.qml</file> |
|
27 | 24 | <file>qml/qmlchartproperties/HorizontalStackedBarChart.qml</file> |
|
25 | <file>qml/qmlchartproperties/ChartEditorAxis.qml</file> | |
|
26 | <file>qml/qmlchartproperties/ChartEditorLegend.qml</file> | |
|
27 | <file>qml/qmlchartproperties/ChartEditorProperties.qml</file> | |
|
28 | <file>qml/qmlchartproperties/ChartEditorTitle.qml</file> | |
|
28 | 29 | </qresource> |
|
29 | 30 | </RCC> |
General Comments 0
You need to be logged in to leave comments.
Login now