mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-02-09 08:15:41 +08:00
Compare commits
No commits in common. "655eff4f62ae7957b17e0008cb19a563444d91c7" and "4cca680029611215b9c8a3913f3d4b015d5aa2c1" have entirely different histories.
655eff4f62
...
4cca680029
@ -1402,7 +1402,7 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
|
|||||||
<context>
|
<context>
|
||||||
<name>T_LineChart</name>
|
<name>T_LineChart</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/chart/T_LineChart.qml" line="11"/>
|
<location filename="qml/chart/T_LineChart.qml" line="10"/>
|
||||||
<source>Line Chart</source>
|
<source>Line Chart</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1500,7 +1500,7 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
|
|||||||
<context>
|
<context>
|
||||||
<name>T_LineChart</name>
|
<name>T_LineChart</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/chart/T_LineChart.qml" line="11"/>
|
<location filename="qml/chart/T_LineChart.qml" line="10"/>
|
||||||
<source>Line Chart</source>
|
<source>Line Chart</source>
|
||||||
<translation type="unfinished">线型图</translation>
|
<translation type="unfinished">线型图</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -7,9 +7,7 @@ import "../component"
|
|||||||
|
|
||||||
FluScrollablePage{
|
FluScrollablePage{
|
||||||
|
|
||||||
id: root
|
|
||||||
title: qsTr("Line Chart")
|
title: qsTr("Line Chart")
|
||||||
property var data : []
|
|
||||||
|
|
||||||
FluFrame{
|
FluFrame{
|
||||||
Layout.preferredWidth: 500
|
Layout.preferredWidth: 500
|
||||||
@ -17,14 +15,13 @@ FluScrollablePage{
|
|||||||
padding: 10
|
padding: 10
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
FluChart{
|
FluChart{
|
||||||
id: chart
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
chartType: 'line'
|
chartType: 'line'
|
||||||
chartData: { return {
|
chartData: { return {
|
||||||
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||||
datasets: [{
|
datasets: [{
|
||||||
label: 'My First Dataset',
|
label: 'My First Dataset',
|
||||||
data: root.data,
|
data: [65, 59, 80, 81, 56, 55, 40],
|
||||||
fill: false,
|
fill: false,
|
||||||
borderColor: 'rgb(75, 192, 192)',
|
borderColor: 'rgb(75, 192, 192)',
|
||||||
tension: 0.1
|
tension: 0.1
|
||||||
@ -44,20 +41,5 @@ FluScrollablePage{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Timer{
|
|
||||||
id: timer
|
|
||||||
interval: 300
|
|
||||||
repeat: true
|
|
||||||
onTriggered: {
|
|
||||||
root.data.push(Math.random()*100)
|
|
||||||
if(root.data.length>7){
|
|
||||||
root.data.shift()
|
|
||||||
}
|
|
||||||
chart.animateToNewData()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Component.onCompleted: {
|
|
||||||
timer.restart()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,7 @@ FluScrollablePage{
|
|||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
left: parent.left
|
left: parent.left
|
||||||
}
|
}
|
||||||
currentIndex: -1
|
currentIndex: 1
|
||||||
FluCheckBox{
|
FluCheckBox{
|
||||||
disabled: radio_button_switch4.checked
|
disabled: radio_button_switch4.checked
|
||||||
text: qsTr("Radio Button_1")
|
text: qsTr("Radio Button_1")
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
class FluTableModel : public QAbstractTableModel {
|
class FluTableModel : public QAbstractTableModel {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_PROPERTY_AUTO(int, dataSourceSize)
|
||||||
Q_PROPERTY_AUTO(QList<QVariantMap>, columnSource)
|
Q_PROPERTY_AUTO(QList<QVariantMap>, columnSource)
|
||||||
Q_PROPERTY_AUTO(QList<QVariantMap>, rows)
|
Q_PROPERTY_AUTO(QList<QVariantMap>, rows)
|
||||||
Q_PROPERTY(int rowCount READ rowCount CONSTANT)
|
Q_PROPERTY(int rowCount READ rowCount CONSTANT)
|
||||||
|
@ -18,9 +18,7 @@ Item{
|
|||||||
for(var i = 0;i<buttons.length;i++){
|
for(var i = 0;i<buttons.length;i++){
|
||||||
buttons[i].checked = false
|
buttons[i].checked = false
|
||||||
}
|
}
|
||||||
if(currentIndex>=0 && currentIndex<buttons.length){
|
buttons[currentIndex].checked = true
|
||||||
buttons[currentIndex].checked = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
implicitWidth: childrenRect.width
|
implicitWidth: childrenRect.width
|
||||||
@ -44,6 +42,9 @@ Item{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(control.currentIndex < 0){
|
||||||
|
control.currentIndex = 0
|
||||||
|
}
|
||||||
d.updateChecked()
|
d.updateChecked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -51,7 +52,7 @@ Item{
|
|||||||
Component{
|
Component{
|
||||||
id:com_horizontal
|
id:com_horizontal
|
||||||
RowLayout {
|
RowLayout {
|
||||||
data: control.buttons
|
data: buttons
|
||||||
spacing: control.spacing
|
spacing: control.spacing
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
for(var i = 0;i<control.buttons.length;i++){
|
for(var i = 0;i<control.buttons.length;i++){
|
||||||
@ -64,6 +65,9 @@ Item{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(control.currentIndex < 0){
|
||||||
|
control.currentIndex = 0
|
||||||
|
}
|
||||||
d.updateChecked()
|
d.updateChecked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,9 +19,7 @@ Item{
|
|||||||
for(var i = 0;i<buttons.length;i++){
|
for(var i = 0;i<buttons.length;i++){
|
||||||
buttons[i].checked = false
|
buttons[i].checked = false
|
||||||
}
|
}
|
||||||
if(currentIndex>=0 && currentIndex<buttons.length){
|
buttons[currentIndex].checked = true
|
||||||
buttons[currentIndex].checked = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
implicitWidth: childrenRect.width
|
implicitWidth: childrenRect.width
|
||||||
@ -45,6 +43,9 @@ Item{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(control.currentIndex < 0){
|
||||||
|
control.currentIndex = 0
|
||||||
|
}
|
||||||
d.updateChecked()
|
d.updateChecked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -52,7 +53,7 @@ Item{
|
|||||||
Component{
|
Component{
|
||||||
id:com_horizontal
|
id:com_horizontal
|
||||||
RowLayout {
|
RowLayout {
|
||||||
data: control.buttons
|
data: buttons
|
||||||
spacing: control.spacing
|
spacing: control.spacing
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
for(var i = 0;i<control.buttons.length;i++){
|
for(var i = 0;i<control.buttons.length;i++){
|
||||||
@ -65,6 +66,9 @@ Item{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(control.currentIndex < 0){
|
||||||
|
control.currentIndex = 0
|
||||||
|
}
|
||||||
d.updateChecked()
|
d.updateChecked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user