leocad/common/lc_previewwidget.h

54 lines
835 B
C
Raw Normal View History

#pragma once
2020-12-25 19:43:22 +01:00
#include "lc_view.h"
2020-12-24 20:32:56 +01:00
class lcPreview;
class lcPreviewDockWidget : public QMainWindow
{
Q_OBJECT
public:
2020-12-04 21:49:01 +01:00
explicit lcPreviewDockWidget(QMainWindow* Parent = nullptr);
2020-12-24 20:32:56 +01: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 20:32:56 +01:00
lcPreview* mPreview;
2020-12-18 02:59:11 +01:00
lcViewWidget* mViewWidget;
};
2020-12-25 19:54:33 +01:00
class lcPreview : public lcView
{
public:
2020-12-24 20:32:56 +01: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 20:32:56 +01:00
std::unique_ptr<Project> mLoader;
QString mDescription;
2020-12-24 20:32:56 +01:00
bool mIsModel = false;
};