mirror of
https://github.com/leozide/leocad
synced 2025-01-28 19:58:12 +01:00
Moved export functions to model.
This commit is contained in:
parent
a6a69b7661
commit
f9b0cbbc05
7 changed files with 1040 additions and 1045 deletions
|
@ -100,7 +100,7 @@ struct lcPropertiesDialogOptions
|
|||
String Title;
|
||||
bool SetDefault;
|
||||
|
||||
lcArray<lcPiecesUsedEntry> PartsUsed;
|
||||
lcArray<lcPartsListEntry> PartsList;
|
||||
};
|
||||
|
||||
struct lcArrayDialogOptions
|
||||
|
|
|
@ -16,6 +16,7 @@ class lcPiece;
|
|||
class lcCamera;
|
||||
class lcLight;
|
||||
class lcGroup;
|
||||
class PieceInfo;
|
||||
|
||||
class lcVector2;
|
||||
class lcVector3;
|
||||
|
|
1009
common/lc_model.cpp
1009
common/lc_model.cpp
File diff suppressed because it is too large
Load diff
|
@ -100,6 +100,13 @@ struct lcModelHistoryEntry
|
|||
QString Description;
|
||||
};
|
||||
|
||||
struct lcPartsListEntry
|
||||
{
|
||||
PieceInfo* Info;
|
||||
int ColorIndex;
|
||||
int Count;
|
||||
};
|
||||
|
||||
class lcModel
|
||||
{
|
||||
public:
|
||||
|
@ -153,6 +160,7 @@ public:
|
|||
lcObject* GetFocusObject() const;
|
||||
bool GetSelectionCenter(lcVector3& Center) const;
|
||||
bool GetPiecesBoundingBox(float BoundingBox[6]) const;
|
||||
void GetPartsList(lcArray<lcPartsListEntry>& PartsList) const;
|
||||
|
||||
void FocusOrDeselectObject(const lcObjectSection& ObjectSection);
|
||||
void ClearSelectionAndSetFocus(lcObject* Object, lcuint32 Section);
|
||||
|
@ -190,6 +198,12 @@ public:
|
|||
void UpdateRollTool(lcCamera* Camera, float Mouse);
|
||||
void ZoomRegionToolClicked(lcCamera* Camera, const lcVector3* Points, float RatioX, float RatioY);
|
||||
|
||||
void Export3DStudio() const;
|
||||
void ExportBrickLink() const;
|
||||
void ExportCSV() const;
|
||||
void ExportPOVRay() const;
|
||||
void ExportWavefront() const;
|
||||
|
||||
protected:
|
||||
void DeleteModel();
|
||||
void DeleteHistory();
|
||||
|
@ -222,7 +236,7 @@ protected:
|
|||
lcArray<lcModelHistoryEntry*> mUndoHistory;
|
||||
lcArray<lcModelHistoryEntry*> mRedoHistory;
|
||||
|
||||
Q_DECLARE_TR_FUNCTIONS(lcModel)
|
||||
Q_DECLARE_TR_FUNCTIONS(lcModel);
|
||||
};
|
||||
|
||||
#endif // _LC_MODEL_H_
|
||||
|
|
1045
common/project.cpp
1045
common/project.cpp
File diff suppressed because it is too large
Load diff
|
@ -41,13 +41,6 @@ struct LC_FILEENTRY
|
|||
char FileName[LC_MAXPATH];
|
||||
};
|
||||
|
||||
struct lcPiecesUsedEntry
|
||||
{
|
||||
PieceInfo* Info;
|
||||
int ColorIndex;
|
||||
int Count;
|
||||
};
|
||||
|
||||
enum lcObjectProperty
|
||||
{
|
||||
LC_PIECE_PROPERTY_POSITION,
|
||||
|
@ -96,7 +89,6 @@ public:
|
|||
|
||||
public:
|
||||
void LoadDefaults();
|
||||
void GetPiecesUsed(lcArray<lcPiecesUsedEntry>& PiecesUsed) const;
|
||||
void CreateImages(Image* images, int width, int height, lcStep from, lcStep to, bool hilite);
|
||||
void Render(View* view, bool bToMemory);
|
||||
lcGroup* AddGroup(lcGroup* Parent);
|
||||
|
@ -118,8 +110,6 @@ protected:
|
|||
void RenderSceneObjects(View* view);
|
||||
|
||||
void CreateHTMLPieceList(FILE* f, lcStep Step, bool bImages, const char* ext);
|
||||
void Export3DStudio();
|
||||
void ExportPOVRay(lcFile& File);
|
||||
void ZoomExtents(int FirstView, int LastView);
|
||||
|
||||
bool DoSave(const char* FileName);
|
||||
|
|
|
@ -55,7 +55,7 @@ lcQPropertiesDialog::lcQPropertiesDialog(QWidget *parent, void *data) :
|
|||
ui->ambientColorButton->setIcon(pix);
|
||||
|
||||
lcPiecesLibrary *library = lcGetPiecesLibrary();
|
||||
lcArray<lcPiecesUsedEntry>& partsUsed = options->PartsUsed;
|
||||
lcArray<lcPartsListEntry>& partsUsed = options->PartsList;
|
||||
QStringList horizontalLabels, partNames;
|
||||
|
||||
bool *colorsUsed = new bool[gNumUserColors];
|
||||
|
|
Loading…
Add table
Reference in a new issue