KVIrc
4.9.2
DeveloperAPIs
|
#include <KviKvsPopupMenu.h>
Signals | |
void | testModeItemClicked (KviKvsPopupMenuItem *it) |
Public Member Functions | |
void | addEpilogue (const QString &szItemName, const QString &szCode) |
void | addExtPopup (const QString &szItemName, const QString &szPopupName, const QString &szText, const QString &szIcon, const QString &szCondition) |
void | addItem (const QString &szItemName, const QString &szCode, const QString &szText, const QString &szIcon, const QString &szCondition) |
void | addLabel (const QString &szItemName, const QString &szText, const QString &szIcon, const QString &szCondition) |
KviKvsPopupMenu * | addPopup (const QString &szItemName, const QString &szText, const QString &szIcon, const QString &szCondition) |
void | addPrologue (const QString &szItemName, const QString &szCode) |
void | addSeparator (const QString &szItemName, const QString &szCondition) |
void | copyFrom (const KviKvsPopupMenu *src) |
void | doClear () |
void | doPopup (const QPoint &pnt, KviWindow *wnd, KviKvsVariantList *pParams, bool bTestMode=false) |
KviPointerList< KviKvsScript > * | epilogues () |
KviKvsPopupMenu * | findChildPopupByName (const QString &szItemName) |
void | generateDefPopup (QString &buffer) |
void | generateDefPopupCore (QString &buffer) |
bool | isEmpty () |
bool | isHardLocked () |
bool | isSoftLocked () |
KviPointerList < KviKvsPopupMenuItem > * | itemList () |
KviKvsPopupMenu (const QString &szName) | |
void | lock (KviKvsPopupMenuTopLevelData::LockStatus eLock) |
KviKvsPopupMenu * | parentPopup () |
const QString & | popupName () |
KviPointerList< KviKvsScript > * | prologues () |
bool | removeItemByName (const QString &szItemName, bool bRecursive) |
void | setParentPopup (KviKvsPopupMenu *par) |
void | setPopupName (const QString &szName) |
KviKvsPopupMenuTopLevelData * | topLevelData () |
KviKvsPopupMenu * | topLevelPopup () |
~KviKvsPopupMenu () | |
Protected Slots | |
void | itemClicked (QAction *pAction) |
Protected Member Functions | |
void | addItemInternal (KviKvsPopupMenuItem *it) |
void | clearMenuContents () |
void | executeEpilogues (KviKvsPopupMenuTopLevelData *pData) |
void | executePrologues (KviKvsPopupMenuTopLevelData *pData) |
void | load (const QString &prefix, KviConfigurationFile *cfg) |
void | save (const QString &prefix, KviConfigurationFile *cfg) |
Protected Attributes | |
KviPointerList < KviKvsPopupMenuItem > * | m_pItemList |
Private Slots | |
void | setupMenuContents () |
Private Attributes | |
bool | m_bSetupDone |
KviPointerList< KviKvsScript > * | m_pEpilogues |
KviKvsPopupMenu * | m_pParentPopup |
KviPointerList< KviKvsScript > * | m_pPrologues |
KviKvsPopupMenuTopLevelData * | m_pTempTopLevelData |
KviKvsPopupMenuTopLevelData * | m_pTopLevelData |
QString | m_szName |
Friends | |
class | KviKvsPopupManager |
class | KviKvsPopupMenuItemMenu |
class | KviSinglePopupEditor |
KviKvsPopupMenu::KviKvsPopupMenu | ( | const QString & | szName | ) |
References connect(), itemClicked(), m_bSetupDone, m_pEpilogues, m_pItemList, m_pParentPopup, m_pPrologues, m_pTempTopLevelData, m_pTopLevelData, m_szName, KviPointerList< T >::setAutoDelete(), and setupMenuContents().
Referenced by addPopup().
KviKvsPopupMenu::~KviKvsPopupMenu | ( | ) |
References clearMenuContents(), m_pEpilogues, m_pItemList, m_pPrologues, m_pTempTopLevelData, and m_pTopLevelData.
void KviKvsPopupMenu::addEpilogue | ( | const QString & | szItemName, |
const QString & | szCode | ||
) |
References KviPointerList< T >::append(), KviPointerList< T >::count(), m_pEpilogues, m_pPrologues, and m_szName.
Referenced by SinglePopupEditor::addItemToMenu(), KviKvsTreeNodeSpecialCommandDefpopupLabelEpilogue::execute(), and load().
void KviKvsPopupMenu::addExtPopup | ( | const QString & | szItemName, |
const QString & | szPopupName, | ||
const QString & | szText, | ||
const QString & | szIcon, | ||
const QString & | szCondition | ||
) |
References addItemInternal(), and m_szName.
Referenced by SinglePopupEditor::addItemToMenu(), KviKvsTreeNodeSpecialCommandDefpopupLabelExtpopup::execute(), and load().
void KviKvsPopupMenu::addItem | ( | const QString & | szItemName, |
const QString & | szCode, | ||
const QString & | szText, | ||
const QString & | szIcon, | ||
const QString & | szCondition | ||
) |
References addItemInternal(), KviPointerList< T >::count(), m_pItemList, and m_szName.
Referenced by SinglePopupEditor::addItemToMenu(), KviKvsTreeNodeSpecialCommandDefpopupLabelItem::execute(), and load().
|
protected |
References KviPointerList< T >::append(), isHardLocked(), and m_pItemList.
Referenced by addExtPopup(), addItem(), addLabel(), addPopup(), addSeparator(), and copyFrom().
void KviKvsPopupMenu::addLabel | ( | const QString & | szItemName, |
const QString & | szText, | ||
const QString & | szIcon, | ||
const QString & | szCondition | ||
) |
References addItemInternal(), KviPointerList< T >::count(), m_pItemList, and m_szName.
Referenced by SinglePopupEditor::addItemToMenu(), KviKvsTreeNodeSpecialCommandDefpopupLabelLabel::execute(), and load().
KviKvsPopupMenu * KviKvsPopupMenu::addPopup | ( | const QString & | szItemName, |
const QString & | szText, | ||
const QString & | szIcon, | ||
const QString & | szCondition | ||
) |
void KviKvsPopupMenu::addPrologue | ( | const QString & | szItemName, |
const QString & | szCode | ||
) |
References KviPointerList< T >::append(), KviPointerList< T >::count(), m_pPrologues, and m_szName.
Referenced by SinglePopupEditor::addItemToMenu(), KviKvsTreeNodeSpecialCommandDefpopupLabelPrologue::execute(), and load().
void KviKvsPopupMenu::addSeparator | ( | const QString & | szItemName, |
const QString & | szCondition | ||
) |
References addItemInternal(), KviPointerList< T >::count(), m_pItemList, and m_szName.
Referenced by SinglePopupEditor::addItemToMenu(), KviKvsTreeNodeSpecialCommandDefpopupLabelSeparator::execute(), and load().
|
protected |
References clear(), KviPointerList< T >::first(), m_bSetupDone, m_pItemList, m_pTempTopLevelData, m_pTopLevelData, and KviPointerList< T >::next().
Referenced by KviKvsPopupMenuItemMenu::clear(), doPopup(), setupMenuContents(), and ~KviKvsPopupMenu().
void KviKvsPopupMenu::copyFrom | ( | const KviKvsPopupMenu * | src | ) |
References addItemInternal(), KviPointerList< T >::append(), doClear(), KviPointerList< T >::first(), m_pEpilogues, m_pItemList, m_pPrologues, and KviPointerList< T >::next().
Referenced by KviKvsPopupMenuItemMenu::clone(), PopupEditorWidget::commit(), KviKvsPopupMenuItemExtMenu::fill(), PopupEditorWidget::oneTimeSetup(), and PopupEditorWidget::popupRefresh().
void KviKvsPopupMenu::doClear | ( | ) |
References clear(), KviPointerList< T >::clear(), m_bSetupDone, m_pEpilogues, m_pItemList, m_pPrologues, m_pTempTopLevelData, and m_pTopLevelData.
Referenced by PopupEditorWidget::commit(), copyFrom(), KviKvsTreeNodeSpecialCommandDefpopup::execute(), and load().
void KviKvsPopupMenu::doPopup | ( | const QPoint & | pnt, |
KviWindow * | wnd, | ||
KviKvsVariantList * | pParams, | ||
bool | bTestMode = false |
||
) |
References clearMenuContents(), m_pTempTopLevelData, and KviKvsPopupMenuTopLevelData::setTestMode().
Referenced by popup_kvs_cmd_show(), and SinglePopupEditor::testPopup().
|
inline |
Referenced by SinglePopupEditor::populateMenu().
|
protected |
References __tr2qs_ctx(), KviKvsPopupMenuTopLevelData::extendedRunTimeData(), KviPointerList< T >::first(), KVI_OUT_PARSERWARNING, m_pEpilogues, m_szName, KviPointerList< T >::next(), KviWindow::output(), KviKvsPopupMenuTopLevelData::parameters(), KviKvsScript::PreserveParams, s, and KviKvsPopupMenuTopLevelData::window().
Referenced by setupMenuContents().
|
protected |
References __tr2qs_ctx(), KviKvsPopupMenuTopLevelData::extendedRunTimeData(), KviPointerList< T >::first(), KVI_OUT_PARSERWARNING, m_pPrologues, m_szName, KviPointerList< T >::next(), KviWindow::output(), KviKvsPopupMenuTopLevelData::parameters(), KviKvsScript::PreserveParams, s, and KviKvsPopupMenuTopLevelData::window().
Referenced by setupMenuContents().
KviKvsPopupMenu * KviKvsPopupMenu::findChildPopupByName | ( | const QString & | szItemName | ) |
References KviQString::equalCI(), KviPointerList< T >::first(), m_pItemList, and KviPointerList< T >::next().
Referenced by KviKvsTreeNodeSpecialCommandDefpopupLabelPopup::execute(), and popup_kvs_fnc_exists().
void KviKvsPopupMenu::generateDefPopup | ( | QString & | buffer | ) |
References KviCommandFormatter::blockFromBuffer(), generateDefPopupCore(), and m_szName.
Referenced by PopupEditorWidget::exportCurrentPopup(), and PopupEditorWidget::exportPopups().
void KviKvsPopupMenu::generateDefPopupCore | ( | QString & | buffer | ) |
References KviQString::appendFormatted(), KviCommandFormatter::blockFromBuffer(), KviKvsScript::code(), KviKvsPopupMenuItem::ExtMenu, KviPointerList< T >::first(), KviKvsPopupMenuItem::Item, KviKvsPopupMenuItem::Label, m_pEpilogues, m_pItemList, m_pPrologues, KviKvsPopupMenuItem::Menu, KviPointerList< T >::next(), s, and KviKvsPopupMenuItem::Separator.
Referenced by generateDefPopup().
|
inline |
bool KviKvsPopupMenu::isHardLocked | ( | ) |
References d, KviKvsPopupMenuTopLevelData::isHardLocked(), topLevelData(), and topLevelPopup().
Referenced by addItemInternal(), KviKvsTreeNodeSpecialCommandDefpopup::execute(), and KviKvsPopupMenuItemExtMenu::fill().
bool KviKvsPopupMenu::isSoftLocked | ( | ) |
References d, KviKvsPopupMenuTopLevelData::isSoftLocked(), topLevelData(), and topLevelPopup().
Referenced by popup_kvs_cmd_destroy(), and popup_kvs_cmd_show().
|
protectedslot |
References KviApplication::activeConsole(), KviPointerList< T >::at(), d, KviKvsPopupMenuTopLevelData::extendedRunTimeData(), g_pApp, KviKvsPopupMenuTopLevelData::HardLocked, KviKvsPopupMenuItem::isItem(), lock(), m_pItemList, KviKvsPopupMenuItem::name(), KviKvsPopupMenuTopLevelData::parameters(), KviKvsScript::PreserveParams, KviKvsExtendedRunTimeData::setPopupId(), KviKvsPopupMenuTopLevelData::setWindow(), KviKvsPopupMenuTopLevelData::testMode(), testModeItemClicked(), topLevelData(), KviKvsPopupMenuTopLevelData::Unlocked, KviKvsPopupMenuTopLevelData::window(), and KviApplication::windowExists().
Referenced by KviKvsPopupMenu().
|
inline |
Referenced by SinglePopupEditor::populateMenu().
|
protected |
References addEpilogue(), addExtPopup(), addItem(), addLabel(), addPopup(), addPrologue(), addSeparator(), doClear(), load(), KviConfigurationFile::readEntry(), KviConfigurationFile::readIntEntry(), and KviRuntimeInfo::type().
Referenced by KviKvsPopupManager::load(), and load().
void KviKvsPopupMenu::lock | ( | KviKvsPopupMenuTopLevelData::LockStatus | eLock | ) |
References d, KviKvsPopupMenuTopLevelData::setLocked(), and topLevelData().
Referenced by itemClicked(), and setupMenuContents().
|
inline |
Referenced by setupMenuContents(), topLevelData(), and topLevelPopup().
|
inline |
Referenced by KviKvsPopupMenuItemMenu::clone(), PopupEditorWidget::commit(), SinglePopupEditor::edit(), PopupEditorWidget::exportCurrentPopup(), KviKvsPopupMenuItemExtMenu::fill(), PopupEditorWidget::getUniquePopupName(), MenuTreeWidgetItem::MenuTreeWidgetItem(), PopupEditorWidget::oneTimeSetup(), PopupEditorWidget::popupRefresh(), KviKvsPopupManager::save(), and PopupEditorWidget::saveLastEditedItem().
|
inline |
Referenced by SinglePopupEditor::populateMenu().
bool KviKvsPopupMenu::removeItemByName | ( | const QString & | szItemName, |
bool | bRecursive | ||
) |
|
protected |
References KviKvsScript::code(), KviPointerList< T >::count(), KviKvsPopupMenuItem::ExtMenu, KviPointerList< T >::first(), KviKvsPopupMenuItem::Item, KviKvsPopupMenuItem::Label, m_pEpilogues, m_pItemList, m_pPrologues, KviKvsPopupMenuItem::Menu, KviKvsScript::name(), KviPointerList< T >::next(), s, KviKvsPopupMenuItem::Separator, and KviConfigurationFile::writeEntry().
Referenced by KviKvsPopupManager::save().
|
inline |
Referenced by addPopup(), KviKvsPopupMenuItemMenu::fill(), and KviKvsPopupMenuItemExtMenu::fill().
|
inline |
Referenced by PopupEditorWidget::saveLastEditedItem().
|
privateslot |
References KviApplication::activeConsole(), clear(), clearMenuContents(), d, executeEpilogues(), executePrologues(), KviPointerList< T >::first(), g_pActiveWindow, g_pApp, KviKvsPopupMenuTopLevelData::HardLocked, lock(), m_bSetupDone, m_pItemList, m_pTempTopLevelData, m_pTopLevelData, KviPointerList< T >::next(), parentPopup(), KviKvsPopupMenuTopLevelData::setWindow(), KviKvsPopupMenuTopLevelData::SoftLocked, KviKvsPopupMenuTopLevelData::testMode(), topLevelData(), KviKvsPopupMenuTopLevelData::Unlocked, KviKvsPopupMenuTopLevelData::window(), and KviApplication::windowExists().
Referenced by KviKvsPopupMenu().
|
signal |
Referenced by itemClicked().
KviKvsPopupMenuTopLevelData * KviKvsPopupMenu::topLevelData | ( | ) |
References m_pTopLevelData, parentPopup(), and topLevelData().
Referenced by isHardLocked(), isSoftLocked(), itemClicked(), lock(), setupMenuContents(), and topLevelData().
KviKvsPopupMenu * KviKvsPopupMenu::topLevelPopup | ( | ) |
References parentPopup().
Referenced by isHardLocked(), and isSoftLocked().
|
friend |
|
friend |
Referenced by addPopup().
|
friend |
|
private |
Referenced by clearMenuContents(), doClear(), KviKvsPopupMenu(), and setupMenuContents().
|
private |
Referenced by addEpilogue(), copyFrom(), doClear(), executeEpilogues(), generateDefPopupCore(), KviKvsPopupMenu(), removeItemByName(), save(), and ~KviKvsPopupMenu().
|
protected |
|
private |
Referenced by KviKvsPopupMenu().
|
private |
Referenced by addEpilogue(), addPrologue(), copyFrom(), doClear(), executePrologues(), generateDefPopupCore(), KviKvsPopupMenu(), removeItemByName(), save(), and ~KviKvsPopupMenu().
|
private |
Referenced by clearMenuContents(), doClear(), doPopup(), KviKvsPopupMenu(), setupMenuContents(), and ~KviKvsPopupMenu().
|
private |
Referenced by clearMenuContents(), doClear(), KviKvsPopupMenu(), setupMenuContents(), topLevelData(), and ~KviKvsPopupMenu().
|
private |
Referenced by addEpilogue(), addExtPopup(), addItem(), addLabel(), addPopup(), addPrologue(), addSeparator(), executeEpilogues(), executePrologues(), generateDefPopup(), and KviKvsPopupMenu().