![]() |
KVIrc
4.9.2
DeveloperAPIs
|
The class that manages the icons. More...
#include <KviTextIconManager.h>
Inheritance diagram for KviTextIconManager:Signals | |
| void | changed () |
| Called when the default associations change. More... | |
Public Member Functions | |
| void | applyOptions () |
| Applies the options. More... | |
| void | checkDefaultAssociations () |
| Checks and updates the default associations. More... | |
| void | clear () |
| Clears the dictionary. More... | |
| void | insert (const QString &szName, int iId) |
| Inserts an icon in the dictionary. More... | |
| void | insert (const QString &szName, KviTextIcon &icon) |
| Inserts an icon in the dictionary. More... | |
| KviTextIconManager () | |
| Constructs the icon manager object. More... | |
| void | load () |
| Loads the dictionary. More... | |
| KviTextIcon * | lookupTextIcon (const QString &szName) |
| Returns the text of the icon. More... | |
| void | save () |
| Saves the dictionary. More... | |
| KviPointerHashTable< QString, KviTextIcon > * | textIconDict () |
| Returns the dictionary of the icons. More... | |
| ~KviTextIconManager () | |
| Destroys the icon manager object. More... | |
Protected Member Functions | |
| int | load (const QString &szFileName, bool bMerge=false) |
| Loads the dictionary from a file. More... | |
| void | save (const QString &szFileName) |
| Saves the dictionary to a file. More... | |
Private Attributes | |
| KviPointerHashTable< QString, KviTextIcon > * | m_pTextIconDict |
Friends | |
| class | KviTextIconsOptionsWidget |
| class | KviTextIconWindow |
The class that manages the icons.
| KviTextIconManager::KviTextIconManager | ( | ) |
Constructs the icon manager object.
References m_pTextIconDict, and KviPointerHashTable< Key, T >::setAutoDelete().
| KviTextIconManager::~KviTextIconManager | ( | ) |
Destroys the icon manager object.
References m_pTextIconDict.
| void KviTextIconManager::applyOptions | ( | ) |
Applies the options.
References KviPointerHashTable< Key, T >::first(), KVI_OPTION_BOOL, KviOption_boolEnableAnimatedSmiles, m_pTextIconDict, and KviPointerHashTable< Key, T >::next().
Referenced by KviMainWindow::applyOptions().
|
signal |
Called when the default associations change.
Referenced by checkDefaultAssociations(), insert(), and load().
| void KviTextIconManager::checkDefaultAssociations | ( | ) |
Checks and updates the default associations.
References changed(), KviPointerHashTable< Key, T >::find(), i, insert(), _KviTextIconAssocEntry::iVal, m_pTextIconDict, _KviTextIconAssocEntry::name, and KviRuntimeInfo::name().
Referenced by OptionsWidget_textIcons::restoreClicked().
| void KviTextIconManager::clear | ( | ) |
Clears the dictionary.
References KviPointerHashTable< Key, T >::clear(), and m_pTextIconDict.
Referenced by OptionsWidget_textIcons::commit().
| void KviTextIconManager::insert | ( | const QString & | szName, |
| int | iId | ||
| ) |
Inserts an icon in the dictionary.
| szName | The name of the icon |
| iId | The id of the icon |
References changed(), g_pIconManager, KviIconManager::iconName(), m_pTextIconDict, and KviPointerHashTable< Key, T >::replace().
Referenced by checkDefaultAssociations(), OptionsWidget_textIcons::commit(), and texticons_kvs_cmd_set().
| void KviTextIconManager::insert | ( | const QString & | szName, |
| KviTextIcon & | icon | ||
| ) |
Inserts an icon in the dictionary.
| szName | The name of the icon |
| icon | The icon |
References changed(), m_pTextIconDict, and KviPointerHashTable< Key, T >::replace().
| void KviTextIconManager::load | ( | ) |
Loads the dictionary.
References KviApplication::Config, g_pApp, KviApplication::getGlobalKvircDirectory(), KviApplication::getReadOnlyConfigPath(), KVI_CONFIGFILE_TEXTICONS, and TEXTICONMANAGER_CURRENT_CONFIG_UPDATE.
Referenced by KviApplication::setup().
|
protected |
Loads the dictionary from a file.
This is the real load() function It returns the config update
| szFileName | The filename from where to load |
| bMerge | Whether to merge the existing dictionary with the loaded one |
References KviPointerList< T >::append(), changed(), KviPointerHashTable< Key, T >::clear(), KviPointerHashTableIterator< Key, T >::current(), KviPointerHashTableIterator< Key, T >::currentKey(), KviConfigurationFile::dict(), KviPointerHashTable< Key, T >::find(), KviPointerList< T >::first(), g_pIconManager, KviIconManager::getPixmap(), KviIconManager::getSmallIcon(), KviIconManager::Help, KviIconManager::iconName(), m_pTextIconDict, KviPointerList< T >::next(), KviConfigurationFile::Read, KviConfigurationFile::readEntry(), KviConfigurationFile::readIntEntry(), KviPointerHashTable< Key, T >::replace(), s, KviPointerList< T >::setAutoDelete(), and KviConfigurationFile::setGroup().
|
inline |
Returns the text of the icon.
| szName | The name of the icon |
Referenced by KviHtmlGenerator::convertToHtml(), KviIrcView::getTextLine(), KviTopicWidget::paintColoredText(), KviIrcView::paintEvent(), texticons_kvs_cmd_set(), and texticons_kvs_fnc_get().
| void KviTextIconManager::save | ( | ) |
Saves the dictionary.
References KviApplication::Config, g_pApp, KviApplication::getLocalKvircDirectory(), and KVI_CONFIGFILE_TEXTICONS.
Referenced by OptionsWidget_textIcons::commit(), and KviApplication::saveTextIcons().
|
protected |
Saves the dictionary to a file.
This is the real save() function
| szFileName | The filename where to save |
References KviPointerHashTableIterator< Key, T >::current(), KviPointerHashTableIterator< Key, T >::currentKey(), m_pTextIconDict, KviConfigurationFile::setGroup(), TEXTICONMANAGER_CURRENT_CONFIG_UPDATE, KviConfigurationFile::Write, and KviConfigurationFile::writeEntry().
|
inline |
Returns the dictionary of the icons.
Referenced by KviTextIconWindow::fill(), OptionsWidget_textIcons::fillTable(), texticons_kvs_cmd_set(), and texticons_kvs_fnc_get().
|
friend |
|
friend |
|
private |
Referenced by applyOptions(), checkDefaultAssociations(), clear(), insert(), KviTextIconManager(), load(), save(), and ~KviTextIconManager().
1.8.7