2012-02-20 21:17:13 +00:00
|
|
|
#ifndef _PAYSAGES_QT_DIALOGCOLORGRADATION_H_
|
|
|
|
#define _PAYSAGES_QT_DIALOGCOLORGRADATION_H_
|
|
|
|
|
|
|
|
#include <QDialog>
|
2012-03-29 20:19:50 +00:00
|
|
|
#include <QPushButton>
|
2012-03-08 15:10:25 +00:00
|
|
|
#include "widgetcurveeditor.h"
|
2012-03-18 19:51:06 +00:00
|
|
|
#include "previewcolorgradation.h"
|
2012-02-20 21:17:13 +00:00
|
|
|
|
2013-01-19 22:42:50 +00:00
|
|
|
#include "../lib_paysages/tools/color.h"
|
|
|
|
#include "../lib_paysages/tools/curve.h"
|
2012-02-20 21:17:13 +00:00
|
|
|
|
|
|
|
class DialogColorGradation : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit DialogColorGradation(QWidget* parent, ColorGradation* gradation);
|
|
|
|
~DialogColorGradation();
|
|
|
|
|
|
|
|
static bool getGradation(QWidget* parent, ColorGradation* gradation);
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
virtual void accept();
|
|
|
|
void revert();
|
2012-03-18 21:00:50 +00:00
|
|
|
void selectRed();
|
|
|
|
void selectGreen();
|
|
|
|
void selectBlue();
|
2012-03-29 20:19:50 +00:00
|
|
|
void updateColors();
|
2012-02-20 21:17:13 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void closeEvent(QCloseEvent* e);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void revertToCurrent();
|
|
|
|
|
|
|
|
private:
|
|
|
|
ColorGradation* _base;
|
2012-03-08 15:10:25 +00:00
|
|
|
ColorGradation* _current;
|
2012-03-08 15:56:44 +00:00
|
|
|
Curve* _curve;
|
2012-03-08 15:10:25 +00:00
|
|
|
WidgetCurveEditor* _curve_editor;
|
2012-03-18 19:51:06 +00:00
|
|
|
PreviewColorGradation* _preview_red;
|
|
|
|
PreviewColorGradation* _preview_green;
|
|
|
|
PreviewColorGradation* _preview_blue;
|
|
|
|
PreviewColorGradation* _preview_final;
|
2012-03-29 20:19:50 +00:00
|
|
|
int _selected;
|
|
|
|
QPushButton* _button_accept;
|
|
|
|
QPushButton* _button_revert;
|
|
|
|
QPushButton* _button_cancel;
|
2012-02-20 21:17:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|