KVIrc  4.9.2
DeveloperAPIs
Public Types | Public Slots | Public Member Functions | Protected Slots | Protected Member Functions | Private Attributes | List of all members
KviIconManager Class Reference

This class manages the images used by KVIrc. More...

#include <KviIconManager.h>

+ Inheritance diagram for KviIconManager:

Public Types

enum  SmallIcon {
  None = 0, Close = 1, History = 2, HistoryOff = 3,
  UserMode = 4, DefaultIcon = 5, Dock = 6, UnDock = 7,
  QuitApp = 8, Console = 9, Save = 10, ParserError = 11,
  ParserWarning = 12, Server = 13, World = 14, Proxy = 15,
  KVIrc = 16, Cut = 17, Copy = 18, Paste = 19,
  Options = 20, SocketMessage = 21, SocketWarning = 22, SocketError = 23,
  SystemError = 24, Raw = 25, SystemWarning = 26, SystemMessage = 27,
  UnHandled = 28, ServerInfo = 29, Motd = 30, Channel = 31,
  HideDoubleView = 32, ShowDoubleView = 33, Op = 34, Voice = 35,
  ServerPing = 36, ShowListView = 37, HideListView = 38, Join = 39,
  Part = 40, Unrecognized = 41, Topic = 42, Accept = 43,
  Discard = 44, OwnPrivMsg = 45, ChanPrivMsg = 46, Query = 47,
  QueryPrivMsg = 48, Help = 49, QuestionMark = 50, CtcpReply = 51,
  CtcpRequestReplied = 52, CtcpRequestIgnored = 53, CtcpRequestFlood = 54, CtcpRequestUnknown = 55,
  Action = 56, Avatar = 57, Quit = 58, Split = 59,
  QuitSplit = 60, Nick = 61, DeOp = 62, DeVoice = 63,
  Mode = 64, Key = 65, Limit = 66, Ban = 67,
  UnBan = 68, BanExcept = 69, BanUnExcept = 70, InviteExcept = 71,
  InviteUnExcept = 72, ChanMode = 73, ChanModeHide = 74, Who = 75,
  Editor = 76, DccRequest = 77, DccMsg = 78, DccError = 79,
  IconManager = 80, ScriptCenter = 81, Bomb = 82, Event = 83,
  EventNoHandlers = 84, Handler = 85, HandlerDisabled = 86, NickNameProblem = 87,
  WhoisUser = 88, WhoisChannels = 89, WhoisIdle = 90, WhoisServer = 91,
  WhoisOther = 92, Time = 93, NotifyOnLine = 94, NotifyOffLine = 95,
  Locked = 96, UnLocked = 97, LockedOff = 98, UnLockedOff = 99,
  OwnPrivMsgCrypted = 100, ChanPrivMsgCrypted = 101, QueryPrivMsgCrypted = 102, DccChatMsg = 103,
  DccChatMsgCrypted = 104, Irc = 105, Folder = 106, Home = 107,
  BookMarks = 108, Spy = 109, Kick = 110, Linux = 111,
  Links = 112, RegUsers = 113, TrayIcon = 114, UnsetMode = 115,
  Favorite = 116, Toolbar = 117, ServerFavorite = 118, Log = 119,
  Remove = 120, File = 121, Icq = 122, IcqYellow = 123,
  IcqRed = 124, IcqBlue = 125, IcqLightGreen = 126, IcqLightYellow = 127,
  Message = 128, MessageSent = 129, BlueSquare = 130, VioletSquare = 131,
  YellowSquare = 132, GreenSquare = 133, BlackSquare = 134, RedSquare = 135,
  CyanSquare = 136, DarkGreenSquare = 137, Terminal = 138, WallOps = 139,
  Invisible = 140, ServerNotice = 141, Gnutella = 142, Search = 143,
  Files = 144, NewNetwork = 145, Package = 146, NewServer = 147,
  Idea = 148, Colors = 149, Gui = 150, IrcView = 151,
  Alias = 152, ChannelNotice = 153, ChannelNoticeCrypted = 154, QueryNotice = 155,
  QueryNoticeCrypted = 156, MenuBar = 157, Popup = 158, Prologue = 159,
  Epilogue = 160, SharedFiles = 161, CtcpReplyUnknown = 162, Canvas = 163,
  NickServ = 164, ChanServ = 165, DccVoice = 166, Play = 167,
  Record = 168, KickOff = 169, Away = 170, Ident = 171,
  HomePage = 172, List = 173, HalfOp = 174, HalfDeOp = 175,
  Invite = 176, MultiMedia = 177, User = 178, Input = 179,
  Messages = 180, QueryTrace = 181, NoChannel = 182, BroadcastPrivMsg = 183,
  BroadcastNotice = 184, Url = 185, RawEvent = 186, RawEventNoHandlers = 187,
  MeKick = 188, MeOp = 189, MeVoice = 190, MeDeOp = 191,
  MeDeVoice = 192, MeHalfOp = 193, MeDeHalfOp = 194, MeBan = 195,
  MeUnBan = 196, MeBanExcept = 197, MeBanUnExcept = 198, MeInviteExcept = 199,
  MeInviteUnExcept = 200, ClassicWindowList = 201, TreeWindowList = 202, Ignore = 203,
  UserList = 204, Stats = 205, PopupMenu = 206, ServerConfiguration = 207,
  Irc0 = 208, Irc1 = 209, Irc2 = 210, Irc3 = 211,
  Irc4 = 212, Irc5 = 213, Heart = 214, HeartBroken = 215,
  Rose = 216, BigGrin = 217, BigGrinGlasses = 218, BigGrinEyes = 219,
  TextExclamative = 220, TextPoints = 221, Kiss = 222, Surprised1 = 223,
  Ugly = 224, Angry = 225, Surprised2 = 226, Smile = 227,
  Tongue = 228, Ssl = 229, Cry = 230, Eye = 231,
  DeadChannel = 232, DeadQuery = 233, Sound = 234, ToolBarEditor = 235,
  TextEncoding = 236, NewItem = 237, NewItemByWizard = 238, DeleteItem = 239,
  EditItem = 240, FileTransfer = 241, ChanAdmin = 242, ChanUnAdmin = 243,
  MeChanAdmin = 244, MeChanUnAdmin = 245, UserOp = 246, DeUserOp = 247,
  MeUserOp = 248, MeDeUserOp = 249, Applet = 250, Spam = 251,
  Transparent = 252, Notifier = 253, UserWindow = 254, StatusBar = 255,
  NotAway = 256, Plus = 257, Minus = 258, BinaryText = 259,
  ChanOwner = 260, ChanUnOwner = 261, MeChanOwner = 262, MeChanUnOwner = 263,
  Afraid = 264, Teeth = 265, SysMonitor = 266, SayColors = 267,
  Finger = 268, HighlightText = 269, TearSmile = 270, Shy = 271,
  ServerError = 272, Cafe = 273, Addons = 274, ChanOwnerAway = 275,
  OpAway = 276, VoiceAway = 277, ChanAdminAway = 278, UserOpAway = 279,
  HalfOpAway = 280, ClassEditor = 281, Demoralized = 282, Slurp = 283,
  NameSpace = 284, SaySmile = 285, SayKvs = 286, ThemeOptions = 287,
  Bug = 288, Refresh = 289, Theme = 290, ScreenShot = 291,
  Update = 292, NotUpdate = 293, FailUpdate = 294, UnreadText = 295,
  IrcOp = 296, IrcOpAway = 297, DeIrcOp = 298, MeIrcOp = 299,
  MeDeIrcOp = 300, Angel = 301, Clown = 302, Devil = 303,
  InLove = 304, Ninja = 305, Pirate = 306, Puke = 307,
  Rage = 308, Class = 309, ClassNotBuilt = 310, Function = 311,
  SexMale = 312, SexFemale = 313, IrcBot = 314, AlienIrcOp = 315,
  MemoServ = 316, Info = 317, Warning = 318, Shield = 319,
  RawEventEditor = 320, EventEditor = 321, ActionEditor = 322, AliasEditor = 323,
  PopupEditor = 324, Dcc = 325, Socket = 326, Cake = 327,
  HandIly = 328, ThumbDown = 329, ThumbUp = 330, FacePalm = 331,
  Identity = 332, NickPopup = 333, Tools = 334, FavoriteOff = 335,
  NewProxy = 336, IconCount = 337
}
 Contains all KVIrc's small icons. More...
 

Public Slots

void showIconWidget ()
 Shows the table of icons. More...
 

Public Member Functions

void clearCache ()
 Clears the cache! More...
 
KviAvatargetAvatar (const QString &szLocalPath, const QString &szName)
 Returns the avatar If szLocalPath is empty then szName can be the identification string for the avatar If szName is empty then it is found from szLocalPath. More...
 
QPixmap * getBigIcon (const QString &szName)
 Returns the big icon. More...
 
QPixmap * getImage (const QString &szId, bool bCanBeNumber=true, QString *pRetPath=0)
 Returns the image. More...
 
QPixmap * getPixmap (const QString &szName)
 Returns the pixmap of the image. More...
 
KviCachedPixmapgetPixmapWithCache (const QString &szName)
 Returns the cached pixmap of the image. More...
 
KviCachedPixmapgetPixmapWithCacheScaleOnLoad (const QString &szName, int iMaxWidth, int iMaxHeight)
 Returns the cached pixmap of the image and scales it on load. More...
 
QPixmap * getSmallIcon (SmallIcon eIcon)
 Returns the small icon. More...
 
QPixmap * getSmallIcon (int iIcon)
 Returns the small icon. More...
 
int getSmallIconIdFromName (const QString &szName)
 Returns the index of the small icon. More...
 
const char * getSmallIconName (SmallIcon eIcon)
 Returns the name of the small icon. More...
 
const char * getSmallIconName (int iIcon)
 Returns the name of the small icon. More...
 
QString getSmallIconResourceName (SmallIcon eIcon)
 Returns the resource name of the small icon. More...
 
SmallIcon iconName (int iIcon)
 Returns the name of the small icon. More...
 
 KviIconManager ()
 Creates the icon manager object. More...
 
void reloadImages ()
 Reloads all images. More...
 
void urlToCachedFileName (QString &szName)
 Returns the url of the image in cache. More...
 
 ~KviIconManager ()
 Destroys the icon manager object. More...
 

Protected Slots

void iconWidgetClosed ()
 Called when we close the table of icons. More...
 

Protected Member Functions

void addToCache (const QString &szName, KviCachedPixmap *pPix)
 
void initQResourceBackend ()
 Initializes the Qt resource backend. More...
 
QPixmap * loadSmallIcon (int iIdx)
 Returns the icon. More...
 

Private Attributes

KviPointerHashTable< QString,
KviCachedPixmap > * 
m_pCachedImages
 
KviPointerHashTable< QString,
int > * 
m_pIconNames
 
KviIconWidgetm_pIconWidget
 
QPixmap * m_smallIcons [IconCount]
 
unsigned int m_uCacheMaxSize
 
unsigned int m_uCacheTotalSize
 

Detailed Description

This class manages the images used by KVIrc.

We handle three types of images: builtin small icons, builtin big icons and generic images. The builtin small icons are in the pics/coresmall directory (this is to optimize the directory size since it's a linear search...), are 16x16 in size and are indexed by numbers in a way that their access is really fast. The icons used here are used mostly in KviIrcView (but not exclusively). The builtin big icons are (actually) just generic images that are eventually scaled to 32x32 if needed. One can request a builtin small icon indexed by number to be scaled to the size of 32x32 as a big icon too. The generic images are just "any" image that the underlying Qt engine is able to load. They are loaded by (relative) path and cached by name.

Member Enumeration Documentation

Contains all KVIrc's small icons.

Enumerator
None 
Close 
History 
HistoryOff 
UserMode 
DefaultIcon 
Dock 
UnDock 
QuitApp 
Console 
Save 
ParserError 
ParserWarning 
Server 
World 
Proxy 
KVIrc 
Cut 
Copy 
Paste 
Options 
SocketMessage 
SocketWarning 
SocketError 
SystemError 
Raw 
SystemWarning 
SystemMessage 
UnHandled 
ServerInfo 
Motd 
Channel 
HideDoubleView 
ShowDoubleView 
Op 
Voice 
ServerPing 
ShowListView 
HideListView 
Join 
Part 
Unrecognized 
Topic 
Accept 
Discard 
OwnPrivMsg 
ChanPrivMsg 
Query 
QueryPrivMsg 
Help 
QuestionMark 
CtcpReply 
CtcpRequestReplied 
CtcpRequestIgnored 
CtcpRequestFlood 
CtcpRequestUnknown 
Action 
Avatar 
Quit 
Split 
QuitSplit 
Nick 
DeOp 
DeVoice 
Mode 
Key 
Limit 
Ban 
UnBan 
BanExcept 
BanUnExcept 
InviteExcept 
InviteUnExcept 
ChanMode 
ChanModeHide 
Who 
Editor 
DccRequest 
DccMsg 
DccError 
IconManager 
ScriptCenter 
Bomb 
Event 
EventNoHandlers 
Handler 
HandlerDisabled 
NickNameProblem 
WhoisUser 
WhoisChannels 
WhoisIdle 
WhoisServer 
WhoisOther 
Time 
NotifyOnLine 
NotifyOffLine 
Locked 
UnLocked 
LockedOff 
UnLockedOff 
OwnPrivMsgCrypted 
ChanPrivMsgCrypted 
QueryPrivMsgCrypted 
DccChatMsg 
DccChatMsgCrypted 
Irc 
Folder 
Home 
BookMarks 
Spy 
Kick 
Linux 
Links 
RegUsers 
TrayIcon 
UnsetMode 
Favorite 
Toolbar 
ServerFavorite 
Log 
Remove 
File 
Icq 
IcqYellow 
IcqRed 
IcqBlue 
IcqLightGreen 
IcqLightYellow 
Message 
MessageSent 
BlueSquare 
VioletSquare 
YellowSquare 
GreenSquare 
BlackSquare 
RedSquare 
CyanSquare 
DarkGreenSquare 
Terminal 
WallOps 
Invisible 
ServerNotice 
Gnutella 
Search 
Files 
NewNetwork 
Package 
NewServer 
Idea 
Colors 
Gui 
IrcView 
Alias 
ChannelNotice 
ChannelNoticeCrypted 
QueryNotice 
QueryNoticeCrypted 
MenuBar 
Popup 
Prologue 
Epilogue 
SharedFiles 
CtcpReplyUnknown 
Canvas 
NickServ 
ChanServ 
DccVoice 
Play 
Record 
KickOff 
Away 
Ident 
HomePage 
List 
HalfOp 
HalfDeOp 
Invite 
MultiMedia 
User 
Input 
Messages 
QueryTrace 
NoChannel 
BroadcastPrivMsg 
BroadcastNotice 
Url 
RawEvent 
RawEventNoHandlers 
MeKick 
MeOp 
MeVoice 
MeDeOp 
MeDeVoice 
MeHalfOp 
MeDeHalfOp 
MeBan 
MeUnBan 
MeBanExcept 
MeBanUnExcept 
MeInviteExcept 
MeInviteUnExcept 
ClassicWindowList 
TreeWindowList 
Ignore 
UserList 
Stats 
PopupMenu 
ServerConfiguration 
Irc0 
Irc1 
Irc2 
Irc3 
Irc4 
Irc5 
Heart 
HeartBroken 
Rose 
BigGrin 
BigGrinGlasses 
BigGrinEyes 
TextExclamative 
TextPoints 
Kiss 
Surprised1 
Ugly 
Angry 
Surprised2 
Smile 
Tongue 
Ssl 
Cry 
Eye 
DeadChannel 
DeadQuery 
Sound 
ToolBarEditor 
TextEncoding 
NewItem 
NewItemByWizard 
DeleteItem 
EditItem 
FileTransfer 
ChanAdmin 
ChanUnAdmin 
MeChanAdmin 
MeChanUnAdmin 
UserOp 
DeUserOp 
MeUserOp 
MeDeUserOp 
Applet 
Spam 
Transparent 
Notifier 
UserWindow 
StatusBar 
NotAway 
Plus 
Minus 
BinaryText 
ChanOwner 
ChanUnOwner 
MeChanOwner 
MeChanUnOwner 
Afraid 
Teeth 
SysMonitor 
SayColors 
Finger 
HighlightText 
TearSmile 
Shy 
ServerError 
Cafe 
Addons 
ChanOwnerAway 
OpAway 
VoiceAway 
ChanAdminAway 
UserOpAway 
HalfOpAway 
ClassEditor 
Demoralized 
Slurp 
NameSpace 
SaySmile 
SayKvs 
ThemeOptions 
Bug 
Refresh 
Theme 
ScreenShot 
Update 
NotUpdate 
FailUpdate 
UnreadText 
IrcOp 
IrcOpAway 
DeIrcOp 
MeIrcOp 
MeDeIrcOp 
Angel 
Clown 
Devil 
InLove 
Ninja 
Pirate 
Puke 
Rage 
Class 
ClassNotBuilt 
Function 
SexMale 
SexFemale 
IrcBot 
AlienIrcOp 
MemoServ 
Info 
Warning 
Shield 
RawEventEditor 
EventEditor 
ActionEditor 
AliasEditor 
PopupEditor 
Dcc 
Socket 
Cake 
HandIly 
ThumbDown 
ThumbUp 
FacePalm 
Identity 
NickPopup 
Tools 
FavoriteOff 
NewProxy 
IconCount 

Constructor & Destructor Documentation

KviIconManager::KviIconManager ( )
KviIconManager::~KviIconManager ( )

Member Function Documentation

void KviIconManager::addToCache ( const QString &  szName,
KviCachedPixmap pPix 
)
protected
void KviIconManager::clearCache ( )

Clears the cache!

Returns
void

References KviPointerHashTable< Key, T >::clear(), and m_pCachedImages.

Referenced by reloadImages().

KviAvatar * KviIconManager::getAvatar ( const QString &  szLocalPath,
const QString &  szName 
)
QPixmap * KviIconManager::getBigIcon ( const QString &  szName)
QPixmap * KviIconManager::getImage ( const QString &  szId,
bool  bCanBeNumber = true,
QString *  pRetPath = 0 
)
QPixmap* KviIconManager::getPixmap ( const QString &  szName)
inline

Returns the pixmap of the image.

Parameters
szNameThe name of the image
Warning
Don't store this pointer! The returned pointer is owned by the icon manager and can be deleted at any time
Returns
QPixmap *

References KviCachedPixmap::pixmap().

Referenced by OptionsWidget_textIcons::chooseFromFile(), getBigIcon(), KviTextIconManager::load(), NotifierWindowBorder::loadImages(), and KviTextIcon::pixmap().

KviCachedPixmap * KviIconManager::getPixmapWithCache ( const QString &  szName)

Returns the cached pixmap of the image.

Parameters
szNameThe name of the image
Warning
Don't store this pointer! The returned pointer is owned by the icon manager and can be deleted at any time
Returns
KviCachedPixmap *

References addToCache(), KviPointerHashTable< Key, T >::find(), KviApplication::findImage(), g_pApp, m_pCachedImages, and KviCachedPixmap::updateLastAccessTime().

Referenced by getImage(), and KviTheme::save().

KviCachedPixmap * KviIconManager::getPixmapWithCacheScaleOnLoad ( const QString &  szName,
int  iMaxWidth,
int  iMaxHeight 
)

Returns the cached pixmap of the image and scales it on load.

Parameters
szNameThe name of the image
iMaxWidthThe max width to scale
iMaxHeightThe max height to scale
Warning
Don't store this pointer! The returned pointer is owned by the icon manager and can be deleted at any time
Returns
KviCachedPixmap *

References addToCache(), KviPointerHashTable< Key, T >::find(), KviApplication::findImage(), g_pApp, m_pCachedImages, and KviCachedPixmap::updateLastAccessTime().

QPixmap* KviIconManager::getSmallIcon ( SmallIcon  eIcon)
inline

Returns the small icon.

Parameters
eIconThe icon to get
Note
This one never fails... if the icon isn't there, then a default 16x16 image is returned
Returns
QPixmap *

Referenced by ActionEditorWindow::ActionEditorWindow(), EventEditor::addHandlerForCurrentEvent(), KviMaskEditor::addMask(), AddonManagementDialog::AddonManagementDialog(), KviGoAwayAction::addToPopupMenu(), AliasEditorTreeWidgetItem::AliasEditorTreeWidgetItem(), AliasEditorWindow::AliasEditorWindow(), KviInput::applyOptions(), ChannelsJoinDialog::ChannelsJoinDialog(), ClassEditorTreeWidgetItem::ClassEditorTreeWidgetItem(), ClassEditorWindow::ClassEditorWindow(), ThemeManagementDialog::contextMenuRequested(), KviTopicWidget::contextPopupAboutToShow(), KviWindow::createToolButton(), OptionsWidget_proxy::customContextMenuRequested(), RawEditorWidget::customContextMenuRequested(), AliasEditorWidget::customContextMenuRequested(), SinglePopupEditor::customContextMenuRequested(), PopupEditorWidget::customContextMenuRequested(), OptionsWidget_servers::customContextMenuRequested(), ClassEditorWidget::customContextMenuRequested(), CustomizeToolBarsDialog::CustomizeToolBarsDialog(), CustomToolBarPropertiesDialog::CustomToolBarPropertiesDialog(), DccAcceptDialog::DccAcceptDialog(), DccRenameDialog::DccRenameDialog(), DccVoiceWindow::DccVoiceWindow(), EventEditorWindow::EventEditorWindow(), OptionsWidget_servers::favoriteServer(), KviTrayIconWidget::fillContextPopup(), NotifierWindow::fillContextPopup(), ChannelsJoinDialog::fillListView(), OptionsWidget_proxy::fillProxyList(), KviApplication::fillRecentChannelsPopup(), KviApplication::fillRecentNicknamesPopup(), KviApplication::fillRecentServersPopup(), OptionsWidget_servers::fillServerList(), KviMainWindow::fillToolBarsPopup(), getBigIcon(), getImage(), OptionsInstanceManager::getInstance(), KviImageDialog::heartbeat(), OptionsWidget_servers::importServer(), KviIconWidget::init(), AddonFunctions::installAddonPackage(), ThemeFunctions::installThemePackage(), IrcNetworkDetailsWidget::IrcNetworkDetailsWidget(), IrcServerDetailsWidget::IrcServerDetailsWidget(), OptionsWidget_messageColors::itemChanged(), EventEditor::itemPressed(), KviClassicWindowListToolButton::KviClassicWindowListToolButton(), KviConsoleWindow::KviConsoleWindow(), KviCtcpPageDialog::KviCtcpPageDialog(), KviDefaultScriptDialog::KviDefaultScriptDialog(), KviFileDialog::KviFileDialog(), KviInput::KviInput(), KviIrcMessageCheckListItem::KviIrcMessageCheckListItem(), KviIrcView::KviIrcView(), KviIrcViewToolWidget::KviIrcViewToolWidget(), KviKvsCallbackTextInput::KviKvsCallbackTextInput(), KviMainWindow::KviMainWindow(), KviMaskEditor::KviMaskEditor(), KviMaskInputDialog::KviMaskInputDialog(), KviModeEditor::KviModeEditor(), KviStatusBarAwayIndicator::KviStatusBarAwayIndicator(), KviStatusBarUpdateIndicator::KviStatusBarUpdateIndicator(), KviTrayIconWidget::KviTrayIconWidget(), KviWindowToolPageButton::KviWindowToolPageButton(), LinksWindow::LinksWindow(), ListWindow::ListWindow(), KviTextIconManager::load(), LogListViewItemType::LogListViewItemType(), MenuTreeWidgetItem::MenuTreeWidgetItem(), MessageListWidgetItem::MessageListWidgetItem(), ChannelsJoinDialogTreeWidget::mousePressEvent(), SocketSpyWindow::myIconPtr(), KviKvsScriptWindowWindow::myIconPtr(), UserWindow::myIconPtr(), KviDebugWindow::myIconPtr(), CodeTesterWindow::myIconPtr(), KviIOGraphWindow::myIconPtr(), HelpWindow::myIconPtr(), UrlDialog::myIconPtr(), LinksWindow::myIconPtr(), DccChatWindow::myIconPtr(), SharedFilesWindow::myIconPtr(), KviConsoleWindow::myIconPtr(), FileTransferWindow::myIconPtr(), LogViewWindow::myIconPtr(), ListWindow::myIconPtr(), DccVoiceWindow::myIconPtr(), EventEditorWindow::myIconPtr(), DccVideoWindow::myIconPtr(), RawEditorWindow::myIconPtr(), AliasEditorWindow::myIconPtr(), ActionEditorWindow::myIconPtr(), PopupEditorWindow::myIconPtr(), KviQueryWindow::myIconPtr(), KviWindow::myIconPtr(), ClassEditorWindow::myIconPtr(), KviChannelWindow::myIconPtr(), OptionsWidget_messageColors::newIconSelected(), OptionsWidget_servers::newNetwork(), OptionsWidget_proxy::newProxy(), OptionsWidget_servers::newServer(), KviApplication::notifierMessage(), EventEditor::oneTimeSetup(), OptionsDialog::OptionsDialog(), OptionsDialogTreeWidgetItem::OptionsDialogTreeWidgetItem(), OptionsWidget_proxy::OptionsWidget_proxy(), OptionsWidget_servers::OptionsWidget_servers(), RegisteredUsersDialogItemDelegate::paint(), MessageListWidgetItemDelegate::paint(), KviIrcView::paintEvent(), KviUserListViewArea::paintEvent(), OptionsWidget_servers::pasteServer(), KviTextIcon::pixmap(), KviJoinChannelAction::popupAboutToShow(), KviChangeNickAction::popupAboutToShow(), KviConnectToServerAction::popupAboutToShow(), KviChangeUserModeAction::popupAboutToShow(), PopupEditorWindow::PopupEditorWindow(), RawEditorWindow::RawEditorWindow(), OptionsWidget_servers::recentServersPopupAboutToShow(), KviConsoleWindow::recentUrlsChanged(), KviTrayIconWidget::refresh(), RegisteredUserEntryDialog::RegisteredUserEntryDialog(), RegisteredUserPropertiesDialog::RegisteredUserPropertiesDialog(), RegisteredUsersDialog::RegisteredUsersDialog(), RegistrationWizard::RegistrationWizard(), EventEditor::removeCurrentHandler(), LogViewWindow::rightButtonClicked(), KviTheme::save(), ScriptEditorImplementation::ScriptEditorImplementation(), StatusBarApplet::selfRegister(), KviStatusBarClock::selfRegister(), KviStatusBarConnectionTimer::selfRegister(), KviStatusBarAwayIndicator::selfRegister(), KviStatusBarLagIndicator::selfRegister(), KviStatusBarUpdateIndicator::selfRegister(), ClassEditorTreeWidgetItem::setClassNotBuilt(), RawTreeWidgetItem::setEnabled(), EventEditorHandlerTreeWidgetItem::setEnabled(), RawHandlerTreeWidgetItem::setEnabled(), AliasEditorTreeWidgetItem::setType(), ClassEditorTreeWidgetItem::setType(), OptionsWidgetContainer::setup(), KviMenuBar::setupHelpPopup(), KviMenuBar::setupMainPopup(), KviMenuBar::setupScriptingPopup(), KviMenuBar::setupSettingsPopup(), KviMenuBar::setupToolsPopup(), SharedFileEditDialog::SharedFileEditDialog(), KviInputEditor::showContextPopup(), LinksWindow::showHostPopup(), KviIrcView::showToolsPopup(), KviAction::smallIcon(), KviTopicWidget::switchMode(), ThemeManagementDialog::ThemeManagementDialog(), TipWindow::TipWindow(), KviStatusBarAwayIndicator::updateDisplay(), KviStatusBarUpdateIndicator::updateDisplay(), OptionsWidget_servers::updateFavoritesFilter(), and KviMenuBar::updateRecentServersPopup().

QPixmap* KviIconManager::getSmallIcon ( int  iIcon)
inline

Returns the small icon.

Parameters
iIconThe icon to get
Note
This one never fails... if the icon isn't there, then a default 16x16 image is returned. This is provided for convenience
Returns
QPixmap *
int KviIconManager::getSmallIconIdFromName ( const QString &  szName)

Returns the index of the small icon.

Parameters
szNameThe name of the icon
Returns
int

References KviPointerHashTable< Key, T >::find(), g_szIconNames, i, IconCount, m_pIconNames, KviPointerHashTable< Key, T >::replace(), and KviPointerHashTable< Key, T >::setAutoDelete().

Referenced by getImage(), and KviKvsCoreFunctions::KVSCF().

const char * KviIconManager::getSmallIconName ( SmallIcon  eIcon)

Returns the name of the small icon.

Parameters
eIconThe icon to get
Returns
const char *

References g_szIconNames.

Referenced by KviImageDialog::heartbeat(), KviKvsCoreFunctions::KVSCF(), KviApplication::notifierMessage(), and KviTheme::save().

const char * KviIconManager::getSmallIconName ( int  iIcon)

Returns the name of the small icon.

Parameters
iIconThe icon to get
Note
This is provided for convenience
Returns
const char *

References g_szIconNames.

QString KviIconManager::getSmallIconResourceName ( SmallIcon  eIcon)

Returns the resource name of the small icon.

Parameters
eIconThe icon to get
Returns
QString

References g_szIconNames.

Referenced by KviHtmlGenerator::convertToHtml(), LogViewWindow::createLog(), KviIrcView::doLinkToolTip(), and KviIrcView::doMarkerToolTip().

KviIconManager::SmallIcon KviIconManager::iconName ( int  iIcon)

Returns the name of the small icon.

Parameters
iIconThe icon to get
Returns
KviIconManager::SmallIcon

References Accept, Action, ActionEditor, Addons, Afraid, Alias, AliasEditor, AlienIrcOp, Angel, Angry, Applet, Avatar, Away, Ban, BanExcept, BanUnExcept, BigGrin, BigGrinEyes, BigGrinGlasses, BinaryText, BlackSquare, BlueSquare, Bomb, BookMarks, BroadcastNotice, BroadcastPrivMsg, Bug, Cafe, Cake, Canvas, ChanAdmin, ChanAdminAway, ChanMode, ChanModeHide, Channel, ChannelNotice, ChannelNoticeCrypted, ChanOwner, ChanOwnerAway, ChanPrivMsg, ChanPrivMsgCrypted, ChanServ, ChanUnAdmin, ChanUnOwner, Class, ClassEditor, ClassicWindowList, ClassNotBuilt, Close, Clown, Colors, Console, Copy, Cry, CtcpReply, CtcpReplyUnknown, CtcpRequestFlood, CtcpRequestIgnored, CtcpRequestReplied, CtcpRequestUnknown, Cut, CyanSquare, DarkGreenSquare, Dcc, DccChatMsg, DccChatMsgCrypted, DccError, DccMsg, DccRequest, DccVoice, DeadChannel, DeadQuery, DefaultIcon, DeIrcOp, DeleteItem, Demoralized, DeOp, DeUserOp, Devil, DeVoice, Discard, Dock, EditItem, Editor, Epilogue, Event, EventEditor, EventNoHandlers, Eye, FacePalm, FailUpdate, Favorite, FavoriteOff, File, Files, FileTransfer, Finger, Folder, Function, Gnutella, GreenSquare, Gui, HalfDeOp, HalfOp, HalfOpAway, HandIly, Handler, HandlerDisabled, Heart, HeartBroken, Help, HideDoubleView, HideListView, HighlightText, History, HistoryOff, Home, HomePage, IconCount, IconManager, Icq, IcqBlue, IcqLightGreen, IcqLightYellow, IcqRed, IcqYellow, Idea, Ident, Identity, Ignore, Info, InLove, Input, Invisible, Invite, InviteExcept, InviteUnExcept, Irc, Irc0, Irc1, Irc2, Irc3, Irc4, Irc5, IrcBot, IrcOp, IrcOpAway, IrcView, Join, Key, Kick, KickOff, Kiss, KVIrc, Limit, Links, Linux, List, Locked, LockedOff, Log, MeBan, MeBanExcept, MeBanUnExcept, MeChanAdmin, MeChanOwner, MeChanUnAdmin, MeChanUnOwner, MeDeHalfOp, MeDeIrcOp, MeDeOp, MeDeUserOp, MeDeVoice, MeHalfOp, MeInviteExcept, MeInviteUnExcept, MeIrcOp, MeKick, MemoServ, MenuBar, MeOp, Message, Messages, MessageSent, MeUnBan, MeUserOp, MeVoice, Minus, Mode, Motd, MultiMedia, NameSpace, NewItem, NewItemByWizard, NewNetwork, NewProxy, NewServer, Nick, NickNameProblem, NickPopup, NickServ, Ninja, NoChannel, None, NotAway, Notifier, NotifyOffLine, NotifyOnLine, NotUpdate, Op, OpAway, Options, OwnPrivMsg, OwnPrivMsgCrypted, Package, ParserError, ParserWarning, Part, Paste, Pirate, Play, Plus, Popup, PopupEditor, PopupMenu, Prologue, Proxy, Puke, Query, QueryNotice, QueryNoticeCrypted, QueryPrivMsg, QueryPrivMsgCrypted, QueryTrace, QuestionMark, Quit, QuitApp, QuitSplit, Rage, Raw, RawEvent, RawEventEditor, RawEventNoHandlers, Record, RedSquare, Refresh, RegUsers, Remove, Rose, Save, SayColors, SayKvs, SaySmile, ScreenShot, ScriptCenter, Search, Server, ServerConfiguration, ServerError, ServerFavorite, ServerInfo, ServerNotice, ServerPing, SexFemale, SexMale, SharedFiles, Shield, ShowDoubleView, ShowListView, Shy, Slurp, Smile, Socket, SocketError, SocketMessage, SocketWarning, Sound, Spam, Split, Spy, Ssl, Stats, StatusBar, Surprised1, Surprised2, SysMonitor, SystemError, SystemMessage, SystemWarning, TearSmile, Teeth, Terminal, TextEncoding, TextExclamative, TextPoints, Theme, ThemeOptions, ThumbDown, ThumbUp, Time, Tongue, Toolbar, ToolBarEditor, Tools, Topic, Transparent, TrayIcon, TreeWindowList, Ugly, UnBan, UnDock, UnHandled, UnLocked, UnLockedOff, UnreadText, Unrecognized, UnsetMode, Update, Url, User, UserList, UserMode, UserOp, UserOpAway, UserWindow, VioletSquare, Voice, VoiceAway, WallOps, Warning, Who, WhoisChannels, WhoisIdle, WhoisOther, WhoisServer, WhoisUser, World, and YellowSquare.

Referenced by KviTextIconManager::insert(), KviTextIconManager::load(), and KviTextIcon::setId().

void KviIconManager::iconWidgetClosed ( )
protectedslot

Called when we close the table of icons.

Returns
void

References m_pIconWidget.

Referenced by showIconWidget().

void KviIconManager::initQResourceBackend ( )
protected
QPixmap * KviIconManager::loadSmallIcon ( int  iIdx)
protected

Returns the icon.

Parameters
iIdxThe ID of the icon
Returns
QPixmap *

References KviApplication::findSmallIcon(), g_pApp, g_szIconNames, IconCount, KVI_SMALLICONS_PREFIX, m_smallIcons, and szBuffer.

void KviIconManager::reloadImages ( )

Reloads all images.

Returns
void

References clearCache(), and m_smallIcons.

Referenced by KviApplication::optionResetUpdate().

void KviIconManager::showIconWidget ( )
slot

Shows the table of icons.

Returns
void

References connect(), iconWidgetClosed(), KviIconWidget, and m_pIconWidget.

void KviIconManager::urlToCachedFileName ( QString &  szName)

Returns the url of the image in cache.

Parameters
szNameThe path of the image
Returns
void

Referenced by avatar_kvs_cmd_set(), getAvatar(), KviIrcServerParser::parseCtcpReplyAvatar(), and AvatarDownloadDialog::startDownload().

Member Data Documentation

KviPointerHashTable<QString, KviCachedPixmap>* KviIconManager::m_pCachedImages
private
KviPointerHashTable<QString, int>* KviIconManager::m_pIconNames
private
KviIconWidget* KviIconManager::m_pIconWidget
private
QPixmap* KviIconManager::m_smallIcons[IconCount]
private
unsigned int KviIconManager::m_uCacheMaxSize
private

Referenced by KviIconManager().

unsigned int KviIconManager::m_uCacheTotalSize
private

Referenced by addToCache(), and KviIconManager().


The documentation for this class was generated from the following files: