|
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>
|
|
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;
|
|
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:
|
|
Shinya Kitaoka |
120a6e |
ToolOptionsBox(QWidget *parent);
|
|
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 |
|
|
Shinya Kitaoka |
120a6e |
enum EnumWidgetType { COMBOBOX = 0, POPUPBUTTON };
|
|
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,
|
|
Shinya Kitaoka |
120a6e |
int propertyGroupIdx = 0, ToolHandle *toolHandle = 0);
|
|
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 |
|
|
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 |
|
|
Shinya Kitaoka |
120a6e |
QStackedWidget *m_mainStackedWidget;
|
|
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 |
QLabel *m_ewPosLabel;
|
|
Shinya Kitaoka |
120a6e |
QLabel *m_nsPosLabel;
|
|
Shinya Kitaoka |
120a6e |
PegbarChannelField *m_zField;
|
|
Shinya Kitaoka |
120a6e |
NoScaleField *m_noScaleZField;
|
|
Shinya Kitaoka |
120a6e |
ToolOptionCheckbox *m_lockEWPosCheckbox;
|
|
Shinya Kitaoka |
120a6e |
ToolOptionCheckbox *m_lockNSPosCheckbox;
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
// SO = Stacked Order
|
|
Shinya Kitaoka |
120a6e |
QLabel *m_soLabel;
|
|
Shinya Kitaoka |
120a6e |
PegbarChannelField *m_soField;
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
// Rotation
|
|
Shinya Kitaoka |
120a6e |
PegbarChannelField *m_rotationField;
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
// Scale
|
|
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
|
|
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
|
|
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 |
|
|
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);
|
|
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 |
|
|
Shinya Kitaoka |
d1f6c4 |
class IconViewField final : public QWidget {
|
|
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:
|
|
Shinya Kitaoka |
120a6e |
void onScaleXValueChanged();
|
|
Shinya Kitaoka |
120a6e |
void onScaleYValueChanged();
|
|
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;
|
|
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:
|
|
Shinya Kitaoka |
120a6e |
void onShapeValueChanged();
|
|
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:
|
|
Shinya Kitaoka |
120a6e |
void onColorModeChanged();
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//=============================================================================
|
|
Toshihiro Shimizu |
890ddd |
//
|
|
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,
|
|
Shinya Kitaoka |
120a6e |
*m_multiFrameMode;
|
|
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:
|
|
Shinya Kitaoka |
120a6e |
void onColorModeChanged();
|
|
Shinya Kitaoka |
120a6e |
void onToolTypeChanged();
|
|
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;
|
|
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;
|
|
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);
|
|
Shinya Kitaoka |
120a6e |
void onToolTypeChanged();
|
|
Shinya Kitaoka |
120a6e |
void onColorModeChanged();
|
|
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:
|
|
Shinya Kitaoka |
120a6e |
void onToolTypeChanged();
|
|
Shinya Kitaoka |
120a6e |
void onToolModeChanged();
|
|
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 |
|
|
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
|