~ubuntu-sdk-team/ubuntu-ui-toolkit/orientationManual

« back to all changes in this revision

Viewing changes to modules/Ubuntu/Components/plugin/adapters/alarmsadapter_p.h

  • Committer: CI Train Bot
  • Author(s): Leo Arias, Christian Dywan, Nekhelesh Ramananthan, Tim Peeters, Zoltán Balogh
  • Date: 2015-03-27 12:35:52 UTC
  • mfrom: (1000.433.19 last_bugfix_vivid)
  • Revision ID: ci-train-bot@canonical.com-20150327123552-mdwg6mecr05akf0q
The very last bugfix landing for Vivid

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    bool wait(int msec);
59
59
    void completeSave();
60
60
    void completeCancel();
 
61
    void copyAlarmData(const UCAlarm &other);
61
62
 
62
63
// adaptation specific data
63
64
    void adjustDowSettings(UCAlarm::AlarmType type, UCAlarm::DaysOfWeek days);
69
70
        return event;
70
71
    }
71
72
    void setData(const QOrganizerTodo &data);
72
 
    void copyData(const UCAlarm &other);
73
73
 
74
74
protected:
75
75
    QOrganizerTodo event;
108
108
        UCAlarm *oldAlarm = takeAt(index);
109
109
        // copy the other alarm data
110
110
        AlarmDataAdapter *pAlarm = static_cast<AlarmDataAdapter*>(AlarmDataAdapter::get(oldAlarm));
111
 
        pAlarm->copyData(alarm);
 
111
        pAlarm->copyAlarmData(alarm);
112
112
        // and insert it back
113
113
        QDateTime dt = oldAlarm->date();
114
114
        QOrganizerItemId id = oldAlarm->cookie().value<QOrganizerItemId>();
123
123
        QOrganizerItemId id = alarm.cookie().value<QOrganizerItemId>();
124
124
        idHash.insert(id, dt);
125
125
        UCAlarm *newAlarm = new UCAlarm;
126
 
        static_cast<AlarmDataAdapter*>(AlarmDataAdapter::get(newAlarm))->copyData(alarm);
 
126
        UCAlarmPrivate::get(newAlarm)->copyAlarmData(alarm);
127
127
        data.insert(QPair<QDateTime, QOrganizerItemId>(dt, id), newAlarm);
128
128
        return indexOf(id);
129
129
    }
140
140
        UCAlarm *alarm = takeAt(index);
141
141
        delete alarm;
142
142
    }
 
143
 
 
144
protected:
143
145
    // removes alarm data at index and returns the alarm pointer
144
146
    UCAlarm *takeAt(int index)
145
147
    {