2017-07-19 23:20:32 +02:00
|
|
|
#pragma once
|
2013-08-09 06:57:18 +02:00
|
|
|
|
2013-08-16 01:43:18 +02:00
|
|
|
#include "lc_array.h"
|
2013-08-09 06:57:18 +02:00
|
|
|
|
|
|
|
class Project;
|
|
|
|
class lcPiecesLibrary;
|
2017-03-17 23:53:26 +01:00
|
|
|
|
|
|
|
enum lcLightingMode
|
|
|
|
{
|
|
|
|
LC_LIGHTING_UNLIT,
|
|
|
|
LC_LIGHTING_FAKE,
|
|
|
|
LC_LIGHTING_FULL,
|
|
|
|
LC_NUM_LIGHTING_MODES
|
|
|
|
};
|
2014-02-10 01:13:41 +01:00
|
|
|
|
|
|
|
class lcPreferences
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void LoadDefaults();
|
|
|
|
void SaveDefaults();
|
|
|
|
|
|
|
|
int mMouseSensitivity;
|
|
|
|
lcLightingMode mLightingMode;
|
|
|
|
bool mDrawAxes;
|
|
|
|
bool mDrawEdgeLines;
|
|
|
|
float mLineWidth;
|
|
|
|
bool mDrawGridStuds;
|
|
|
|
lcuint32 mGridStudColor;
|
|
|
|
bool mDrawGridLines;
|
|
|
|
int mGridLineSpacing;
|
|
|
|
lcuint32 mGridLineColor;
|
2014-10-05 07:21:51 +02:00
|
|
|
bool mFixedAxes;
|
2014-02-10 01:13:41 +01:00
|
|
|
};
|
|
|
|
|
2013-08-09 06:57:18 +02:00
|
|
|
class lcApplication
|
|
|
|
{
|
2015-01-30 17:30:13 +01:00
|
|
|
Q_DECLARE_TR_FUNCTIONS(lcApplication);
|
|
|
|
|
2013-08-09 06:57:18 +02:00
|
|
|
public:
|
|
|
|
lcApplication();
|
|
|
|
~lcApplication();
|
|
|
|
|
2014-12-04 02:47:28 +01:00
|
|
|
void SetProject(Project* Project);
|
2016-12-07 18:24:47 +01:00
|
|
|
bool Initialize(int argc, char *argv[], const char* LibraryInstallPath, const char* LDrawPath, bool& ShowWindow);
|
2013-08-09 06:57:18 +02:00
|
|
|
void Shutdown();
|
2014-02-10 01:13:41 +01:00
|
|
|
void ShowPreferencesDialog();
|
2013-08-09 06:57:18 +02:00
|
|
|
|
2015-07-22 06:00:47 +02:00
|
|
|
bool LoadPiecesLibrary(const char* LibPath, const char* LibraryInstallPath, const char* LDrawPath);
|
2013-08-09 06:57:18 +02:00
|
|
|
|
2014-12-16 00:55:17 +01:00
|
|
|
void SetClipboard(const QByteArray& Clipboard);
|
|
|
|
void ExportClipboard(const QByteArray& Clipboard);
|
2013-08-09 06:57:18 +02:00
|
|
|
|
|
|
|
Project* mProject;
|
2014-02-10 01:13:41 +01:00
|
|
|
lcPiecesLibrary* mLibrary;
|
|
|
|
lcPreferences mPreferences;
|
2014-12-16 00:55:17 +01:00
|
|
|
QByteArray mClipboard;
|
2013-08-09 06:57:18 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void ParseIntegerArgument(int* CurArg, int argc, char* argv[], int* Value);
|
|
|
|
void ParseStringArgument(int* CurArg, int argc, char* argv[], char** Value);
|
|
|
|
};
|
|
|
|
|
|
|
|
extern lcApplication* g_App;
|
|
|
|
|
|
|
|
inline lcPiecesLibrary* lcGetPiecesLibrary()
|
|
|
|
{
|
2014-02-10 01:13:41 +01:00
|
|
|
return g_App->mLibrary;
|
2013-08-09 06:57:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
inline Project* lcGetActiveProject()
|
|
|
|
{
|
|
|
|
return g_App->mProject;
|
|
|
|
}
|
|
|
|
|
2014-10-05 07:21:51 +02:00
|
|
|
inline lcPreferences& lcGetPreferences()
|
2014-02-10 01:13:41 +01:00
|
|
|
{
|
|
|
|
return g_App->mPreferences;
|
|
|
|
}
|
|
|
|
|