#pragma once

#include <QWidget>
#include <future>
#include "ui_tsneIteractive.h"
#include "GraphView.h"
#include "RunData.h"
#include "ColorGradient.h"
class tsneIteractive : public QWidget
{
	Q_OBJECT
public:
	tsneIteractive(QWidget *parent = Q_NULLPTR);
	~tsneIteractive();

	GraphView* view;
	ColorGradient* gradient;
	RunData* data = nullptr;
	void assignRunData(RunData* data);
private:
	Ui::tsneIteractive ui;
	
	//Concurrent
	std::future<void> hTsne = std::async(std::launch::async, [](){});
	QTimer* timer;
	void updateCanvasIfAlgoRuns();
	void updateViewGradient();


public slots:
	void startRun();
};
