2012-01-16 21:29:21 +00:00
|
|
|
#ifndef _PAYSAGES_QT_DIALOGNOISE_H_
|
|
|
|
#define _PAYSAGES_QT_DIALOGNOISE_H_
|
|
|
|
|
|
|
|
#include <QDialog>
|
2012-01-19 16:03:34 +00:00
|
|
|
#include <QListWidget>
|
2012-01-18 16:20:14 +00:00
|
|
|
#include "preview.h"
|
2012-01-16 21:29:21 +00:00
|
|
|
|
2012-01-23 23:45:33 +00:00
|
|
|
#include "../lib_paysages/noise.h"
|
2012-01-16 21:29:21 +00:00
|
|
|
|
|
|
|
class DialogNoise : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit DialogNoise(QWidget* parent, NoiseGenerator* noise);
|
2012-01-18 16:20:14 +00:00
|
|
|
~DialogNoise();
|
2012-01-23 23:45:33 +00:00
|
|
|
|
2012-01-16 21:29:21 +00:00
|
|
|
static bool getNoise(QWidget* parent, NoiseGenerator* noise);
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
virtual void accept();
|
2012-01-20 16:25:09 +00:00
|
|
|
void revert();
|
2012-01-16 21:29:21 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void closeEvent(QCloseEvent* e);
|
|
|
|
|
2012-01-20 16:25:09 +00:00
|
|
|
private:
|
|
|
|
void revertToCurrent();
|
|
|
|
|
2012-01-19 16:03:34 +00:00
|
|
|
private slots:
|
2012-01-20 16:25:09 +00:00
|
|
|
void addLevel();
|
|
|
|
void removeLevel();
|
|
|
|
void levelChanged(int row);
|
|
|
|
void heightChanged(int value);
|
|
|
|
void scalingChanged(int value);
|
2012-01-23 23:45:33 +00:00
|
|
|
|
2012-01-16 21:29:21 +00:00
|
|
|
private:
|
|
|
|
NoiseGenerator* _base;
|
|
|
|
NoiseGenerator* _current;
|
2012-01-20 16:25:09 +00:00
|
|
|
int _current_level;
|
|
|
|
NoiseLevel _current_level_params;
|
2012-01-18 16:20:14 +00:00
|
|
|
Preview* previewLevel;
|
|
|
|
Preview* previewTotal;
|
2012-01-19 16:03:34 +00:00
|
|
|
QListWidget* levels;
|
2012-01-20 16:25:09 +00:00
|
|
|
QSlider* slider_height;
|
|
|
|
QSlider* slider_scaling;
|
2012-01-16 21:29:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|