00001
00028 #ifndef GLOBALS_H
00029 #define GLOBALS_H
00030
00031
00032 #include <QtCore>
00033 #include <QtGui>
00034
00035
00036 #include "version.h"
00037
00038 #include "os.h"
00039
00040
00041
00043 #define DEF_RAND_MIN 1
00045 #define DEF_RAND_MAX 10
00047 #define DEF_NUM_CITIES 5
00049 #define DEF_FONT_FAMILY "Courier New"
00051 #define DEF_FONT_SIZE 10
00053 #define DEF_FONT_COLOR Qt::black
00054
00056 #define MAX_NUM_CITIES 30
00058 #define MAX_RAND_VALUE 1000
00059
00060
00069 #if defined(Q_OS_LINUX) || defined(Q_OS_UNIX)
00070 #define PATH_I18N "/usr/share/tspsg/i18n"
00071 #define PATH_DOCS "/usr/share/doc/tspsg"
00072 #else
00073 #define PATH_I18N "i18n"
00074 #define PATH_DOCS "help"
00075 #endif // Q_OS_LINUX
00076
00078 #define TSPT quint32(0x54535054)
00080 #define TSPT_VERSION quint8(1)
00082 #define TSPT_META_VERSION quint8(1)
00084 #define TSPT_META_SIZE 2
00086 #define ZKT quint16(0x5A4B)
00088 #define ZKT_VERSION quint8(1)
00089
00097 #ifdef INFINITY
00098 #undef INFINITY
00099 #endif
00100 #define INFINITY 1.7E+308
00102 #define INFSTR "---"
00103
00104
00105
00106 #if DEF_NUM_CITIES > MAX_NUM_CITIES
00107 #undef DEF_NUM_CITIES
00108 #define DEF_NUM_CITIES MAX_NUM_CITIES
00109 #endif
00110
00111 #if DEF_RAND_MAX > MAX_RAND_VALUE
00112 #undef DEF_RAND_MAX
00113 #define DEF_RAND_MAX MAX_RAND_VALUE
00114 #endif
00115
00116 #if DEF_RAND_MIN > DEF_RAND_MAX
00117 #undef DEF_RAND_MIN
00118 #define DEF_RAND_MIN DEF_RAND_MAX
00119 #endif
00120
00121 #endif // GLOBALS_H