3 Star 0 Fork 1

wjzhe / SchweizerMesser

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ScopeView.qml 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
import QtQuick 2.7
import QtCharts 2.1
ChartView {
id: chartView;
property alias axisX: axisX;
animationOptions: ChartView.NoAnimation;
theme: ChartView.ChartThemeDark;
Component.onCompleted: {
dataSource.dataDepth = axisX.max + 1;
// dataSource.saveData("15 00 12 00 15 00 12 00 15 00 12 00 15 00 12 00 15 00 12 00 15 00 12 00 15 00 12 00 ");
// dataSource.saveData("15 00 12 00 15 00 12 00 15 00 12 00 15 00 12 00 15 00 12 00 15 00 12 00 15 00 12 00 ");
}
ValueAxis {
id: axisY1;
min: 0;
max: 4;
labelFormat: "%.2f V";
tickCount: 11;
}
// for signal 2
// ValueAxis {
// id: axisY2;
// min: -10;
// max: 5;
// }
ValueAxis {
id: axisX;
min: 0;
max: 128;
labelFormat: "%.1f ms";
}
// signal 1
LineSeries {
id: lineSeries1;
name: "signal 1";
axisX: axisX;
axisY: axisY1;
useOpenGL: true;
}
Timer {
id: refreshTimer;
interval: 100; // 1000 ms for test
running: true;
repeat: true;
onTriggered: {
dataSource.update(chartView.series(0));
parent.voltage = dataSource.voltage.toString();
}
}
}
C++
1
https://gitee.com/null_446_4477/schweizermesser.git
git@gitee.com:null_446_4477/schweizermesser.git
null_446_4477
schweizermesser
SchweizerMesser
master

搜索帮助