Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
f0d36ec7
Commit
f0d36ec7
authored
3 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
format comments; make fct local
parent
efa029fb
No related branches found
No related tags found
1 merge request
!48
Comments and simplifications in loader context
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/coregui/Views/ImportDataWidgets/ImportDataUtils.cpp
+4
-2
4 additions, 2 deletions
GUI/coregui/Views/ImportDataWidgets/ImportDataUtils.cpp
GUI/coregui/Views/ImportDataWidgets/ImportDataUtils.h
+9
-9
9 additions, 9 deletions
GUI/coregui/Views/ImportDataWidgets/ImportDataUtils.h
with
13 additions
and
11 deletions
GUI/coregui/Views/ImportDataWidgets/ImportDataUtils.cpp
+
4
−
2
View file @
f0d36ec7
...
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
GUI/coregui/Views/ImportDataWidgets/ImportDataUtils.h
+
9
−
9
View file @
f0d36ec7
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment