Logo Search packages:      
Sourcecode: akregator version File versions

void View::slotOpenTab ( const KURL &  url,
bool  background = false 
) [slot]

opens a page viewer in a new tab and loads an URL

Parameters:
url the url to load
background whether the tab should be opened in the background or in the foreground (activated after creation)

Definition at line 305 of file akregator_view.cpp.

References m_tabs, and slotTabCaption().

Referenced by slotMouseButtonPressed(), slotOpenCurrentArticle(), slotOpenCurrentArticleBackgroundTab(), slotOpenHomepage(), and View().

{
    PageViewer* page = new PageViewer(this, "page");
    connect( m_part, SIGNAL(signalSettingsChanged()), page, SLOT(slotPaletteOrFontChanged()));
    
    connect( page, SIGNAL(setTabIcon(const QPixmap&)),
            this, SLOT(setTabIcon(const QPixmap&)));
    connect( page, SIGNAL(setWindowCaption (const QString &)),
            this, SLOT(slotTabCaption (const QString &)) );
    connect( page, SIGNAL(urlClicked(const KURL &,bool)),
            this, SLOT(slotOpenTab(const KURL &,bool)) );

    Frame *frame=new Frame(this, page, page->widget(), i18n("Untitled"));
    connectFrame(frame);
    m_tabs->addFrame(frame);

    if(!background)
        m_tabs->showPage(page->widget());
    else
        setFocus();
    
    //if (m_tabs->count() > 1 && m_tabs->currentPageIndex() != 0)
//        m_tabsClose->setEnabled(true);
    page->openURL(url);
}


Generated by  Doxygen 1.6.0   Back to index