RepRaptor/errorwindow.cpp
2015-03-28 21:34:49 +03:00

34 lines
717 B
C++

#include "errorwindow.h"
#include "ui_errorwindow.h"
using namespace RepRaptor;
ErrorWindow::ErrorWindow(QWidget *parent, QString errorText, int errType):
QDialog(parent),
ui(new Ui::ErrorWindow)
{
ui->setupUi(this);
switch(errType)
{
case SerialPortError:
ui->label->setText(tr("Serial port error:"));
break;
case OpenFileError:
ui->label->setText(tr("File open error:"));
break;
case HardwareFailure:
ui->label->setText(tr("Hardware failure:"));
break;
default:
ui->label->setText(tr("Unknown error type:"));
break;
}
ui->errorlabel->setText(errorText);
}
ErrorWindow::~ErrorWindow()
{
delete ui;
}