Changeset 149 in tspsg-svn for trunk/src/globals.h
- Timestamp:
- Dec 20, 2010, 9:53:45 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/globals.h
r143 r149 32 32 #include <QtCore> 33 33 #if QT_VERSION < 0x040500 34 #error You are using Qt version < 4.5 but minimum required version is 4.5.0. Compilation aborted.34 # error You are using Qt version < 4.5 but minimum required version is 4.5.0. Compilation aborted. 35 35 #endif 36 36 #if defined(Q_WS_WINCE_WM) || defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR) 37 38 #define HANDHELD39 #define QT_NO_STATUSTIP37 //! This is defined on handheld devices (e.g., Windows Mobile, Symbian). 38 # define HANDHELD 39 # define QT_NO_STATUSTIP 40 40 #endif 41 41 #include <QtGui> 42 42 #if defined(QT_NO_SVG) && !defined(NOSVG) 43 #define NOSVG43 # define NOSVG 44 44 #endif 45 45 #if !defined(NOSVG) 46 #include <QtSvg>46 # include <QtSvg> 47 47 #endif // NOSVG 48 48 49 49 #ifndef HANDHELD 50 #include "qttoolbardialog.h"50 # include "qttoolbardialog.h" 51 51 #endif 52 52 … … 60 60 #include "tspsolver.h" 61 61 #ifdef Q_WS_WIN32 62 63 #include "qtwin.h"62 // Vista/7 Eyecandy 63 # include "qtwin.h" 64 64 #endif // Q_WS_WIN32 65 65 … … 76 76 */ 77 77 #ifndef PATH_L10N 78 #define PATH_L10N "l10n"78 # define PATH_L10N "l10n" 79 79 #endif // PATH_L10N 80 80 /*! … … 83 83 */ 84 84 #ifndef PATH_DOCS 85 #define PATH_DOCS "help"85 # define PATH_DOCS "help" 86 86 #endif // PATH_DOCS 87 87 … … 111 111 { 112 112 double i; 113 113 return (modf(x, &i) == 0.0); 114 114 } 115 115 … … 123 123 { 124 124 #ifdef Q_WS_WIN32 125 125 return QFile::exists("updater/Update.exe"); 126 126 #else // Q_WS_WIN32 127 127 return false; 128 128 #endif // Q_WS_WIN32 129 129 } … … 143 143 144 144 #ifdef HANDHELD 145 #define ICON_SIZE "32x32"146 #define ICON_FORMAT "png"145 # define ICON_SIZE "32x32" 146 # define ICON_FORMAT "png" 147 147 #else 148 #define ICON_SIZE "128x128"149 #define ICON_FORMAT "png"148 # define ICON_SIZE "128x128" 149 # define ICON_FORMAT "png" 150 150 #endif 151 151 152 152 #if QT_VERSION >= 0x040600 153 #define GET_ICON(x) QIcon::fromTheme(x, QIcon(":/images/icons/"ICON_SIZE"/"x"."ICON_FORMAT))153 # define GET_ICON(x) QIcon::fromTheme(x, QIcon(":/images/icons/"ICON_SIZE"/"x"."ICON_FORMAT)) 154 154 #else 155 #define GET_ICON(x) QIcon(":/images/icons/"ICON_SIZE"/"x"."ICON_FORMAT)155 # define GET_ICON(x) QIcon(":/images/icons/"ICON_SIZE"/"x"."ICON_FORMAT) 156 156 #endif 157 157 … … 159 159 // Check that default number of cities is sane (<= MAX_NUM_CITIES) 160 160 #if DEF_NUM_CITIES > MAX_NUM_CITIES 161 #undef DEF_NUM_CITIES162 #define DEF_NUM_CITIES MAX_NUM_CITIES161 # undef DEF_NUM_CITIES 162 # define DEF_NUM_CITIES MAX_NUM_CITIES 163 163 #endif 164 164 // Check that maximum for random generation is sane (<= MAX_RAND_VALUE) 165 165 #if DEF_RAND_MAX > MAX_RAND_VALUE 166 #undef DEF_RAND_MAX167 #define DEF_RAND_MAX MAX_RAND_VALUE166 # undef DEF_RAND_MAX 167 # define DEF_RAND_MAX MAX_RAND_VALUE 168 168 #endif 169 169 // Check that DEF_RAND_MIN <= DEF_RAND_MAX 170 170 #if DEF_RAND_MIN > DEF_RAND_MAX 171 #undef DEF_RAND_MIN172 #define DEF_RAND_MIN DEF_RAND_MAX171 # undef DEF_RAND_MIN 172 # define DEF_RAND_MIN DEF_RAND_MAX 173 173 #endif 174 174
Note: See TracChangeset
for help on using the changeset viewer.