Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 328059 | Differences between
and this patch

Collapse All | Expand All

(-)plasma/generic/dataengines/time/timesource.cpp.orig (-4 / +4 lines)
Lines 175-181 Link Here
175
    return list.at(0);
175
    return list.at(0);
176
}
176
}
177
177
178
Sun* TimeSource::sun()
178
Sun* TimeSource::x_sun()
179
{
179
{
180
    if (!m_sun) {
180
    if (!m_sun) {
181
        m_sun = new Sun();
181
        m_sun = new Sun();
Lines 187-193 Link Here
187
Moon* TimeSource::moon()
187
Moon* TimeSource::moon()
188
{
188
{
189
    if (!m_moon) {
189
    if (!m_moon) {
190
        m_moon = new Moon(sun());
190
        m_moon = new Moon(x_sun());
191
    }
191
    }
192
    m_moon->setPosition(m_latitude, m_longitude);
192
    m_moon->setPosition(m_latitude, m_longitude);
193
    return m_moon;
193
    return m_moon;
Lines 216-222 Link Here
216
216
217
void TimeSource::addSolarPositionData(const QDateTime &dt)
217
void TimeSource::addSolarPositionData(const QDateTime &dt)
218
{
218
{
219
    Sun* s = sun();
219
    Sun* s = x_sun();
220
    s->calcForDateTime(dt, m_offset);
220
    s->calcForDateTime(dt, m_offset);
221
    setData("Azimuth", s->azimuth());
221
    setData("Azimuth", s->azimuth());
222
    setData("Zenith", 90.0 - s->altitude());
222
    setData("Zenith", 90.0 - s->altitude());
Lines 225-231 Link Here
225
225
226
void TimeSource::addDailySolarPositionData(const QDateTime &dt)
226
void TimeSource::addDailySolarPositionData(const QDateTime &dt)
227
{
227
{
228
    Sun* s = sun();
228
    Sun* s = x_sun();
229
    QList< QPair<QDateTime, QDateTime> > times = s->timesForAngles(
229
    QList< QPair<QDateTime, QDateTime> > times = s->timesForAngles(
230
            QList<double>() << -0.833 << -6.0 << -12.0 << -18.0, dt, m_offset);
230
            QList<double>() << -0.833 << -6.0 << -12.0 << -18.0, dt, m_offset);
231
231

Return to bug 328059