You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
524 B
C++

#ifndef IVALIDATOR_H
#define IVALIDATOR_H
#include <QWidget>
#include <QString>
#include "core_global.h"
class CORESHARED_EXPORT IValidator
{
public:
IValidator(QWidget *widget, const QString &errMessage)
{
m_widget = widget;
m_errMessage = errMessage;
}
virtual ~IValidator() = default;
virtual bool validate() = 0;
QString errMessage()
{
return m_errMessage;
}
protected:
QWidget *m_widget;
private:
QString m_errMessage;
};
#endif // IVALIDATOR_H