Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef TOOLOPTIONS_H
Toshihiro Shimizu 890ddd
#define TOOLOPTIONS_H
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// TnzQt includes
Toshihiro Shimizu 890ddd
#include "toonzqt/checkbox.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// TnzLib includes
Toshihiro Shimizu 890ddd
#include "toonz/tstageobject.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// TnzCore includes
Toshihiro Shimizu 890ddd
#include "tcommon.h"
Toshihiro Shimizu 890ddd
#include "tproperty.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// Qt includes
Toshihiro Shimizu 890ddd
#include <qframe></qframe>
Toshihiro Shimizu 890ddd
#include <qaction></qaction>
Toshihiro Shimizu 890ddd
#include <qlist></qlist>
Toshihiro Shimizu 890ddd
#include <qtoolbar></qtoolbar>
Toshihiro Shimizu 890ddd
#include <qmap></qmap>
Jeremy Bullock 771290
#include <qlabel></qlabel>
shun-iwasawa 1d5937
#include <qradiobutton></qradiobutton>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// STD includes
Toshihiro Shimizu 890ddd
#include <map></map>
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
//=============================================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//    Forward declarations
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class TTool;
Toshihiro Shimizu 890ddd
class ToolOptionToolBar;
Toshihiro Shimizu 890ddd
class TPropertyGroup;
Toshihiro Shimizu 890ddd
class TPaletteHandle;
Toshihiro Shimizu 890ddd
class TFrameHandle;
Toshihiro Shimizu 890ddd
class TObjectHandle;
Toshihiro Shimizu 890ddd
class TXsheetHandle;
Toshihiro Shimizu 890ddd
class ToolHandle;
Toshihiro Shimizu 890ddd
class SelectionScaleField;
Toshihiro Shimizu 890ddd
class SelectionRotationField;
Toshihiro Shimizu 890ddd
class SelectionMoveField;
Toshihiro Shimizu 890ddd
class ToolOptionSlider;
Toshihiro Shimizu 890ddd
class ToolOptionIntSlider;
Toshihiro Shimizu 890ddd
class ThickChangeField;
Toshihiro Shimizu 890ddd
class ToolOptionCombo;
Toshihiro Shimizu 890ddd
class ToolOptionCheckbox;
Toshihiro Shimizu 890ddd
class PegbarChannelField;
Toshihiro Shimizu 890ddd
class ToolOptionPairSlider;
Toshihiro Shimizu 890ddd
class ToolOptionControl;
Toshihiro Shimizu 890ddd
class ToolOptionPopupButton;
Toshihiro Shimizu 890ddd
class TXshLevelHandle;
Toshihiro Shimizu 890ddd
class NoScaleField;
Toshihiro Shimizu 890ddd
class PegbarCenterField;
Toshihiro Shimizu 890ddd
class RGBLabel;
Toshihiro Shimizu 890ddd
class MeasuredValueField;
Toshihiro Shimizu 890ddd
class PaletteController;
Jeremy Bullock 771290
class ClickableLabel;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class QLabel;
Toshihiro Shimizu 890ddd
class QPushButton;
Toshihiro Shimizu 890ddd
class QPropertyAnimation;
Toshihiro Shimizu 890ddd
class QFrame;
Toshihiro Shimizu 890ddd
class QHBoxLayout;
Toshihiro Shimizu 890ddd
class QComboBox;
Toshihiro Shimizu 890ddd
class QStackedWidget;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// Preprocessor definitions
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#define TOOL_OPTIONS_LEFT_MARGIN 5
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//***********************************************************************************************
Toshihiro Shimizu 890ddd
//    ToolOptionToolBar  declaration
Toshihiro Shimizu 890ddd
//***********************************************************************************************
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class ToolOptionToolBar final : public QToolBar {
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  ToolOptionToolBar(QWidget *parent = 0);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void addSpacing(int width);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//***********************************************************************************************
Toshihiro Shimizu 890ddd
//    ToolOptionsBox  declaration
Toshihiro Shimizu 890ddd
//***********************************************************************************************
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
class ToolOptionsBox : public QFrame {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  QMap<std::string, *="" tooloptioncontrol=""></std::string,>
Shinya Kitaoka 120a6e
      m_controls;  //!< property name -> ToolOptionControl
Shinya Kitaoka 120a6e
  QMap<std::string, *="" qlabel=""> m_labels;</std::string,>
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  QHBoxLayout *m_layout;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Jeremy Bullock 22d9f9
  ToolOptionsBox(QWidget *parent, bool isScrollable = true);
Shinya Kitaoka 120a6e
  ~ToolOptionsBox();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  virtual void
Shinya Kitaoka 120a6e
  updateStatus();  //!< Invokes updateStatus() on all registered controls
Shinya Kitaoka 120a6e
  virtual void onStageObjectChange() {}
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  QHBoxLayout *hLayout() { return m_layout; }
Shinya Kitaoka 120a6e
  void addControl(ToolOptionControl *control);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  ToolOptionControl *control(const std::string &controlName) const;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  QLabel *addLabel(QString name);
Shinya Kitaoka 120a6e
  void addLabel(std::string propName, QLabel *label);
Shinya Kitaoka 120a6e
  void addSeparator();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//***********************************************************************************************
Toshihiro Shimizu 890ddd
//    ToolOptionControlBuilder  declaration
Toshihiro Shimizu 890ddd
//***********************************************************************************************
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class ToolOptionControlBuilder final : public TProperty::Visitor {
Shinya Kitaoka 120a6e
  ToolOptionsBox *m_panel;
Shinya Kitaoka 120a6e
  TTool *m_tool;
Shinya Kitaoka 120a6e
  TPaletteHandle *m_pltHandle;
Shinya Kitaoka 120a6e
  ToolHandle *m_toolHandle;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int m_singleValueWidgetType;
Shinya Kitaoka 120a6e
  int m_enumWidgetType;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  ToolOptionControlBuilder(ToolOptionsBox *panel, TTool *tool,
Shinya Kitaoka 120a6e
                           TPaletteHandle *pltHandle,
Shinya Kitaoka 120a6e
                           ToolHandle *toolHandle = 0);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  enum SingleValueWidgetType { SLIDER = 0, FIELD };
Shinya Kitaoka 120a6e
  void setSingleValueWidgetType(int type) { m_singleValueWidgetType = type; }
Toshihiro Shimizu 890ddd
manongjohn b66bc4
  enum EnumWidgetType { COMBOBOX = 0, POPUPBUTTON, FONTCOMBOBOX };
Shinya Kitaoka 120a6e
  void setEnumWidgetType(int type) { m_enumWidgetType = type; }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Shinya Kitaoka 120a6e
  QHBoxLayout *hLayout() { return m_panel->hLayout(); }
Shinya Kitaoka 120a6e
  QLabel *addLabel(TProperty *p);
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  void visit(TDoubleProperty *p);
Shinya Kitaoka 120a6e
  void visit(TDoublePairProperty *p);
Shinya Kitaoka 120a6e
  void visit(TIntPairProperty *p);
Shinya Kitaoka 120a6e
  void visit(TIntProperty *p);
Shinya Kitaoka 120a6e
  void visit(TBoolProperty *p);
Shinya Kitaoka 120a6e
  void visit(TStringProperty *p);
Shinya Kitaoka 120a6e
  void visit(TEnumProperty *p);
Shinya Kitaoka 120a6e
  void visit(TStyleIndexProperty *p);
Shinya Kitaoka 120a6e
  void visit(TPointerProperty *p);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//***********************************************************************************************
Toshihiro Shimizu 890ddd
//    GenericToolOptionsBox  declaration
Toshihiro Shimizu 890ddd
//***********************************************************************************************
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
class GenericToolOptionsBox : public ToolOptionsBox {
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  GenericToolOptionsBox(QWidget *parent, TTool *tool, TPaletteHandle *pltHandle,
Jeremy Bullock ed3888
                        int propertyGroupIdx = 0, ToolHandle *toolHandle = 0,
Jeremy Bullock ed3888
                        bool scrollable = true);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
// ArrowToolOptionsBox
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class ArrowToolOptionsBox final : public ToolOptionsBox {
Shinya Kitaoka 120a6e
  Q_OBJECT
Shinya Kitaoka 120a6e
shun-iwasawa 59484b
  enum AXIS { Position = 0, Rotation, Scale, Shear, CenterPosition, AllAxis };
shun-iwasawa 59484b
Shinya Kitaoka 120a6e
  TPropertyGroup *m_pg;
Shinya Kitaoka 120a6e
  bool m_splined;
Shinya Kitaoka 120a6e
  TTool *m_tool;
Shinya Kitaoka 120a6e
  TFrameHandle *m_frameHandle;
Shinya Kitaoka 120a6e
  TObjectHandle *m_objHandle;
Shinya Kitaoka 120a6e
  TXsheetHandle *m_xshHandle;
Shinya Kitaoka 120a6e
shun-iwasawa 59484b
  QWidget **m_axisOptionWidgets;
shun-iwasawa 59484b
  QWidget *m_pickWidget;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  // General
Shinya Kitaoka 120a6e
  ToolOptionCombo *m_chooseActiveAxisCombo;
Shinya Kitaoka 120a6e
  ToolOptionCombo *m_pickCombo;
Shinya Kitaoka 120a6e
  // enable to choose the target pegbar from the combobox
Shinya Kitaoka 120a6e
  QComboBox *m_currentStageObjectCombo;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  // Position
Shinya Kitaoka 120a6e
  PegbarChannelField *m_motionPathPosField;
Shinya Kitaoka 120a6e
  PegbarChannelField *m_ewPosField;
Shinya Kitaoka 120a6e
  PegbarChannelField *m_nsPosField;
Shinya Kitaoka 120a6e
  PegbarChannelField *m_zField;
Shinya Kitaoka 120a6e
  NoScaleField *m_noScaleZField;
Jeremy Bullock 771290
  ClickableLabel *m_motionPathPosLabel;
Jeremy Bullock 771290
  ClickableLabel *m_ewPosLabel;
Jeremy Bullock 771290
  ClickableLabel *m_nsPosLabel;
Jeremy Bullock 771290
  ClickableLabel *m_zLabel;
Jeremy Bullock 771290
Shinya Kitaoka 120a6e
  ToolOptionCheckbox *m_lockEWPosCheckbox;
Shinya Kitaoka 120a6e
  ToolOptionCheckbox *m_lockNSPosCheckbox;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  // SO = Stacked Order
Jeremy Bullock 771290
  ClickableLabel *m_soLabel;
Shinya Kitaoka 120a6e
  PegbarChannelField *m_soField;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  // Rotation
Jeremy Bullock 771290
  ClickableLabel *m_rotationLabel;
Shinya Kitaoka 120a6e
  PegbarChannelField *m_rotationField;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  // Scale
Jeremy Bullock 771290
  ClickableLabel *m_globalScaleLabel;
Jeremy Bullock 771290
  ClickableLabel *m_scaleHLabel;
Jeremy Bullock 771290
  ClickableLabel *m_scaleVLabel;
Shinya Kitaoka 120a6e
  PegbarChannelField *m_globalScaleField;
Shinya Kitaoka 120a6e
  PegbarChannelField *m_scaleHField;
Shinya Kitaoka 120a6e
  PegbarChannelField *m_scaleVField;
Shinya Kitaoka 120a6e
  ToolOptionCheckbox *m_lockScaleHCheckbox;
Shinya Kitaoka 120a6e
  ToolOptionCheckbox *m_lockScaleVCheckbox;
Shinya Kitaoka 120a6e
  ToolOptionCombo *m_maintainCombo;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  // Shear
Jeremy Bullock 771290
  ClickableLabel *m_shearHLabel;
Jeremy Bullock 771290
  ClickableLabel *m_shearVLabel;
Shinya Kitaoka 120a6e
  PegbarChannelField *m_shearHField;
Shinya Kitaoka 120a6e
  PegbarChannelField *m_shearVField;
Shinya Kitaoka 120a6e
  ToolOptionCheckbox *m_lockShearHCheckbox;
Shinya Kitaoka 120a6e
  ToolOptionCheckbox *m_lockShearVCheckbox;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  // Center Position
Jeremy Bullock 771290
  ClickableLabel *m_ewCenterLabel;
Jeremy Bullock 771290
  ClickableLabel *m_nsCenterLabel;
Shinya Kitaoka 120a6e
  PegbarCenterField *m_ewCenterField;
Shinya Kitaoka 120a6e
  PegbarCenterField *m_nsCenterField;
Shinya Kitaoka 120a6e
  ToolOptionCheckbox *m_lockEWCenterCheckbox;
Shinya Kitaoka 120a6e
  ToolOptionCheckbox *m_lockNSCenterCheckbox;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  ToolOptionCheckbox *m_globalKey;
Banbury d26acc
shun-iwasawa 59484b
  // enables adjusting value by dragging on the label
shun-iwasawa 59484b
  void connectLabelAndField(ClickableLabel *label, MeasuredValueField *field);
shun-iwasawa 59484b
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  ArrowToolOptionsBox(QWidget *parent, TTool *tool, TPropertyGroup *pg,
Shinya Kitaoka 120a6e
                      TFrameHandle *frameHandle, TObjectHandle *objHandle,
Shinya Kitaoka 120a6e
                      TXsheetHandle *xshHandle, ToolHandle *toolHandle);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void updateStatus();
Shinya Kitaoka 120a6e
  void onStageObjectChange();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  void showEvent(QShowEvent *);
Shinya Kitaoka 120a6e
  void hideEvent(QShowEvent *);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void setSplined(bool on);
Shinya Kitaoka 120a6e
  bool isCurrentObjectSplined() const;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void onFrameSwitched() { updateStatus(); }
Shinya Kitaoka 120a6e
  // update the object list in combobox
Shinya Kitaoka 120a6e
  void updateStageObjectComboItems();
Shinya Kitaoka 120a6e
  // syncronize the current item in the combobox to the selected stage object
Shinya Kitaoka 120a6e
  void syncCurrentStageObjectComboItem();
Shinya Kitaoka 120a6e
  // change the current stage object when user changes it via combobox by hand
Shinya Kitaoka 120a6e
  void onCurrentStageObjectComboActivated(int index);
shun-iwasawa 59484b
shun-iwasawa 59484b
  void onCurrentAxisChanged(int);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
// SelectionToolOptionsBox
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
shun-iwasawa 25d3db
class DraggableIconView : public QWidget {
shun-iwasawa 25d3db
  Q_OBJECT
shun-iwasawa 25d3db
public:
shun-iwasawa 25d3db
  DraggableIconView(QWidget *parent = 0) : QWidget(parent){};
shun-iwasawa 25d3db
shun-iwasawa 25d3db
protected:
shun-iwasawa 25d3db
  // these are used for dragging on the icon to
shun-iwasawa 25d3db
  // change the value of the field
shun-iwasawa 25d3db
  void mousePressEvent(QMouseEvent *) override;
shun-iwasawa 25d3db
  void mouseMoveEvent(QMouseEvent *) override;
shun-iwasawa 25d3db
  void mouseReleaseEvent(QMouseEvent *) override;
shun-iwasawa 25d3db
shun-iwasawa 25d3db
signals:
shun-iwasawa 25d3db
  void onMousePress(QMouseEvent *event);
shun-iwasawa 25d3db
  void onMouseMove(QMouseEvent *event);
shun-iwasawa 25d3db
  void onMouseRelease(QMouseEvent *event);
shun-iwasawa 25d3db
};
shun-iwasawa 25d3db
shun-iwasawa 25d3db
class IconViewField final : public DraggableIconView {
shun-iwasawa c86c5d
  Q_OBJECT
shun-iwasawa c86c5d
shun-iwasawa c86c5d
public:
Shinya Kitaoka d1f6c4
  enum IconType {
shun-iwasawa c86c5d
    Icon_ScalePeg = 0,
shun-iwasawa c86c5d
    Icon_Rotation,
shun-iwasawa c86c5d
    Icon_Position,
shun-iwasawa c86c5d
    Icon_Thickness,
shun-iwasawa c86c5d
    Icon_Amount
shun-iwasawa c86c5d
  };
Shinya Kitaoka d1f6c4
shun-iwasawa c86c5d
private:
shun-iwasawa c86c5d
  IconType m_iconType;
shun-iwasawa c86c5d
shun-iwasawa c86c5d
protected:
shun-iwasawa c86c5d
  QPixmap m_pm[Icon_Amount];
Shinya Kitaoka d1f6c4
  Q_PROPERTY(
Shinya Kitaoka d1f6c4
      QPixmap ScalePegPixmap READ getScalePegPixmap WRITE setScalePegPixmap);
Shinya Kitaoka d1f6c4
  Q_PROPERTY(
Shinya Kitaoka d1f6c4
      QPixmap RotationPixmap READ getRotationPixmap WRITE setRotationPixmap);
Shinya Kitaoka d1f6c4
  Q_PROPERTY(
Shinya Kitaoka d1f6c4
      QPixmap PositionPixmap READ getPositionPixmap WRITE setPositionPixmap);
Shinya Kitaoka d1f6c4
  Q_PROPERTY(
Shinya Kitaoka d1f6c4
      QPixmap ThicknessPixmap READ getThicknessPixmap WRITE setThicknessPixmap);
shun-iwasawa c86c5d
shun-iwasawa c86c5d
public:
shun-iwasawa c86c5d
  IconViewField(QWidget *parent = 0, IconType iconType = Icon_ScalePeg);
shun-iwasawa c86c5d
shun-iwasawa c86c5d
  QPixmap getScalePegPixmap() const { return m_pm[Icon_ScalePeg]; }
Shinya Kitaoka d1f6c4
  void setScalePegPixmap(const QPixmap &pixmap) {
Shinya Kitaoka d1f6c4
    m_pm[Icon_ScalePeg] = pixmap;
Shinya Kitaoka d1f6c4
  }
shun-iwasawa c86c5d
  QPixmap getRotationPixmap() const { return m_pm[Icon_Rotation]; }
Shinya Kitaoka d1f6c4
  void setRotationPixmap(const QPixmap &pixmap) {
Shinya Kitaoka d1f6c4
    m_pm[Icon_Rotation] = pixmap;
Shinya Kitaoka d1f6c4
  }
shun-iwasawa c86c5d
  QPixmap getPositionPixmap() const { return m_pm[Icon_Position]; }
Shinya Kitaoka d1f6c4
  void setPositionPixmap(const QPixmap &pixmap) {
Shinya Kitaoka d1f6c4
    m_pm[Icon_Position] = pixmap;
Shinya Kitaoka d1f6c4
  }
shun-iwasawa c86c5d
  QPixmap getThicknessPixmap() const { return m_pm[Icon_Thickness]; }
Shinya Kitaoka d1f6c4
  void setThicknessPixmap(const QPixmap &pixmap) {
Shinya Kitaoka d1f6c4
    m_pm[Icon_Thickness] = pixmap;
Shinya Kitaoka d1f6c4
  }
shun-iwasawa c86c5d
shun-iwasawa c86c5d
protected:
shun-iwasawa c86c5d
  void paintEvent(QPaintEvent *e);
shun-iwasawa c86c5d
};
shun-iwasawa c86c5d
shun-iwasawa c86c5d
//-----------------------------------------------------------------------------
shun-iwasawa c86c5d
Shinya Kitaoka d1f6c4
class SelectionToolOptionsBox final : public ToolOptionsBox,
Shinya Kitaoka d1f6c4
                                      public TProperty::Listener {
Shinya Kitaoka 120a6e
  Q_OBJECT
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  TTool *m_tool;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  ToolOptionCheckbox *m_setSaveboxCheckbox;
Shinya Kitaoka 120a6e
  bool m_isVectorSelction;
Shinya Kitaoka 120a6e
  QLabel *m_scaleXLabel;
Shinya Kitaoka 120a6e
  SelectionScaleField *m_scaleXField;
Shinya Kitaoka 120a6e
  QLabel *m_scaleYLabel;
Shinya Kitaoka 120a6e
  SelectionScaleField *m_scaleYField;
Shinya Kitaoka 120a6e
  DVGui::CheckBox *m_scaleLink;
Shinya Kitaoka 120a6e
  SelectionRotationField *m_rotationField;
Shinya Kitaoka 120a6e
  QLabel *m_moveXLabel;
Shinya Kitaoka 120a6e
  SelectionMoveField *m_moveXField;
Shinya Kitaoka 120a6e
  QLabel *m_moveYLabel;
Shinya Kitaoka 120a6e
  SelectionMoveField *m_moveYField;
Shinya Kitaoka 120a6e
  ThickChangeField *m_thickChangeField;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  ToolOptionPopupButton *m_capStyle;
Shinya Kitaoka 120a6e
  ToolOptionPopupButton *m_joinStyle;
Shinya Kitaoka 120a6e
  ToolOptionIntSlider *m_miterField;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  SelectionToolOptionsBox(QWidget *parent, TTool *tool,
Shinya Kitaoka 120a6e
                          TPaletteHandle *pltHandle, ToolHandle *toolHandle);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void updateStatus();
Shinya Kitaoka 120a6e
  void onPropertyChanged();
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
protected slots:
Jeremy Bullock 771290
  // addToUndo is only set to false when dragging with the mouse
Jeremy Bullock 771290
  // to set the value.  It is set to true on mouse release.
Jeremy Bullock 771290
  void onScaleXValueChanged(bool addToUndo = true);
Jeremy Bullock 771290
  void onScaleYValueChanged(bool addToUndo = true);
Shinya Kitaoka 120a6e
  void onSetSaveboxCheckboxChanged(bool);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
// GeometricToolOptionsBox
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class GeometricToolOptionsBox final : public ToolOptionsBox {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int m_targetType;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  QLabel *m_poligonSideLabel, *m_hardnessLabel;
Shinya Kitaoka 120a6e
  ToolOptionSlider *m_hardnessField;
Shinya Kitaoka 120a6e
  ToolOptionIntSlider *m_poligonSideField;
Shinya Kitaoka 120a6e
  ToolOptionCombo *m_shapeField;
Shinya Kitaoka 120a6e
  ToolOptionCheckbox *m_pencilMode;
Shinya Kitaoka 120a6e
  ToolOptionIntSlider *m_miterField;
Jeremy Bullock 977232
  ToolOptionCheckbox *m_snapCheckbox;
Jeremy Bullock 977232
  ToolOptionCombo *m_snapSensitivityCombo;
Jeremy Bullock 977232
  TTool *m_tool;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  GeometricToolOptionsBox(QWidget *parent, TTool *tool,
Shinya Kitaoka 120a6e
                          TPaletteHandle *pltHandle, ToolHandle *toolHandle);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
shun-iwasawa 48ed93
  void onShapeValueChanged(int);
Shinya Kitaoka 120a6e
  void onPencilModeToggled(bool);
Shinya Kitaoka 120a6e
  void onJoinStyleChanged(int);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
// TypeToolOptionsBox
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class TypeToolOptionsBox final : public ToolOptionsBox {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TTool *m_tool;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  TypeToolOptionsBox(QWidget *parent, TTool *tool, TPaletteHandle *pltHandle,
Shinya Kitaoka 120a6e
                     ToolHandle *toolHandle);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void onFieldChanged();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
// PaintbrushToolOptionsBox
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class PaintbrushToolOptionsBox final : public ToolOptionsBox {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  ToolOptionCombo *m_colorMode;
Shinya Kitaoka 120a6e
  ToolOptionCheckbox *m_selectiveMode;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  PaintbrushToolOptionsBox(QWidget *parent, TTool *tool,
Shinya Kitaoka 120a6e
                           TPaletteHandle *pltHandle, ToolHandle *toolHandle);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
shun-iwasawa 48ed93
  void onColorModeChanged(int);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
//
shun-iwasawa 14c787
// FullColorFillToolOptionsBox
shun-iwasawa 14c787
//
shun-iwasawa 14c787
//=============================================================================
shun-iwasawa 14c787
shun-iwasawa 14c787
class FullColorFillToolOptionsBox final : public ToolOptionsBox {
shun-iwasawa 14c787
  Q_OBJECT
shun-iwasawa 14c787
shun-iwasawa 14c787
public:
shun-iwasawa 14c787
  FullColorFillToolOptionsBox(QWidget *parent, TTool *tool,
shun-iwasawa 14c787
                              TPaletteHandle *pltHandle,
shun-iwasawa 14c787
                              ToolHandle *toolHandle);
shun-iwasawa 14c787
};
shun-iwasawa 14c787
shun-iwasawa 14c787
//=============================================================================
shun-iwasawa 14c787
//
Toshihiro Shimizu 890ddd
// FillToolOptionsBox
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class FillToolOptionsBox final : public ToolOptionsBox {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int m_targetType;
Shinya Kitaoka 120a6e
  QLabel *m_fillDepthLabel;
Shinya Kitaoka 120a6e
  ToolOptionCombo *m_colorMode, *m_toolType;
Shinya Kitaoka 120a6e
  ToolOptionCheckbox *m_selectiveMode, *m_segmentMode, *m_onionMode,
shun-iwasawa 43640b
      *m_multiFrameMode, *m_autopaintMode;
Shinya Kitaoka 120a6e
  ToolOptionPairSlider *m_fillDepthField;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  FillToolOptionsBox(QWidget *parent, TTool *tool, TPaletteHandle *pltHandle,
Shinya Kitaoka 120a6e
                     ToolHandle *toolHandle);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
shun-iwasawa 48ed93
  void onColorModeChanged(int);
shun-iwasawa 48ed93
  void onToolTypeChanged(int);
Shinya Kitaoka 120a6e
  void onOnionModeToggled(bool);
Shinya Kitaoka 120a6e
  void onMultiFrameModeToggled(bool);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
// BrushToolOptionsBox
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class BrushToolOptionsBox final : public ToolOptionsBox {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TTool *m_tool;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  ToolOptionCheckbox *m_pencilMode;
Shinya Kitaoka 120a6e
  QLabel *m_hardnessLabel;
Shinya Kitaoka 120a6e
  ToolOptionSlider *m_hardnessField;
Shinya Kitaoka 120a6e
  ToolOptionPopupButton *m_joinStyleCombo;
Shinya Kitaoka 120a6e
  ToolOptionIntSlider *m_miterField;
Shinya Kitaoka 120a6e
  ToolOptionCombo *m_presetCombo;
Jeremy Bullock cd00fd
  ToolOptionCheckbox *m_snapCheckbox;
Jeremy Bullock cd00fd
  ToolOptionCombo *m_snapSensitivityCombo;
Shinya Kitaoka 120a6e
  QPushButton *m_addPresetButton;
Shinya Kitaoka 120a6e
  QPushButton *m_removePresetButton;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Shinya Kitaoka 120a6e
  class PresetNamePopup;
Shinya Kitaoka 120a6e
  PresetNamePopup *m_presetNamePopup;
bf1d82
  void filterControls();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  BrushToolOptionsBox(QWidget *parent, TTool *tool, TPaletteHandle *pltHandle,
Shinya Kitaoka 120a6e
                      ToolHandle *toolHandle);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void onPencilModeToggled(bool);
Shinya Kitaoka 120a6e
  void onAddPreset();
Shinya Kitaoka 120a6e
  void onRemovePreset();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
// EraserToolOptionsBox
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class EraserToolOptionsBox final : public ToolOptionsBox {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  ToolOptionCheckbox *m_pencilMode, *m_invertMode, *m_multiFrameMode;
Shinya Kitaoka 120a6e
  ToolOptionCombo *m_toolType, *m_colorMode;
Shinya Kitaoka 120a6e
  QLabel *m_hardnessLabel;
Shinya Kitaoka 120a6e
  ToolOptionSlider *m_hardnessField;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  EraserToolOptionsBox(QWidget *parent, TTool *tool, TPaletteHandle *pltHandle,
Shinya Kitaoka 120a6e
                       ToolHandle *toolHandle);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void onPencilModeToggled(bool);
shun-iwasawa 48ed93
  void onToolTypeChanged(int);
shun-iwasawa 48ed93
  void onColorModeChanged(int);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
// RulerToolOptionsBox
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class RulerToolOptionsBox final : public ToolOptionsBox {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  MeasuredValueField *m_Xfld;
Shinya Kitaoka 120a6e
  MeasuredValueField *m_Yfld;
Shinya Kitaoka 120a6e
  MeasuredValueField *m_Wfld;
Shinya Kitaoka 120a6e
  MeasuredValueField *m_Hfld;
Shinya Kitaoka 120a6e
  MeasuredValueField *m_Afld;
Shinya Kitaoka 120a6e
  MeasuredValueField *m_Lfld;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  QLabel *m_XpixelFld;
Shinya Kitaoka 120a6e
  QLabel *m_YpixelFld;
Shinya Kitaoka 120a6e
  QLabel *m_WpixelFld;
Shinya Kitaoka 120a6e
  QLabel *m_HpixelFld;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TTool *m_tool;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  RulerToolOptionsBox(QWidget *parent, TTool *tool);
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  void updateValues(bool isRasterLevelEditing, double X, double Y, double W,
Shinya Kitaoka 120a6e
                    double H, double A, double L, int Xpix = 0, int Ypix = 0,
Shinya Kitaoka 120a6e
                    int Wpix = 0, int Hpix = 0);
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  void resetValues();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
// TapeToolOptionsBox
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class TapeToolOptionsBox final : public ToolOptionsBox {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  ToolOptionCheckbox *m_smoothMode, *m_joinStrokesMode;
Shinya Kitaoka 120a6e
  ToolOptionCombo *m_toolMode, *m_typeMode;
Shinya Kitaoka 120a6e
  QLabel *m_autocloseLabel;
Shinya Kitaoka 120a6e
  ToolOptionSlider *m_autocloseField;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  TapeToolOptionsBox(QWidget *parent, TTool *tool, TPaletteHandle *pltHandle,
Shinya Kitaoka 120a6e
                     ToolHandle *toolHandle);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void updateStatus();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
shun-iwasawa 48ed93
  void onToolTypeChanged(int);
shun-iwasawa 48ed93
  void onToolModeChanged(int);
Shinya Kitaoka 120a6e
  void onJoinStrokesModeChanged();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
// RGBPickerToolOptionsBox
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class RGBPickerToolOptionsBox final : public ToolOptionsBox {
Shinya Kitaoka 120a6e
  Q_OBJECT
Shinya Kitaoka 120a6e
  ToolOptionCheckbox *m_realTimePickMode;
Shinya Kitaoka 120a6e
  // label with background color
Shinya Kitaoka 120a6e
  RGBLabel *m_currentRGBLabel;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  RGBPickerToolOptionsBox(QWidget *parent, TTool *tool,
Shinya Kitaoka 120a6e
                          TPaletteHandle *pltHandle, ToolHandle *toolHandle,
Shinya Kitaoka 120a6e
                          PaletteController *paletteController);
Shinya Kitaoka 120a6e
  void updateStatus();
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void updateRealTimePickLabel(const QColor &);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
// StylePickerToolOptionsBox
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class StylePickerToolOptionsBox final : public ToolOptionsBox {
Shinya Kitaoka 120a6e
  Q_OBJECT
Shinya Kitaoka 120a6e
  ToolOptionCheckbox *m_realTimePickMode;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  QLabel *m_currentStyleLabel;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  StylePickerToolOptionsBox(QWidget *parent, TTool *tool,
Shinya Kitaoka 120a6e
                            TPaletteHandle *pltHandle, ToolHandle *toolHandle,
Shinya Kitaoka 120a6e
                            PaletteController *paletteController);
Shinya Kitaoka 120a6e
  void updateStatus();
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void updateRealTimePickLabel(const int, const int, const int);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
shun-iwasawa 2b24e8
//=============================================================================
shun-iwasawa 2b24e8
//
shun-iwasawa 2b24e8
// ShiftTraceToolOptionBox
shun-iwasawa 2b24e8
// shown only when "Edit Shift" mode is active
shun-iwasawa 2b24e8
//
shun-iwasawa 2b24e8
//=============================================================================
shun-iwasawa 2b24e8
shun-iwasawa 2b24e8
class ShiftTraceToolOptionBox final : public ToolOptionsBox {
shun-iwasawa 2b24e8
  Q_OBJECT
shun-iwasawa 1d5937
  QFrame *m_prevFrame, *m_afterFrame;
shun-iwasawa 1d5937
  QRadioButton *m_prevRadioBtn, *m_afterRadioBtn;
shun-iwasawa 1d5937
  QPushButton *m_resetPrevGhostBtn, *m_resetAfterGhostBtn;
shun-iwasawa 1d5937
  TTool *m_tool;
shun-iwasawa 2b24e8
  void resetGhost(int index);
shun-iwasawa 2b24e8
shun-iwasawa 1d5937
protected:
shun-iwasawa 1d5937
  void showEvent(QShowEvent *);
shun-iwasawa 1d5937
  void hideEvent(QShowEvent *);
shun-iwasawa 1d5937
shun-iwasawa 2b24e8
public:
shun-iwasawa 1d5937
  ShiftTraceToolOptionBox(QWidget *parent = 0, TTool *tool = 0);
shun-iwasawa 1d5937
  void updateStatus() override;
shun-iwasawa 2b24e8
protected slots:
shun-iwasawa 2b24e8
  void onResetPrevGhostBtnPressed();
shun-iwasawa 2b24e8
  void onResetAfterGhostBtnPressed();
shun-iwasawa 1d5937
  void onPrevRadioBtnClicked();
shun-iwasawa 1d5937
  void onAfterRadioBtnClicked();
shun-iwasawa 1d5937
  void updateColors();
shun-iwasawa 2b24e8
};
shun-iwasawa 2b24e8
manongjohn 4f0f61
//=============================================================================
manongjohn 4f0f61
//
manongjohn 4f0f61
// ZoomToolOptionsBox
manongjohn 4f0f61
//
manongjohn 4f0f61
//=============================================================================
manongjohn 4f0f61
manongjohn 4f0f61
class ZoomToolOptionsBox final : public ToolOptionsBox {
manongjohn 4f0f61
  Q_OBJECT
manongjohn 4f0f61
manongjohn 4f0f61
public:
manongjohn 4f0f61
  ZoomToolOptionsBox(QWidget *parent, TTool *tool, TPaletteHandle *pltHandle,
manongjohn 4f0f61
                     ToolHandle *toolHandle);
manongjohn 4f0f61
};
manongjohn 4f0f61
manongjohn 4f0f61
//=============================================================================
manongjohn 4f0f61
//
manongjohn 4f0f61
// RotateToolOptionsBox
manongjohn 4f0f61
//
manongjohn 4f0f61
//=============================================================================
manongjohn 4f0f61
manongjohn 4f0f61
class RotateToolOptionsBox final : public ToolOptionsBox {
manongjohn 4f0f61
  Q_OBJECT
manongjohn 4f0f61
manongjohn 4f0f61
public:
manongjohn 4f0f61
  RotateToolOptionsBox(QWidget *parent, TTool *tool, TPaletteHandle *pltHandle,
manongjohn 4f0f61
                       ToolHandle *toolHandle);
manongjohn 4f0f61
};
manongjohn 4f0f61
manongjohn 4f0f61
//=============================================================================
manongjohn 4f0f61
//
manongjohn 4f0f61
// HandToolOptionsBox
manongjohn 4f0f61
//
manongjohn 4f0f61
//=============================================================================
manongjohn 4f0f61
manongjohn 4f0f61
class HandToolOptionsBox final : public ToolOptionsBox {
manongjohn 4f0f61
  Q_OBJECT
manongjohn 4f0f61
manongjohn 4f0f61
public:
manongjohn 4f0f61
  HandToolOptionsBox(QWidget *parent, TTool *tool, TPaletteHandle *pltHandle,
manongjohn 4f0f61
                     ToolHandle *toolHandle);
manongjohn 4f0f61
};
manongjohn 4f0f61
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI ToolOptions final : public QFrame {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int m_width, m_height;
Shinya Kitaoka 120a6e
  std::map<ttool *="" *,="" tooloptionsbox=""> m_panels;</ttool>
Shinya Kitaoka 120a6e
  QWidget *m_panel;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  ToolOptions();
Shinya Kitaoka 120a6e
  ~ToolOptions();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  QWidget *getPanel() const { return m_panel; }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  void showEvent(QShowEvent *);
Shinya Kitaoka 120a6e
  void hideEvent(QShowEvent *);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void onToolSwitched();
Shinya Kitaoka 120a6e
  void onToolChanged();
Shinya Kitaoka 120a6e
  void onStageObjectChange();
Toshihiro Shimizu 890ddd
shun_iwasawa 4635d8
signals:
shun_iwasawa 4635d8
  // used in ComboViewer to handle Tab focus
shun_iwasawa 4635d8
  void newPanelCreated();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  //  void toolOptionChange();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
#endif  // PANE_H