ImageD  v2_7_5 (24.06.22)
ImageD is an image processing software designed for rapid prototyping and implementing algorithms and solutions for science, research and teaching.
d_error_handler.h
Go to the documentation of this file.
1 /************************************
2  * added: 12.11.2018 *
3  * author: David Eilenstein *
4  * contact: D.Eilenstein@gsi.de *
5  * project: ImageD *
6  * facility: GSI Darmstadt, Ger *
7  ************************************/
8 
9 #ifndef D_ERROR_HANDLER_H
10 #define D_ERROR_HANDLER_H
11 
12 //own
13 #include <d_enum.h>
14 
15 //general
16 #include <iostream>
17 #include <vector>
18 #include <fstream>
19 
20 //Qt
21 #include <QObject>
22 #include <QString>
23 #include <QStringList>
24 #include <QDebug>
25 #include <QMessageBox>
26 #include <QSizePolicy>
27 #include <QFileInfo>
28 #include <QDateTime>
29 
30 //namespaces
31 using namespace std;
32 
38 {
39 
40 public:
42 
43  void ERR(int err, QString sender, QString func, QString detail);
44  void set_Popup_active(bool show_pop) {err_popup = show_pop;}
45  void set_FileStream_active(bool stream_to_file) {err_stream = stream_to_file;}
46  void set_FileStream_path_csv(QString path);
47 
48 private:
49  bool err_popup = true;
50  bool err_stream = false;
51  bool file_set = false;
52  QFileInfo FI_ErrorProtocol;
53 
54  QStringList QSL_StashedErrors;
55 };
56 
57 #endif // D_ERROR_HANDLER_H
QSL_Errors
const QStringList QSL_Errors
Definition: d_enum.h:183
ER_okay
@ ER_okay
Definition: d_enum.h:133
ER_file_not_exist
@ ER_file_not_exist
Definition: d_enum.h:161
D_Error_Handler::set_FileStream_path_csv
void set_FileStream_path_csv(QString path)
D_Error_Handler::set_FileStream_path_csv set the file for error streaming and activates error streami...
Definition: d_error_handler.cpp:103
D_Error_Handler::ERR
void ERR(int err, QString sender, QString func, QString detail)
D_Error_Handler::ERR pops an error message if an error occured and/or streams it to a csv file.
Definition: d_error_handler.cpp:23
ER_number_of
@ ER_number_of
Definition: d_enum.h:181
D_Error_Handler
The D_Error_Handler class takes error codes from D_ERROR_ENUM and shows a popup if an error occures.
Definition: d_error_handler.h:38
D_Error_Handler::set_Popup_active
void set_Popup_active(bool show_pop)
Definition: d_error_handler.h:44
D_Error_Handler::set_FileStream_active
void set_FileStream_active(bool stream_to_file)
Definition: d_error_handler.h:45
ER_other
@ ER_other
Definition: d_enum.h:134
d_enum.h
d_error_handler.h
D_Error_Handler::D_Error_Handler
D_Error_Handler()
Definition: d_error_handler.cpp:11
QS_Fun_Sad
const QString QS_Fun_Sad
Definition: d_enum.h:2523