![]() |
KVIrc
4.9.2
DeveloperAPIs
|
#include <KviKvsEventManager.h>
Inheritance diagram for KviKvsEventManager:Signals | |
| void | eventHandlerDisabled (const QString &) |
Public Member Functions | |
| bool | addAppHandler (unsigned int uEvIdx, KviKvsEventHandler *h) |
| bool | addRawHandler (unsigned int uRawIdx, KviKvsEventHandler *h) |
| KviKvsEvent * | appEvent (unsigned int uEvIdx) |
| KviPointerList < KviKvsEventHandler > * | appHandlers (unsigned int uEvIdx) |
| void | clear () |
| void | clearAppEvents () |
| void | clearRawEvents () |
| bool | enableScriptAppHandler (unsigned int uEvIdx, const QString &szName, bool bEnable) |
| bool | enableScriptRawHandler (unsigned int uEvIdx, const QString &szName, bool bEnable) |
| KviKvsEvent * | findAppEventByName (const QString &szName) |
| unsigned int | findAppEventIndexByName (const QString &szName) |
| KviKvsScriptEventHandler * | findScriptAppHandler (unsigned int uEvIdx, const QString &szName) |
| KviKvsScriptEventHandler * | findScriptRawHandler (unsigned int uEvIdx, const QString &szName) |
| bool | hasAppHandlers (unsigned int uEvIdx) |
| bool | hasRawHandlers (unsigned int uEvIdx) |
| bool | isValidAppEvent (unsigned int uEvIdx) |
| bool | isValidRawEvent (unsigned int uEvIdx) |
| void | loadAppEvents (const QString &szFileName) |
| void | loadRawEvents (const QString &szFileName) |
| KviPointerList < KviKvsEventHandler > * | rawHandlers (unsigned int uEvIdx) |
| void | removeAllModuleAppHandlers (KviKvsModuleInterface *i) |
| void | removeAllModuleHandlers (KviKvsModuleInterface *i) |
| void | removeAllModuleRawHandlers (KviKvsModuleInterface *i) |
| void | removeAllScriptAppHandlers () |
| void | removeAllScriptRawHandlers () |
| bool | removeModuleAppHandler (unsigned int uEvIdx, KviKvsModuleInterface *i) |
| bool | removeModuleRawHandler (unsigned int uRawIdx, KviKvsModuleInterface *i) |
| bool | removeScriptAppHandler (unsigned int uEvIdx, const QString &szName) |
| bool | removeScriptRawHandler (unsigned int uEvIdx, const QString &szName) |
| void | saveAppEvents (const QString &szFileName) |
| void | saveRawEvents (const QString &szFileName) |
| bool | trigger (unsigned int uEvIdx, KviWindow *pWnd, KviKvsVariantList *pParams) |
| bool | triggerDeleteParams (unsigned int uEvIdx, KviWindow *pWnd, KviKvsVariantList *pParams) |
| bool | triggerHandlers (KviPointerList< KviKvsEventHandler > *pHandlers, KviWindow *pWnd, KviKvsVariantList *pParams) |
| bool | triggerRaw (unsigned int uEvIdx, KviWindow *pWnd, KviKvsVariantList *pParams) |
Static Public Member Functions | |
| static void | done () |
| static void | init () |
| static KviKvsEventManager * | instance () |
Protected Member Functions | |
| KviKvsEventManager () | |
| ~KviKvsEventManager () | |
Protected Attributes | |
| KviPointerList < KviKvsEventHandler > * | m_rawEventTable [KVI_KVS_NUM_RAW_EVENTS] |
Static Protected Attributes | |
| static KviKvsEvent | m_appEventTable [KVI_KVS_NUM_APP_EVENTS] |
| static KviKvsEventManager * | m_pInstance = nullptr |
Friends | |
| class | KviModule |
|
protected |
References i, m_pInstance, and m_rawEventTable.
Referenced by init().
|
protected |
References clear().
| bool KviKvsEventManager::addAppHandler | ( | unsigned int | uEvIdx, |
| KviKvsEventHandler * | h | ||
| ) |
References KviKvsEvent::addHandler(), KVI_KVS_NUM_APP_EVENTS, and m_appEventTable.
Referenced by EventEditor::commit(), and KviKvsCoreCallbackCommands::KVSCCC().
| bool KviKvsEventManager::addRawHandler | ( | unsigned int | uRawIdx, |
| KviKvsEventHandler * | h | ||
| ) |
References KviPointerList< T >::append(), KVI_KVS_NUM_RAW_EVENTS, m_rawEventTable, and KviPointerList< T >::setAutoDelete().
Referenced by RawEditorWidget::commit(), and KviKvsCoreCallbackCommands::KVSCCC().
|
inline |
Referenced by EventEditor::oneTimeSetup().
|
inline |
| void KviKvsEventManager::clear | ( | ) |
References clearAppEvents(), and clearRawEvents().
Referenced by ~KviKvsEventManager().
| void KviKvsEventManager::clearAppEvents | ( | ) |
References i, and m_appEventTable.
Referenced by clear().
| void KviKvsEventManager::clearRawEvents | ( | ) |
References i, and m_rawEventTable.
Referenced by clear().
|
static |
References instance().
Referenced by KviKvs::done().
| bool KviKvsEventManager::enableScriptAppHandler | ( | unsigned int | uEvIdx, |
| const QString & | szName, | ||
| bool | bEnable | ||
| ) |
References findScriptAppHandler(), h, and KviKvsScriptEventHandler::setEnabled().
| bool KviKvsEventManager::enableScriptRawHandler | ( | unsigned int | uEvIdx, |
| const QString & | szName, | ||
| bool | bEnable | ||
| ) |
References findScriptRawHandler(), h, and KviKvsScriptEventHandler::setEnabled().
Referenced by KviKvsCoreSimpleCommands::KVSCSC().
|
signal |
Referenced by triggerHandlers().
| KviKvsEvent * KviKvsEventManager::findAppEventByName | ( | const QString & | szName | ) |
References KviQString::equalCI(), KVI_KVS_NUM_APP_EVENTS, m_appEventTable, KviRuntimeInfo::name(), and u.
| unsigned int KviKvsEventManager::findAppEventIndexByName | ( | const QString & | szName | ) |
References KviQString::equalCI(), KVI_KVS_NUM_APP_EVENTS, m_appEventTable, KviRuntimeInfo::name(), and u.
Referenced by KviKvsCoreCallbackCommands::KVSCCC(), KviKvsCoreFunctions::KVSCF(), and KviKvsCoreSimpleCommands::KVSCSC().
| KviKvsScriptEventHandler * KviKvsEventManager::findScriptAppHandler | ( | unsigned int | uEvIdx, |
| const QString & | szName | ||
| ) |
References KviQString::equalCI(), first(), h, KviKvsEvent::handlers(), KVI_KVS_NUM_APP_EVENTS, m_appEventTable, KviRuntimeInfo::name(), KviPointerList< T >::next(), KviKvsEventHandler::Script, and KviKvsEventHandler::type().
Referenced by enableScriptAppHandler(), KviKvsCoreFunctions::KVSCF(), and KviKvsCoreSimpleCommands::KVSCSC().
| KviKvsScriptEventHandler * KviKvsEventManager::findScriptRawHandler | ( | unsigned int | uEvIdx, |
| const QString & | szName | ||
| ) |
References KviQString::equalCI(), first(), h, KVI_KVS_NUM_RAW_EVENTS, m_rawEventTable, KviRuntimeInfo::name(), KviPointerList< T >::next(), KviKvsEventHandler::Script, and KviKvsEventHandler::type().
Referenced by enableScriptRawHandler(), KviKvsCoreFunctions::KVSCF(), and KviKvsCoreSimpleCommands::KVSCSC().
|
inline |
|
inline |
Referenced by KviIrcServerParser::parseMessage().
|
static |
References instance(), and KviKvsEventManager().
Referenced by KviKvs::init().
|
inlinestatic |
Referenced by KviApplication::checkSuggestRestoreDefaultScript(), KviKvs::clearAppEvents(), KviKvs::clearRawEvents(), EventEditor::commit(), RawEditorWidget::commit(), done(), KviUserListView::emitDoubleClick(), KviUserListView::emitRightClick(), init(), KviKvsCoreCallbackCommands::KVSCCC(), KviKvsCoreFunctions::KVSCF(), KviKvsCoreSimpleCommands::KVSCSC(), KviKvsModuleInterface::kvsRegisterAppEventHandler(), KviKvsModuleInterface::kvsRegisterRawEventHandler(), KviKvsModuleInterface::kvsUnregisterAllAppEventHandlers(), KviKvsModuleInterface::kvsUnregisterAllRawEventHandlers(), KviKvsModuleInterface::kvsUnregisterAppEventHandler(), KviKvsModuleInterface::kvsUnregisterRawEventHandler(), KviKvs::loadAppEvents(), KviKvs::loadRawEvents(), EventEditor::oneTimeSetup(), RawEditorWidget::oneTimeSetup(), KviIrcServerParser::parseLiteralQuit(), KviIrcServerParser::parseMessage(), KviIrcServerParser::parseUserMode(), KviKvs::saveAppEvents(), and KviKvs::saveRawEvents().
|
inline |
References KVI_KVS_NUM_APP_EVENTS.
|
inline |
References KVI_KVS_NUM_RAW_EVENTS.
Referenced by KviKvsCoreCallbackCommands::KVSCCC(), KviKvsCoreFunctions::KVSCF(), and KviKvsCoreSimpleCommands::KVSCSC().
| void KviKvsEventManager::loadAppEvents | ( | const QString & | szFileName | ) |
References KviKvsEvent::addHandler(), KviConfigurationFile::hasGroup(), i, KVI_KVS_NUM_APP_EVENTS, m_appEventTable, KviRuntimeInfo::name(), KviConfigurationFile::Read, KviConfigurationFile::readBoolEntry(), KviConfigurationFile::readEntry(), KviConfigurationFile::readUIntEntry(), removeAllScriptAppHandlers(), and KviConfigurationFile::setGroup().
Referenced by KviKvs::loadAppEvents().
| void KviKvsEventManager::loadRawEvents | ( | const QString & | szFileName | ) |
References KviPointerList< T >::append(), KviConfigurationFile::hasGroup(), i, KVI_KVS_NUM_RAW_EVENTS, m_rawEventTable, KviConfigurationFile::Read, KviConfigurationFile::readBoolEntry(), KviConfigurationFile::readEntry(), KviConfigurationFile::readUIntEntry(), removeAllScriptRawHandlers(), KviPointerList< T >::setAutoDelete(), KviKvsScriptEventHandler::setEnabled(), and KviConfigurationFile::setGroup().
Referenced by KviKvs::loadRawEvents().
|
inline |
Referenced by RawEditorWidget::oneTimeSetup().
| void KviKvsEventManager::removeAllModuleAppHandlers | ( | KviKvsModuleInterface * | i | ) |
References KviPointerList< T >::append(), KviPointerList< T >::first(), h, i, l, m_appEventTable, KviKvsEventHandler::Module, KviPointerList< T >::next(), KviPointerList< T >::setAutoDelete(), and KviKvsEventHandler::type().
Referenced by KviKvsModuleInterface::kvsUnregisterAllAppEventHandlers(), and removeAllModuleHandlers().
| void KviKvsEventManager::removeAllModuleHandlers | ( | KviKvsModuleInterface * | i | ) |
References removeAllModuleAppHandlers(), and removeAllModuleRawHandlers().
| void KviKvsEventManager::removeAllModuleRawHandlers | ( | KviKvsModuleInterface * | i | ) |
References KviPointerList< T >::append(), KviPointerList< T >::first(), h, i, l, m_rawEventTable, KviKvsEventHandler::Module, KviPointerList< T >::next(), KviPointerList< T >::setAutoDelete(), and KviKvsEventHandler::type().
Referenced by KviKvsModuleInterface::kvsUnregisterAllRawEventHandlers(), and removeAllModuleHandlers().
| void KviKvsEventManager::removeAllScriptAppHandlers | ( | ) |
References i, and m_appEventTable.
Referenced by KviKvs::clearAppEvents(), EventEditor::commit(), and loadAppEvents().
| void KviKvsEventManager::removeAllScriptRawHandlers | ( | ) |
References KviPointerList< T >::append(), e, KviPointerList< T >::first(), i, m_rawEventTable, KviPointerList< T >::next(), KviKvsEventHandler::Script, KviPointerList< T >::setAutoDelete(), and KviKvsEventHandler::type().
Referenced by KviKvs::clearRawEvents(), RawEditorWidget::commit(), and loadRawEvents().
| bool KviKvsEventManager::removeModuleAppHandler | ( | unsigned int | uEvIdx, |
| KviKvsModuleInterface * | i | ||
| ) |
| bool KviKvsEventManager::removeModuleRawHandler | ( | unsigned int | uRawIdx, |
| KviKvsModuleInterface * | i | ||
| ) |
| bool KviKvsEventManager::removeScriptAppHandler | ( | unsigned int | uEvIdx, |
| const QString & | szName | ||
| ) |
References KviQString::equalCI(), first(), h, KviKvsEvent::handlers(), KVI_KVS_NUM_APP_EVENTS, m_appEventTable, KviRuntimeInfo::name(), KviPointerList< T >::next(), KviKvsEvent::removeHandler(), KviKvsEventHandler::Script, and KviKvsEventHandler::type().
Referenced by KviKvsCoreCallbackCommands::KVSCCC().
| bool KviKvsEventManager::removeScriptRawHandler | ( | unsigned int | uEvIdx, |
| const QString & | szName | ||
| ) |
References KviQString::equalCI(), first(), h, KVI_KVS_NUM_RAW_EVENTS, m_rawEventTable, KviRuntimeInfo::name(), KviPointerList< T >::next(), KviPointerList< T >::removeRef(), KviKvsEventHandler::Script, and KviKvsEventHandler::type().
Referenced by KviKvsCoreCallbackCommands::KVSCCC(), and KviKvsCoreSimpleCommands::KVSCSC().
| void KviKvsEventManager::saveAppEvents | ( | const QString & | szFileName | ) |
References KviConfigurationFile::clear(), first(), KviKvsEvent::handlers(), KviConfigurationFile::hasGroup(), i, KVI_KVS_NUM_APP_EVENTS, m_appEventTable, KviRuntimeInfo::name(), KviPointerList< T >::next(), KviKvsEventHandler::Script, KviConfigurationFile::setGroup(), KviConfigurationFile::Write, and KviConfigurationFile::writeEntry().
Referenced by KviKvs::saveAppEvents().
| void KviKvsEventManager::saveRawEvents | ( | const QString & | szFileName | ) |
References KviConfigurationFile::clear(), first(), i, KVI_KVS_NUM_RAW_EVENTS, m_rawEventTable, KviRuntimeInfo::name(), KviPointerList< T >::next(), KviKvsEventHandler::Script, KviConfigurationFile::setGroup(), KviConfigurationFile::Write, and KviConfigurationFile::writeEntry().
Referenced by KviKvs::saveRawEvents().
|
inline |
|
inline |
| bool KviKvsEventManager::triggerHandlers | ( | KviPointerList< KviKvsEventHandler > * | pHandlers, |
| KviWindow * | pWnd, | ||
| KviKvsVariantList * | pParams | ||
| ) |
References __tr2qs_ctx(), KviMemory::copy(), eventHandlerDisabled(), KviPointerList< T >::first(), h, KviKvsScript::HaltEncountered, KVI_OPTION_BOOL, KVI_OUT_PARSERERROR, KviOption_boolDisableBrokenEventHandlers, m, KviKvsEventHandler::Module, KviKvsScript::name(), KviPointerList< T >::next(), KviWindow::output(), KviKvsScript::PreserveParams, KviKvsScript::run(), s, and KviKvsEventHandler::Script.
|
inline |
Referenced by KviIrcServerParser::parseMessage().
|
friend |
|
staticprotected |
|
staticprotected |
Referenced by KviKvsEventManager().
|
protected |
1.8.7