schema_editor/mainwindow.h

54 lines
1.1 KiB
C
Raw Permalink 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-05-27 06:18:17 +00:00
#include <comdel/domain/comdel_validator.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-05-15 09:17:05 +00:00
std::vector<domain::FunctionValidator*> validators;
2022-04-07 22:21:23 +00:00
void setupUi();
void clear();
private slots:
void onLoadLibrary();
void onLoadSchema();
2022-04-10 12:23:18 +00:00
void onValidateSchema(bool toggled);
2022-04-24 20:21:45 +00:00
void onStoreScheme();
void onGenerateComdel();
2022-04-07 22:21:23 +00:00
2022-03-29 19:31:45 +00:00
private:
display::Library *libraryDisplay;
display::Schema *schemaDisplay;
2022-03-29 19:31:45 +00:00
Ui::MainWindow *ui;
2022-06-19 18:10:44 +00:00
QAction* loadLibrary;
QAction* loadSchema;
QAction* saveSchema;
QAction* generateComdel;
static void formatErrors(std::vector<domain::ValidationError>& errors, std::ostream& output);
2022-06-19 18:10:44 +00:00
void updateTranslations();
2022-03-29 19:31:45 +00:00
};
2022-04-08 18:17:58 +00:00
#endif // MAIN_WINDOW_H