source: psi/trunk/src/psiiconset.h@ 76

Last change on this file since 76 was 2, checked in by dmik, 19 years ago

Imported original Psi 0.10 sources from Affinix

File size: 2.2 KB
Line 
1/*
2 * psiiconset.h - the Psi iconset class
3 * Copyright (C) 2001-2003 Justin Karneges, Michail Pishchagin
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (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 library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 */
20
21#ifndef PSIICONSET_H
22#define PSIICONSET_H
23
24#include <qptrlist.h>
25#include <qmap.h>
26
27#include "iconset.h"
28#include "im.h"
29
30class PsiEvent;
31class UserListItem;
32struct Options;
33
34class PsiIconset
35{
36public:
37 PsiIconset();
38 ~PsiIconset();
39
40 bool loadSystem();
41 bool loadAll();
42
43 bool optionsChanged(const Options *old); // returns 'true' if Psi needs to be restarted
44
45 QDict<Iconset> roster;
46 QPtrList<Iconset> emoticons;
47 const Iconset &system() const;
48 void stripFirstAnimFrame(Iconset *);
49 static void removeAnimation(Iconset *);
50
51 Icon *event2icon(PsiEvent *);
52
53 // these two can possibly fail (and return 0)
54 Icon *statusPtr(int);
55 Icon *statusPtr(const XMPP::Status &);
56
57 // these two return empty Icon on failure and are safe
58 Icon status(int);
59 Icon status(const XMPP::Status &);
60
61 // JID-enabled status functions
62 Icon *statusPtr(const XMPP::Jid &, int);
63 Icon *statusPtr(const XMPP::Jid &, const XMPP::Status &);
64
65 Icon status(const XMPP::Jid &, int);
66 Icon status(const XMPP::Jid &, const XMPP::Status &);
67
68 // functions to get status icon by transport name
69 Icon *transportStatusPtr(QString name, int);
70 Icon *transportStatusPtr(QString name, const XMPP::Status &);
71
72 Icon transportStatus(QString name, int);
73 Icon transportStatus(QString name, const XMPP::Status &);
74
75 Icon *statusPtr(UserListItem *);
76 Icon status(UserListItem *);
77
78private:
79 class Private;
80 Private *d;
81};
82
83#endif
Note: See TracBrowser for help on using the repository browser.