leocad/common/lc_previewwidget.h

54 lines
835 B
C
Raw Normal View History

#pragma once
2020-12-25 10:43:22 -08:00
#include "lc_view.h"
2020-12-24 11:32:56 -08:00
class lcPreview;
class lcPreviewDockWidget : public QMainWindow
{
Q_OBJECT
public:
2020-12-04 12:49:01 -08:00
explicit lcPreviewDockWidget(QMainWindow* Parent = nullptr);
2020-12-24 11:32:56 -08:00
bool SetCurrentPiece(const QString& PartType, int ColorCode);
void ClearPreview();
void UpdatePreview();
2020-10-07 13:42:43 +02:00
protected slots:
void SetPreviewLock();
protected:
2020-10-07 13:42:43 +02:00
QAction* mLockAction;
QToolBar* mToolBar;
QLabel* mLabel;
2020-12-24 11:32:56 -08:00
lcPreview* mPreview;
2020-12-17 17:59:11 -08:00
lcViewWidget* mViewWidget;
};
2020-12-25 10:54:33 -08:00
class lcPreview : public lcView
{
public:
2020-12-24 11:32:56 -08:00
lcPreview();
QString GetDescription() const
{
return mDescription;
}
bool IsModel() const
{
return mIsModel;
}
void ClearPreview();
void UpdatePreview();
bool SetCurrentPiece(const QString& PartType, int ColorCode);
protected:
2020-12-24 11:32:56 -08:00
std::unique_ptr<Project> mLoader;
QString mDescription;
2020-12-24 11:32:56 -08:00
bool mIsModel = false;
};