Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef FXDATA_H
Toshihiro Shimizu 890ddd
#define FXDATA_H
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// TnzBase includes
Toshihiro Shimizu 890ddd
#include "tfx.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// TnzLib includes
Toshihiro Shimizu 890ddd
#include "toonz/fxcommand.h"
Toshihiro Shimizu 890ddd
#include "toonz/txshcolumn.h"
Toshihiro Shimizu 890ddd
#include "toonz/tcolumnfx.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// TnzQt includes
Toshihiro Shimizu 890ddd
#include "toonzqt/dvmimedata.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// Qt includes
Toshihiro Shimizu 890ddd
#include <qlist></qlist>
Toshihiro Shimizu 890ddd
#include <qpair></qpair>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
using namespace TFxCommand;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//**********************************************************************
Toshihiro Shimizu 890ddd
//    FxsData  declaration
Toshihiro Shimizu 890ddd
//**********************************************************************
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class FxsData final : public DvMimeData {
Shinya Kitaoka 120a6e
  QList<tfxp> m_fxs;</tfxp>
Shinya Kitaoka 120a6e
  QMap<tfx *,="" bool=""> m_visitedFxs;</tfx>
Shinya Kitaoka 120a6e
  QMap<tfx *,="" int=""> m_zeraryFxColumnSize;</tfx>
Shinya Kitaoka 120a6e
  QList<txshcolumnp> m_columns;</txshcolumnp>
Shinya Kitaoka 120a6e
  bool m_connected;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  FxsData();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 473e70
  FxsData *clone() const override;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  //! Set the FxsData. FxsData<-QList<tfxp></tfxp>
Shinya Kitaoka 120a6e
  void setFxs(const QList<tfxp> &selectedFxs, const QList<link> &selectedLinks,</tfxp>
Shinya Kitaoka 120a6e
              const QList<int> &columnIndexes, TXsheet *xsh);</int>
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  //! Get the FxsData. FxsData->QList<tfxp></tfxp>
Shinya Kitaoka 120a6e
  void getFxs(QList<tfxp> &selectedFxs, QMap<tfx *,="" int=""> &zeraryFxColumnSize,</tfx></tfxp>
Shinya Kitaoka 120a6e
              QList<txshcolumnp> &columns) const;</txshcolumnp>
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  //! Return true if copied fxs makes a connected graph.
Shinya Kitaoka 120a6e
  bool isConnected() const { return m_connected; }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Shinya Kitaoka 120a6e
  void checkConnectivity();
Shinya Kitaoka 120a6e
  void visitFx(TFx *fx);
Shinya Kitaoka 120a6e
  bool areLinked(TFx *outFx, TFx *inFx);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
#endif  // FXDATA_H