3b7b5f7e73c6cc3b17cf01b81fe5d707a600ac2f
[quassel.git] / core / quassel.h
1 /***************************************************************************
2  *   Copyright (C) 2005 by The Quassel Team                                *
3  *   devel@quassel-irc.org                                                 *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) any later version.                                   *
9  *                                                                         *
10  *   This program is distributed in the hope that it will be useful,       *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  *                                                                         *
15  *   You should have received a copy of the GNU General Public License     *
16  *   along with this program; if not, write to the                         *
17  *   Free Software Foundation, Inc.,                                       *
18  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19  ***************************************************************************/
20
21 #ifndef _QUASSEL_H_
22 #define _QUASSEL_H_
23
24 class Logger;
25
26 #include <QHash>
27 #include <QString>
28
29
30 /**
31  * A static class containing global data.
32  */
33 class Quassel {
34
35   public:
36     static void init();
37     static Logger *getLogger();
38     static void setLogger(Logger *);
39
40 //    static QIcon *getIcon(QString symbol);
41
42   private:
43     static void initIconMap();
44     
45     static Logger *logger;
46
47 //    static QString iconPath;
48     static QHash<QString, QString> iconMap;
49
50 };
51
52 class Exception {
53   public:
54     Exception(QString msg = "Unknown Exception") : _msg(msg) {};
55     virtual inline QString msg() { return _msg; }
56
57   protected:
58     QString _msg;
59
60 };
61
62 #endif