2012-01-06 16:09:03 +00:00
|
|
|
#ifndef _PAYSAGES_QT_BASEFORM_H_
|
|
|
|
#define _PAYSAGES_QT_BASEFORM_H_
|
2012-01-05 16:32:41 +00:00
|
|
|
|
|
|
|
#include <QWidget>
|
2012-01-06 16:09:03 +00:00
|
|
|
#include <QPushButton>
|
2012-01-05 16:32:41 +00:00
|
|
|
#include "preview.h"
|
2012-01-05 18:39:17 +00:00
|
|
|
#include "baseinput.h"
|
2012-01-05 19:41:10 +00:00
|
|
|
#include "../lib_paysages/shared/types.h"
|
2012-01-05 16:32:41 +00:00
|
|
|
|
|
|
|
class BaseForm:public QWidget
|
|
|
|
{
|
2012-01-05 18:39:17 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
2012-01-05 16:32:41 +00:00
|
|
|
public:
|
|
|
|
BaseForm(QWidget* parent);
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
virtual void revertConfig();
|
2012-01-06 16:09:03 +00:00
|
|
|
virtual void applyConfig();
|
2012-01-05 16:32:41 +00:00
|
|
|
|
2012-01-07 16:53:23 +00:00
|
|
|
protected slots:
|
|
|
|
virtual void applyConfigPreview();
|
|
|
|
|
2012-01-05 16:32:41 +00:00
|
|
|
protected:
|
|
|
|
void addPreview(Preview* preview, QString label);
|
2012-01-06 16:09:03 +00:00
|
|
|
QPushButton* addButton(QString label);
|
2012-01-05 18:39:17 +00:00
|
|
|
void addInput(BaseInput* input);
|
2012-01-06 16:09:03 +00:00
|
|
|
void addInputInt(QString label, int* value, int min, int max, int small_step, int large_step);
|
2012-01-05 18:39:17 +00:00
|
|
|
void addInputDouble(QString label, double* value, double min, double max, double small_step, double large_step);
|
2012-01-05 19:41:10 +00:00
|
|
|
void addInputColor(QString label, Color* value);
|
2012-01-07 16:53:23 +00:00
|
|
|
void addInputColorGradation(QString label, ColorGradation* value);
|
|
|
|
void addInputNoise(QString label, NoiseGenerator* value);
|
2012-01-05 16:32:41 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
QWidget* previews;
|
|
|
|
QWidget* form;
|
2012-01-06 16:09:03 +00:00
|
|
|
QWidget* buttons;
|
2012-01-05 16:32:41 +00:00
|
|
|
};
|
|
|
|
|
2012-01-06 16:09:03 +00:00
|
|
|
#endif // _PAYSAGES_QT_BASEFORM_H_
|