main.cpp
Go to the documentation of this file.
1 
8 #include <QApplication>
9 #include <QtGui>
10 #include "dicom.h"
11 #include <QtDcmManager.h>
12 
13 #define NO_COLOR "\x1b[0m"
14 #define DEBUG_COLOR "\033[33m"
15 #define INFO_COLOR "\033[36m"
16 #define WARNING_COLOR "\033[33m"
17 #define CRITICAL_COLOR "\033[31;1m"
18 #define MESSAGE_COLOR "\033[0m"
19 
20 int main( int argc , char *argv[] )
21 {
22  QString messagePattern = QString("%1[%{time yyyyMMdd h:mm:ss.zzz}] "
23  "%{if-debug}%2DEB %{endif}%{if-info}%3%{endif}%{if-warning}%4WAR %{endif}%{if-critical}%5CRIT%{endif} %1"
24  "%3 %{file}:%{line} %6 %{message} %1")
25  .arg(NO_COLOR)
26  .arg(DEBUG_COLOR)
27  .arg(INFO_COLOR)
28  .arg(WARNING_COLOR)
29  .arg(CRITICAL_COLOR)
30  .arg(MESSAGE_COLOR);
31 
32  qSetMessagePattern(messagePattern);
33  QApplication app(argc, argv);
34 
35  Dicom dcm;
36  dcm.setWindowIcon(QIcon(":Images/dicom.xpm"));
37  dcm.show();
38 
39  int ret = app.exec();
41 
42  return ret;
43 }
#define DEBUG_COLOR
Definition: main.cpp:14
#define CRITICAL_COLOR
Definition: main.cpp:17
Definition: dicom.h:15
#define NO_COLOR
Definition: main.cpp:13
Main class for the example application.
#define INFO_COLOR
Definition: main.cpp:15
#define MESSAGE_COLOR
Definition: main.cpp:18
static void destroy()
int main(int argc, char *argv[])
Definition: main.cpp:20
#define WARNING_COLOR
Definition: main.cpp:16