#include "CentralUI.h"


const int CentralUI::RENDER_INTERVAL = 20;  // ~50FPS

CentralUI::CentralUI( SoftProj &softProj, SummaryTable& dstTable, QWidget *parent ): QObject( parent ), softProj( softProj )
{
	this->centralInfo.setTablePtr( &dstTable ); 
	this->navigationComputer.setTablePtr( &dstTable ); 
	this->quarkGluonKernel.setTablePtr( &dstTable ); 
	this->subspaceBeacon.setTablePtr( &dstTable ); 
	this->inertialDamper.setTablePtr( &dstTable ); 

	this->renderTimer.setInterval( RENDER_INTERVAL );	
	this->renderTimer.start();

	QObject::connect( &this->renderTimer, SIGNAL( timeout(void) ), this,	SLOT( refreshRenderSlot( void ) ));
}

void CentralUI::refreshRenderSlot( void )
{
	this->softProj.run();
}
void CentralUI::setCentralInfo(void)
{
	this->centralInfo.updateTable();
}

void CentralUI::setSubspaceDrive(void)
{

}
