Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef SCHEMATICVIEWER_H
Toshihiro Shimizu 890ddd
#define SCHEMATICVIEWER_H
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// TnzLib includes
Toshihiro Shimizu 890ddd
#include "toonz/tstageobjectid.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// TnzBase includes
Toshihiro Shimizu 890ddd
#include "tfx.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// Qt includes
Toshihiro Shimizu 890ddd
#include <qgraphicsscene></qgraphicsscene>
Toshihiro Shimizu 890ddd
#include <qgraphicsview></qgraphicsview>
Toshihiro Shimizu 890ddd
manongjohn d6e3cc
#include <qicon></qicon>
manongjohn d6e3cc
Toshihiro Shimizu 890ddd
// STD includes
Toshihiro Shimizu 890ddd
#include <set></set>
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
//====================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//    Forward declarations
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class SchematicNode;
Toshihiro Shimizu 890ddd
class SchematicPort;
Toshihiro Shimizu 890ddd
class SchematicLink;
Toshihiro Shimizu 890ddd
class ToonzScene;
Toshihiro Shimizu 890ddd
class StageSchematicScene;
Toshihiro Shimizu 890ddd
class FxSchematicScene;
Toshihiro Shimizu 890ddd
class TXsheetHandle;
Toshihiro Shimizu 890ddd
class TObjectHandle;
Toshihiro Shimizu 890ddd
class TColumnHandle;
Toshihiro Shimizu 890ddd
class TFxHandle;
Toshihiro Shimizu 890ddd
class TSceneHandle;
Toshihiro Shimizu 890ddd
class TFrameHandle;
Toshihiro Shimizu 890ddd
class TFx;
Toshihiro Shimizu 890ddd
class TLevel;
Toshihiro Shimizu 890ddd
class TSelection;
Toshihiro Shimizu 890ddd
class TApplication;
Toshihiro Shimizu 890ddd
class QToolBar;
Toshihiro Shimizu 890ddd
class QToolButton;
Toshihiro Shimizu 890ddd
class QAction;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//====================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//==================================================================
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
// SchematicScene
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
//==================================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
class DVAPI SchematicScene : public QGraphicsScene {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  SchematicScene(QWidget *parent);
Shinya Kitaoka 120a6e
  ~SchematicScene();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void clearAllItems();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  virtual QGraphicsItem *getCurrentNode() { return 0; }
Shinya Kitaoka 120a6e
  virtual void reorderScene() = 0;
Shinya Kitaoka 120a6e
  virtual void updateScene()  = 0;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  QList<schematiclink *=""> m_highlightedLinks;</schematiclink>
Shinya Kitaoka 120a6e
  enum GridDimension { eLarge, eSmall };
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  //! Returns \b true if no nodes intersects \b rect.
Shinya Kitaoka 120a6e
  bool isAnEmptyZone(const QRectF &rect);
Shinya Kitaoka 120a6e
  //! Returns a vector containing all nodes which had their bounding rects
Shinya Kitaoka 120a6e
  //! conatined in \b node bounding
Shinya Kitaoka 120a6e
  //! rect enlarged of 10.
Shinya Kitaoka 120a6e
  QVector<schematicnode *=""> getPlacedNode(SchematicNode *node);</schematicnode>
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void showEvent(QShowEvent *se);
Shinya Kitaoka 120a6e
  void hideEvent(QHideEvent *se);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  virtual void onSelectionSwitched(TSelection *, TSelection *) {}
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//==================================================================
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
// SchematicSceneViewer
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
//==================================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI SchematicSceneViewer final : public QGraphicsView {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  SchematicSceneViewer(QWidget *parent);
Shinya Kitaoka 120a6e
  ~SchematicSceneViewer();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void zoomQt(bool zoomin, bool resetZoom);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  QPointF getOldScenePos() { return m_oldScenePos; }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 473e70
  void mousePressEvent(QMouseEvent *me) override;
Shinya Kitaoka 473e70
  void mouseMoveEvent(QMouseEvent *me) override;
Shinya Kitaoka 473e70
  void mouseReleaseEvent(QMouseEvent *me) override;
Shinya Kitaoka 473e70
  void keyPressEvent(QKeyEvent *ke) override;
Shinya Kitaoka 473e70
  void wheelEvent(QWheelEvent *me) override;
Shinya Kitaoka 473e70
  void showEvent(QShowEvent *se) override;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void fitScene();
Shinya Kitaoka 120a6e
  void centerOnCurrent();
Shinya Kitaoka 120a6e
  void reorderScene();
Shinya Kitaoka 120a6e
  void normalizeScene();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Shinya Kitaoka 120a6e
  Qt::MouseButton m_buttonState;
Shinya Kitaoka 120a6e
  QPoint m_oldWinPos;
Shinya Kitaoka 120a6e
  QPointF m_oldScenePos;
Shinya Kitaoka 120a6e
  bool m_firstShowing;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Shinya Kitaoka 120a6e
  void changeScale(const QPoint &winPos, qreal scaleFactor);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//==================================================================
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
// SchematicViewer
Toshihiro Shimizu 890ddd
//
Toshihiro Shimizu 890ddd
//==================================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI SchematicViewer final : public QWidget {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
manongjohn d6e3cc
  QColor m_textColor;  // text color (black)
manongjohn d6e3cc
  Q_PROPERTY(QColor TextColor READ getTextColor WRITE setTextColor)
manongjohn d6e3cc
manongjohn d6e3cc
  QColor m_verticalLineColor;
manongjohn d6e3cc
  Q_PROPERTY(QColor VerticalLineColor READ getVerticalLineColor WRITE
manongjohn d6e3cc
                 setVerticalLineColor)
manongjohn d6e3cc
manongjohn d6e3cc
  // TZP column
manongjohn d6e3cc
  QColor m_levelColumnColor;  //(127,219,127)
manongjohn d6e3cc
  Q_PROPERTY(QColor LevelColumnColor READ getLevelColumnColor WRITE
manongjohn d6e3cc
                 setLevelColumnColor)
manongjohn d6e3cc
manongjohn d6e3cc
  // PLI column
manongjohn d6e3cc
  QColor m_vectorColumnColor;  //(212,212,133)
manongjohn d6e3cc
  Q_PROPERTY(QColor VectorColumnColor READ getVectorColumnColor WRITE
manongjohn d6e3cc
                 setVectorColumnColor)
manongjohn d6e3cc
manongjohn d6e3cc
  // subXsheet column
manongjohn d6e3cc
  QColor m_childColumnColor;  //(214,154,219)
manongjohn d6e3cc
  Q_PROPERTY(QColor ChildColumnColor READ getChildColumnColor WRITE
manongjohn d6e3cc
                 setChildColumnColor)
manongjohn d6e3cc
manongjohn d6e3cc
  // Raster image column
manongjohn d6e3cc
  QColor m_fullcolorColumnColor;  //(154,214,219)
manongjohn d6e3cc
  Q_PROPERTY(QColor FullcolorColumnColor READ getFullcolorColumnColor WRITE
manongjohn d6e3cc
                 setFullcolorColumnColor)
manongjohn d6e3cc
manongjohn d6e3cc
  // Fx column
manongjohn d6e3cc
  QColor m_fxColumnColor;  //(130,129,93)
manongjohn d6e3cc
  Q_PROPERTY(QColor FxColumnColor READ getFxColumnColor WRITE setFxColumnColor)
manongjohn d6e3cc
manongjohn d6e3cc
  // Palette column
manongjohn d6e3cc
  QColor m_paletteColumnColor;  //(42,171,154)
manongjohn d6e3cc
  Q_PROPERTY(QColor PaletteColumnColor READ getPaletteColumnColor WRITE
manongjohn d6e3cc
                 setPaletteColumnColor)
manongjohn d6e3cc
manongjohn d6e3cc
  // Mesh column
manongjohn d6e3cc
  QColor m_meshColumnColor;
manongjohn d6e3cc
  Q_PROPERTY(
manongjohn d6e3cc
      QColor MeshColumnColor READ getMeshColumnColor WRITE setMeshColumnColor)
manongjohn d6e3cc
shun-iwasawa 045b61
  // Reference column
shun-iwasawa 045b61
  QColor m_referenceColumnColor;
shun-iwasawa 045b61
  Q_PROPERTY(QColor ReferenceColumnColor MEMBER m_referenceColumnColor)
shun-iwasawa 045b61
manongjohn d6e3cc
  // Table node
manongjohn d6e3cc
  QColor m_tableColor;
manongjohn d6e3cc
  Q_PROPERTY(QColor TableColor READ getTableColor WRITE setTableColor)
manongjohn d6e3cc
manongjohn d6e3cc
  // Camera nodes
manongjohn d6e3cc
  QColor m_activeCameraColor, m_otherCameraColor;
manongjohn d6e3cc
  Q_PROPERTY(QColor ActiveCameraColor READ getActiveCameraColor WRITE
manongjohn d6e3cc
                 setActiveCameraColor)
manongjohn d6e3cc
  Q_PROPERTY(QColor OtherCameraColor READ getOtherCameraColor WRITE
manongjohn d6e3cc
                 setOtherCameraColor)
manongjohn d6e3cc
manongjohn d6e3cc
  // Group node
manongjohn d6e3cc
  QColor m_groupColor;
manongjohn d6e3cc
  Q_PROPERTY(QColor GroupColor READ getGroupColor WRITE setGroupColor)
manongjohn d6e3cc
manongjohn d6e3cc
  // Peg node
manongjohn d6e3cc
  QColor m_pegColor;
manongjohn d6e3cc
  Q_PROPERTY(QColor PegColor READ getPegColor WRITE setPegColor)
manongjohn d6e3cc
manongjohn d6e3cc
  // Path node
manongjohn d6e3cc
  QColor m_splineColor;
manongjohn d6e3cc
  Q_PROPERTY(QColor SplineColor READ getSplineColor WRITE setSplineColor)
manongjohn d6e3cc
manongjohn d6e3cc
  // Output nodes
manongjohn d6e3cc
  QColor m_activeOutputColor, m_otherOutputColor;
manongjohn d6e3cc
  Q_PROPERTY(QColor ActiveOutputColor READ getActiveOutputColor WRITE
manongjohn d6e3cc
                 setActiveOutputColor)
manongjohn d6e3cc
  Q_PROPERTY(QColor OtherOutputColor READ getOtherOutputColor WRITE
manongjohn d6e3cc
                 setOtherOutputColor)
manongjohn d6e3cc
manongjohn d6e3cc
  // Xsheet node
manongjohn d6e3cc
  QColor m_xsheetColor;
manongjohn d6e3cc
  Q_PROPERTY(QColor XsheetColor READ getXsheetColor WRITE setXsheetColor)
manongjohn d6e3cc
manongjohn d6e3cc
  // Fx nodes
manongjohn d6e3cc
  QColor m_normalFx;
manongjohn d6e3cc
  Q_PROPERTY(QColor NormalFxColor READ getNormalFxColor WRITE setNormalFxColor)
manongjohn d6e3cc
manongjohn d6e3cc
  QColor m_macroFx;
manongjohn d6e3cc
  Q_PROPERTY(QColor MacroFxColor READ getMacroFxColor WRITE setMacroFxColor)
manongjohn d6e3cc
manongjohn d6e3cc
  QColor m_imageAdjustFx;
manongjohn d6e3cc
  Q_PROPERTY(QColor ImageAdjustFxColor READ getImageAdjustFxColor WRITE
manongjohn d6e3cc
                 setImageAdjustFxColor)
manongjohn d6e3cc
manongjohn d6e3cc
  QColor m_layerBlendingFx;
manongjohn d6e3cc
  Q_PROPERTY(QColor LayerBlendingFxColor READ getLayerBlendingFxColor WRITE
manongjohn d6e3cc
                 setLayerBlendingFxColor)
manongjohn d6e3cc
manongjohn d6e3cc
  QColor m_matteFx;
manongjohn d6e3cc
  Q_PROPERTY(QColor MatteFxColor READ getMatteFxColor WRITE setMatteFxColor)
manongjohn d6e3cc
manongjohn d6e3cc
  // Schematic Preview Button
manongjohn d6e3cc
  QColor m_schematicPreviewButtonBgOnColor;
manongjohn d6e3cc
  QIcon m_schematicPreviewButtonOnImage;
manongjohn d6e3cc
  QColor m_schematicPreviewButtonBgOffColor;
manongjohn d6e3cc
  QIcon m_schematicPreviewButtonOffImage;
manongjohn d6e3cc
  Q_PROPERTY(QColor SchematicPreviewButtonBgOnColor READ
manongjohn d6e3cc
                 getSchematicPreviewButtonBgOnColor WRITE
manongjohn d6e3cc
                     setSchematicPreviewButtonBgOnColor)
manongjohn d6e3cc
  Q_PROPERTY(
manongjohn d6e3cc
      QIcon SchematicPreviewButtonOnImage READ getSchematicPreviewButtonOnImage
manongjohn d6e3cc
          WRITE setSchematicPreviewButtonOnImage)
manongjohn d6e3cc
  Q_PROPERTY(QColor SchematicPreviewButtonBgOffColor READ
manongjohn d6e3cc
                 getSchematicPreviewButtonBgOffColor WRITE
manongjohn d6e3cc
                     setSchematicPreviewButtonBgOffColor)
manongjohn d6e3cc
  Q_PROPERTY(QIcon SchematicPreviewButtonOffImage READ
manongjohn d6e3cc
                 getSchematicPreviewButtonOffImage WRITE
manongjohn d6e3cc
                     setSchematicPreviewButtonOffImage)
manongjohn d6e3cc
manongjohn d6e3cc
  // Schematic Camstand Button
manongjohn d6e3cc
  QColor m_schematicCamstandButtonBgOnColor;
manongjohn d6e3cc
  QIcon m_schematicCamstandButtonOnImage;
manongjohn d6e3cc
  QIcon m_schematicCamstandButtonTranspImage;
manongjohn d6e3cc
  QColor m_schematicCamstandButtonBgOffColor;
manongjohn d6e3cc
  QIcon m_schematicCamstandButtonOffImage;
manongjohn d6e3cc
  Q_PROPERTY(QColor SchematicCamstandButtonBgOnColor READ
manongjohn d6e3cc
                 getSchematicCamstandButtonBgOnColor WRITE
manongjohn d6e3cc
                     setSchematicCamstandButtonBgOnColor)
manongjohn d6e3cc
  Q_PROPERTY(QIcon SchematicCamstandButtonOnImage READ
manongjohn d6e3cc
                 getSchematicCamstandButtonOnImage WRITE
manongjohn d6e3cc
                     setSchematicCamstandButtonOnImage)
manongjohn d6e3cc
  Q_PROPERTY(QIcon SchematicCamstandButtonTranspImage READ
manongjohn d6e3cc
                 getSchematicCamstandButtonTranspImage WRITE
manongjohn d6e3cc
                     setSchematicCamstandButtonTranspImage)
manongjohn d6e3cc
  Q_PROPERTY(QColor SchematicCamstandButtonBgOffColor READ
manongjohn d6e3cc
                 getSchematicCamstandButtonBgOffColor WRITE
manongjohn d6e3cc
                     setSchematicCamstandButtonBgOffColor)
manongjohn d6e3cc
  Q_PROPERTY(QIcon SchematicCamstandButtonOffImage READ
manongjohn d6e3cc
                 getSchematicCamstandButtonOffImage WRITE
manongjohn d6e3cc
                     setSchematicCamstandButtonOffImage)
manongjohn d6e3cc
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  SchematicViewer(QWidget *parent);
Shinya Kitaoka 120a6e
  ~SchematicViewer();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void setSchematicScene(SchematicScene *scene);
Shinya Kitaoka 120a6e
  void setApplication(TApplication *app);
Shinya Kitaoka 120a6e
  bool isStageSchematicViewed();
Shinya Kitaoka 120a6e
  void setStageSchematicViewed(bool isStageSchematic);
Toshihiro Shimizu 890ddd
manongjohn d6e3cc
  void setTextColor(const QColor &color) { m_textColor = color; }
manongjohn d6e3cc
  QColor getTextColor() const { return m_textColor; }
manongjohn d6e3cc
manongjohn d6e3cc
  void setVerticalLineColor(const QColor &color) {
manongjohn d6e3cc
    m_verticalLineColor = color;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  QColor getVerticalLineColor() const { return m_verticalLineColor; }
manongjohn d6e3cc
manongjohn d6e3cc
  // TZP column
manongjohn d6e3cc
  void setLevelColumnColor(const QColor &color) { m_levelColumnColor = color; }
manongjohn d6e3cc
  QColor getLevelColumnColor() const { return m_levelColumnColor; }
manongjohn d6e3cc
manongjohn d6e3cc
  // PLI column
manongjohn d6e3cc
  void setVectorColumnColor(const QColor &color) {
manongjohn d6e3cc
    m_vectorColumnColor = color;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  QColor getVectorColumnColor() const { return m_vectorColumnColor; }
manongjohn d6e3cc
manongjohn d6e3cc
  // subXsheet column
manongjohn d6e3cc
  void setChildColumnColor(const QColor &color) { m_childColumnColor = color; }
manongjohn d6e3cc
  QColor getChildColumnColor() const { return m_childColumnColor; }
manongjohn d6e3cc
manongjohn d6e3cc
  // Raster image column
manongjohn d6e3cc
  void setFullcolorColumnColor(const QColor &color) {
manongjohn d6e3cc
    m_fullcolorColumnColor = color;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  QColor getFullcolorColumnColor() const { return m_fullcolorColumnColor; }
manongjohn d6e3cc
manongjohn d6e3cc
  // Fx column
manongjohn d6e3cc
  void setFxColumnColor(const QColor &color) { m_fxColumnColor = color; }
manongjohn d6e3cc
  QColor getFxColumnColor() const { return m_fxColumnColor; }
manongjohn d6e3cc
manongjohn d6e3cc
  // Palette column
manongjohn d6e3cc
  void setPaletteColumnColor(const QColor &color) {
manongjohn d6e3cc
    m_paletteColumnColor = color;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  QColor getPaletteColumnColor() const { return m_paletteColumnColor; }
manongjohn d6e3cc
manongjohn d6e3cc
  // Mesh column
manongjohn d6e3cc
  void setMeshColumnColor(const QColor &color) { m_meshColumnColor = color; }
manongjohn d6e3cc
  QColor getMeshColumnColor() const { return m_meshColumnColor; }
manongjohn d6e3cc
shun-iwasawa 045b61
  // Reference column
shun-iwasawa 045b61
  QColor getReferenceColumnColor() const { return m_referenceColumnColor; }
shun-iwasawa 045b61
manongjohn d6e3cc
  // Table node
manongjohn d6e3cc
  void setTableColor(const QColor &color) { m_tableColor = color; }
manongjohn d6e3cc
  QColor getTableColor() const { return m_tableColor; }
manongjohn d6e3cc
manongjohn d6e3cc
  // Camera nodes
manongjohn d6e3cc
  void setActiveCameraColor(const QColor &color) {
manongjohn d6e3cc
    m_activeCameraColor = color;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  void setOtherCameraColor(const QColor &color) { m_otherCameraColor = color; }
manongjohn d6e3cc
  QColor getActiveCameraColor() const { return m_activeCameraColor; }
manongjohn d6e3cc
  QColor getOtherCameraColor() const { return m_otherCameraColor; }
manongjohn d6e3cc
manongjohn d6e3cc
  // Group node
manongjohn d6e3cc
  void setGroupColor(const QColor &color) { m_groupColor = color; }
manongjohn d6e3cc
  QColor getGroupColor() const { return m_groupColor; }
manongjohn d6e3cc
manongjohn d6e3cc
  // Peg node
manongjohn d6e3cc
  void setPegColor(const QColor &color) { m_pegColor = color; }
manongjohn d6e3cc
  QColor getPegColor() const { return m_pegColor; }
manongjohn d6e3cc
manongjohn d6e3cc
  // Path node
manongjohn d6e3cc
  void setSplineColor(const QColor &color) { m_splineColor = color; }
manongjohn d6e3cc
  QColor getSplineColor() const { return m_splineColor; }
manongjohn d6e3cc
manongjohn d6e3cc
  // Output nodes
manongjohn d6e3cc
  void setActiveOutputColor(const QColor &color) {
manongjohn d6e3cc
    m_activeOutputColor = color;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  void setOtherOutputColor(const QColor &color) { m_otherOutputColor = color; }
manongjohn d6e3cc
  QColor getActiveOutputColor() const { return m_activeOutputColor; }
manongjohn d6e3cc
  QColor getOtherOutputColor() const { return m_otherOutputColor; }
manongjohn d6e3cc
manongjohn d6e3cc
  // Xsheet node
manongjohn d6e3cc
  void setXsheetColor(const QColor &color) { m_xsheetColor = color; }
manongjohn d6e3cc
  QColor getXsheetColor() const { return m_xsheetColor; }
manongjohn d6e3cc
manongjohn d6e3cc
  // Fx nodes
manongjohn d6e3cc
  QColor getNormalFxColor() const { return m_normalFx; }
manongjohn d6e3cc
  void setNormalFxColor(const QColor &color) { m_normalFx = color; }
manongjohn d6e3cc
manongjohn d6e3cc
  QColor getMacroFxColor() const { return m_macroFx; }
manongjohn d6e3cc
  void setMacroFxColor(const QColor &color) { m_macroFx = color; }
manongjohn d6e3cc
manongjohn d6e3cc
  QColor getImageAdjustFxColor() const { return m_imageAdjustFx; }
manongjohn d6e3cc
  void setImageAdjustFxColor(const QColor &color) { m_imageAdjustFx = color; }
manongjohn d6e3cc
manongjohn d6e3cc
  QColor getLayerBlendingFxColor() const { return m_layerBlendingFx; }
manongjohn d6e3cc
  void setLayerBlendingFxColor(const QColor &color) {
manongjohn d6e3cc
    m_layerBlendingFx = color;
manongjohn d6e3cc
  }
manongjohn d6e3cc
manongjohn d6e3cc
  QColor getMatteFxColor() const { return m_matteFx; }
manongjohn d6e3cc
  void setMatteFxColor(const QColor &color) { m_matteFx = color; }
manongjohn d6e3cc
manongjohn d6e3cc
  // Schematic Preview Button
manongjohn d6e3cc
  void setSchematicPreviewButtonBgOnColor(const QColor &color) {
manongjohn d6e3cc
    m_schematicPreviewButtonBgOnColor = color;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  void setSchematicPreviewButtonOnImage(const QIcon &image) {
manongjohn d6e3cc
    m_schematicPreviewButtonOnImage = image;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  void setSchematicPreviewButtonBgOffColor(const QColor &color) {
manongjohn d6e3cc
    m_schematicPreviewButtonBgOffColor = color;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  void setSchematicPreviewButtonOffImage(const QIcon &image) {
manongjohn d6e3cc
    m_schematicPreviewButtonOffImage = image;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  QColor getSchematicPreviewButtonBgOnColor() const {
manongjohn d6e3cc
    return m_schematicPreviewButtonBgOnColor;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  QIcon getSchematicPreviewButtonOnImage() const {
manongjohn d6e3cc
    return m_schematicPreviewButtonOnImage;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  QColor getSchematicPreviewButtonBgOffColor() const {
manongjohn d6e3cc
    return m_schematicPreviewButtonBgOffColor;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  QIcon getSchematicPreviewButtonOffImage() const {
manongjohn d6e3cc
    return m_schematicPreviewButtonOffImage;
manongjohn d6e3cc
  }
manongjohn d6e3cc
manongjohn d6e3cc
  // Schematic Camstand Button
manongjohn d6e3cc
  void setSchematicCamstandButtonBgOnColor(const QColor &color) {
manongjohn d6e3cc
    m_schematicCamstandButtonBgOnColor = color;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  void setSchematicCamstandButtonOnImage(const QIcon &image) {
manongjohn d6e3cc
    m_schematicCamstandButtonOnImage = image;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  void setSchematicCamstandButtonTranspImage(const QIcon &image) {
manongjohn d6e3cc
    m_schematicCamstandButtonTranspImage = image;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  void setSchematicCamstandButtonBgOffColor(const QColor &color) {
manongjohn d6e3cc
    m_schematicCamstandButtonBgOffColor = color;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  void setSchematicCamstandButtonOffImage(const QIcon &image) {
manongjohn d6e3cc
    m_schematicCamstandButtonOffImage = image;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  QColor getSchematicCamstandButtonBgOnColor() const {
manongjohn d6e3cc
    return m_schematicCamstandButtonBgOnColor;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  QIcon getSchematicCamstandButtonOnImage() const {
manongjohn d6e3cc
    return m_schematicCamstandButtonOnImage;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  QIcon getSchematicCamstandButtonTranspImage() const {
manongjohn d6e3cc
    return m_schematicCamstandButtonTranspImage;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  QColor getSchematicCamstandButtonBgOffColor() const {
manongjohn d6e3cc
    return m_schematicCamstandButtonBgOffColor;
manongjohn d6e3cc
  }
manongjohn d6e3cc
  QIcon getSchematicCamstandButtonOffImage() const {
manongjohn d6e3cc
    return m_schematicCamstandButtonOffImage;
manongjohn d6e3cc
  }
manongjohn d6e3cc
manongjohn d6e3cc
  void getNodeColor(int ltype, QColor &nodeColor);
manongjohn d6e3cc
manongjohn d6e3cc
  QColor getSelectedNodeTextColor();
manongjohn d6e3cc
Toshihiro Shimizu 890ddd
public slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void updateSchematic();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
signals:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void showPreview(TFxP);
Shinya Kitaoka 120a6e
  void doCollapse(const QList<tfxp> &);</tfxp>
Shinya Kitaoka 120a6e
  void doCollapse(QList<tstageobjectid>);</tstageobjectid>
Shinya Kitaoka 120a6e
  void doExplodeChild(const QList<tfxp> &);</tfxp>
Shinya Kitaoka 120a6e
  void doExplodeChild(QList<tstageobjectid>);</tstageobjectid>
Shinya Kitaoka 120a6e
  void editObject();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void onSceneChanged();
Shinya Kitaoka 120a6e
  void onSceneSwitched();
Shinya Kitaoka 120a6e
  void updateScenes();
Shinya Kitaoka 120a6e
  void changeNodeSize();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Shinya Kitaoka 120a6e
  SchematicSceneViewer *m_viewer;
Shinya Kitaoka 120a6e
  StageSchematicScene *m_stageScene;
Shinya Kitaoka 120a6e
  FxSchematicScene *m_fxScene;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TSceneHandle *m_sceneHandle;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  QToolBar *m_stageToolbar, *m_commonToolbar, *m_fxToolbar, *m_swapToolbar;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  QAction *m_fitSchematic, *m_centerOn, *m_reorder, *m_normalize, *m_nodeSize,
Shinya Kitaoka 120a6e
      *m_changeScene;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  bool m_fullSchematic, m_maximizedNode;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Shinya Kitaoka 120a6e
  void createToolbars();
Shinya Kitaoka 120a6e
  void createActions();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void setStageSchematic();
Shinya Kitaoka 120a6e
  void setFxSchematic();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
#endif  // SCHEMATICVIEWER_H