equal
deleted
inserted
replaced
29 #include <hbcolorscheme.h> |
29 #include <hbcolorscheme.h> |
30 #include <hbtheme.h> |
30 #include <hbtheme.h> |
31 #include <agendautil.h> |
31 #include <agendautil.h> |
32 #include <agendaentry.h> |
32 #include <agendaentry.h> |
33 #include <hbapplication.h> // hbapplication |
33 #include <hbapplication.h> // hbapplication |
34 #include <hbactivitymanager.h> //Activity Manager |
34 |
35 |
35 |
36 //user includes |
36 //user includes |
37 #include "calenmonthview.h" |
37 #include "calenmonthview.h" |
38 #include "calenservices.h" |
38 #include "calenservices.h" |
39 #include "calennativeview.h" |
39 #include "calennativeview.h" |
81 |
81 |
82 mIsWeekNumbersShown = 0; |
82 mIsWeekNumbersShown = 0; |
83 mOrientation = mServices.MainWindow().orientation(); |
83 mOrientation = mServices.MainWindow().orientation(); |
84 // Read the date from the context |
84 // Read the date from the context |
85 mDate = mServices.Context().focusDateAndTime(); |
85 mDate = mServices.Context().focusDateAndTime(); |
86 mCurrentDay = mDate; |
|
87 |
86 |
88 // Create the settings manager instance and settings key for week number |
87 // Create the settings manager instance and settings key for week number |
89 mSettingsManager = new XQSettingsManager(this); |
88 mSettingsManager = new XQSettingsManager(this); |
90 mWeekNumberCenrepKey |
89 mWeekNumberCenrepKey |
91 = new XQSettingsKey(XQSettingsKey::TargetCentralRepository, |
90 = new XQSettingsKey(XQSettingsKey::TargetCentralRepository, |
238 mMonthGrid->setView(this); |
237 mMonthGrid->setView(this); |
239 |
238 |
240 |
239 |
241 |
240 |
242 mIsFirstTimeLoad = true; |
241 mIsFirstTimeLoad = true; |
243 // get a pointner to activity manager |
242 |
244 HbActivityManager* activityManager = qobject_cast<HbApplication*>(qApp)->activityManager(); |
243 // clean up any previous versions of this activity, if any, i.e. activityName |
245 |
|
246 // clean up any previous versions of this activity, if any, i.e. activityName, from the activity manager. |
|
247 // Ignore return value, first boot would always return False. bool declared |
244 // Ignore return value, first boot would always return False. bool declared |
248 // only for debugging purpose. |
245 // only for debugging purpose. |
249 bool ok = activityManager->removeActivity(activityName); |
246 bool ok = removeActivity(); |
250 |
247 |
251 OstTraceFunctionExit0( CALENMONTHVIEW_SETUPVIEW_EXIT ); |
248 OstTraceFunctionExit0( CALENMONTHVIEW_SETUPVIEW_EXIT ); |
252 } |
249 } |
253 |
250 |
254 /*! |
251 /*! |
938 |
935 |
939 OstTraceFunctionExit0( CALENMONTHVIEW_SETDATE_EXIT ); |
936 OstTraceFunctionExit0( CALENMONTHVIEW_SETDATE_EXIT ); |
940 } |
937 } |
941 |
938 |
942 /*! |
939 /*! |
943 Returns the currDay(Today) |
|
944 */ |
|
945 QDateTime CalenMonthView::getCurrentDay() |
|
946 { |
|
947 OstTraceFunctionEntry0( CALENMONTHVIEW_GETCURRENTDAY_ENTRY ); |
|
948 |
|
949 OstTraceFunctionExit0( CALENMONTHVIEW_GETCURRENTDAY_EXIT ); |
|
950 return mCurrentDay; |
|
951 } |
|
952 |
|
953 /*! |
|
954 Returns the active day(currently focussed day) |
940 Returns the active day(currently focussed day) |
955 */ |
941 */ |
956 QDateTime CalenMonthView::getActiveDay() |
942 QDateTime CalenMonthView::getActiveDay() |
957 { |
943 { |
958 OstTraceFunctionEntry0( CALENMONTHVIEW_GETACTIVEDAY_ENTRY ); |
944 OstTraceFunctionEntry0( CALENMONTHVIEW_GETACTIVEDAY_ENTRY ); |
1446 void CalenMonthView::launchDayView() |
1432 void CalenMonthView::launchDayView() |
1447 { |
1433 { |
1448 OstTraceFunctionEntry0( CALENMONTHVIEW_LAUNCHDAYVIEW_ENTRY ); |
1434 OstTraceFunctionEntry0( CALENMONTHVIEW_LAUNCHDAYVIEW_ENTRY ); |
1449 |
1435 |
1450 mServices.IssueCommandL(ECalenDayView); |
1436 mServices.IssueCommandL(ECalenDayView); |
1451 // day view launched now, disconnect to get the call backs for saveActivity |
1437 // day view launched now, captre the screen shot of month view |
1452 // on aboutToQuit signal |
1438 captureScreenshot(true); |
1453 disconnectAboutToQuitEvent(); |
1439 |
1454 |
1440 OstTraceFunctionExit0( CALENMONTHVIEW_LAUNCHDAYVIEW_EXIT ); |
1455 OstTraceFunctionExit0( CALENMONTHVIEW_LAUNCHDAYVIEW_EXIT ); |
|
1456 } |
1441 } |
1457 |
1442 |
1458 /*! |
1443 /*! |
1459 disconnects for the aboutToQuit events |
1444 disconnects for the aboutToQuit events |
1460 */ |
1445 */ |
1658 Function to handle any locale related changes |
1643 Function to handle any locale related changes |
1659 */ |
1644 */ |
1660 void CalenMonthView::onLocaleChanged(int reason) |
1645 void CalenMonthView::onLocaleChanged(int reason) |
1661 { |
1646 { |
1662 OstTraceFunctionEntry0( CALENMONTHVIEW_ONLOCALECHANGED_ENTRY ); |
1647 OstTraceFunctionEntry0( CALENMONTHVIEW_ONLOCALECHANGED_ENTRY ); |
1663 |
1648 Q_UNUSED(reason); |
1664 if ((reason & EChangesSystemTime) |
1649 return; |
1665 || (reason & EChangesMidnightCrossover)) { |
1650 OstTraceFunctionExit0( CALENMONTHVIEW_ONLOCALECHANGED_EXIT ); |
1666 mCurrentDay = CalenDateUtils::today(); |
|
1667 } |
|
1668 OstTraceFunctionExit0( CALENMONTHVIEW_ONLOCALECHANGED_EXIT ); |
|
1669 } |
1651 } |
1670 |
1652 |
1671 /*! |
1653 /*! |
1672 Slot to handle left gesture effects completion |
1654 Slot to handle left gesture effects completion |
1673 */ |
1655 */ |