DataFilesLoader::ReturnCode DataFilesLoader::loadSingleRun(const QDir& path, std::vector<struct HPCS_MeasuredData* >& loadedData)
{
- ReturnCode ret = ReturnCode::SUCCESS;
std::vector<CQStringPair> failedFiles;
for (const QString& s : path.entryList(m_supportedFileTypes, QDir::Files | QDir::NoDotAndDotDot)) {
struct HPCS_MeasuredData* mdata = hpcs_alloc();
if (mdata == nullptr) {
- ret = ReturnCode::E_FATAL;
+ return ReturnCode::E_FATAL;
break;
}
return -1;
}
-Signal::Equipment DataManager::equipmentFromFiletype(HPCS_File_Type filetype)
+Signal::Equipment DataManager::equipmentFromFiletype(HPCS_FileType filetype)
{
switch (filetype) {
case HPCS_TYPE_CE_CCD:
} while (ret == 1);
}
-Signal::Resource DataManager::resourceFromFiletype(HPCS_File_Type filetype)
+Signal::Resource DataManager::resourceFromFiletype(HPCS_FileType filetype)
{
switch (filetype) {
case HPCS_TYPE_CE_CCD:
SingleRunsSelectorModel* singleRunsSelectorModel() { return &m_singleSelModel; }
private:
- Signal::Equipment equipmentFromFiletype(HPCS_File_Type filetype);
+ Signal::Equipment equipmentFromFiletype(HPCS_FileType filetype);
void generateIntegDataWriteList(DataFileExporter::WriteList& writeList, const std::shared_ptr<SingleRunData> sr, const std::vector<std::string>& keys);
void generateRawDataWriteList(DataFileExporter::WriteList& writeList, const std::shared_ptr<SingleRunData> sr, const std::vector<std::string>& keys);
std::shared_ptr<Sequence> sequenceByKey(const QString& key);
int sequenceIdxByKey(const QString& key);
std::shared_ptr<SingleRunData> loadSingleRun(QDir& dir);
void processDataExport(GeneratorFunc genfunc);
- Signal::Resource resourceFromFiletype(HPCS_File_Type filetype);
+ Signal::Resource resourceFromFiletype(HPCS_FileType filetype);
bool saveSingleRunUserData(std::shared_ptr<SingleRunData> sr);
std::string signalControllerKey(const QString& main, const QString& resource);
void showOneSignal(std::shared_ptr<SignalController> ctrl);
if (m_integrationType == IntegrationType::BASELINE) {
m_integrateStopBLYPix = relToYPix(m_controller->valueToRel(m_controller->getXYValues(xPixToRel(x)).second));
+ double vstarty = std::min(m_integrateStartBLYPix, m_integrateStartYPix);
+ double vstopy = std::min(m_integrateStopBLYPix, y);
p.begin(m_pixmap);
p.setPen(Qt::black);
p.drawLine(m_integrateStartXPix, m_integrateStartYPix, m_integrateStartXPix, m_integrateStartBLYPix);
p.drawLine(x, y, x, m_integrateStopBLYPix);
p.end();
- reg += QRect(m_integrateStartXPix, m_integrateStopXPix, m_integrateStartXPix, m_integrateStopBLYPix);
- reg += QRect(x, y, x, m_integrateStopBLYPix);
+ reg += QRect(m_integrateStartXPix, vstarty, 1, abs(m_integrateStopBLYPix - m_integrateStartXPix) + 1);
+ reg += QRect(x, vstopy, 1, abs(m_integrateStopBLYPix - x) + 1);
}
if (m_integrateStartXPix > m_integrateStopXPix) {