Skip to content
Snippets Groups Projects
Commit f0d36ec7 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

format comments; make fct local

parent efa029fb
No related branches found
No related tags found
1 merge request!48Comments and simplifications in loader context
......@@ -33,6 +33,7 @@
#include <QMessageBox>
namespace {
const QString filter_string_ba = "Intensity File (*.int *.gz *.tif *.tiff *.txt *.csv);;"
"Other (*.*)";
const QString filter_string_ascii = "Intensity File (*.int *.int.gz *.txt *.csv *.dat *.ascii);;"
......@@ -48,8 +49,6 @@ int rank(const InstrumentItem& item)
return static_cast<int>(item.shape().size());
}
} // namespace
std::unique_ptr<OutputData<double>>
ImportDataUtils::ImportKnownData(const QString& fileName,
IntensityDataIOFactory::LoaderSelector loader)
......@@ -69,6 +68,9 @@ ImportDataUtils::ImportKnownData(const QString& fileName,
return result;
}
} // namespace
std::unique_ptr<OutputData<double>>
ImportDataUtils::ImportReflectometryData(const QString& fileName)
{
......
......@@ -31,19 +31,19 @@ class AbstractDataLoader;
namespace ImportDataUtils {
//! Imports 2D data, stores them as OutputData, and returns owning pointer.
std::unique_ptr<OutputData<double>> Import2dData(const QString& fileName,
IntensityDataIOFactory::LoaderSelector loader);
//! Import 1D data into the given item.
//! Returns an error text if a fatal error occurred (discard item). "Empty string" means "no fatal
//! error" => imported item should be kept. The imported item still can have errors, but they might
//! be solvable by different import settings or by using a different data loader.
//! selectedLoader is the one which was selected in the open-file-dialog (or null if none selected).
QString Import1dData(RealDataItem* realDataItem, const AbstractDataLoader* selectedLoader);
//! Imports 1D data into the given item.
std::unique_ptr<OutputData<double>>
ImportKnownData(const QString& fileName,
IntensityDataIOFactory::LoaderSelector loader = IntensityDataIOFactory::automatic);
//! Returns an error text if a fatal error occurred (discard item).
//! "Empty string" means "no fatal error" => imported item should be kept.
//! The imported item still can have errors, but they might be solvable
//! by different import settings or by using a different data loader.
//! Argument selectedLoader is the one which was selected in the open-file-dialog
//! (or null if none selected).
QString Import1dData(RealDataItem* realDataItem, const AbstractDataLoader* selectedLoader);
std::unique_ptr<OutputData<double>> ImportReflectometryData(const QString& fileName);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment