2018-01-19 20:17:21 +01:00
|
|
|
#ifndef LC_GLOBAL_H
|
|
|
|
#define LC_GLOBAL_H
|
2018-01-19 18:46:38 +01:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2013-08-09 06:57:18 +02:00
|
|
|
|
2015-01-31 21:38:53 +01:00
|
|
|
#include <QtGlobal>
|
2021-07-06 02:00:41 +02:00
|
|
|
#include <QtWidgets>
|
|
|
|
#include <QtConcurrent>
|
2015-01-31 21:38:53 +01:00
|
|
|
#include <QtOpenGL>
|
|
|
|
#include <QtGui>
|
2021-07-06 02:00:41 +02:00
|
|
|
#include <QWidget>
|
|
|
|
#include <QOpenGLWidget>
|
2015-02-01 03:33:42 +01:00
|
|
|
#include <QPrinter>
|
2022-02-14 01:00:08 +01:00
|
|
|
#include <QPrintDialog>
|
2019-05-30 21:06:54 +02:00
|
|
|
#include <map>
|
|
|
|
#include <vector>
|
2018-04-08 03:45:44 +02:00
|
|
|
#include <array>
|
2019-05-26 20:08:47 +02:00
|
|
|
#include <set>
|
2019-05-30 21:06:54 +02:00
|
|
|
#include <functional>
|
2020-12-05 20:19:11 +01:00
|
|
|
#include <memory>
|
2015-01-31 21:38:53 +01:00
|
|
|
|
2021-01-16 23:43:24 +01:00
|
|
|
#if _MSC_VER
|
|
|
|
#pragma warning(default : 4062) // enumerator 'identifier' in switch of enum 'enumeration' is not handled
|
2021-01-23 19:52:45 +01:00
|
|
|
#pragma warning(default : 4388) // 'token' : signed/unsigned mismatch
|
|
|
|
#pragma warning(default : 4389) // 'equality-operator' : signed/unsigned mismatch
|
2021-06-26 22:27:17 +02:00
|
|
|
#pragma warning(default : 5038) // data member 'A::y' will be initialized after data member 'A::x'
|
2021-01-16 23:43:24 +01:00
|
|
|
#endif
|
|
|
|
|
2018-09-24 20:29:05 +02:00
|
|
|
#ifndef Q_FALLTHROUGH
|
2019-05-30 21:26:10 +02:00
|
|
|
#define Q_FALLTHROUGH();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef QT_STRINGIFY
|
2019-12-09 20:43:54 +01:00
|
|
|
#define QT_STRINGIFY2(x) #x
|
|
|
|
#define QT_STRINGIFY(x) QT_STRINGIFY2(x)
|
2018-09-24 20:29:05 +02:00
|
|
|
#endif
|
|
|
|
|
2019-12-09 20:43:54 +01:00
|
|
|
#define LC_ARRAY_COUNT(x) ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x])))))
|
2020-12-06 20:26:55 +01:00
|
|
|
#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 20:43:54 +01:00
|
|
|
|
2017-12-07 07:08:56 +01:00
|
|
|
#if !defined(EGL_VERSION_1_0) && !defined(GL_ES_VERSION_2_0) && !defined(GL_ES_VERSION_3_0) && !defined(QT_OPENGL_ES)
|
2021-11-21 04:56:52 +01:00
|
|
|
#ifdef Q_OS_MACOS
|
|
|
|
#define LC_FIXED_FUNCTION 0
|
|
|
|
#else
|
|
|
|
#define LC_FIXED_FUNCTION 1
|
|
|
|
#endif
|
2017-02-11 18:46:21 +01:00
|
|
|
#else
|
|
|
|
#define LC_OPENGLES 1
|
2021-11-21 04:56:52 +01:00
|
|
|
#define LC_FIXED_FUNCTION 0
|
2017-02-11 18:46:21 +01:00
|
|
|
#endif
|
2015-05-09 21:54:29 +02:00
|
|
|
|
2015-01-31 21:38:53 +01:00
|
|
|
// Old defines and declarations.
|
|
|
|
#define LC_MAXPATH 1024
|
2019-02-28 15:47:09 +01:00
|
|
|
#define LC_MAXNAME 1000
|
2015-01-31 21:38:53 +01:00
|
|
|
|
2021-01-06 18:55:03 +01:00
|
|
|
typedef quint32 lcStep;
|
|
|
|
#define LC_STEP_MAX 0xffffffff
|
|
|
|
|
2015-01-31 21:38:53 +01:00
|
|
|
#ifdef Q_OS_WIN
|
|
|
|
char* strcasestr(const char *s, const char *find);
|
|
|
|
#else
|
|
|
|
char* strupr(char* string);
|
|
|
|
#endif
|
2013-08-09 06:57:18 +02:00
|
|
|
|
|
|
|
// Version number.
|
2023-03-20 00:04:45 +01:00
|
|
|
#define LC_VERSION_MAJOR 23
|
|
|
|
#define LC_VERSION_MINOR 03
|
2021-01-13 00:12:48 +01:00
|
|
|
#define LC_VERSION_PATCH 0
|
2023-03-20 00:04:45 +01:00
|
|
|
#define LC_VERSION_TEXT "23.03"
|
2013-08-09 06:57:18 +02:00
|
|
|
|
|
|
|
// Forward declarations.
|
2015-02-22 03:39:15 +01:00
|
|
|
class Project;
|
2014-09-02 05:44:51 +02:00
|
|
|
class lcModel;
|
2014-05-01 20:42:11 +02:00
|
|
|
class lcObject;
|
|
|
|
class lcPiece;
|
|
|
|
class lcCamera;
|
|
|
|
class lcLight;
|
2014-05-25 03:45:19 +02:00
|
|
|
class lcGroup;
|
2014-10-11 01:53:08 +02:00
|
|
|
class PieceInfo;
|
2017-04-16 00:54:17 +02:00
|
|
|
typedef std::map<const PieceInfo*, std::map<int, int>> lcPartsList;
|
2014-12-30 17:30:12 +01:00
|
|
|
struct lcModelPartsEntry;
|
2020-12-07 04:33:15 +01:00
|
|
|
struct lcMinifig;
|
2020-12-13 19:33:42 +01:00
|
|
|
enum class lcViewpoint;
|
2021-01-10 01:02:23 +01:00
|
|
|
enum class lcShadingMode;
|
2021-01-22 23:16:28 +01:00
|
|
|
enum class lcStudStyle;
|
2021-01-06 03:48:12 +01:00
|
|
|
class lcInstructions;
|
2021-01-07 19:46:57 +01:00
|
|
|
struct lcInstructionsPageSetup;
|
2021-01-06 18:55:03 +01:00
|
|
|
struct lcObjectRayTest;
|
|
|
|
struct lcObjectBoxTest;
|
2014-05-01 20:42:11 +02:00
|
|
|
|
2013-08-09 06:57:18 +02:00
|
|
|
class lcVector2;
|
|
|
|
class lcVector3;
|
|
|
|
class lcVector4;
|
2015-01-10 21:30:37 +01:00
|
|
|
class lcMatrix33;
|
2013-08-09 06:57:18 +02:00
|
|
|
class lcMatrix44;
|
|
|
|
|
2021-01-31 21:05:15 +01:00
|
|
|
class lcFindReplaceWidget;
|
|
|
|
struct lcFindReplaceParams;
|
2021-01-07 02:45:38 +01:00
|
|
|
class lcCollapsibleWidget;
|
2020-12-18 02:59:11 +01:00
|
|
|
class lcViewWidget;
|
2020-12-25 19:37:59 +01:00
|
|
|
class lcView;
|
2014-04-14 05:20:16 +02:00
|
|
|
class lcContext;
|
2013-08-09 06:57:18 +02:00
|
|
|
class lcMesh;
|
2014-04-14 05:20:16 +02:00
|
|
|
struct lcMeshSection;
|
2014-04-20 03:50:41 +02:00
|
|
|
struct lcRenderMesh;
|
2020-12-16 03:47:58 +01:00
|
|
|
struct lcObjectSection;
|
2021-12-25 00:42:37 +01:00
|
|
|
struct lcPieceInfoRayTest;
|
2013-08-09 06:57:18 +02:00
|
|
|
class lcTexture;
|
2015-02-08 19:54:51 +01:00
|
|
|
class lcScene;
|
2021-06-20 20:40:16 +02:00
|
|
|
class lcViewManipulator;
|
2020-12-16 03:47:58 +01:00
|
|
|
class lcViewSphere;
|
2019-11-23 01:47:58 +01:00
|
|
|
enum class lcRenderMeshState : int;
|
2021-06-20 20:40:16 +02:00
|
|
|
enum class lcTrackTool;
|
|
|
|
enum class lcTrackButton;
|
2013-08-09 06:57:18 +02:00
|
|
|
|
|
|
|
class lcFile;
|
|
|
|
class lcMemFile;
|
|
|
|
class lcDiskFile;
|
|
|
|
|
2018-01-19 18:46:38 +01:00
|
|
|
#endif
|
2018-01-19 20:17:21 +01:00
|
|
|
|
|
|
|
#endif // LC_GLOBAL_H
|