calendarui/views/src/calenmonthview.cpp
changeset 57 bb2d3e476f29
parent 55 2c54b51f39c4
child 63 a3cb48f6c889
equal deleted inserted replaced
55:2c54b51f39c4 57:bb2d3e476f29
   317 	//use this api after adding all action item to the menu
   317 	//use this api after adding all action item to the menu
   318 	//so that plugin add the "Show lunar data" item as a second last option 
   318 	//so that plugin add the "Show lunar data" item as a second last option 
   319 	// in all views
   319 	// in all views
   320 	mServices.OfferMenu(menu());
   320 	mServices.OfferMenu(menu());
   321 	
   321 	
   322 	// populate entries for the month view if the month view is launched 
       
   323 	// from the service APIs. Otherwise the month view is not populated with 
       
   324 	// the entries as CalenViewManager::handleInstanceViewCreation is called 
       
   325 	// before the month view creation so the model array is not populated.
       
   326 	fetchEntriesAndUpdateModel();	
       
   327 	OstTraceFunctionExit0( CALENMONTHVIEW_DOLAZYLOADING_EXIT );
   322 	OstTraceFunctionExit0( CALENMONTHVIEW_DOLAZYLOADING_EXIT );
   328 }
   323 }
   329 
   324 
   330 /*!
   325 /*!
   331  Adds the week numbers to the weeknumber widget
   326  Adds the week numbers to the weeknumber widget
  1518 {
  1513 {
  1519     OstTraceFunctionEntry0( CALENMONTHVIEW_HANDLEPREVIEWPANEGESTURE_ENTRY );
  1514     OstTraceFunctionEntry0( CALENMONTHVIEW_HANDLEPREVIEWPANEGESTURE_ENTRY );
  1520     
  1515     
  1521 	QGraphicsLinearLayout* viewLayout = static_cast<QGraphicsLinearLayout *>
  1516 	QGraphicsLinearLayout* viewLayout = static_cast<QGraphicsLinearLayout *>
  1522 												(widget()->layout());
  1517 												(widget()->layout());
       
  1518 	
       
  1519 	// Set the effect in progress flags for next and previous panes
       
  1520 	// For current pane, we would have set it in gestureEvent() function
       
  1521 	mPrevPreviewPane->effectStarted();
       
  1522 	mNextPreviewPane->effectStarted();
       
  1523 	
  1523 	if(rightGesture) {
  1524 	if(rightGesture) {
  1524 		// Need to bring up the previous day preview pane
  1525 		// Need to bring up the previous day preview pane
  1525 		// Create the effect on mCurrPreviewPane to slide to right side
  1526 		// Create the effect on mCurrPreviewPane to slide to right side
  1526 		mPrevPaneParent->setVisible(true);
  1527 		mPrevPaneParent->setVisible(true);
  1527 		if (mOrientation == Qt::Vertical) {
  1528 		if (mOrientation == Qt::Vertical) {
  1634 	mNextPaneLayoutWidget = mPrevPaneLayoutWidget;
  1635 	mNextPaneLayoutWidget = mPrevPaneLayoutWidget;
  1635 	mPrevPreviewPane = pane;
  1636 	mPrevPreviewPane = pane;
  1636 	mPrevPaneParent = paneParent;
  1637 	mPrevPaneParent = paneParent;
  1637 	mPrevPaneLayoutWidget = paneLayoutWidget;
  1638 	mPrevPaneLayoutWidget = paneLayoutWidget;
  1638 	
  1639 	
       
  1640 	// Reset the effect in progress flag
       
  1641 	mCurrPreviewPane->effectFinished();
       
  1642     mPrevPreviewPane->effectFinished();
       
  1643     mNextPreviewPane->effectFinished();
       
  1644     
  1639 	// Set the focus to proper date
  1645 	// Set the focus to proper date
  1640 	setCurrGridIndex(index);
  1646 	setCurrGridIndex(index);
  1641 	// Start the auto scroll on current preview pane
  1647 	// Start the auto scroll on current preview pane
  1642 	mCurrPreviewPane->startAutoScroll();
  1648 	mCurrPreviewPane->startAutoScroll();
  1643 	mNextPreviewPane->populateLabel(mDate.addDays(1));
  1649 	mNextPreviewPane->populateLabel(mDate.addDays(1));
  1672 	mPrevPaneLayoutWidget = mNextPaneLayoutWidget;
  1678 	mPrevPaneLayoutWidget = mNextPaneLayoutWidget;
  1673 	mNextPreviewPane = pane;
  1679 	mNextPreviewPane = pane;
  1674 	mNextPaneParent = paneParent;
  1680 	mNextPaneParent = paneParent;
  1675 	mNextPaneLayoutWidget = paneLayoutWidget;
  1681 	mNextPaneLayoutWidget = paneLayoutWidget;
  1676 	
  1682 	
       
  1683 	// Reset the effect in progress flag
       
  1684 	mCurrPreviewPane->effectFinished();
       
  1685     mNextPreviewPane->effectFinished();
       
  1686     mPrevPreviewPane->effectFinished();
       
  1687     
  1677 	// Set the focus to proper date
  1688 	// Set the focus to proper date
  1678 	setCurrGridIndex(index);
  1689 	setCurrGridIndex(index);
  1679 	// Start the auto scroll on current preview pane
  1690 	// Start the auto scroll on current preview pane
  1680 	mCurrPreviewPane->startAutoScroll();
  1691 	mCurrPreviewPane->startAutoScroll();
  1681 	mPrevPreviewPane->populateLabel(mDate.addDays(-1));
  1692 	mPrevPreviewPane->populateLabel(mDate.addDays(-1));