From b99ff5e5d79924cffe794574cab7c92ad99cc2a2 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Fri, 26 Sep 2008 23:11:15 +0200 Subject: [PATCH 1/1] Add some more wrapper methods in Icon --- src/uisupport/icon.cpp | 15 +++++++++++++++ src/uisupport/icon.h | 5 ++++- 2 files changed, 19 insertions(+), 1 deletion(-) 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 -- 2.20.1