Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef PARAMFIELD_H
Toshihiro Shimizu 890ddd
#define PARAMFIELD_H
Toshihiro Shimizu 890ddd
e280ae
#ifdef _MSC_VER
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>
shun-iwasawa 5b2332
#include <qtextedit></qtextedit>
Kite 521c84
#include <qpainterpath></qpainterpath>
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;
shun-iwasawa 5b2332
class QFontComboBox;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
namespace DVGui {
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;
shun-iwasawa cac18a
}  // namespace DVGui
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
/*! \brief ParamField.
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
                Inherits \b QWidget.
Toshihiro Shimizu 890ddd
*/
Shinya Kitaoka 120a6e
class DVAPI ParamField : public QWidget {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  QHBoxLayout *m_layout;
Shinya Kitaoka 120a6e
  QString m_paramName;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  static TFxHandle *m_fxHandleStat;
Shinya Kitaoka 120a6e
  QString m_interfaceName;
Shinya Kitaoka 120a6e
  QString m_description;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  ParamField(QWidget *parent, QString paramName, const TParamP ¶m,
Shinya Kitaoka 120a6e
             bool addEmptyLabel = true);
Shinya Kitaoka 120a6e
  ~ParamField();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  QString getParamName() const { return m_paramName; }
Shinya Kitaoka 120a6e
  QString getUIName() const { return m_interfaceName; }
Shinya Kitaoka 120a6e
  QString getDescription() const { return m_description; }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  virtual void setParam(const TParamP ¤t, const TParamP &actual,
Shinya Kitaoka 120a6e
                        int frame) = 0;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  virtual void update(int frame) = 0;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  static ParamField *create(QWidget *parent, QString name,
Shinya Kitaoka 120a6e
                            const TParamP ¶m);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  virtual void setPointValue(const TPointD &p){};
Toshihiro Shimizu 890ddd
luz paz f71e6c
  virtual QSize getPreferredSize() { return QSize(200, 28); }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  static void setFxHandle(TFxHandle *fxHandle);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  virtual void setPrecision(int precision) {}
Toshihiro Shimizu 890ddd
signals:
Shinya Kitaoka 120a6e
  void currentParamChanged();
Shinya Kitaoka 120a6e
  void actualParamChanged();
Shinya Kitaoka 120a6e
  void paramKeyToggle();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// ParamFieldKeyToggle
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI ParamFieldKeyToggle final : public QWidget {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
public:
Kite 521c84
  QPixmap m_pixmap;
Kite 521c84
Kite 521c84
  // keyframe colors
Kite 521c84
  QColor m_keyBorderOffColor;
Kite 521c84
  QColor m_keyBorderOnColor;
Kite 521c84
  QColor m_keyBorderModifiedColor;
Kite 521c84
  QColor m_keyBorderInbetweenColor;
Kite 521c84
  QColor m_keyBorderHighlightColor;
Kite 521c84
  QColor m_keyOffColor;
Kite 521c84
  QColor m_keyOnColor;
Kite 521c84
  QColor m_keyModifiedColor;
Kite 521c84
  QColor m_keyHighlightColor;
Kite 521c84
  QColor m_keyInbetweenColor;
Kite 521c84
Kite 521c84
  // keyframe colors
Kite 521c84
  Q_PROPERTY(QColor KeyBorderOffColor READ getKeyBorderOffColor WRITE
Kite 521c84
                 setKeyBorderOffColor)
Kite 521c84
  Q_PROPERTY(QColor KeyBorderOnColor READ getKeyBorderOnColor WRITE
Kite 521c84
                 setKeyBorderOnColor)
Kite 521c84
  Q_PROPERTY(QColor KeyBorderModifiedColor READ getKeyBorderModifiedColor WRITE
Kite 521c84
                 setKeyBorderModifiedColor)
Kite 521c84
  Q_PROPERTY(QColor KeyBorderInbetweenColor READ getKeyBorderInbetweenColor
Kite 521c84
                 WRITE setKeyBorderInbetweenColor)
Kite 521c84
  Q_PROPERTY(QColor KeyBorderHighlightColor READ getKeyBorderHighlightColor
Kite 521c84
                 WRITE setKeyBorderHighlightColor)
Kite 521c84
  Q_PROPERTY(QColor KeyOffColor READ getKeyOffColor WRITE setKeyOffColor)
Kite 521c84
  Q_PROPERTY(QColor KeyOnColor READ getKeyOnColor WRITE setKeyOnColor)
Kite 521c84
  Q_PROPERTY(QColor KeyModifiedColor READ getKeyModifiedColor WRITE
Kite 521c84
                 setKeyModifiedColor)
Kite 521c84
  Q_PROPERTY(QColor KeyInbetweenColor READ getKeyInbetweenColor WRITE
Kite 521c84
                 setKeyInbetweenColor)
Kite 521c84
  Q_PROPERTY(QColor KeyHighlightColor READ getKeyHighlightColor WRITE
Kite 521c84
                 setKeyHighlightColor)
Kite 521c84
Shinya Kitaoka 120a6e
  enum Status { NOT_ANIMATED, NOT_KEYFRAME, MODIFIED, KEYFRAME };
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Shinya Kitaoka 120a6e
  Status m_status;
Shinya Kitaoka 120a6e
  bool m_highlighted;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  ParamFieldKeyToggle(QWidget *parent,
Shinya Kitaoka 120a6e
                      std::string name = "ParamFieldKeyToggle");
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void setStatus(Status status);
Shinya Kitaoka 120a6e
  Status getStatus() const;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void setStatus(bool hasKeyframe, bool isKeyframe, bool hasBeenChanged);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 473e70
  void paintEvent(QPaintEvent *) override;
Shinya Kitaoka 473e70
  void mousePressEvent(QMouseEvent *) override;
Shinya Kitaoka 473e70
  void enterEvent(QEvent *) override;
Shinya Kitaoka 473e70
  void leaveEvent(QEvent *) override;
Toshihiro Shimizu 890ddd
Kite 521c84
  // keyframe colors
Kite 521c84
  void setKeyBorderOffColor(const QColor &color) {
Kite 521c84
    m_keyBorderOffColor = color;
Kite 521c84
  }
Kite 521c84
  QColor getKeyBorderOffColor() const { return m_keyBorderOffColor; }
Kite 521c84
  void setKeyBorderOnColor(const QColor &color) { m_keyBorderOnColor = color; }
Kite 521c84
  QColor getKeyBorderOnColor() const { return m_keyBorderOnColor; }
Kite 521c84
  void setKeyBorderModifiedColor(const QColor &color) {
Kite 521c84
    m_keyBorderModifiedColor = color;
Kite 521c84
  }
Kite 521c84
  QColor getKeyBorderModifiedColor() const { return m_keyBorderModifiedColor; }
Kite 521c84
  void setKeyBorderInbetweenColor(const QColor &color) {
Kite 521c84
    m_keyBorderInbetweenColor = color;
Kite 521c84
  }
Kite 521c84
  QColor getKeyBorderInbetweenColor() const {
Kite 521c84
    return m_keyBorderInbetweenColor;
Kite 521c84
  }
Kite 521c84
  void setKeyBorderHighlightColor(const QColor &color) {
Kite 521c84
    m_keyBorderHighlightColor = color;
Kite 521c84
  }
Kite 521c84
  QColor getKeyBorderHighlightColor() const {
Kite 521c84
    return m_keyBorderHighlightColor;
Kite 521c84
  }
Kite 521c84
  void setKeyOffColor(const QColor &color) { m_keyOffColor = color; }
Kite 521c84
  QColor getKeyOffColor() const { return m_keyOffColor; }
Kite 521c84
  void setKeyOnColor(const QColor &color) { m_keyOnColor = color; }
Kite 521c84
  QColor getKeyOnColor() const { return m_keyOnColor; }
Kite 521c84
  void setKeyModifiedColor(const QColor &color) { m_keyModifiedColor = color; }
Kite 521c84
  QColor getKeyModifiedColor() const { return m_keyModifiedColor; }
Kite 521c84
  void setKeyHighlightColor(const QColor &color) {
Kite 521c84
    m_keyHighlightColor = color;
Kite 521c84
  }
Kite 521c84
  QColor getKeyHighlightColor() const { return m_keyHighlightColor; }
Kite 521c84
  void setKeyInbetweenColor(const QColor &color) {
Kite 521c84
    m_keyInbetweenColor = color;
Kite 521c84
  }
Kite 521c84
  QColor getKeyInbetweenColor() const { return m_keyInbetweenColor; }
Kite 521c84
Toshihiro Shimizu 890ddd
signals:
Shinya Kitaoka 120a6e
  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>
Shinya Kitaoka d1f6c4
class FxSettingsKeyToggleUndo final : public TUndo {
Shinya Kitaoka 120a6e
  TFxHandle *m_fxHandle;
Shinya Kitaoka 120a6e
  QString m_name;
Shinya Kitaoka 120a6e
  bool m_wasKeyframe;
Shinya Kitaoka 120a6e
  int m_frame;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  ParamP m_param;
Shinya Kitaoka 120a6e
  T m_currentValue;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  FxSettingsKeyToggleUndo(ParamP param, T currentValue, bool wasKeyFrame,
Shinya Kitaoka 120a6e
                          QString name, int frame, TFxHandle *fxHandle)
Shinya Kitaoka 120a6e
      : m_param(param)
Shinya Kitaoka 120a6e
      , m_currentValue(currentValue)
Shinya Kitaoka 120a6e
      , m_wasKeyframe(wasKeyFrame)
Shinya Kitaoka 120a6e
      , m_name(name)
Shinya Kitaoka 120a6e
      , m_frame(frame)
Shinya Kitaoka 120a6e
      , m_fxHandle(fxHandle) {}
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  // void notify();
Shinya Kitaoka 120a6e
Shinya Kitaoka 473e70
  void undo() const override {
Shinya Kitaoka 120a6e
    if (m_wasKeyframe)
Shinya Kitaoka 120a6e
      m_param->setValue(m_frame, m_currentValue);
Shinya Kitaoka 120a6e
    else
Shinya Kitaoka 120a6e
      m_param->deleteKeyframe(m_frame);
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
    if (m_fxHandle) m_fxHandle->notifyFxChanged();
Shinya Kitaoka 120a6e
  }
Shinya Kitaoka 120a6e
Shinya Kitaoka 473e70
  void redo() const override {
Shinya Kitaoka 120a6e
    if (m_wasKeyframe)
Shinya Kitaoka 120a6e
      m_param->deleteKeyframe(m_frame);
Shinya Kitaoka 120a6e
    else
Shinya Kitaoka 120a6e
      m_param->setValue(m_frame, m_currentValue);
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
    if (m_fxHandle) m_fxHandle->notifyFxChanged();
Shinya Kitaoka 120a6e
  }
Shinya Kitaoka 120a6e
Shinya Kitaoka 473e70
  int getSize() const override { return sizeof(*this); }
Shinya Kitaoka 473e70
  int getHistoryType() override { return HistoryType::Fx; }
Shinya Kitaoka 473e70
  QString getHistoryString() override {
Shinya Kitaoka 120a6e
    QString str =
Shinya Kitaoka 120a6e
        QObject::tr("Modify Fx Param : %1 Key : %2  Frame %3")
Shinya Kitaoka 120a6e
            .arg((m_wasKeyframe) ? QObject::tr("Delete") : QObject::tr("Set"))
Shinya Kitaoka 120a6e
            .arg(m_name)
Shinya Kitaoka 120a6e
            .arg(QString::number(m_frame + 1));
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
    return str;
Shinya Kitaoka 120a6e
  }
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>
Shinya Kitaoka 120a6e
class DVAPI AnimatedParamField : public ParamField {
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  ParamP m_currentParam, m_actualParam;
Shinya Kitaoka 120a6e
  int m_frame;
Shinya Kitaoka 120a6e
  ParamFieldKeyToggle *m_keyToggle;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  AnimatedParamField(QWidget *parent, QString name, const ParamP ¶m,
Shinya Kitaoka 120a6e
                     bool addEmptyLabel = true)
Shinya Kitaoka 120a6e
      : ParamField(parent, name, param, addEmptyLabel), m_frame(0) {
Shinya Kitaoka 120a6e
    m_keyToggle = new ParamFieldKeyToggle(this);
Shinya Kitaoka 120a6e
  }
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  virtual void updateField(T value) = 0;
Shinya Kitaoka 120a6e
Shinya Kitaoka 38fd86
  void setParam(const TParamP ¤t, const TParamP &actual,
Shinya Kitaoka 38fd86
                int frame) override {
Shinya Kitaoka 120a6e
    m_currentParam = current;
Shinya Kitaoka 120a6e
    m_actualParam  = actual;
Shinya Kitaoka 120a6e
    assert(m_currentParam);
Shinya Kitaoka 120a6e
    assert(m_actualParam);
Shinya Kitaoka 120a6e
    update(frame);
Shinya Kitaoka 120a6e
  }
Shinya Kitaoka 473e70
  void update(int frame) override {
Shinya Kitaoka 120a6e
    m_frame = frame;
Shinya Kitaoka 120a6e
    if (!m_actualParam || !m_currentParam) return;
Shinya Kitaoka 120a6e
    T value = m_actualParam->getValue(m_frame);
Shinya Kitaoka 120a6e
    if (m_actualParam->isKeyframe(m_frame))
Shinya Kitaoka 120a6e
      m_currentParam->setValue(m_frame, value);
Shinya Kitaoka 120a6e
    else if (!m_actualParam.getPointer()->hasKeyframes())
Shinya Kitaoka 120a6e
      m_currentParam->setDefaultValue(value);
Shinya Kitaoka 120a6e
    updateField(value);
Shinya Kitaoka 120a6e
    updateKeyToggle();
Shinya Kitaoka 120a6e
  }
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  void updateKeyToggle() {
Shinya Kitaoka 120a6e
    T stroke  = m_actualParam->getValue(m_frame);
Shinya Kitaoka 120a6e
    T stroke2 = m_currentParam->getValue(m_frame);
Shinya Kitaoka 120a6e
    m_keyToggle->setStatus(
Shinya Kitaoka 120a6e
        m_actualParam->hasKeyframes(), m_actualParam->isKeyframe(m_frame),
Shinya Kitaoka 120a6e
        m_actualParam->getValue(m_frame) != m_currentParam->getValue(m_frame));
Shinya Kitaoka 120a6e
  }
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  /*--
Shinya Kitaoka 120a6e
   * エフェクトの位置パラメータをSwatchViewerでドラッグして編集するときに呼ばれる
Shinya Kitaoka 120a6e
   * ---*/
Shinya Kitaoka 120a6e
  void setValue(T value) {
Shinya Kitaoka 120a6e
    if (m_currentParam->getValue(m_frame) == value) return;
Shinya Kitaoka 120a6e
    m_currentParam->setValue(m_frame, value);
Shinya Kitaoka 120a6e
    /*-- キーフレーム上で操作した場合 --*/
Shinya Kitaoka 120a6e
    if (m_actualParam->isKeyframe(m_frame)) {
Shinya Kitaoka 120a6e
      m_actualParam->setValue(m_frame, value);
Shinya Kitaoka 120a6e
      emit actualParamChanged();
Shinya Kitaoka 120a6e
    }
Shinya Kitaoka 120a6e
    /*-- キーフレーム無い場合 --*/
Shinya Kitaoka 120a6e
    else if (!m_actualParam.getPointer()->hasKeyframes()) {
Shinya Kitaoka 120a6e
      m_actualParam->setDefaultValue(value);
Shinya Kitaoka 120a6e
      emit actualParamChanged();
Shinya Kitaoka 120a6e
    }
Shinya Kitaoka 120a6e
    /*-- 他にキーフレームがあって、キーフレーム以外のフレームで操作した場合 --*/
Shinya Kitaoka 120a6e
    emit currentParamChanged();
Shinya Kitaoka 120a6e
    updateKeyToggle();
Shinya Kitaoka 120a6e
  }
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  void onKeyToggle() {
Shinya Kitaoka 120a6e
    T currentVal = m_currentParam->getValue(m_frame);
Shinya Kitaoka 120a6e
    bool wasKeyFrame;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
    if (m_keyToggle->getStatus() == ParamFieldKeyToggle::KEYFRAME) {
Shinya Kitaoka 120a6e
      m_actualParam->deleteKeyframe(m_frame);
Shinya Kitaoka 120a6e
      update(m_frame);
Shinya Kitaoka 120a6e
      wasKeyFrame = true;
Shinya Kitaoka 120a6e
    } else {
Shinya Kitaoka 120a6e
      m_actualParam->setValue(m_frame, m_currentParam->getValue(m_frame));
Shinya Kitaoka 120a6e
      updateKeyToggle();
Shinya Kitaoka 120a6e
      wasKeyFrame = false;
Shinya Kitaoka 120a6e
    }
Shinya Kitaoka 120a6e
    emit actualParamChanged();
Shinya Kitaoka 120a6e
    emit paramKeyToggle();
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
    TUndoManager::manager()->add(new FxSettingsKeyToggleUndo<t, paramp="">(</t,>
Shinya Kitaoka 120a6e
        m_actualParam, currentVal, wasKeyFrame, m_interfaceName, m_frame,
Shinya Kitaoka 120a6e
        ParamField::m_fxHandleStat));
Shinya Kitaoka 120a6e
  }
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// MeasuredDoubleParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI MeasuredDoubleParamField final
Shinya Kitaoka 120a6e
    : public AnimatedParamField<double, tdoubleparamp=""> {</double,>
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  DVGui::MeasuredDoubleField *m_measuredDoubleField;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  MeasuredDoubleParamField(QWidget *parent, QString name,
Shinya Kitaoka 120a6e
                           const TDoubleParamP ¶m);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  void updateField(double value) override;
Toshihiro Shimizu 890ddd
luz paz f71e6c
  QSize getPreferredSize() override { return QSize(260, 26); }
shun-iwasawa 13c4cf
shun-iwasawa d76928
  void setPrecision(int precision) override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void onChange(bool);
Shinya Kitaoka 120a6e
  void onKeyToggled();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// RangeParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI MeasuredRangeParamField final
Shinya Kitaoka 120a6e
    : public AnimatedParamField<doublepair, trangeparamp=""> {</doublepair,>
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  DVGui::MeasuredDoublePairField *m_valueField;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  MeasuredRangeParamField(QWidget *parent, QString name,
Shinya Kitaoka 120a6e
                          const TRangeParamP ¶m);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  void updateField(DoublePair value) override;
Toshihiro Shimizu 890ddd
luz paz f71e6c
  QSize getPreferredSize() override { return QSize(300, 20); }
Shinya Kitaoka 473e70
  void setPrecision(int precision) override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void onChange(bool);
Shinya Kitaoka 120a6e
  void onKeyToggled();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// PointParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI PointParamField final
Shinya Kitaoka d1f6c4
    : public AnimatedParamField<tpointd, tpointparamp=""> {</tpointd,>
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  DVGui::MeasuredDoubleField *m_xFld, *m_yFld;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  PointParamField(QWidget *parent, QString name, const TPointParamP ¶m);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  void setPointValue(const TPointD &p) override;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  void updateField(TPointD value) override;
Toshihiro Shimizu 890ddd
luz paz f71e6c
  QSize getPreferredSize() override { return QSize(270, 28); }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void onChange(bool);
Shinya Kitaoka 120a6e
  void onKeyToggled();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// PixelParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI PixelParamField final
Shinya Kitaoka 120a6e
    : public AnimatedParamField<tpixel32, tpixelparamp=""> {</tpixel32,>
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  DVGui::ColorField *m_colorField;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  PixelParamField(QWidget *parent, QString name, const TPixelParamP ¶m);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  void updateField(TPixel32 value) override;
Toshihiro Shimizu 890ddd
luz paz f71e6c
  QSize getPreferredSize() override { return QSize(480, 40); }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  /*-- RgbLinkButtonの実行のため --*/
Shinya Kitaoka 120a6e
  TPixel32 getColor();
Shinya Kitaoka 120a6e
  void setColor(TPixel32 value);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  void setParams();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void onChange(const TPixel32 &value, bool isDragging);
Shinya Kitaoka 120a6e
  void onKeyToggled();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// RGB Link Button
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
shun-iwasawa cac18a
class DVAPI RgbLinkButtons final : public QWidget {
Shinya Kitaoka 120a6e
  Q_OBJECT
Shinya Kitaoka 120a6e
  PixelParamField *m_field1, *m_field2;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
shun-iwasawa cac18a
  RgbLinkButtons(QString str1, QString str2, QWidget *parent,
shun-iwasawa cac18a
                 PixelParamField *field1, PixelParamField *field2);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
shun-iwasawa cac18a
  void onCopyButtonClicked();
shun-iwasawa cac18a
  void onSwapButtonClicked();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// SpectrumParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI SpectrumParamField final
Shinya Kitaoka 120a6e
    : public AnimatedParamField<tspectrum, tspectrumparamp=""> {</tspectrum,>
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  DVGui::SpectrumField *m_spectrumField;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  SpectrumParamField(QWidget *parent, QString name,
Shinya Kitaoka 120a6e
                     const TSpectrumParamP ¶m);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  void updateField(TSpectrum value) override;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void setParams();
Toshihiro Shimizu 890ddd
luz paz f71e6c
  QSize getPreferredSize() override { return QSize(477, 60); }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void onKeyToggled();
Shinya Kitaoka 120a6e
  void onChange(bool isDragging);
Shinya Kitaoka 120a6e
  void onKeyAdded(int keyIndex);
Shinya Kitaoka 120a6e
  void onKeyRemoved(int keyIndex);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
shun-iwasawa 6e910b
// Mode Sensitive Box
shun-iwasawa 6e910b
//-----------------------------------------------------------------------------
shun-iwasawa 6e910b
shun-iwasawa 6e910b
class ModeChangerParamField : public ParamField {
shun-iwasawa 6e910b
  Q_OBJECT
shun-iwasawa 6e910b
public:
shun-iwasawa 6e910b
  ModeChangerParamField(QWidget *parent, QString paramName,
shun-iwasawa 6e910b
                        const TParamP ¶m, bool addEmptyLabel = true)
shun-iwasawa 6e910b
      : ParamField(parent, paramName, param, addEmptyLabel) {}
shun-iwasawa 6e910b
signals:
shun-iwasawa 6e910b
  void modeChanged(int);
shun-iwasawa 6e910b
};
shun-iwasawa 6e910b
shun-iwasawa 6e910b
class DVAPI ModeSensitiveBox final : public QWidget {
shun-iwasawa 6e910b
  Q_OBJECT
shun-iwasawa 6e910b
  QList<int> m_modes;</int>
shun-iwasawa 1b1839
  int m_currentMode;
shun-iwasawa 6e910b
shun-iwasawa 6e910b
public:
shun-iwasawa 6e910b
  ModeSensitiveBox(QWidget *parent, ModeChangerParamField *modeChanger,
shun-iwasawa 6e910b
                   QList<int> modes);</int>
shun-iwasawa 1b1839
  ModeSensitiveBox(QWidget *parent, QCheckBox *checkBox);
shun-iwasawa 6e910b
  QList<int> modes() { return m_modes; }</int>
shun-iwasawa 1b1839
  bool isActive() { return m_modes.contains(m_currentMode); }
shun-iwasawa 6e910b
protected slots:
shun-iwasawa 6e910b
  void onModeChanged(int mode);
shun-iwasawa 6e910b
};
shun-iwasawa 6e910b
shun-iwasawa 6e910b
//=============================================================================
Toshihiro Shimizu 890ddd
// EnumParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
shun-iwasawa 6e910b
class EnumParamField final : public ModeChangerParamField {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TIntEnumParamP m_currentParam, m_actualParam;
Shinya Kitaoka 120a6e
  QComboBox *m_om;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  EnumParamField(QWidget *parent, QString name, const TIntEnumParamP ¶m);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 38fd86
  void setParam(const TParamP ¤t, const TParamP &actual,
Shinya Kitaoka 38fd86
                int frame) override;
Shinya Kitaoka 473e70
  void update(int frame) override;
Toshihiro Shimizu 890ddd
luz paz f71e6c
  QSize getPreferredSize() override { return QSize(150, 20); }
Toshihiro Shimizu 890ddd
shun-iwasawa 832993
  int getValue() const;
shun-iwasawa 832993
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void onChange(const QString &str);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// BoolParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
shun-iwasawa 6e910b
class DVAPI BoolParamField final : public ModeChangerParamField {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TBoolParamP m_currentParam, m_actualParam;
Shinya Kitaoka 120a6e
  DVGui::CheckBox *m_checkBox;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  BoolParamField(QWidget *parent, QString name, const TBoolParamP ¶m);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 38fd86
  void setParam(const TParamP ¤t, const TParamP &actual,
Shinya Kitaoka 38fd86
                int frame) override;
Shinya Kitaoka 473e70
  void update(int frame) override;
Toshihiro Shimizu 890ddd
luz paz f71e6c
  QSize getPreferredSize() override { return QSize(20, 15); }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void onToggled(bool checked);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  /*-- visibleToggle UIで使用する --*/
Toshihiro Shimizu 890ddd
signals:
Shinya Kitaoka 120a6e
  void toggled(bool);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// IntParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI IntParamField final : public ParamField {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TIntParamP m_currentParam, m_actualParam;
Shinya Kitaoka 120a6e
  DVGui::IntField *m_intField;
Shinya Kitaoka 120a6e
  typedef IntParamField This;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  IntParamField(QWidget *parent = 0, QString name = 0,
Shinya Kitaoka 120a6e
                const TIntParamP ¶m = 0);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 38fd86
  void setParam(const TParamP ¤t, const TParamP &actual,
Shinya Kitaoka 38fd86
                int frame) override;
Shinya Kitaoka 473e70
  void update(int frame) override;
Toshihiro Shimizu 890ddd
luz paz f71e6c
  QSize getPreferredSize() override { return QSize(50, 19); }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void onChange(bool isDragging = false);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// StringParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
shun-iwasawa 5b2332
namespace component {
shun-iwasawa 5b2332
class MyTextEdit : public QTextEdit {
shun-iwasawa 5b2332
  Q_OBJECT
shun-iwasawa 5b2332
public:
shun-iwasawa 5b2332
  MyTextEdit(const QString &text, QWidget *parent = Q_NULLPTR)
shun-iwasawa 5b2332
      : QTextEdit(text, parent) {}
shun-iwasawa 5b2332
shun-iwasawa 5b2332
protected:
shun-iwasawa 5b2332
  void keyPressEvent(QKeyEvent *event) override;
shun-iwasawa 5b2332
  void focusOutEvent(QFocusEvent *e) override;
shun-iwasawa 5b2332
shun-iwasawa 5b2332
signals:
shun-iwasawa 5b2332
  void edited();
shun-iwasawa 5b2332
};
shun-iwasawa cac18a
};  // namespace component
shun-iwasawa 5b2332
Shinya Kitaoka d1f6c4
class DVAPI StringParamField final : public ParamField {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TStringParamP m_currentParam, m_actualParam;
shun-iwasawa 5b2332
  DVGui::LineEdit *m_textFld            = nullptr;
shun-iwasawa 5b2332
  component::MyTextEdit *m_multiTextFld = nullptr;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  StringParamField(QWidget *parent, QString name, const TStringParamP ¶m);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 38fd86
  void setParam(const TParamP ¤t, const TParamP &actual,
Shinya Kitaoka 38fd86
                int frame) override;
Shinya Kitaoka 473e70
  void update(int frame) override;
Toshihiro Shimizu 890ddd
luz paz f71e6c
  QSize getPreferredSize() override {
shun-iwasawa 5b2332
    if (m_textFld)
shun-iwasawa 5b2332
      return QSize(100, 20);
shun-iwasawa 5b2332
    else
shun-iwasawa 5b2332
      return QSize(100, 80);
shun-iwasawa 5b2332
  }
shun-iwasawa 5b2332
protected slots:
shun-iwasawa 5b2332
  void onChange();
shun-iwasawa 5b2332
};
shun-iwasawa 5b2332
shun-iwasawa 5b2332
//=============================================================================
shun-iwasawa 5b2332
// FontParamField
shun-iwasawa 5b2332
//-----------------------------------------------------------------------------
shun-iwasawa 5b2332
shun-iwasawa 5b2332
class FontParamField final : public ParamField {
shun-iwasawa 5b2332
  Q_OBJECT
shun-iwasawa 5b2332
shun-iwasawa 5b2332
  TFontParamP m_currentParam, m_actualParam;
shun-iwasawa 5b2332
shun-iwasawa 5b2332
  QFontComboBox *m_fontCombo;
shun-iwasawa 5b2332
  QComboBox *m_styleCombo;
shun-iwasawa 5b2332
  DVGui::IntField *m_sizeField;
shun-iwasawa 5b2332
shun-iwasawa 5b2332
public:
shun-iwasawa 5b2332
  FontParamField(QWidget *parent, QString name, const TFontParamP ¶m);
shun-iwasawa 5b2332
shun-iwasawa 5b2332
  void setParam(const TParamP ¤t, const TParamP &actual,
shun-iwasawa 5b2332
                int frame) override;
shun-iwasawa 5b2332
  void update(int frame) override;
shun-iwasawa 5b2332
luz paz f71e6c
  QSize getPreferredSize() override { return QSize(150, 20); }
shun-iwasawa 5b2332
Toshihiro Shimizu 890ddd
protected slots:
shun-iwasawa 5b2332
  void findStyles(const QFont &font);
shun-iwasawa 5b2332
  void onSizeChange(bool);
Shinya Kitaoka 120a6e
  void onChange();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// ToneCurveParamField
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI ToneCurveParamField final
Shinya Kitaoka 120a6e
    : public AnimatedParamField<const qlist<tpointd="">, TToneCurveParamP> {</const>
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  DVGui::ToneCurveField *m_toneCurveField;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  ToneCurveParamField(QWidget *parent, QString name,
Shinya Kitaoka 120a6e
                      const TToneCurveParamP ¶m);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  void updateField(const QList<tpointd> value) override;</tpointd>
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void setParams();
Toshihiro Shimizu 890ddd
luz paz f71e6c
  QSize getPreferredSize() override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void onChannelChanged(int);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void onChange(bool isDragging);
Shinya Kitaoka 120a6e
  void onPointAdded(int index);
Shinya Kitaoka 120a6e
  void onPointRemoved(int index);
Shinya Kitaoka 120a6e
  void onIsLinearChanged(bool);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void onKeyToggled();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
namespace component {
Shinya Kitaoka d1f6c4
class DVAPI LineEdit_double final : public ParamField {
Shinya Kitaoka 120a6e
  Q_OBJECT;  // could not use templates for Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int frame_;
Shinya Kitaoka 120a6e
  TDoubleParamP current_;
Shinya Kitaoka 120a6e
  TDoubleParamP actual_;
Shinya Kitaoka 120a6e
  QLineEdit *value_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  LineEdit_double(QWidget *parent, QString name, TDoubleParamP const ¶m);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 38fd86
  void setParam(TParamP const ¤t, TParamP const &actual,
Shinya Kitaoka 38fd86
                int frame) override;
Shinya Kitaoka 473e70
  void update(int frame) override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void update_value(QString const &text);  // could not use MACROs for slots
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI Slider_double final : public ParamField {
Shinya Kitaoka 120a6e
  Q_OBJECT;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int frame_;
Shinya Kitaoka 120a6e
  TDoubleParamP current_;
Shinya Kitaoka 120a6e
  TDoubleParamP actual_;
Shinya Kitaoka 120a6e
  QSlider *value_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  Slider_double(QWidget *parent, QString name, TDoubleParamP const ¶m);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 38fd86
  void setParam(TParamP const ¤t, TParamP const &actual,
Shinya Kitaoka 38fd86
                int frame) override;
Shinya Kitaoka 473e70
  void update(int frame) override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void update_value(int);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI SpinBox_double final : public ParamField {
Shinya Kitaoka 120a6e
  Q_OBJECT;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int frame_;
Shinya Kitaoka 120a6e
  TDoubleParamP current_;
Shinya Kitaoka 120a6e
  TDoubleParamP actual_;
Shinya Kitaoka 120a6e
  QDoubleSpinBox *value_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  SpinBox_double(QWidget *parent, QString name, TDoubleParamP const ¶m);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 38fd86
  void setParam(TParamP const ¤t, TParamP const &actual,
Shinya Kitaoka 38fd86
                int frame) override;
Shinya Kitaoka 473e70
  void update(int frame) override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void update_value(double);
Toshihiro Shimizu 890ddd
};
shun-iwasawa cac18a
}  // namespace component
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
namespace component {
Shinya Kitaoka d1f6c4
class DVAPI LineEdit_int final : public ParamField {
Shinya Kitaoka 120a6e
  Q_OBJECT;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int frame_;
Shinya Kitaoka 120a6e
  TIntParamP current_;
Shinya Kitaoka 120a6e
  TIntParamP actual_;
Shinya Kitaoka 120a6e
  QLineEdit *value_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  LineEdit_int(QWidget *parent, QString name, TIntParamP const ¶m);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 38fd86
  void setParam(TParamP const ¤t, TParamP const &actual,
Shinya Kitaoka 38fd86
                int frame) override;
Shinya Kitaoka 473e70
  void update(int frame) override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void update_value(QString const &text);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI Slider_int final : public ParamField {
Shinya Kitaoka 120a6e
  Q_OBJECT;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int frame_;
Shinya Kitaoka 120a6e
  TIntParamP current_;
Shinya Kitaoka 120a6e
  TIntParamP actual_;
Shinya Kitaoka 120a6e
  QSlider *value_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  Slider_int(QWidget *parent, QString name, TIntParamP const ¶m);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 38fd86
  void setParam(TParamP const ¤t, TParamP const &actual,
Shinya Kitaoka 38fd86
                int frame) override;
Shinya Kitaoka 473e70
  void update(int frame) override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void update_value(int);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI SpinBox_int final : public ParamField {
Shinya Kitaoka 120a6e
  Q_OBJECT;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int frame_;
Shinya Kitaoka 120a6e
  TIntParamP current_;
Shinya Kitaoka 120a6e
  TIntParamP actual_;
Shinya Kitaoka 120a6e
  QSpinBox *value_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  SpinBox_int(QWidget *parent, QString name, TIntParamP const ¶m);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 38fd86
  void setParam(TParamP const ¤t, TParamP const &actual,
Shinya Kitaoka 38fd86
                int frame) override;
Shinya Kitaoka 473e70
  void update(int frame) override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void update_value(int);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
}  // end of namespace component
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
namespace component {
Shinya Kitaoka d1f6c4
class DVAPI CheckBox_bool final : public ParamField {
Shinya Kitaoka 120a6e
  Q_OBJECT;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int frame_;
Shinya Kitaoka 120a6e
  TBoolParamP current_;
Shinya Kitaoka 120a6e
  TBoolParamP actual_;
Shinya Kitaoka 120a6e
  QCheckBox *value_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  CheckBox_bool(QWidget *parent, QString name, TBoolParamP const ¶m);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 38fd86
  void setParam(TParamP const ¤t, TParamP const &actual,
Shinya Kitaoka 38fd86
                int frame) override;
Shinya Kitaoka 473e70
  void update(int frame) override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void update_value(int);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
}  // end of namespace component
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
namespace component {
Shinya Kitaoka d1f6c4
class DVAPI RadioButton_enum final : public ParamField {
Shinya Kitaoka 120a6e
  Q_OBJECT;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int frame_;
Shinya Kitaoka 120a6e
  TIntEnumParamP current_;
Shinya Kitaoka 120a6e
  TIntEnumParamP actual_;
Shinya Kitaoka 120a6e
  QButtonGroup *value_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  RadioButton_enum(QWidget *parent, QString name, TIntEnumParamP const ¶m);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 38fd86
  void setParam(TParamP const ¤t, TParamP const &actual,
Shinya Kitaoka 38fd86
                int frame) override;
Shinya Kitaoka 473e70
  void update(int frame) override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void update_value(int);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI ComboBox_enum final : public ParamField {
Shinya Kitaoka 120a6e
  Q_OBJECT;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int frame_;
Shinya Kitaoka 120a6e
  TIntEnumParamP current_;
Shinya Kitaoka 120a6e
  TIntEnumParamP actual_;
Shinya Kitaoka 120a6e
  QComboBox *value_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  ComboBox_enum(QWidget *parent, QString name, TIntEnumParamP const ¶m);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 38fd86
  void setParam(TParamP const ¤t, TParamP const &actual,
Shinya Kitaoka 38fd86
                int frame) override;
Shinya Kitaoka 473e70
  void update(int frame) override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void update_value(int);
Toshihiro Shimizu 890ddd
};
Shinya Kitaoka 120a6e
}  // end of namespace component
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
namespace component {
Shinya Kitaoka d1f6c4
class DVAPI LineEdit_string final : public ParamField {
Shinya Kitaoka 120a6e
  Q_OBJECT;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int frame_;
Shinya Kitaoka 120a6e
  TStringParamP current_;
Shinya Kitaoka 120a6e
  TStringParamP actual_;
Shinya Kitaoka 120a6e
  QLineEdit *value_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  LineEdit_string(QWidget *parent, QString name, TStringParamP const ¶m);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 38fd86
  void setParam(TParamP const ¤t, TParamP const &actual,
Shinya Kitaoka 38fd86
                int frame) override;
Shinya Kitaoka 473e70
  void update(int frame) override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void update_value(QString const &);
Toshihiro Shimizu 890ddd
};
Shinya Kitaoka 120a6e
}  // end of namespace component
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifdef __cplusplus
Toshihiro Shimizu 890ddd
extern "C" {
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
#define TOONZ_DECLARE_MAKE_WIDGET(NAME)                                        \
Shinya Kitaoka 120a6e
  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
Shinya Kitaoka 120a6e
#endif  // PARAMFIELD_H