24namespace CustomInterfaces {
40 bool checkFieldIsNotEmpty(
const QString &name, QLineEdit *field, QLabel *errorLabel =
nullptr);
43 bool checkFieldIsValid(
const QString &errorMessage, QLineEdit *field, QLabel *errorLabel =
nullptr);
45 bool checkWorkspaceSelectorIsNotEmpty(
const QString &name,
WorkspaceSelector *workspaceSelector);
47 bool checkFileFinderWidgetIsValid(
const QString &name,
FileFinderWidget *widget);
49 bool checkDataSelectorIsValid(
const QString &name,
DataSelector *widget,
bool silent =
false);
51 bool checkValidRange(
const QString &name, std::pair<double, double> range);
53 bool checkRangesDontOverlap(std::pair<double, double> rangeA, std::pair<double, double> rangeB);
56 bool checkRangeIsEnclosed(
const QString &outerName, std::pair<double, double> outer,
const QString &innerName,
57 std::pair<double, double> inner);
62 bool checkNotEqual(
const QString &name,
double x,
double y = 0.0,
double tolerance = 0.00000001);
65 template <
typename T = Mant
id::API::MatrixWorkspace>
66 bool checkWorkspaceType(QString
const &workspaceName, QString
const &inputType, QString
const &validType,
69 bool checkWorkspaceExists(QString
const &workspaceName,
bool silent =
false);
71 bool checkWorkspaceNumberOfHistograms(QString
const &workspaceName, std::size_t
const &validSize);
74 bool checkWorkspaceNumberOfBins(QString
const &workspaceName, std::size_t
const &validSize);
77 bool checkWorkspaceGroupIsValid(QString
const &groupName, QString
const &inputType,
bool silent =
false);
80 void addErrorMessage(
const QString &message,
bool silent =
false);
83 void setErrorLabel(QLabel *errorLabel,
bool valid);
87 QString generateErrorMessage();
89 bool isAllInputValid();
93 template <
typename T = Mant
id::API::MatrixWorkspace>
94 std::shared_ptr<T> getADSWorkspace(std::string
const &workspaceName);
113 QString
const &validType,
bool silent) {
115 if (!getADSWorkspace<T>(workspaceName.toStdString())) {
116 addErrorMessage(
"The " + inputType +
" workspace is not a " + validType +
".", silent);
#define DLLExport
Definitions of the DLLImport compiler directives for MSVC.
double lower
lower and upper bounds on the multiplier, if known
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class