#include "ProcessOn.h"
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QApplication>
#include <stdlib.h>
#include <stdio.h>
#include <vector>
#include <QObject>
#include <QDebug>

ProcessOn::ProcessOn(QWidget* parent)
{
	this->setAttribute(Qt::WA_DeleteOnClose);
	this->ui.setupUi(this);
}

ProcessOn::~ProcessOn()
{
}

void ProcessOn::setRange(size_t start, size_t end)
{
	this->ui.progressBar->setRange(start, end);
}

void ProcessOn::setValue(size_t v)
{
	this->ui.progressBar->setValue(v);
	QCoreApplication::processEvents(QEventLoop::AllEvents);
	this->show();
}
