102 void addDiscardAction(); |
104 void addDiscardAction(); |
103 AgendaEntry* editedEntry(); |
105 AgendaEntry* editedEntry(); |
104 AgendaEntry* originalEntry(); |
106 AgendaEntry* originalEntry(); |
105 bool isNewEntry(); |
107 bool isNewEntry(); |
106 HbDataFormModelItem* allDayCheckBoxItem(); |
108 HbDataFormModelItem* allDayCheckBoxItem(); |
107 |
109 bool isReminderTimeForAllDayAdded(); |
|
110 bool isAllDayEvent(); |
|
111 void updateReminderChoices(); |
|
112 int currentIndexOfReminderField(); |
|
113 void setCurrentIndexOfReminderField(int index); |
|
114 void setReminderChoices(); |
|
115 bool isEditRangeThisOnly(); |
|
116 bool isAllDayFieldAdded(); |
108 private: |
117 private: |
109 void edit(const QFile &handle, bool launchCalendar); |
118 void edit(const QFile &handle, bool launchCalendar); |
110 void edit(AgendaEntry entry, bool launchCalendar); |
119 void edit(AgendaEntry entry, bool launchCalendar); |
111 void edit(ulong id, bool launchCalendar); |
120 void edit(ulong id, bool launchCalendar); |
112 void create(CalenEditor::CreateType type, QDateTime newEntryDateTime, |
121 void create(CalenEditor::CreateType type, QDateTime newEntryDateTime, |
113 bool launchCalendar); |
122 bool launchCalendar); |
114 void create(CalenEditor::CreateType type, AgendaEntry entry, |
123 void create(CalenEditor::CreateType type, AgendaEntry entry, |
115 bool launchCalendar); |
124 bool launchCalendar); |
|
125 void openEditor(AgendaEntry entry); |
116 void showEditor(AgendaEntry entry); |
126 void showEditor(AgendaEntry entry); |
117 void showEditOccurencePopup(); |
127 void showEditOccurencePopup(); |
118 void setUpView(); |
128 void setUpView(); |
119 void initModel(); |
129 void initModel(); |
120 void addSubjectItem(); |
130 void addSubjectItem(); |
133 void populateCustomItemLocation(); |
143 void populateCustomItemLocation(); |
134 void populateLocationItem(); |
144 void populateLocationItem(); |
135 void populateRepeatItem(); |
145 void populateRepeatItem(); |
136 void populateDescriptionItem(); |
146 void populateDescriptionItem(); |
137 void removeDescriptionItem(); |
147 void removeDescriptionItem(); |
138 void closeEditor(); |
|
139 |
148 |
140 bool isChild() const ; |
149 bool isChild() const ; |
141 |
150 |
142 Action handleDone(); |
151 Action handleDone(); |
143 bool saveEntry(); |
152 bool saveEntry(); |
144 void deleteEntry(bool close = false); |
153 void deleteEntry(bool close = false); |
145 bool handleAllDayToSave(); |
154 bool handleAllDayToSave(); |
146 void enableFromTotimeFileds(bool, QDateTime, QDateTime); |
155 void enableFromTotimeFileds(bool, QDateTime, QDateTime); |
147 int showDeleteConfirmationQuery(); |
|
148 |
156 |
149 private slots: |
157 private slots: |
150 void handleSubjectChange(const QString subject); |
158 void handleSubjectChange(const QString subject); |
151 void handleAllDayChange(int state); |
159 void handleAllDayChange(int state); |
152 void saveFromDateTime(QDateTime& fromDateTime); |
160 void saveFromDateTime(QDateTime& fromDateTime); |
153 void saveToDateTime(QDateTime& toDateTime); |
161 void saveToDateTime(QDateTime& toDateTime); |
154 void handleLocationChange(const QString location); |
162 void handleLocationChange(const QString location); |
|
163 void handleLocationChange(const QString location, |
|
164 const double geoLatitude, const double geoLongitude); |
155 void handleDescriptionChange(const QString description); |
165 void handleDescriptionChange(const QString description); |
156 void saveAndCloseEditor(); |
166 void saveAndCloseEditor(); |
|
167 void showDeleteConfirmationQuery(bool closeEditor = false); |
157 void handleDeleteAction(); |
168 void handleDeleteAction(); |
158 void launchSettingsView(); |
169 void launchSettingsView(); |
159 void discardChanges(); |
170 void discardChanges(); |
160 void handleDescriptionAction(); |
171 void handleDescriptionAction(); |
161 void handleEditOccurence(int index); |
172 void handleEditOccurence(int index); |
162 void handleCancel(); |
173 void handleCancel(); |
163 void handleCalendarLaunchError(int error); |
174 void handleCalendarLaunchError(int error); |
|
175 void closeEditor(); |
|
176 void handleLocationEditingFinished(); |
|
177 void selectEditingFinishedAction(HbAction* action); |
164 |
178 |
165 private: |
179 private: |
166 enum EditRange { |
180 enum EditRange { |
167 ThisOnly, |
181 ThisOnly, |
168 ThisAndAll, |
182 ThisAndAll, |
169 UserCancelled |
183 UserCancelled |
170 }; |
184 }; |
171 |
185 |
172 CalenEditor *q_ptr; |
186 CalenEditor *q_ptr; |
173 AgendaUtil *mAgendaUtil; |
187 QPointer<AgendaUtil> mAgendaUtil; |
174 |
188 |
175 CalenEditorDocLoader *mEditorDocLoader; |
189 CalenEditorDocLoader *mEditorDocLoader; |
176 HbView *mEditorView; |
190 HbView *mEditorView; |
177 CalenEditorDataHandler* mDataHandler; |
191 CalenEditorDataHandler* mDataHandler; |
178 HbDataForm *mCalenEditorForm; |
192 HbDataForm *mCalenEditorForm; |
189 HbDataFormModelItem *mDescriptionItem; |
203 HbDataFormModelItem *mDescriptionItem; |
190 |
204 |
191 EditRange mEditRange; |
205 EditRange mEditRange; |
192 |
206 |
193 QDateTime mNewEntryDateTime; |
207 QDateTime mNewEntryDateTime; |
194 |
208 |
|
209 AgendaEntry mEntry; |
195 AgendaEntry *mOriginalEntry; |
210 AgendaEntry *mOriginalEntry; |
196 AgendaEntry *mEditedEntry; |
211 AgendaEntry *mEditedEntry; |
197 |
212 |
198 HbAction *mSoftKeyAction; |
213 HbAction *mSoftKeyAction; |
199 HbAction *mDescriptionAction; |
214 HbAction *mDescriptionAction; |
200 HbMainWindow *mMainWindow; |
215 HbMainWindow *mMainWindow; |
201 QTranslator *mTranslator; |
216 HbTranslator *mTranslator; |
202 |
217 |
203 bool mNewEntry; |
218 bool mNewEntry; |
204 bool mDescriptionItemAdded; |
219 bool mDescriptionItemAdded; |
205 bool mIsChild; |
220 bool mIsChild; |
206 bool mIsAllDayItemAdded; |
221 bool mIsAllDayItemAdded; |