resource.hpp 1.4 KB
Newer Older
1
/*!
2
 *\file resource.hpp
3 4 5 6 7
 *\brief This file gives some common header files for the interface classes.
 */



8 9
#ifndef RESOURCE_HPP
#define RESOURCE_HPP
10 11


12 13 14
#include "../../main_resource.hpp"


15 16 17
#include <cmath>
#include <stack>
#include <list>
Olivier Lagrasse's avatar
Olivier Lagrasse committed
18

19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
/* For OpenGL text rendering */
#include <GL/glut.h>

/* These paths corresponding to the path in the resource file ('vite.qrc' in the 'bin' folder) */
#define UI_MAIN_WINDOW_NAME ":/window/main_window.ui"/* The main window ui file. */
#define UI_INFO_WINDOW_NAME ":/window/info_window.ui"/* The info window ui file. */


#define PI 3.14159265


/* Now, two checkers are defined (the first for integer return value, the other 
   for pointer return value). Their body can be empty to enhance program speed. 
   To pass multi arguments for m, use "<<" between each arguments.
*/
#define CKF(f, m) if((f)==-1) {                                         \
        cerr << "File " << __FILE__ <<" - line : " << __LINE__ <<endl;  \
        cerr << m <<endl;                                               \
        exit(EXIT_FAILURE);                                             \
    }

#define CKFP(f, m) if((f)==NULL) {                                      \
        cerr << "File " << __FILE__ <<" - line : " << __LINE__ <<endl;  \
        cerr << m <<endl;                                               \
        exit(EXIT_FAILURE);                                             \
    }


47 48


49
#endif