File indexing completed on 2024-04-14 14:20:20
0001 /* This file is part of the KDE libraries 0002 Copyright (C) 2006 Hamish Rodda <rodda@kde.org> 0003 0004 This library is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU Library General Public 0006 License version 2 as published by the Free Software Foundation. 0007 0008 This library is distributed in the hope that it will be useful, 0009 but WITHOUT ANY WARRANTY; without even the implied warranty of 0010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0011 Library General Public License for more details. 0012 0013 You should have received a copy of the GNU Library General Public License 0014 along with this library; see the file COPYING.LIB. If not, write to 0015 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0016 Boston, MA 02110-1301, USA. 0017 */ 0018 0019 #ifndef KICON_H 0020 #define KICON_H 0021 0022 #include <kdelibs4support_export.h> 0023 0024 #ifdef KDELIBS4SUPPORT_NO_DEPRECATED_NOISE 0025 #warning "This file is deprecated." 0026 #endif 0027 0028 #include <QIcon> 0029 0030 class KIconLoader; 0031 class QStringList; 0032 0033 /** 0034 * \short A wrapper around QIcon that provides KDE icon features 0035 * 0036 * KIcon is a convenience class for creating a QIcon with an appropriate 0037 * KIconEngine to perform loading and rendering. KIcons thus adhere to 0038 * KDE style and effect standards. 0039 * 0040 * \sa KIconEngine, KIconLoader, KIconTheme 0041 * 0042 * \author Hamish Rodda <rodda@kde.org> 0043 * 0044 * @deprecated use QIcon::fromTheme 0045 */ 0046 class KDELIBS4SUPPORT_DEPRECATED_EXPORT KIcon : public QIcon 0047 { 0048 public: 0049 /** 0050 * Constructor which takes a kde style icon name, and optionally 0051 * a custom icon loader. 0052 * 0053 * \param iconName The name of the kde icon to load 0054 * \param iconLoader The icon loader to use in loading this icon, or 0055 * null to use the default global icon loader. 0056 * @param overlays A list of overlays to apply to this icon. They are 0057 * loaded from the emblems icons and up to four (one per 0058 * corner) is currently supported 0059 */ 0060 KDELIBS4SUPPORT_DEPRECATED explicit KIcon(const QString &iconName, KIconLoader *iconLoader, 0061 const QStringList &overlays); 0062 0063 /** 0064 * \overload 0065 */ 0066 KDELIBS4SUPPORT_DEPRECATED explicit KIcon(const QString &iconName, KIconLoader *iconLoader); 0067 0068 /** 0069 * \overload 0070 */ 0071 KDELIBS4SUPPORT_DEPRECATED explicit KIcon(const QString &iconName); 0072 0073 /** 0074 * Copy constructor which takes any QIcon. 0075 * 0076 * \param copy the icon to copy. This should have once been a KIcon, 0077 * if you want to preserve KDE icon effects. 0078 */ 0079 KDELIBS4SUPPORT_DEPRECATED explicit KIcon(const QIcon ©); 0080 0081 /** 0082 * Constructor for a null icon. 0083 */ 0084 KIcon(); 0085 0086 /** 0087 * Destroys the icon. 0088 */ 0089 ~KIcon(); 0090 0091 private: 0092 class Private; 0093 Private *const d; 0094 }; 0095 0096 #endif