void WikipediaItem::openBrowser( ) { if ( m_marbleWidget ) { PopupLayer* popup = m_marbleWidget->popupLayer(); popup->setCoordinates( coordinate(), Qt::AlignRight | Qt::AlignVCenter ); popup->setSize(QSizeF(520, 570)); popup->setUrl( url() ); popup->popup(); } else { if ( !m_browser ) { m_browser = new TinyWebBrowser(); } m_browser->load( url() ); m_browser->show(); } }
void PhotoPluginItem::openBrowser() { if ( m_marbleWidget ) { PopupLayer* popup = m_marbleWidget->popupLayer(); popup->setCoordinates( coordinate(), Qt::AlignRight | Qt::AlignVCenter ); popup->setSize( QSizeF( 700, 450 ) ); popup->setUrl( QUrl( QString( "http://m.flickr.com/photos/%1/%2/" ) .arg( owner() ).arg( id() ) ) ); popup->setVisible( true ); } else { if( !m_browser ) { m_browser = new TinyWebBrowser(); } QString url = "http://www.flickr.com/photos/%1/%2/"; m_browser->load( QUrl( url.arg( owner() ).arg( id() ) ) ); m_browser->show(); } }