Пример #1
0
void BBCWeatherService::getItem( const QString &id )
{
    if ( id.startsWith( QLatin1String( "bbc" ) ) ) {
        BBCStation const station = m_itemGetter->station( id );
        if ( station.bbcId() > 0 ) {
            createItem( station );
        }
    }
}
Пример #2
0
void BBCWeatherService::createItem( BBCStation station )
{
    BBCWeatherItem *item = new BBCWeatherItem( this );
    item->setMarbleWidget( marbleWidget() );
    item->setBbcId( station.bbcId() );
    item->setCoordinate( station.coordinate() );
    item->setPriority( station.priority() );
    item->setStationName( station.name() );

    emit requestedDownload( item->observationUrl(), "bbcobservation", item );
    emit requestedDownload( item->forecastUrl(),    "bbcforecast",    item );
}