leocad/common/lc_global.h

101 lines
2 KiB
C
Raw Normal View History

#ifndef LC_GLOBAL_H
#define LC_GLOBAL_H
#ifdef __cplusplus
2013-08-09 04:57:18 +00:00
2015-01-31 20:38:53 +00:00
#include <QtGlobal>
#include <QWidget>
#include <QtOpenGL>
#include <QGLWidget>
#include <QtGui>
2015-02-01 02:33:42 +00:00
#include <QPrinter>
2021-01-08 10:35:52 -08:00
#include <QtConcurrent>
#include <map>
#include <vector>
2018-04-07 18:45:44 -07:00
#include <array>
#include <set>
#include <functional>
2020-12-05 11:19:11 -08:00
#include <memory>
2015-01-31 20:38:53 +00:00
2018-09-24 11:29:05 -07:00
#ifndef Q_FALLTHROUGH
2019-05-30 12:26:10 -07:00
#define Q_FALLTHROUGH();
#endif
#ifndef QT_STRINGIFY
2019-12-09 11:43:54 -08:00
#define QT_STRINGIFY2(x) #x
#define QT_STRINGIFY(x) QT_STRINGIFY2(x)
2018-09-24 11:29:05 -07:00
#endif
2019-12-09 11:43:54 -08:00
#define LC_ARRAY_COUNT(x) ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x])))))
#define LC_ARRAY_SIZE_CHECK(a,s) static_assert(LC_ARRAY_COUNT(a) == static_cast<int>(s), QT_STRINGIFY(a) " size mismatch.")
2019-12-09 11:43:54 -08:00
2017-12-06 22:08:56 -08:00
#if !defined(EGL_VERSION_1_0) && !defined(GL_ES_VERSION_2_0) && !defined(GL_ES_VERSION_3_0) && !defined(QT_OPENGL_ES)
2017-02-11 09:46:21 -08:00
#else
#define LC_OPENGLES 1
#endif
2015-05-09 19:54:29 +00:00
2015-01-31 20:38:53 +00:00
// Old defines and declarations.
#define LC_MAXPATH 1024
2019-02-28 15:47:09 +01:00
#define LC_MAXNAME 1000
2015-01-31 20:38:53 +00:00
typedef quint32 lcStep;
#define LC_STEP_MAX 0xffffffff
2015-01-31 20:38:53 +00:00
#ifdef Q_OS_WIN
char* strcasestr(const char *s, const char *find);
#else
char* strupr(char* string);
#endif
2013-08-09 04:57:18 +00:00
// Version number.
2021-01-12 15:12:48 -08:00
#define LC_VERSION_MAJOR 21
#define LC_VERSION_MINOR 01
#define LC_VERSION_PATCH 0
2021-01-12 15:40:44 -08:00
#define LC_VERSION_TEXT "21.01"
2013-08-09 04:57:18 +00:00
// Forward declarations.
2015-02-22 02:39:15 +00:00
class Project;
class lcModel;
2014-05-01 18:42:11 +00:00
class lcObject;
class lcPiece;
class lcCamera;
class lcLight;
2014-05-25 01:45:19 +00:00
class lcGroup;
2014-10-10 23:53:08 +00:00
class PieceInfo;
typedef std::map<const PieceInfo*, std::map<int, int>> lcPartsList;
2014-12-30 16:30:12 +00:00
struct lcModelPartsEntry;
struct lcMinifig;
enum class lcViewpoint;
2021-01-09 16:02:23 -08:00
enum class lcShadingMode;
2021-01-05 18:48:12 -08:00
class lcInstructions;
2021-01-07 10:46:57 -08:00
struct lcInstructionsPageSetup;
struct lcObjectRayTest;
struct lcObjectBoxTest;
2014-05-01 18:42:11 +00:00
2013-08-09 04:57:18 +00:00
class lcVector2;
class lcVector3;
class lcVector4;
class lcMatrix33;
2013-08-09 04:57:18 +00:00
class lcMatrix44;
2021-01-06 17:45:38 -08:00
class lcCollapsibleWidget;
2020-12-17 17:59:11 -08:00
class lcViewWidget;
2020-12-25 10:37:59 -08:00
class lcView;
2014-04-14 03:20:16 +00:00
class lcContext;
2013-08-09 04:57:18 +00:00
class lcMesh;
2014-04-14 03:20:16 +00:00
struct lcMeshSection;
2014-04-20 01:50:41 +00:00
struct lcRenderMesh;
struct lcObjectSection;
2013-08-09 04:57:18 +00:00
class lcTexture;
2015-02-08 18:54:51 +00:00
class lcScene;
class lcViewSphere;
2019-11-22 16:47:58 -08:00
enum class lcRenderMeshState : int;
2013-08-09 04:57:18 +00:00
class lcFile;
class lcMemFile;
class lcDiskFile;
#endif
#endif // LC_GLOBAL_H