KDELibs4Support

kicon.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2006 Hamish Rodda <[email protected]>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 #ifndef KICON_H
20 #define KICON_H
21 
22 #include <kdelibs4support_export.h>
23 
24 #ifdef KDELIBS4SUPPORT_NO_DEPRECATED_NOISE
25 #warning "This file is deprecated."
26 #endif
27 
28 #include <QIcon>
29 
30 class KIconLoader;
31 class QStringList;
32 
33 /**
34  * \short A wrapper around QIcon that provides KDE icon features
35  *
36  * KIcon is a convenience class for creating a QIcon with an appropriate
37  * KIconEngine to perform loading and rendering. KIcons thus adhere to
38  * KDE style and effect standards.
39  *
40  * \sa KIconEngine, KIconLoader, KIconTheme
41  *
42  * \author Hamish Rodda <[email protected]>
43  *
44  * @deprecated use QIcon::fromTheme
45  */
46 class KDELIBS4SUPPORT_DEPRECATED_EXPORT KIcon : public QIcon
47 {
48 public:
49  /**
50  * Constructor which takes a kde style icon name, and optionally
51  * a custom icon loader.
52  *
53  * \param iconName The name of the kde icon to load
54  * \param iconLoader The icon loader to use in loading this icon, or
55  * null to use the default global icon loader.
56  * @param overlays A list of overlays to apply to this icon. They are
57  * loaded from the emblems icons and up to four (one per
58  * corner) is currently supported
59  */
60  KDELIBS4SUPPORT_DEPRECATED explicit KIcon(const QString &iconName, KIconLoader *iconLoader,
61  const QStringList &overlays);
62 
63  /**
64  * \overload
65  */
66  KDELIBS4SUPPORT_DEPRECATED explicit KIcon(const QString &iconName, KIconLoader *iconLoader);
67 
68  /**
69  * \overload
70  */
71  KDELIBS4SUPPORT_DEPRECATED explicit KIcon(const QString &iconName);
72 
73  /**
74  * Copy constructor which takes any QIcon.
75  *
76  * \param copy the icon to copy. This should have once been a KIcon,
77  * if you want to preserve KDE icon effects.
78  */
79  KDELIBS4SUPPORT_DEPRECATED explicit KIcon(const QIcon &copy);
80 
81  /**
82  * Constructor for a null icon.
83  */
84  KIcon();
85 
86  /**
87  * Destroys the icon.
88  */
89  ~KIcon();
90 
91 private:
92  class Private;
93  Private *const d;
94 };
95 
96 #endif
A wrapper around QIcon that provides KDE icon features.
Definition: kicon.h:46
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon May 17 2021 22:58:44 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.