#ifndef MAINWINDOW_H #define MAINWINDOW_H #include #include #include #include #include "utils/OpenCLHelper.h" #include "model/processor/IProcessStrategy.h" #include "ScenarioParams.h" QT_BEGIN_NAMESPACE namespace Ui { class MainWindow; } QT_END_NAMESPACE #define REGISTER_STRATEGY(c) qRegisterMetaType(#c); \ ui->cb_kernelName->addItem(#c); class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(QWidget *parent = nullptr); ~MainWindow(); static MainWindow* getInstance() { return _instance; } // cl::CommandQueue CLQueue; private slots: void on_btn_browseInput_clicked(); void on_btn_browseOutput_clicked(); void on_btn_browseMatlabOutput_clicked(); void on_btn_browseWorkingDir_clicked(); void on_btn_test_clicked(); void on_btn_save_clicked(); void on_btn_load_clicked(); void on_btn_compare_clicked(); void on_btn_clear_clicked(); private: Ui::MainWindow *ui; QSettings _settings; static MainWindow* _instance; cl::Context _CLContext; OpenCLHelper _openCLHelper; void browse(QLineEdit* edit); void abort(); void addToConsole(QString message); bool checkPath(QString path, QString pathName); void registerStrategies(); void pushBackStrategy(const QString strategyName, const QString kernelFolder); IProcessStrategy* _strategy; Input_t _scenGenOutput; void readParam(QString path, int mode); Buffer* _scratchPad; float* _scratch; quint64 OUT_WIDTH; quint64 OUT_HEIGHT; signals: void console(QString); }; #endif // MAINWINDOW_H