forked from NeoTheFox/RepRaptor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrorwindow.cpp
More file actions
33 lines (29 loc) · 717 Bytes
/
errorwindow.cpp
File metadata and controls
33 lines (29 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#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;
}