2020-10-07 10:08:58 +02:00
|
|
|
#pragma once
|
2020-10-03 12:02:27 +02:00
|
|
|
|
|
|
|
#include "lc_glwidget.h"
|
|
|
|
#include "lc_scene.h"
|
|
|
|
#include "lc_viewsphere.h"
|
|
|
|
#include "lc_commands.h"
|
|
|
|
|
|
|
|
class lcQGLWidget;
|
2020-12-04 21:49:01 +01:00
|
|
|
class lcPreviewWidget;
|
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-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;
|
|
|
|
lcPreviewWidget* mPreview;
|
|
|
|
lcQGLWidget* mViewWidget;
|
2020-10-03 12:02:27 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
class lcPreviewWidget : public lcGLWidget
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
lcPreviewWidget();
|
|
|
|
~lcPreviewWidget();
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
void StartOrbitTracking();
|
|
|
|
|
|
|
|
void OnDraw() override;
|
|
|
|
void OnLeftButtonDown() override;
|
|
|
|
void OnLeftButtonUp() override;
|
|
|
|
void OnLeftButtonDoubleClick() override;
|
|
|
|
void OnMiddleButtonDown() override;
|
|
|
|
void OnMiddleButtonUp() override;
|
|
|
|
void OnRightButtonDown() override;
|
|
|
|
void OnRightButtonUp() override;
|
|
|
|
void OnMouseMove() override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void StopTracking(bool Accept);
|
|
|
|
void OnButtonDown(lcTrackButton TrackButton);
|
|
|
|
|
|
|
|
Project* mLoader;
|
|
|
|
lcViewSphere mViewSphere;
|
|
|
|
|
|
|
|
QString mDescription;
|
2020-10-07 12:07:32 +02:00
|
|
|
bool mIsModel;
|
2020-10-03 12:02:27 +02:00
|
|
|
};
|