Shinya Kitaoka 810553
#pragma once
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
*/
Shinya Kitaoka 120a6e
class ToolOptionControl : public TProperty::Listener {
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  std::string m_propertyName;
Shinya Kitaoka 120a6e
  TTool *m_tool;
Shinya Kitaoka 120a6e
  ToolHandle *m_toolHandle;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  ToolOptionControl(TTool *tool, std::string propertyName,
Shinya Kitaoka 120a6e
                    ToolHandle *toolHandle = 0);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  const std::string &propertyName() const { return m_propertyName; }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  void onPropertyChanged() override { updateStatus(); }
Shinya Kitaoka 120a6e
  void notifyTool();
Shinya Kitaoka 120a6e
  // return true if the control is belonging to the visible viewer
Shinya Kitaoka 120a6e
  bool isInVisibleViewer(QWidget *widget);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  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 d1f6c4
class ToolOptionCheckbox final : public DVGui::CheckBox,
Shinya Kitaoka d1f6c4
                                 public ToolOptionControl {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  TBoolProperty *m_property;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  ToolOptionCheckbox(TTool *tool, TBoolProperty *property,
Shinya Kitaoka 120a6e
                     ToolHandle *toolHandle = 0, QWidget *parent = 0);
Shinya Kitaoka 473e70
  void updateStatus() override;
Toshihiro Shimizu 890ddd
public slots:
Shinya Kitaoka 120a6e
  void doClick();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 473e70
  void nextCheckState() override;
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class ToolOptionSlider final : public DVGui::DoubleField,
Shinya Kitaoka d1f6c4
                               public ToolOptionControl {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  TDoubleProperty *m_property;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  ToolOptionSlider(TTool *tool, TDoubleProperty *property,
Shinya Kitaoka 120a6e
                   ToolHandle *toolHandle = 0);
Shinya Kitaoka 473e70
  void updateStatus() override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void onValueChanged(bool isDragging);
Shinya Kitaoka 120a6e
  void increase();
Shinya Kitaoka 120a6e
  void decrease();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class ToolOptionPairSlider final : public DVGui::DoublePairField,
Shinya Kitaoka d1f6c4
                                   public ToolOptionControl {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  TDoublePairProperty *m_property;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  ToolOptionPairSlider(TTool *tool, TDoublePairProperty *property,
Shinya Kitaoka 120a6e
                       const QString &leftName, const QString &rightName,
Shinya Kitaoka 120a6e
                       ToolHandle *toolHandle = 0);
Shinya Kitaoka 473e70
  void updateStatus() override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void onValuesChanged(bool isDragging);
Shinya Kitaoka 120a6e
  void increaseMaxValue();
Shinya Kitaoka 120a6e
  void decreaseMaxValue();
Shinya Kitaoka 120a6e
  void increaseMinValue();
Shinya Kitaoka 120a6e
  void decreaseMinValue();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class ToolOptionIntPairSlider final : public DVGui::IntPairField,
Shinya Kitaoka d1f6c4
                                      public ToolOptionControl {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  TIntPairProperty *m_property;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  ToolOptionIntPairSlider(TTool *tool, TIntPairProperty *property,
Shinya Kitaoka 120a6e
                          const QString &leftName, const QString &rightName,
Shinya Kitaoka 120a6e
                          ToolHandle *toolHandle = 0);
Shinya Kitaoka 473e70
  void updateStatus() override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void onValuesChanged(bool isDragging);
Shinya Kitaoka 120a6e
  void increaseMaxValue();
Shinya Kitaoka 120a6e
  void decreaseMaxValue();
Shinya Kitaoka 120a6e
  void increaseMinValue();
Shinya Kitaoka 120a6e
  void decreaseMinValue();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class ToolOptionIntSlider final : public DVGui::IntField,
Shinya Kitaoka d1f6c4
                                  public ToolOptionControl {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  TIntProperty *m_property;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  ToolOptionIntSlider(TTool *tool, TIntProperty *property,
Shinya Kitaoka 120a6e
                      ToolHandle *toolHandle = 0);
Shinya Kitaoka 473e70
  void updateStatus() override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void onValueChanged(bool isDragging);
Shinya Kitaoka 120a6e
  void increase();
Shinya Kitaoka 120a6e
  void decrease();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class ToolOptionCombo final : public QComboBox, public ToolOptionControl {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  TEnumProperty *m_property;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  ToolOptionCombo(TTool *tool, TEnumProperty *property,
Shinya Kitaoka 120a6e
                  ToolHandle *toolHandle = 0);
Shinya Kitaoka 120a6e
  void loadEntries();
Shinya Kitaoka 473e70
  void updateStatus() override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void onActivated(int);
Shinya Kitaoka 120a6e
  void doShowPopup();
Shinya Kitaoka 120a6e
  void doOnActivated(int);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class ToolOptionPopupButton final : public PopupButton,
Shinya Kitaoka d1f6c4
                                    public ToolOptionControl {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  TEnumProperty *m_property;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  ToolOptionPopupButton(TTool *tool, TEnumProperty *property);
Shinya Kitaoka 473e70
  void updateStatus() override;
Shinya Kitaoka 120a6e
  TEnumProperty *getProperty() { return m_property; }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void onActivated(int);
Shinya Kitaoka 120a6e
  void doShowPopup();
Shinya Kitaoka 120a6e
  void doSetCurrentIndex(int);
Shinya Kitaoka 120a6e
  void doOnActivated(int);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class ToolOptionTextField final : public DVGui::LineEdit,
Shinya Kitaoka d1f6c4
                                  public ToolOptionControl {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  TStringProperty *m_property;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  ToolOptionTextField(TTool *tool, TStringProperty *property);
Shinya Kitaoka 473e70
  void updateStatus() override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void onValueChanged();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class StyleIndexFieldAndChip final : public DVGui::StyleIndexLineEdit,
Shinya Kitaoka d1f6c4
                                     public ToolOptionControl {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  TStyleIndexProperty *m_property;
Shinya Kitaoka 120a6e
  TPaletteHandle *m_pltHandle;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  StyleIndexFieldAndChip(TTool *tool, TStyleIndexProperty *property,
Shinya Kitaoka 120a6e
                         TPaletteHandle *pltHandle, ToolHandle *toolHandle = 0);
Shinya Kitaoka 473e70
  void updateStatus() override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void onValueChanged(const QString &);
Shinya Kitaoka 120a6e
  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
/*!
Shinya Kitaoka 120a6e
  This option control is useful to display function editor curves in the
Shinya Kitaoka 120a6e
  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
Shinya Kitaoka 120a6e
  \li Editing with global keyframes (ie affecting multiple parameters other than
Shinya Kitaoka 120a6e
  the edited one)
Toshihiro Shimizu 890ddd
  \li Undo/Redo of user interactions.
Toshihiro Shimizu 890ddd
*/
Shinya Kitaoka d1f6c4
class ToolOptionParamRelayField final : public DVGui::MeasuredDoubleLineEdit,
Shinya Kitaoka d1f6c4
                                        public ToolOptionControl {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TDoubleParamP m_param;  //!< Cached property param
Shinya Kitaoka 120a6e
  TMeasure *m_measure;    //!< Cached property param measure
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  TDoubleParamRelayProperty
Shinya Kitaoka 120a6e
      *m_property;  //!< The TDoubleParam relaying property
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TBoolProperty *m_globalKey;     //!< The property enforcing global keys
Shinya Kitaoka 120a6e
  TPropertyGroup *m_globalGroup;  //!< The property group whose properties
Shinya Kitaoka 120a6e
                                  //!< are affected by m_globalKey
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  ToolOptionParamRelayField(TTool *tool, TDoubleParamRelayProperty *property,
Shinya Kitaoka 120a6e
                            int decimals = 2);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void setGlobalKey(TBoolProperty *globalKey, TPropertyGroup *globalGroup);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  void updateStatus() override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  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 120a6e
class DVAPI MeasuredValueField : public DVGui::LineEdit {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TMeasuredValue *m_value;
Shinya Kitaoka 120a6e
  bool m_modified;
Shinya Kitaoka 120a6e
  double m_errorHighlighting;
Shinya Kitaoka 120a6e
  QTimer m_errorHighlightingTimer;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int m_precision;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  bool m_isGlobalKeyframe;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  MeasuredValueField(QWidget *parent, QString name = "numfield");
Shinya Kitaoka 120a6e
  ~MeasuredValueField();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void setMeasure(std::string name);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void enableGlobalKeyframe(bool isGlobalKeyframe) {
Shinya Kitaoka 120a6e
    m_isGlobalKeyframe = isGlobalKeyframe;
Shinya Kitaoka 120a6e
  }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TMeasuredValue *getMeasuredValue() const { return m_value; }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void setValue(double v);
Shinya Kitaoka 120a6e
  double getValue() const;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void setPrecision(int precision);
Shinya Kitaoka 120a6e
  int getPrecision() { return m_precision; }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void commit();
Shinya Kitaoka 120a6e
  void onTextChanged(const QString &);
Shinya Kitaoka 120a6e
  void errorHighlightingTick();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
signals:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void measuredValueChanged(TMeasuredValue *value);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class PegbarChannelField final : public MeasuredValueField,
Shinya Kitaoka d1f6c4
                                 public ToolOptionControl {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  const enum TStageObject::Channel m_actionId;
Shinya Kitaoka 120a6e
  TFrameHandle *m_frameHandle;
Shinya Kitaoka 120a6e
  TObjectHandle *m_objHandle;
Shinya Kitaoka 120a6e
  TXsheetHandle *m_xshHandle;
Shinya Kitaoka 120a6e
  enum ScaleType { eNone = 0, eAR = 1, eMass = 2 } m_scaleType;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  PegbarChannelField(TTool *tool, enum TStageObject::Channel actionId,
Shinya Kitaoka 120a6e
                     QString name, TFrameHandle *frameHandle,
Shinya Kitaoka 120a6e
                     TObjectHandle *objHandle, TXsheetHandle *xshHandle,
Shinya Kitaoka 120a6e
                     QWidget *parent = 0);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  ~PegbarChannelField() {}
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  void updateStatus() override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void onScaleTypeChanged(int type);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void onChange(TMeasuredValue *fld);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI PegbarCenterField final : public MeasuredValueField,
Shinya Kitaoka d1f6c4
                                      public ToolOptionControl {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int m_index;  // 0 = x, 1 = y
Shinya Kitaoka 120a6e
  TObjectHandle *m_objHandle;
Shinya Kitaoka 120a6e
  TXsheetHandle *m_xshHandle;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  PegbarCenterField(TTool *tool, int index, QString name,
Shinya Kitaoka 120a6e
                    TObjectHandle *objHandle, TXsheetHandle *xshHandle,
Shinya Kitaoka 120a6e
                    QWidget *parent = 0);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  ~PegbarCenterField() {}
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  void updateStatus() override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void onChange(TMeasuredValue *fld);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class NoScaleField final : public MeasuredValueField, public ToolOptionControl {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  NoScaleField(TTool *tool, QString name);
Shinya Kitaoka 120a6e
  ~NoScaleField() {}
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  void updateStatus() override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void onChange(TMeasuredValue *fld);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class PropertyMenuButton final : public QToolButton, public ToolOptionControl {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  QList<tboolproperty *=""> m_properties;</tboolproperty>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  PropertyMenuButton(
Shinya Kitaoka 120a6e
      QWidget *parent = 0, TTool *tool = 0,
Shinya Kitaoka 120a6e
      QList<tboolproperty *=""> properties = QList<tboolproperty *="">(),</tboolproperty></tboolproperty>
Shinya Kitaoka 120a6e
      QIcon icon = QIcon(), QString tooltip = QString());
Shinya Kitaoka 120a6e
  ~PropertyMenuButton() {}
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  void updateStatus() override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void onActionTriggered(QAction *);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
signals:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void onPropertyChanged(QString name);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class SelectionScaleField final : public MeasuredValueField {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int m_id;
Shinya Kitaoka 120a6e
  SelectionTool *m_tool;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  SelectionScaleField(SelectionTool *tool, int actionId, QString name);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  ~SelectionScaleField() {}
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void updateStatus();
Shinya Kitaoka 120a6e
  bool applyChange();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void onChange(TMeasuredValue *fld);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
signals:
Shinya Kitaoka 120a6e
  void valueChange();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class SelectionRotationField final : public MeasuredValueField {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  SelectionTool *m_tool;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  SelectionRotationField(SelectionTool *tool, QString name);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  ~SelectionRotationField() {}
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void onChange(TMeasuredValue *fld);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class SelectionMoveField final : public MeasuredValueField {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int m_id;
Shinya Kitaoka 120a6e
  SelectionTool *m_tool;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  SelectionMoveField(SelectionTool *tool, int id, QString name);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  ~SelectionMoveField() {}
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void onChange(TMeasuredValue *fld);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class ThickChangeField final : public MeasuredValueField {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  SelectionTool *m_tool;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  ThickChangeField(SelectionTool *tool, QString name);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  ~ThickChangeField() {}
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void onChange(TMeasuredValue *fld);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif