2020-10-07 10:08:58 +02:00
|
|
|
#pragma once
|
2020-10-03 12:02:27 +02:00
|
|
|
|
2020-12-25 19:43:22 +01:00
|
|
|
#include "lc_view.h"
|
2020-10-03 12:02:27 +02:00
|
|
|
|
2020-12-24 20:32:56 +01:00
|
|
|
class lcPreview;
|
2020-10-03 12:02:27 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
2020-10-07 12:07:32 +02:00
|
|
|
bool SetCurrentPiece(const QString& PartType, int ColorCode);
|
2020-10-03 12:02:27 +02:00
|
|
|
void ClearPreview();
|
2020-10-12 22:59:14 +02:00
|
|
|
void UpdatePreview();
|
2020-10-03 12:02:27 +02:00
|
|
|
|
2020-10-07 13:42:43 +02:00
|
|
|
protected slots:
|
|
|
|
void SetPreviewLock();
|
|
|
|
|
2020-10-03 12:02:27 +02:00
|
|
|
protected:
|
2020-10-07 13:42:43 +02:00
|
|
|
QAction* mLockAction;
|
2020-10-07 12:07:32 +02:00
|
|
|
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-10-03 12:02:27 +02:00
|
|
|
};
|
|
|
|
|
2020-12-25 19:54:33 +01:00
|
|
|
class lcPreview : public lcView
|
2020-10-03 12:02:27 +02:00
|
|
|
{
|
|
|
|
public:
|
2020-12-24 20:32:56 +01:00
|
|
|
lcPreview();
|
2020-10-03 12:02:27 +02:00
|
|
|
|
|
|
|
QString GetDescription() const
|
|
|
|
{
|
|
|
|
return mDescription;
|
|
|
|
}
|
|
|
|
|
2020-12-13 19:33:42 +01:00
|
|
|
bool IsModel() const
|
|
|
|
{
|
|
|
|
return mIsModel;
|
|
|
|
}
|
|
|
|
|
2020-10-03 12:02:27 +02:00
|
|
|
void ClearPreview();
|
2020-10-12 22:59:14 +02:00
|
|
|
void UpdatePreview();
|
2020-10-03 12:02:27 +02:00
|
|
|
bool SetCurrentPiece(const QString& PartType, int ColorCode);
|
|
|
|
|
|
|
|
protected:
|
2020-12-24 20:32:56 +01:00
|
|
|
std::unique_ptr<Project> mLoader;
|
2020-10-03 12:02:27 +02:00
|
|
|
|
|
|
|
QString mDescription;
|
2020-12-24 20:32:56 +01:00
|
|
|
bool mIsModel = false;
|
2020-10-03 12:02:27 +02:00
|
|
|
};
|