Main Page | Class List | File List | Class Members | File Members | Related Pages

logger.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Bojan D.                                        *
00003  *   bojan_d@users.sourceforge.net                                         *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020  
00027 #ifndef LOGGER_H
00028 #define LOGGER_H
00029 
00030 #include <qobject.h>
00031 #include <qtextstream.h>
00032 #include <qfile.h>
00033 
00034 #include "configuration.h"
00035 
00044 class Logger : public QObject
00045 {
00046 Q_OBJECT
00047 public:
00048         
00050     Logger(QObject *parent= 0, const char *name= 0);
00051 
00053     virtual ~Logger();
00054         
00055 public slots:
00061         virtual void print(const QString& text, int type = Configuration::Normal);
00062         
00067         virtual void printDebug(const QString& text);
00068         
00071         virtual void reload();
00072         
00073 private:
00074         QFile           m_file;                 
00075         QTextStream     m_log;                  
00076         
00078         void openFile();
00079 };
00080 
00081 #endif

Generated on Mon Sep 5 12:52:34 2005 for kwebsnap.kdevelop by  doxygen 1.3.9.1