summaryrefslogtreecommitdiffstats
path: root/kdecore/kiconloader_p.h
blob: cc7e7beb35e423d06a8d49b1566e585ddda26555 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/* vi: ts=8 sts=4 sw=4
 *
 * This file is part of the KDE project, module kdecore.
 * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
 *                    Antonio Larrosa <larrosa@kde.org>
 *
 * This is free software; it comes under the GNU Library General
 * Public License, version 2. See the file "COPYING.LIB" for the
 * exact licensing terms.
 */

#ifndef __KIconLoader_p_h_Included__
#define __KIconLoader_p_h_Included__

#include <tqobject.h>
#include <tqstringlist.h>
#include <kicontheme.h>
#include <kiconloader.h>
#include <kiconeffect.h>
#include <tqdict.h>

class KIconThemeNode
{
public:
    KIconThemeNode(KIconTheme *_theme);
    ~KIconThemeNode();

    void queryIcons(TQStringList *lst, int size, KIcon::Context context) const;
    void queryIconsByContext(TQStringList *lst, int size, KIcon::Context context) const;
    KIcon tqfindIcon(const TQString& name, int size, KIcon::MatchType match) const;
    void printTree(TQString& dbgString) const;

    KIconTheme *theme;
};

class KIconLoaderPrivate : public TQObject
{
    Q_OBJECT
public:
    TQStringList mThemesInTree;
    KIconGroup *mpGroups;
    KIconThemeNode *mpThemeRoot;
    KStandardDirs *mpDirs;
    KIconLoader *q;
    KIconEffect mpEffect;
    TQDict<TQImage> imgDict;
    TQImage lastImage; // last loaded image without effect applied
    TQString lastImageKey; // key for icon without effect
    TQString appname;
    int lastIconType; // see KIcon::type
    int lastIconThreshold; // see KIcon::threshold
    TQPtrList<KIconThemeNode> links;
    bool extraDesktopIconsLoaded;
    bool delayedLoading;

public slots:
    void reconfigure();
};

#endif // __KIconLoader_p_h_Included__