942 // Ideal colution should be to call a uniform function, e.g. PopulateEvents |
942 // Ideal colution should be to call a uniform function, e.g. PopulateEvents |
943 // where PopulateEvents should be implemeted by all views. Since the current |
943 // where PopulateEvents should be implemeted by all views. Since the current |
944 // solution for the month view implements the construction in two phases so |
944 // solution for the month view implements the construction in two phases so |
945 // it needs to be refactored and a common solution needs to be put here. So |
945 // it needs to be refactored and a common solution needs to be put here. So |
946 // that code doesn't break if another view is added tomorow |
946 // that code doesn't break if another view is added tomorow |
947 if (mCalenMonthView) { |
947 HbView *currentview = mController.MainWindow().currentView(); |
|
948 |
|
949 if (mCalenMonthView && currentview == mCalenMonthView) { |
948 mCalenMonthView->fetchEntriesAndUpdateModel(); |
950 mCalenMonthView->fetchEntriesAndUpdateModel(); |
949 } |
951 } |
950 else if (mCalenAgendaView) { |
952 else if (mCalenAgendaView && currentview == mCalenAgendaView) { |
951 mCalenAgendaView->doPopulation(); |
953 mCalenAgendaView->doPopulation(); |
952 } |
954 } |
953 // Calls the emitAppReady function of CalenController. Need to emit this |
955 // Calls the emitAppReady function of CalenController. Need to emit this |
954 // signal after the view is fully constructed & populated |
956 // signal after the view is fully constructed & populated |
955 // with actual data and ready to be used. So entry view & instance view |
957 // with actual data and ready to be used. So entry view & instance view |
1037 } |
1039 } |
1038 |
1040 |
1039 OstTraceFunctionExit0( CALENVIEWMANAGER_LAUNCHSETTINGSVIEW_EXIT ); |
1041 OstTraceFunctionExit0( CALENVIEWMANAGER_LAUNCHSETTINGSVIEW_EXIT ); |
1040 } |
1042 } |
1041 |
1043 |
|
1044 |
|
1045 // ---------------------------------------------------------------------------- |
|
1046 // CalenViewManager::removeSettingsView |
|
1047 // remove settings view |
|
1048 // ---------------------------------------------------------------------------- |
|
1049 // |
|
1050 void CalenViewManager::removeSettingsView() |
|
1051 { |
|
1052 if(mSettingsView){ |
|
1053 mController.Services().MainWindow().removeView(mSettingsView); |
|
1054 } |
|
1055 } |
|
1056 |
|
1057 // ---------------------------------------------------------------------------- |
|
1058 // CalenViewManager::isEventViewerActive |
|
1059 // check if Agenda Event Viewer is active |
|
1060 // ---------------------------------------------------------------------------- |
|
1061 // |
|
1062 bool CalenViewManager::isEventViewerActive() |
|
1063 { |
|
1064 if(mCalenEventViewer) |
|
1065 return true; |
|
1066 else |
|
1067 return false; |
|
1068 } |
|
1069 |
|
1070 // ---------------------------------------------------------------------------- |
|
1071 // CalenViewManager::saveAndCloseEditor |
|
1072 // save the entry and close the editor |
|
1073 // isEventViewerActive() should be called before this function |
|
1074 // ---------------------------------------------------------------------------- |
|
1075 // |
|
1076 void CalenViewManager::saveAndCloseEditor() |
|
1077 { |
|
1078 mCalenEventViewer->saveAndCloseEditor(); |
|
1079 } |
|
1080 |
|
1081 // ---------------------------------------------------------------------------- |
|
1082 // CalenViewManager::closeAgendaEventView |
|
1083 // close the agenda event view |
|
1084 // isEventViewerActive() should be called before this function |
|
1085 // ---------------------------------------------------------------------------- |
|
1086 // |
|
1087 void CalenViewManager::closeAgendaEventView() |
|
1088 { |
|
1089 mCalenEventViewer->closeAgendaEventView(); |
|
1090 } |
|
1091 |
|
1092 |
1042 // End of file --Don't remove this. |
1093 // End of file --Don't remove this. |