Mantid
Loading...
Searching...
No Matches
Public Member Functions | List of all members
MantidQt::CustomInterfaces::IUserInputValidator Class Referenceabstract

#include <UserInputValidator.h>

Inheritance diagram for MantidQt::CustomInterfaces::IUserInputValidator:
MantidQt::CustomInterfaces::UserInputValidator MockUserInputValidator

Public Member Functions

virtual void addErrorMessage (const std::string &message, bool const silent=false)=0
 
virtual bool checkBins (double lower, double binWidth, double upper, double tolerance=0.00000001)=0
 
virtual bool checkDataSelectorIsValid (const QString &name, DataSelector *widget, bool const silent=false, bool const autoLoad=true)=0
 
virtual bool checkFieldIsNotEmpty (const QString &name, QLineEdit *field, QLabel *errorLabel=nullptr)=0
 
virtual bool checkFieldIsValid (const QString &errorMessage, QLineEdit *field, QLabel *errorLabel=nullptr)=0
 
virtual bool checkFileFinderWidgetIsValid (const QString &name, const FileFinderWidget *widget)=0
 
virtual bool checkRangeIsEnclosed (const QString &outerName, std::pair< double, double > outer, const QString &innerName, std::pair< double, double > inner)=0
 
virtual bool checkRangesDontOverlap (std::pair< double, double > rangeA, std::pair< double, double > rangeB)=0
 
virtual bool checkValidRange (const QString &name, std::pair< double, double > range)=0
 
virtual bool checkWorkspaceExists (QString const &workspaceName, bool silent=false)=0
 
virtual bool checkWorkspaceGroupIsValid (QString const &groupName, QString const &inputType, bool silent=false)=0
 
virtual bool checkWorkspaceSelectorIsNotEmpty (const QString &name, WorkspaceSelector *workspaceSelector)=0
 
template<typename T = Mantid::API::MatrixWorkspace>
bool checkWorkspaceType (QString const &workspaceName, QString const &inputType, QString const &validType, bool silent=false)
 Checks if the workspace has the correct type.
 
virtual std::string generateErrorMessage () const =0
 
virtual bool isAllInputValid () const =0
 
virtual void setErrorLabel (QLabel *errorLabel, bool valid)=0
 
virtual ~IUserInputValidator ()=default
 

Detailed Description

Definition at line 27 of file UserInputValidator.h.

Constructor & Destructor Documentation

◆ ~IUserInputValidator()

virtual MantidQt::CustomInterfaces::IUserInputValidator::~IUserInputValidator ( )
virtualdefault

Member Function Documentation

◆ addErrorMessage()

virtual void MantidQt::CustomInterfaces::IUserInputValidator::addErrorMessage ( const std::string &  message,
bool const  silent = false 
)
pure virtual

◆ checkBins()

virtual bool MantidQt::CustomInterfaces::IUserInputValidator::checkBins ( double  lower,
double  binWidth,
double  upper,
double  tolerance = 0.00000001 
)
pure virtual

◆ checkDataSelectorIsValid()

virtual bool MantidQt::CustomInterfaces::IUserInputValidator::checkDataSelectorIsValid ( const QString &  name,
DataSelector widget,
bool const  silent = false,
bool const  autoLoad = true 
)
pure virtual

◆ checkFieldIsNotEmpty()

virtual bool MantidQt::CustomInterfaces::IUserInputValidator::checkFieldIsNotEmpty ( const QString &  name,
QLineEdit *  field,
QLabel *  errorLabel = nullptr 
)
pure virtual

◆ checkFieldIsValid()

virtual bool MantidQt::CustomInterfaces::IUserInputValidator::checkFieldIsValid ( const QString &  errorMessage,
QLineEdit *  field,
QLabel *  errorLabel = nullptr 
)
pure virtual

◆ checkFileFinderWidgetIsValid()

virtual bool MantidQt::CustomInterfaces::IUserInputValidator::checkFileFinderWidgetIsValid ( const QString &  name,
const FileFinderWidget widget 
)
pure virtual

◆ checkRangeIsEnclosed()

virtual bool MantidQt::CustomInterfaces::IUserInputValidator::checkRangeIsEnclosed ( const QString &  outerName,
std::pair< double, double >  outer,
const QString &  innerName,
std::pair< double, double >  inner 
)
pure virtual

◆ checkRangesDontOverlap()

virtual bool MantidQt::CustomInterfaces::IUserInputValidator::checkRangesDontOverlap ( std::pair< double, double >  rangeA,
std::pair< double, double >  rangeB 
)
pure virtual

◆ checkValidRange()

virtual bool MantidQt::CustomInterfaces::IUserInputValidator::checkValidRange ( const QString &  name,
std::pair< double, double >  range 
)
pure virtual

◆ checkWorkspaceExists()

virtual bool MantidQt::CustomInterfaces::IUserInputValidator::checkWorkspaceExists ( QString const &  workspaceName,
bool  silent = false 
)
pure virtual

◆ checkWorkspaceGroupIsValid()

virtual bool MantidQt::CustomInterfaces::IUserInputValidator::checkWorkspaceGroupIsValid ( QString const &  groupName,
QString const &  inputType,
bool  silent = false 
)
pure virtual

◆ checkWorkspaceSelectorIsNotEmpty()

virtual bool MantidQt::CustomInterfaces::IUserInputValidator::checkWorkspaceSelectorIsNotEmpty ( const QString &  name,
WorkspaceSelector workspaceSelector 
)
pure virtual

◆ checkWorkspaceType()

template<typename T >
bool MantidQt::CustomInterfaces::IUserInputValidator::checkWorkspaceType ( QString const &  workspaceName,
QString const &  inputType,
QString const &  validType,
bool  silent = false 
)

Checks if the workspace has the correct type.

Parameters
workspaceNameThe name of the workspace
inputTypeWhat the workspace is used for (e.g. Sample)
validTypeThe type which is valid
silentTrue if an error should not be added to the validator.
Returns
True if the workspace has the correct type

Definition at line 134 of file UserInputValidator.h.

References addErrorMessage(), and checkWorkspaceExists().

◆ generateErrorMessage()

virtual std::string MantidQt::CustomInterfaces::IUserInputValidator::generateErrorMessage ( ) const
pure virtual

◆ isAllInputValid()

virtual bool MantidQt::CustomInterfaces::IUserInputValidator::isAllInputValid ( ) const
pure virtual

◆ setErrorLabel()

virtual void MantidQt::CustomInterfaces::IUserInputValidator::setErrorLabel ( QLabel *  errorLabel,
bool  valid 
)
pure virtual

The documentation for this class was generated from the following file: