/***************************************************************************
 * logger.h: definition of Logger class
 *
 * This file is part of KGuitar, a KDE tabulature editor
 *
 * copyright (C) 2006- the KTabEdit development team <mrgwen@gmail.com>
 ***************************************************************************/

/***************************************************************************
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * See the file COPYING for more information.
 ***************************************************************************/

#ifndef LOGGER_H
#define LOGGER_H

#include <QFile>
#include <QTextStream>

class QColor;

namespace ktabedit {
	
	class Logger {
		static bool inst;
		QFile file;
		QTextStream stream;
	public:
		Logger();
		virtual ~Logger();
		
		virtual Logger& operator<<(QChar c);
		virtual Logger& operator<<(char c);
		virtual Logger& operator<<(signed short i);
		virtual Logger& operator<<(unsigned short i);
		virtual Logger& operator<<(signed int i);
		virtual Logger& operator<<(unsigned int i);
		virtual Logger& operator<<(signed long i);
		virtual Logger& operator<<(unsigned long i);
		virtual Logger& operator<<(float f);
		virtual Logger& operator<<(double f);
		virtual Logger& operator<<(const char *s);
		virtual Logger& operator<<(const QString &s);
		virtual Logger& operator<<(void *ptr);
		virtual Logger& operator<<(const QColor &color);
	};
	
	extern Logger ktabLog;
}

#endif
