2012-01-06 16:09:03 +00:00
|
|
|
#ifndef _PAYSAGES_QT_DIALOGRENDER_H_
|
|
|
|
#define _PAYSAGES_QT_DIALOGRENDER_H_
|
|
|
|
|
2012-06-15 09:31:11 +00:00
|
|
|
#include <time.h>
|
2012-01-06 16:09:03 +00:00
|
|
|
#include <QDialog>
|
|
|
|
#include <QThread>
|
|
|
|
#include <QProgressBar>
|
2012-01-18 16:20:14 +00:00
|
|
|
#include <QScrollArea>
|
2013-02-05 21:25:30 +00:00
|
|
|
#include <QSlider>
|
|
|
|
#include <QComboBox>
|
2012-06-15 09:31:11 +00:00
|
|
|
#include <QLabel>
|
2012-12-24 14:13:19 +00:00
|
|
|
#include <QMutex>
|
2012-01-25 17:31:36 +00:00
|
|
|
#include "../lib_paysages/renderer.h"
|
2013-01-19 22:42:50 +00:00
|
|
|
#include "../lib_paysages/tools/color.h"
|
2012-01-06 16:09:03 +00:00
|
|
|
|
|
|
|
class DialogRender : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2012-04-02 19:38:59 +00:00
|
|
|
explicit DialogRender(QWidget *parent, Renderer* renderer);
|
2012-01-18 16:20:14 +00:00
|
|
|
~DialogRender();
|
2012-01-25 17:31:36 +00:00
|
|
|
|
2012-06-13 20:38:01 +00:00
|
|
|
void tellRenderSize(int width, int height);
|
2012-06-17 09:40:40 +00:00
|
|
|
void tellProgressChange(double value);
|
2013-02-06 16:08:46 +00:00
|
|
|
void tellRenderEnded();
|
2012-06-13 15:38:11 +00:00
|
|
|
void startRender(RenderParams params);
|
2012-01-18 16:20:14 +00:00
|
|
|
void loadLastRender();
|
2012-01-25 17:31:36 +00:00
|
|
|
|
2012-01-06 16:09:03 +00:00
|
|
|
QImage* pixbuf;
|
2012-12-24 14:13:19 +00:00
|
|
|
QMutex* pixbuf_lock;
|
2012-01-06 16:09:03 +00:00
|
|
|
QWidget* area;
|
2012-12-24 14:13:19 +00:00
|
|
|
|
2012-06-13 20:38:01 +00:00
|
|
|
private slots:
|
2012-04-02 19:38:59 +00:00
|
|
|
void applyRenderSize(int width, int height);
|
2012-06-17 09:40:40 +00:00
|
|
|
void applyProgress(double value);
|
2013-02-05 21:25:30 +00:00
|
|
|
void saveRender();
|
2013-02-06 16:08:46 +00:00
|
|
|
void applyRenderEnded();
|
2013-02-05 21:25:30 +00:00
|
|
|
void toneMappingChanged();
|
2012-12-24 14:13:19 +00:00
|
|
|
|
2012-06-13 20:38:01 +00:00
|
|
|
signals:
|
|
|
|
void renderSizeChanged(int width, int height);
|
2012-06-17 09:40:40 +00:00
|
|
|
void progressChanged(double value);
|
2013-02-06 16:08:46 +00:00
|
|
|
void renderEnded();
|
2012-01-06 16:09:03 +00:00
|
|
|
|
|
|
|
private:
|
2012-06-15 09:31:11 +00:00
|
|
|
QScrollArea* _scroll;
|
|
|
|
QWidget* _info;
|
2013-02-05 21:25:30 +00:00
|
|
|
QWidget* _actions;
|
|
|
|
QComboBox* _tonemapping_control;
|
|
|
|
QSlider* _exposure_control;
|
|
|
|
QPushButton* _save_button;
|
2012-06-15 09:31:11 +00:00
|
|
|
QThread* _render_thread;
|
|
|
|
QLabel* _timer;
|
2012-04-02 19:38:59 +00:00
|
|
|
Renderer* _renderer;
|
2012-06-15 09:31:11 +00:00
|
|
|
QProgressBar* _progress;
|
|
|
|
time_t _started;
|
2012-01-06 16:09:03 +00:00
|
|
|
};
|
|
|
|
|
2012-07-10 15:38:12 +00:00
|
|
|
#endif
|