mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-22 22:13:35 +02:00
34 lines
507 B
C++
34 lines
507 B
C++
#ifndef VALIDATOR_H
|
|
#define VALIDATOR_H
|
|
|
|
#include <QDialog>
|
|
#include "../lib/mapping/CMap.h"
|
|
|
|
namespace Ui {
|
|
class Validator;
|
|
}
|
|
|
|
class Validator : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
struct Issue
|
|
{
|
|
QString message;
|
|
bool critical;
|
|
|
|
Issue(const QString & m, bool c): message(m), critical(c) {}
|
|
};
|
|
|
|
public:
|
|
explicit Validator(const CMap * map, QWidget *parent = nullptr);
|
|
~Validator();
|
|
|
|
static std::list<Issue> validate(const CMap * map);
|
|
|
|
private:
|
|
Ui::Validator *ui;
|
|
};
|
|
|
|
#endif // VALIDATOR_H
|