KDEUI
kicon.cpp
Go to the documentation of this file.
00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2006 Hamish Rodda <rodda@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License version 2 as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00016 Boston, MA 02110-1301, USA. 00017 */ 00018 00019 #include "kicon.h" 00020 00021 #include <kglobal.h> 00022 00023 #include "kiconloader.h" 00024 #include "kiconengine_p.h" 00025 00026 KIcon::KIcon(const QString& iconName, KIconLoader* iconLoader, const QStringList &overlays) 00027 : QIcon(new KIconEngine(iconName, iconLoader ? iconLoader : KIconLoader::global(), overlays)), 00028 d(0) 00029 { 00030 } 00031 00032 KIcon::KIcon(const QString& iconName, KIconLoader* iconLoader) 00033 : QIcon(new KIconEngine(iconName, iconLoader ? iconLoader : KIconLoader::global())), 00034 d(0) 00035 { 00036 } 00037 00038 KIcon::KIcon(const QString& iconName) 00039 : QIcon(new KIconEngine(iconName, KIconLoader::global())), 00040 d(0) 00041 { 00042 } 00043 00044 KIcon::KIcon() 00045 : d(0) 00046 { 00047 } 00048 00049 KIcon::KIcon(const QIcon& copy) 00050 : QIcon(copy), 00051 d(0) 00052 { 00053 } 00054 00055 KIcon::~KIcon() 00056 { 00057 //delete d; 00058 } 00059 00060 KIcon& KIcon::operator=( const KIcon &other ) 00061 { 00062 if (this != &other) { 00063 // copy d-pointer 00064 QIcon::operator=(other); 00065 } 00066 00067 return *this; 00068 }
KDE 4.6 API Reference