2011-09-07 23:06:51 +02:00
|
|
|
#ifndef _PROJECT_H_
|
|
|
|
#define _PROJECT_H_
|
|
|
|
|
|
|
|
#include "object.h"
|
2013-08-16 01:43:18 +02:00
|
|
|
#include "lc_array.h"
|
2014-12-08 08:32:39 +01:00
|
|
|
#include "lc_application.h"
|
2013-08-09 06:57:18 +02:00
|
|
|
|
|
|
|
#define LC_SCENE_FOG 0x004 // Enable fog
|
|
|
|
#define LC_SCENE_BG 0x010 // Draw bg image
|
|
|
|
#define LC_SCENE_BG_TILE 0x040 // Tile bg image
|
|
|
|
#define LC_SCENE_GRADIENT 0x100 // Draw gradient
|
|
|
|
|
|
|
|
#define LC_HTML_SINGLEPAGE 0x01
|
|
|
|
#define LC_HTML_INDEX 0x02
|
|
|
|
#define LC_HTML_IMAGES 0x04
|
|
|
|
#define LC_HTML_LISTEND 0x08
|
|
|
|
#define LC_HTML_LISTSTEP 0x10
|
|
|
|
#define LC_HTML_HIGHLIGHT 0x20
|
|
|
|
//#define LC_HTML_HTMLEXT 0x40
|
|
|
|
//#define LC_HTML_LISTID 0x80
|
|
|
|
|
2012-10-18 20:57:21 +02:00
|
|
|
enum LC_MOUSE_TRACK
|
2011-09-07 23:06:51 +02:00
|
|
|
{
|
2011-09-20 03:26:31 +02:00
|
|
|
LC_TRACK_NONE,
|
|
|
|
LC_TRACK_LEFT,
|
|
|
|
LC_TRACK_RIGHT
|
2012-10-18 20:57:21 +02:00
|
|
|
};
|
2011-09-07 23:06:51 +02:00
|
|
|
|
|
|
|
class PieceInfo;
|
|
|
|
class View;
|
|
|
|
class Image;
|
|
|
|
|
2014-12-08 08:32:39 +01:00
|
|
|
class Project
|
2011-09-07 23:06:51 +02:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
Project();
|
|
|
|
~Project();
|
|
|
|
|
2014-12-10 00:56:29 +01:00
|
|
|
const lcArray<lcModel*>& GetModels() const
|
|
|
|
{
|
|
|
|
return mModels;
|
|
|
|
}
|
|
|
|
|
2014-12-08 08:32:39 +01:00
|
|
|
lcModel* GetActiveModel() const
|
|
|
|
{
|
|
|
|
return mActiveModel;
|
|
|
|
}
|
|
|
|
|
2014-12-13 00:42:09 +01:00
|
|
|
bool IsModified() const;
|
2014-12-04 02:47:28 +01:00
|
|
|
QString GetTitle() const;
|
2014-12-13 00:42:09 +01:00
|
|
|
|
2014-12-04 02:47:28 +01:00
|
|
|
QString GetFileName() const
|
|
|
|
{
|
|
|
|
return mFileName;
|
|
|
|
}
|
|
|
|
|
2014-12-13 00:42:09 +01:00
|
|
|
void SetActiveModel(int ModelIndex);
|
|
|
|
bool IsModelNameValid(const QString& Name) const;
|
|
|
|
|
|
|
|
void CreateNewModel();
|
|
|
|
void ShowModelListDialog();
|
2014-12-04 02:47:28 +01:00
|
|
|
bool Load(const QString& FileName);
|
2014-12-08 08:32:39 +01:00
|
|
|
bool Save(const QString& FileName);
|
2014-12-23 18:02:23 +01:00
|
|
|
void Merge(Project* Other);
|
2014-12-04 02:47:28 +01:00
|
|
|
|
2014-12-30 17:30:12 +01:00
|
|
|
void Export3DStudio();
|
|
|
|
void ExportBrickLink();
|
|
|
|
void ExportCSV();
|
|
|
|
void ExportPOVRay();
|
|
|
|
void ExportWavefront();
|
|
|
|
|
2014-12-08 08:32:39 +01:00
|
|
|
protected:
|
2014-12-30 17:30:12 +01:00
|
|
|
void GetModelParts(lcArray<lcModelPartsEntry>& ModelParts);
|
|
|
|
|
2014-12-08 08:32:39 +01:00
|
|
|
bool mModified;
|
|
|
|
QString mFileName;
|
2014-12-04 02:47:28 +01:00
|
|
|
|
2014-12-08 08:32:39 +01:00
|
|
|
lcArray<lcModel*> mModels;
|
|
|
|
lcModel* mActiveModel;
|
|
|
|
|
|
|
|
Q_DECLARE_TR_FUNCTIONS(Project);
|
2014-07-06 08:04:09 +02:00
|
|
|
|
2014-05-25 03:45:19 +02:00
|
|
|
|
2014-12-08 08:32:39 +01:00
|
|
|
public:
|
2014-12-04 02:47:28 +01:00
|
|
|
void ExportHTML();
|
2011-09-07 23:06:51 +02:00
|
|
|
void UpdateInterface();
|
2014-10-05 07:21:51 +02:00
|
|
|
void LoadDefaults();
|
2014-10-12 01:26:23 +02:00
|
|
|
void SaveImage();
|
2014-10-05 07:21:51 +02:00
|
|
|
|
2014-05-18 01:03:05 +02:00
|
|
|
protected:
|
2015-01-12 05:49:30 +01:00
|
|
|
void CreateHTMLPieceList(QTextStream& Stream, lcModel* Model, lcStep Step, bool Images, const QString& ImageExtension);
|
2011-09-07 23:06:51 +02:00
|
|
|
};
|
|
|
|
|
2014-12-08 08:32:39 +01:00
|
|
|
inline lcModel* lcGetActiveModel()
|
|
|
|
{
|
|
|
|
return lcGetActiveProject()->GetActiveModel();
|
|
|
|
}
|
|
|
|
|
2011-09-07 23:06:51 +02:00
|
|
|
#endif // _PROJECT_H_
|