/*	Author:		Magdin Stoica
	Supervisor: Dr. Ryan Leduc
	
	Project created in conformity with the requirements for the Degree of Master of Engineering in Software Engineering, 
	Computing and Software Department, 
	McMaster University
	2003 - 2007
*/

#include "OutputWidget.h"

namespace DESpot
{

//_________________________________________________________________________________________________

OutputWidget::OutputWidget(QWidget* parent) : QTextEdit(parent)
{
}

//_________________________________________________________________________________________________

OutputWidget::~OutputWidget(void)
{
}

//_________________________________________________________________________________________________

void OutputWidget::write(const QString& text)
{
	moveCursor(QTextCursor::End);
	insertHtml(text);
	moveCursor(QTextCursor::End);
}

//_________________________________________________________________________________________________

void OutputWidget::writeLine(const QString& text)
{
	insertHtml(text);
	insertHtml("<br>");
	moveCursor(QTextCursor::End);
}

} //end of namespace DESpot
