60 #endif |
60 #endif |
61 |
61 |
62 // Constants |
62 // Constants |
63 #define CHARACTER_SPACE " " |
63 #define CHARACTER_SPACE " " |
64 #define CHARACTER_HYPHEN " - " |
64 #define CHARACTER_HYPHEN " - " |
65 |
65 #define DUMMY_ICON "dummyIcon" |
66 |
|
67 //This Property is use for setting a primary left icon |
|
68 static const char *primaryLeftIconItem("leftPrimaryIconItem"); |
|
69 |
66 |
70 /*! |
67 /*! |
71 \class AgendaEventView. |
68 \class AgendaEventView. |
72 |
69 |
73 Responsible for viewing viewing agenda entries. This is friend of |
70 Responsible for viewing viewing agenda entries. This is friend of |
91 mMaptilePath(NULL), |
88 mMaptilePath(NULL), |
92 mMaptileService(NULL), |
89 mMaptileService(NULL), |
93 mProgressTimer(NULL), |
90 mProgressTimer(NULL), |
94 mProgressIconCount(0), |
91 mProgressIconCount(0), |
95 mMaptileStatusReceived(false), |
92 mMaptileStatusReceived(false), |
|
93 mCalenEditorClosed(true), |
96 mMaptileStatus(-1), |
94 mMaptileStatus(-1), |
97 mNotesPluginLoaded(false), |
95 mNotesPluginLoaded(false), |
98 mCalenEditorClosed(true) |
96 mEntryIdDeleted(0) |
99 { |
97 { |
100 OstTraceFunctionEntry0( AGENDAEVENTVIEW_AGENDAEVENTVIEW_ENTRY ); |
98 OstTraceFunctionEntry0( AGENDAEVENTVIEW_AGENDAEVENTVIEW_ENTRY ); |
101 mTranslator->loadCommon(); |
99 mTranslator->loadCommon(); |
102 mDocLoader = new AgendaEventViewerDocLoader; |
100 mDocLoader = new AgendaEventViewerDocLoader; |
103 |
101 |
112 AGENDA_EVENT_VIEWER_VIEW_OBJECT)); |
110 AGENDA_EVENT_VIEWER_VIEW_OBJECT)); |
113 |
111 |
114 // Load all the widgets. |
112 // Load all the widgets. |
115 mSubjectWidget = qobject_cast<AgendaEventViewerItem *> ( |
113 mSubjectWidget = qobject_cast<AgendaEventViewerItem *> ( |
116 mDocLoader->findWidget(AGENDA_EVENT_VIEWER_SUBJECT_WIDGET)); |
114 mDocLoader->findWidget(AGENDA_EVENT_VIEWER_SUBJECT_WIDGET)); |
117 |
|
118 //load layout that supports icon before subject label |
|
119 mSubjectWidget->setProperty(primaryLeftIconItem,true); |
|
120 |
115 |
121 mDateTimeWidget = qobject_cast<AgendaEventViewerItem *> ( |
116 mDateTimeWidget = qobject_cast<AgendaEventViewerItem *> ( |
122 mDocLoader->findWidget(AGENDA_EVENT_VIEWER_DATE_TIME_WIDGET)); |
117 mDocLoader->findWidget(AGENDA_EVENT_VIEWER_DATE_TIME_WIDGET)); |
123 |
118 |
124 mLocationWidget = qobject_cast<AgendaEventViewerItem *> ( |
119 mLocationWidget = qobject_cast<AgendaEventViewerItem *> ( |
212 { |
207 { |
213 OstTraceFunctionEntry0( AGENDAEVENTVIEW_EXECUTE_ENTRY ); |
208 OstTraceFunctionEntry0( AGENDAEVENTVIEW_EXECUTE_ENTRY ); |
214 |
209 |
215 mOriginalAgendaEntry = entry; |
210 mOriginalAgendaEntry = entry; |
216 mAgendaEntry = entry; |
211 mAgendaEntry = entry; |
217 |
212 |
|
213 // For later reference |
|
214 mParentId = mOwner->mAgendaUtil->parentEntry(mAgendaEntry).id(); |
|
215 |
218 // Add the viewer data reading from the agenda entry. |
216 // Add the viewer data reading from the agenda entry. |
219 addViewerData(); |
217 addViewerData(); |
220 |
218 |
221 // Remove unnecessary widget from event viewer. |
219 // Remove unnecessary widget from event viewer. |
222 removeWidget(); |
220 removeWidget(); |
245 // Might be some non-ui based app called us |
243 // Might be some non-ui based app called us |
246 // so create mainwindow now |
244 // so create mainwindow now |
247 mMainWindow = new HbMainWindow(); |
245 mMainWindow = new HbMainWindow(); |
248 mMainWindow->addView(mViewer); |
246 mMainWindow->addView(mViewer); |
249 mMainWindow->setCurrentView(mViewer); |
247 mMainWindow->setCurrentView(mViewer); |
250 connect(mMainWindow,SIGNAL(orientationChanged(Qt::Orientation)),this,SLOT(changedOrientation(Qt::Orientation))); |
248 connect(mMainWindow,SIGNAL(orientationChanged(Qt::Orientation)),this,SLOT(changedOrientation(Qt::Orientation))); |
251 } else { |
249 } else { |
252 window->addView(mViewer); |
250 window->addView(mViewer); |
253 window->setCurrentView(mViewer); |
251 window->setCurrentView(mViewer); |
254 connect(window,SIGNAL(orientationChanged(Qt::Orientation)),this,SLOT(changedOrientation(Qt::Orientation))); |
252 connect(window,SIGNAL(orientationChanged(Qt::Orientation)),this,SLOT(changedOrientation(Qt::Orientation))); |
255 } |
253 } |
256 |
254 |
257 // Add softkey after adding view on window |
255 // Add softkey after adding view on window |
258 mBackAction = new HbAction(Hb::BackNaviAction); |
256 mBackAction = new HbAction(Hb::BackNaviAction); |
259 mViewer->setNavigationAction(mBackAction); |
257 mViewer->setNavigationAction(mBackAction); |
417 QString subjectIcon(QString::null); |
415 QString subjectIcon(QString::null); |
418 getPriorityIcon(mAgendaEntry.priority(), priorityIcon); |
416 getPriorityIcon(mAgendaEntry.priority(), priorityIcon); |
419 getSubjectIcon(mAgendaEntry.type(),subjectIcon); |
417 getSubjectIcon(mAgendaEntry.type(),subjectIcon); |
420 itemList.append(subjectIcon); |
418 itemList.append(subjectIcon); |
421 itemList.append(priorityIcon); |
419 itemList.append(priorityIcon); |
|
420 // This "DUMMY_ICON" is required only for the subject layout. |
|
421 itemList.append(DUMMY_ICON); |
422 itemList.append(QString::null); |
422 itemList.append(QString::null); |
423 |
423 |
424 mSubjectWidget->setEventViewerItemData(itemList, Qt::DecorationRole); |
424 mSubjectWidget->setEventViewerItemData(itemList, Qt::DecorationRole); |
425 |
425 |
426 OstTraceFunctionExit0( AGENDAEVENTVIEW_ADDSUBJECTANDPRIORITYDATA_EXIT ); |
426 OstTraceFunctionExit0( AGENDAEVENTVIEW_ADDSUBJECTANDPRIORITYDATA_EXIT ); |
439 QDateTime endDateTime = mAgendaEntry.endTime(); |
439 QDateTime endDateTime = mAgendaEntry.endTime(); |
440 |
440 |
441 itemData.append(QString::null); |
441 itemData.append(QString::null); |
442 itemData.append(QString::null); |
442 itemData.append(QString::null); |
443 itemData.append("qtg_small_calendar"); |
443 itemData.append("qtg_small_calendar"); |
444 |
444 itemData.append(QString::null); |
445 mDateTimeWidget->setProperty(primaryLeftIconItem, false); |
|
446 |
445 |
447 mDateTimeWidget->setEventViewerItemData(itemData, Qt::DecorationRole); |
446 mDateTimeWidget->setEventViewerItemData(itemData, Qt::DecorationRole); |
448 itemData.clear(); |
447 itemData.clear(); |
449 itemData.append(QString::null); |
448 itemData.append(QString::null); |
450 |
449 |
525 */ |
524 */ |
526 void AgendaEventView::addLocationData() |
525 void AgendaEventView::addLocationData() |
527 { |
526 { |
528 OstTraceFunctionEntry0( AGENDAEVENTVIEW_ADDLOCATIONDATA_ENTRY ); |
527 OstTraceFunctionEntry0( AGENDAEVENTVIEW_ADDLOCATIONDATA_ENTRY ); |
529 QStringList itemData; |
528 QStringList itemData; |
|
529 itemData.append(QString::null); |
|
530 itemData.append(QString::null); |
|
531 itemData.append("qtg_small_location"); |
530 QString progressIcon(QString::null); |
532 QString progressIcon(QString::null); |
531 if ( mLocationFeatureEnabled ) { |
533 if ( mLocationFeatureEnabled ) { |
532 getProgressIndicatorstatus(progressIcon); |
534 getProgressIndicatorstatus(progressIcon); |
533 } |
535 } |
534 if( progressIcon.isNull() ) { |
536 if( progressIcon.isNull() ) { |
535 itemData.append(QString::null); |
537 itemData.append(QString::null); |
536 itemData.append(QString::null); |
|
537 itemData.append("qtg_small_location"); |
|
538 mLocationWidget->setProperty(primaryLeftIconItem, false); |
|
539 } |
538 } |
540 else { |
539 else { |
541 itemData.append("qtg_small_location"); |
540 itemData.append( progressIcon ); |
542 itemData.append( progressIcon ); |
|
543 itemData.append(QString::null); |
|
544 mLocationWidget->setProperty(primaryLeftIconItem, true); |
|
545 } |
541 } |
546 mLocationWidget->setEventViewerItemData(itemData, Qt::DecorationRole); |
542 mLocationWidget->setEventViewerItemData(itemData, Qt::DecorationRole); |
547 itemData.clear(); |
543 itemData.clear(); |
548 itemData.append(QString::null); |
544 itemData.append(QString::null); |
549 itemData.append(mAgendaEntry.location()); |
545 itemData.append(mAgendaEntry.location()); |
577 OstTraceFunctionEntry0( AGENDAEVENTVIEW_ADDREMINDERDATA_ENTRY ); |
573 OstTraceFunctionEntry0( AGENDAEVENTVIEW_ADDREMINDERDATA_ENTRY ); |
578 QStringList itemData; |
574 QStringList itemData; |
579 itemData.append(QString::null); |
575 itemData.append(QString::null); |
580 itemData.append(QString::null); |
576 itemData.append(QString::null); |
581 itemData.append("qtg_small_reminder"); |
577 itemData.append("qtg_small_reminder"); |
582 mReminderWidget->setProperty(primaryLeftIconItem, false); |
578 itemData.append(QString::null); |
583 mReminderWidget->setEventViewerItemData(itemData, Qt::DecorationRole); |
579 mReminderWidget->setEventViewerItemData(itemData, Qt::DecorationRole); |
584 itemData.clear(); |
580 itemData.clear(); |
585 itemData.append(QString::null); |
581 itemData.append(QString::null); |
586 itemData.append(alarmTimeText()); |
582 itemData.append(alarmTimeText()); |
587 mReminderWidget->setEventViewerItemData(itemData, Qt::DisplayRole); |
583 mReminderWidget->setEventViewerItemData(itemData, Qt::DisplayRole); |
599 QString completedText; |
595 QString completedText; |
600 HbExtendedLocale systemLocale = HbExtendedLocale::system();; |
596 HbExtendedLocale systemLocale = HbExtendedLocale::system();; |
601 itemData.append(QString::null); |
597 itemData.append(QString::null); |
602 itemData.append(QString::null); |
598 itemData.append(QString::null); |
603 itemData.append(QString::null); |
599 itemData.append(QString::null); |
604 mReminderWidget->setProperty(primaryLeftIconItem, true); |
600 itemData.append(QString::null); |
605 mReminderWidget->setEventViewerItemData(itemData, Qt::DecorationRole); |
601 mReminderWidget->setEventViewerItemData(itemData, Qt::DecorationRole); |
606 itemData.clear(); |
602 itemData.clear(); |
607 completedText = systemLocale.format(mAgendaEntry.completedDateTime().date(), |
603 completedText = systemLocale.format(mAgendaEntry.completedDateTime().date(), |
608 r_qtn_date_usual_with_zero); |
604 r_qtn_date_usual_with_zero); |
609 itemData.append(hbTrId("txt_calendar_dblist_completed_date")); |
605 itemData.append(hbTrId("txt_calendar_dblist_completed_date")); |
624 if(!mAgendaEntry.recurrenceId().isNull()) { |
620 if(!mAgendaEntry.recurrenceId().isNull()) { |
625 itemData.append("qtg_small_repeat_exception"); |
621 itemData.append("qtg_small_repeat_exception"); |
626 }else { |
622 }else { |
627 itemData.append("qtg_small_repeat"); |
623 itemData.append("qtg_small_repeat"); |
628 } |
624 } |
629 mRepeatWidget->setProperty(primaryLeftIconItem, false); |
625 itemData.append(QString::null); |
630 mRepeatWidget->setEventViewerItemData(itemData, Qt::DecorationRole); |
626 mRepeatWidget->setEventViewerItemData(itemData, Qt::DecorationRole); |
631 itemData.clear(); |
627 itemData.clear(); |
632 itemData.append(QString::null); |
628 itemData.append(QString::null); |
633 itemData.append(repeatRule()); |
629 itemData.append(repeatRule()); |
634 mRepeatWidget->setEventViewerItemData(itemData, Qt::DisplayRole); |
630 mRepeatWidget->setEventViewerItemData(itemData, Qt::DisplayRole); |
643 OstTraceFunctionEntry0( AGENDAEVENTVIEW_ADDDESCRIPTIONDATA_ENTRY ); |
639 OstTraceFunctionEntry0( AGENDAEVENTVIEW_ADDDESCRIPTIONDATA_ENTRY ); |
644 QStringList itemData; |
640 QStringList itemData; |
645 itemData.append(QString::null); |
641 itemData.append(QString::null); |
646 itemData.append(QString::null); |
642 itemData.append(QString::null); |
647 itemData.append(QString::null); |
643 itemData.append(QString::null); |
648 mDescriptionWidget->setProperty(primaryLeftIconItem, true); |
644 itemData.append(QString::null); |
649 mDescriptionWidget->setEventViewerItemData(itemData, Qt::DecorationRole); |
645 mDescriptionWidget->setEventViewerItemData(itemData, Qt::DecorationRole); |
650 itemData.clear(); |
646 itemData.clear(); |
651 itemData.append(hbTrId("txt_calendar_dblist_description")); |
647 itemData.append(hbTrId("txt_calendar_dblist_description")); |
652 itemData.append(mAgendaEntry.description()); |
648 itemData.append(mAgendaEntry.description()); |
653 mDescriptionWidget->setEventViewerItemData(itemData, Qt::DisplayRole); |
649 mDescriptionWidget->setEventViewerItemData(itemData, Qt::DisplayRole); |
932 */ |
928 */ |
933 void AgendaEventView::showDeleteOccurencePopup() |
929 void AgendaEventView::showDeleteOccurencePopup() |
934 { |
930 { |
935 OstTraceFunctionEntry0( AGENDAEVENTVIEW_SHOWDELETEOCCURENCEPOPUP_ENTRY ); |
931 OstTraceFunctionEntry0( AGENDAEVENTVIEW_SHOWDELETEOCCURENCEPOPUP_ENTRY ); |
936 HbDialog *popUp = new HbDialog(); |
932 HbDialog *popUp = new HbDialog(); |
|
933 // Set the parent for the dialog |
|
934 // Once the parent object is deleted the dialog will also be deleted |
|
935 popUp->setParent(this); |
937 popUp->setDismissPolicy(HbDialog::NoDismiss); |
936 popUp->setDismissPolicy(HbDialog::NoDismiss); |
938 popUp->setTimeout(HbDialog::NoTimeout); |
937 popUp->setTimeout(HbDialog::NoTimeout); |
939 popUp->setAttribute( Qt::WA_DeleteOnClose, true ); |
938 popUp->setAttribute( Qt::WA_DeleteOnClose, true ); |
940 |
939 |
941 QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical); |
940 QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical); |
975 void AgendaEventView::showDeleteConfirmationQuery() |
974 void AgendaEventView::showDeleteConfirmationQuery() |
976 { |
975 { |
977 OstTraceFunctionEntry0( AGENDAEVENTVIEW_SHOWDELETECONFIRMATIONQUERY_ENTRY ); |
976 OstTraceFunctionEntry0( AGENDAEVENTVIEW_SHOWDELETECONFIRMATIONQUERY_ENTRY ); |
978 |
977 |
979 HbMessageBox *popup = new HbMessageBox(HbMessageBox::MessageTypeQuestion); |
978 HbMessageBox *popup = new HbMessageBox(HbMessageBox::MessageTypeQuestion); |
|
979 // Set the parent for the dialog |
|
980 // Once the parent object is deleted the dialog will also be deleted |
|
981 popup->setParent(this); |
980 popup->setDismissPolicy(HbDialog::NoDismiss); |
982 popup->setDismissPolicy(HbDialog::NoDismiss); |
981 popup->setTimeout(HbDialog::NoTimeout); |
983 popup->setTimeout(HbDialog::NoTimeout); |
982 popup->setAttribute( Qt::WA_DeleteOnClose, true ); |
984 popup->setAttribute( Qt::WA_DeleteOnClose, true ); |
983 |
985 |
984 QString text = 0; |
986 QString text = 0; |
1014 for(int i=0; i < list.count(); i++) |
1016 for(int i=0; i < list.count(); i++) |
1015 { |
1017 { |
1016 popup->removeAction(list[i]); |
1018 popup->removeAction(list[i]); |
1017 } |
1019 } |
1018 HbAction *deleteAction = |
1020 HbAction *deleteAction = |
1019 new HbAction(hbTrId("txt_calendar_button_delete"), popup); |
1021 new HbAction(hbTrId("txt_common_button_delete"), popup); |
1020 popup->addAction(deleteAction); |
1022 popup->addAction(deleteAction); |
1021 connect(deleteAction, SIGNAL(triggered()), this , |
1023 connect(deleteAction, SIGNAL(triggered()), this , |
1022 SLOT(handleDeleteAction())); |
1024 SLOT(handleDeleteAction())); |
1023 popup->addAction(new HbAction(hbTrId("txt_common_button_cancel"), popup)); |
1025 popup->addAction(new HbAction(hbTrId("txt_common_button_cancel"), popup)); |
1024 popup->open(); |
1026 popup->open(); |
1241 Handles the entry deletion of the agenda entry |
1243 Handles the entry deletion of the agenda entry |
1242 */ |
1244 */ |
1243 void AgendaEventView::handleEntryDeletion(ulong id) |
1245 void AgendaEventView::handleEntryDeletion(ulong id) |
1244 { |
1246 { |
1245 OstTraceFunctionEntry0( AGENDAEVENTVIEW_HANDLEENTRYDELETION_ENTRY ); |
1247 OstTraceFunctionEntry0( AGENDAEVENTVIEW_HANDLEENTRYDELETION_ENTRY ); |
1246 |
1248 // Check if the entry which is viewed has been deleted or not |
1247 if (id == mAgendaEntry.id()) { |
1249 // The first check id == mAgendaEntry.id() will fail for the following case |
1248 // Close the agenda entry viewer |
1250 // Exceptional entry is opened in the viewer. Edit this occurence in editor. |
1249 close(); |
1251 // From editor delete all occurences of the entry. In this case the viewer |
1250 mOwner->deletingCompleted(); |
1252 // has the exceptional entry id which is not the same id which got deleted. |
1251 } |
1253 // Its the parent entry id. So checking if its a child and the entry deleted |
|
1254 // is the parent of this child. |
|
1255 if (id == mAgendaEntry.id() || |
|
1256 (!mAgendaEntry.recurrenceId().isNull() && id == mParentId)) { |
|
1257 // If the editor is opened and the deletion is happening from editor |
|
1258 // then there is no need to emit the signal deletingCompleted() [as the |
|
1259 // deletingStarted() is not been emitted already] |
|
1260 // In this case closing of viewer will happen only once the editor |
|
1261 // is closed properly |
|
1262 mEntryIdDeleted = id; |
|
1263 if(!mCalenEditor) { |
|
1264 // If the editor is not opened then emit deletingCompleted() |
|
1265 // and close the viewer |
|
1266 mOwner->deletingCompleted(); |
|
1267 close(); |
|
1268 } |
|
1269 } |
1252 |
1270 |
1253 OstTraceFunctionExit0( AGENDAEVENTVIEW_HANDLEENTRYDELETION_EXIT ); |
1271 OstTraceFunctionExit0( AGENDAEVENTVIEW_HANDLEENTRYDELETION_EXIT ); |
1254 } |
1272 } |
1255 |
1273 |
1256 /*! |
1274 /*! |
1276 { |
1294 { |
1277 OstTraceFunctionEntry0( AGENDAEVENTVIEW_HANDLECALENDAREDITORCLOSED_ENTRY ); |
1295 OstTraceFunctionEntry0( AGENDAEVENTVIEW_HANDLECALENDAREDITORCLOSED_ENTRY ); |
1278 |
1296 |
1279 // Cleanup. |
1297 // Cleanup. |
1280 mCalenEditorClosed = true; |
1298 mCalenEditorClosed = true; |
1281 mCalenEditor->deleteLater(); |
|
1282 mOwner->editingCompleted(); |
1299 mOwner->editingCompleted(); |
1283 |
1300 if(mCalenEditor) { |
|
1301 mCalenEditor->deleteLater(); |
|
1302 // Check if the entry is deleted |
|
1303 if(mEntryIdDeleted) { |
|
1304 ulong currentId = mAgendaEntry.id(); |
|
1305 // If the deleted entry is the same as current id then close viewer |
|
1306 // The second check is for exceptional entries which will be true, |
|
1307 // when all the occurences of the entry is deleted from the editor |
|
1308 // In this case the entry id deleted won't the same as current id |
|
1309 if(currentId == mEntryIdDeleted || mEntryIdDeleted == mParentId) { |
|
1310 // Close the viewer as the entry no longer exists |
|
1311 close(); |
|
1312 } |
|
1313 // Reset the value. |
|
1314 mEntryIdDeleted = 0; |
|
1315 } |
|
1316 } |
|
1317 |
|
1318 |
1284 OstTraceFunctionExit0( AGENDAEVENTVIEW_HANDLECALENDAREDITORCLOSED_EXIT ); |
1319 OstTraceFunctionExit0( AGENDAEVENTVIEW_HANDLECALENDAREDITORCLOSED_EXIT ); |
1285 } |
1320 } |
1286 |
1321 |
1287 /*! |
1322 /*! |
1288 Slot to handle User selection for series deleting or single occurence popup |
1323 Slot to handle User selection for series deleting or single occurence popup |
1360 if (!mMaptileStatusReceived) { |
1395 if (!mMaptileStatusReceived) { |
1361 QString iconName("qtg_anim_small_loading_"); |
1396 QString iconName("qtg_anim_small_loading_"); |
1362 mProgressIconCount = mProgressIconCount % 10 + 1; |
1397 mProgressIconCount = mProgressIconCount % 10 + 1; |
1363 iconName.append(QVariant(mProgressIconCount).toString()); |
1398 iconName.append(QVariant(mProgressIconCount).toString()); |
1364 QStringList itemData; |
1399 QStringList itemData; |
|
1400 itemData.append(QString::null); |
|
1401 itemData.append(QString::null); |
1365 itemData.append("qtg_small_location"); |
1402 itemData.append("qtg_small_location"); |
1366 itemData.append(iconName); |
1403 itemData.append(iconName); |
1367 itemData.append(QString::null); |
|
1368 mLocationWidget->setProperty(primaryLeftIconItem, true); |
|
1369 mLocationWidget->setEventViewerItemData(itemData, Qt::DecorationRole); |
1404 mLocationWidget->setEventViewerItemData(itemData, Qt::DecorationRole); |
1370 mProgressTimer->start(100); |
1405 mProgressTimer->start(100); |
1371 } |
1406 } |
1372 else { |
1407 else { |
1373 if (mProgressTimer->isActive()) { |
1408 if (mProgressTimer->isActive()) { |
1376 if (mMaptileStatus == MapTileService::MapTileFetchingCompleted) { |
1411 if (mMaptileStatus == MapTileService::MapTileFetchingCompleted) { |
1377 QStringList itemData; |
1412 QStringList itemData; |
1378 itemData.append(QString::null); |
1413 itemData.append(QString::null); |
1379 itemData.append(QString::null); |
1414 itemData.append(QString::null); |
1380 itemData.append("qtg_small_location"); |
1415 itemData.append("qtg_small_location"); |
1381 mLocationWidget->setProperty(primaryLeftIconItem, false); |
1416 itemData.append(QString::null); |
1382 mLocationWidget->setEventViewerItemData(itemData, Qt::DecorationRole); |
1417 mLocationWidget->setEventViewerItemData(itemData, Qt::DecorationRole); |
1383 Qt::Orientations orientation=hbInstance->allMainWindows().first()->orientation(); |
1418 Qt::Orientations orientation=hbInstance->allMainWindows().first()->orientation(); |
1384 mMaptilePath.clear(); |
1419 mMaptilePath.clear(); |
1385 mMaptileStatus = mMaptileService->getMapTileImage(mAgendaEntry.id(), MapTileService::AddressPlain, mMaptilePath ,orientation); |
1420 mMaptileStatus = mMaptileService->getMapTileImage(mAgendaEntry.id(), MapTileService::AddressPlain, mMaptilePath ,orientation); |
1386 addMapTileImage(); |
1421 addMapTileImage(); |
1394 file.close(); |
1429 file.close(); |
1395 |
1430 |
1396 } |
1431 } |
1397 else { |
1432 else { |
1398 QStringList itemData; |
1433 QStringList itemData; |
|
1434 itemData.append(QString::null); |
|
1435 itemData.append(QString::null); |
1399 itemData.append("qtg_small_location"); |
1436 itemData.append("qtg_small_location"); |
1400 QString stopIcon; |
1437 QString stopIcon; |
1401 stopIcon.append(QString("qtg_mono_search_stop")); |
1438 stopIcon.append(QString("qtg_mono_search_stop")); |
1402 itemData.append(stopIcon); |
1439 itemData.append(stopIcon); |
1403 itemData.append(QString::null); |
|
1404 mLocationWidget->setProperty(primaryLeftIconItem, true); |
|
1405 mLocationWidget->setEventViewerItemData(itemData, Qt::DecorationRole); |
1440 mLocationWidget->setEventViewerItemData(itemData, Qt::DecorationRole); |
1406 |
1441 |
1407 } |
1442 } |
1408 } |
1443 } |
1409 OstTraceFunctionExit0( AGENDAEVENTVIEW_UPDATEPROGRESSINDICATOR_EXIT ); |
1444 OstTraceFunctionExit0( AGENDAEVENTVIEW_UPDATEPROGRESSINDICATOR_EXIT ); |
1473 QString subjectIcon(QString::null); |
1508 QString subjectIcon(QString::null); |
1474 getPriorityIcon(mAgendaEntry.priority(), priorityIcon); |
1509 getPriorityIcon(mAgendaEntry.priority(), priorityIcon); |
1475 getSubjectIcon(mAgendaEntry.type(),subjectIcon); |
1510 getSubjectIcon(mAgendaEntry.type(),subjectIcon); |
1476 itemList.append(subjectIcon); |
1511 itemList.append(subjectIcon); |
1477 itemList.append(priorityIcon); |
1512 itemList.append(priorityIcon); |
|
1513 // This "DUMMY_ICON" is required only for the subject layout. |
|
1514 itemList.append(DUMMY_ICON); |
1478 itemList.append(QString::null); |
1515 itemList.append(QString::null); |
1479 |
1516 |
1480 mSubjectWidget->setEventViewerItemData(itemList, Qt::DecorationRole); |
1517 mSubjectWidget->setEventViewerItemData(itemList, Qt::DecorationRole); |
1481 OstTraceFunctionExit0( AGENDAEVENTVIEW_UPDATESUBJECTANDPRIORITYDATA_EXIT ); |
1518 OstTraceFunctionExit0( AGENDAEVENTVIEW_UPDATESUBJECTANDPRIORITYDATA_EXIT ); |
1482 } |
1519 } |
1499 Close the editor and save the entry. |
1536 Close the editor and save the entry. |
1500 should be call if editor is open |
1537 should be call if editor is open |
1501 */ |
1538 */ |
1502 void AgendaEventView::saveAndCloseEditor() |
1539 void AgendaEventView::saveAndCloseEditor() |
1503 { |
1540 { |
|
1541 OstTraceFunctionEntry0( AGENDAEVENTVIEW_SAVEANDCLOSEEDITOR_ENTRY ); |
1504 if(mCalenEditorClosed){ |
1542 if(mCalenEditorClosed){ |
1505 QObject *plugin = qobject_cast<QObject*> ( |
1543 QObject *plugin = qobject_cast<QObject*> ( |
1506 mNotesEditorPluginLoader->instance()); |
1544 mNotesEditorPluginLoader->instance()); |
1507 |
1545 |
1508 NotesEditorInterface* interface = |
1546 NotesEditorInterface* interface = |