Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef PARAMFIELD_H
Toshihiro Shimizu 890ddd
#define PARAMFIELD_H
Toshihiro Shimizu 890ddd
Shinya Kitaoka 9f5a1b
#ifdef _WIN32
Toshihiro Shimizu 890ddd
#pragma warning(disable : 4251)
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tcommon.h"
Toshihiro Shimizu 890ddd
#include <qwidget></qwidget>
Toshihiro Shimizu 890ddd
#include <qspinbox></qspinbox>
Toshihiro Shimizu 890ddd
#include <qslider></qslider>
Toshihiro Shimizu 890ddd
#include <qcheckbox></qcheckbox>
Toshihiro Shimizu 890ddd
#include <qbuttongroup></qbuttongroup>
Toshihiro Shimizu 890ddd
#include <qradiobutton></qradiobutton>
Toshihiro Shimizu 890ddd
#include <qpushbutton></qpushbutton>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tgeometry.h"
Toshihiro Shimizu 890ddd
#include "tparam.h"
Toshihiro Shimizu 890ddd
#include "tnotanimatableparam.h"
Toshihiro Shimizu 890ddd
#include "tspectrumparam.h"
Toshihiro Shimizu 890ddd
#include "ttonecurveparam.h"
Toshihiro Shimizu 890ddd
#include "tdoubleparam.h"
Toshihiro Shimizu 890ddd
#include "toonz/tfxhandle.h"
Toshihiro Shimizu 890ddd
#include "historytypes.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#undef DVAPI
Toshihiro Shimizu 890ddd
#undef DVVAR
Toshihiro Shimizu 890ddd
#ifdef TOONZQT_EXPORTS
Toshihiro Shimizu 890ddd
#define DVAPI DV_EXPORT_API
Toshihiro Shimizu 890ddd
#define DVVAR DV_EXPORT_VAR
Toshihiro Shimizu 890ddd
#else
Toshihiro Shimizu 890ddd
#define DVAPI DV_IMPORT_API
Toshihiro Shimizu 890ddd
#define DVVAR DV_IMPORT_VAR
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// forward declaration
Toshihiro Shimizu 890ddd
class QString;
Toshihiro Shimizu 890ddd
class QComboBox;
Toshihiro Shimizu 890ddd
class QHBoxLayout;
Toshihiro Shimizu 890ddd
class TFxHandle;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
namespace DVGui
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
class LineEdit;
Toshihiro Shimizu 890ddd
class IntField;
Toshihiro Shimizu 890ddd
class DoubleField;
Toshihiro Shimizu 890ddd
class MeasuredDoubleField;
Toshihiro Shimizu 890ddd
class MeasuredDoublePairField;
Toshihiro Shimizu 890ddd
class ColorField;
Toshihiro Shimizu 890ddd
class SpectrumField;
Toshihiro Shimizu 890ddd
class ToneCurveField;
Toshihiro Shimizu 890ddd
class CheckBox;
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
/*! \brief ParamField.
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
		Inherits \b QWidget.
Toshihiro Shimizu 890ddd
*/
Toshihiro Shimizu 890ddd
class DVAPI ParamField : public QWidget
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	QHBoxLayout *m_layout;
Toshihiro Shimizu 890ddd
	QString m_paramName;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	static TFxHandle *m_fxHandleStat;
Toshihiro Shimizu 890ddd
	QString m_interfaceName;
Toshihiro Shimizu 890ddd
	QString m_description;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	ParamField(QWidget *parent, QString paramName, const TParamP ¶m, bool addEmptyLabel = true);
Toshihiro Shimizu 890ddd
	~ParamField();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	QString getParamName() const { return m_paramName; }
Toshihiro Shimizu 890ddd
	QString getUIName() const { return m_interfaceName; }
Toshihiro Shimizu 890ddd
	QString getDescription() const { return m_description; }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	virtual void setParam(const TParamP ¤t, const TParamP &actual, int frame) = 0;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	virtual void update(int frame) = 0;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	static ParamField *create(QWidget *parent, QString name, const TParamP ¶m);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	virtual void setPointValue(const TPointD &p){};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	virtual QSize getPreferedSize() { return QSize(200, 28); }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	static void setFxHandle(TFxHandle *fxHandle);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	virtual void setPrecision(int precision) {}
Toshihiro Shimizu 890ddd
signals:
Toshihiro Shimizu 890ddd
	void currentParamChanged();
Toshihiro Shimizu 890ddd
	void actualParamChanged();
Toshihiro Shimizu 890ddd
	void paramKeyToggle();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// ParamFieldKeyToggle
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI ParamFieldKeyToggle : public QWidget
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	enum Status {
Toshihiro Shimizu 890ddd
		NOT_ANIMATED,
Toshihiro Shimizu 890ddd
		NOT_KEYFRAME,
Toshihiro Shimizu 890ddd
		MODIFIED,
Toshihiro Shimizu 890ddd
		KEYFRAME
Toshihiro Shimizu 890ddd
	};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Toshihiro Shimizu 890ddd
	Status m_status;
Toshihiro Shimizu 890ddd
	bool m_highlighted;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 3bfa54
	ParamFieldKeyToggle(QWidget *parent, std::string name = "ParamFieldKeyToggle");
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setStatus(Status status);
Toshihiro Shimizu 890ddd
	Status getStatus() const;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setStatus(bool hasKeyframe, bool isKeyframe, bool hasBeenChanged);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	void paintEvent(QPaintEvent *);
Toshihiro Shimizu 890ddd
	void mousePressEvent(QMouseEvent *);
Toshihiro Shimizu 890ddd
	void enterEvent(QEvent *);
Toshihiro Shimizu 890ddd
	void leaveEvent(QEvent *);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
signals:
Toshihiro Shimizu 890ddd
	void keyToggled();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// FxSettingsKeyToggleUndo
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
template <class class="" paramp="" t,=""></class>
Toshihiro Shimizu 890ddd
class FxSettingsKeyToggleUndo : public TUndo
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	TFxHandle *m_fxHandle;
Toshihiro Shimizu 890ddd
	QString m_name;
Toshihiro Shimizu 890ddd
	bool m_wasKeyframe;
Toshihiro Shimizu 890ddd
	int m_frame;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	ParamP m_param;
Toshihiro Shimizu 890ddd
	T m_currentValue;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	FxSettingsKeyToggleUndo(ParamP param, T currentValue, bool wasKeyFrame, QString name, int frame, TFxHandle *fxHandle)
Toshihiro Shimizu 890ddd
		: m_param(param), m_currentValue(currentValue), m_wasKeyframe(wasKeyFrame), m_name(name), m_frame(frame), m_fxHandle(fxHandle)
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	//void notify();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void undo() const
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		if (m_wasKeyframe)
Toshihiro Shimizu 890ddd
			m_param->setValue(m_frame, m_currentValue);
Toshihiro Shimizu 890ddd
		else
Toshihiro Shimizu 890ddd
			m_param->deleteKeyframe(m_frame);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
		if (m_fxHandle)
Toshihiro Shimizu 890ddd
			m_fxHandle->notifyFxChanged();
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void redo() const
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		if (m_wasKeyframe)
Toshihiro Shimizu 890ddd
			m_param->deleteKeyframe(m_frame);
Toshihiro Shimizu 890ddd
		else
Toshihiro Shimizu 890ddd
			m_param->setValue(m_frame, m_currentValue);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
		if (m_fxHandle)
Toshihiro Shimizu 890ddd
			m_fxHandle->notifyFxChanged();
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int getSize() const
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		return sizeof(*this);
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
	int getHistoryType()
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		return HistoryType::Fx;
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
	QString getHistoryString()
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		QString str = QObject::tr("Modify Fx Param : %1 Key : %2  Frame %3")
Toshihiro Shimizu 890ddd
						  .arg((m_wasKeyframe) ? QObject::tr("Delete") : QObject::tr("Set"))
Toshihiro Shimizu 890ddd
						  .arg(m_name)
Toshihiro Shimizu 890ddd
						  .arg(QString::number(m_frame + 1));
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
		return str;
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// AnimatedParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
template <class class="" paramp="" t,=""></class>
Toshihiro Shimizu 890ddd
class DVAPI AnimatedParamField : public ParamField
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	ParamP m_currentParam, m_actualParam;
Toshihiro Shimizu 890ddd
	int m_frame;
Toshihiro Shimizu 890ddd
	ParamFieldKeyToggle *m_keyToggle;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	AnimatedParamField(QWidget *parent, QString name, const ParamP ¶m, bool addEmptyLabel = true)
Toshihiro Shimizu 890ddd
		: ParamField(parent, name, param, addEmptyLabel), m_frame(0)
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		m_keyToggle = new ParamFieldKeyToggle(this);
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	virtual void updateField(T value) = 0;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setParam(const TParamP ¤t, const TParamP &actual, int frame)
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		m_currentParam = current;
Toshihiro Shimizu 890ddd
		m_actualParam = actual;
Toshihiro Shimizu 890ddd
		assert(m_currentParam);
Toshihiro Shimizu 890ddd
		assert(m_actualParam);
Toshihiro Shimizu 890ddd
		update(frame);
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
	void update(int frame)
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		m_frame = frame;
Toshihiro Shimizu 890ddd
		if (!m_actualParam || !m_currentParam)
Toshihiro Shimizu 890ddd
			return;
Toshihiro Shimizu 890ddd
		T value = m_actualParam->getValue(m_frame);
Toshihiro Shimizu 890ddd
		if (m_actualParam->isKeyframe(m_frame))
Toshihiro Shimizu 890ddd
			m_currentParam->setValue(m_frame, value);
Toshihiro Shimizu 890ddd
		else if (!m_actualParam.getPointer()->hasKeyframes())
Toshihiro Shimizu 890ddd
			m_currentParam->setDefaultValue(value);
Toshihiro Shimizu 890ddd
		updateField(value);
Toshihiro Shimizu 890ddd
		updateKeyToggle();
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void updateKeyToggle()
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		T stroke = m_actualParam->getValue(m_frame);
Toshihiro Shimizu 890ddd
		T stroke2 = m_currentParam->getValue(m_frame);
Toshihiro Shimizu 890ddd
		m_keyToggle->setStatus(m_actualParam->hasKeyframes(), m_actualParam->isKeyframe(m_frame),
Toshihiro Shimizu 890ddd
							   m_actualParam->getValue(m_frame) != m_currentParam->getValue(m_frame));
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	/*-- エフェクトの位置パラメータをSwatchViewerでドラッグして編集するときに呼ばれる ---*/
Toshihiro Shimizu 890ddd
	void setValue(T value)
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		if (m_currentParam->getValue(m_frame) == value)
Toshihiro Shimizu 890ddd
			return;
Toshihiro Shimizu 890ddd
		m_currentParam->setValue(m_frame, value);
Toshihiro Shimizu 890ddd
		/*-- キーフレーム上で操作した場合 --*/
Toshihiro Shimizu 890ddd
		if (m_actualParam->isKeyframe(m_frame)) {
Toshihiro Shimizu 890ddd
			m_actualParam->setValue(m_frame, value);
Toshihiro Shimizu 890ddd
			emit actualParamChanged();
Toshihiro Shimizu 890ddd
		}
Toshihiro Shimizu 890ddd
		/*-- キーフレーム無い場合 --*/
Toshihiro Shimizu 890ddd
		else if (!m_actualParam.getPointer()->hasKeyframes()) {
Toshihiro Shimizu 890ddd
			m_actualParam->setDefaultValue(value);
Toshihiro Shimizu 890ddd
			emit actualParamChanged();
Toshihiro Shimizu 890ddd
		}
Toshihiro Shimizu 890ddd
		/*-- 他にキーフレームがあって、キーフレーム以外のフレームで操作した場合 --*/
Toshihiro Shimizu 890ddd
		emit currentParamChanged();
Toshihiro Shimizu 890ddd
		updateKeyToggle();
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void onKeyToggle()
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		T currentVal = m_currentParam->getValue(m_frame);
Toshihiro Shimizu 890ddd
		bool wasKeyFrame;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
		if (m_keyToggle->getStatus() == ParamFieldKeyToggle::KEYFRAME) {
Toshihiro Shimizu 890ddd
			m_actualParam->deleteKeyframe(m_frame);
Toshihiro Shimizu 890ddd
			update(m_frame);
Toshihiro Shimizu 890ddd
			wasKeyFrame = true;
Toshihiro Shimizu 890ddd
		} else {
Toshihiro Shimizu 890ddd
			m_actualParam->setValue(m_frame, m_currentParam->getValue(m_frame));
Toshihiro Shimizu 890ddd
			updateKeyToggle();
Toshihiro Shimizu 890ddd
			wasKeyFrame = false;
Toshihiro Shimizu 890ddd
		}
Toshihiro Shimizu 890ddd
		emit actualParamChanged();
Toshihiro Shimizu 890ddd
		emit paramKeyToggle();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
		TUndoManager::manager()->add(
Toshihiro Shimizu 890ddd
			new FxSettingsKeyToggleUndo<t, paramp="">(m_actualParam,</t,>
Toshihiro Shimizu 890ddd
												   currentVal,
Toshihiro Shimizu 890ddd
												   wasKeyFrame,
Toshihiro Shimizu 890ddd
												   m_interfaceName,
Toshihiro Shimizu 890ddd
												   m_frame,
Toshihiro Shimizu 890ddd
												   ParamField::m_fxHandleStat));
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// MeasuredDoubleParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI MeasuredDoubleParamField : public AnimatedParamField<double, tdoubleparamp=""></double,>
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	DVGui::MeasuredDoubleField *m_measuredDoubleField;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	MeasuredDoubleParamField(QWidget *parent, QString name, const TDoubleParamP ¶m);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void updateField(double value);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	QSize getPreferedSize() { return QSize(260, 28); }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void onChange(bool);
Toshihiro Shimizu 890ddd
	void onKeyToggled();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// RangeParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI MeasuredRangeParamField : public AnimatedParamField<doublepair, trangeparamp=""></doublepair,>
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	DVGui::MeasuredDoublePairField *m_valueField;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	MeasuredRangeParamField(QWidget *parent, QString name, const TRangeParamP ¶m);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void updateField(DoublePair value);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	QSize getPreferedSize() { return QSize(300, 20); }
Toshihiro Shimizu 890ddd
	void setPrecision(int precision);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void onChange(bool);
Toshihiro Shimizu 890ddd
	void onKeyToggled();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// PointParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI PointParamField : public AnimatedParamField<tpointd, tpointparamp=""></tpointd,>
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	DVGui::MeasuredDoubleField *m_xFld, *m_yFld;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	PointParamField(QWidget *parent, QString name, const TPointParamP ¶m);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setPointValue(const TPointD &p);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void updateField(TPointD value);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	QSize getPreferedSize() { return QSize(270, 28); }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void onChange(bool);
Toshihiro Shimizu 890ddd
	void onKeyToggled();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// PixelParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI PixelParamField : public AnimatedParamField<tpixel32, tpixelparamp=""></tpixel32,>
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	DVGui::ColorField *m_colorField;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	PixelParamField(QWidget *parent, QString name, const TPixelParamP ¶m);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void updateField(TPixel32 value);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	QSize getPreferedSize() { return QSize(360, 40); }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	/*-- RgbLinkButtonの実行のため --*/
Toshihiro Shimizu 890ddd
	TPixel32 getColor();
Toshihiro Shimizu 890ddd
	void setColor(TPixel32 value);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	void setParams();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void onChange(const TPixel32 &value, bool isDragging);
Toshihiro Shimizu 890ddd
	void onKeyToggled();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// RGB Link Button
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI RgbLinkButton : public QPushButton
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
	PixelParamField *m_field1, *m_field2;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	RgbLinkButton(QString str, QWidget *parent, PixelParamField *field1, PixelParamField *field2);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void onButtonClicked();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// SpectrumParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI SpectrumParamField : public AnimatedParamField<tspectrum, tspectrumparamp=""></tspectrum,>
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	DVGui::SpectrumField *m_spectrumField;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	SpectrumParamField(QWidget *parent, QString name, const TSpectrumParamP ¶m);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void updateField(TSpectrum value);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setParams();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	QSize getPreferedSize() { return QSize(390, 60); }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void onKeyToggled();
Toshihiro Shimizu 890ddd
	void onChange(bool isDragging);
Toshihiro Shimizu 890ddd
	void onKeyAdded(int keyIndex);
Toshihiro Shimizu 890ddd
	void onKeyRemoved(int keyIndex);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// EnumParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class EnumParamField : public ParamField
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TIntEnumParamP m_currentParam, m_actualParam;
Toshihiro Shimizu 890ddd
	QComboBox *m_om;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	EnumParamField(QWidget *parent, QString name, const TIntEnumParamP ¶m);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setParam(const TParamP ¤t, const TParamP &actual, int frame);
Toshihiro Shimizu 890ddd
	void update(int frame);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	QSize getPreferedSize() { return QSize(150, 20); }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void onChange(const QString &str);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// BoolParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI BoolParamField : public ParamField
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TBoolParamP m_currentParam, m_actualParam;
Toshihiro Shimizu 890ddd
	DVGui::CheckBox *m_checkBox;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	BoolParamField(QWidget *parent, QString name, const TBoolParamP ¶m);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setParam(const TParamP ¤t, const TParamP &actual, int frame);
Toshihiro Shimizu 890ddd
	void update(int frame);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	QSize getPreferedSize() { return QSize(20, 10); }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void onToggled(bool checked);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	/*-- visibleToggle UIで使用する --*/
Toshihiro Shimizu 890ddd
signals:
Toshihiro Shimizu 890ddd
	void toggled(bool);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// IntParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI IntParamField : public ParamField
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TIntParamP m_currentParam, m_actualParam;
Toshihiro Shimizu 890ddd
	DVGui::IntField *m_intField;
Toshihiro Shimizu 890ddd
	typedef IntParamField This;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	IntParamField(QWidget *parent = 0, QString name = 0, const TIntParamP ¶m = 0);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setParam(const TParamP ¤t, const TParamP &actual, int frame);
Toshihiro Shimizu 890ddd
	void update(int frame);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	QSize getPreferedSize() { return QSize(50, 28); }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void onChange(bool isDragging = false);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// StringParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI StringParamField : public ParamField
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TStringParamP m_currentParam, m_actualParam;
Toshihiro Shimizu 890ddd
	DVGui::LineEdit *m_textFld;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	StringParamField(QWidget *parent, QString name, const TStringParamP ¶m);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setParam(const TParamP ¤t, const TParamP &actual, int frame);
Toshihiro Shimizu 890ddd
	void update(int frame);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	QSize getPreferedSize() { return QSize(100, 20); }
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void onChange();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// ToneCurveParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI ToneCurveParamField : public AnimatedParamField<const qlist<tpointd="">, TToneCurveParamP></const>
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	DVGui::ToneCurveField *m_toneCurveField;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	ToneCurveParamField(QWidget *parent, QString name, const TToneCurveParamP ¶m);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void updateField(const QList<tpointd> value);</tpointd>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setParams();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	QSize getPreferedSize() { return QSize(400, 380); }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void onChannelChanged(int);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void onChange(bool isDragging);
Toshihiro Shimizu 890ddd
	void onPointAdded(int index);
Toshihiro Shimizu 890ddd
	void onPointRemoved(int index);
Toshihiro Shimizu 890ddd
	void onIsLinearChanged(bool);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void onKeyToggled();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
namespace component
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
class DVAPI LineEdit_double : public ParamField
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT; // could not use templates for Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int frame_;
Toshihiro Shimizu 890ddd
	TDoubleParamP current_;
Toshihiro Shimizu 890ddd
	TDoubleParamP actual_;
Toshihiro Shimizu 890ddd
	QLineEdit *value_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	LineEdit_double(QWidget *parent, QString name, TDoubleParamP const ¶m);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setParam(TParamP const ¤t, TParamP const &actual, int frame);
Toshihiro Shimizu 890ddd
	void update(int frame);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void update_value(QString const &text); // could not use MACROs for slots
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI Slider_double : public ParamField
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int frame_;
Toshihiro Shimizu 890ddd
	TDoubleParamP current_;
Toshihiro Shimizu 890ddd
	TDoubleParamP actual_;
Toshihiro Shimizu 890ddd
	QSlider *value_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	Slider_double(QWidget *parent, QString name, TDoubleParamP const ¶m);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setParam(TParamP const ¤t, TParamP const &actual, int frame);
Toshihiro Shimizu 890ddd
	void update(int frame);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void update_value(int);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI SpinBox_double : public ParamField
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int frame_;
Toshihiro Shimizu 890ddd
	TDoubleParamP current_;
Toshihiro Shimizu 890ddd
	TDoubleParamP actual_;
Toshihiro Shimizu 890ddd
	QDoubleSpinBox *value_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	SpinBox_double(QWidget *parent, QString name, TDoubleParamP const ¶m);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setParam(TParamP const ¤t, TParamP const &actual, int frame);
Toshihiro Shimizu 890ddd
	void update(int frame);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void update_value(double);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
namespace component
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
class DVAPI LineEdit_int : public ParamField
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int frame_;
Toshihiro Shimizu 890ddd
	TIntParamP current_;
Toshihiro Shimizu 890ddd
	TIntParamP actual_;
Toshihiro Shimizu 890ddd
	QLineEdit *value_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	LineEdit_int(QWidget *parent, QString name, TIntParamP const ¶m);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setParam(TParamP const ¤t, TParamP const &actual, int frame);
Toshihiro Shimizu 890ddd
	void update(int frame);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void update_value(QString const &text);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI Slider_int : public ParamField
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int frame_;
Toshihiro Shimizu 890ddd
	TIntParamP current_;
Toshihiro Shimizu 890ddd
	TIntParamP actual_;
Toshihiro Shimizu 890ddd
	QSlider *value_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	Slider_int(QWidget *parent, QString name, TIntParamP const ¶m);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setParam(TParamP const ¤t, TParamP const &actual, int frame);
Toshihiro Shimizu 890ddd
	void update(int frame);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void update_value(int);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI SpinBox_int : public ParamField
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int frame_;
Toshihiro Shimizu 890ddd
	TIntParamP current_;
Toshihiro Shimizu 890ddd
	TIntParamP actual_;
Toshihiro Shimizu 890ddd
	QSpinBox *value_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	SpinBox_int(QWidget *parent, QString name, TIntParamP const ¶m);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setParam(TParamP const ¤t, TParamP const &actual, int frame);
Toshihiro Shimizu 890ddd
	void update(int frame);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void update_value(int);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
} // end of namespace component
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
namespace component
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
class DVAPI CheckBox_bool : public ParamField
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int frame_;
Toshihiro Shimizu 890ddd
	TBoolParamP current_;
Toshihiro Shimizu 890ddd
	TBoolParamP actual_;
Toshihiro Shimizu 890ddd
	QCheckBox *value_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	CheckBox_bool(QWidget *parent, QString name, TBoolParamP const ¶m);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setParam(TParamP const ¤t, TParamP const &actual, int frame);
Toshihiro Shimizu 890ddd
	void update(int frame);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void update_value(int);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
} // end of namespace component
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
namespace component
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
class DVAPI RadioButton_enum : public ParamField
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int frame_;
Toshihiro Shimizu 890ddd
	TIntEnumParamP current_;
Toshihiro Shimizu 890ddd
	TIntEnumParamP actual_;
Toshihiro Shimizu 890ddd
	QButtonGroup *value_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	RadioButton_enum(QWidget *parent, QString name, TIntEnumParamP const ¶m);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setParam(TParamP const ¤t, TParamP const &actual, int frame);
Toshihiro Shimizu 890ddd
	void update(int frame);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void update_value(int);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI ComboBox_enum : public ParamField
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int frame_;
Toshihiro Shimizu 890ddd
	TIntEnumParamP current_;
Toshihiro Shimizu 890ddd
	TIntEnumParamP actual_;
Toshihiro Shimizu 890ddd
	QComboBox *value_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	ComboBox_enum(QWidget *parent, QString name, TIntEnumParamP const ¶m);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setParam(TParamP const ¤t, TParamP const &actual, int frame);
Toshihiro Shimizu 890ddd
	void update(int frame);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void update_value(int);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
} // end of namespace component
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
namespace component
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
class DVAPI LineEdit_string : public ParamField
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int frame_;
Toshihiro Shimizu 890ddd
	TStringParamP current_;
Toshihiro Shimizu 890ddd
	TStringParamP actual_;
Toshihiro Shimizu 890ddd
	QLineEdit *value_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	LineEdit_string(QWidget *parent, QString name, TStringParamP const ¶m);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setParam(TParamP const ¤t, TParamP const &actual, int frame);
Toshihiro Shimizu 890ddd
	void update(int frame);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void update_value(QString const &);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
} // end of namespace component
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifdef __cplusplus
Toshihiro Shimizu 890ddd
extern "C" {
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#define TOONZ_DECLARE_MAKE_WIDGET(NAME) \
Toshihiro Shimizu 890ddd
	ParamField *NAME(QWidget *parent, QString name, TParamP const ¶m)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TOONZ_DECLARE_MAKE_WIDGET(make_lineedit);
Toshihiro Shimizu 890ddd
TOONZ_DECLARE_MAKE_WIDGET(make_slider);
Toshihiro Shimizu 890ddd
TOONZ_DECLARE_MAKE_WIDGET(make_spinbox);
Toshihiro Shimizu 890ddd
TOONZ_DECLARE_MAKE_WIDGET(make_checkbox);
Toshihiro Shimizu 890ddd
TOONZ_DECLARE_MAKE_WIDGET(make_radiobutton);
Toshihiro Shimizu 890ddd
TOONZ_DECLARE_MAKE_WIDGET(make_combobox);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifdef __cplusplus
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif // PARAMFIELD_H