#include "QConsoleCommandAction.h"




void BandingModelPrcessAndQConsoleWidget(ModelProcess* w)
{


}

void OpenQConsoleWidgetFromModelProcess(ModelProcess* w)
{
	// 初始化命令行控制台
	QConsoleWidget* console = new QConsoleWidget();
	console->setModelProcess(w);
}

BandingModelPrcessAndQConsoleWidgetClass::BandingModelPrcessAndQConsoleWidgetClass(QObject* parent)
{
}

BandingModelPrcessAndQConsoleWidgetClass::~BandingModelPrcessAndQConsoleWidgetClass()
{
}

void BandingModelPrcessAndQConsoleWidgetClass::setModelProcess(ModelProcess* modelprocess)
{
	this->modelprocess = modelprocess;
}

void BandingModelPrcessAndQConsoleWidgetClass::setQConsoleWidget(QConsoleWidget* console)
{
	this->console = console;
}

ModelProcess* BandingModelPrcessAndQConsoleWidgetClass::getModelProcess()
{
	return this->modelprocess;
}

QConsoleWidget* BandingModelPrcessAndQConsoleWidgetClass::getQConsoleWidget()
{
	return this->console;
}

ModelProcess* BandingModelPrcessAndQConsoleWidgetClass::createModelProcess()
{
	this->modelprocess=new ModelProcess();
	return this->modelprocess;
}

QConsoleWidget* BandingModelPrcessAndQConsoleWidgetClass::createQConsoleWidget()
{
	this->console = new QConsoleWidget();
	return this->console;
}

void BandingModelPrcessAndQConsoleWidgetClass::bandingModelProcessAndQConsoleWidget()
{
	if (this->console&&this->modelprocess) {
		this->console->setModelProcess(this->modelprocess);
		QObject::connect(this->modelprocess, SIGNAL(OpenCommandWidget(ModelProcess*)), this, SLOT(OpenQConsoleWidgetFromModelProcess(ModelProcess*)));
	}
}

void BandingModelPrcessAndQConsoleWidgetClass::OpenQConsoleWidgetFromModelProcess(ModelProcess* w)
{
	if (this->console && this->modelprocess) {
		this->console->setModelProcess(this->modelprocess);
		//QObject::connect(this->modelprocess, SIGNAL(OpenCommandWidget(ModelProcess*)), this, SLOT(OpenQConsoleWidgetFromModelProcess(ModelProcess*)));
	}

}
