calendarui/views/src/calenpreviewpane.cpp
changeset 57 bb2d3e476f29
parent 55 2c54b51f39c4
child 63 a3cb48f6c889
--- a/calendarui/views/src/calenpreviewpane.cpp	Mon Jul 26 13:54:38 2010 +0530
+++ b/calendarui/views/src/calenpreviewpane.cpp	Mon Aug 09 18:30:52 2010 +0530
@@ -189,7 +189,7 @@
 			QString start;
 			if(mInstanceArray[i].type() != AgendaEntry::TypeTodo && 
 					mInstanceArray[i].type() != AgendaEntry::TypeAnniversary && 
-					mInstanceArray[i].type() != AgendaEntry::TypeEvent) {
+					!CalenAgendaUtils::isAlldayEvent(mInstanceArray[i])) {
 				QDateTime startTime = mInstanceArray[i].startTime();
 				// Check if event starts in past
 				checkStartTimeOfEvent(startTime);
@@ -370,6 +370,11 @@
     
     if(HbPanGesture *gesture = qobject_cast<HbPanGesture *>(event->gesture(Qt::PanGesture))) {
         if (gesture->state() == Qt::GestureUpdated) {
+            // Check if effect is not yet completed, ignore the current gesture if it is
+            if (mIsGestureHandled) {
+                OstTraceFunctionExit0( CALENPREVIEWPANE_GESTUREEVENT_EXIT );
+                return;
+            }
             // TODO: This work around till framework provides an api
             // to know the direciton of the pan, until then we need
             // calculate the direction explicitly
@@ -400,7 +405,7 @@
                     event->accept(Qt::PanGesture);
                 } else {
                     event->accept(Qt::PanGesture);
-                    OstTraceFunctionExit0( CALENPREVIEWPANE_GESTUREEVENT_EXIT );
+                    OstTraceFunctionExit0( DUP1_CALENPREVIEWPANE_GESTUREEVENT_EXIT );
                     return;
                 }
             } else if (abs(verticalDiff) < MAX_PAN_DIRECTION_THRESHOLD) {
@@ -416,7 +421,7 @@
                    event->accept(Qt::PanGesture);
                }else {
                    event->accept(Qt::PanGesture);
-                   OstTraceFunctionExit0( DUP1_CALENPREVIEWPANE_GESTUREEVENT_EXIT );
+                   OstTraceFunctionExit0( DUP2_CALENPREVIEWPANE_GESTUREEVENT_EXIT );
                    return;
                }
             }
@@ -478,4 +483,20 @@
     }
 }
 
+/*!
+ Sets the effect beign handled flag to true
+ */
+void CalenPreviewPane::effectStarted()
+{
+    mIsGestureHandled = true;
+}
+
+/*!
+ Resets the effect beign handled flag to true
+ */
+void CalenPreviewPane::effectFinished()
+{
+    mIsGestureHandled = false;
+}
+
 // End of file  --Don't remove this.