Michaël Lemaire
9a198c2519
git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@239 b1fd45b6-86a6-48da-8261-f70d1f35bdcc
46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
#ifndef _PAYSAGES_QT_BASEFORM_H_
|
|
#define _PAYSAGES_QT_BASEFORM_H_
|
|
|
|
#include <QWidget>
|
|
#include <QPushButton>
|
|
#include "preview.h"
|
|
#include "baseinput.h"
|
|
#include "../lib_paysages/shared/types.h"
|
|
#include "../lib_paysages/noise.h"
|
|
|
|
class BaseForm:public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
BaseForm(QWidget* parent);
|
|
|
|
signals:
|
|
void configApplied();
|
|
|
|
public slots:
|
|
virtual void revertConfig();
|
|
virtual void applyConfig();
|
|
|
|
protected slots:
|
|
virtual void configChangeEvent();
|
|
|
|
protected:
|
|
void addPreview(Preview* preview, QString label);
|
|
QPushButton* addButton(QString label);
|
|
void addInput(BaseInput* input);
|
|
void addInputInt(QString label, int* value, int min, int max, int small_step, int large_step);
|
|
void addInputDouble(QString label, double* value, double min, double max, double small_step, double large_step);
|
|
void addInputColor(QString label, Color* value);
|
|
void addInputColorGradation(QString label, ColorGradation* value);
|
|
void addInputNoise(QString label, NoiseGenerator* value);
|
|
|
|
private:
|
|
QWidget* previews;
|
|
QWidget* form;
|
|
QWidget* buttons;
|
|
QPushButton* button_apply;
|
|
QPushButton* button_revert;
|
|
};
|
|
|
|
#endif // _PAYSAGES_QT_BASEFORM_H_
|