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.
66 lines
1.3 KiB
66 lines
1.3 KiB
#ifndef MAINWINDOW_H
|
|
#define MAINWINDOW_H
|
|
|
|
#include <QMainWindow>
|
|
#include <QLineEdit>
|
|
#include <QSettings>
|
|
#include <QDir>
|
|
|
|
#include "header/OpenCLHelper.h"
|
|
#include "header/IProcessStrategy.h"
|
|
|
|
|
|
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;
|
|
|
|
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();
|
|
|
|
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;
|
|
|
|
};
|
|
#endif // MAINWINDOW_H
|
|
|