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>
|
2012-06-15 09:31:11 +00:00
|
|
|
#include <QLabel>
|
2012-01-25 17:31:36 +00:00
|
|
|
#include "../lib_paysages/renderer.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);
|
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;
|
|
|
|
QWidget* area;
|
2012-04-02 19:38:59 +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);
|
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);
|
2012-01-06 16:09:03 +00:00
|
|
|
|
|
|
|
private:
|
2012-06-15 09:31:11 +00:00
|
|
|
QScrollArea* _scroll;
|
|
|
|
QWidget* _info;
|
|
|
|
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
|