1 /* 2 SPDX-License-Identifier: GPL-2.0-or-later 3 4 SPDX-FileCopyrightText: 2002 Dario Abatianni <eisfuchs@tigress.com> 5 SPDX-FileCopyrightText: 2005-2006 Eike Hein <hein@kde.org> 6 */ 7 8 #ifndef IMAGES_H 9 #define IMAGES_H 10 11 // Qt 12 #include <QIcon> 13 #include <QObject> 14 15 class NickIconSet; 16 17 /** 18 * Do not create an instance of this class yourself. 19 * use KonversationApplication::instance()->images(). 20 */ 21 22 //TODO FIXME what fuck is the above statement supposed to prove? we don't know how to make a singleton? 23 24 class Images : public QObject 25 { 26 Q_OBJECT 27 28 public: 29 enum NickPrivilege 30 { 31 Normal=0, 32 Voice, 33 HalfOp, 34 Op, 35 Owner, 36 Admin, 37 _NickPrivilege_COUNT 38 }; 39 40 Images(); 41 ~Images() override; 42 43 QIcon getLed(const QColor& col, bool state = true) const; 44 45 QIcon getServerLed(bool state) const; 46 QIcon getSystemLed(bool state) const; 47 QIcon getMsgsLed(bool state) const; 48 QIcon getPrivateLed(bool state) const; 49 QIcon getEventsLed() const; 50 QIcon getNickLed() const; 51 QIcon getHighlightsLed() const; 52 53 QIcon getNickIcon(NickPrivilege privilege,bool isAway=false) const; 54 QIcon getNickIconAwayOverlay() const; 55 int getNickIconSize() const; 56 void initializeNickIcons(); 57 58 private: 59 void initializeLeds(); 60 61 private: 62 QIcon m_serverLedOn; 63 QIcon m_serverLedOff; 64 QIcon m_systemLedOn; 65 QIcon m_systemLedOff; 66 QIcon m_msgsLedOn; 67 QIcon m_msgsLedOff; 68 QIcon m_privateLedOn; 69 QIcon m_privateLedOff; 70 QIcon m_eventsLedOn; 71 QIcon m_nickLedOn; 72 QIcon m_highlightsLedOn; 73 74 QColor m_serverColor; 75 QColor m_systemColor; 76 QColor m_msgsColor; 77 QColor m_privateColor; 78 QColor m_eventsColor; 79 QColor m_nickColor; 80 QColor m_highlightsColor; 81 82 QScopedPointer<NickIconSet> nickIconSet; 83 }; 84 #endif 85