COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Application.hpp
Go to the documentation of this file.
1 #ifndef cf3_test_ui_Application_hpp
2 #define cf3_test_ui_Application_hpp
3 
4 #include <boost/assign/list_of.hpp>
5 #include <boost/test/unit_test.hpp>
6 
7 #include <iostream>
8 
9 #include <QApplication>
10 
11 QApplication * application()
12 {
13 
14 #ifdef Q_WS_X11
15  if( getenv("DISPLAY") == 0 ) // if no graphical environment is found, we exit
16  {
17  std::cout << "No graphical environment found, exiting..." << std::endl;
18  exit(0);
19  }
20 #endif
21  static QApplication * app = new QApplication(
22  boost::unit_test::framework::master_test_suite().argc,
23  boost::unit_test::framework::master_test_suite().argv
24  );
25 
26  return app;
27 }
28 
29 #endif // cf3_test_ui_Application_hpp
QApplication * application()
Definition: Application.hpp:11
Send comments to:
COOLFluiD Web Admin