You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AppFlow/FITK_Interface/FITKInterfaceIO/FITKAbstractHDF5Reader.cpp

39 lines
887 B
C++

#include "FITKAbstractHDF5Reader.h"
#include <QFile>
#include <QTextStream>
#include <QDebug>
#include <thread>
#include "H5Cpp.h"
namespace IO
{
void FITKAbstractHDF5Reader::setH5Root(H5::H5File* h5File)
{
_h5File = h5File;
}
void FITKAbstractHDF5Reader::setVersion(double v)
{
_version = v;
}
void FITKAbstractHDF5Reader::sendCurrentPercent(int p /*= -1*/)
{
//static int recordP = -1;
//if (p < 0)
//{
// //计算百分比
// const float pro = _currentLine / (float)_totalLine;
// p = pro * 100;
//}
////避免闪烁不显示进度条
//if (p == recordP) return;
//recordP = p;
//完成后等待主线程2秒
if (p == 100) std::this_thread::sleep_for(std::chrono::seconds(2));
emit sendProcessSig(this, p);
}
}