From ce33d5a804892089f37c7a99da722876a49476f4 Mon Sep 17 00:00:00 2001 From: NeoTheFox Date: Sat, 28 Mar 2015 21:34:49 +0300 Subject: [PATCH] Added new error type --- errorwindow.cpp | 3 +++ mainwindow.cpp | 2 +- repraptor.h | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/errorwindow.cpp b/errorwindow.cpp index f5b809a..2c1df51 100644 --- a/errorwindow.cpp +++ b/errorwindow.cpp @@ -16,6 +16,9 @@ ErrorWindow::ErrorWindow(QWidget *parent, QString errorText, int errType): 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; diff --git a/mainwindow.cpp b/mainwindow.cpp index 47949c2..a6c0fde 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -869,7 +869,7 @@ void MainWindow::EEPROMSettingReceived(QString esetting) void MainWindow::receivedError() { //This should be raised if "!!" received - ErrorWindow errorwindow(this, tr("Hardware failure")); + ErrorWindow errorwindow(this, tr("Hardware failure"), 3); errorwindow.exec(); } diff --git a/repraptor.h b/repraptor.h index f731dfa..af571f2 100644 --- a/repraptor.h +++ b/repraptor.h @@ -27,7 +27,8 @@ namespace RepRaptor enum ErrorType { SerialPortError, - OpenFileError + OpenFileError, + HardwareFailure }; typedef struct