2017-09-22 19:08:02 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class lcRenderDialog;
|
|
|
|
}
|
|
|
|
|
2019-09-14 21:05:30 +02:00
|
|
|
class lcRenderPreviewWidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
lcRenderPreviewWidget(QWidget* Parent)
|
|
|
|
: QWidget(Parent)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetImage(QImage Image)
|
|
|
|
{
|
|
|
|
mImage = Image;
|
|
|
|
mScaledImage = QImage();
|
|
|
|
update();
|
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
2020-03-22 23:44:41 +01:00
|
|
|
void resizeEvent(QResizeEvent* Event) override;
|
|
|
|
void paintEvent(QPaintEvent* PaintEvent) override;
|
2019-09-14 21:05:30 +02:00
|
|
|
|
|
|
|
QImage mImage;
|
|
|
|
QImage mScaledImage;
|
|
|
|
};
|
|
|
|
|
2017-09-22 19:08:02 +02:00
|
|
|
class lcRenderDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit lcRenderDialog(QWidget* Parent);
|
|
|
|
~lcRenderDialog();
|
|
|
|
|
|
|
|
public slots:
|
2020-03-22 23:44:41 +01:00
|
|
|
void reject() override;
|
2017-09-22 19:08:02 +02:00
|
|
|
void on_RenderButton_clicked();
|
2017-12-27 22:55:37 +01:00
|
|
|
void on_OutputBrowseButton_clicked();
|
2017-09-22 19:08:02 +02:00
|
|
|
void Update();
|
|
|
|
|
2019-03-08 12:42:36 +01:00
|
|
|
protected slots:
|
|
|
|
void ReadStdErr();
|
2019-03-19 23:08:03 +01:00
|
|
|
void WriteStdLog(bool = false);
|
2019-03-08 12:42:36 +01:00
|
|
|
|
2017-09-22 19:08:02 +02:00
|
|
|
protected:
|
2018-01-15 06:45:50 +01:00
|
|
|
QString GetOutputFileName() const;
|
2017-11-05 02:54:12 +01:00
|
|
|
QString GetPOVFileName() const;
|
|
|
|
void CloseProcess();
|
|
|
|
bool PromptCancel();
|
2019-03-08 12:42:36 +01:00
|
|
|
void ShowResult();
|
2017-11-05 02:54:12 +01:00
|
|
|
|
2017-12-07 07:08:56 +01:00
|
|
|
#ifndef QT_NO_PROCESS
|
2017-09-22 19:08:02 +02:00
|
|
|
QProcess* mProcess;
|
2017-12-07 07:08:56 +01:00
|
|
|
#endif
|
2017-11-05 02:54:12 +01:00
|
|
|
QTimer mUpdateTimer;
|
2018-01-15 06:45:50 +01:00
|
|
|
QFile mOutputFile;
|
|
|
|
void* mOutputBuffer;
|
2017-12-10 01:27:56 +01:00
|
|
|
QImage mImage;
|
2019-03-10 01:38:54 +01:00
|
|
|
QStringList mStdErrList;
|
2017-09-22 19:08:02 +02:00
|
|
|
|
2017-11-05 02:54:12 +01:00
|
|
|
Ui::lcRenderDialog* ui;
|
2017-09-22 19:08:02 +02:00
|
|
|
};
|