优化积分、微分
This commit is contained in:
parent
a25359713e
commit
ce5f541fb4
@ -422,6 +422,51 @@ double Calculation::Phase(QVector<double> & vecData)
|
|||||||
return Phase2 - Phase1;
|
return Phase2 - Phase1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Calculation::_Integration(QVector<double> & vecData,QVector<double>& retData,double& RMS)
|
||||||
|
{
|
||||||
|
QVector<double> realshiftfft;
|
||||||
|
QVector<double> imageshiftfft;
|
||||||
|
QVector<double> realvalue,imagevalue;
|
||||||
|
_FFT(vecData,realshiftfft,imageshiftfft);
|
||||||
|
|
||||||
|
for (int i = 0; i < 10; i++) {
|
||||||
|
realshiftfft[i] = 0;
|
||||||
|
imageshiftfft[i] = 0;
|
||||||
|
}
|
||||||
|
for (int i = 1000; i < realshiftfft.size(); i++) {
|
||||||
|
realshiftfft[i] = 0;
|
||||||
|
imageshiftfft[i] = 0;
|
||||||
|
}
|
||||||
|
qDebug()<< realshiftfft.size() << endl;
|
||||||
|
qDebug()<< imageshiftfft.size() << endl;
|
||||||
|
|
||||||
|
for(int k = 1; k < realshiftfft.size()+1;k++){
|
||||||
|
realvalue.push_back((realshiftfft.at(k-1)/(k*2*3.14))*1000 * 2);//单位转换mm/s,*1000 *2 精度损失
|
||||||
|
imagevalue.push_back((imageshiftfft.at(k-1)/(k*2*3.14))*1000 * 2);//单位转换mm/s,*1000
|
||||||
|
}
|
||||||
|
|
||||||
|
_iFFT(realvalue,imagevalue,retData);
|
||||||
|
|
||||||
|
float Sum = 0.0;
|
||||||
|
for(int j = 0; j < retData.size();j++){
|
||||||
|
float fData = retData[j]*retData[j];
|
||||||
|
Sum += fData;
|
||||||
|
}
|
||||||
|
|
||||||
|
RMS = sqrt(Sum/(float)retData.size()); //有效值
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Calculation::_Differentiation(QVector<double> & vecData,QVector<double>& retData)
|
||||||
|
{
|
||||||
|
retData.push_back(vecData[0]);
|
||||||
|
for(int j = 1; j < vecData.size()-3;j++)
|
||||||
|
{
|
||||||
|
retData.push_back((vecData.at(j+1)-vecData.at(j-1))/(double)(2*1/(double)vecData.size()));
|
||||||
|
}
|
||||||
|
retData.push_back(vecData.at(vecData.size()-1));
|
||||||
|
}
|
||||||
|
|
||||||
QVector<double> Calculation::ComputeDenCoeffs(int FilterOrder, double Lcutoff, double Ucutoff)
|
QVector<double> Calculation::ComputeDenCoeffs(int FilterOrder, double Lcutoff, double Ucutoff)
|
||||||
{
|
{
|
||||||
int k; // loop variables
|
int k; // loop variables
|
||||||
|
|||||||
@ -71,7 +71,10 @@ public:
|
|||||||
void _fft(QVector<double> & vecData, QVector<double> & vecFFTrealData,QVector<double> & vecFFTimageData);
|
void _fft(QVector<double> & vecData, QVector<double> & vecFFTrealData,QVector<double> & vecFFTimageData);
|
||||||
void _iFFT(QVector<double> & vecData, QVector<double> & vecFFTSpecData,QVector<double> & veciFFTData);
|
void _iFFT(QVector<double> & vecData, QVector<double> & vecFFTSpecData,QVector<double> & veciFFTData);
|
||||||
|
|
||||||
|
//积分
|
||||||
|
void _Integration(QVector<double> & vecData,QVector<double>& retData,double& RMS);
|
||||||
|
//微分
|
||||||
|
void _Differentiation(QVector<double> & vecData,QVector<double>& retData);
|
||||||
//包络图谱数据
|
//包络图谱数据
|
||||||
void envSpec(QVector<double> & vecData, QVector<double> & vecEnvSpecData,int StartFrequency,int EndFrequency,bool PolarPlot=false);
|
void envSpec(QVector<double> & vecData, QVector<double> & vecEnvSpecData,int StartFrequency,int EndFrequency,bool PolarPlot=false);
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,7 @@ ChildForm::ChildForm(FormType iType,QString m_strName,DEVICE_INFO* DeviceInfo,QW
|
|||||||
m_isconnect(false),
|
m_isconnect(false),
|
||||||
m_bRealTime(false),
|
m_bRealTime(false),
|
||||||
m_isPause(false),
|
m_isPause(false),
|
||||||
m_isStop(false)
|
m_isStop(true)
|
||||||
{
|
{
|
||||||
m_position = 0;
|
m_position = 0;
|
||||||
m_nStart = 0;
|
m_nStart = 0;
|
||||||
@ -224,6 +224,10 @@ ChildForm::ChildForm(FormType iType,QString m_strName,DEVICE_INFO* DeviceInfo,QW
|
|||||||
|
|
||||||
ChildForm::~ChildForm()
|
ChildForm::~ChildForm()
|
||||||
{
|
{
|
||||||
|
qDebug() << "~ChildForm" << endl;
|
||||||
|
if(!m_isStop){
|
||||||
|
emit InitWaveSig();
|
||||||
|
}
|
||||||
free(tracer);
|
free(tracer);
|
||||||
free(tracer2);
|
free(tracer2);
|
||||||
free(tracerLabel);
|
free(tracerLabel);
|
||||||
@ -273,7 +277,13 @@ void ChildForm::InitRpmDisPaly()
|
|||||||
}
|
}
|
||||||
m_bRpm = false;
|
m_bRpm = false;
|
||||||
}
|
}
|
||||||
|
void ChildForm::InitIntegration()
|
||||||
|
{
|
||||||
|
m_bIntegration = false;
|
||||||
|
m_bDifferentiation = false;
|
||||||
|
m_bDoubleIntegration = false;
|
||||||
|
m_bDoubleDifferentiation = false;
|
||||||
|
}
|
||||||
void ChildForm::InitWidget()
|
void ChildForm::InitWidget()
|
||||||
{
|
{
|
||||||
QMenu *ZoomMenu = new QMenu();
|
QMenu *ZoomMenu = new QMenu();
|
||||||
@ -590,6 +600,14 @@ void ChildForm::SecondData(const QString& strID,WAVE_DATA& waveData,WAVE_DISPALY
|
|||||||
waveShowData.Key.push_back(f);
|
waveShowData.Key.push_back(f);
|
||||||
waveShowData.wavedata_DC.push_back(waveData.waveDataRealTime.at(j));
|
waveShowData.wavedata_DC.push_back(waveData.waveDataRealTime.at(j));
|
||||||
}
|
}
|
||||||
|
if(m_bIntegration){
|
||||||
|
QVector<double> retValue;
|
||||||
|
double RMS = 0.0;
|
||||||
|
pCalculation->_Integration(waveShowData.wavedata,retValue,RMS);
|
||||||
|
QVector<double>().swap(waveShowData.wavedata);
|
||||||
|
waveShowData.wavedata = retValue;
|
||||||
|
waveShowData.RMS = RMS;
|
||||||
|
}
|
||||||
qDebug() << "waveShowData.wavedata_DC" << waveShowData.wavedata_DC.size()<< endl;
|
qDebug() << "waveShowData.wavedata_DC" << waveShowData.wavedata_DC.size()<< endl;
|
||||||
}else{
|
}else{
|
||||||
QVector<double> vecOutData;
|
QVector<double> vecOutData;
|
||||||
@ -1890,7 +1908,7 @@ void ChildForm::RemoveSeries(QString strID)
|
|||||||
qDebug()<<"::ChildForm::waveGraph" <<waveGraph.count();
|
qDebug()<<"::ChildForm::waveGraph" <<waveGraph.count();
|
||||||
|
|
||||||
m_isStop = true;
|
m_isStop = true;
|
||||||
|
InitIntegration();
|
||||||
InitRpmDisPaly();
|
InitRpmDisPaly();
|
||||||
if(m_iFormType == WaterFallPlot || m_iFormType == ShaftCenterline || m_iFormType == OrbitPlot || m_iFormType == PolarPlot){//瀑布图
|
if(m_iFormType == WaterFallPlot || m_iFormType == ShaftCenterline || m_iFormType == OrbitPlot || m_iFormType == PolarPlot){//瀑布图
|
||||||
|
|
||||||
@ -2642,6 +2660,13 @@ void ChildForm::RealTimeWave(QByteArray payLoad)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
QString strRMS = QString("Time(s) %1: %2 mm/s").arg( "RMS " ).arg(waveShowData.RMS);
|
||||||
|
|
||||||
|
if(m_bIntegration){
|
||||||
|
ui->widget->yAxis->setLabel("Velocity(mm/s)");
|
||||||
|
ui->widget->xAxis->setLabel(strRMS);
|
||||||
|
}
|
||||||
|
|
||||||
graph->rescaleValueAxis();
|
graph->rescaleValueAxis();
|
||||||
graph->setName(waveShowData.channleName);
|
graph->setName(waveShowData.channleName);
|
||||||
QPen pen;
|
QPen pen;
|
||||||
@ -2888,70 +2913,32 @@ void ChildForm::CalculateIntegration(bool isDoubleIntegration)
|
|||||||
{
|
{
|
||||||
ui->widget->clearGraphs();
|
ui->widget->clearGraphs();
|
||||||
QMap<QString,QCPGraph*>().swap(waveGraph);
|
QMap<QString,QCPGraph*>().swap(waveGraph);
|
||||||
QVector<double> x,y,y1,realvalue,imagevalue;
|
QVector<double> x,y;
|
||||||
QVector<double> temDCWave;
|
QVector<double> temDCWave;
|
||||||
QVector<double> temHanning;
|
|
||||||
QVector<double> AddHanning;
|
|
||||||
QVector<double> realshiftfft;
|
|
||||||
QVector<double> imageshiftfft;
|
|
||||||
QVector<double> ifft;
|
|
||||||
QMap<QString,WAVE_DISPALYDATA>::Iterator iter = mapWaveDisplayData.begin();
|
QMap<QString,WAVE_DISPALYDATA>::Iterator iter = mapWaveDisplayData.begin();
|
||||||
for (int i = 0; i < listChannelID.size(); ++i){
|
for (int i = 0; i < listChannelID.size(); ++i){
|
||||||
for(;iter != mapWaveDisplayData.end();iter++){
|
for(;iter != mapWaveDisplayData.end();iter++){
|
||||||
if(listChannelID.at(i) == iter.key()){
|
if(listChannelID.at(i) == iter.key()){
|
||||||
QVector<double>().swap(x);
|
QVector<double>().swap(x);
|
||||||
QVector<double>().swap(y);
|
QVector<double>().swap(y);
|
||||||
QVector<double>().swap(realvalue);
|
|
||||||
QVector<double>().swap(imagevalue);
|
|
||||||
QVector<double>().swap(temDCWave);
|
QVector<double>().swap(temDCWave);
|
||||||
QVector<double>().swap(realshiftfft);
|
|
||||||
QVector<double>().swap(imageshiftfft);
|
|
||||||
for(int j = 0; j < iter.value().SamleRate;j++){
|
for(int j = 0; j < iter.value().SamleRate;j++){
|
||||||
temDCWave.push_back(iter.value().wavedata.at(j) - iter.value().mean);
|
temDCWave.push_back(iter.value().wavedata.at(j) - iter.value().mean);
|
||||||
}
|
}
|
||||||
pCalculation->_FFT(temDCWave,realshiftfft,imageshiftfft);
|
double rms = 0.0;
|
||||||
|
|
||||||
for (int i = 0; i < 10; i++) {
|
|
||||||
realshiftfft[i] = 0;
|
|
||||||
imageshiftfft[i] = 0;
|
|
||||||
}
|
|
||||||
for (int i = 1000; i < realshiftfft.size(); i++) {
|
|
||||||
realshiftfft[i] = 0;
|
|
||||||
imageshiftfft[i] = 0;
|
|
||||||
}
|
|
||||||
qDebug()<< realshiftfft.size() << endl;
|
|
||||||
qDebug()<< imageshiftfft.size() << endl;
|
|
||||||
|
|
||||||
for(int k = 1; k < realshiftfft.size()+1;k++){
|
|
||||||
//qDebug()<< k << endl;
|
|
||||||
//x.push_back(k - 1);
|
|
||||||
realvalue.push_back((realshiftfft.at(k-1)/(k*2*3.14))*1000);//单位转换mm/s,*1000
|
|
||||||
imagevalue.push_back((imageshiftfft.at(k-1)/(k*2*3.14))*1000);//单位转换mm/s,*1000
|
|
||||||
}
|
|
||||||
double f = 0.0;
|
double f = 0.0;
|
||||||
|
pCalculation->_Integration(temDCWave,y,rms);
|
||||||
|
|
||||||
pCalculation->_iFFT(realvalue,imagevalue,y);
|
|
||||||
if(isDoubleIntegration){
|
if(isDoubleIntegration){
|
||||||
m_bDoubleIntegration = true;
|
m_bDoubleIntegration = true;
|
||||||
qDebug() << "DoubleIntegration" << endl;
|
QVector<double> key,Proximeter;
|
||||||
QVector<double> realshiftfft2;
|
pCalculation->_Integration(y,Proximeter,rms);
|
||||||
QVector<double> imageshiftfft2;
|
|
||||||
QVector<double> key,Proximeter,realvalue2,imagevalue2;
|
|
||||||
pCalculation->_FFT(y,realshiftfft2,imageshiftfft2);
|
|
||||||
qDebug()<< "imageshiftfft2" <<imageshiftfft2.size() << endl;
|
|
||||||
for(int k = 1; k < realshiftfft2.size()+1;k++){
|
|
||||||
|
|
||||||
realvalue2.push_back((realshiftfft2.at(k-1)/(k*2*3.14))*1000);//单位转换um,*1000
|
|
||||||
imagevalue2.push_back((imageshiftfft2.at(k-1)/(k*2*3.14))*1000);//单位转换um,*1000
|
|
||||||
}
|
|
||||||
pCalculation->_iFFT(realvalue2,imagevalue2,Proximeter);
|
|
||||||
qDebug()<< "Proximeter" << Proximeter.size() << endl;
|
|
||||||
double gap = (double)1/(double)Proximeter.size();
|
double gap = (double)1/(double)Proximeter.size();
|
||||||
for(int ii = 0; ii < Proximeter.size();ii++){
|
for(int ii = 0; ii < Proximeter.size();ii++){
|
||||||
f += gap;
|
f += gap;
|
||||||
key.push_back(f);
|
key.push_back(f);
|
||||||
}
|
}
|
||||||
qDebug()<< "key" <<key.size() << endl;
|
|
||||||
ui->widget->xAxis->setRange(0, 1);
|
ui->widget->xAxis->setRange(0, 1);
|
||||||
QCPGraph* graph = ui->widget->addGraph();
|
QCPGraph* graph = ui->widget->addGraph();
|
||||||
ui->widget->graph(i)->setData(key, Proximeter);
|
ui->widget->graph(i)->setData(key, Proximeter);
|
||||||
@ -2970,6 +2957,7 @@ void ChildForm::CalculateIntegration(bool isDoubleIntegration)
|
|||||||
waveGraph.insert(listChannelID.at(i), graph);
|
waveGraph.insert(listChannelID.at(i), graph);
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
double gap = (double)1/(double)y.size();
|
double gap = (double)1/(double)y.size();
|
||||||
for(int ii = 0; ii < y.size();ii++){
|
for(int ii = 0; ii < y.size();ii++){
|
||||||
f += gap;
|
f += gap;
|
||||||
@ -2986,6 +2974,8 @@ void ChildForm::CalculateIntegration(bool isDoubleIntegration)
|
|||||||
pen.setWidth(0);
|
pen.setWidth(0);
|
||||||
ui->widget->graph(i)->setPen(pen);
|
ui->widget->graph(i)->setPen(pen);
|
||||||
// give the axes some labels:
|
// give the axes some labels:
|
||||||
|
// QString strRMS = QString("Time(s) %1: %2").arg( "RMS" ).arg(rms);
|
||||||
|
|
||||||
ui->widget->xAxis->setLabel("Time(s)");
|
ui->widget->xAxis->setLabel("Time(s)");
|
||||||
if(iter.value().channelType =="VELOCITY"){
|
if(iter.value().channelType =="VELOCITY"){
|
||||||
ui->widget->yAxis->setLabel("PROXIMETER(um)");
|
ui->widget->yAxis->setLabel("PROXIMETER(um)");
|
||||||
@ -3005,23 +2995,23 @@ void ChildForm::CalculateIntegration(bool isDoubleIntegration)
|
|||||||
void ChildForm::CalculateDifferentiation(bool isDoubleDifferentiation)
|
void ChildForm::CalculateDifferentiation(bool isDoubleDifferentiation)
|
||||||
{
|
{
|
||||||
QVector<double> key,value,yValue,key2,yValue2;
|
QVector<double> key,value,yValue,key2,yValue2;
|
||||||
|
QVector<double> temDCWave,diffValue,diffValue2;
|
||||||
QMap<QString,WAVE_DISPALYDATA>::Iterator iter = mapWaveDisplayData.begin();
|
QMap<QString,WAVE_DISPALYDATA>::Iterator iter = mapWaveDisplayData.begin();
|
||||||
for (int i = 0; i < listChannelID.size(); ++i){
|
for (int i = 0; i < listChannelID.size(); ++i){
|
||||||
for(;iter != mapWaveDisplayData.end();iter++){
|
for(;iter != mapWaveDisplayData.end();iter++){
|
||||||
if(listChannelID.at(i) == iter.key()){
|
if(listChannelID.at(i) == iter.key()){
|
||||||
double gap,f;
|
double gap,f;
|
||||||
f= 0;
|
f= 0.0;
|
||||||
|
QVector<double>().swap(temDCWave);
|
||||||
|
QVector<double>().swap(diffValue);
|
||||||
gap = (double)1/(double)iter.value().SamleRate;
|
gap = (double)1/(double)iter.value().SamleRate;
|
||||||
|
for(int j = 0; j < iter.value().SamleRate;j++){
|
||||||
value.push_back(iter.value().wavedata.at(0) - iter.value().mean);
|
temDCWave.push_back(iter.value().wavedata.at(j) - iter.value().mean);
|
||||||
for(int j = 1; j < iter.value().SamleRate-3;j++)
|
|
||||||
{
|
|
||||||
value.push_back((iter.value().wavedata.at(j+1)-iter.value().wavedata.at(j-1))/(double)(2*1/(double)iter.value().SamleRate));
|
|
||||||
}
|
}
|
||||||
value.push_back(iter.value().wavedata.at(iter.value().SamleRate-1) - iter.value().mean);
|
pCalculation->_Differentiation(temDCWave,diffValue);
|
||||||
|
|
||||||
for(int i = 0 ; i < value.size();i++){
|
for(int i = 0 ; i < diffValue.size();i++){
|
||||||
yValue.push_back(value[i]/(double)10000);
|
yValue.push_back(diffValue[i]/(double)10000);
|
||||||
f += gap;
|
f += gap;
|
||||||
key.push_back(f);
|
key.push_back(f);
|
||||||
}
|
}
|
||||||
@ -3030,17 +3020,12 @@ void ChildForm::CalculateDifferentiation(bool isDoubleDifferentiation)
|
|||||||
|
|
||||||
if(isDoubleDifferentiation){//二次微分
|
if(isDoubleDifferentiation){//二次微分
|
||||||
m_bDoubleDifferentiation = true;
|
m_bDoubleDifferentiation = true;
|
||||||
QVector<double>().swap(value);
|
QVector<double>().swap(diffValue2);
|
||||||
f = 0;
|
f = 0.0;
|
||||||
value.push_back(yValue[0]);
|
pCalculation->_Differentiation(yValue,diffValue2);
|
||||||
for(int jj = 1; jj < yValue.size()-3;jj++)
|
|
||||||
{
|
|
||||||
value.push_back((yValue.at(jj+1)-yValue.at(jj-1))/(double)(2*1/(double)iter.value().SamleRate));
|
|
||||||
}
|
|
||||||
value.push_back(yValue[yValue.size()-1]);
|
|
||||||
|
|
||||||
for(int i = 0 ; i < value.size();i++){
|
for(int i = 0 ; i < diffValue2.size();i++){
|
||||||
yValue2.push_back(value[i]/(double)10000);
|
yValue2.push_back(diffValue2[i]/(double)10000);
|
||||||
f += gap;
|
f += gap;
|
||||||
key2.push_back(f);
|
key2.push_back(f);
|
||||||
}
|
}
|
||||||
@ -3050,6 +3035,10 @@ void ChildForm::CalculateDifferentiation(bool isDoubleDifferentiation)
|
|||||||
}else{
|
}else{
|
||||||
ui->widget->xAxis->setRange(0, 1);
|
ui->widget->xAxis->setRange(0, 1);
|
||||||
ui->widget->graph(i)->setData(key, yValue);
|
ui->widget->graph(i)->setData(key, yValue);
|
||||||
|
if(iter.value().channelType == "VELOCITY")
|
||||||
|
ui->widget->yAxis->setLabel("ACCELEROMETER(mm/s)");
|
||||||
|
else if(iter.value().channelType == "THRUST" ||
|
||||||
|
iter.value().channelType == "PROXIMETER")
|
||||||
ui->widget->yAxis->setLabel("Velocity(mm/s)");
|
ui->widget->yAxis->setLabel("Velocity(mm/s)");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3062,7 +3051,7 @@ void ChildForm::CalculateDifferentiation(bool isDoubleDifferentiation)
|
|||||||
pen.setWidth(0);
|
pen.setWidth(0);
|
||||||
ui->widget->graph(i)->setPen(pen);
|
ui->widget->graph(i)->setPen(pen);
|
||||||
// give the axes some labels:
|
// give the axes some labels:
|
||||||
ui->widget->xAxis->setLabel("Frequency(Hz)");
|
ui->widget->xAxis->setLabel("Time(s)");
|
||||||
|
|
||||||
ui->widget->replot(QCustomPlot::rpImmediateRefresh);
|
ui->widget->replot(QCustomPlot::rpImmediateRefresh);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -102,6 +102,7 @@ public:
|
|||||||
void CalculateDifferentiation(bool isDoubleDifferentiation = false);
|
void CalculateDifferentiation(bool isDoubleDifferentiation = false);
|
||||||
void EnableBtn();
|
void EnableBtn();
|
||||||
void UpdateDiffMenu();
|
void UpdateDiffMenu();
|
||||||
|
void InitIntegration();
|
||||||
QVector<WAVE_DATA> childWave;
|
QVector<WAVE_DATA> childWave;
|
||||||
QVector<WAVE_DATA> OrbitXWave,OrbitYWave;
|
QVector<WAVE_DATA> OrbitXWave,OrbitYWave;
|
||||||
QVector<KeyPhasor> vecKeyPhasor;
|
QVector<KeyPhasor> vecKeyPhasor;
|
||||||
|
|||||||
@ -683,7 +683,11 @@ void MainWidget::addChildItem(QTreeWidgetItem *pDataItem,QTreeWidgetItem *pNoIte
|
|||||||
filename = datpath + sfileName;
|
filename = datpath + sfileName;
|
||||||
QFileInfo file(filename);
|
QFileInfo file(filename);
|
||||||
if(file.exists()){
|
if(file.exists()){
|
||||||
|
qDebug() << datpath << endl;
|
||||||
|
QIcon icon(":/images/images/imgTreeIcon/remove6.png");
|
||||||
|
pNewItem->setIcon(0, icon);
|
||||||
|
pNewItem->setData(0,FILE_ROLE,0);
|
||||||
|
pSizeItem->addChild(pNewItem);
|
||||||
}else{
|
}else{
|
||||||
QIcon icon(":/images/images/imgTreeIcon/remove2.png");
|
QIcon icon(":/images/images/imgTreeIcon/remove2.png");
|
||||||
pNewItem->setIcon(0, icon);
|
pNewItem->setIcon(0, icon);
|
||||||
@ -698,7 +702,10 @@ void MainWidget::addChildItem(QTreeWidgetItem *pDataItem,QTreeWidgetItem *pNoIte
|
|||||||
filename = datpath + sfileName;
|
filename = datpath + sfileName;
|
||||||
QFileInfo file(filename);
|
QFileInfo file(filename);
|
||||||
if(file.exists()){
|
if(file.exists()){
|
||||||
|
QIcon icon(":/images/images/imgTreeIcon/remove6.png");
|
||||||
|
pNewItem->setIcon(0, icon);
|
||||||
|
pNewItem->setData(0,FILE_ROLE,0);
|
||||||
|
pSizeItem->addChild(pNewItem);
|
||||||
}else{
|
}else{
|
||||||
QIcon icon(":/images/images/imgTreeIcon/remove2.png");
|
QIcon icon(":/images/images/imgTreeIcon/remove2.png");
|
||||||
pNewItem->setIcon(0, icon);
|
pNewItem->setIcon(0, icon);
|
||||||
@ -713,6 +720,9 @@ void MainWidget::addChildItem(QTreeWidgetItem *pDataItem,QTreeWidgetItem *pNoIte
|
|||||||
filename = datpath + sfileName;
|
filename = datpath + sfileName;
|
||||||
QFileInfo file(filename);
|
QFileInfo file(filename);
|
||||||
if(file.exists()){
|
if(file.exists()){
|
||||||
|
QIcon icon(":/images/images/imgTreeIcon/remove6.png");
|
||||||
|
pNewItem->setIcon(0, icon);
|
||||||
|
pNewItem->setData(0,FILE_ROLE,0);
|
||||||
pSizeItem->addChild(pNewItem);
|
pSizeItem->addChild(pNewItem);
|
||||||
}else{
|
}else{
|
||||||
QIcon icon(":/images/images/imgTreeIcon/remove2.png");
|
QIcon icon(":/images/images/imgTreeIcon/remove2.png");
|
||||||
|
|||||||
@ -102,6 +102,7 @@ typedef struct {
|
|||||||
float iTriggerValue;
|
float iTriggerValue;
|
||||||
float iHysteresis;
|
float iHysteresis;
|
||||||
bool tachAutoTach;
|
bool tachAutoTach;
|
||||||
|
double RMS;
|
||||||
} WAVE_DISPALYDATA;
|
} WAVE_DISPALYDATA;
|
||||||
|
|
||||||
typedef struct{
|
typedef struct{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user