コード例 #1
0
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);
        }
    }
}
コード例 #2
0
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());
}
コード例 #3
0
ファイル: paneltabbar.cpp プロジェクト: KDE/krusader
ListPanel* PanelTabBar::removeCurrentPanel(ListPanel* &panelToDelete)
{
    return removePanel(currentIndex(), panelToDelete);
}