2012-01-06 16:09:03 +00:00
|
|
|
#ifndef _PAYSAGES_QT_BASEINPUT_H_
|
|
|
|
#define _PAYSAGES_QT_BASEINPUT_H_
|
2012-01-05 18:39:17 +00:00
|
|
|
|
|
|
|
#include <QWidget>
|
2012-04-14 15:52:16 +00:00
|
|
|
#include <QLabel>
|
2012-01-05 18:39:17 +00:00
|
|
|
|
|
|
|
class BaseInput:public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
BaseInput(QWidget* form, QString label);
|
|
|
|
inline QWidget* label() {return _label;}
|
|
|
|
inline QWidget* preview() {return _preview;}
|
|
|
|
inline QWidget* control() {return _control;}
|
|
|
|
|
|
|
|
public slots:
|
2012-01-08 10:31:01 +00:00
|
|
|
virtual void updatePreview();
|
|
|
|
virtual void revert();
|
2012-01-05 19:41:10 +00:00
|
|
|
virtual void applyValue();
|
2012-01-05 18:39:17 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void valueChanged();
|
|
|
|
|
|
|
|
protected:
|
2012-04-14 15:52:16 +00:00
|
|
|
QLabel* _label;
|
2012-01-05 18:39:17 +00:00
|
|
|
QWidget* _preview;
|
|
|
|
QWidget* _control;
|
|
|
|
};
|
|
|
|
|
2012-04-14 15:52:16 +00:00
|
|
|
#endif
|