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
Toshihiro Shimizu 890ddd
class FxsData : public DvMimeData
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	QList<tfxp> m_fxs;</tfxp>
Toshihiro Shimizu 890ddd
	QMap<tfx *,="" bool=""> m_visitedFxs;</tfx>
Toshihiro Shimizu 890ddd
	QMap<tfx *,="" int=""> m_zeraryFxColumnSize;</tfx>
Toshihiro Shimizu 890ddd
	QList<txshcolumnp> m_columns;</txshcolumnp>
Toshihiro Shimizu 890ddd
	bool m_connected;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	FxsData();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	FxsData *clone() const;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	//! Set the FxsData. FxsData<-QList<tfxp></tfxp>
Toshihiro Shimizu 890ddd
	void setFxs(const QList<tfxp> &selectedFxs, const QList<link> &selectedLinks, const QList<int> &columnIndexes, TXsheet *xsh);</int></tfxp>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	//! Get the FxsData. FxsData->QList<tfxp></tfxp>
Toshihiro Shimizu 890ddd
	void getFxs(QList<tfxp> &selectedFxs, QMap<tfx *,="" int=""> &zeraryFxColumnSize, QList<txshcolumnp> &columns) const;</txshcolumnp></tfx></tfxp>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	//! Return true if copied fxs makes a connected graph.
Toshihiro Shimizu 890ddd
	bool isConnected() const { return m_connected; }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Toshihiro Shimizu 890ddd
	void checkConnectivity();
Toshihiro Shimizu 890ddd
	void visitFx(TFx *fx);
Toshihiro Shimizu 890ddd
	bool areLinked(TFx *outFx, TFx *inFx);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif // FXDATA_H