Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef TOOL_OPTIONS_CONTROLS_INCLUDED
Toshihiro Shimizu 890ddd
#define TOOL_OPTIONS_CONTROLS_INCLUDED
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// TnzCore includes
Toshihiro Shimizu 890ddd
#include "tproperty.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// TnzBase includes
Toshihiro Shimizu 890ddd
#include "tunit.h"
Toshihiro Shimizu 890ddd
#include "tdoubleparamrelayproperty.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// ToonzQt includes
Toshihiro Shimizu 890ddd
#include "toonzqt/doublepairfield.h"
Toshihiro Shimizu 890ddd
#include "toonzqt/intpairfield.h"
Toshihiro Shimizu 890ddd
#include "toonzqt/intfield.h"
Toshihiro Shimizu 890ddd
#include "toonzqt/styleindexlineedit.h"
Toshihiro Shimizu 890ddd
#include "toonzqt/checkbox.h"
Toshihiro Shimizu 890ddd
#include "toonzqt/doublefield.h"
Toshihiro Shimizu 890ddd
#include "toonzqt/popupbutton.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// TnzLib includes
Toshihiro Shimizu 890ddd
#include "toonz/txsheet.h"
Toshihiro Shimizu 890ddd
#include "toonz/tstageobject.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// STD includes
Toshihiro Shimizu 890ddd
#include <string></string>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// Qt includes
Toshihiro Shimizu 890ddd
#include <qcombobox></qcombobox>
Toshihiro Shimizu 890ddd
#include <qtoolbutton></qtoolbutton>
Toshihiro Shimizu 890ddd
#include <qtimer></qtimer>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#undef DVAPI
Toshihiro Shimizu 890ddd
#undef DVVAR
Toshihiro Shimizu 890ddd
#ifdef TNZTOOLS_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
class TTool;
Toshihiro Shimizu 890ddd
class TFrameHandle;
Toshihiro Shimizu 890ddd
class TObjectHandle;
Toshihiro Shimizu 890ddd
class TXsheetHandle;
Toshihiro Shimizu 890ddd
class SelectionTool;
Toshihiro Shimizu 890ddd
class ToolHandle;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//***********************************************************************************
Toshihiro Shimizu 890ddd
//    ToolOptionControl  declaration
Toshihiro Shimizu 890ddd
//***********************************************************************************
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//! ToolOptionControl is the base class for tool property toolbar controls.
Toshihiro Shimizu 890ddd
/*!
Toshihiro Shimizu 890ddd
  This class implements the basic methods the allow toolbar controls to
Toshihiro Shimizu 890ddd
  interact with the tool properties.
Toshihiro Shimizu 890ddd
*/
Toshihiro Shimizu 890ddd
class ToolOptionControl : public TProperty::Listener
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	std::string m_propertyName;
Toshihiro Shimizu 890ddd
	TTool *m_tool;
Toshihiro Shimizu 890ddd
	ToolHandle *m_toolHandle;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	ToolOptionControl(TTool *tool, std::string propertyName,
Toshihiro Shimizu 890ddd
					  ToolHandle *toolHandle = 0);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	const std::string &propertyName() const { return m_propertyName; }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void onPropertyChanged() { updateStatus(); }
Toshihiro Shimizu 890ddd
	void notifyTool();
Toshihiro Shimizu 890ddd
	//return true if the control is belonging to the visible viewer
Toshihiro Shimizu 890ddd
	bool isInVisibleViewer(QWidget *widget);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	virtual void updateStatus() = 0;
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//***********************************************************************************
Toshihiro Shimizu 890ddd
//    ToolOptionControl derivative  declarations
Toshihiro Shimizu 890ddd
//***********************************************************************************
Toshihiro Shimizu 890ddd
Shinya Kitaoka bb1d04
class ToolOptionCheckbox : public DVGui::CheckBox, public ToolOptionControl
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	TBoolProperty *m_property;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	ToolOptionCheckbox(TTool *tool, TBoolProperty *property,
Toshihiro Shimizu 890ddd
					   ToolHandle *toolHandle = 0,
Toshihiro Shimizu 890ddd
					   QWidget *parent = 0);
Toshihiro Shimizu 890ddd
	void updateStatus();
Toshihiro Shimizu 890ddd
public slots:
Toshihiro Shimizu 890ddd
	void doClick();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	void nextCheckState();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka bb1d04
class ToolOptionSlider : public DVGui::DoubleField, public ToolOptionControl
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	TDoubleProperty *m_property;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	ToolOptionSlider(TTool *tool, TDoubleProperty *property,
Toshihiro Shimizu 890ddd
					 ToolHandle *toolHandle = 0);
Toshihiro Shimizu 890ddd
	void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void onValueChanged(bool isDragging);
Toshihiro Shimizu 890ddd
	void increase();
Toshihiro Shimizu 890ddd
	void decrease();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka bb1d04
class ToolOptionPairSlider : public DVGui::DoublePairField, public ToolOptionControl
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	TDoublePairProperty *m_property;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	ToolOptionPairSlider(TTool *tool, TDoublePairProperty *property,
Toshihiro Shimizu 890ddd
						 const QString &leftName, const QString &rightName,
Toshihiro Shimizu 890ddd
						 ToolHandle *toolHandle = 0);
Toshihiro Shimizu 890ddd
	void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void onValuesChanged(bool isDragging);
Toshihiro Shimizu 890ddd
	void increaseMaxValue();
Toshihiro Shimizu 890ddd
	void decreaseMaxValue();
Toshihiro Shimizu 890ddd
	void increaseMinValue();
Toshihiro Shimizu 890ddd
	void decreaseMinValue();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka bb1d04
class ToolOptionIntPairSlider : public DVGui::IntPairField, public ToolOptionControl
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	TIntPairProperty *m_property;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	ToolOptionIntPairSlider(TTool *tool, TIntPairProperty *property,
Toshihiro Shimizu 890ddd
							const QString &leftName, const QString &rightName,
Toshihiro Shimizu 890ddd
							ToolHandle *toolHandle = 0);
Toshihiro Shimizu 890ddd
	void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void onValuesChanged(bool isDragging);
Toshihiro Shimizu 890ddd
	void increaseMaxValue();
Toshihiro Shimizu 890ddd
	void decreaseMaxValue();
Toshihiro Shimizu 890ddd
	void increaseMinValue();
Toshihiro Shimizu 890ddd
	void decreaseMinValue();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka bb1d04
class ToolOptionIntSlider : public DVGui::IntField, public ToolOptionControl
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	TIntProperty *m_property;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	ToolOptionIntSlider(TTool *tool, TIntProperty *property,
Toshihiro Shimizu 890ddd
						ToolHandle *toolHandle = 0);
Toshihiro Shimizu 890ddd
	void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void onValueChanged(bool isDragging);
Toshihiro Shimizu 890ddd
	void increase();
Toshihiro Shimizu 890ddd
	void decrease();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class ToolOptionCombo : public QComboBox, public ToolOptionControl
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	TEnumProperty *m_property;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	ToolOptionCombo(TTool *tool, TEnumProperty *property,
Toshihiro Shimizu 890ddd
					ToolHandle *toolHandle = 0);
Toshihiro Shimizu 890ddd
	void loadEntries();
Toshihiro Shimizu 890ddd
	void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public slots:
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void onActivated(int);
Toshihiro Shimizu 890ddd
	void doShowPopup();
Toshihiro Shimizu 890ddd
	void doOnActivated(int);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class ToolOptionPopupButton : public PopupButton, public ToolOptionControl
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	TEnumProperty *m_property;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	ToolOptionPopupButton(TTool *tool, TEnumProperty *property);
Toshihiro Shimizu 890ddd
	void updateStatus();
Toshihiro Shimizu 890ddd
	TEnumProperty *getProperty() { return m_property; }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public slots:
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void onActivated(int);
Toshihiro Shimizu 890ddd
	void doShowPopup();
Toshihiro Shimizu 890ddd
	void doSetCurrentIndex(int);
Toshihiro Shimizu 890ddd
	void doOnActivated(int);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka bb1d04
class ToolOptionTextField : public DVGui::LineEdit, public ToolOptionControl
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	TStringProperty *m_property;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	ToolOptionTextField(TTool *tool, TStringProperty *property);
Toshihiro Shimizu 890ddd
	void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public slots:
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void onValueChanged();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka bb1d04
class StyleIndexFieldAndChip : public DVGui::StyleIndexLineEdit, public ToolOptionControl
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	TStyleIndexProperty *m_property;
Toshihiro Shimizu 890ddd
	TPaletteHandle *m_pltHandle;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	StyleIndexFieldAndChip(TTool *tool, TStyleIndexProperty *property, TPaletteHandle *pltHandle,
Toshihiro Shimizu 890ddd
						   ToolHandle *toolHandle = 0);
Toshihiro Shimizu 890ddd
	void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public slots:
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void onValueChanged(const QString &);
Toshihiro Shimizu 890ddd
	void updateColor();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//! The ToolOptionMeasuredDoubleField class implements toolbar controls for
Toshihiro Shimizu 890ddd
//! double properties that need to be displayed with a measure.
Toshihiro Shimizu 890ddd
/*!
Toshihiro Shimizu 890ddd
  This option control is useful to display function editor curves in the toolbar;
Toshihiro Shimizu 890ddd
  in particular, it deals with the following tasks:
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
  \li Setting the preference-based keyframe interpolation type
Toshihiro Shimizu 890ddd
  \li Editing with global keyframes (ie affecting multiple parameters other than the edited one)
Toshihiro Shimizu 890ddd
  \li Undo/Redo of user interactions.
Toshihiro Shimizu 890ddd
*/
Shinya Kitaoka bb1d04
class ToolOptionParamRelayField : public DVGui::MeasuredDoubleLineEdit, public ToolOptionControl
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TDoubleParamP m_param; //!< Cached property param
Toshihiro Shimizu 890ddd
	TMeasure *m_measure;   //!< Cached property param measure
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	TDoubleParamRelayProperty *m_property; //!< The TDoubleParam relaying property
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TBoolProperty *m_globalKey;	//!< The property enforcing global keys
Toshihiro Shimizu 890ddd
	TPropertyGroup *m_globalGroup; //!< The property group whose properties
Toshihiro Shimizu 890ddd
								   //!< are affected by m_globalKey
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	ToolOptionParamRelayField(TTool *tool, TDoubleParamRelayProperty *property, int decimals = 2);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setGlobalKey(TBoolProperty *globalKey, TPropertyGroup *globalGroup);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	virtual void onValueChanged();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
// Widget specifici di ArrowTool (derivati da ToolOptionControl)
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka bb1d04
class DVAPI MeasuredValueField : public DVGui::LineEdit
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TMeasuredValue *m_value;
Toshihiro Shimizu 890ddd
	bool m_modified;
Toshihiro Shimizu 890ddd
	double m_errorHighlighting;
Toshihiro Shimizu 890ddd
	QTimer m_errorHighlightingTimer;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int m_precision;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	bool m_isGlobalKeyframe;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	MeasuredValueField(QWidget *parent, QString name = "numfield");
Toshihiro Shimizu 890ddd
	~MeasuredValueField();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 3bfa54
	void setMeasure(std::string name);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void enableGlobalKeyframe(bool isGlobalKeyframe) { m_isGlobalKeyframe = isGlobalKeyframe; }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TMeasuredValue *getMeasuredValue() const { return m_value; }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setValue(double v);
Toshihiro Shimizu 890ddd
	double getValue() const;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setPrecision(int precision);
Toshihiro Shimizu 890ddd
	int getPrecision() { return m_precision; }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void commit();
Toshihiro Shimizu 890ddd
	void onTextChanged(const QString &);
Toshihiro Shimizu 890ddd
	void errorHighlightingTick();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
signals:
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void measuredValueChanged(TMeasuredValue *value);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class PegbarChannelField : public MeasuredValueField, public ToolOptionControl
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	const enum TStageObject::Channel m_actionId;
Toshihiro Shimizu 890ddd
	TFrameHandle *m_frameHandle;
Toshihiro Shimizu 890ddd
	TObjectHandle *m_objHandle;
Toshihiro Shimizu 890ddd
	TXsheetHandle *m_xshHandle;
Toshihiro Shimizu 890ddd
	enum ScaleType { eNone = 0,
Toshihiro Shimizu 890ddd
					 eAR = 1,
Toshihiro Shimizu 890ddd
					 eMass = 2 } m_scaleType;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	PegbarChannelField(TTool *tool, enum TStageObject::Channel actionId, QString name,
Toshihiro Shimizu 890ddd
					   TFrameHandle *frameHandle, TObjectHandle *objHandle, TXsheetHandle *xshHandle,
Toshihiro Shimizu 890ddd
					   QWidget *parent = 0);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	~PegbarChannelField() {}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public slots:
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void onScaleTypeChanged(int type);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void onChange(TMeasuredValue *fld);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI PegbarCenterField : public MeasuredValueField, public ToolOptionControl
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int m_index; // 0 = x, 1 = y
Toshihiro Shimizu 890ddd
	TObjectHandle *m_objHandle;
Toshihiro Shimizu 890ddd
	TXsheetHandle *m_xshHandle;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	PegbarCenterField(TTool *tool, int index, QString name, TObjectHandle *objHandle, TXsheetHandle *xshHandle,
Toshihiro Shimizu 890ddd
					  QWidget *parent = 0);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	~PegbarCenterField() {}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void onChange(TMeasuredValue *fld);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class NoScaleField : public MeasuredValueField, public ToolOptionControl
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	NoScaleField(TTool *tool, QString name);
Toshihiro Shimizu 890ddd
	~NoScaleField() {}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void onChange(TMeasuredValue *fld);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class PropertyMenuButton : public QToolButton, public ToolOptionControl
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	QList<tboolproperty *=""> m_properties;</tboolproperty>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	PropertyMenuButton(QWidget *parent = 0, TTool *tool = 0,
Toshihiro Shimizu 890ddd
					   QList<tboolproperty *=""> properties = QList<tboolproperty *="">(),</tboolproperty></tboolproperty>
Toshihiro Shimizu 890ddd
					   QIcon icon = QIcon(), QString tooltip = QString());
Toshihiro Shimizu 890ddd
	~PropertyMenuButton() {}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void onActionTriggered(QAction *);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
signals:
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void onPropertyChanged(QString name);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class SelectionScaleField : public MeasuredValueField
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int m_id;
Toshihiro Shimizu 890ddd
	SelectionTool *m_tool;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	SelectionScaleField(SelectionTool *tool, int actionId, QString name);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	~SelectionScaleField() {}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void updateStatus();
Toshihiro Shimizu 890ddd
	bool applyChange();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void onChange(TMeasuredValue *fld);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
signals:
Toshihiro Shimizu 890ddd
	void valueChange();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class SelectionRotationField : public MeasuredValueField
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	SelectionTool *m_tool;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	SelectionRotationField(SelectionTool *tool, QString name);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	~SelectionRotationField() {}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void onChange(TMeasuredValue *fld);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class SelectionMoveField : public MeasuredValueField
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int m_id;
Toshihiro Shimizu 890ddd
	SelectionTool *m_tool;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	SelectionMoveField(SelectionTool *tool, int id, QString name);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	~SelectionMoveField() {}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void onChange(TMeasuredValue *fld);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class ThickChangeField : public MeasuredValueField
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	SelectionTool *m_tool;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	ThickChangeField(SelectionTool *tool, QString name);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	~ThickChangeField() {}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
	void onChange(TMeasuredValue *fld);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif