#include "CImportResultDialog.h"

CImportResultDialog::CImportResultDialog(QWidget *parent)
    : QDialog(parent)
{
	ui.setupUi(this);

	connect(ui.okButton, 				SIGNAL(clicked()),
			this, 						  SLOT(accept()));
	connect(ui.detailsButton, 			SIGNAL(toggled(bool)),
			ui.textBrowser, 			  SLOT(setVisible(bool)));
}

CImportResultDialog::~CImportResultDialog()
{

}

int CImportResultDialog::exec(QString status, QString details)
{
	ui.statusLabel->setText(status);
	ui.textBrowser->setText(details);
	ui.textBrowser->setVisible(false);

	layout()->setSizeConstraint(QLayout::SetFixedSize);

	return QDialog::exec();
}
