From 1474ed7cbcb39e05401a76a0db85f4460a8f2a33 Mon Sep 17 00:00:00 2001 From: Davide Bettio Date: Sun, 27 Apr 2008 13:37:53 +0000 Subject: [PATCH] API REVIEW: color() --> die svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801697 --- applet.cpp | 32 -------------------------------- applet.h | 5 ----- 2 files changed, 37 deletions(-) diff --git a/applet.cpp b/applet.cpp index 32e501063..959a20902 100644 --- a/applet.cpp +++ b/applet.cpp @@ -999,38 +999,6 @@ QList Applet::contextualActions() return d->script ? d->script->contextualActions() : QList(); } -QColor Applet::color() const -{ - // TODO: add more colors for more categories and - // maybe read from config? - QString c = category(); - int alpha = 200; - // Colors taken from Oxygen color palette - if (c == "Date and Time") { - return QColor(191, 94, 0, alpha); - } else if (c == "Environment & Weather") { - return QColor(191, 0, 0, alpha); - } else if (c == "Examples") { - return QColor(204, 0, 154, alpha); - } else if (c == "File System") { - return QColor(90, 0, 179, alpha); - } else if (c == "Graphics") { - return QColor(0, 0, 255, alpha); - } else if (c == "Language") { - return QColor(0, 191, 0, alpha); - } else if (c == "Mapping") { - return QColor(191, 245, 0, alpha); - } else if (c == "Online Services") { - return QColor(255, 213, 0, alpha); - } else if (c == "System Information") { - return QColor(0, 196, 204, alpha); - } else if (c == "Windows and Tasks") { - return QColor(255, 126, 0, alpha); - } else { - return QColor(136, 136, 136, alpha); - } -} - void Applet::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { if (d->shadow && d->shadow->shadowedSize() != boundingRect().size()) { diff --git a/applet.h b/applet.h index 9daab6714..82708ca79 100644 --- a/applet.h +++ b/applet.h @@ -377,11 +377,6 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget */ QString category() const; - /** - * Returns the color corresponding to the applet's category. - */ - QColor color() const; - /** * @return The type of immutability of this applet */