#include "QToolProcessBarDialog.h"
#include "ui_QToolProcessBarDialog.h"

QToolProcessBarDialog::QToolProcessBarDialog(QWidget *parent)
	: ui(new Ui::QToolProcessBarDialogClass), QDialog(parent)
{
	ui->setupUi(this);
	ui->progressBar->setRange(0, 100);
}

QToolProcessBarDialog::~QToolProcessBarDialog()
{}

void QToolProcessBarDialog::showProcess(double precent, QString tip)
{
	ui->progressBar->setValue(std::ceil(precent * 100));
	ui->labelTip->setText(tip);
	this->update();
}

void QToolProcessBarDialog::showToolInfo(QString tip)
{
	ui->textEditTip->append("\n"+tip);
}
