void LLScrollingPanelList::removePanel(LLScrollingPanel* panel) { U32 index = 0; LLScrollingPanelList::panel_list_t::const_iterator iter; if (!mPanelList.empty()) { for (iter = mPanelList.begin(); iter != mPanelList.end(); ++iter, ++index) { if (*iter == panel) { break; } } if(iter != mPanelList.end()) { removePanel(index); } } }
void KeyboardApplet::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) { HPopupMenu menu; menu.addTitle("Keyboard Applet"); menu.addAction(QIcon::fromTheme("preferences-desktop-keyboard"), "Configure keyboard", this, SLOT(showConfigurationDialog())); menu.addTitle("Panel"); menu.addAction(QIcon::fromTheme("preferences-desktop"), "Configure Panel", m_panelWindow, SLOT(showConfigurationDialog())); menu.addAction(QIcon::fromTheme("list-add"), "Add Panel", QApplication::instance(), SLOT(addPanel())); menu.addAction(QIcon::fromTheme("list-remove"), "Remove Panel", m_panelWindow, SLOT(removePanel())); menu.exec(event->screenPos()); }
ListPanel* PanelTabBar::removeCurrentPanel(ListPanel* &panelToDelete) { return removePanel(currentIndex(), panelToDelete); }