Esempio n. 1
0
KTimeZone KTimeZones::zone(const QString &name) const
{
    if (!name.isEmpty())
    {
        ZoneMap::ConstIterator it = d->zones.constFind(name);
        if (it != d->zones.constEnd())
            return it.value();
        if (name == KTimeZone::utc().name())
            return KTimeZone::utc();
    }
    return KTimeZone();    // error
}
Esempio n. 2
0
KTimeZone KTimeZones::remove(const QString &name)
{
    if (!name.isEmpty())
    {
        ZoneMap::Iterator it = d->zones.find(name);
        if (it != d->zones.end())
        {
            KTimeZone zone = it.value();
            d->zones.erase(it);
            return zone;
        }
    }
    return KTimeZone();
}
Esempio n. 3
0
KTimeZone KTimeZones::remove(const KTimeZone &zone)
{
    if (zone.isValid())
    {
        for (ZoneMap::Iterator it = d->zones.begin(), end = d->zones.end();  it != end;  ++it)
        {
            if (it.value() == zone)
            {
                d->zones.erase(it);
                return zone;
            }
        }
    }
    return KTimeZone();
}
void
CityWeather::clear()
{
    m_sCity.clear();
    m_sCountry.clear();
    m_sCountryCode.clear();
    m_sExtraData.clear();
    m_sProvider.clear();
    m_sLocalizedCity.clear();
    m_lastUpdate = QDateTime();
    m_satelliteImage = QImage();
    deleteAllDays();

    m_sCredit.clear();
    m_sCreditUrl.clear();

    m_timeZone = KTimeZone();
}