Esempio n. 1
0
Station
DragMimeData::station() const
{
    Station station;
    station.setUrl( QString::fromUtf8( data( "item/station" ) ) );
    return station;
}
Esempio n. 2
0
QList<Station>
LastFmUserSettings::recentStations()
{
    MyQSettings s( this );

    s.beginGroup( "RecentStations" );
    QStringList const keys = s.childKeys();
    s.endGroup();

    QMap<int, Station> stations;
    foreach (QString key, keys) {
        Station station;
        station.setUrl( s.value( "RecentStations/" + key ).toString() );
        station.setName( s.value( "StationNames/" + station.url() ).toString() );
        stations[key.toInt()] = station;
    }