schema_editor/mainwindow.h

49 lines
1.0 KiB
C
Raw Normal View History

2022-04-08 18:17:58 +00:00
#ifndef MAIN_WINDOW_H
#define MAIN_WINDOW_H
2022-03-29 19:31:45 +00:00
2022-04-07 22:21:23 +00:00
#include <QListWidget>
2022-03-29 19:31:45 +00:00
#include <QMainWindow>
2022-04-07 22:21:23 +00:00
#include <comdel/display/library_display.h>
#include <comdel/display/schema_display.h>
#include <comdel/domain/library.h>
#include <comdel/domain/schema.h>
2022-04-09 19:11:17 +00:00
#include <QPlainTextEdit>
2022-04-10 12:23:18 +00:00
#include <comdel/domain/comdelvalidator.h>
2022-04-07 22:21:23 +00:00
2022-03-29 19:31:45 +00:00
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
2022-04-07 22:21:23 +00:00
display::Library *libraryDisplay;
display::Schema *schemaDisplay;
std::optional<domain::Library> library = std::nullopt;
2022-04-18 09:41:02 +00:00
domain::Schema* schema = nullptr;
2022-04-07 22:21:23 +00:00
std::vector<domain::FunctionSignature> signatures;
void setupUi();
void clear();
private slots:
void onLoadLibrary();
void onLoadSchema();
2022-04-10 12:23:18 +00:00
void onValidateSchema(bool toggled);
2022-04-07 22:21:23 +00:00
2022-03-29 19:31:45 +00:00
private:
Ui::MainWindow *ui;
2022-04-09 19:11:17 +00:00
QPlainTextEdit *log;
2022-04-10 12:23:18 +00:00
std::vector<domain::ValidationError> validationErrors;
2022-03-29 19:31:45 +00:00
};
2022-04-08 18:17:58 +00:00
#endif // MAIN_WINDOW_H