1 #ifndef LC_GLOBAL_H 2 #define LC_GLOBAL_H 3 4 #ifdef __cplusplus 5 6 #include <QtGlobal> 7 #include <QWidget> 8 #include <QtOpenGL> 9 #include <QGLWidget> 10 #include <QtGui> 11 #include <QPrinter> 12 #include <QtConcurrent> 13 #include <map> 14 #include <vector> 15 #include <array> 16 #include <set> 17 #include <functional> 18 #include <memory> 19 20 #if _MSC_VER 21 #pragma warning(default : 4062) // enumerator 'identifier' in switch of enum 'enumeration' is not handled 22 #pragma warning(default : 4388) // 'token' : signed/unsigned mismatch 23 #pragma warning(default : 4389) // 'equality-operator' : signed/unsigned mismatch 24 #endif 25 26 #ifndef Q_FALLTHROUGH 27 #define Q_FALLTHROUGH(); 28 #endif 29 30 #ifndef QT_STRINGIFY 31 #define QT_STRINGIFY2(x) #x 32 #define QT_STRINGIFY(x) QT_STRINGIFY2(x) 33 #endif 34 35 #define LC_ARRAY_COUNT(x) ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x]))))) 36 #define LC_ARRAY_SIZE_CHECK(a,s) static_assert(LC_ARRAY_COUNT(a) == static_cast<int>(s), QT_STRINGIFY(a) " size mismatch.") 37 38 #if !defined(EGL_VERSION_1_0) && !defined(GL_ES_VERSION_2_0) && !defined(GL_ES_VERSION_3_0) && !defined(QT_OPENGL_ES) 39 #else 40 #define LC_OPENGLES 1 41 #endif 42 43 // Old defines and declarations. 44 #define LC_MAXPATH 1024 45 #define LC_MAXNAME 1000 46 47 typedef quint32 lcStep; 48 #define LC_STEP_MAX 0xffffffff 49 50 #ifdef Q_OS_WIN 51 char* strcasestr(const char *s, const char *find); 52 #else 53 char* strupr(char* string); 54 #endif 55 56 // Version number. 57 #define LC_VERSION_MAJOR 21 58 #define LC_VERSION_MINOR 06 59 #define LC_VERSION_PATCH 0 60 #define LC_VERSION_TEXT "21.06" 61 62 // Forward declarations. 63 class Project; 64 class lcModel; 65 class lcObject; 66 class lcPiece; 67 class lcCamera; 68 class lcLight; 69 class lcGroup; 70 class PieceInfo; 71 typedef std::map<const PieceInfo*, std::map<int, int>> lcPartsList; 72 struct lcModelPartsEntry; 73 struct lcMinifig; 74 enum class lcViewpoint; 75 enum class lcShadingMode; 76 enum class lcStudStyle; 77 class lcInstructions; 78 struct lcInstructionsPageSetup; 79 struct lcObjectRayTest; 80 struct lcObjectBoxTest; 81 82 class lcVector2; 83 class lcVector3; 84 class lcVector4; 85 class lcMatrix33; 86 class lcMatrix44; 87 88 class lcFindReplaceWidget; 89 struct lcFindReplaceParams; 90 class lcCollapsibleWidget; 91 class lcViewWidget; 92 class lcView; 93 class lcContext; 94 class lcMesh; 95 struct lcMeshSection; 96 struct lcRenderMesh; 97 struct lcObjectSection; 98 class lcTexture; 99 class lcScene; 100 class lcViewSphere; 101 enum class lcRenderMeshState : int; 102 103 class lcFile; 104 class lcMemFile; 105 class lcDiskFile; 106 107 #endif 108 109 #endif // LC_GLOBAL_H 110