1 #ifndef _KVI_ICONMANAGER_H_
2 #define _KVI_ICONMANAGER_H_
45 #define KVI_BIGICON_DISCONNECTED "kvi_bigicon_disconnected.png"
46 #define KVI_BIGICON_CONNECTING "kvi_bigicon_connecting.png"
47 #define KVI_BIGICON_CONNECTED "kvi_bigicon_connected.png"
48 #define KVI_BIGICON_TOOLS "kvi_bigicon_tools.png"
49 #define KVI_BIGICON_ACTIONS "kvi_bigicon_actions.png"
50 #define KVI_BIGICON_USERACTION "kvi_bigicon_useraction.png"
51 #define KVI_BIGICON_FOLDER "kvi_bigicon_folder.png"
52 #define KVI_BIGICON_UNKNOWN "kvi_bigicon_unknown.png"
53 #define KVI_BIGICON_SEPARATOR "kvi_bigicon_separator.png"
54 #define KVI_BIGICON_KVS "kvi_bigicon_kvs.png"
55 #define KVI_BIGICON_THEME "kvi_bigicon_theme.png"
56 #define KVI_BIGICON_ADDONS "kvi_bigicon_addons.png"
58 #define KVI_BIGICON_HELP "kvi_bigicon_help.png"
59 #define KVI_BIGICON_HELPINDEX "kvi_bigicon_helpindex.png"
60 #define KVI_BIGICON_HELPBACK "kvi_bigicon_helpback.png"
61 #define KVI_BIGICON_HELPFORWARD "kvi_bigicon_helpforward.png"
62 #define KVI_BIGICON_HELPCLOSE "kvi_bigicon_helpclose.png"
63 #define KVI_BIGICON_HELPSEARCH "kvi_bigicon_helpsearch.png"
65 #define KVI_BIGICON_OPEN "kvi_bigicon_open.png"
66 #define KVI_BIGICON_SAVE "kvi_bigicon_save.png"
67 #define KVI_BIGICON_REMOVE "kvi_bigicon_remove.png"
68 #define KVI_BIGICON_WWW "kvi_bigicon_www.png"
69 #define KVI_BIGICON_PACK "kvi_bigicon_pack.png"
70 #define KVI_BIGICON_SCREENSHOT "kvi_bigicon_screenshot.png"
71 #define KVI_BIGICON_REGUSERS "kvi_bigicon_regusers.png"
73 #define KVI_SMALLICONS_SUBDIRECTORY "coresmall"
74 #define KVI_SMALLICONS_PREFIX "kcs_"
77 #define KVI_SMALLICONS_IMAGELIB_PREFIX "kvi_smallicon_"
79 #define KVI_USERCHANSTATE_IMAGE_NAME "kvi_userchanstate.png"
80 #define KVI_ACTIVITYMETER_IMAGE_NAME "kvi_activitymeter.png"
82 #define KVI_REFRESH_IMAGE_NAME "kvi_icon_refresh.png"
124 const QString &
path() {
return m_szPath; };
130 unsigned int size() {
return m_uSize; };
142 void updateLastAccessTime();
222 CtcpRequestReplied = 52,
223 CtcpRequestIgnored = 53,
224 CtcpRequestFlood = 54,
225 CtcpRequestUnknown = 55,
254 EventNoHandlers = 84,
256 HandlerDisabled = 86,
257 NickNameProblem = 87,
270 OwnPrivMsgCrypted = 100,
271 ChanPrivMsgCrypted = 101,
272 QueryPrivMsgCrypted = 102,
274 DccChatMsgCrypted = 104,
288 ServerFavorite = 118,
297 IcqLightYellow = 127,
307 DarkGreenSquare = 137,
324 ChannelNoticeCrypted = 154,
326 QueryNoticeCrypted = 156,
332 CtcpReplyUnknown = 162,
353 BroadcastPrivMsg = 183,
354 BroadcastNotice = 184,
357 RawEventNoHandlers = 187,
369 MeInviteExcept = 199,
370 MeInviteUnExcept = 200,
371 ClassicWindowList = 201,
372 TreeWindowList = 202,
377 ServerConfiguration = 207,
388 BigGrinGlasses = 218,
390 TextExclamative = 220,
408 NewItemByWizard = 238,
490 RawEventEditor = 320,
522 QPixmap * m_smallIcons[IconCount];
542 QPixmap * getImage(
const QString & szId,
bool bCanBeNumber =
true, QString * pRetPath = 0);
562 KviCachedPixmap * getPixmapWithCacheScaleOnLoad(
const QString & szName,
int iMaxWidth,
int iMaxHeight);
574 return pPix ? pPix->
pixmap() : 0;
584 QPixmap * getBigIcon(
const QString & szName);
593 QPixmap *
getSmallIcon(
SmallIcon eIcon) {
return eIcon < IconCount ? (m_smallIcons[eIcon] ? m_smallIcons[eIcon] : loadSmallIcon(eIcon)) : 0; };
602 QPixmap *
getSmallIcon(
int iIcon) {
return iIcon < IconCount ? (m_smallIcons[iIcon] ? m_smallIcons[iIcon] : loadSmallIcon(iIcon)) : 0; };
609 const char * getSmallIconName(SmallIcon eIcon);
617 const char * getSmallIconName(
int iIcon);
624 QString getSmallIconResourceName(SmallIcon eIcon);
631 SmallIcon iconName(
int iIcon);
638 int getSmallIconIdFromName(
const QString & szName);
649 KviAvatar * getAvatar(
const QString & szLocalPath,
const QString & szName);
656 void urlToCachedFileName(QString & szName);
679 QPixmap * loadSmallIcon(
int iIdx);
685 void initQResourceBackend();
691 void showIconWidget();
697 void iconWidgetClosed();
733 virtual void closeEvent(QCloseEvent * pEvent);
734 virtual bool eventFilter(QObject * pObject, QEvent * pEvent);
752 #endif //_KVI_ICONMANAGER_H_
#define KVIRC_API
Definition: kvi_settings.h:128
This class manages the images used by KVIrc.
Definition: KviIconManager.h:160
QPixmap * getSmallIcon(SmallIcon eIcon)
Returns the small icon.
Definition: KviIconManager.h:593
kvi_time_t lastAccessTime()
Returns the time the image was last accessed.
Definition: KviIconManager.h:136
class KVIRC_API KviIconWidget
Definition: KviIconManager.h:84
m_pPixmap
Definition: KvsObject_pixmap.cpp:112
KviIconWidget * m_pIconWidget
Definition: KviIconManager.h:523
#define kvi_time_t
Definition: KviTimeUtils.h:43
KVIRC_API KviIconManager * g_pIconManager
Definition: KviIconManager.cpp:81
char Channel
Definition: KviIrcNumericCodes.h:391
SmallIcon
Contains all KVIrc's small icons.
Definition: KviIconManager.h:168
unsigned int m_uCacheMaxSize
Definition: KviIconManager.h:527
QPixmap * m_pPixmap
Definition: KviIconManager.h:110
Avatar class.
Definition: KviAvatar.h:52
QPixmap * pixmap()
Returns the image.
Definition: KviIconManager.h:118
Definition: ActionEditor.h:155
kvi_time_t m_tLastAccess
Definition: KviIconManager.h:109
Definition: UserWindow.h:30
KviPointerHashTable< QString, int > * m_pIconNames
Definition: KviIconManager.h:525
Mode
Definition: KviOptions.h:599
unsigned int size()
Returns the size of the image.
Definition: KviIconManager.h:130
QString m_szPath
Definition: KviIconManager.h:108
unsigned int m_uCacheTotalSize
Definition: KviIconManager.h:526
QPixmap * getPixmap(const QString &szName)
Returns the pixmap of the image.
Definition: KviIconManager.h:571
Class for holding a cached pixmap.
Definition: KviIconManager.h:90
Definition: EventEditorWindow.h:91
unsigned int m_uSize
Definition: KviIconManager.h:111
const QString & path()
Returns the path of the image.
Definition: KviIconManager.h:124
int init()
Definition: winamp.cpp:118
Definition: KviControlCodes.h:143
This file contains compile time settings.
QPixmap * getSmallIcon(int iIcon)
Returns the small icon.
Definition: KviIconManager.h:602
KviPointerHashTable< QString, KviCachedPixmap > * m_pCachedImages
Definition: KviIconManager.h:524