From: Manuel Nickschas Date: Fri, 26 Sep 2008 21:11:15 +0000 (+0200) Subject: Add some more wrapper methods in Icon X-Git-Tag: 0.3.1~250 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=b99ff5e5d79924cffe794574cab7c92ad99cc2a2;hp=10f9c27ee5d92ece2931947cd341c7f7b548f580 Add some more wrapper methods in Icon --- diff --git a/src/uisupport/icon.cpp b/src/uisupport/icon.cpp index 729a88b2..3694a3a2 100644 --- a/src/uisupport/icon.cpp +++ b/src/uisupport/icon.cpp @@ -21,6 +21,21 @@ #include "icon.h" #include "iconloader.h" +Icon::Icon() : QIcon() { + +} + Icon::Icon(const QString &name) : QIcon() { addPixmap(IconLoader::global()->loadIcon(name, IconLoader::Desktop)); } + +Icon::Icon(const QIcon& copy) : QIcon(copy) { + +} + +Icon& Icon::operator=(const Icon &other) { + if (this != &other) { + QIcon::operator=(other); + } + return *this; +} diff --git a/src/uisupport/icon.h b/src/uisupport/icon.h index 7ca18448..2586f824 100644 --- a/src/uisupport/icon.h +++ b/src/uisupport/icon.h @@ -31,8 +31,11 @@ class Icon : public QIcon { public: - //explicit Icon(); + Icon(); explicit Icon(const QString &iconName); + explicit Icon(const QIcon& copy); + + Icon& operator=(const Icon &other); }; #endif