/*
 * This file is part of DesktopBSD, see the README file.
 *
 * Author: Peter Hofer <ph@desktopbsd.net>
 *			(C) 2004, 2005
 *
 * Copyright: BSD, see the COPYING file included in this distribution
 *
 */

#include <terminaldisplay.h>
#include <terminalformatter.h>

/** Installs the TerminalFormatter on a TerminalDisplay */
TerminalFormatter::TerminalFormatter(TerminalDisplay *d, const char *name):
	QObject(d, name)
{
	d->setFormatter(this);
}

/** Removes the TerminalFormatter from the TerminalDisplay when deleted */
TerminalFormatter::~ TerminalFormatter() {
	TerminalDisplay *p = (TerminalDisplay *) parent();
	if(p != NULL)
		p->removeFormatter();
}
