25 To view entry in agenda event viewer plugin. |
25 To view entry in agenda event viewer plugin. |
26 To delete this class object use deleteLater(). |
26 To delete this class object use deleteLater(). |
27 */ |
27 */ |
28 |
28 |
29 /*! |
29 /*! |
30 \fn void AgendaEventViewerPlugin::viewingCompleted(bool status = true) |
30 \fn void AgendaEventViewerPlugin::viewingCompleted(const QDate date = QDate()) |
31 |
31 |
32 Signal is emitted when viewing of the agenda entry is complete |
32 Signal is emitted when viewing of the agenda entry is complete |
|
33 Returns QDate for calendar application so it has proper context to set. |
33 After receiving this signal use deleteLater() to detele this class object. |
34 After receiving this signal use deleteLater() to detele this class object. |
34 |
35 |
35 */ |
36 */ |
36 |
37 |
37 /*! |
38 /*! |
148 } else { |
149 } else { |
149 mEventViewer = new AgendaEventViewer(this); |
150 mEventViewer = new AgendaEventViewer(this); |
150 } |
151 } |
151 |
152 |
152 if (mEventViewer) { |
153 if (mEventViewer) { |
153 connect(mEventViewer, SIGNAL(viewingCompleted(bool)), this, |
154 connect(mEventViewer, SIGNAL(viewingCompleted(const QDate)), this, |
154 SLOT(handleViewingCompleted(bool))); |
155 SLOT(handleViewingCompleted(const QDate))); |
155 connect(mEventViewer, SIGNAL(editingStarted()), this, |
156 connect(mEventViewer, SIGNAL(editingStarted()), this, |
156 SLOT(handleEditingStarted())); |
157 SLOT(handleEditingStarted())); |
157 connect(mEventViewer, SIGNAL(editingCompleted()), this, |
158 connect(mEventViewer, SIGNAL(editingCompleted()), this, |
158 SLOT(handleEditingCompleted())); |
159 SLOT(handleEditingCompleted())); |
159 connect(mEventViewer, SIGNAL(deletingStarted()), this, |
160 connect(mEventViewer, SIGNAL(deletingStarted()), this, |
180 return AgendaEventViewer::ActionEditDelete; |
181 return AgendaEventViewer::ActionEditDelete; |
181 case EventViewerPluginInterface::ActionSave: |
182 case EventViewerPluginInterface::ActionSave: |
182 return AgendaEventViewer::ActionSave; |
183 return AgendaEventViewer::ActionSave; |
183 } |
184 } |
184 |
185 |
185 return AgendaEventViewer::ActionEditDelete; |
186 return AgendaEventViewer::ActionNothing; |
186 } |
187 } |
187 |
188 |
188 /*! |
189 /*! |
189 Emits the signal viewing completed to the clients |
190 Emits the signal viewing completed to the clients |
190 |
191 |
191 \param status true if viewing completed otherwise false. |
192 \param status true if viewing completed otherwise false. |
192 */ |
193 */ |
193 void AgendaEventViewerPlugin::handleViewingCompleted(bool status) |
194 void AgendaEventViewerPlugin::handleViewingCompleted(const QDate date) |
194 { |
195 { |
195 Q_UNUSED(status) |
196 emit viewingCompleted(date); |
196 emit viewingCompleted(); |
|
197 |
197 |
198 // Cleanup viewer. |
198 // Cleanup viewer. |
199 if (mEventViewer) { |
199 if (mEventViewer) { |
200 mEventViewer->deleteLater(); |
200 mEventViewer->deleteLater(); |
201 } |
201 } |