2018-10-25 00:19:38 +00:00
|
|
|
#ifndef DUST3D_EXPORT_PREVIEW_WIDGET_H
|
|
|
|
#define DUST3D_EXPORT_PREVIEW_WIDGET_H
|
2018-09-21 07:10:18 +00:00
|
|
|
#include <QDialog>
|
2018-05-10 09:16:22 +00:00
|
|
|
#include <QImage>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QPushButton>
|
|
|
|
#include <QShowEvent>
|
|
|
|
#include "modelwidget.h"
|
|
|
|
#include "waitingspinnerwidget.h"
|
2018-10-25 00:19:38 +00:00
|
|
|
#include "document.h"
|
2018-05-10 09:16:22 +00:00
|
|
|
|
2018-09-21 07:10:18 +00:00
|
|
|
class ExportPreviewWidget : public QDialog
|
2018-05-10 09:16:22 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
signals:
|
|
|
|
void regenerate();
|
2018-10-25 09:18:04 +00:00
|
|
|
void saveAsGlb();
|
2018-10-20 05:07:11 +00:00
|
|
|
void saveAsFbx();
|
2018-05-10 09:16:22 +00:00
|
|
|
public:
|
2018-10-25 00:19:38 +00:00
|
|
|
ExportPreviewWidget(Document *document, QWidget *parent=nullptr);
|
2018-05-10 09:16:22 +00:00
|
|
|
public slots:
|
|
|
|
void checkSpinner();
|
|
|
|
void updateTexturePreview();
|
|
|
|
protected:
|
|
|
|
void resizeEvent(QResizeEvent *event);
|
|
|
|
void showEvent(QShowEvent *event);
|
|
|
|
private:
|
2018-11-15 22:56:24 +00:00
|
|
|
void resizePreviewImages();
|
2018-05-10 09:16:22 +00:00
|
|
|
void initAwesomeButton(QPushButton *button);
|
|
|
|
private:
|
2018-10-25 00:19:38 +00:00
|
|
|
Document *m_document;
|
2018-11-15 22:56:24 +00:00
|
|
|
QLabel *m_colorPreviewLabel;
|
|
|
|
QLabel *m_normalPreviewLabel;
|
|
|
|
QLabel *m_metalnessRoughnessAmbientOcclusionPreviewLabel;
|
|
|
|
QImage m_colorImage;
|
|
|
|
QImage m_normalImage;
|
|
|
|
QImage m_metalnessRoughnessAmbientOcclusionImage;
|
2018-11-17 09:10:08 +00:00
|
|
|
//ModelWidget *m_textureRenderWidget;
|
2018-05-10 09:16:22 +00:00
|
|
|
WaitingSpinnerWidget *m_spinnerWidget;
|
|
|
|
QPushButton *m_saveButton;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|