1 #pragma once 2 3 #include "lc_view.h" 4 5 class lcPreview; 6 7 class lcPreviewDockWidget : public QMainWindow 8 { 9 Q_OBJECT 10 11 public: 12 explicit lcPreviewDockWidget(QMainWindow* Parent = nullptr); 13 14 bool SetCurrentPiece(const QString& PartType, int ColorCode); 15 void ClearPreview(); 16 void UpdatePreview(); 17 18 protected slots: 19 void SetPreviewLock(); 20 21 protected: 22 QAction* mLockAction; 23 QToolBar* mToolBar; 24 QLabel* mLabel; 25 lcPreview* mPreview; 26 lcViewWidget* mViewWidget; 27 }; 28 29 class lcPreview : public lcView 30 { 31 public: 32 lcPreview(); 33 GetDescription()34 QString GetDescription() const 35 { 36 return mDescription; 37 } 38 IsModel()39 bool IsModel() const 40 { 41 return mIsModel; 42 } 43 44 void ClearPreview(); 45 void UpdatePreview(); 46 bool SetCurrentPiece(const QString& PartType, int ColorCode); 47 48 protected: 49 std::unique_ptr<Project> mLoader; 50 51 QString mDescription; 52 bool mIsModel = false; 53 }; 54