schema_editor/mainwindow.h

48 lines
1.0 KiB
C++

#ifndef MAIN_WINDOW_H
#define MAIN_WINDOW_H
#include <QListWidget>
#include <QMainWindow>
#include <comdel/display/library_display.h>
#include <comdel/display/schema_display.h>
#include <comdel/domain/library.h>
#include <comdel/domain/schema.h>
#include <QPlainTextEdit>
#include <comdel/domain/comdel_validator.h>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
std::vector<domain::FunctionValidator*> validators;
void setupUi();
void clear();
private slots:
void onLoadLibrary();
void onLoadSchema();
void onValidateSchema(bool toggled);
void onStoreScheme();
void onGenerateComdel();
private:
display::Library *libraryDisplay;
display::Schema *schemaDisplay;
Ui::MainWindow *ui;
QPlainTextEdit *log;
static void formatErrors(std::vector<domain::ValidationError>& errors, std::ostream& output);
};
#endif // MAIN_WINDOW_H