2012-01-16 21:29:21 +00:00
|
|
|
#ifndef _PAYSAGES_QT_DIALOGNOISE_H_
|
|
|
|
#define _PAYSAGES_QT_DIALOGNOISE_H_
|
|
|
|
|
2012-01-19 16:03:34 +00:00
|
|
|
#include <QListWidget>
|
2012-02-21 13:41:02 +00:00
|
|
|
#include "basepreview.h"
|
2012-06-02 14:17:01 +00:00
|
|
|
#include "tools.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
|
|
|
|
2012-06-02 14:17:01 +00:00
|
|
|
class DialogNoise : public DialogWithPreview
|
2012-01-16 21:29:21 +00:00
|
|
|
{
|
|
|
|
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-02-21 13:41:02 +00:00
|
|
|
BasePreview* previewLevel;
|
|
|
|
BasePreview* 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
|