2018-05-10 09:16:22 +00:00
|
|
|
#ifndef EXPORT_PREVIEW_WIDGET_H
|
|
|
|
#define 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"
|
|
|
|
#include "skeletondocument.h"
|
|
|
|
|
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-20 05:07:11 +00:00
|
|
|
void saveAsGltf();
|
|
|
|
void saveAsFbx();
|
2018-05-10 09:16:22 +00:00
|
|
|
public:
|
|
|
|
ExportPreviewWidget(SkeletonDocument *document, QWidget *parent=nullptr);
|
|
|
|
public slots:
|
|
|
|
void checkSpinner();
|
|
|
|
void updateTexturePreview();
|
|
|
|
protected:
|
|
|
|
void resizeEvent(QResizeEvent *event);
|
|
|
|
void showEvent(QShowEvent *event);
|
|
|
|
private:
|
|
|
|
void resizePreviewImage();
|
|
|
|
void initAwesomeButton(QPushButton *button);
|
|
|
|
void updateTexturePreviewImage(const QImage &image);
|
|
|
|
private:
|
|
|
|
SkeletonDocument *m_document;
|
|
|
|
QLabel *m_previewLabel;
|
|
|
|
QImage m_previewImage;
|
|
|
|
ModelWidget *m_textureRenderWidget;
|
|
|
|
WaitingSpinnerWidget *m_spinnerWidget;
|
|
|
|
QPushButton *m_saveButton;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|