You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
1.5 KiB

5 years ago
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QLineEdit>
#include <QSettings>
#include <QDir>
#include "utils/OpenCLHelper.h"
#include "model/processor/IProcessStrategy.h"
#include "ScenarioParams.h"
5 years ago
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
#define REGISTER_STRATEGY(c) qRegisterMetaType<c*>(#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;
5 years ago
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();
5 years ago
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;
ScenGenOutput_t _scenGenOutput;
void readParam(QString path, int mode);
Buffer* _scratchPad;
float* _scratch;
quint64 OUT_WIDTH;
quint64 OUT_HEIGHT;
signals:
void console(QString);
5 years ago
};
#endif // MAINWINDOW_H